package WayofTime.bloodmagic.item.block.base;

import WayofTime.bloodmagic.block.base.BlockInteger;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;

public class ItemBlockInteger extends ItemBlock {

    public ItemBlockInteger(BlockInteger block) {
        super(block);

        if (block.getMaxMeta() > 1)
            setHasSubtypes(true);
    }

    @SuppressWarnings("unchecked")
    @Override
    public BlockInteger getBlock() {
        return (BlockInteger) super.getBlock();
    }

    @Override
    public String getUnlocalizedName(ItemStack stack) {
        return getBlock().getUnlocalizedName() + "." + stack.getItemDamage();
    }

    @Override
    public int getMetadata(int damage) {
        return damage;
    }
}
