package common.item;

import common.block.Block;
import common.color.TextColor;

public class ItemTNT extends ItemBlock
{
	private static final String[] TIERS = new String[] {"II", "III", "IV", "V", "VI", "VII", "VIII"};
	
    public ItemTNT(Block block)
    {
        super(block);
        this.setMaxDamage(0);
        this.setHasSubtypes(true);
        this.setColor(TextColor.RED);
    }
    
    public int getMetadata(int damage)
    {
        return (damage & 7) << 1;
    }
    
    public String getDisplay(ItemStack stack)
    {
    	int exp = stack.getMetadata() & 7;
        return super.getDisplay(stack) + (exp == 0 ? "" : " " + TIERS[exp-1]);
    }
}
