BiomesOPlenty/common/biomesoplenty/itemblocks/ItemBlockColorizedLeaves.java

31 lines
692 B
Java
Raw Normal View History

2013-07-03 07:51:39 +00:00
package biomesoplenty.itemblocks;
2013-05-03 13:00:44 +00:00
import net.minecraft.block.Block;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import biomesoplenty.blocks.BlockBOPColorizedLeaves;
2013-07-03 07:51:39 +00:00
public class ItemBlockColorizedLeaves extends ItemBlock
2013-05-03 13:00:44 +00:00
{
2013-07-03 07:51:39 +00:00
public ItemBlockColorizedLeaves(int par1)
2013-05-31 10:34:02 +00:00
{
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];
2013-06-09 05:47:52 +00:00
2013-06-09 00:39:12 +00:00
return super.getUnlocalizedName() + "." + block.getLeafType(itemStack.getItemDamage());
2013-05-31 10:34:02 +00:00
}
2013-05-03 13:00:44 +00:00
}