BiomesOPlenty/src/minecraft/biomesoplenty/items/ItemBOPSpade.java
2013-05-31 20:34:02 +10:00

37 lines
1.1 KiB
Java

package biomesoplenty.items;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.item.EnumToolMaterial;
import net.minecraft.item.ItemSpade;
import net.minecraft.item.ItemStack;
import biomesoplenty.BiomesOPlenty;
import biomesoplenty.api.Items;
public class ItemBOPSpade extends ItemSpade
{
public int TextureID = 0;
public ItemBOPSpade(int par1, EnumToolMaterial par2, int texture)
{
super(par1, par2);
TextureID = texture;
setCreativeTab(BiomesOPlenty.tabBiomesOPlenty);
}
@Override
public boolean getIsRepairable(ItemStack par1ItemStack, ItemStack par2ItemStack)
{
if (TextureID == 1 && par2ItemStack.itemID == Items.miscItems.get().itemID && par2ItemStack.getItemDamage() == 2)
return true;
else
return false;
}
@Override
public void registerIcons(IconRegister iconRegister)
{
if(TextureID==0){ itemIcon = iconRegister.registerIcon("BiomesOPlenty:mudshovel"); }
else if(TextureID==1){ itemIcon = iconRegister.registerIcon("BiomesOPlenty:amethystshovel"); }
else { itemIcon = iconRegister.registerIcon("BiomesOPlenty:mudball"); }
}
}