package projectzombie.items;

import projectzombie.init.Items;
import projectzombie.init.Models;
import projectzombie.items.modifier.ItemModifierMeta;
import projectzombie.model.ModelItem;
import projectzombie.util.ItemStack;

public class ItemOre extends Item implements ItemSmeltable
{

	@Override
	public ModelItem getModel(ItemStack stack)
	{
		switch(ItemModifierMeta.getStackMeta(stack))
		{
		case 0: return Models.ITEM_ORE_IRON;
		case 1: return Models.ITEM_ORE_COPPER;
		case 2: return Models.ITEM_ORE_TIN;
		case 3: return Models.ITEM_ORE_GOLD;
		default: return Models.ITEM_MISSING;
		}
	}

	@Override
	public String getName(ItemStack stack)
	{
		switch(ItemModifierMeta.getStackMeta(stack))
		{
		case 0: return "Iron Ore";
		case 1: return "Copper Ore";
		case 2: return "Tin Ore";
		case 3: return "Gold Ore";
		default: return "Ore";
		}
	}

	@Override
	public ItemStack[] getSmeltProducts(ItemStack stack) {
		return new ItemStack[] {
				new ItemStack(Items.METAL, 1, stack.modifiers.clone()),
		};
	}

}
