BiomesOPlenty/common/biomesoplenty/itemblocks/ItemBlockColorizedLeaves.java
2013-09-13 16:44:22 +10:00

30 lines
692 B
Java

package biomesoplenty.itemblocks;
import net.minecraft.block.Block;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import biomesoplenty.blocks.BlockBOPColorizedLeaves;
public class ItemBlockColorizedLeaves extends ItemBlock
{
public ItemBlockColorizedLeaves(int par1)
{
super(par1);
setMaxDamage(0);
setHasSubtypes(true);
}
@Override
public int getMetadata(int meta)
{
return meta;
}
@Override
public String getUnlocalizedName(ItemStack itemStack)
{
BlockBOPColorizedLeaves block = (BlockBOPColorizedLeaves)Block.blocksList[itemStack.itemID];
return super.getUnlocalizedName() + "." + block.getLeafType(itemStack.getItemDamage());
}
}