001    package net.minecraft.src;
002    
003    import cpw.mods.fml.common.Side;
004    import cpw.mods.fml.common.asm.SideOnly;
005    
006    public class ItemCloth extends ItemBlock
007    {
008        public ItemCloth(int par1)
009        {
010            super(par1);
011            this.setMaxDamage(0);
012            this.setHasSubtypes(true);
013        }
014    
015        @SideOnly(Side.CLIENT)
016    
017        /**
018         * Gets an icon index based on an item's damage value
019         */
020        public int getIconFromDamage(int par1)
021        {
022            return Block.cloth.getBlockTextureFromSideAndMetadata(2, BlockCloth.getBlockFromDye(par1));
023        }
024    
025        /**
026         * Returns the metadata of the block which this Item (ItemBlock) can place
027         */
028        public int getMetadata(int par1)
029        {
030            return par1;
031        }
032    
033        public String getItemNameIS(ItemStack par1ItemStack)
034        {
035            return super.getItemName() + "." + ItemDye.dyeColorNames[BlockCloth.getBlockFromDye(par1ItemStack.getItemDamage())];
036        }
037    }