From 7ad96faa2158fc071ea546a9f4de9226c3ab4c5b Mon Sep 17 00:00:00 2001 From: Tntrololol Date: Fri, 22 May 2015 17:37:10 -0500 Subject: [PATCH] Added new storage blocks and textures --- .../java/techreborn/blocks/BlockStorage.java | 8 +- .../java/techreborn/blocks/BlockStorage2.java | 87 ++++++++++++++++++ src/main/java/techreborn/init/ModBlocks.java | 21 ++--- .../itemblocks/ItemBlockStorage.java | 2 +- .../itemblocks/ItemBlockStorage2.java | 16 ++++ .../assets/techreborn/lang/en_US.lang | 44 +++++---- .../{iridiumBlock.png => iridium_block.png} | Bin ...png => iridium_reinforced_stone_block.png} | Bin .../blocks/storage/lodestone_block.png | Bin 0 -> 1356 bytes .../textures/blocks/storage/nickel_block.png | Bin 0 -> 1313 bytes .../blocks/storage/tellurium_block.png | Bin 0 -> 1357 bytes 11 files changed, 140 insertions(+), 38 deletions(-) create mode 100644 src/main/java/techreborn/blocks/BlockStorage2.java create mode 100644 src/main/java/techreborn/itemblocks/ItemBlockStorage2.java rename src/main/resources/assets/techreborn/textures/blocks/storage/{iridiumBlock.png => iridium_block.png} (100%) rename src/main/resources/assets/techreborn/textures/blocks/storage/{iridium_reinforced_stone.png => iridium_reinforced_stone_block.png} (100%) create mode 100644 src/main/resources/assets/techreborn/textures/blocks/storage/lodestone_block.png create mode 100644 src/main/resources/assets/techreborn/textures/blocks/storage/nickel_block.png create mode 100644 src/main/resources/assets/techreborn/textures/blocks/storage/tellurium_block.png diff --git a/src/main/java/techreborn/blocks/BlockStorage.java b/src/main/java/techreborn/blocks/BlockStorage.java index f96bfa686..7dbd357c9 100644 --- a/src/main/java/techreborn/blocks/BlockStorage.java +++ b/src/main/java/techreborn/blocks/BlockStorage.java @@ -19,9 +19,9 @@ import cpw.mods.fml.relauncher.SideOnly; public class BlockStorage extends Block { public static final String[] types = new String[] - { "Silver", "Aluminium", "Titanium", "Sapphire", "Ruby", "GreenSapphire", - "Chrome", "Electrum", "Tungsten", "Lead", "Zinc", "Brass", "Steel", - "Platinum", "Nickel", "Invar", }; + { "silver", "aluminum", "titanium", "chrome", "steel", "brass", "lead", + "electrum", "zinc", "platinum", "tungsten", "nickel", "invar", "osmium", + "iridium" }; private IIcon[] textures; @@ -64,7 +64,7 @@ public class BlockStorage extends Block { for (int i = 0; i < types.length; i++) { textures[i] = iconRegister.registerIcon("techreborn:" - + "storage/storage" + types[i]); + + "storage/" + types[i] + "_block"); } } diff --git a/src/main/java/techreborn/blocks/BlockStorage2.java b/src/main/java/techreborn/blocks/BlockStorage2.java new file mode 100644 index 000000000..e82c4e092 --- /dev/null +++ b/src/main/java/techreborn/blocks/BlockStorage2.java @@ -0,0 +1,87 @@ +package techreborn.blocks; + +import java.util.List; +import java.util.Random; + +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import net.minecraft.util.MathHelper; +import net.minecraftforge.common.util.ForgeDirection; +import techreborn.client.TechRebornCreativeTabMisc; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class BlockStorage2 extends Block { + + public static final String[] types = new String[] + { "tungstensteel", "lodestone", "tellurium", "iridium_reinforced_tungstensteel", + "iridium_reinforced_stone", "ruby", "sapphire", "peridot", "yellow_garnet", "red_garnet" }; + + private IIcon[] textures; + + public BlockStorage2(Material material) + { + super(material); + setBlockName("techreborn.storage2"); + setCreativeTab(TechRebornCreativeTabMisc.instance); + setHardness(2f); + } + + @Override + public Item getItemDropped(int par1, Random random, int par2) + { + return Item.getItemFromBlock(this); + } + + @Override + @SideOnly(Side.CLIENT) + public void getSubBlocks(Item item, CreativeTabs creativeTabs, List list) + { + for (int meta = 0; meta < types.length; meta++) + { + list.add(new ItemStack(item, 1, meta)); + } + } + + @Override + public int damageDropped(int metaData) + { + return metaData; + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister iconRegister) + { + this.textures = new IIcon[types.length]; + + for (int i = 0; i < types.length; i++) + { + textures[i] = iconRegister.registerIcon("techreborn:" + + "storage/" + types[i] + "_block"); + } + } + + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(int side, int metaData) + { + metaData = MathHelper.clamp_int(metaData, 0, types.length - 1); + + if (ForgeDirection.getOrientation(side) == ForgeDirection.UP + || ForgeDirection.getOrientation(side) == ForgeDirection.DOWN) + { + return textures[metaData]; + } else + { + return textures[metaData]; + } + } + +} diff --git a/src/main/java/techreborn/init/ModBlocks.java b/src/main/java/techreborn/init/ModBlocks.java index 5f3348d29..8ff5b290a 100644 --- a/src/main/java/techreborn/init/ModBlocks.java +++ b/src/main/java/techreborn/init/ModBlocks.java @@ -5,20 +5,7 @@ import net.minecraft.block.material.Material; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; import net.minecraftforge.oredict.OreDictionary; -import techreborn.blocks.BlockChunkLoader; -import techreborn.blocks.BlockElectricCraftingTable; -import techreborn.blocks.BlockFusionCoil; -import techreborn.blocks.BlockFusionControlComputer; -import techreborn.blocks.BlockHighlyAdvancedMachine; -import techreborn.blocks.BlockMachineCasing; -import techreborn.blocks.BlockMachineFrame; -import techreborn.blocks.BlockMetalShelf; -import techreborn.blocks.BlockOre; -import techreborn.blocks.BlockQuantumChest; -import techreborn.blocks.BlockQuantumTank; -import techreborn.blocks.BlockStorage; -import techreborn.blocks.BlockSupercondensator; -import techreborn.blocks.BlockWoodenshelf; +import techreborn.blocks.*; import techreborn.blocks.generator.BlockDieselGenerator; import techreborn.blocks.generator.BlockDragonEggSiphoner; import techreborn.blocks.generator.BlockHeatGenerator; @@ -120,6 +107,7 @@ public class ModBlocks { public static Block ore; public static Block storage; + public static Block storage2; public static Block machineframe; public static void init(){ @@ -174,8 +162,11 @@ public class ModBlocks { ore = new BlockOre(Material.rock); GameRegistry.registerBlock(ore, ItemBlockOre.class, "techreborn.ore"); - storage = new BlockStorage(Material.rock); + storage = new BlockStorage(Material.iron); GameRegistry.registerBlock(storage, ItemBlockStorage.class, "techreborn.storage"); + + storage2 = new BlockStorage2(Material.iron); + GameRegistry.registerBlock(storage2, ItemBlockStorage2.class, "techreborn.storage2"); HighAdvancedMachineBlock = new BlockHighlyAdvancedMachine(Material.rock); GameRegistry.registerBlock(HighAdvancedMachineBlock, "highlyadvancedmachine"); diff --git a/src/main/java/techreborn/itemblocks/ItemBlockStorage.java b/src/main/java/techreborn/itemblocks/ItemBlockStorage.java index 7e335126d..b49dbfa0e 100644 --- a/src/main/java/techreborn/itemblocks/ItemBlockStorage.java +++ b/src/main/java/techreborn/itemblocks/ItemBlockStorage.java @@ -5,7 +5,7 @@ import net.minecraft.item.ItemMultiTexture; import techreborn.blocks.BlockStorage; import techreborn.init.ModBlocks; -public class ItemBlockStorage extends ItemMultiTexture { +public class ItemBlockStorage extends ItemBlockBase { public ItemBlockStorage(Block block) { diff --git a/src/main/java/techreborn/itemblocks/ItemBlockStorage2.java b/src/main/java/techreborn/itemblocks/ItemBlockStorage2.java new file mode 100644 index 000000000..603b966c3 --- /dev/null +++ b/src/main/java/techreborn/itemblocks/ItemBlockStorage2.java @@ -0,0 +1,16 @@ +package techreborn.itemblocks; + +import net.minecraft.block.Block; +import net.minecraft.item.ItemMultiTexture; +import techreborn.blocks.BlockStorage2; +import techreborn.init.ModBlocks; + +public class ItemBlockStorage2 extends ItemBlockBase { + + public ItemBlockStorage2(Block block) + { + super(ModBlocks.storage2, ModBlocks.storage2, BlockStorage2.types); + } + +} + diff --git a/src/main/resources/assets/techreborn/lang/en_US.lang b/src/main/resources/assets/techreborn/lang/en_US.lang index a2e1feed4..e2601b051 100644 --- a/src/main/resources/assets/techreborn/lang/en_US.lang +++ b/src/main/resources/assets/techreborn/lang/en_US.lang @@ -71,22 +71,32 @@ tile.techreborn.ore.Silver.name=Silver Ore #Storage -tile.techreborn.storage.Silver.name=Block of Silver -tile.techreborn.storage.Aluminium.name=Block of Aluminium -tile.techreborn.storage.Titanium.name=Block of Titanium -tile.techreborn.storage.Sapphire.name=Block of Sapphire -tile.techreborn.storage.Ruby.name=Block of Ruby -tile.techreborn.storage.GreenSapphire.name=Block of Peridot -tile.techreborn.storage.Chrome.name=Block of Chrome -tile.techreborn.storage.Electrum.name=Block of Electrum -tile.techreborn.storage.Lead.name=Block of Lead -tile.techreborn.storage.Zinc.name=Block of Zinc -tile.techreborn.storage.Brass.name=Block of Brass -tile.techreborn.storage.Steel.name=Block of Steel -tile.techreborn.storage.Platinum.name=Block of Platinum -tile.techreborn.storage.Nickel.name=Block of Nickel -tile.techreborn.storage.Invar.name=Block of Invar -tile.techreborn.storage.Tungsten.name=Block of Tungsten +tile.techreborn.storage.silver.name=Block of Silver +tile.techreborn.storage.aluminum.name=Block of Aluminum +tile.techreborn.storage.titanium.name=Block of Titanium +tile.techreborn.storage.chrome.name=Block of Chrome +tile.techreborn.storage.steel.name=Block of Steel +tile.techreborn.storage.brass.name=Block of Brass +tile.techreborn.storage.lead.name=Block of Lead +tile.techreborn.storage.electrum.name=Block of Electrum +tile.techreborn.storage.zinc.name=Block of Zinc +tile.techreborn.storage.platinum.name=Block of Platinum +tile.techreborn.storage.tungsten.name=Block of Tungsten +tile.techreborn.storage.nickel.name=Block of Nickel +tile.techreborn.storage.invar.name=Block of Invar +tile.techreborn.storage.osmium.name=Block of Osmium +tile.techreborn.storage.iridium.name=Block of Iridium +tile.techreborn.storage2.tungstensteel.name=Block of Tungstensteel +tile.techreborn.storage2.lodestone.name=Block of Lodestone +tile.techreborn.storage2.tellurium.name=Block of Tellurium +tile.techreborn.storage2.iridium_reinforced_tungstensteel.name=Iridium Reinforced Tungstensteel Block +tile.techreborn.storage2.iridium_reinforced_stone.name=Iridium Reinforced Stone +tile.techreborn.storage2.ruby.name=Block of Ruby +tile.techreborn.storage2.sapphire.name=Block of Sapphire +tile.techreborn.storage2.peridot.name=Block of Peridot +tile.techreborn.storage2.yellow_garnet.name=Block of Yellow Garnet +tile.techreborn.storage2.red_garnet.name=Block of Red Garnet + #Fluids tile.techreborn.berylium.name=Berylium Source @@ -747,5 +757,3 @@ config.techreborn.category.general=General Configs config.techreborn.category.world=World Configs config.techreborn.category.power=Power Configs config.techreborn.category.crafting=Crafting Configs - - diff --git a/src/main/resources/assets/techreborn/textures/blocks/storage/iridiumBlock.png b/src/main/resources/assets/techreborn/textures/blocks/storage/iridium_block.png similarity index 100% rename from src/main/resources/assets/techreborn/textures/blocks/storage/iridiumBlock.png rename to src/main/resources/assets/techreborn/textures/blocks/storage/iridium_block.png diff --git a/src/main/resources/assets/techreborn/textures/blocks/storage/iridium_reinforced_stone.png b/src/main/resources/assets/techreborn/textures/blocks/storage/iridium_reinforced_stone_block.png similarity index 100% rename from src/main/resources/assets/techreborn/textures/blocks/storage/iridium_reinforced_stone.png rename to src/main/resources/assets/techreborn/textures/blocks/storage/iridium_reinforced_stone_block.png diff --git a/src/main/resources/assets/techreborn/textures/blocks/storage/lodestone_block.png b/src/main/resources/assets/techreborn/textures/blocks/storage/lodestone_block.png new file mode 100644 index 0000000000000000000000000000000000000000..6f1beed244db2c39a5fb09c224602a2f0c6d4db3 GIT binary patch literal 1356 zcmbVMZEVzJ9PdzIIT#xxvgv%OB>_g(YkSvwY27()*Bd+FZsT@_4F&17&+W?AmutIS zH=+p|)Ip*wTui28351zoWPTt*bXi20GxKGLl9`MI6ay2NFf`6#FzR#LZu)`n!6xnV z_WS+*FVFwq&br8^0^1`t1VIWyHCz;qMcFrh5&RzNO1k0juo-MH>(zvr=5>JhMKuo4 zkjyuMDB#8R)Cj0RkOxvytifyuZ)F8lw)0tx-I6uPMv#h1OXG!RV4`u*Bq=^@YT#oG zl|&!5-4!OoS^y-anhqV*cSK@BN3+0)Smo1bg~dVv8JIk3$t{Y(T0U%6mxc4}Hi4nD z5VP5b%{kQ&u0sQ=4p5ifg$tyELOqO~a?uP$m7@-lauO6tI2fFwSlYu^pfz1g zuu-mh-WFW>u%u~fEJ38xX?xmfSM?@>Vi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Vb*1al{|FNjipND>L6G^7TGdJ_u)rGOV;^onDc`|;0y|Hvr`h0gq)n(^}{zHWiq*o5#e{}ooamU0TduE`f W`uCo?;^+$6Kdo@6E;#OQdF~&CRK=PA literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/techreborn/textures/blocks/storage/tellurium_block.png b/src/main/resources/assets/techreborn/textures/blocks/storage/tellurium_block.png new file mode 100644 index 0000000000000000000000000000000000000000..bf63cb9b0db2abd39d8498cb64cb4103b924f0c4 GIT binary patch literal 1357 zcmbVMZA{!`951rX1xL2UM29j{%3fry*O%+PwBC)u^=_Q=5RP-4$ztra&v6ac_GruQ zAlsQOBh18Q5?B=GKqbqPjcw5_4xNM;MDddh6LIcECs7A{FlHu$EE_%t9QuLmgH77! z?f3irU!MQJZ&g+9%FlZy4?&Q8e+3_eAY0ObR+c$|NlU zP`@J7fglj1riO2U3qf)lQE2ZPph zDar+T-=ZzJa$_;mOmGB|OeQT!t3}i62#RG{f}{zW#vuYXnp9Ir;i^%bRp5ak>T<%A zH5JV$3K6Z*bYsxdg%FfPAh0B?8jFd7DI-!sf}kuUp(vTS=Fx^31pm6REZPV)B>)iw zhSsQy@IIo&Su)JsqYY(%&>QX*U51w;#Cc6@RDf#wc{c`6ERrm74#qA<98rKffz62v zBqQJviXm}pl#(Qo5lO}lvO3H0J$4^&vy!CO>Tyt%*XpEwjMGtGMzaiAR?a)KT)%3V zf+~WnZ5i60=h8mkBe|SM2ZE{TAx(>CtDq{TnVJ#P5~#<6K3^-Vl9n_|GB>mkFb{Nj zACP>yrl9jF=Hz9}OHn}-A`uD~=%@o{?2Lr7A`G2jSexXq+noZ*VvBs~|E7+BP7#?p z`A^+sw_q`5rb}G_7fXEvRMxUc2hwo}293 z^ho!2r(alE((yLf(Q|emce3!W&$nLa+jDj}a(nxY^&RK86wck9{bkjUaeIGk;^~7& z4jSIIk9SPWq+HJa{X;?Z@`)9zrzW?cN2gAVRC-E2VvIY)-=p~Z@(+zCJNFFa%-RQp z!-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