1 package net.minecraft.src.ChemiCraft;
5 import cpw.mods.fml.common.Side;
6 import cpw.mods.fml.common.asm.SideOnly;
7 import net.minecraft.src.CreativeTabs;
8 import net.minecraft.src.Item;
9 import net.minecraft.src.ItemStack;
11 public class ItemCompounds extends Item {
13 public ItemCompounds(int par1) {
15 this.maxStackSize = 1;
16 this.setHasSubtypes(true);
18 this.setCreativeTab(CreativeTabs.tabMaterials);
21 @SideOnly(Side.CLIENT)
23 public void getSubItems(int par1, CreativeTabs par2CreativeTabs, List par3List)
25 for(int type = 0; type < ChemiCraftAPI.getCompoundsName().toArray().length; type++)
27 par3List.add(new ItemStack(par1, 1, type));
28 this.setIconIndex(type);
33 public String getItemNameIS(ItemStack par1ItemStack)
35 return super.getItemName() + "." + ChemiCraftAPI.getCompoundsName().toArray()[par1ItemStack.getItemDamage()];
39 public String getTextureFile()
41 this.isDefaultTexture = false;
42 return "/ChemiCraft/Compounds.png";
45 @SideOnly(Side.CLIENT)
47 public int getIconFromDamage(int par1)