diff options
author | Tec <daniel112092@gmail.com> | 2019-05-21 22:13:22 +0200 |
---|---|---|
committer | Tec <daniel112092@gmail.com> | 2019-05-21 22:13:22 +0200 |
commit | 0c56635ff22839201bdaff63276cf2df646ad279 (patch) | |
tree | bedbf187d8c9021e616c80e8c079b24c8834e203 /src/main | |
parent | d1915c83101e3f97fa0730e1be8a85f4fc5ccdde (diff) | |
download | GT5-Unofficial-0c56635ff22839201bdaff63276cf2df646ad279.tar.gz GT5-Unofficial-0c56635ff22839201bdaff63276cf2df646ad279.tar.bz2 GT5-Unofficial-0c56635ff22839201bdaff63276cf2df646ad279.zip |
Cleanup some strings and add creative data hatch
Diffstat (limited to 'src/main')
16 files changed, 193 insertions, 58 deletions
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<String> 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<iaea.energeticStatesArray.length;i++){ - lines.add("ENERGY LEVEL "+i+" = "+iaea.energeticStatesArray[i].energy+" eV"); + lines.add("E LEVEL "+i+" = "+iaea.energeticStatesArray[i].energy+" eV"); } } if(Util.areBitsSet(SCAN_GET_TIMESPAN_INFO, capabilities)){ 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 f38fc1fc60..206ac9eab3 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 @@ -50,7 +50,7 @@ public class TT_recipeAdder extends GT_RecipeAdder { } 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, aInputs, new ItemStack[]{aOutput}, new ItemStack[]{ItemList.Tool_DataStick.getWithName(1L, "Reads Research result")}, aFluidInputs, null, assDuration, assEUt, 0,true); - GT_Recipe.GT_Recipe_AssemblyLine.sAssemblylineRecipes.add(new GT_Recipe.GT_Recipe_AssemblyLine( aResearchItem, totalComputationRequired/computationRequiredPerSec, aInputs, aFluidInputs, aOutput, assDuration, assEUt)); + GT_Recipe.GT_Recipe_AssemblyLine.sAssemblylineRecipes.add(new GT_Recipe.GT_Recipe_AssemblyLine( aResearchItem, totalComputationRequired/computationRequiredPerSec, aInputs, aFluidInputs, aOutput, assDuration, assEUt));//todo unfuck return true; } @@ -114,7 +114,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( aResearchItem, totalComputationRequired/computationRequiredPerSec, tInputs, aFluidInputs, aOutput, assDuration, assEUt, tAlts)); return true; } diff --git a/src/main/java/com/github/technus/tectech/thing/CustomItemList.java b/src/main/java/com/github/technus/tectech/thing/CustomItemList.java index a062693db4..801c46416f 100644 --- a/src/main/java/com/github/technus/tectech/thing/CustomItemList.java +++ b/src/main/java/com/github/technus/tectech/thing/CustomItemList.java @@ -23,7 +23,7 @@ public enum CustomItemList implements IItemContainer { Transformer_HA_UEV_UHV,Transformer_HA_UIV_UEV,Transformer_HA_UMV_UIV,Transformer_HA_UXV_UMV, Transformer_HA_OPV_UXV,Transformer_HA_MAXV_OPV, - hatch_CreativeMaitenance, + hatch_CreativeMaitenance,hatch_CreativeData, Machine_OwnerDetector,Machine_DataReader, Machine_BuckConverter_IV,Machine_BuckConverter_LuV,Machine_BuckConverter_ZPM, Machine_BuckConverter_UV,Machine_BuckConverter_UHV,Machine_BuckConverter_UEV, diff --git a/src/main/java/com/github/technus/tectech/thing/item/gui/ScanDisplayScreen.java b/src/main/java/com/github/technus/tectech/thing/item/gui/ScanDisplayScreen.java index 753581439b..7f4c9b64fe 100644 --- a/src/main/java/com/github/technus/tectech/thing/item/gui/ScanDisplayScreen.java +++ b/src/main/java/com/github/technus/tectech/thing/item/gui/ScanDisplayScreen.java @@ -21,7 +21,7 @@ public class ScanDisplayScreen extends GuiScreen { private int baseX,baseY; private Button up,down,pgUp,pgDown; private final String[] lines; - private int firstLine =0; + private int firstLine; private static final ResourceLocation[] BACKGROUNDS =new ResourceLocation[]{new ResourceLocation(MODID+":textures/gui/scanDisplayScreen1.png"), new ResourceLocation(MODID+":textures/gui/scanDisplayScreen2.png"), @@ -31,7 +31,7 @@ public class ScanDisplayScreen extends GuiScreen { new ResourceLocation(MODID+":textures/gui/scanDisplayScreen6.png"), new ResourceLocation(MODID+":textures/gui/scanDisplayScreen7.png"), new ResourceLocation(MODID+":textures/gui/scanDisplayScreen8.png")}; - private static final ResourceLocation ITEM =new ResourceLocation(MODID+"::textures/gui/scanDisplayItem.png"); + private static final ResourceLocation ITEM =new ResourceLocation(MODID+":textures/gui/scanDisplayItem.png"); public ScanDisplayScreen(EntityPlayer player){ lines=ElementalDefinitionScanStorage_EM.getLines(player.getHeldItem()); @@ -82,6 +82,8 @@ public class ScanDisplayScreen extends GuiScreen { TecTech.proxy.renderUnicodeString(lines[i], textBaseX, textBaseY + 17 - j, 200, itick); } } + TecTech.proxy.renderUnicodeString(Integer.toString(firstLine), textBaseX, baseY+146, 200, itick); + TecTech.proxy.renderUnicodeString(Integer.toString(lines.length), textBaseX, baseY+157, 200, itick); } @Override diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_CreativeData.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_CreativeData.java new file mode 100644 index 0000000000..eb6909a4a4 --- /dev/null +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_CreativeData.java @@ -0,0 +1,116 @@ +package com.github.technus.tectech.thing.metaTileEntity.hatch; + +import com.github.technus.tectech.Util; +import com.github.technus.tectech.mechanics.dataTransport.QuantumDataPacket; +import com.github.technus.tectech.thing.metaTileEntity.pipe.GT_MetaTileEntity_Pipe_Data; +import com.github.technus.tectech.thing.metaTileEntity.pipe.IConnectsToDataPipe; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.util.GT_Utility; +import net.minecraft.nbt.NBTTagCompound; + +import static com.github.technus.tectech.CommonValues.MOVE_AT; + +/** + * Created by danie_000 on 27.10.2016. + */ +public class GT_MetaTileEntity_Hatch_CreativeData extends GT_MetaTileEntity_Hatch_DataConnector<QuantumDataPacket> { + 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){ |