From 0c56635ff22839201bdaff63276cf2df646ad279 Mon Sep 17 00:00:00 2001 From: Tec Date: Tue, 21 May 2019 22:13:22 +0200 Subject: Cleanup some strings and add creative data hatch --- src/main/java/com/github/technus/tectech/Util.java | 7 ++ .../dreamcraft/DreamCraftRecipeLoader.java | 14 +-- .../tectech/loader/thing/MachineLoader.java | 1 + .../core/stacks/cElementalInstanceStack.java | 6 +- .../core/templates/cElementalPrimitive.java | 14 +-- .../definitions/complex/atom/dAtomDefinition.java | 2 +- .../technus/tectech/recipe/TT_recipeAdder.java | 4 +- .../technus/tectech/thing/CustomItemList.java | 2 +- .../tectech/thing/item/gui/ScanDisplayScreen.java | 6 +- .../GT_MetaTileEntity_Hatch_CreativeData.java | 116 +++++++++++++++++++++ .../multi/GT_MetaTileEntity_EM_scanner.java | 2 +- .../multi/base/GT_Container_MultiMachineEM.java | 10 +- .../multi/base/GT_GUIContainer_MultiMachineEM.java | 30 +++--- .../base/GT_MetaTileEntity_MultiblockBase_EM.java | 9 +- .../thing/metaTileEntity/multi/base/LedStatus.java | 20 ++-- .../metaTileEntity/multi/base/Parameters.java | 8 ++ 16 files changed, 193 insertions(+), 58 deletions(-) create mode 100644 src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_CreativeData.java (limited to 'src/main/java') diff --git a/src/main/java/com/github/technus/tectech/Util.java b/src/main/java/com/github/technus/tectech/Util.java index e8472bfea6..c550203874 100644 --- a/src/main/java/com/github/technus/tectech/Util.java +++ b/src/main/java/com/github/technus/tectech/Util.java @@ -1443,4 +1443,11 @@ public final class Util { crafter.sendProgressBarUpdate(container, startIndex++, (int)(value & 0xFFFFL)); crafter.sendProgressBarUpdate(container, startIndex, (value & 0xFFFF0000)>>>16); } + + public static String doubleToString(double value){ + if(value==(long)value){ + return Long.toString((long)value); + } + return Double.toString(value); + } } diff --git a/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/DreamCraftRecipeLoader.java b/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/DreamCraftRecipeLoader.java index 73aef326b7..33f4840929 100644 --- a/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/DreamCraftRecipeLoader.java +++ b/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/DreamCraftRecipeLoader.java @@ -511,7 +511,7 @@ public class DreamCraftRecipeLoader implements Runnable { GT_OreDictUnificator.get(OrePrefixes.cableGt04, Materials.Bedrockium, 2L)}, new FluidStack[]{ Materials.Naquadria.getMolten(2592), Materials.SolderingAlloy.getMolten(2592), - Materials.Lubricant.getFluid(4000)}, ItemList.Electric_Pump_UHV.get(1, new Object[]{}), 1000, 200000); + Materials.Lubricant.getFluid(4000)}, ItemList.Electric_Pump_UHV.get(1), 1000, 200000); TT_recipeAdder.addResearchableAssemblylineRecipe(ItemList.Electric_Pump_UHV.get(1L), 48000, 64, 200000, 8, new ItemStack[]{ @@ -524,7 +524,7 @@ public class DreamCraftRecipeLoader implements Runnable { GT_OreDictUnificator.get(OrePrefixes.cableGt04, Materials.Draconium, 2L)}, new FluidStack[]{ Materials.Quantium.getMolten(2592), Materials.SolderingAlloy.getMolten(5184), - Materials.Lubricant.getFluid(8000)}, ItemList.Electric_Pump_UEV.get(1, new Object[]{}), 2000, 800000); + Materials.Lubricant.getFluid(8000)}, ItemList.Electric_Pump_UEV.get(1), 2000, 800000); //Conveyor Belt UV-UHV TT_recipeAdder.addResearchableAssemblylineRecipe(ItemList.Conveyor_Module_UV.get(1L), @@ -537,7 +537,7 @@ public class DreamCraftRecipeLoader implements Runnable { Materials.Naquadria.getMolten(2592), Materials.SolderingAlloy.getMolten(2592), Materials.Lubricant.getFluid(4000), - Materials.Silicone.getMolten(5760)}, ItemList.Conveyor_Module_UHV.get(1, new Object[]{}), 1000, 200000); + Materials.Silicone.getMolten(5760)}, ItemList.Conveyor_Module_UHV.get(1), 1000, 200000); TT_recipeAdder.addResearchableAssemblylineRecipe(ItemList.Conveyor_Module_UHV.get(1L), 48000, 64, 200000, 8, new ItemStack[]{ @@ -549,7 +549,7 @@ public class DreamCraftRecipeLoader implements Runnable { Materials.Quantium.getMolten(2592), Materials.SolderingAlloy.getMolten(5184), Materials.Lubricant.getFluid(8000), - Materials.Silicone.getMolten(11520)}, ItemList.Conveyor_Module_UEV.get(1, new Object[]{}), 2000, 800000); + Materials.Silicone.getMolten(11520)}, ItemList.Conveyor_Module_UEV.get(1), 2000, 800000); //Piston UV-UHV TT_recipeAdder.addResearchableAssemblylineRecipe(ItemList.Electric_Piston_UV.get(1L), @@ -564,7 +564,7 @@ public class DreamCraftRecipeLoader implements Runnable { GT_OreDictUnificator.get(OrePrefixes.cableGt04, Materials.Bedrockium, 4L)}, new FluidStack[]{ Materials.Naquadria.getMolten(2592), Materials.SolderingAlloy.getMolten(2592), - Materials.Lubricant.getFluid(4000)}, ItemList.Electric_Piston_UHV.get(1, new Object[]{}), 1000, 200000); + Materials.Lubricant.getFluid(4000)}, ItemList.Electric_Piston_UHV.get(1), 1000, 200000); TT_recipeAdder.addResearchableAssemblylineRecipe(ItemList.Electric_Piston_UHV.get(1L), 48000, 64, 200000, 8, new ItemStack[]{ @@ -578,7 +578,7 @@ public class DreamCraftRecipeLoader implements Runnable { GT_OreDictUnificator.get(OrePrefixes.cableGt04, Materials.Draconium, 4L)}, new FluidStack[]{ Materials.Quantium.getMolten(2592), Materials.SolderingAlloy.getMolten(5184), - Materials.Lubricant.getFluid(8000)}, ItemList.Electric_Piston_UEV.get(1, new Object[]{}), 2000, 800000); + Materials.Lubricant.getFluid(8000)}, ItemList.Electric_Piston_UEV.get(1), 2000, 800000); //Robot Arm UV-UHV TT_recipeAdder.addResearchableAssemblylineRecipe(ItemList.Robot_Arm_UV.get(1L), @@ -944,7 +944,7 @@ public class DreamCraftRecipeLoader implements Runnable { new Object[]{OrePrefixes.circuit.get(Materials.Infinite), 1L}, new Object[]{OrePrefixes.circuit.get(Materials.Infinite), 1L}, new Object[]{OrePrefixes.circuit.get(Materials.Infinite), 1L}, - ItemList.Energy_Cluster.get(8L, new Object[0]), + ItemList.Energy_Cluster.get(8L), ItemList.Field_Generator_UV.get(2), ItemList.Circuit_Wafer_HPIC.get(64), ItemList.Circuit_Wafer_HPIC.get(64), 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 86b3beac8d..da8d70a772 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 @@ -308,6 +308,7 @@ public class MachineLoader implements Runnable { // =================================================================================================== // Debug Stuff // =================================================================================================== + hatch_CreativeData.set(new GT_MetaTileEntity_Hatch_CreativeData(15496,"debug.tt.data","Debug Data Hatch",15).getStackForm(1)); hatch_CreativeMaitenance.set(new GT_MetaTileEntity_Hatch_CreativeMaintenance(15497, "debug.tt.maintenance", "Debug Maintenance Hatch", 15).getStackForm(1L)); Machine_DebugGenny.set(new GT_MetaTileEntity_DebugPowerGenerator(15498, "debug.tt.genny", "Debug Power Generator", 15).getStackForm(1L)); Machine_DebugWriter.set(new GT_MetaTileEntity_DebugStructureWriter(15499, "debug.tt.writer", "Debug Structure Writer", 15).getStackForm(1L)); diff --git a/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/stacks/cElementalInstanceStack.java b/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/stacks/cElementalInstanceStack.java index d97ec5d1f6..1f93f75213 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/stacks/cElementalInstanceStack.java +++ b/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/stacks/cElementalInstanceStack.java @@ -420,9 +420,9 @@ public final class cElementalInstanceStack implements iHasElementalDefinition { } definition.addScanResults(lines,capabilities,energy); if(Util.areBitsSet(SCAN_GET_TIMESPAN_MULT,capabilities)) { - lines.add("TIME SPAN MULTIPLIER = " + lifeTimeMult); + lines.add("TIME MULT = " + lifeTimeMult); if(Util.areBitsSet(SCAN_GET_TIMESPAN_INFO,capabilities)) { - lines.add("TIME SPAN MULTIPLIED = " + lifeTime + " s"); + lines.add("TIME SPAN = " + lifeTime + " s"); } } if(Util.areBitsSet(SCAN_GET_AGE,capabilities)) { @@ -432,7 +432,7 @@ public final class cElementalInstanceStack implements iHasElementalDefinition { lines.add("COLOR = " + color + " RGB or CMY"); } if(Util.areBitsSet(SCAN_GET_ENERGY_LEVEL,capabilities)) { - lines.add("E. LEVEL = " + energy); + lines.add("ENERGY = " + energy); } if(Util.areBitsSet(SCAN_GET_AMOUNT,capabilities)) { lines.add("AMOUNT = " + amount); 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 738301d50c..bcd46c579a 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 @@ -1,7 +1,6 @@ package com.github.technus.tectech.mechanics.elementalMatter.core.templates; import com.github.technus.tectech.TecTech; -import com.github.technus.tectech.Util; import com.github.technus.tectech.mechanics.elementalMatter.core.cElementalDecay; import com.github.technus.tectech.mechanics.elementalMatter.core.cElementalDefinitionStackMap; import com.github.technus.tectech.mechanics.elementalMatter.core.tElementalException; @@ -16,6 +15,7 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.Map; +import static com.github.technus.tectech.Util.areBitsSet; import static com.github.technus.tectech.loader.TecTechConfig.DEBUG_MODE; import static com.github.technus.tectech.mechanics.elementalMatter.definitions.primitive.cPrimitiveDefinition.null__; import static com.github.technus.tectech.thing.metaTileEntity.multi.GT_MetaTileEntity_EM_scanner.*; @@ -212,23 +212,23 @@ public abstract class cElementalPrimitive extends cElementalDefinition { @Override public void addScanResults(ArrayList lines, int capabilities, long energyLevel) { - if(Util.areBitsSet(SCAN_GET_CLASS_TYPE, capabilities)) { + if(areBitsSet(SCAN_GET_CLASS_TYPE, capabilities)) { lines.add("CLASS = " + nbtType + ' ' + getClassType()); } - if(Util.areBitsSet(SCAN_GET_NOMENCLATURE|SCAN_GET_CHARGE|SCAN_GET_MASS|SCAN_GET_TIMESPAN_INFO, capabilities)) { + if(areBitsSet(SCAN_GET_NOMENCLATURE|SCAN_GET_CHARGE|SCAN_GET_MASS|SCAN_GET_TIMESPAN_INFO, capabilities)) { lines.add("NAME = "+getName()); lines.add("SYMBOL = "+getSymbol()); } - if(Util.areBitsSet(SCAN_GET_CHARGE,capabilities)) { + if(areBitsSet(SCAN_GET_CHARGE,capabilities)) { lines.add("CHARGE = " + getCharge() / 3f + " e"); } - if(Util.areBitsSet(SCAN_GET_COLOR,capabilities)) { + if(areBitsSet(SCAN_GET_COLOR,capabilities)) { lines.add(getColor() < 0 ? "COLORLESS" : "CARRIES COLOR"); } - if(Util.areBitsSet(SCAN_GET_MASS,capabilities)) { + if(areBitsSet(SCAN_GET_MASS,capabilities)) { lines.add("MASS = " + getMass() + " eV/c\u00b2"); } - if(Util.areBitsSet(SCAN_GET_TIMESPAN_INFO, capabilities)){ + if(areBitsSet(SCAN_GET_TIMESPAN_INFO, capabilities)){ lines.add((isTimeSpanHalfLife()?"HALF LIFE = ":"LIFE TIME = ")+getRawTimeSpan(energyLevel)+ " s"); lines.add(" "+"At current energy level"); } 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 23f566075a..99e80b7be2 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 @@ -1652,7 +1652,7 @@ public final class dAtomDefinition extends cElementalDefinition { } if(iaeaDefinitionExistsAndHasEnergyLevels && Util.areBitsSet(SCAN_GET_ENERGY_STATES,capabilities)){ for(int i=1;i { + public GT_MetaTileEntity_Hatch_CreativeData(int aID, String aName, String aNameRegional, int aTier) { + super(aID, aName, aNameRegional, aTier, "Quantum Data Output"); + Util.setTier(aTier,this); + } + + public GT_MetaTileEntity_Hatch_CreativeData(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { + super(aName, aTier, aDescription, aTextures); + } + + @Override + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_Hatch_CreativeData(mName, mTier, mDescription, mTextures); + } + + @Override + public boolean isOutputFacing(byte aSide) { + return aSide == getBaseMetaTileEntity().getFrontFacing(); + } + + @Override + public boolean isInputFacing(byte aSide) { + return false; + } + + @Override + public boolean isSimpleMachine() { + return true; + } + + @Override + public boolean isDataInputFacing(byte side) { + return isInputFacing(side); + } + + @Override + protected QuantumDataPacket loadPacketFromNBT(NBTTagCompound nbt) { + return new QuantumDataPacket(nbt); + } + + @Override + public boolean canConnectData(byte side) { + return isOutputFacing(side); + } + + @Override + public void moveAround(IGregTechTileEntity aBaseMetaTileEntity) { + IConnectsToDataPipe current = this, source = this, next; + int range = 0; + while ((next = current.getNext(source)) != null && range++ < 1000) { + if (next instanceof GT_MetaTileEntity_Hatch_InputData) { + ((GT_MetaTileEntity_Hatch_InputData) next).setContents(q); + break; + } + source = current; + current = next; + } + q = null; + } + + @Override + public IConnectsToDataPipe getNext(IConnectsToDataPipe source/*==this*/) { + IGregTechTileEntity base = getBaseMetaTileEntity(); + byte color = base.getColorization(); + if (color < 0) { + return null; + } + IGregTechTileEntity next = base.getIGregTechTileEntityAtSide(base.getFrontFacing()); + if (next == null) { + return null; + } + IMetaTileEntity meta = next.getMetaTileEntity(); + if (meta instanceof GT_MetaTileEntity_Pipe_Data){ + return (IConnectsToDataPipe) meta; + }else if (meta instanceof GT_MetaTileEntity_Hatch_InputData && + ((GT_MetaTileEntity_Hatch_InputData) meta).getColorization()==color && + ((GT_MetaTileEntity_Hatch_InputData) meta).canConnectData(GT_Utility.getOppositeSide(base.getFrontFacing()))) { + return (IConnectsToDataPipe) meta; + } + return null; + } + + @Override + public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + if (aBaseMetaTileEntity.isServerSide()) { + if (MOVE_AT == aTick % 20) { + if (aBaseMetaTileEntity.isAllowedToWork()) { + getBaseMetaTileEntity().setActive(true); + if(q==null) q=new QuantumDataPacket(0xFFFFFFFFL); + moveAround(aBaseMetaTileEntity); + } else { + q=null; + getBaseMetaTileEntity().setActive(false); + } + } + } + } +} 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 2461fc5534..33de4aa1cc 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 @@ -126,7 +126,7 @@ public class GT_MetaTileEntity_EM_scanner extends GT_MetaTileEntity_MultiblockBa for (int i = 0; i < 10; i++) { Parameters.Group hatch = parametrization.getGroup(i); scanConfiguration[i*2] = hatch.makeInParameter(0, 0, CONFIG_NAME, CONFIG_STATUS); - scanConfiguration[i*2+1] = hatch.makeInParameter(0, 0, CONFIG_NAME, CONFIG_STATUS); + scanConfiguration[i*2+1] = hatch.makeInParameter(1, 0, CONFIG_NAME, CONFIG_STATUS); } } 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 ea22e3c23c..0ad5aa48ca 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 @@ -126,7 +126,7 @@ public class GT_Container_MultiMachineEM extends GT_ContainerMetaTile_Machine { } var1.sendProgressBarUpdate(this, 120, eCertainMode | (eCertainStatus << 8)); var1.sendProgressBarUpdate(this, 121, (ePowerPass ? 1 : 0) + (eSafeVoid ? 2 : 0) + (allowedToWork ? 4 : 0)); - for(int i=124,k=204,j=0;j<20;j++,i+=4,k+=4) { + for(int i=128,k=208,j=0;j<20;j++,i+=4,k+=4) { Util.sendDouble(eParamsOut[j], this, var1, i); Util.sendDouble(eParamsIn[j], this, var1, k); } @@ -149,11 +149,11 @@ public class GT_Container_MultiMachineEM extends GT_ContainerMetaTile_Machine { ePowerPass = (par2 & 1) == 1; eSafeVoid = (par2 & 2) == 2; allowedToWork = (par2 & 4) == 4; - } else if(par1>=130 && par1<210){ - int pos=(par1-130)>>2; + } else if(par1>=128 && par1<208){ + int pos=(par1-128)>>2; eParamsIn[pos]=Util.receiveDouble(eParamsIn[pos],par1&0xFFFFFFFC,par1,par2); - }else if(par1>=210 && par1<290){ - int pos=(par1-210)>>2; + }else if(par1>=208 && par1<288){ + int pos=(par1-208)>>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 94e2d0af8d..dea5030fde 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 @@ -207,52 +207,50 @@ public class GT_GUIContainer_MultiMachineEM extends GT_GUIContainerMetaTile_Mach switch (status) { case STATUS_WRONG: //fallthrough if (counter < 2) { - drawTexturedModalRect(x + su * i, y + sv * j, u + su * i, v + sv * j, su, sv); + drawTexturedModalRect(x + su * i, y + sv * j, u + su * i, v + sv * j, su, sv);//blue break; } else if (counter < 4) { - drawTexturedModalRect(x + su * i, y + sv * j, u + su * i, v + sv * (8 + j), su, sv); + drawTexturedModalRect(x + su * i, y + sv * j, u + su * i, v + sv * (8 + j), su, sv);//red break; } case STATUS_OK://ok - drawTexturedModalRect(x + su * i, y + sv * j, u + su * i, v + sv * (4 + j), su, sv); + drawTexturedModalRect(x + su * i, y + sv * j, u + su * i, v + sv * (4 + j), su, sv);//green break; case STATUS_TOO_LOW://too low blink if (counter < 3) { - drawTexturedModalRect(x + su * i, y + sv * j, u + su * i, v + sv * j, su, sv); + drawTexturedModalRect(x + su * i, y + sv * j, u + su * i, v + sv * j, su, sv);//BLUE break; } case STATUS_LOW:// too low - drawTexturedModalRect(x + su * i, y + sv * j, u + su * i, v + sv * (2 + j), su, sv); + drawTexturedModalRect(x + su * i, y + sv * j, u + su * i, v + sv * (2 + j), su, sv);//cyan break; case STATUS_TOO_HIGH://too high blink if (counter < 3) { - drawTexturedModalRect(x + su * i, y + sv * j, u + su * i, v + sv * (8 + j), su, sv); + drawTexturedModalRect(x + su * i, y + sv * j, u + su * i, v + sv * (8 + j), su, sv);//redd break; } case STATUS_HIGH:// too high - drawTexturedModalRect(x + su * i, y + sv * j, u + su * i, v + sv * (6 + j), su, sv); + drawTexturedModalRect(x + su * i, y + sv * j, u + su * i, v + sv * (6 + j), su, sv);//orangeyello break; case STATUS_NEUTRAL: if(counter<3){ - GL11.glColor4f(.85f, .9f, .95f, 1.0F); + GL11.glColor4f(.85f, .9f, .95f, .5F); drawTexturedModalRect(x + su * i, y + sv * j, 212, 96, su+2, sv+2); - GL11.glColor4f(1f, 1f, 1f, 1f); }else { - GL11.glColor4f(.8f, .9f, 1f, 1.0F); + GL11.glColor4f(.8f, .9f, 1f, .5F); drawTexturedModalRect(x + su * i, y + sv * j, 212, 96, su+2, sv+2); - GL11.glColor4f(1f, 1f, 1f, 1f); } + GL11.glColor4f(1f, 1f, 1f, 1f); break; case STATUS_UNDEFINED: if(counter<3) { - GL11.glColor4f(.5f, .1f, .15f, 1.0F); + GL11.glColor4f(.5f, .1f, .15f, .5F); drawTexturedModalRect(x + su * i, y + sv * j, 212, 96, su + 2, sv + 2); - GL11.glColor4f(1f, 1f, 1f, 1f); }else { - GL11.glColor4f(0f, .1f, .2f, 1.0F); + GL11.glColor4f(0f, .1f, .2f, .5F); drawTexturedModalRect(x + su * i, y + sv * j, 212, 96, su + 2, sv + 2); - GL11.glColor4f(1f, 1f, 1f, 1f); } + GL11.glColor4f(1f, 1f, 1f, 1f); break; case STATUS_UNUSED: default: @@ -260,7 +258,7 @@ public class GT_GUIContainer_MultiMachineEM extends GT_GUIContainerMetaTile_Mach int tColor = this.mContainer.mTileEntity.getColorization() & 15; if (tColor < ItemDye.field_150922_c.length) { tColor = ItemDye.field_150922_c[tColor]; - GL11.glColor4f((float)(tColor >> 16 & 255) / 255.0F, (float)(tColor >> 8 & 255) / 255.0F, (float)(tColor & 255) / 255.0F, 1.0F); + GL11.glColor4f((float)(tColor >> 16 & 255) / 255.0F, (float)(tColor >> 8 & 255) / 255.0F, (float)(tColor & 255) / 255.0F, 1F); } } drawTexturedModalRect(x + su * i, y + sv * j, 212, 96, su+2, sv+2); 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 b91d932ebd..83cf86126d 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 @@ -2,6 +2,7 @@ package com.github.technus.tectech.thing.metaTileEntity.multi.base; import com.github.technus.tectech.Reference; import com.github.technus.tectech.TecTech; +import com.github.technus.tectech.Util; import com.github.technus.tectech.Vec3pos; import com.github.technus.tectech.mechanics.elementalMatter.core.cElementalInstanceStackMap; import com.github.technus.tectech.mechanics.elementalMatter.core.stacks.cElementalDefinitionStack; @@ -440,9 +441,9 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt EnumChatFormatting.YELLOW+ ":" + EnumChatFormatting.AQUA+paramID + EnumChatFormatting.YELLOW+ ":"+ - EnumChatFormatting.AQUA+"I"); + EnumChatFormatting.AQUA+"I "+parametrization.getStatusIn(hatchNo, paramID).name); list.add(EnumChatFormatting.WHITE+"Value: "+ - EnumChatFormatting.AQUA+parametrization.getIn(hatchNo,paramID)); + EnumChatFormatting.AQUA+ Util.doubleToString(parametrization.getIn(hatchNo,paramID))); try{ list.add(parametrization.groups[hatchNo].parameterIn[paramID].getBrief()); }catch (NullPointerException|IndexOutOfBoundsException e){ @@ -464,9 +465,9 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt EnumChatFormatting.YELLOW+ ":" + EnumChatFormatting.AQUA+paramID + EnumChatFormatting.YELLOW+ ":"+ - EnumChatFormatting.AQUA+"O"); + EnumChatFormatting.AQUA+"O "+parametrization.getStatusOut(hatchNo, paramID).name); list.add(EnumChatFormatting.WHITE+"Value: "+ - EnumChatFormatting.AQUA+parametrization.getOut(hatchNo,paramID)); + EnumChatFormatting.AQUA+Util.doubleToString(parametrization.getOut(hatchNo,paramID))); try{ list.add(parametrization.groups[hatchNo].parameterOut[paramID].getBrief()); }catch (NullPointerException|IndexOutOfBoundsException e){ diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/LedStatus.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/LedStatus.java index e32df43ae4..f2eebe3f4b 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/LedStatus.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/LedStatus.java @@ -1,15 +1,17 @@ package com.github.technus.tectech.thing.metaTileEntity.multi.base; +import net.minecraft.util.EnumChatFormatting; + public enum LedStatus { - STATUS_UNUSED("Unused",true), - STATUS_TOO_LOW("Too Low",false), - STATUS_LOW("Low",true), - STATUS_WRONG("Wrong",false), - STATUS_OK("Valid",true), - STATUS_TOO_HIGH("Too High",false), - STATUS_HIGH("High",true), - STATUS_UNDEFINED("Unknown",false), - STATUS_NEUTRAL("Neutral",true); + STATUS_UNUSED(EnumChatFormatting.DARK_GRAY +"Unused",true),// + STATUS_TOO_LOW(EnumChatFormatting.BLUE+"Too Low",false),// + STATUS_LOW(EnumChatFormatting.AQUA+"Low",true),// + STATUS_WRONG(EnumChatFormatting.DARK_PURPLE+"Wrong",false),// + STATUS_OK(EnumChatFormatting.GREEN+"Valid",true),// + STATUS_TOO_HIGH(EnumChatFormatting.RED+"Too High",false),// + STATUS_HIGH(EnumChatFormatting.GOLD+"High",true),// + STATUS_UNDEFINED(EnumChatFormatting.GRAY+"Unknown",false), + STATUS_NEUTRAL(EnumChatFormatting.WHITE+"Neutral",true);// public final String name; public final boolean isOk; 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 4aba953df6..33d4dd9899 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 @@ -28,6 +28,14 @@ public class Parameters { return iParamsOut[hatchNo+10*parameterId]; } + LedStatus getStatusIn(int hatchNo,int parameterId){ + return eParamsInStatus[hatchNo+10*parameterId]; + } + + LedStatus getStatusOut(int hatchNo,int parameterId){ + return eParamsOutStatus[hatchNo+10*parameterId]; + } + private final GT_MetaTileEntity_MultiblockBase_EM parent; Parameters(GT_MetaTileEntity_MultiblockBase_EM parent){ -- cgit