From 7502e2c13b9f44c9f0ff7b4d935d5f4df0be0bdf Mon Sep 17 00:00:00 2001 From: Technus Date: Tue, 22 Aug 2017 11:41:42 +0200 Subject: More refactor --- .../github/technus/tectech/loader/MainLoader.java | 4 +- .../technus/tectech/loader/ThingsLoader.java | 4 +- .../thing/item/ConstructableTriggerItem.java | 158 +++++++++++++++++++++ .../thing/item/ConstructibleTriggerItem.java | 158 --------------------- .../hatch/gui/GT_Container_Param.java | 2 +- .../hatch/gui/GT_Container_Uncertainty.java | 2 +- .../hatch/gui/GT_GUIContainer_Param.java | 2 +- .../hatch/gui/GT_GUIContainer_UncertaintyAdv.java | 2 +- .../multi/gui/GT_GUIContainer_MultiMachineEM.java | 6 +- .../pipe/GT_MetaTileEntity_Pipe_Data.java | 6 +- .../GT_MetaTileEntity_DebugStructureWriter.java | 11 +- 11 files changed, 176 insertions(+), 179 deletions(-) create mode 100644 src/main/java/com/github/technus/tectech/thing/item/ConstructableTriggerItem.java delete mode 100644 src/main/java/com/github/technus/tectech/thing/item/ConstructibleTriggerItem.java (limited to 'src/main/java') diff --git a/src/main/java/com/github/technus/tectech/loader/MainLoader.java b/src/main/java/com/github/technus/tectech/loader/MainLoader.java index ad1517adb2..9a1e1be66c 100644 --- a/src/main/java/com/github/technus/tectech/loader/MainLoader.java +++ b/src/main/java/com/github/technus/tectech/loader/MainLoader.java @@ -8,7 +8,7 @@ import com.github.technus.tectech.magicAddon.definitions.AspectDefinitionCompatE import com.github.technus.tectech.thing.CustomItemList; import com.github.technus.tectech.thing.block.QuantumGlassBlock; import com.github.technus.tectech.thing.casing.TT_Container_Casings; -import com.github.technus.tectech.thing.item.ConstructibleTriggerItem; +import com.github.technus.tectech.thing.item.ConstructableTriggerItem; import com.github.technus.tectech.thing.item.DebugContainer_EM; import com.github.technus.tectech.thing.item.ParametrizerMemoryCard; import cpw.mods.fml.common.ProgressManager; @@ -118,7 +118,7 @@ public final class MainLoader {//TODO add checks for - is mod loaded dreamcraft TT_Container_Casings.sBlockCasingsTT.setCreativeTab(mainTab); TT_Container_Casings.sHintCasingsTT.setCreativeTab(mainTab); DebugContainer_EM.INSTANCE.setCreativeTab(mainTab); - ConstructibleTriggerItem.INSTANCE.setCreativeTab(mainTab); + ConstructableTriggerItem.INSTANCE.setCreativeTab(mainTab); ParametrizerMemoryCard.INSTANCE.setCreativeTab(mainTab); } diff --git a/src/main/java/com/github/technus/tectech/loader/ThingsLoader.java b/src/main/java/com/github/technus/tectech/loader/ThingsLoader.java index a92a5a663d..7411bc9335 100644 --- a/src/main/java/com/github/technus/tectech/loader/ThingsLoader.java +++ b/src/main/java/com/github/technus/tectech/loader/ThingsLoader.java @@ -6,7 +6,7 @@ import com.github.technus.tectech.thing.block.QuantumStuffBlock; import com.github.technus.tectech.thing.casing.GT_Block_CasingsTT; import com.github.technus.tectech.thing.casing.GT_Block_HintTT; import com.github.technus.tectech.thing.casing.TT_Container_Casings; -import com.github.technus.tectech.thing.item.ConstructibleTriggerItem; +import com.github.technus.tectech.thing.item.ConstructableTriggerItem; import com.github.technus.tectech.thing.item.DebugContainer_EM; import com.github.technus.tectech.thing.item.DefinitionContainer_EM; import com.github.technus.tectech.thing.item.ParametrizerMemoryCard; @@ -37,7 +37,7 @@ public class ThingsLoader implements Runnable { TecTech.Logger.info("TurretBaseEM registered"); } - ConstructibleTriggerItem.run(); + ConstructableTriggerItem.run(); ParametrizerMemoryCard.run(); TecTech.Logger.info("Useful item registered"); diff --git a/src/main/java/com/github/technus/tectech/thing/item/ConstructableTriggerItem.java b/src/main/java/com/github/technus/tectech/thing/item/ConstructableTriggerItem.java new file mode 100644 index 0000000000..18e7962f41 --- /dev/null +++ b/src/main/java/com/github/technus/tectech/thing/item/ConstructableTriggerItem.java @@ -0,0 +1,158 @@ +package com.github.technus.tectech.thing.item; + +import com.github.technus.tectech.CommonValues; +import com.github.technus.tectech.TecTech; +import com.github.technus.tectech.thing.metaTileEntity.IConstructable; +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_ElectricBlastFurnace; +import net.minecraft.block.Block; +import net.minecraft.client.entity.EntityClientPlayerMP; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.world.World; +import net.minecraftforge.common.util.FakePlayer; + +import java.util.HashMap; +import java.util.List; + +import static com.github.technus.tectech.Util.StructureBuilder; +import static com.github.technus.tectech.auxiliary.Reference.MODID; +import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sHintCasingsTT; +import static gregtech.api.GregTech_API.sBlockCasings1; + +/** + * Created by Tec on 15.03.2017. + */ +public class ConstructableTriggerItem extends Item { + public static ConstructableTriggerItem INSTANCE; + + public static HashMap multiblockMap= new HashMap<>(); + + private ConstructableTriggerItem() { + super(); + setUnlocalizedName("em.debugBuilder"); + setTextureName(MODID + ":itemDebugBuilder"); + } + + @Override + public boolean onItemUseFirst(ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { + TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); + if(tTileEntity==null || aPlayer instanceof FakePlayer) return aPlayer instanceof EntityPlayerMP; + if (aPlayer instanceof EntityPlayerMP) { + //struct gen + if (aPlayer.isSneaking() && aPlayer.capabilities.isCreativeMode) { + if (tTileEntity instanceof IGregTechTileEntity) { + IMetaTileEntity metaTE = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity(); + if (metaTE instanceof IConstructable) { + ((IConstructable) metaTE).construct(aStack.stackSize, false); + } else if (multiblockMap.containsKey(metaTE.getClass().getCanonicalName())) { + multiblockMap.get(metaTE.getClass().getCanonicalName()).construct(aStack.stackSize, false, tTileEntity, ((IGregTechTileEntity) tTileEntity).getFrontFacing()); + } + } else if (tTileEntity instanceof IConstructable) { + ((IConstructable) tTileEntity).construct(aStack.stackSize, false); + } else if (multiblockMap.containsKey(tTileEntity.getClass().getCanonicalName())) { + multiblockMap.get(tTileEntity.getClass().getCanonicalName()).construct(aStack.stackSize, false, tTileEntity, aSide); + } + } + return true; + }else if (aPlayer instanceof EntityClientPlayerMP){//particles and text client side + if ((!aPlayer.isSneaking() || !aPlayer.capabilities.isCreativeMode)) { + if(tTileEntity instanceof IGregTechTileEntity) { + IMetaTileEntity metaTE = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity(); + if (metaTE instanceof IConstructable) { + ((IConstructable) metaTE).construct(aStack.stackSize, true); + TecTech.proxy.printInchat(((IConstructable) metaTE).getStructureDescription(aStack.stackSize)); + return false; + } else if(multiblockMap.containsKey(metaTE.getClass().getCanonicalName())){ + multiblockMap.get(metaTE.getClass().getCanonicalName()).construct(aStack.stackSize,true,tTileEntity,((IGregTechTileEntity) tTileEntity).getFrontFacing()); + TecTech.proxy.printInchat(multiblockMap.get(metaTE.getClass().getCanonicalName()).getDescription(aStack.stackSize)); + return false; + } + } else if(tTileEntity instanceof IConstructable){ + ((IConstructable) tTileEntity).construct(aStack.stackSize,true); + TecTech.proxy.printInchat(((IConstructable) tTileEntity).getStructureDescription(aStack.stackSize)); + return false; + } else if(multiblockMap.containsKey(tTileEntity.getClass().getCanonicalName())){ + multiblockMap.get(tTileEntity.getClass().getCanonicalName()).construct(aStack.stackSize,true,tTileEntity, aSide); + TecTech.proxy.printInchat(multiblockMap.get(tTileEntity.getClass().getCanonicalName()).getDescription(aStack.stackSize)); + return false; + } + } else { + if(tTileEntity instanceof IGregTechTileEntity) { + IMetaTileEntity metaTE = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity(); + if (metaTE instanceof IConstructable) { + TecTech.proxy.printInchat(((IConstructable) metaTE).getStructureDescription(aStack.stackSize)); + return false; + } else if(multiblockMap.containsKey(metaTE.getClass().getCanonicalName())){ + TecTech.proxy.printInchat(multiblockMap.get(metaTE.getClass().getCanonicalName()).getDescription(aStack.stackSize)); + return false; + } + } else if(tTileEntity instanceof IConstructable){ + TecTech.proxy.printInchat(((IConstructable) tTileEntity).getStructureDescription(aStack.stackSize)); + return false; + } else if(multiblockMap.containsKey(tTileEntity.getClass().getCanonicalName())){ + TecTech.proxy.printInchat(multiblockMap.get(tTileEntity.getClass().getCanonicalName()).getDescription(aStack.stackSize)); + return false; + } + } + } + return false; + } + + @Override + public void addInformation(ItemStack aStack, EntityPlayer ep, List aList, boolean boo) { + aList.add(CommonValues.tecMark); + aList.add("Triggers Constructable Interface"); + aList.add(EnumChatFormatting.BLUE + "Shows multiblock construction details,"); + aList.add(EnumChatFormatting.BLUE + "just Use on a multiblock controller."); + aList.add(EnumChatFormatting.BLUE + "(Sneak Use in creative to build)"); + aList.add(EnumChatFormatting.BLUE + "Quantity affects tier/mode/type"); + } + + public static void run() { + INSTANCE = new ConstructableTriggerItem(); + GameRegistry.registerItem(INSTANCE, INSTANCE.getUnlocalizedName()); + + multiblockMap.put(GT_MetaTileEntity_ElectricBlastFurnace.class.getCanonicalName(), new MultiblockInfoContainer() { + //region Structure + private final String[][] shape = new String[][]{ + {"000","111","111"," . ",}, + {"0!0","1A1","1A1"," ",}, + {"000","111","111"," ",}, + }; + private final Block[] blockType = new Block[]{sBlockCasings1, sHintCasingsTT}; + private final byte[] blockMeta = new byte[]{11, 12}; + private final String[] desc=new String[]{ + EnumChatFormatting.AQUA+"Hint Details:", + "1 - Classic Hatches or Heat Proof Casing", + "2 - Muffler Hatch", + "General - Coil blocks" + }; + //endregion + + @Override + public void construct(int stackSize, boolean hintsOnly, TileEntity tileEntity, int aSide) { + StructureBuilder(shape, blockType, blockMeta, 1, 3, 0, tileEntity, aSide, hintsOnly); + } + + @Override + public String[] getDescription(int stackSize) { + return desc; + } + }); + } + + public abstract static class MultiblockInfoContainer { + public abstract void construct(int stackSize, boolean hintsOnly, TileEntity tileEntity, int aSide); + @SideOnly(Side.CLIENT) + public abstract String[] getDescription(int stackSize); + } +} diff --git a/src/main/java/com/github/technus/tectech/thing/item/ConstructibleTriggerItem.java b/src/main/java/com/github/technus/tectech/thing/item/ConstructibleTriggerItem.java deleted file mode 100644 index ceeeadbf5a..0000000000 --- a/src/main/java/com/github/technus/tectech/thing/item/ConstructibleTriggerItem.java +++ /dev/null @@ -1,158 +0,0 @@ -package com.github.technus.tectech.thing.item; - -import com.github.technus.tectech.CommonValues; -import com.github.technus.tectech.TecTech; -import com.github.technus.tectech.thing.metaTileEntity.IConstructable; -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_ElectricBlastFurnace; -import net.minecraft.block.Block; -import net.minecraft.client.entity.EntityClientPlayerMP; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.world.World; -import net.minecraftforge.common.util.FakePlayer; - -import java.util.HashMap; -import java.util.List; - -import static com.github.technus.tectech.Util.StructureBuilder; -import static com.github.technus.tectech.auxiliary.Reference.MODID; -import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sHintCasingsTT; -import static gregtech.api.GregTech_API.sBlockCasings1; - -/** - * Created by Tec on 15.03.2017. - */ -public class ConstructibleTriggerItem extends Item { - public static ConstructibleTriggerItem INSTANCE; - - public static HashMap multiblockMap= new HashMap<>(); - - private ConstructibleTriggerItem() { - super(); - setUnlocalizedName("em.debugBuilder"); - setTextureName(MODID + ":itemDebugBuilder"); - } - - @Override - public boolean onItemUseFirst(ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { - TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); - if(tTileEntity==null || aPlayer instanceof FakePlayer) return aPlayer instanceof EntityPlayerMP; - if (aPlayer instanceof EntityPlayerMP) { - //struct gen - if (aPlayer.isSneaking() && aPlayer.capabilities.isCreativeMode) { - if (tTileEntity instanceof IGregTechTileEntity) { - IMetaTileEntity metaTE = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity(); - if (metaTE instanceof IConstructable) { - ((IConstructable) metaTE).construct(aStack.stackSize, false); - } else if (multiblockMap.containsKey(metaTE.getClass().getCanonicalName())) { - multiblockMap.get(metaTE.getClass().getCanonicalName()).construct(aStack.stackSize, false, tTileEntity, ((IGregTechTileEntity) tTileEntity).getFrontFacing()); - } - } else if (tTileEntity instanceof IConstructable) { - ((IConstructable) tTileEntity).construct(aStack.stackSize, false); - } else if (multiblockMap.containsKey(tTileEntity.getClass().getCanonicalName())) { - multiblockMap.get(tTileEntity.getClass().getCanonicalName()).construct(aStack.stackSize, false, tTileEntity, aSide); - } - } - return true; - }else if (aPlayer instanceof EntityClientPlayerMP){//particles and text client side - if ((!aPlayer.isSneaking() || !aPlayer.capabilities.isCreativeMode)) { - if(tTileEntity instanceof IGregTechTileEntity) { - IMetaTileEntity metaTE = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity(); - if (metaTE instanceof IConstructable) { - ((IConstructable) metaTE).construct(aStack.stackSize, true); - TecTech.proxy.printInchat(((IConstructable) metaTE).getStructureDescription(aStack.stackSize)); - return false; - } else if(multiblockMap.containsKey(metaTE.getClass().getCanonicalName())){ - multiblockMap.get(metaTE.getClass().getCanonicalName()).construct(aStack.stackSize,true,tTileEntity,((IGregTechTileEntity) tTileEntity).getFrontFacing()); - TecTech.proxy.printInchat(multiblockMap.get(metaTE.getClass().getCanonicalName()).getDescription(aStack.stackSize)); - return false; - } - } else if(tTileEntity instanceof IConstructable){ - ((IConstructable) tTileEntity).construct(aStack.stackSize,true); - TecTech.proxy.printInchat(((IConstructable) tTileEntity).getStructureDescription(aStack.stackSize)); - return false; - } else if(multiblockMap.containsKey(tTileEntity.getClass().getCanonicalName())){ - multiblockMap.get(tTileEntity.getClass().getCanonicalName()).construct(aStack.stackSize,true,tTileEntity, aSide); - TecTech.proxy.printInchat(multiblockMap.get(tTileEntity.getClass().getCanonicalName()).getDescription(aStack.stackSize)); - return false; - } - } else { - if(tTileEntity instanceof IGregTechTileEntity) { - IMetaTileEntity metaTE = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity(); - if (metaTE instanceof IConstructable) { - TecTech.proxy.printInchat(((IConstructable) metaTE).getStructureDescription(aStack.stackSize)); - return false; - } else if(multiblockMap.containsKey(metaTE.getClass().getCanonicalName())){ - TecTech.proxy.printInchat(multiblockMap.get(metaTE.getClass().getCanonicalName()).getDescription(aStack.stackSize)); - return false; - } - } else if(tTileEntity instanceof IConstructable){ - TecTech.proxy.printInchat(((IConstructable) tTileEntity).getStructureDescription(aStack.stackSize)); - return false; - } else if(multiblockMap.containsKey(tTileEntity.getClass().getCanonicalName())){ - TecTech.proxy.printInchat(multiblockMap.get(tTileEntity.getClass().getCanonicalName()).getDescription(aStack.stackSize)); - return false; - } - } - } - return false; - } - - @Override - public void addInformation(ItemStack aStack, EntityPlayer ep, List aList, boolean boo) { - aList.add(CommonValues.tecMark); - aList.add("Triggers Constructable Interface"); - aList.add(EnumChatFormatting.BLUE + "Shows multiblock construction details,"); - aList.add(EnumChatFormatting.BLUE + "just Use on a multiblock controller."); - aList.add(EnumChatFormatting.BLUE + "(Sneak Use in creative to build)"); - aList.add(EnumChatFormatting.BLUE + "Quantity affects tier/mode/type"); - } - - public static void run() { - INSTANCE = new ConstructibleTriggerItem(); - GameRegistry.registerItem(INSTANCE, INSTANCE.getUnlocalizedName()); - - multiblockMap.put(GT_MetaTileEntity_ElectricBlastFurnace.class.getCanonicalName(), new MultiblockInfoContainer() { - //region Structure - private final String[][] shape = new String[][]{ - {"000","111","111"," . ",}, - {"0!0","1A1","1A1"," ",}, - {"000","111","111"," ",}, - }; - private final Block[] blockType = new Block[]{sBlockCasings1, sHintCasingsTT}; - private final byte[] blockMeta = new byte[]{11, 12}; - private final String[] desc=new String[]{ - EnumChatFormatting.AQUA+"Hint Details:", - "1 - Classic Hatches or Heat Proof Casing", - "2 - Muffler Hatch", - "General - Coil blocks" - }; - //endregion - - @Override - public void construct(int stackSize, boolean hintsOnly, TileEntity tileEntity, int aSide) { - StructureBuilder(shape, blockType, blockMeta, 1, 3, 0, tileEntity, aSide, hintsOnly); - } - - @Override - public String[] getDescription(int stackSize) { - return desc; - } - }); - } - - public abstract static class MultiblockInfoContainer { - public abstract void construct(int stackSize, boolean hintsOnly, TileEntity tileEntity, int aSide); - @SideOnly(Side.CLIENT) - public abstract String[] getDescription(int stackSize); - } -} 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 c384552c25..ef0b9ddfb1 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 @@ -14,7 +14,7 @@ import net.minecraft.item.ItemStack; import java.util.Iterator; -public final class GT_Container_Param extends GT_ContainerMetaTile_Machine { +public class GT_Container_Param extends GT_ContainerMetaTile_Machine { public int exponent = 0; public int value2 = 0; public int value1 = 0; diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_Container_Uncertainty.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_Container_Uncertainty.java index 68b4f9268b..8db5fc1aa4 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_Container_Uncertainty.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_Container_Uncertainty.java @@ -14,7 +14,7 @@ import net.minecraft.item.ItemStack; import java.util.Iterator; -public final class GT_Container_Uncertainty extends GT_ContainerMetaTile_Machine { +public class GT_Container_Uncertainty extends GT_ContainerMetaTile_Machine { public short[] matrix = new short[]{500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500}; public byte selection = -1, mode = 0, status = -128; 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 c272e67fdc..d883cb3332 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 @@ -7,7 +7,7 @@ import net.minecraft.entity.player.InventoryPlayer; import static com.github.technus.tectech.TecTech.proxy; import static gregtech.api.enums.GT_Values.RES_PATH_GUI; -public final class GT_GUIContainer_Param extends GT_GUIContainerMetaTile_Machine { +public class GT_GUIContainer_Param extends GT_GUIContainerMetaTile_Machine { public GT_GUIContainer_Param(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { super(new GT_Container_Param(aInventoryPlayer, aTileEntity), RES_PATH_GUI + "Parametrizer.png"); } diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_GUIContainer_UncertaintyAdv.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_GUIContainer_UncertaintyAdv.java index eebf48debb..d6a0b14f34 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_GUIContainer_UncertaintyAdv.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_GUIContainer_UncertaintyAdv.java @@ -9,7 +9,7 @@ import static com.github.technus.tectech.TecTech.proxy; import static gregtech.api.enums.GT_Values.RES_PATH_GUI; import static org.lwjgl.opengl.GL11.*; -public final class GT_GUIContainer_UncertaintyAdv extends GT_GUIContainerMetaTile_Machine { +public class GT_GUIContainer_UncertaintyAdv extends GT_GUIContainerMetaTile_Machine { protected static final short sX = 52, sY = 33, bU = 0, rU = 70, fU = 192, V = 210, Vs = 216; public GT_GUIContainer_UncertaintyAdv(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/gui/GT_GUIContainer_MultiMachineEM.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/gui/GT_GUIContainer_MultiMachineEM.java index 595d280c18..08f97832dd 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/gui/GT_GUIContainer_MultiMachineEM.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/gui/GT_GUIContainer_MultiMachineEM.java @@ -28,11 +28,11 @@ public class GT_GUIContainer_MultiMachineEM extends GT_GUIContainerMetaTile_Mach if ((((GT_Container_MultiMachineEM) mContainer).mDisplayErrorCode & 1) != 0) fontRendererObj.drawString("Pipe is loose.", 10, -10, 16448255); if ((((GT_Container_MultiMachineEM) mContainer).mDisplayErrorCode & 2) != 0) - fontRendererObj.drawString("Screws are missing.", 10, -2, 16448255); + fontRendererObj.drawString("Screws are loose.", 10, -2, 16448255); if ((((GT_Container_MultiMachineEM) mContainer).mDisplayErrorCode & 4) != 0) fontRendererObj.drawString("Something is stuck.", 10, 6, 16448255); if ((((GT_Container_MultiMachineEM) mContainer).mDisplayErrorCode & 8) != 0) - fontRendererObj.drawString("Platings are dented.", 10, 14, 16448255); + fontRendererObj.drawString("Plating is dented.", 10, 14, 16448255); if ((((GT_Container_MultiMachineEM) mContainer).mDisplayErrorCode & 16) != 0) fontRendererObj.drawString("Circuitry burned out.", 10, 22, 16448255); if ((((GT_Container_MultiMachineEM) mContainer).mDisplayErrorCode & 32) != 0) @@ -46,7 +46,7 @@ public class GT_GUIContainer_MultiMachineEM extends GT_GUIContainerMetaTile_Mach if (((GT_Container_MultiMachineEM) mContainer).mDisplayErrorCode == 0) { if (((GT_Container_MultiMachineEM) mContainer).mActive == 0) { - fontRendererObj.drawString("Hit with Soft Hammer", 10, -10, 16448255); + fontRendererObj.drawString("Soft Hammer or press Button", 10, -10, 16448255); fontRendererObj.drawString("to (re-)start the Machine", 10, -2, 16448255); fontRendererObj.drawString("if it doesn't start.", 10, 6, 16448255); } else { diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/pipe/GT_MetaTileEntity_Pipe_Data.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/pipe/GT_MetaTileEntity_Pipe_Data.java index c8ba4dbc1e..d495c7e9f2 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/pipe/GT_MetaTileEntity_Pipe_Data.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/pipe/GT_MetaTileEntity_Pipe_Data.java @@ -32,7 +32,7 @@ import static gregtech.api.enums.Dyes.MACHINE_METAL; */ public class GT_MetaTileEntity_Pipe_Data extends MetaPipeEntity implements iConnectsToDataPipe { private static Textures.BlockIcons.CustomIcon EMpipe; - private static Textures.BlockIcons.CustomIcon EMcandy; + private static Textures.BlockIcons.CustomIcon EMbar; public byte connectionCount = 0; public GT_MetaTileEntity_Pipe_Data(int aID, String aName, String aNameRegional) { @@ -52,13 +52,13 @@ public class GT_MetaTileEntity_Pipe_Data extends MetaPipeEntity implements iConn @SideOnly(Side.CLIENT) public void registerIcons(IIconRegister aBlockIconRegister) { EMpipe = new Textures.BlockIcons.CustomIcon("iconsets/EM_DATA"); - EMcandy = new Textures.BlockIcons.CustomIcon("iconsets/EM_BAR"); + EMbar = new Textures.BlockIcons.CustomIcon("iconsets/EM_BAR"); super.registerIcons(aBlockIconRegister); } @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aConnections, byte aColorIndex, boolean aConnected, boolean aRedstone) { - return new ITexture[]{new GT_RenderedTexture(EMpipe), new GT_RenderedTexture(EMcandy, Dyes.getModulation(aColorIndex, MACHINE_METAL.getRGBA()))}; + return new ITexture[]{new GT_RenderedTexture(EMpipe), new GT_RenderedTexture(EMbar, Dyes.getModulation(aColorIndex, MACHINE_METAL.getRGBA()))}; } @Override diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_DebugStructureWriter.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_DebugStructureWriter.java index 4ea525acd2..f300b3e432 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_DebugStructureWriter.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_DebugStructureWriter.java @@ -20,7 +20,6 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.EnumChatFormatting; import static com.github.technus.tectech.Util.StructureWriter; -import static com.github.technus.tectech.auxiliary.TecTechConfig.DEBUG_MODE; /** * Created by Tec on 23.03.2017. @@ -104,9 +103,8 @@ public class GT_MetaTileEntity_DebugStructureWriter extends GT_MetaTileEntity_Ti public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { if (aBaseMetaTileEntity.isAllowedToWork()) { result = StructureWriter(this.getBaseMetaTileEntity(), numbers[0], numbers[1], numbers[2], numbers[3], numbers[4], numbers[5], false); - if (DEBUG_MODE) - for (String s : result) - TecTech.Logger.info(s); + for (String s : result) + TecTech.Logger.info(s); aBaseMetaTileEntity.disableWorking(); } } @@ -114,9 +112,8 @@ public class GT_MetaTileEntity_DebugStructureWriter extends GT_MetaTileEntity_Ti @Override public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { result = StructureWriter(this.getBaseMetaTileEntity(), numbers[0], numbers[1], numbers[2], numbers[3], numbers[4], numbers[5], true); - if (DEBUG_MODE) - for (String s : result) - TecTech.Logger.info(s); + for (String s : result) + TecTech.Logger.info(s); } @Override -- cgit