diff options
20 files changed, 155 insertions, 188 deletions
diff --git a/build.gradle b/build.gradle index 6fccbe64e8..3933a94c35 100644 --- a/build.gradle +++ b/build.gradle @@ -91,10 +91,10 @@ task getGregTech(type: Download) { mustRunAfter "repackMinecraft" } -tasks.setupCIWorkspace.dependsOn getGregTech -tasks.setupDevWorkspace.dependsOn getGregTech -tasks.setupDecompWorkspace.dependsOn getGregTech -tasks.compileJava.dependsOn getGregTech +//tasks.setupCIWorkspace.dependsOn getGregTech +//tasks.setupDevWorkspace.dependsOn getGregTech +//tasks.setupDecompWorkspace.dependsOn getGregTech +//tasks.compileJava.dependsOn getGregTech processResources { 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 0e65aa0b12..9ecb1b6526 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 @@ -6,7 +6,6 @@ import com.github.technus.tectech.compatibility.thaumcraft.thing.metaTileEntity. import com.github.technus.tectech.compatibility.thaumcraft.thing.metaTileEntity.multi.GT_MetaTileEntity_EM_essentiaQuantizer; import com.github.technus.tectech.thing.metaTileEntity.hatch.*; import com.github.technus.tectech.thing.metaTileEntity.multi.*; -import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM; import com.github.technus.tectech.thing.metaTileEntity.multi.em_machine.GT_MetaTileEntity_EM_machine; import com.github.technus.tectech.thing.metaTileEntity.pipe.GT_MetaTileEntity_Pipe_Data; import com.github.technus.tectech.thing.metaTileEntity.pipe.GT_MetaTileEntity_Pipe_EM; @@ -317,13 +316,7 @@ public class MachineLoader implements Runnable { // MetaTE init // =================================================================================================== - GT_MetaTileEntity_MultiblockBase_EM.run(); GT_MetaTileEntity_Hatch_Rack.run(); - GT_MetaTileEntity_EM_computer.run(); - GT_MetaTileEntity_EM_research.run(); - GT_MetaTileEntity_EM_dataBank.run(); - GT_MetaTileEntity_TM_teslaCoil.run(); - GT_MetaTileEntity_DataReader.run(); if (!Loader.isModLoaded(Reference.DREAMCRAFT)) { diff --git a/src/main/java/com/github/technus/tectech/thing/item/ParametrizerMemoryCard.java b/src/main/java/com/github/technus/tectech/thing/item/ParametrizerMemoryCard.java index 25eb3ec939..4d7b451dd2 100644 --- a/src/main/java/com/github/technus/tectech/thing/item/ParametrizerMemoryCard.java +++ b/src/main/java/com/github/technus/tectech/thing/item/ParametrizerMemoryCard.java @@ -57,19 +57,13 @@ public final class ParametrizerMemoryCard extends Item { if (aStack.getItemDamage() == 1) { //write to parametrizer parametrizer.param = tNBT.getInteger("param"); - if (parametrizer.setUsingFloats(tNBT.getBoolean("usesFloats"))) { - parametrizer.value0i = (int) Float.intBitsToFloat(tNBT.getInteger("value0i")); - parametrizer.value1i = (int) Float.intBitsToFloat(tNBT.getInteger("value1i")); - } else { - parametrizer.value0i = tNBT.getInteger("value0i"); - parametrizer.value1i = tNBT.getInteger("value1i"); - } + parametrizer.value0D = tNBT.getDouble("value0D"); + parametrizer.value1D = tNBT.getDouble("value1D"); } else { //read from parametrizer tNBT.setInteger("param", parametrizer.param); - tNBT.setBoolean("usesFloats", parametrizer.isUsingFloats()); - tNBT.setInteger("value0i", parametrizer.value0i); - tNBT.setInteger("value1i", parametrizer.value1i); + tNBT.setDouble("value0D", parametrizer.value0D); + tNBT.setDouble("value1D", parametrizer.value1D); } return true; }else if(metaTE instanceof GT_MetaTileEntity_MultiblockBase_EM){ @@ -79,16 +73,10 @@ public final class ParametrizerMemoryCard extends Item { } NBTTagCompound tNBT = aStack.getTagCompound(); if(aStack.getItemDamage()== 1){ - //write to base - if(tNBT.getBoolean("usesFloats")){ - base.setParameterPairIn_ClearOut(tNBT.getInteger("param"),true - ,Float.intBitsToFloat(tNBT.getInteger("value0i")) - ,Float.intBitsToFloat(tNBT.getInteger("value1i"))); - }else{ - base.setParameterPairIn_ClearOut(tNBT.getInteger("param"),false - ,tNBT.getInteger("value0i") - ,tNBT.getInteger("value1i")); - } + base.parametrization.trySetParameters( + tNBT.getInteger("param"), + tNBT.getDouble("value0D"), + tNBT.getDouble("value1D")); return true; } } @@ -125,17 +113,15 @@ public final class ParametrizerMemoryCard extends Item { } aList.add(EnumChatFormatting.BLUE + "Sneak right click to lock/unlock"); - int temp; + long temp; if(tNBT!=null && tNBT.hasKey("param")) { aList.add("ParameterGroup ID: "+EnumChatFormatting.AQUA + tNBT.getInteger("param")); - temp=tNBT.getInteger("value0i"); - aList.add("Value 0|I: "+EnumChatFormatting.AQUA + temp); - aList.add("Value 0|F: "+EnumChatFormatting.AQUA + Float.intBitsToFloat(temp)); - aList.add("Value 0|B: "+EnumChatFormatting.AQUA + Util.intBitsToShortString(temp)); - temp=tNBT.getInteger("value1i"); - aList.add("Value 1|I: "+EnumChatFormatting.AQUA + temp); - aList.add("Value 1|F: "+EnumChatFormatting.AQUA + Float.intBitsToFloat(temp)); - aList.add("Value 1|B: "+EnumChatFormatting.AQUA + Util.intBitsToShortString(temp)); + temp=tNBT.getInteger("value0D"); + aList.add("Value 0D: "+EnumChatFormatting.AQUA + temp); + aList.add("Value 0B: "+EnumChatFormatting.AQUA + Util.longBitsToShortString(Double.doubleToLongBits(temp))); + temp=tNBT.getInteger("value1D"); + aList.add("Value 1D: "+EnumChatFormatting.AQUA + temp); + aList.add("Value 1B: "+EnumChatFormatting.AQUA + Util.longBitsToShortString(Double.doubleToLongBits(temp))); aList.add("Uses Floats: "+(tNBT.getBoolean("usesFloats")?EnumChatFormatting.GREEN+"TRUE":EnumChatFormatting.RED+"FALSE")); } diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_Param.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_Param.java index aa92eb777e..a4a713626c 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_Param.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_Param.java @@ -28,10 +28,10 @@ import net.minecraftforge.fluids.FluidStack; public class GT_MetaTileEntity_Hatch_Param extends GT_MetaTileEntity_Hatch { public int pointer = 0; public int param = -1; - public double value0i = 0; - public double value1i = 0; - public double input0i = 0; - public double input1i = 0; + public double value0D = 0; + public double value1D = 0; + public double input0D = 0; + public double input1D = 0; private static Textures.BlockIcons.CustomIcon ScreenON; private static Textures.BlockIcons.CustomIcon ScreenOFF; @@ -106,10 +106,10 @@ public class GT_MetaTileEntity_Hatch_Param extends GT_MetaTileEntity_Hatch { public String[] getInfoData() { return new String[]{ "Parametrizer ID: " + EnumChatFormatting.GREEN + param, - "Value 0I: " + EnumChatFormatting.AQUA + value0i, - "Value 1I: " + EnumChatFormatting.BLUE + value1i, - "Input 0I: " + EnumChatFormatting.GOLD + input0i, - "Input 1I: " + EnumChatFormatting.YELLOW + input1i, + "Value 0D: " + EnumChatFormatting.AQUA + value0D, + "Value 1D: " + EnumChatFormatting.BLUE + value1D, + "Input 0D: " + EnumChatFormatting.GOLD + input0D, + "Input 1D: " + EnumChatFormatting.YELLOW + input1D, }; } @@ -132,10 +132,10 @@ public class GT_MetaTileEntity_Hatch_Param extends GT_MetaTileEntity_Hatch { public void saveNBTData(NBTTagCompound aNBT) { super.saveNBTData(aNBT); aNBT.setInteger("ePointer", pointer); - aNBT.setDouble("eDValue0i", value0i); - aNBT.setDouble("eDValue1i", value1i); - aNBT.setDouble("eDInput0i", input0i); - aNBT.setDouble("eDInput1i", input1i); + aNBT.setDouble("eValue0D", value0D); + aNBT.setDouble("eValue1D", value1D); + aNBT.setDouble("eInput0D", input0D); + aNBT.setDouble("eInput1D", input1D); aNBT.setInteger("eParam", param); } @@ -150,21 +150,21 @@ public class GT_MetaTileEntity_Hatch_Param extends GT_MetaTileEntity_Hatch { aNBT.hasKey("eInput1i")){ boolean usesFloat = aNBT.getBoolean("eFloats"); if(usesFloat){ - value0i=Float.intBitsToFloat(aNBT.getInteger("eValue0i")); - value1i=Float.intBitsToFloat(aNBT.getInteger("eValue1i")); - input0i=Float.intBitsToFloat(aNBT.getInteger("eInput0i")); - input1i=Float.intBitsToFloat(aNBT.getInteger("eInput1i")); + value0D=Float.intBitsToFloat(aNBT.getInteger("eValue0i")); + value1D=Float.intBitsToFloat(aNBT.getInteger("eValue1i")); + input0D=Float.intBitsToFloat(aNBT.getInteger("eInput0i")); + input1D=Float.intBitsToFloat(aNBT.getInteger("eInput1i")); }else { - value0i=aNBT.getInteger("eValue0i"); - value1i=aNBT.getInteger("eValue1i"); - input0i=aNBT.getInteger("eInput0i"); - input1i=aNBT.getInteger("eInput1i"); + value0D=aNBT.getInteger("eValue0i"); + value1D=aNBT.getInteger("eValue1i"); + input0D=aNBT.getInteger("eInput0i"); + input1D=aNBT.getInteger("eInput1i"); } }else{ - value0i=aNBT.getDouble("eDValue0i"); - value1i=aNBT.getDouble("eDValue1i"); - input0i=aNBT.getDouble("eDInput0i"); - input1i=aNBT.getDouble("eDInput1i"); + value0D=aNBT.getDouble("eValue0D"); + value1D=aNBT.getDouble("eValue1D"); + input0D=aNBT.getDouble("eInput0D"); + input1D=aNBT.getDouble("eInput1D"); } param = aNBT.getInteger("eParam"); } diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_Container_Param.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_Container_Param.java index db0c2d501f..f9c53090ff 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_Container_Param.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_Container_Param.java @@ -62,53 +62,53 @@ public class GT_Container_Param extends GT_ContainerMetaTile_Machine { paramH.param -= aShifthold == 1 ? 16 : 4; break; case 1: - paramH.value0i -= aShifthold == 1 ? 4096 : 256; + paramH.value0D -= aShifthold == 1 ? 4096 : 256; break; case 2: - paramH.value1i -= aShifthold == 1 ? 4096 : 256; + paramH.value1D -= aShifthold == 1 ? 4096 : 256; break; case 3: - paramH.value0i /= aShifthold == 1 ? 4096 : 256; - paramH.value1i /= aShifthold == 1 ? 4096 : 256; + paramH.value0D /= aShifthold == 1 ? 4096 : 256; + paramH.value1D /= aShifthold == 1 ? 4096 : 256; break; case 4: paramH.param -= aShifthold == 1 ? 2 : 1; break; case 5: - paramH.value0i -= aShifthold == 1 ? 16 : 1; + paramH.value0D -= aShifthold == 1 ? 16 : 1; break; case 6: - paramH.value1i -= aShifthold == 1 ? 16 : 1; + paramH.value1D -= aShifthold == 1 ? 16 : 1; break; case 7: - paramH.value0i /= aShifthold == 1 ? 16 : 2; - paramH.value1i /= aShifthold == 1 ? 16 : 2; + paramH.value0D /= aShifthold == 1 ? 16 : 2; + paramH.value1D /= aShifthold == 1 ? 16 : 2; break; case 8: paramH.param += aShifthold == 1 ? 16 : 4; break; case 9: - paramH.value0i += aShifthold == 1 ? 4096 : 256; + paramH.value0D += aShifthold == 1 ? 4096 : 256; break; case 10: - paramH.value1i += aShifthold == 1 ? 4096 : 256; + paramH.value1D += aShifthold == 1 ? 4096 : 256; break; case 11: - paramH.value0i *= aShifthold == 1 ? 4096 : 256; - paramH.value1i *= aShifthold == 1 ? 4096 : 256; + paramH.value0D *= aShifthold == 1 ? 4096 : 256; + paramH.value1D *= aShifthold == 1 ? 4096 : 256; break; case 12: paramH.param += aShifthold == 1 ? 2 : 1; break; case 13: - paramH.value0i += aShifthold == 1 ? 16 : 1; + paramH.value0D += aShifthold == 1 ? 16 : 1; break; case 14: - paramH.value1i += aShifthold == 1 ? 16 : 1; + paramH.value1D += aShifthold == 1 ? 16 : 1; break; case 15: - paramH.value0i *= aShifthold == 1 ? 16 : 2; - paramH.value1i *= aShifthold == 1 ? 16 : 2; + paramH.value0D *= aShifthold == 1 ? 16 : 2; + paramH.value1D *= aShifthold == 1 ? 16 : 2; break; default: doStuff = false; @@ -133,10 +133,10 @@ public class GT_Container_Param extends GT_ContainerMetaTile_Machine { return; } param = ((GT_MetaTileEntity_Hatch_Param) mTileEntity.getMetaTileEntity()).param; - value0f = ((GT_MetaTileEntity_Hatch_Param) mTileEntity.getMetaTileEntity()).value0i; - value1f = ((GT_MetaTileEntity_Hatch_Param) mTileEntity.getMetaTileEntity()).value1i; - input0f = ((GT_MetaTileEntity_Hatch_Param) mTileEntity.getMetaTileEntity()).input0i; - input1f = ((GT_MetaTileEntity_Hatch_Param) mTileEntity.getMetaTileEntity()).input1i; + value0f = ((GT_MetaTileEntity_Hatch_Param) mTileEntity.getMetaTileEntity()).value0D; + value1f = ((GT_MetaTileEntity_Hatch_Param) mTileEntity.getMetaTileEntity()).value1D; + input0f = ((GT_MetaTileEntity_Hatch_Param) mTileEntity.getMetaTileEntity()).input0D; + input1f = ((GT_MetaTileEntity_Hatch_Param) mTileEntity.getMetaTileEntity()).input1D; for (Object crafter : crafters) { ICrafting var1 = (ICrafting) crafter; diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_Container_ParamAdv.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_Container_ParamAdv.java index 6b1e4f68cd..3ce8b59fd0 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_Container_ParamAdv.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_Container_ParamAdv.java @@ -81,19 +81,19 @@ public class GT_Container_ParamAdv extends GT_ContainerMetaTile_Machine { case 3: if (aShifthold == 1) { if (secondRow) { - paramH.value1i = Double.longBitsToDouble(0xFFFF_FFFF_FFFF_FFFFL); + paramH.value1D = Double.longBitsToDouble(0xFFFF_FFFF_FFFF_FFFFL); } else { - paramH.value0i = Double.longBitsToDouble(0xFFFF_FFFF_FFFF_FFFFL); + paramH.value0D = Double.longBitsToDouble(0xFFFF_FFFF_FFFF_FFFFL); } } else { if (secondRow) { - long temp=Double.doubleToLongBits(paramH.value1i); + long temp=Double.doubleToLongBits(paramH.value1D); temp |= 1 << columnPointer; - paramH.value1i=Double.longBitsToDouble(temp); + paramH.value1D=Double.longBitsToDouble(temp); } else { - long temp=Double.doubleToLongBits(paramH.value0i); + long temp=Double.doubleToLongBits(paramH.value0D); temp |= 1 << columnPointer; - paramH.value0i=Double.longBitsToDouble(temp); + paramH.value0D=Double.longBitsToDouble(temp); } } break; @@ -117,19 +117,19 @@ public class GT_Container_ParamAdv extends GT_ContainerMetaTile_Machine { case 7: if (aShifthold == 1) { if (secondRow) { - paramH.value1i = Double.longBitsToDouble(0); + paramH.value1D = Double.longBitsToDouble(0); } else { - paramH.value0i = Double.longBitsToDouble(0); + paramH.value0D = Double.longBitsToDouble(0); } } else { if (secondRow) { - long temp=Double.doubleToLongBits(paramH.value1i); + long temp=Double.doubleToLongBits(paramH.value1D); temp &= ~(1 << columnPointer); - paramH.value1i=Double.longBitsToDouble(temp); + paramH.value1D=Double.longBitsToDouble(temp); } else { - long temp=Double.doubleToLongBits(paramH.value0i); + long temp=Double.doubleToLongBits(paramH.value0D); temp &= ~(1 << columnPointer); - paramH.value0i=Double.longBitsToDouble(temp); + paramH.value0D=Double.longBitsToDouble(temp); } } break; @@ -151,8 +151,8 @@ public class GT_Container_ParamAdv extends GT_ContainerMetaTile_Machine { } break; case 11: - paramH.value0i=paramH.input0i; - paramH.value1i=paramH.input1i; + paramH.value0D=paramH.input0D; + paramH.value1D=paramH.input1D; break; case 12: paramH.param += aShifthold == 1 ? 2 : 1; @@ -174,19 +174,19 @@ public class GT_Container_ParamAdv extends GT_ContainerMetaTile_Machine { case 15: if (aShifthold == 1) { if (secondRow) { - paramH.value1i = Double.longBitsToDouble(~Double.doubleToLongBits(paramH.value1i)); + paramH.value1D = Double.longBitsToDouble(~Double.doubleToLongBits(paramH.value1D)); } else { - paramH.value0i = Double.longBitsToDouble(~Double.doubleToLongBits(paramH.value1i)); + paramH.value0D = Double.longBitsToDouble(~Double.doubleToLongBits(paramH.value1D)); } } else { if (secondRow) { - long temp=Double.doubleToLongBits(paramH.value1i); + long temp=Double.doubleToLongBits(paramH.value1D); temp ^= 1 << columnPointer; - paramH.value1i=Double.longBitsToDouble(temp); + paramH.value1D=Double.longBitsToDouble(temp); } else { - long temp=Double.doubleToLongBits(paramH.value0i); + long temp=Double.doubleToLongBits(paramH.value0D); temp ^= 1 << columnPointer; - paramH.value0i=Double.longBitsToDouble(temp); + paramH.value0D=Double.longBitsToDouble(temp); } } break; @@ -219,10 +219,10 @@ public class GT_Container_ParamAdv extends GT_ContainerMetaTile_Machine { return; } param = ((GT_MetaTileEntity_Hatch_Param) mTileEntity.getMetaTileEntity()).param; - value0f = ((GT_MetaTileEntity_Hatch_Param) mTileEntity.getMetaTileEntity()).value0i; - value1f = ((GT_MetaTileEntity_Hatch_Param) mTileEntity.getMetaTileEntity()).value1i; - input0f = ((GT_MetaTileEntity_Hatch_Param) mTileEntity.getMetaTileEntity()).input0i; - input1f = ((GT_MetaTileEntity_Hatch_Param) mTileEntity.getMetaTileEntity()).input1i; + value0f = ((GT_MetaTileEntity_Hatch_Param) mTileEntity.getMetaTileEntity()).value0D; + value1f = ((GT_MetaTileEntity_Hatch_Param) mTileEntity.getMetaTileEntity()).value1D; + input0f = ((GT_MetaTileEntity_Hatch_Param) mTileEntity.getMetaTileEntity()).input0D; + input1f = ((GT_MetaTileEntity_Hatch_Param) mTileEntity.getMetaTileEntity()).input1D; pointer = ((GT_MetaTileEntity_Hatch_Param) mTileEntity.getMetaTileEntity()).pointer; for (Object crafter : crafters) { diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_GUIContainer_Param.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_GUIContainer_Param.java index 9b8f818da8..6547097257 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_GUIContainer_Param.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_GUIContainer_Param.java @@ -25,10 +25,11 @@ public class GT_GUIContainer_Param extends GT_GUIContainerMetaTile_Machine { proxy.renderUnicodeString("\u2460\u2b07" + String.format(locale, "%+.5E", ((GT_Container_Param) mContainer).input1f), 46, 24, 167, 0x00ffff); proxy.renderUnicodeString("\u24EA\u2b06" + String.format(locale, "%+.5E", ((GT_Container_Param) mContainer).value0f), 46, 33, 167, 0x00bbff); proxy.renderUnicodeString("\u2460\u2b06" + String.format(locale, "%+.5E", ((GT_Container_Param) mContainer).value1f), 46, 41, 167, 0x0077ff); + GL11.glPushMatrix(); GL11.glScalef(.5f,.5f,.5f); proxy.renderUnicodeString("\u24EA\u2b06" + Util.longBitsToShortString(Double.doubleToLongBits(((GT_Container_Param) mContainer).value0f)), 46*2, 50*2, 167*2, 0x00bbff); proxy.renderUnicodeString("\u2460\u2b06" + Util.longBitsToShortString(Double.doubleToLongBits(((GT_Container_Param) mContainer).value1f)), 46*2, 58*2, 167*2, 0x0077ff); - GL11.glScalef(1,1,1); + GL11.glPopMatrix(); } else { proxy.renderUnicodeString("Parameters", 46, 7, 167, 0xffffff); } diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_GUIContainer_ParamAdv.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_GUIContainer_ParamAdv.java index 541c8323b1..7482d0a38c 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_GUIContainer_ParamAdv.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_GUIContainer_ParamAdv.java @@ -25,10 +25,11 @@ public class GT_GUIContainer_ParamAdv extends GT_GUIContainerMetaTile_Machine { proxy.renderUnicodeString("\u2460\u2b07" + String.format(locale, "%+.5E", (((GT_Container_ParamAdv) mContainer).input1f)), 46, 24, 167, 0x00ffff); proxy.renderUnicodeString("\u24EA\u2b06" + String.format(locale, "%+.5E", (((GT_Container_ParamAdv) mContainer).value0f)), 46, 33, 167, 0x00bbff); proxy.renderUnicodeString("\u2460\u2b06" + String.format(locale, "%+.5E", (((GT_Container_ParamAdv) mContainer).value1f)), 46, 41, 167, 0x0077ff); + GL11.glPushMatrix(); GL11.glScalef(.5f,.5f,.5f); proxy.renderUnicodeString("\u24EA\u2b06" + Util.longBitsToShortString(Double.doubleToLongBits(((GT_Container_ParamAdv) mContainer).value0f)), 46*2, 50*2, 167*2, 0x00bbff); proxy.renderUnicodeString("\u2460\u2b06" + Util.longBitsToShortString(Double.doubleToLongBits(((GT_Container_ParamAdv) mContainer).value1f)), 46*2, 58*2, 167*2, 0x0077ff); - GL11.glScalef(1,1,1); + GL11.glPopMatrix(); proxy.renderUnicodeString("Pointer " + Integer.toHexString(((GT_Container_ParamAdv) mContainer).pointer | 0x10000).substring(1), 46, 66, 167, 0x0033ff); } else { proxy.renderUnicodeString("Parameters X", 46, 7, 167, 0xffffff); diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_junction.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_junction.java index d78ed3cbc4..c1248820b3 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_junction.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_junction.java @@ -81,8 +81,8 @@ public class GT_MetaTileEntity_EM_junction extends GT_MetaTileEntity_MultiblockB } return STATUS_NEUTRAL; }; - protected Parameters.Group.ParameterIn[] src=new Parameters.Group.ParameterIn[10]; - protected Parameters.Group.ParameterIn[] dst=new Parameters.Group.ParameterIn[10]; + protected Parameters.Group.ParameterIn[] src; + protected Parameters.Group.ParameterIn[] dst; //endregion public GT_MetaTileEntity_EM_junction(int aID, String aName, String aNameRegional) { @@ -95,6 +95,8 @@ public class GT_MetaTileEntity_EM_junction extends GT_MetaTileEntity_MultiblockB @Override protected void parametersInstantiation_EM() { + src=new Parameters.Group.ParameterIn[10]; + dst=new Parameters.Group.ParameterIn[10]; for (int i = 0; i < 10; i++) { Parameters.Group hatch = parametrization.getGroup(i); src[i] = hatch.makeInParameter(0, i, ROUTE_NAME, SRC_STATUS); diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_scanner.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_scanner.java index d7cf3303f3..2461fc5534 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_scanner.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_scanner.java @@ -77,7 +77,7 @@ public class GT_MetaTileEntity_EM_scanner extends GT_MetaTileEntity_MultiblockBa if(v<0) return LedStatus.STATUS_TOO_LOW; return LedStatus.STATUS_OK; }; - protected Parameters.Group.ParameterIn[] scanConfiguration=new Parameters.Group.ParameterIn[20]; + protected Parameters.Group.ParameterIn[] scanConfiguration; //endregion //region structure @@ -122,6 +122,7 @@ public class GT_MetaTileEntity_EM_scanner extends GT_MetaTileEntity_MultiblockBa @Override protected void parametersInstantiation_EM() { + scanConfiguration=new Parameters.Group.ParameterIn[20]; for (int i = 0; i < 10; i++) { Parameters.Group hatch = parametrization.getGroup(i); scanConfiguration[i*2] = hatch.makeInParameter(0, 0, CONFIG_NAME, CONFIG_STATUS); diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_switch.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_switch.java index e5bcb3f75d..276d0f2f74 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_switch.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_switch.java @@ -77,8 +77,8 @@ public class GT_MetaTileEntity_EM_switch extends GT_MetaTileEntity_MultiblockBas } return STATUS_NEUTRAL; }; - protected Parameters.Group.ParameterIn[] dst=new Parameters.Group.ParameterIn[10]; - protected Parameters.Group.ParameterIn[] weight =new Parameters.Group.ParameterIn[10]; + protected Parameters.Group.ParameterIn[] dst; + protected Parameters.Group.ParameterIn[] weight; //endregion public GT_MetaTileEntity_EM_switch(int aID, String aName, String aNameRegional) { @@ -91,6 +91,8 @@ public class GT_MetaTileEntity_EM_switch extends GT_MetaTileEntity_MultiblockBas @Override protected void parametersInstantiation_EM() { + dst=new Parameters.Group.ParameterIn[10]; + weight =new Parameters.Group.ParameterIn[10]; for (int i = 0; i < 10; i++) { Parameters.Group hatch = parametrization.getGroup(i); dst[i] = hatch.makeInParameter(0, i, ROUTE_NAME, DST_STATUS); 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 4456f97130..7894a7fa37 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 @@ -92,7 +92,7 @@ public class GT_MetaTileEntity_TM_microwave extends GT_MetaTileEntity_Multiblock powerSetting=hatch_0.makeInParameter(0,1000, POWER_NAME,POWER_STATUS); timerSetting=hatch_0.makeInParameter(1,360, TIMER_SETTING_NAME,TIMER_STATUS); timerValue=hatch_0.makeOutParameter(0,0,TIMER_VALUE_NAME,TIMER_STATUS); - remainingTime=hatch_0.makeOutParameter(0,360,TIMER_REMAINING_NAME,TIMER_STATUS); + remainingTime=hatch_0.makeOutParameter(1,360,TIMER_REMAINING_NAME,TIMER_STATUS); } @Override diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_Container_MultiMachineEM.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_Container_MultiMachineEM.java index bd2c20b2bc..ea22e3c23c 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_Container_MultiMachineEM.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_Container_MultiMachineEM.java @@ -1,6 +1,7 @@ package com.github.technus.tectech.thing.metaTileEntity.multi.base; import com.github.technus.tectech.TecTech; +import com.github.technus.tectech.Util; import gregtech.api.gui.GT_ContainerMetaTile_Machine; import gregtech.api.gui.GT_Slot_Holo; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; @@ -10,15 +11,12 @@ import net.minecraft.inventory.ICrafting; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; -import java.util.BitSet; - public class GT_Container_MultiMachineEM extends GT_ContainerMetaTile_Machine { public LedStatus[] eParamsInStatus = LedStatus.makeArray(20,LedStatus.STATUS_UNDEFINED); public LedStatus[] eParamsOutStatus = LedStatus.makeArray(20,LedStatus.STATUS_UNDEFINED); - public int[] eParamsIn = new int[20];//number I from parametrizers - public int[] eParamsOut = new int[20];//number O to parametrizers + public double[] eParamsIn = new double[20];//number I from parametrizers + public double[] eParamsOut = new double[20];//number O to parametrizers public byte eCertainMode = 5, eCertainStatus = 127; - public short eParamsAreFloats; public boolean ePowerPass = false, eSafeVoid = false, allowedToWork = false; public final boolean ePowerPassButton, eSafeVoidButton, allowedToWorkButton; @@ -113,9 +111,8 @@ public class GT_Container_MultiMachineEM extends GT_ContainerMetaTile_Machine { } eParamsInStatus = ((GT_MetaTileEntity_MultiblockBase_EM) mTileEntity.getMetaTileEntity()).parametrization.eParamsInStatus; eParamsOutStatus = ((GT_MetaTileEntity_MultiblockBase_EM) mTileEntity.getMetaTileEntity()).parametrization.eParamsOutStatus; - int[] iParamsIn= ((GT_MetaTileEntity_MultiblockBase_EM) mTileEntity.getMetaTileEntity()).parametrization.iParamsIn; - int[] iParamsOut= ((GT_MetaTileEntity_MultiblockBase_EM) mTileEntity.getMetaTileEntity()).parametrization.iParamsOut; - eParamsAreFloats=((GT_MetaTileEntity_MultiblockBase_EM) mTileEntity.getMetaTileEntity()).parametrization.bParamsAreFloats; + eParamsIn= ((GT_MetaTileEntity_MultiblockBase_EM) mTileEntity.getMetaTileEntity()).parametrization.iParamsIn; + eParamsOut= ((GT_MetaTileEntity_MultiblockBase_EM) mTileEntity.getMetaTileEntity()).parametrization.iParamsOut; eCertainMode = ((GT_MetaTileEntity_MultiblockBase_EM) mTileEntity.getMetaTileEntity()).eCertainMode; eCertainStatus = ((GT_MetaTileEntity_MultiblockBase_EM) mTileEntity.getMetaTileEntity()).eCertainStatus; ePowerPass = ((GT_MetaTileEntity_MultiblockBase_EM) mTileEntity.getMetaTileEntity()).ePowerPass; @@ -124,31 +121,14 @@ public class GT_Container_MultiMachineEM extends GT_ContainerMetaTile_Machine { for (Object crafter : crafters) { ICrafting var1 = (ICrafting) crafter; - int i = 100; - for (int j = 0; j < eParamsInStatus.length; j++) { + for (int i=100, j = 0; j < eParamsInStatus.length; j++) { var1.sendProgressBarUpdate(this, i++, (eParamsInStatus[j].getOrdinalByte() | (eParamsOutStatus[j].getOrdinalByte() << 8))); } var1.sendProgressBarUpdate(this, 120, eCertainMode | (eCertainStatus << 8)); var1.sendProgressBarUpdate(this, 121, (ePowerPass ? 1 : 0) + (eSafeVoid ? 2 : 0) + (allowedToWork ? 4 : 0)); - var1.sendProgressBarUpdate(this,122,eParamsAreFloats); - i=130; - for(int j=0;j<eParamsOut.length;j++){ - if(eParamsOut[j]==iParamsOut[j]){ - i+=2; - continue; - } - eParamsOut[j]=iParamsOut[j]; - var1.sendProgressBarUpdate(this,i++,eParamsOut[j]&0xFFFF); - var1.sendProgressBarUpdate(this,i++,eParamsOut[j]>>>16); - } - for(int j=0;j<eParamsIn.length;j++){ - if(eParamsIn[j]==iParamsIn[j]){ - i+=2; - continue; - } - eParamsIn[j]=iParamsIn[j]; - var1.sendProgressBarUpdate(this,i++,eParamsIn[j]&0xFFFF); - var1.sendProgressBarUpdate(this,i++,eParamsIn[j]>>>16); + for(int i=124,k=204,j=0;j<20;j++,i+=4,k+=4) { + Util.sendDouble(eParamsOut[j], this, var1, i); + Util.sendDouble(eParamsIn[j], this, var1, k); } } } @@ -169,14 +149,12 @@ public class GT_Container_MultiMachineEM extends GT_ContainerMetaTile_Machine { ePowerPass = (par2 & 1) == 1; eSafeVoid = (par2 & 2) == 2; allowedToWork = (par2 & 4) == 4; - } else if (par1 == 122) { - eParamsAreFloats=(short) par2; - }else if(par1>=130 && par1<170){ - int pointer=(par1-130)>>1; - eParamsOut[pointer]=(par1&1)==0?eParamsOut[pointer]&0xFFFF0000|par2:eParamsOut[pointer]&0xFFFF|(par2<<16); - }else if(par1>=170 && par1<210){ - int pointer=(par1-170)>>1; - eParamsIn[pointer]=(par1&1)==0?eParamsIn[pointer]&0xFFFF0000|par2:eParamsIn[pointer]&0xFFFF|(par2<<16); + } else if(par1>=130 && par1<210){ + int pos=(par1-130)>>2; + eParamsIn[pos]=Util.receiveDouble(eParamsIn[pos],par1&0xFFFFFFFC,par1,par2); + }else if(par1>=210 && par1<290){ + int pos=(par1-210)>>2; + eParamsIn[pos]=Util.receiveDouble(eParamsIn[pos],par1&0xFFFFFFFC,par1,par2); } } diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_GUIContainer_MultiMachineEM.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_GUIContainer_MultiMachineEM.java index 47a3d60a0a..94e2d0af8d 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_GUIContainer_MultiMachineEM.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_GUIContainer_MultiMachineEM.java @@ -12,8 +12,6 @@ import org.lwjgl.opengl.GL12; import java.util.List; -import static com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM.*; -import static com.github.technus.tectech.thing.metaTileEntity.multi.base.LedStatus.STATUS_UNUSED; import static gregtech.api.enums.GT_Values.RES_PATH_GUI; /** @@ -281,7 +279,6 @@ public class GT_GUIContainer_MultiMachineEM extends GT_GUIContainerMetaTile_Mach IMetaTileEntity mte=mContainer.mTileEntity.getMetaTileEntity(); if(mte instanceof GT_MetaTileEntity_MultiblockBase_EM){ Parameters parametrization=((GT_MetaTileEntity_MultiblockBase_EM)mte).parametrization; - parametrization.bParamsAreFloats=mContainer.eParamsAreFloats; parametrization.eParamsInStatus=mContainer.eParamsInStatus; parametrization.eParamsOutStatus=mContainer.eParamsOutStatus; parametrization.iParamsIn=mContainer.eParamsIn; @@ -293,15 +290,15 @@ public class GT_GUIContainer_MultiMachineEM extends GT_GUIContainerMetaTile_Mach for(int param=0;param<2;param++){ if(x<(u+=su)){ if(y<v){ - if(mContainer.eParamsInStatus[hatch + (10*param)]==STATUS_UNUSED){ - return; - } + //if(mContainer.eParamsInStatus[hatch + (10*param)]==STATUS_UNUSED){ + // return; + //} hoveringText(((GT_MetaTileEntity_MultiblockBase_EM) mte).getFullLedDescriptionIn(hatch,param), renderPosX, renderPosY, fontRendererObj); return; }else if(y>=v && y<v+sv){ - if(mContainer.eParamsOutStatus[hatch + (10*param)]==STATUS_UNUSED){ - return; - } + //if(mContainer.eParamsOutStatus[hatch + (10*param)]==STATUS_UNUSED){ + // return; + //} hoveringText(((GT_MetaTileEntity_MultiblockBase_EM) mte).getFullLedDescriptionOut(hatch,param), renderPosX, renderPosY, fontRendererObj); return; } diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_MetaTileEntity_MultiblockBase_EM.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_MetaTileEntity_MultiblockBase_EM.java index 3c9102d072..7d063c5931 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_MetaTileEntity_MultiblockBase_EM.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_MetaTileEntity_MultiblockBase_EM.java @@ -511,17 +511,17 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt return new String[]{ "Progress:", EnumChatFormatting.GREEN + Integer.toString(mProgresstime / 20) + EnumChatFormatting.RESET + " s / " + - EnumChatFormatting.YELLOW + Integer.toString(mMaxProgresstime / 20) + EnumChatFormatting.RESET + " s", + EnumChatFormatting.YELLOW + mMaxProgresstime / 20 + EnumChatFormatting.RESET + " s", "Energy Hatches:", EnumChatFormatting.GREEN + Long.toString(storedEnergy) + EnumChatFormatting.RESET + " EU / " + - EnumChatFormatting.YELLOW + Long.toString(maxEnergy) + EnumChatFormatting.RESET + " EU", - (mEUt <= 0 ? "Probably uses: " : "Probably makes: ") + - EnumChatFormatting.RED + Integer.toString(Math.abs(mEUt)) + EnumChatFormatting.RESET + " EU/t at " + + EnumChatFormatting.YELLOW + maxEnergy + EnumChatFormatting.RESET + " EU", + (mEUt*(double)eAmpereFlow <= 0 ? "Probably uses: " : "Probably makes: ") + + 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: " + EnumChatFormatting.GREEN + eAvailableData + EnumChatFormatting.RESET + " / " + EnumChatFormatting.YELLOW + eRequiredData + EnumChatFormatting.RESET @@ -1185,11 +1185,11 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt } int hatchId = hatch.param; if(parametrization.groups[hatchId]!=null && parametrization.groups[hatchId].updateWhileRunning){ - parametrization.iParamsIn[hatchId] = hatch.value0i; - parametrization.iParamsIn[hatchId + 10] = hatch.value1i; + parametrization.iParamsIn[hatchId] = hatch.value0D; + parametrization.iParamsIn[hatchId + 10] = hatch.value1D; } - hatch.input0i = parametrization.iParamsOut[hatchId]; - hatch.input1i = parametrization.iParamsOut[hatchId + 10]; + hatch.input0D = parametrization.iParamsOut[hatchId]; + hatch.input1D = parametrization.iParamsOut[hatchId + 10]; } } else {//if has nothing to do update all for (GT_MetaTileEntity_Hatch_Param hatch : eParamHatches) { @@ -1197,10 +1197,10 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt continue; } int hatchId = hatch.param; - parametrization.iParamsIn[hatchId] = hatch.value0i; - parametrization.iParamsIn[hatchId + 10] = hatch.value1i; - hatch.input0i = parametrization.iParamsOut[hatchId]; - hatch.input1i = parametrization.iParamsOut[hatchId + 10]; + parametrization.iParamsIn[hatchId] = hatch.value0D; + parametrization.iParamsIn[hatchId + 10] = hatch.value1D; + hatch.input0D = parametrization.iParamsOut[hatchId]; + hatch.input1D = parametrization.iParamsOut[hatchId + 10]; } } for (GT_MetaTileEntity_Hatch_Uncertainty uncertainty : eUncertainHatches) { diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/HatchAdder.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/HatchAdder.java index a8633c4837..177f8b2cfb 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/HatchAdder.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/HatchAdder.java @@ -3,6 +3,6 @@ package com.github.technus.tectech.thing.metaTileEntity.multi.base; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import java.util.function.BiFunction; - -public interface HatchAdder extends BiFunction<IGregTechTileEntity, Short,Boolean> {} +public interface HatchAdder{ + Boolean apply(IGregTechTileEntity iGregTechTileEntity, Short aShort); +} diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/NameFunction.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/NameFunction.java index 8ced431576..a296600abf 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/NameFunction.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/NameFunction.java @@ -1,8 +1,5 @@ package com.github.technus.tectech.thing.metaTileEntity.multi.base; -import java.util.function.BiFunction; - -public interface NameFunction<T extends GT_MetaTileEntity_MultiblockBase_EM> extends BiFunction<T, Parameters.IParameter, String> { - @Override +public interface NameFunction<T extends GT_MetaTileEntity_MultiblockBase_EM>{ String apply(T t, Parameters.IParameter iParameter); } diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/Parameters.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/Parameters.java index 2e8959c00f..8a0fca3d09 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/Parameters.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/Parameters.java @@ -34,6 +34,16 @@ public class Parameters { this.parent=parent; } + public boolean trySetParameters(int hatch,double parameter0,double parameter1){ + Group p=groups[hatch]; + if(parent.mMaxProgresstime<=0 || (p!=null && p.updateWhileRunning)){ + iParamsIn[hatch]=parameter0; + iParamsIn[hatch+10]=parameter1; + return true; + } + return false; + } + public void setToDefaults(int hatch,boolean defaultIn, boolean defaultOut) { Group p= groups[hatch]; if (p == null) { diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/StatusFunction.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/StatusFunction.java index 224f0fc47c..e285c75344 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/StatusFunction.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/StatusFunction.java @@ -1,8 +1,5 @@ package com.github.technus.tectech.thing.metaTileEntity.multi.base; -import java.util.function.BiFunction; - -public interface StatusFunction<T extends GT_MetaTileEntity_MultiblockBase_EM> extends BiFunction<T, Parameters.IParameter, LedStatus> { - @Override +public interface StatusFunction<T extends GT_MetaTileEntity_MultiblockBase_EM>{ LedStatus apply(T t, Parameters.IParameter iParameter); } diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_machine/GT_MetaTileEntity_EM_machine.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_machine/GT_MetaTileEntity_EM_machine.java index 1ef3705b50..c29da7208a 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_machine/GT_MetaTileEntity_EM_machine.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_machine/GT_MetaTileEntity_EM_machine.java @@ -63,8 +63,8 @@ public class GT_MetaTileEntity_EM_machine extends GT_MetaTileEntity_MultiblockBa //endregion //region parameters - protected Parameters.Group.ParameterIn[] inputMux=new Parameters.Group.ParameterIn[6]; - protected Parameters.Group.ParameterIn[] outputMux=new Parameters.Group.ParameterIn[6]; + protected Parameters.Group.ParameterIn[] inputMux; + protected Parameters.Group.ParameterIn[] outputMux; private static final StatusFunction<GT_MetaTileEntity_EM_machine> SRC_STATUS = (base,p)-> { double v = p.get(); @@ -118,6 +118,8 @@ public class GT_MetaTileEntity_EM_machine extends GT_MetaTileEntity_MultiblockBa @Override protected void parametersInstantiation_EM() { + inputMux=new Parameters.Group.ParameterIn[6]; + outputMux=new Parameters.Group.ParameterIn[6]; for (int i=0;i<6;i++){ Parameters.Group hatch=parametrization.getGroup(i); inputMux[i]=hatch.makeInParameter(0,i,ROUTE_NAME,SRC_STATUS); |