Made amethyst tools and armour repairable

This commit is contained in:
Adubbz 2013-05-24 20:00:34 +10:00
parent bc57d5b1d9
commit 458c3507b1
6 changed files with 88 additions and 0 deletions

View file

@ -19,6 +19,19 @@ public class ArmorAmethyst extends ItemArmor implements IArmorTextureProvider
setCreativeTab(BiomesOPlenty.tabBiomesOPlenty);
}
@Override
public boolean getIsRepairable(ItemStack par1ItemStack, ItemStack par2ItemStack)
{
if (par2ItemStack.itemID == Items.miscItems.get().itemID && par2ItemStack.getItemDamage() == 2)
{
return true;
}
else
{
return false;
}
}
public String getArmorTextureFile(ItemStack par1) {
if(par1.itemID == Items.helmetAmethyst.get().itemID||par1.itemID == Items.chestplateAmethyst.get().itemID||par1.itemID == Items.bootsAmethyst.get().itemID){
return CommonProxy.ARMOR_AMETHYST1_PNG;

View file

@ -1,9 +1,11 @@
package biomesoplenty.items;
import biomesoplenty.BiomesOPlenty;
import biomesoplenty.api.Items;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.item.EnumToolMaterial;
import net.minecraft.item.ItemAxe;
import net.minecraft.item.ItemStack;
public class ItemBOPAxe extends ItemAxe
{
@ -16,6 +18,19 @@ public class ItemBOPAxe extends ItemAxe
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;
}
}
public void registerIcons(IconRegister iconRegister)
{
if(TextureID==0){ itemIcon = iconRegister.registerIcon("BiomesOPlenty:mudaxe"); }

View file

@ -1,9 +1,11 @@
package biomesoplenty.items;
import biomesoplenty.BiomesOPlenty;
import biomesoplenty.api.Items;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.item.EnumToolMaterial;
import net.minecraft.item.ItemHoe;
import net.minecraft.item.ItemStack;
public class ItemBOPHoe extends ItemHoe
{
@ -16,6 +18,19 @@ public class ItemBOPHoe extends ItemHoe
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;
}
}
public void registerIcons(IconRegister iconRegister)
{
if(TextureID==0){ itemIcon = iconRegister.registerIcon("BiomesOPlenty:mudhoe"); }

View file

@ -1,9 +1,11 @@
package biomesoplenty.items;
import biomesoplenty.BiomesOPlenty;
import biomesoplenty.api.Items;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.item.EnumToolMaterial;
import net.minecraft.item.ItemPickaxe;
import net.minecraft.item.ItemStack;
public class ItemBOPPickaxe extends ItemPickaxe
{
@ -16,6 +18,19 @@ public class ItemBOPPickaxe extends ItemPickaxe
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;
}
}
public void registerIcons(IconRegister iconRegister)
{
if(TextureID==0){ itemIcon = iconRegister.registerIcon("BiomesOPlenty:mudpickaxe"); }

View file

@ -1,9 +1,11 @@
package biomesoplenty.items;
import biomesoplenty.BiomesOPlenty;
import biomesoplenty.api.Items;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.item.EnumToolMaterial;
import net.minecraft.item.ItemSpade;
import net.minecraft.item.ItemStack;
public class ItemBOPSpade extends ItemSpade
{
@ -16,6 +18,19 @@ public class ItemBOPSpade extends ItemSpade
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;
}
}
public void registerIcons(IconRegister iconRegister)
{
if(TextureID==0){ itemIcon = iconRegister.registerIcon("BiomesOPlenty:mudshovel"); }

View file

@ -1,8 +1,10 @@
package biomesoplenty.items;
import biomesoplenty.BiomesOPlenty;
import biomesoplenty.api.Items;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.item.EnumToolMaterial;
import net.minecraft.item.ItemStack;
import net.minecraft.item.ItemSword;
public class ItemBOPSword extends ItemSword
@ -16,6 +18,19 @@ public class ItemBOPSword extends ItemSword
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;
}
}
public void registerIcons(IconRegister iconRegister)
{
if(TextureID==0){ itemIcon = iconRegister.registerIcon("BiomesOPlenty:mudsword"); }