diff options
author | Technus <daniel112092@gmail.com> | 2017-08-12 18:48:20 +0200 |
---|---|---|
committer | Technus <daniel112092@gmail.com> | 2017-08-12 18:48:20 +0200 |
commit | cffa9ccfdd82c6135421e74b55b2b02f255bcb69 (patch) | |
tree | 22deb4e9582e13cde5e3ce428104501c3f9bc9c6 /src | |
parent | 4a9a1df6dfff83fc84c4b0b2660632d3b01b2cdb (diff) | |
download | GT5-Unofficial-cffa9ccfdd82c6135421e74b55b2b02f255bcb69.tar.gz GT5-Unofficial-cffa9ccfdd82c6135421e74b55b2b02f255bcb69.tar.bz2 GT5-Unofficial-cffa9ccfdd82c6135421e74b55b2b02f255bcb69.zip |
More compatibility
Diffstat (limited to 'src')
13 files changed, 102 insertions, 69 deletions
diff --git a/src/main/java/com/github/technus/tectech/Util.java b/src/main/java/com/github/technus/tectech/Util.java index f01c755e0b..83bc00f7b7 100644 --- a/src/main/java/com/github/technus/tectech/Util.java +++ b/src/main/java/com/github/technus/tectech/Util.java @@ -311,7 +311,7 @@ public class Util { byte facing = aBaseMetaTileEntity.getFrontFacing(); return StructureBuilder(structure,blockType,blockMeta, horizontalOffset,verticalOffset,depthOffset, - aBaseMetaTileEntity.getTileEntity(aBaseMetaTileEntity.getXCoord(),aBaseMetaTileEntity.getYCoord(),aBaseMetaTileEntity.getZCoord()), + aBaseMetaTileEntity.getWorld().getTileEntity(aBaseMetaTileEntity.getXCoord(),aBaseMetaTileEntity.getYCoord(),aBaseMetaTileEntity.getZCoord()), facing,hintsOnly); } @@ -784,4 +784,20 @@ public class Util { public static String getUniqueIdentifier(ItemStack is) { return GameRegistry.findUniqueIdentifierFor(is.getItem()).modId + ":" + is.getUnlocalizedName(); } + + + public static final String[] VN = new String[]{"ULV", "LV", "MV", "HV", "EV", "IV", "LuV", "ZPM", "UV", "UHV", "UEV", "UIV", "UMV", "UXV", "OpV", "MAX"}; + public static final long[] V = new long[]{8L, 32L, 128L, 512L, 2048L, 8192L, 32768L, 131072L, 524288L, 2097152L, 8388608L, 33554432L, 134217728L, 536870912L, 1073741824L, Integer.MAX_VALUE-7}; + public static byte getTier(long l) { + byte i = -1; + + do { + ++i; + if (i >= V.length) { + return i; + } + } while(l > V[i]); + + return i; + } } 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 9bd92d53e3..f96a104ce9 100644 --- a/src/main/java/com/github/technus/tectech/thing/CustomItemList.java +++ b/src/main/java/com/github/technus/tectech/thing/CustomItemList.java @@ -36,7 +36,7 @@ public enum CustomItemList implements IItemContainer { Machine_Multi_Transformer, Machine_Multi_Computer, Machine_Multi_Microwave, Machine_Multi_Infuser, Machine_Multi_Switch, Machine_Multi_BHG, Machine_Multi_Annihilation, Machine_Multi_Decay, Machine_Multi_EMmachine, Machine_Multi_Stabilizer, Machine_Multi_Collider, Machine_Multi_Wormhole, Machine_Multi_EMCrafter, Machine_Multi_Scanner, Machine_Multi_Research, - hint_0,hint_1,hint_2,hint_3,hint_4,hint_5,hint_6,hint_7,hint_8,hint_9,hint_10,hint_11,hint_default,hint_air,hint_noAir,hint_error; + hint_0,hint_1,hint_2,hint_3,hint_4,hint_5,hint_6,hint_7,hint_8,hint_9,hint_10,hint_11, hint_general,hint_air,hint_noAir,hint_error; private ItemStack mStack = null; diff --git a/src/main/java/com/github/technus/tectech/thing/casing/GT_Block_HintTT.java b/src/main/java/com/github/technus/tectech/thing/casing/GT_Block_HintTT.java index 796c37a0ee..4e4d6ba3b3 100644 --- a/src/main/java/com/github/technus/tectech/thing/casing/GT_Block_HintTT.java +++ b/src/main/java/com/github/technus/tectech/thing/casing/GT_Block_HintTT.java @@ -23,7 +23,7 @@ public class GT_Block_HintTT extends GT_Block_Casings_Abstract { private static IIcon hint[] = new IIcon[16]; public GT_Block_HintTT() { - super(GT_Item_CasingsTT.class, "gt.blockhintTT", GT_Material_Casings.INSTANCE); + super(GT_Item_HintTT.class, "gt.blockhintTT", GT_Material_Casings.INSTANCE); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".0.name", "Hint 1 dot");//id is -1 GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".1.name", "Hint 2 dots"); @@ -37,7 +37,7 @@ public class GT_Block_HintTT extends GT_Block_Casings_Abstract { GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".9.name", "Hint 10 dots"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".10.name", "Hint 11 dots"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".11.name", "Hint 12 dots"); - GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".12.name", "Hint default"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".12.name", "Hint general"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".13.name", "Hint air"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".14.name", "Hint no air"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".15.name", "Hint error"); @@ -55,7 +55,7 @@ public class GT_Block_HintTT extends GT_Block_Casings_Abstract { CustomItemList.hint_9.set(new ItemStack(this, 1, 9)); CustomItemList.hint_10.set(new ItemStack(this, 1, 10)); CustomItemList.hint_11.set(new ItemStack(this, 1, 11)); - CustomItemList.hint_default.set(new ItemStack(this, 1, 12)); + CustomItemList.hint_general.set(new ItemStack(this, 1, 12)); CustomItemList.hint_air.set(new ItemStack(this, 1, 13)); CustomItemList.hint_noAir.set(new ItemStack(this, 1, 14)); CustomItemList.hint_error.set(new ItemStack(this, 1, 15)); diff --git a/src/main/java/com/github/technus/tectech/thing/casing/GT_Item_HintTT.java b/src/main/java/com/github/technus/tectech/thing/casing/GT_Item_HintTT.java index 84f41f0ed7..94e7c23be9 100644 --- a/src/main/java/com/github/technus/tectech/thing/casing/GT_Item_HintTT.java +++ b/src/main/java/com/github/technus/tectech/thing/casing/GT_Item_HintTT.java @@ -23,22 +23,11 @@ public class GT_Item_HintTT extends GT_Item_Casings_Abstract { aList.add(tecMark); aList.add("Helps while building"); switch (aStack.getItemDamage()) { - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 11: + case 0: case 1: case 2: case 3: case 4: case 5: case 6: case 7: case 8: case 9: case 10: case 11: aList.add(EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "Placeholder for a certain group."); break; case 12: - aList.add(EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "Default placeholder in case of overflow."); + aList.add(EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "General placeholder."); break; case 13: aList.add(EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "Make sure it contains Air material."); 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 index 15462838d9..f7476efda1 100644 --- a/src/main/java/com/github/technus/tectech/thing/item/ConstructibleTriggerItem.java +++ b/src/main/java/com/github/technus/tectech/thing/item/ConstructibleTriggerItem.java @@ -34,7 +34,7 @@ import static gregtech.api.GregTech_API.sBlockCasings1; public class ConstructibleTriggerItem extends Item { public static ConstructibleTriggerItem INSTANCE; - public static HashMap<Class,MultiblockInfoContainer> multiblockMap= new HashMap<>(); + public static HashMap<String,MultiblockInfoContainer> multiblockMap= new HashMap<>(); private ConstructibleTriggerItem() { super(); @@ -53,19 +53,16 @@ public class ConstructibleTriggerItem extends Item { IMetaTileEntity metaTE = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity(); if (metaTE instanceof IConstructable) { ((IConstructable) metaTE).construct(aStack.stackSize, false); - return true; - } else if (multiblockMap.containsKey(metaTE.getClass())) { - multiblockMap.get(metaTE.getClass()).construct(aStack.stackSize, false, tTileEntity, ((IGregTechTileEntity) tTileEntity).getFrontFacing()); - return true; + } 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); - return true; - } else if (multiblockMap.containsKey(tTileEntity.getClass())) { - multiblockMap.get(tTileEntity.getClass()).construct(aStack.stackSize, false, tTileEntity, aSide); - return true; + } 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) { @@ -73,41 +70,41 @@ public class ConstructibleTriggerItem extends Item { if (metaTE instanceof IConstructable) { ((IConstructable) metaTE).construct(aStack.stackSize, true); TecTech.proxy.printInchat(((IConstructable) metaTE).getStructureDescription(aStack.stackSize)); - return true; - } else if(multiblockMap.containsKey(metaTE.getClass())){ - multiblockMap.get(metaTE.getClass()).construct(aStack.stackSize,true,tTileEntity,((IGregTechTileEntity) tTileEntity).getFrontFacing()); - TecTech.proxy.printInchat(multiblockMap.get(metaTE.getClass()).getDescription(aStack.stackSize)); - return true; + 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 true; - } else if(multiblockMap.containsKey(tTileEntity.getClass())){ - multiblockMap.get(tTileEntity.getClass()).construct(aStack.stackSize,true,tTileEntity, aSide); - TecTech.proxy.printInchat(multiblockMap.get(tTileEntity.getClass()).getDescription(aStack.stackSize)); - return true; + 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 true; - } else if(multiblockMap.containsKey(metaTE.getClass())){ - TecTech.proxy.printInchat(multiblockMap.get(metaTE.getClass()).getDescription(aStack.stackSize)); - return true; + 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 true; - } else if(multiblockMap.containsKey(tTileEntity.getClass())){ - TecTech.proxy.printInchat(multiblockMap.get(tTileEntity.getClass()).getDescription(aStack.stackSize)); - return true; + return false; + } else if(multiblockMap.containsKey(tTileEntity.getClass().getCanonicalName())){ + TecTech.proxy.printInchat(multiblockMap.get(tTileEntity.getClass().getCanonicalName()).getDescription(aStack.stackSize)); + return false; } } } - return aPlayer instanceof EntityPlayerMP; + return false; } @Override @@ -124,7 +121,7 @@ public class ConstructibleTriggerItem extends Item { INSTANCE = new ConstructibleTriggerItem(); GameRegistry.registerItem(INSTANCE, INSTANCE.getUnlocalizedName()); - multiblockMap.put(GT_MetaTileEntity_ElectricBlastFurnace.class, new MultiblockInfoContainer() { + multiblockMap.put(GT_MetaTileEntity_ElectricBlastFurnace.class.getCanonicalName(), new MultiblockInfoContainer() { //region Structure private final String[][] shape = new String[][]{ {"000","111","111"," . ",}, diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/IConstructable.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/IConstructable.java index 4bfe104894..096eab8f58 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/IConstructable.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/IConstructable.java @@ -8,6 +8,7 @@ import cpw.mods.fml.relauncher.SideOnly; */ public interface IConstructable { void construct(int stackSize, boolean hintsOnly); + @SideOnly(Side.CLIENT) String[] getStructureDescription(int stackSize); } diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_DynamoMulti.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_DynamoMulti.java index a498033264..e25128eb1f 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_DynamoMulti.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_DynamoMulti.java @@ -6,35 +6,47 @@ import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; +import gregtech.api.util.GT_Utility; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; -import static gregtech.api.enums.GT_Values.V; +import static com.github.technus.tectech.Util.V; /** * Created by danie_000 on 16.12.2016. */ public class GT_MetaTileEntity_Hatch_DynamoMulti extends GT_MetaTileEntity_Hatch { public final int Amperes; + public final int eTier; + public static ITexture[] overlay; + static{ + try { + overlay=(ITexture[]) GT_Utility.getField(Textures.BlockIcons.class,"OVERLAYS_ENERGY_OUT_POWER").get(null); + }catch (IllegalAccessException | NullPointerException e){ + overlay = Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI; + } + } public GT_MetaTileEntity_Hatch_DynamoMulti(int aID, String aName, String aNameRegional, int aTier, int aAmp) { super(aID, aName, aNameRegional, aTier, 0, "Multiple Ampere Energy Extractor for Multiblocks"); Amperes = aAmp; + eTier=aTier; } public GT_MetaTileEntity_Hatch_DynamoMulti(String aName, int aTier, int aAmp, String aDescription, ITexture[][][] aTextures) { super(aName, aTier, 0, aDescription, aTextures); Amperes = aAmp; + eTier=aTier; } @Override public ITexture[] getTexturesActive(ITexture aBaseTexture) { - return new ITexture[]{aBaseTexture, Textures.BlockIcons.OVERLAYS_ENERGY_OUT_POWER[mTier]}; + return new ITexture[]{aBaseTexture, overlay[mTier]}; } @Override public ITexture[] getTexturesInactive(ITexture aBaseTexture) { - return new ITexture[]{aBaseTexture, Textures.BlockIcons.OVERLAYS_ENERGY_OUT_POWER[mTier]}; + return new ITexture[]{aBaseTexture, overlay[mTier]}; } @Override @@ -69,17 +81,17 @@ public class GT_MetaTileEntity_Hatch_DynamoMulti extends GT_MetaTileEntity_Hatch @Override public long getMinimumStoredEU() { - return 512 * Amperes; + return 128 * Amperes; } @Override public long maxEUOutput() { - return V[mTier]; + return V[eTier]; } @Override public long maxEUStore() { - return 512L + V[mTier] * 4L * Amperes; + return 512L + V[eTier] * 4L * Amperes; } @Override diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_ElementalContainer.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_ElementalContainer.java index de33eed0d7..7865b319e5 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_ElementalContainer.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_ElementalContainer.java @@ -41,13 +41,16 @@ public abstract class GT_MetaTileEntity_Hatch_ElementalContainer extends GT_Meta public float overflowMatter = 0f; public short id = -1; private byte deathDelay = 2; + public final int eTier; public GT_MetaTileEntity_Hatch_ElementalContainer(int aID, String aName, String aNameRegional, int aTier, String descr) { super(aID, aName, aNameRegional, aTier, 0, descr); + eTier=aTier; } public GT_MetaTileEntity_Hatch_ElementalContainer(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { super(aName, aTier, 0, aDescription, aTextures); + eTier=aTier; } @Override @@ -185,11 +188,11 @@ public abstract class GT_MetaTileEntity_Hatch_ElementalContainer extends GT_Meta } public int getMaxStacksCount() { - return mTier * 2; + return eTier * 2; } public int getMaxStackSize() { - return mTier * (mTier - 7) * 1000; + return eTier * (eTier - 7) * 1000; } @Override diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_EnergyMulti.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_EnergyMulti.java index ad65b514d4..b08f53830e 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_EnergyMulti.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_EnergyMulti.java @@ -6,36 +6,48 @@ import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; +import gregtech.api.util.GT_Utility; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; -import static gregtech.api.enums.GT_Values.V; +import static com.github.technus.tectech.Util.V; /** * Created by danie_000 on 16.12.2016. */ public class GT_MetaTileEntity_Hatch_EnergyMulti extends GT_MetaTileEntity_Hatch { public final int Amperes; + public final int eTier; + public static ITexture[] overlay; + static{ + try { + overlay=(ITexture[]) GT_Utility.getField(Textures.BlockIcons.class,"OVERLAYS_ENERGY_IN_POWER").get(null); + }catch (IllegalAccessException | NullPointerException e){ + overlay = Textures.BlockIcons.OVERLAYS_ENERGY_IN_MULTI; + } + } public GT_MetaTileEntity_Hatch_EnergyMulti(int aID, String aName, String aNameRegional, int aTier, int aAmp) { super(aID, aName, aNameRegional, aTier, 0, "Multiple Ampere Energy Injector for Multiblocks"); Amperes = aAmp; + eTier=aTier; } public GT_MetaTileEntity_Hatch_EnergyMulti(String aName, int aTier, int aAmp, String aDescription, ITexture[][][] aTextures) { super(aName, aTier, 0, aDescription, aTextures); Amperes = aAmp; + eTier=aTier; } @Override public ITexture[] getTexturesActive(ITexture aBaseTexture) { - return new ITexture[]{aBaseTexture, Textures.BlockIcons.OVERLAYS_ENERGY_IN_POWER[mTier]}; + return new ITexture[]{aBaseTexture, overlay[mTier]}; } @Override public ITexture[] getTexturesInactive(ITexture aBaseTexture) { - return new ITexture[]{aBaseTexture, Textures.BlockIcons.OVERLAYS_ENERGY_IN_POWER[mTier]}; + return new ITexture[]{aBaseTexture, overlay[mTier]}; } @Override @@ -70,17 +82,17 @@ public class GT_MetaTileEntity_Hatch_EnergyMulti extends GT_MetaTileEntity_Hatch @Override public long getMinimumStoredEU() { - return 512L * Amperes; + return 128L * Amperes; } @Override public long maxEUInput() { - return V[mTier]; + return V[eTier]; } @Override public long maxEUStore() { - return 512L + V[mTier] * 4L * Amperes; + return 512L + V[eTier] * 4L * Amperes; } @Override @@ -90,7 +102,7 @@ public class GT_MetaTileEntity_Hatch_EnergyMulti extends GT_MetaTileEntity_Hatch @Override public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_Hatch_EnergyMulti(mName, mTier, Amperes, mDescription, mTextures); + return new GT_MetaTileEntity_Hatch_EnergyMulti(mName, eTier, Amperes, mDescription, mTextures); } @Override diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_MultiblockBase_EM.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_MultiblockBase_EM.java index 56af7e045d..0018d5a0ac 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_MultiblockBase_EM.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_MultiblockBase_EM.java @@ -2,6 +2,7 @@ package com.github.technus.tectech.thing.metaTileEntity.multi; import com.github.technus.tectech.CommonValues; import com.github.technus.tectech.TecTech; +import com.github.technus.tectech.Util; import com.github.technus.tectech.auxiliary.TecTechConfig; import com.github.technus.tectech.elementalMatter.classes.cElementalDefinitionStack; import com.github.technus.tectech.elementalMatter.classes.cElementalInstanceStack; @@ -821,12 +822,12 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt //new Method public final int getMaxEnergyInputTier() { - return GT_Utility.getTier(maxEUinputMax); + return Util.getTier(maxEUinputMax); } //new Method public final int getMinEnergyInputTier() { - return GT_Utility.getTier(maxEUinputMin); + return Util.getTier(maxEUinputMin); } //new Method diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_DebugPowerGenerator.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_DebugPowerGenerator.java index 0d22b4861d..5b3c43d3bf 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_DebugPowerGenerator.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_DebugPowerGenerator.java @@ -1,6 +1,8 @@ package com.github.technus.tectech.thing.metaTileEntity.single; import com.github.technus.tectech.CommonValues; +import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_DynamoMulti; +import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_EnergyMulti; import com.github.technus.tectech.thing.metaTileEntity.single.gui.GT_Container_DebugPowerGenerator; import com.github.technus.tectech.thing.metaTileEntity.single.gui.GT_GUIContainer_DebugPowerGenerator; import cpw.mods.fml.relauncher.Side; @@ -48,7 +50,7 @@ public class GT_MetaTileEntity_DebugPowerGenerator extends GT_MetaTileEntity_Tie @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1], (aSide != this.getBaseMetaTileEntity().getFrontFacing()) ? (aActive?Textures.BlockIcons.OVERLAYS_ENERGY_OUT_POWER[mTier]:Textures.BlockIcons.OVERLAYS_ENERGY_IN_POWER[mTier]) : new GT_RenderedTexture(GENNY)}; + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1], (aSide != this.getBaseMetaTileEntity().getFrontFacing()) ? (aActive? GT_MetaTileEntity_Hatch_DynamoMulti.overlay[mTier]: GT_MetaTileEntity_Hatch_EnergyMulti.overlay[mTier]) : new GT_RenderedTexture(GENNY)}; } @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 eec32029cb..50774c53ca 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 @@ -53,7 +53,7 @@ public class GT_MetaTileEntity_DebugStructureWriter extends GT_MetaTileEntity_Ti @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1], (aSide != this.getBaseMetaTileEntity().getFrontFacing()) ? new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TELEPORTER_SIDES) : new GT_RenderedTexture(MARK)}; + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1], (aSide != this.getBaseMetaTileEntity().getFrontFacing()) ? new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TELEPORTER_ACTIVE) : new GT_RenderedTexture(MARK)}; } @Override diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/gui/GT_GUIContainer_DebugPowerGenerator.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/gui/GT_GUIContainer_DebugPowerGenerator.java index 98901f150b..6946e2320e 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/gui/GT_GUIContainer_DebugPowerGenerator.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/gui/GT_GUIContainer_DebugPowerGenerator.java @@ -1,12 +1,12 @@ package com.github.technus.tectech.thing.metaTileEntity.single.gui; +import com.github.technus.tectech.Util; import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.util.GT_Utility; import net.minecraft.entity.player.InventoryPlayer; +import static com.github.technus.tectech.Util.VN; import static gregtech.api.enums.GT_Values.RES_PATH_GUI; -import static gregtech.api.enums.GT_Values.VN; public class GT_GUIContainer_DebugPowerGenerator extends GT_GUIContainerMetaTile_Machine { public GT_GUIContainer_DebugPowerGenerator(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { @@ -18,7 +18,7 @@ public class GT_GUIContainer_DebugPowerGenerator extends GT_GUIContainerMetaTile if (this.mContainer != null) { GT_Container_DebugPowerGenerator dpg = (GT_Container_DebugPowerGenerator) mContainer; this.fontRendererObj.drawString("EUT: " + dpg.EUT, 46, 24, 16448255); - this.fontRendererObj.drawString("TIER: " + VN[GT_Utility.getTier(dpg.EUT<0?-dpg.EUT:dpg.EUT)], 46, 32, 16448255); + this.fontRendererObj.drawString("TIER: " + VN[Util.getTier(dpg.EUT<0?-dpg.EUT:dpg.EUT)], 46, 32, 16448255); this.fontRendererObj.drawString("AMP: " + dpg.AMP, 46, 40, 16448255); this.fontRendererObj.drawString("SUM: " + (long)dpg.AMP*dpg.EUT, 46, 48, 16448255); } |