diff options
author | Alkalus <draknyte1@hotmail.com> | 2018-04-08 16:13:26 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-08 16:13:26 +1000 |
commit | 6614f8e961edcf4f4dfe337b5ffe02e6b4ae3440 (patch) | |
tree | 53bb1b97c8302abf5204d980239a1ef18af18b99 /src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks2.java | |
parent | 31996894fd1dd04ef4850dbc470664c5766bffb8 (diff) | |
parent | c94c14f2fe9c7434ddc1b22a93d45e8b4aee5eb7 (diff) | |
download | GT5-Unofficial-6614f8e961edcf4f4dfe337b5ffe02e6b4ae3440.tar.gz GT5-Unofficial-6614f8e961edcf4f4dfe337b5ffe02e6b4ae3440.tar.bz2 GT5-Unofficial-6614f8e961edcf4f4dfe337b5ffe02e6b4ae3440.zip |
Merge pull request #244 from codewarrior0/power-substation-structure
Rewrite Power Sub-Station machine structure
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks2.java')
-rw-r--r-- | src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks2.java | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks2.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks2.java index 2f64b943b7..8dd52c7074 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks2.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks2.java @@ -1,5 +1,9 @@ package gtPlusPlus.xmod.gregtech.common.blocks; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.storage.GregtechMetaTileEntity_PowerSubStationController; +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; @@ -11,13 +15,33 @@ import gregtech.common.blocks.GT_Material_Casings; import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; import gtPlusPlus.xmod.gregtech.common.blocks.textures.CasingTextureHandler2; +import java.util.List; + public class GregtechMetaCasingBlocks2 extends GregtechMetaCasingBlocksAbstract { CasingTextureHandler2 TextureHandler = new CasingTextureHandler2(); + public static class GregtechMetaCasingItemBlocks2 extends GregtechMetaCasingItems { + + public GregtechMetaCasingItemBlocks2(Block par1) { + super(par1); + } + + @Override + public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean aF3_H) { + int meta = aStack.getItemDamage(); + int tier = GregtechMetaTileEntity_PowerSubStationController.getCellTier(field_150939_a, meta); + if (tier > 0) { + long capacity = GregtechMetaTileEntity_PowerSubStationController.getCapacityFromCellTier(tier); + aList.add("Energy Storage: " + GT_Utility.formatNumbers(capacity)); + } + super.addInformation(aStack, aPlayer, aList, aF3_H); + } + } + public GregtechMetaCasingBlocks2() { - super(GregtechMetaCasingItems.class, "gtplusplus.blockcasings.2", GT_Material_Casings.INSTANCE); + super(GregtechMetaCasingItemBlocks2.class, "gtplusplus.blockcasings.2", GT_Material_Casings.INSTANCE); for (byte i = 0; i < 16; i = (byte) (i + 1)) { TAE.registerTextures(new GT_CopiedBlockTexture(this, 6, i)); } @@ -28,7 +52,7 @@ extends GregtechMetaCasingBlocksAbstract { GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".4.name", "Wash Plant Casing"); GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".5.name", "Industrial Sieve Casing"); GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".6.name", "Large Sieve Grate"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".7.name", "Vanadium Redox Power Cell"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".7.name", "Vanadium Redox Power Cell (EV)"); GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".8.name", "Sub-Station External Casing"); GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".9.name", "Cyclotron Coil"); GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".10.name", "Cyclotron Outer Casing"); |