/*
 * Copyright (c) 2014 Silas Otoko.
 *
 * This program is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 3 of the License, or (at your option) any
 * later version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT ANY
 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
 * PARTICULAR PURPOSE. See the GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program; if not, see <http://www.gnu.org/licenses>.
 */

package runes.Runes.Items;

import net.minecraft.client.main.Main;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.entity.Entity;
import net.minecraft.item.EnumArmorMaterial;
import net.minecraft.item.ItemArmor;
import net.minecraft.item.ItemStack;
import runes.Runes.RunesAndSilver;
import runes.Runes.Init.ModItems;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;

public class SilverBoots extends ItemArmor {
	public SilverBoots(int ItemID, EnumArmorMaterial material, int i, int j){
		super(ItemID, material, i, j);
		this.setCreativeTab(RunesAndSilver.tabRunesMod);
		this.setUnlocalizedName("SilverBoots");
	}
	
	

	@Override
	public String getArmorTexture(ItemStack par1, Entity entity, int slot, int layer) {
		if(itemID == ModItems.SilverBoots.itemID){
			return RunesAndSilver.modid + ":textures/armor/SilverArmor.png";
		}
	else return null;
	}

	@SideOnly(Side.CLIENT)
	public void registerIcons(IconRegister reg) { // Make sure to import IconRegister!
		 {
		this.itemIcon = reg.registerIcon(RunesAndSilver.modid + ":" + (this.getUnlocalizedName().substring(5)));
}
	}
	
	public boolean getIsRepairable(ItemStack par1ItemStack, ItemStack par2ItemStack) {
	      return ModItems.SilverIngot.itemID == par2ItemStack.itemID ? true : super.getIsRepairable(par1ItemStack, par2ItemStack);
	   }
}