2013-05-03 13:00:44 +00:00
|
|
|
package biomesoplenty.armor;
|
|
|
|
|
|
|
|
import net.minecraft.client.renderer.texture.IconRegister;
|
2013-07-01 00:31:34 +00:00
|
|
|
import net.minecraft.entity.Entity;
|
2013-05-03 13:00:44 +00:00
|
|
|
import net.minecraft.item.EnumArmorMaterial;
|
|
|
|
import net.minecraft.item.ItemArmor;
|
|
|
|
import net.minecraft.item.ItemStack;
|
|
|
|
import biomesoplenty.BiomesOPlenty;
|
|
|
|
import biomesoplenty.api.Items;
|
|
|
|
|
2013-07-01 00:31:34 +00:00
|
|
|
public class ArmorAmethyst extends ItemArmor
|
2013-05-03 13:00:44 +00:00
|
|
|
{
|
|
|
|
public int textureID = 0;
|
2013-05-31 10:34:02 +00:00
|
|
|
|
2013-07-01 00:31:34 +00:00
|
|
|
public ArmorAmethyst(int par1, EnumArmorMaterial par2EnumArmorMaterial, int par3, int par4)
|
|
|
|
{
|
2013-05-03 13:00:44 +00:00
|
|
|
super(par1, par2EnumArmorMaterial, par3, par4);
|
|
|
|
textureID = par4;
|
|
|
|
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-05-24 10:00:34 +00:00
|
|
|
if (par2ItemStack.itemID == Items.miscItems.get().itemID && par2ItemStack.getItemDamage() == 2)
|
|
|
|
return true;
|
2013-07-01 00:31:34 +00:00
|
|
|
|
|
|
|
return false;
|
2013-05-31 10:34:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2013-07-01 00:31:34 +00:00
|
|
|
public String getArmorTexture(ItemStack stack, Entity entity, int slot, int layer)
|
|
|
|
{
|
|
|
|
if (stack.itemID == Items.helmetAmethyst.get().itemID || stack.itemID == Items.chestplateAmethyst.get().itemID || stack.itemID == Items.bootsAmethyst.get().itemID)
|
2013-07-03 06:01:28 +00:00
|
|
|
return "biomesoplenty:textures/armor/amethyst_1.png";
|
2013-07-01 00:31:34 +00:00
|
|
|
if (stack.itemID == Items.leggingsAmethyst.get().itemID)
|
2013-07-03 06:01:28 +00:00
|
|
|
return "biomesoplenty:textures/armor/amethyst_2.png";
|
2013-07-01 00:31:34 +00:00
|
|
|
|
2013-05-03 13:00:44 +00:00
|
|
|
return null;
|
|
|
|
}
|
2013-05-31 10:34:02 +00:00
|
|
|
|
|
|
|
@Override
|
2013-05-03 13:00:44 +00:00
|
|
|
public void registerIcons(IconRegister iconRegister)
|
|
|
|
{
|
2013-07-03 06:01:28 +00:00
|
|
|
if (textureID == 0) { itemIcon = iconRegister.registerIcon("biomesoplenty:amethysthelmet"); }
|
|
|
|
else if (textureID == 1) { itemIcon = iconRegister.registerIcon("biomesoplenty:amethystchestplate"); }
|
|
|
|
else if (textureID == 2) { itemIcon = iconRegister.registerIcon("biomesoplenty:amethystleggings"); }
|
|
|
|
else if (textureID == 3) { itemIcon = iconRegister.registerIcon("biomesoplenty:amethystboots"); }
|
|
|
|
else { itemIcon = iconRegister.registerIcon("biomesoplenty:mudball"); }
|
2013-05-03 13:00:44 +00:00
|
|
|
}
|
|
|
|
}
|