2013-05-03 13:00:44 +00:00
|
|
|
package biomesoplenty.items;
|
|
|
|
|
|
|
|
import net.minecraft.client.renderer.texture.IconRegister;
|
|
|
|
import net.minecraft.item.EnumToolMaterial;
|
|
|
|
import net.minecraft.item.ItemPickaxe;
|
2013-05-24 10:00:34 +00:00
|
|
|
import net.minecraft.item.ItemStack;
|
2013-05-29 01:05:27 +00:00
|
|
|
import biomesoplenty.BiomesOPlenty;
|
|
|
|
import biomesoplenty.api.Items;
|
2013-05-03 13:00:44 +00:00
|
|
|
|
|
|
|
public class ItemBOPPickaxe extends ItemPickaxe
|
|
|
|
{
|
2013-06-18 08:59:00 +00:00
|
|
|
public int textureID = 0;
|
2013-05-31 10:34:02 +00:00
|
|
|
|
2013-05-03 13:00:44 +00:00
|
|
|
public ItemBOPPickaxe(int par1, EnumToolMaterial par2, int texture)
|
|
|
|
{
|
|
|
|
super(par1, par2);
|
2013-06-18 08:59:00 +00:00
|
|
|
textureID = texture;
|
2013-05-03 13:00:44 +00:00
|
|
|
setCreativeTab(BiomesOPlenty.tabBiomesOPlenty);
|
|
|
|
}
|
2013-05-31 10:34:02 +00:00
|
|
|
|
2013-05-24 10:00:34 +00:00
|
|
|
@Override
|
2013-05-31 10:34:02 +00:00
|
|
|
public boolean getIsRepairable(ItemStack par1ItemStack, ItemStack par2ItemStack)
|
|
|
|
{
|
2013-06-18 08:59:00 +00:00
|
|
|
if (textureID == 1 && par2ItemStack.itemID == Items.miscItems.get().itemID && par2ItemStack.getItemDamage() == 2)
|
|
|
|
{
|
2013-05-24 10:00:34 +00:00
|
|
|
return true;
|
2013-06-18 08:59:00 +00:00
|
|
|
}
|
2013-05-24 10:00:34 +00:00
|
|
|
else
|
2013-06-18 08:59:00 +00:00
|
|
|
{
|
2013-05-24 10:00:34 +00:00
|
|
|
return false;
|
2013-06-18 08:59:00 +00:00
|
|
|
}
|
2013-05-31 10:34:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2013-05-03 13:00:44 +00:00
|
|
|
public void registerIcons(IconRegister iconRegister)
|
|
|
|
{
|
2013-06-18 08:59:00 +00:00
|
|
|
if (textureID == 0)
|
|
|
|
{
|
2013-07-03 06:01:28 +00:00
|
|
|
itemIcon = iconRegister.registerIcon("biomesoplenty:mudpickaxe");
|
2013-06-18 08:59:00 +00:00
|
|
|
}
|
|
|
|
else if (textureID == 1)
|
|
|
|
{
|
2013-07-03 06:01:28 +00:00
|
|
|
itemIcon = iconRegister.registerIcon("biomesoplenty:amethystpickaxe");
|
2013-06-18 08:59:00 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2013-07-03 06:01:28 +00:00
|
|
|
itemIcon = iconRegister.registerIcon("biomesoplenty:mudball");
|
2013-06-18 08:59:00 +00:00
|
|
|
}
|
2013-05-03 13:00:44 +00:00
|
|
|
}
|
|
|
|
}
|