BiomesOPlenty/src/minecraft/biomesoplenty/items/ItemBOPLog.java

30 lines
598 B
Java
Raw Normal View History

2013-05-03 13:00:44 +00:00
package biomesoplenty.items;
import net.minecraft.block.Block;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import biomesoplenty.blocks.BlockBOPLog;
public class ItemBOPLog extends ItemBlock
{
2013-05-31 10:34:02 +00:00
public ItemBOPLog(int par1)
{
super(par1);
setMaxDamage(0);
setHasSubtypes(true);
}
2013-05-03 13:00:44 +00:00
2013-05-31 10:34:02 +00:00
@Override
public int getMetadata(int meta)
{
return meta & 3;
}
@Override
public String getUnlocalizedName(ItemStack itemStack)
{
BlockBOPLog block = (BlockBOPLog)Block.blocksList[itemStack.itemID];
return block.getWoodType(itemStack.getItemDamage()) + "Wood";
}
2013-05-03 13:00:44 +00:00
}