aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorTec <daniel112092@gmail.com>2019-07-13 11:12:00 +0200
committerTec <daniel112092@gmail.com>2019-07-13 11:12:00 +0200
commitf59ccc47d72842a731bd220c68b2faee8987aef4 (patch)
tree64b1b20c6f42e540746f7fc1af91a30f8f97a85b /src/main
parenta77d155745ba329a0eff044ea01dc00141311b95 (diff)
downloadGT5-Unofficial-f59ccc47d72842a731bd220c68b2faee8987aef4.tar.gz
GT5-Unofficial-f59ccc47d72842a731bd220c68b2faee8987aef4.tar.bz2
GT5-Unofficial-f59ccc47d72842a731bd220c68b2faee8987aef4.zip
Cleanup
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/com/github/technus/tectech/TecTech.java2
-rw-r--r--src/main/java/com/github/technus/tectech/Util.java4
-rw-r--r--src/main/java/com/github/technus/tectech/compatibility/thaumcraft/elementalMatter/definitions/AspectDefinitionCompatEnabled.java2
-rw-r--r--src/main/java/com/github/technus/tectech/loader/MainLoader.java11
-rw-r--r--src/main/java/com/github/technus/tectech/loader/thing/MachineLoader.java1
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/cElementalDecay.java2
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/cElementalStackMap.java4
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/commands/GiveEM.java3
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/commands/ListEM.java2
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/rElementalRecipe.java8
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/rElementalRecipeMap.java6
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/templates/cElementalPrimitive.java8
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/elementalMatter/definitions/complex/atom/dAtomDefinition.java28
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/elementalMatter/definitions/complex/atom/iaeaNuclide.java4
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/elementalMatter/definitions/complex/hadron/dHadronDefinition.java2
-rw-r--r--src/main/java/com/github/technus/tectech/nei/TT_NEI_ResearchHandler.java2
-rw-r--r--src/main/java/com/github/technus/tectech/nei/TT_NEI_ScannerHandler.java2
-rw-r--r--src/main/java/com/github/technus/tectech/recipe/TT_recipe.java4
-rw-r--r--src/main/java/com/github/technus/tectech/recipe/TT_recipeAdder.java2
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_OverflowElemental.java4
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_quantizer.java4
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_research.java8
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_microwave.java2
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_teslaCoil.java2
24 files changed, 44 insertions, 73 deletions
diff --git a/src/main/java/com/github/technus/tectech/TecTech.java b/src/main/java/com/github/technus/tectech/TecTech.java
index e7dc6859dd..337f493801 100644
--- a/src/main/java/com/github/technus/tectech/TecTech.java
+++ b/src/main/java/com/github/technus/tectech/TecTech.java
@@ -35,7 +35,7 @@ public class TecTech {
private static IngameErrorLog moduleAdminErrorLogs;
public static TecTechConfig configTecTech;
- public static ChunkDataHandler chunkDataHandler=new ChunkDataHandler();;
+ public static ChunkDataHandler chunkDataHandler=new ChunkDataHandler();
/**
* For Loader.isModLoaded checks during the runtime
diff --git a/src/main/java/com/github/technus/tectech/Util.java b/src/main/java/com/github/technus/tectech/Util.java
index c550203874..e333e70137 100644
--- a/src/main/java/com/github/technus/tectech/Util.java
+++ b/src/main/java/com/github/technus/tectech/Util.java
@@ -41,7 +41,7 @@ public final class Util {
@SuppressWarnings("ComparatorMethodParameterNotUsed")
public static <K, V extends Comparable<? super V>> SortedSet<Map.Entry<K, V>> entriesSortedByValues(Map<K, V> map) {
- SortedSet<Map.Entry<K, V>> sortedEntries = new TreeSet<Map.Entry<K, V>>(
+ SortedSet<Map.Entry<K, V>> sortedEntries = new TreeSet<>(
(e1, e2) -> {
int res = e1.getValue().compareTo(e2.getValue());
return res != 0 ? res : 1; // Special fix to preserve items with equal values
@@ -1159,7 +1159,7 @@ public final class Util {
c++;//depth
}
output.add("}");
- return output.toArray(new String[output.size()]);
+ return output.toArray(new String[0]);
}
private static final Pattern matchE_ = Pattern.compile("(E,(E,)+)");
diff --git a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/elementalMatter/definitions/AspectDefinitionCompatEnabled.java b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/elementalMatter/definitions/AspectDefinitionCompatEnabled.java
index 91523326db..da930a1d79 100644
--- a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/elementalMatter/definitions/AspectDefinitionCompatEnabled.java
+++ b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/elementalMatter/definitions/AspectDefinitionCompatEnabled.java
@@ -30,7 +30,7 @@ public final class AspectDefinitionCompatEnabled extends AspectDefinitionCompat
aspectToDef.put("perditio",magic_entropy);
ArrayList<Aspect> list=Aspect.getCompoundAspects();
- Aspect[] array= list.toArray(new Aspect[list.size()]);
+ Aspect[] array= list.toArray(new Aspect[0]);
while (!list.isEmpty()) {
for (Aspect aspect : array) {
if (list.contains(aspect)) {
diff --git a/src/main/java/com/github/technus/tectech/loader/MainLoader.java b/src/main/java/com/github/technus/tectech/loader/MainLoader.java
index b1a71afb2f..473045d665 100644
--- a/src/main/java/com/github/technus/tectech/loader/MainLoader.java
+++ b/src/main/java/com/github/technus/tectech/loader/MainLoader.java
@@ -234,14 +234,11 @@ public final class MainLoader {
}
public static void addAfterGregTechPostLoadRunner() {
- GregTech_API.sAfterGTPostload.add(new Runnable() {
- @Override
- public void run() {
- if(TecTech.configTecTech.NERF_FUSION) {
- FixBrokenFusionRecipes();
- }
- GT_MetaTileEntity_EM_collider.setValues(getFuelValue(Materials.Helium.getPlasma(125)));
+ GregTech_API.sAfterGTPostload.add(() -> {
+ if(TecTech.configTecTech.NERF_FUSION) {
+ FixBrokenFusionRecipes();
}
+ GT_MetaTileEntity_EM_collider.setValues(getFuelValue(Materials.Helium.getPlasma(125)));
});
}
diff --git a/src/main/java/com/github/technus/tectech/loader/thing/MachineLoader.java b/src/main/java/com/github/technus/tectech/loader/thing/MachineLoader.java
index 3f4bab98f0..e734a4f8a3 100644
--- a/src/main/java/com/github/technus/tectech/loader/thing/MachineLoader.java
+++ b/src/main/java/com/github/technus/tectech/loader/thing/MachineLoader.java
@@ -17,7 +17,6 @@ import net.minecraft.item.ItemStack;
import static com.github.technus.tectech.CommonValues.V;
import static com.github.technus.tectech.thing.CustomItemList.*;
-import static com.github.technus.tectech.thing.CustomItemList.eM_dynamotunnel9001;
/**
* Created by danie_000 on 16.11.2016.
diff --git a/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/cElementalDecay.java b/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/cElementalDecay.java
index 7f56ee8e5b..7d5e079876 100644
--- a/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/cElementalDecay.java
+++ b/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/cElementalDecay.java
@@ -8,7 +8,7 @@ import com.github.technus.tectech.mechanics.elementalMatter.core.templates.iElem
* Created by danie_000 on 22.10.2016.
*/
public final class cElementalDecay {
- public static final cElementalDecay[] noDecay = (cElementalDecay[]) null;
+ public static final cElementalDecay[] noDecay = null;
//DECAY IMPOSSIBLE!!!
//Do not use regular NULL java will not make it work with varargs!!!
//Or cast null into ARRAY type but this static is more convenient!!!
diff --git a/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/cElementalStackMap.java b/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/cElementalStackMap.java
index 19f5789804..fb6acec084 100644
--- a/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/cElementalStackMap.java
+++ b/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/cElementalStackMap.java
@@ -48,12 +48,12 @@ abstract class cElementalStackMap implements Comparable<cElementalStackMap> {
public final cElementalDefinitionStack[] values() {
Collection<cElementalDefinitionStack> var = map.values();
- return var.toArray(new cElementalDefinitionStack[var.size()]);
+ return var.toArray(new cElementalDefinitionStack[0]);
}
public final iElementalDefinition[] keys() {
Set<iElementalDefinition> var = map.keySet();
- return var.toArray(new iElementalDefinition[var.size()]);
+ return var.toArray(new iElementalDefinition[0]);
}
public long getCountOfAllAmounts(){
diff --git a/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/commands/GiveEM.java b/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/commands/GiveEM.java
index ad8d1ad8c8..333359949f 100644
--- a/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/commands/GiveEM.java
+++ b/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/commands/GiveEM.java
@@ -45,8 +45,7 @@ public class GiveEM implements ICommand {
}else{
TecTech.LOGGER.info("Spawninig EM for "+((EntityPlayerMP) sender).getDisplayName()+" - "+Arrays.toString(args));
- ArrayList<String> list=new ArrayList<>();
- list.addAll(Arrays.asList(args));
+ ArrayList<String> list = new ArrayList<>(Arrays.asList(args));
String energy=list.remove(0);
cElementalDefinitionStack def= getDefinitionStack(list);
diff --git a/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/commands/ListEM.java b/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/commands/ListEM.java
index 9e034f4655..20110c0b0d 100644
--- a/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/commands/ListEM.java
+++ b/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/commands/ListEM.java
@@ -29,7 +29,7 @@ public class ListEM implements ICommand {
sender.addChatMessage(new ChatComponentText(" Available Classes: tag - name"));
Map<Byte,Method> binds= cElementalDefinition.getBindsComplex();
for (Map.Entry<Byte,Method> e:binds.entrySet()) {
- sender.addChatMessage(new ChatComponentText(String.valueOf((char)e.getKey().byteValue())+" - "+e.getValue().getReturnType().getSimpleName()));
+ sender.addChatMessage(new ChatComponentText((char) e.getKey().byteValue() +" - "+e.getValue().getReturnType().getSimpleName()));
}
}else if(args.length==1){
sender.addChatMessage(new ChatComponentText(" Available Primitives: symbol - name"));
diff --git a/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/rElementalRecipe.java b/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/rElementalRecipe.java
index c2fd9a81d4..e191cc0e0a 100644
--- a/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/rElementalRecipe.java
+++ b/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/rElementalRecipe.java
@@ -38,13 +38,7 @@ public class rElementalRecipe implements Comparable<rElementalRecipe> {
if(compare!=0) {
return compare;
}
- if(ID>o.ID) {
- return 1;
- }
- if(ID<o.ID) {
- return -1;
- }
- return 0;
+ return Short.compare(ID, o.ID);
}
@Override
diff --git a/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/rElementalRecipeMap.java b/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/rElementalRecipeMap.java
index c289fc94ae..ed5e46f43f 100644
--- a/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/rElementalRecipeMap.java
+++ b/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/rElementalRecipeMap.java
@@ -15,11 +15,7 @@ public class rElementalRecipeMap {//TODO FIX
}
public rElementalRecipe put(rElementalRecipe in) {
- HashMap<Short, rElementalRecipe> r = recipes.get(in.inEM);
- if (r == null) {
- r = new HashMap<>();
- recipes.put(in.inEM, r);
- }
+ HashMap<Short, rElementalRecipe> r = recipes.computeIfAbsent(in.inEM, k -> new HashMap<>());
return r.put(in.ID, in);//IF THIS RETURN SHIT, it means that inputs are using the exact same types of matter as input - (non amount wise collision)
//It is either bad, or unimportant if you use different id's
}
diff --git a/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/templates/cElementalPrimitive.java b/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/templates/cElementalPrimitive.java
index bcd46c579a..749d5c687b 100644
--- a/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/templates/cElementalPrimitive.java
+++ b/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/templates/cElementalPrimitive.java
@@ -251,13 +251,7 @@ public abstract class cElementalPrimitive extends cElementalDefinition {
public final int compareTo(iElementalDefinition o) {
if (getClassType() == o.getClassType()) {
int oID = ((cElementalPrimitive) o).ID;
- if (ID > oID) {
- return 1;
- }
- if (ID < oID) {
- return -1;
- }
- return 0;
+ return Integer.compare(ID, oID);
}
return compareClassID(o);
}
diff --git a/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/definitions/complex/atom/dAtomDefinition.java b/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/definitions/complex/atom/dAtomDefinition.java
index 99e80b7be2..86d31bfb1b 100644
--- a/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/definitions/complex/atom/dAtomDefinition.java
+++ b/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/definitions/complex/atom/dAtomDefinition.java
@@ -396,35 +396,35 @@ public final class dAtomDefinition extends cElementalDefinition {
switch (decayMode) {
case -2:
if(TecTech.RANDOM.nextBoolean() && ElectronCapture(decaysList)) {
- return decaysList.toArray(new cElementalDecay[decaysList.size()]);
+ return decaysList.toArray(new cElementalDecay[0]);
} else if(PbetaDecay(decaysList)) {
- return decaysList.toArray(new cElementalDecay[decaysList.size()]);
+ return decaysList.toArray(new cElementalDecay[0]);
}
break;
case -1:
if(Emmision(decaysList, dHadronDefinition.hadron_p1)) {
- return decaysList.toArray(new cElementalDecay[decaysList.size()]);
+ return decaysList.toArray(new cElementalDecay[0]);
}
break;
case 0:
if(alphaDecay(decaysList)) {
- return decaysList.toArray(new cElementalDecay[decaysList.size()]);
+ return decaysList.toArray(new cElementalDecay[0]);
}
break;
case 1:
if(Emmision(decaysList, dHadronDefinition.hadron_n1)) {
- return decaysList.toArray(new cElementalDecay[decaysList.size()]);
+ return decaysList.toArray(new cElementalDecay[0]);
}
break;
case 2:
if(MbetaDecay(decaysList)) {
- return decaysList.toArray(new cElementalDecay[decaysList.size()]);
+ return decaysList.toArray(new cElementalDecay[0]);
}
break;
default:
if(decayMode>8){
if(iaeaDecay(decaysList,0)) {
- return decaysList.toArray(new cElementalDecay[decaysList.size()]);
+ return decaysList.toArray(new cElementalDecay[0]);
}
return getDecayArray(decaysList,decayMode- BYTE_OFFSET,false);
}
@@ -1167,7 +1167,7 @@ public final class dAtomDefinition extends cElementalDefinition {
if (iaeaDefinitionExistsAndHasEnergyLevels) {
ArrayList<cElementalDecay> decays=new ArrayList<>(4);
if(iaeaDecay(decays,energyLevel)){
- return decays.toArray(new cElementalDecay[decays.size()]);
+ return decays.toArray(new cElementalDecay[0]);
}
}
if(energyLevel< Math.abs(charge)/3+neutralCount) {
@@ -1257,7 +1257,7 @@ public final class dAtomDefinition extends cElementalDefinition {
decaysInto.add(new cElementalDefinitionStack(boson_Y__, 2));
}
}
- return new cElementalDecay[]{new cElementalDecay(0.75F, decaysInto.toArray(new cElementalDefinitionStack[decaysInto.size()])), deadEnd};
+ return new cElementalDecay[]{new cElementalDecay(0.75F, decaysInto.toArray(new cElementalDefinitionStack[0])), deadEnd};
}
//@Override
@@ -1357,10 +1357,7 @@ public final class dAtomDefinition extends cElementalDefinition {
float rawLifeTime = calculateLifeTime(izoDiff, izoDiffAbs, element, isotope, false);
iaeaNuclide nuclide = iaeaNuclide.get(element, isotope);
if (rawLifeTime >= STABLE_RAW_LIFE_TIME || nuclide != null && nuclide.halfTime >= STABLE_RAW_LIFE_TIME) {
- TreeSet<Integer> isotopes = stableIsotopes.get(element);
- if (isotopes == null) {
- stableIsotopes.put(element, isotopes = new TreeSet<>());
- }
+ TreeSet<Integer> isotopes = stableIsotopes.computeIfAbsent(element, k -> new TreeSet<>());
isotopes.add(isotope);
}
}
@@ -1375,10 +1372,7 @@ public final class dAtomDefinition extends cElementalDefinition {
int izoDiff = isotope - Isotope;
int izoDiffAbs = Math.abs(izoDiff);
float rawLifeTime = calculateLifeTime(izoDiff, izoDiffAbs, element, isotope, false);
- TreeMap<Float, Integer> isotopes = mostStableUnstableIsotopes.get(element);
- if (isotopes == null) {
- mostStableUnstableIsotopes.put(element, isotopes = new TreeMap<>());
- }
+ TreeMap<Float, Integer> isotopes = mostStableUnstableIsotopes.computeIfAbsent(element, k -> new TreeMap<>());
isotopes.put(rawLifeTime, isotope);
}
}
diff --git a/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/definitions/complex/atom/iaeaNuclide.java b/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/definitions/complex/atom/iaeaNuclide.java
index 10c537ed55..ac44f9242e 100644
--- a/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/definitions/complex/atom/iaeaNuclide.java
+++ b/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/definitions/complex/atom/iaeaNuclide.java
@@ -134,7 +134,7 @@ public final class iaeaNuclide {
if(energeticStates==null || energeticStates.isEmpty()) {
energeticStatesArray = empty;
} else {
- energeticStatesArray = energeticStates.values().toArray(new energeticState[energeticStates.size()]);
+ energeticStatesArray = energeticStates.values().toArray(new energeticState[0]);
}
}
@@ -273,7 +273,7 @@ public final class iaeaNuclide {
//if(DEBUG_MODE){
// System.out.println("INVALID SUM?\t"+normalization+"\t"+decay1+"\t"+chance1+"\t"+decay2+"\t"+chance2+"\t"+decay3+"\t"+chance3);
//}
- return decays.values().toArray(new iaeaDecay[decays.size()]);
+ return decays.values().toArray(new iaeaDecay[0]);
}
public static final class iaeaDecay{
diff --git a/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/definitions/complex/hadron/dHadronDefinition.java b/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/definitions/complex/hadron/dHadronDefinition.java
index 6b98cd2a99..1d617fcdb9 100644
--- a/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/definitions/complex/hadron/dHadronDefinition.java
+++ b/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/definitions/complex/hadron/dHadronDefinition.java
@@ -198,7 +198,7 @@ public final class dHadronDefinition extends cElementalDefinition {//TODO Optimi
}
}
return new cElementalDecay[]{
- new cElementalDecay(0.75F, decaysInto.toArray(new cElementalDefinitionStack[decaysInto.size()])),
+ new cElementalDecay(0.75F, decaysInto.toArray(new cElementalDefinitionStack[0])),
eBosonDefinition.deadEnd
};
}
diff --git a/src/main/java/com/github/technus/tectech/nei/TT_NEI_ResearchHandler.java b/src/main/java/com/github/technus/tectech/nei/TT_NEI_ResearchHandler.java
index a797a65d09..1c75dceec7 100644
--- a/src/main/java/com/github/technus/tectech/nei/TT_NEI_ResearchHandler.java
+++ b/src/main/java/com/github/technus/tectech/nei/TT_NEI_ResearchHandler.java
@@ -365,7 +365,7 @@ public class TT_NEI_ResearchHandler extends TemplateRecipeHandler {
}
}
}
- items = tDisplayStacks.toArray(new ItemStack[tDisplayStacks.size()]);
+ items = tDisplayStacks.toArray(new ItemStack[0]);
if (items.length == 0) {
items = new ItemStack[]{new ItemStack(Blocks.fire)};
}
diff --git a/src/main/java/com/github/technus/tectech/nei/TT_NEI_ScannerHandler.java b/src/main/java/com/github/technus/tectech/nei/TT_NEI_ScannerHandler.java
index 8154816cfc..e9624f1b33 100644
--- a/src/main/java/com/github/technus/tectech/nei/TT_NEI_ScannerHandler.java
+++ b/src/main/java/com/github/technus/tectech/nei/TT_NEI_ScannerHandler.java
@@ -365,7 +365,7 @@ public class TT_NEI_ScannerHandler extends TemplateRecipeHandler {
}
}
}
- items = tDisplayStacks.toArray(new ItemStack[tDisplayStacks.size()]);
+ items = tDisplayStacks.toArray(new ItemStack[0]);
if (items.length == 0) {
items = new ItemStack[]{new ItemStack(Blocks.fire)};
}
diff --git a/src/main/java/com/github/technus/tectech/recipe/TT_recipe.java b/src/main/java/com/github/technus/tectech/recipe/TT_recipe.java
index 57d479a705..b5b5dd82b9 100644
--- a/src/main/java/com/github/technus/tectech/recipe/TT_recipe.java
+++ b/src/main/java/com/github/technus/tectech/recipe/TT_recipe.java
@@ -165,8 +165,8 @@ public class TT_recipe extends GT_Recipe {
}
public static class GT_Recipe_MapTT extends GT_Recipe.GT_Recipe_Map {
- public static GT_Recipe_MapTT sResearchableFakeRecipes =new GT_Recipe_MapTT(new HashSet<GT_Recipe>(32), "gt.recipe.researchStation", "Research station", (String)null, "gregtech:textures/gui/multimachines/ResearchFake", 1, 1,1,0,1,"", 1, "", true, false);//nei to false - using custom handler
- public static GT_Recipe_MapTT sScannableFakeRecipes = new GT_Recipe_MapTT(new HashSet<GT_Recipe>(32),"gt.recipe.em_scanner","EM Scanner Research",(String)null,"gregtech:textures/gui/multimachines/ResearchFake",1,1,1,0,1,"",1,"",true,false);
+ public static GT_Recipe_MapTT sResearchableFakeRecipes =new GT_Recipe_MapTT(new HashSet<>(32), "gt.recipe.researchStation", "Research station", null, "gregtech:textures/gui/multimachines/ResearchFake", 1, 1,1,0,1,"", 1, "", true, false);//nei to false - using custom handler
+ public static GT_Recipe_MapTT sScannableFakeRecipes = new GT_Recipe_MapTT(new HashSet<>(32),"gt.recipe.em_scanner","EM Scanner Research", null,"gregtech:textures/gui/multimachines/ResearchFake",1,1,1,0,1,"",1,"",true,false);
public GT_Recipe_MapTT(Collection<GT_Recipe> aRecipeList, String aUnlocalizedName, String aLocalName, String aNEIName, String aNEIGUIPath, int aUsualInputCount, int aUsualOutputCount, int aMinimalInputItems, int aMinimalInputFluids, int aAmperage, String aNEISpecialValuePre, int aNEISpecialValueMultiplier, String aNEISpecialValuePost, boolean aShowVoltageAmperageInNEI, boolean aNEIAllowed) {
super(aRecipeList, aUnlocalizedName, aLocalName, aNEIName, aNEIGUIPath, aUsualInputCount, aUsualOutputCount, aMinimalInputItems, aMinimalInputFluids, aAmperage, aNEISpecialValuePre, aNEISpecialValueMultiplier, aNEISpecialValuePost, aShowVoltageAmperageInNEI, aNEIAllowed);
diff --git a/src/main/java/com/github/technus/tectech/recipe/TT_recipeAdder.java b/src/main/java/com/github/technus/tectech/recipe/TT_recipeAdder.java
index 4e352a7610..61efea1a0e 100644
--- a/src/main/java/com/github/technus/tectech/recipe/TT_recipeAdder.java
+++ b/src/main/java/com/github/technus/tectech/recipe/TT_recipeAdder.java
@@ -115,7 +115,7 @@ public class TT_recipeAdder extends GT_RecipeAdder {
computationRequiredPerSec = Short.MAX_VALUE;
}
TT_recipe.GT_Recipe_MapTT.sResearchableFakeRecipes.addFakeRecipe(false, new ItemStack[]{aResearchItem}, new ItemStack[]{aOutput}, new ItemStack[]{ItemList.Tool_DataStick.getWithName(1L, "Writes Research result")}, null, null, totalComputationRequired, researchEUt, researchAmperage| computationRequiredPerSec<<16);
- GT_Recipe.GT_Recipe_Map.sAssemblylineVisualRecipes.addFakeRecipe(false,tInputs,new ItemStack[]{aOutput},new ItemStack[]{ItemList.Tool_DataStick.getWithName(1L, "Reads Research result", new Object[0])},aFluidInputs,null,assDuration,assEUt,0,tAlts,true);
+ GT_Recipe.GT_Recipe_Map.sAssemblylineVisualRecipes.addFakeRecipe(false,tInputs,new ItemStack[]{aOutput},new ItemStack[]{ItemList.Tool_DataStick.getWithName(1L, "Reads Research result")},aFluidInputs,null,assDuration,assEUt,0,tAlts,true);
GT_Recipe.GT_Recipe_AssemblyLine.sAssemblylineRecipes.add(new GT_Recipe.GT_Recipe_AssemblyLine( CustomItemList.UnusedStuff.get(1), totalComputationRequired/computationRequiredPerSec, tInputs, aFluidInputs, aOutput, assDuration, assEUt, tAlts));
return true;
}
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_OverflowElemental.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_OverflowElemental.java
index 867f814b63..63321a03a4 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_OverflowElemental.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_OverflowElemental.java
@@ -40,7 +40,7 @@ public class GT_MetaTileEntity_Hatch_OverflowElemental extends GT_MetaTileEntity
private static Textures.BlockIcons.CustomIcon EM_T_ACTIVE;
private static Textures.BlockIcons.CustomIcon MufflerEM;
private static Textures.BlockIcons.CustomIcon MufflerEMidle;
- private float overflowMatter = 0f;
+ private float overflowMatter;
public final float overflowMax;
private final float overflowDisperse;
@@ -195,7 +195,7 @@ public class GT_MetaTileEntity_Hatch_OverflowElemental extends GT_MetaTileEntity
"Contained mass:",
EnumChatFormatting.RED + Double.toString(overflowMatter) + EnumChatFormatting.RESET + " eV/c\u00b2 /",
EnumChatFormatting.GREEN + Double.toString(overflowMax) + EnumChatFormatting.RESET + " eV/c\u00b2",
- "Mass Disposal speed: " + EnumChatFormatting.BLUE + Double.toString(overflowDisperse) + EnumChatFormatting.RESET + " (eV/c\u00b2)/s"
+ "Mass Disposal speed: " + EnumChatFormatting.BLUE + overflowDisperse + EnumChatFormatting.RESET + " (eV/c\u00b2)/s"
};
}
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_quantizer.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_quantizer.java
index 381df4b893..d34acd1534 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_quantizer.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_quantizer.java
@@ -117,7 +117,7 @@ public class GT_MetaTileEntity_EM_quantizer extends GT_MetaTileEntity_Multiblock
public boolean checkRecipe_EM(ItemStack itemStack) {//TODO implement instance quantization
if (GregTech_API.sPostloadFinished) {
ArrayList<ItemStack> storedInputs = getStoredInputs();
- ItemStack[] inI = storedInputs.toArray(new ItemStack[storedInputs.size()]);
+ ItemStack[] inI = storedInputs.toArray(new ItemStack[0]);
if (inI.length > 0) {
for (ItemStack is : inI) {
//ITEM STACK quantization
@@ -156,7 +156,7 @@ public class GT_MetaTileEntity_EM_quantizer extends GT_MetaTileEntity_Multiblock
}
}
ArrayList<FluidStack> storedFluids = getStoredFluids();
- FluidStack[] inF = storedFluids.toArray(new FluidStack[storedFluids.size()]);
+ FluidStack[] inF = storedFluids.toArray(new FluidStack[0]);
if (inF.length > 0) {
for (FluidStack fs : inF) {
aFluidQuantizationInfo aFQI = bTransformationInfo.fluidQuantization.get(fs.getFluid().getID());
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_research.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_research.java
index 88b24d11ae..e74cef7a34 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_research.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_research.java
@@ -515,20 +515,20 @@ public class GT_MetaTileEntity_EM_research extends GT_MetaTileEntity_MultiblockB
return new String[]{
"Energy Hatches:",
EnumChatFormatting.GREEN + Long.toString(storedEnergy) + EnumChatFormatting.RESET + " EU / " +
- EnumChatFormatting.YELLOW + Long.toString(maxEnergy) + EnumChatFormatting.RESET + " EU",
+ EnumChatFormatting.YELLOW + maxEnergy + EnumChatFormatting.RESET + " EU",
(mEUt <= 0 ? "Probably uses: " : "Probably makes: ") +
- EnumChatFormatting.RED + Integer.toString(Math.abs(mEUt)) + EnumChatFormatting.RESET + " EU/t at " +
+ EnumChatFormatting.RED + Math.abs(mEUt) + EnumChatFormatting.RESET + " EU/t at " +
EnumChatFormatting.RED + eAmpereFlow + EnumChatFormatting.RESET + " A",
"Tier Rating: " + EnumChatFormatting.YELLOW + VN[getMaxEnergyInputTier_EM()] + EnumChatFormatting.RESET + " / " + EnumChatFormatting.GREEN + VN[getMinEnergyInputTier_EM()] + EnumChatFormatting.RESET +
" Amp Rating: " + EnumChatFormatting.GREEN + eMaxAmpereFlow + EnumChatFormatting.RESET + " A",
"Problems: " + EnumChatFormatting.RED + (getIdealStatus() - getRepairStatus()) + EnumChatFormatting.RESET +
- " Efficiency: " + EnumChatFormatting.YELLOW + Float.toString(mEfficiency / 100.0F) + EnumChatFormatting.RESET + " %",
+ " Efficiency: " + EnumChatFormatting.YELLOW + mEfficiency / 100.0F + EnumChatFormatting.RESET + " %",
"PowerPass: " + EnumChatFormatting.BLUE + ePowerPass + EnumChatFormatting.RESET +
" SafeVoid: " + EnumChatFormatting.BLUE + eSafeVoid,
"Computation Available: " + EnumChatFormatting.GREEN + eAvailableData + EnumChatFormatting.RESET,
"Computation Remaining:",
EnumChatFormatting.GREEN + Long.toString(computationRemaining / 20L) + EnumChatFormatting.RESET + " / " +
- EnumChatFormatting.YELLOW + Long.toString(computationRequired / 20L)
+ EnumChatFormatting.YELLOW + computationRequired / 20L
};
}
}
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_microwave.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_microwave.java
index 7894a7fa37..7cb6bbab53 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_microwave.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_microwave.java
@@ -4,8 +4,6 @@ import com.github.technus.tectech.CommonValues;
import com.github.technus.tectech.Reference;
import com.github.technus.tectech.thing.metaTileEntity.IConstructable;
import com.github.technus.tectech.thing.metaTileEntity.multi.base.*;
-import com.github.technus.tectech.thing.metaTileEntity.multi.base.NameFunction;
-import com.github.technus.tectech.thing.metaTileEntity.multi.base.StatusFunction;
import com.github.technus.tectech.thing.metaTileEntity.multi.base.render.TT_RenderedTexture;
import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_teslaCoil.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_teslaCoil.java
index 2c58006360..f62951bf48 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_teslaCoil.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_teslaCoil.java
@@ -288,7 +288,7 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock
float yPos = mte.getYCoord() + 0.5f;
float zPos = mte.getZCoord() + 0.5f;
long reqSum = 0;
- for (GT_MetaTileEntity_TM_teslaCoil Rx : eTeslaList.toArray(new GT_MetaTileEntity_TM_teslaCoil[eTeslaList.size()])) {
+ for (GT_MetaTileEntity_TM_teslaCoil Rx : eTeslaList.toArray(new GT_MetaTileEntity_TM_teslaCoil[0])) {
try {
reqSum += Rx.maxEUStore() - Rx.getEUVar();
} catch (Exception e) {