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/GregtechMetaCasingBlocks3.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/GregtechMetaCasingBlocks3.java')
-rw-r--r-- | src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks3.java | 46 |
1 files changed, 35 insertions, 11 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks3.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks3.java index f05686bcfa..0ea26debe4 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks3.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks3.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.CasingTextureHandler3; +import java.util.List; + public class GregtechMetaCasingBlocks3 extends GregtechMetaCasingBlocksAbstract { CasingTextureHandler3 TextureHandler = new CasingTextureHandler3(); + public static class GregtechMetaCasingItemBlocks3 extends GregtechMetaCasingItems { + + public GregtechMetaCasingItemBlocks3(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 GregtechMetaCasingBlocks3() { - super(GregtechMetaCasingItems.class, "gtplusplus.blockcasings.3", GT_Material_Casings.INSTANCE); + super(GregtechMetaCasingItemBlocks3.class, "gtplusplus.blockcasings.3", GT_Material_Casings.INSTANCE); for (byte i = 0; i < 16; i = (byte) (i + 1)) { TAE.registerTextures(new GT_CopiedBlockTexture(this, 6, i)); } @@ -25,11 +49,11 @@ extends GregtechMetaCasingBlocksAbstract { GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".1.name", "Inconel Reinforced Casing"); GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".2.name", "Multi-Use Casing"); GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".3.name", "Trinium Plated Mining Platform Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".4.name", "Placeholder"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".5.name", "Placeholder"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".6.name", "Placeholder"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".7.name", "Placeholder");; - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".8.name", "Placeholder"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".4.name", "Vanadium Redox Power Cell (IV)"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".5.name", "Vanadium Redox Power Cell (LuV)"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".6.name", "Vanadium Redox Power Cell (ZPM)"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".7.name", "Vanadium Redox Power Cell (UV)");; + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".8.name", "Vanadium Redox Power Cell (MAX)"); GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".9.name", "Supply Depot Casing"); GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".10.name", "Placeholder"); GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".11.name", "Placeholder"); @@ -41,11 +65,11 @@ extends GregtechMetaCasingBlocksAbstract { GregtechItemList.Casing_Extruder.set(new ItemStack(this, 1, 1)); GregtechItemList.Casing_Multi_Use.set(new ItemStack(this, 1, 2)); GregtechItemList.Casing_BedrockMiner.set(new ItemStack(this, 1, 3)); - //GregtechItemList.Casing_WashPlant.set(new ItemStack(this, 1, 4)); - //GregtechItemList.Casing_Sifter.set(new ItemStack(this, 1, 5)); - //GregtechItemList.Casing_SifterGrate.set(new ItemStack(this, 1, 6)); - //GregtechItemList.Casing_Vanadium_Redox.set(new ItemStack(this, 1, 7)); - //GregtechItemList.Casing_Power_SubStation.set(new ItemStack(this, 1, 8)); + GregtechItemList.Casing_Vanadium_Redox_IV.set(new ItemStack(this, 1, 4)); + GregtechItemList.Casing_Vanadium_Redox_LuV.set(new ItemStack(this, 1, 5)); + GregtechItemList.Casing_Vanadium_Redox_ZPM.set(new ItemStack(this, 1, 6)); + GregtechItemList.Casing_Vanadium_Redox_UV.set(new ItemStack(this, 1, 7)); + GregtechItemList.Casing_Vanadium_Redox_MAX.set(new ItemStack(this, 1, 8)); GregtechItemList.Casing_AmazonWarehouse.set(new ItemStack(this, 1, 9)); //GregtechItemList.Casing_Cyclotron_External.set(new ItemStack(this, 1, 10)); //GregtechItemList.Casing_ThermalContainment.set(new ItemStack(this, 1, 11)); |