Class ItemArmor

java.lang.Object
net.minecraft.src.Item
net.minecraft.src.ItemArmor
Direct Known Subclasses:
ArmorItem

public class ItemArmor extends Item
  • Field Details

    • field_94603_a

      public static final String[] field_94603_a
    • armorType

      public final int armorType
      Stores the armor type: 0 is helmet, 1 is plate, 2 is legs and 3 is boots
    • damageReduceAmount

      public int damageReduceAmount
      Holds the amount of damage that the armor reduces at full durability.
    • renderIndex

      public final int renderIndex
      Used on RenderPlayer to select the correspondent armor to be rendered on the player: 0 is cloth, 1 is chain, 2 is iron, 3 is diamond and 4 is gold.
  • Constructor Details

    • ItemArmor

      public ItemArmor(int par1, EnumArmorMaterial par2EnumArmorMaterial, int par3, int par4)
  • Method Details

    • getColorFromItemStack

      public int getColorFromItemStack(ItemStack par1ItemStack, int par2)
      Overrides:
      getColorFromItemStack in class Item
    • requiresMultipleRenderPasses

      public boolean requiresMultipleRenderPasses()
      Overrides:
      requiresMultipleRenderPasses in class Item
    • getItemEnchantability

      public int getItemEnchantability()
      Return the enchantability factor of the item, most of the time is based on material.
      Overrides:
      getItemEnchantability in class Item
    • getArmorMaterial

      public EnumArmorMaterial getArmorMaterial()
      Return the armor material for this armor item.
    • hasColor

      public boolean hasColor(ItemStack par1ItemStack)
      Return whether the specified armor ItemStack has a color.
    • getColor

      public int getColor(ItemStack par1ItemStack)
      Return the color for the specified armor ItemStack.
    • getIconFromDamageForRenderPass

      public Icon getIconFromDamageForRenderPass(int par1, int par2)
      Gets an icon index based on an item's damage value and the given render pass
      Overrides:
      getIconFromDamageForRenderPass in class Item
    • removeColor

      public void removeColor(ItemStack par1ItemStack)
      Remove the color from the specified armor ItemStack.
    • func_82813_b

      public void func_82813_b(ItemStack par1ItemStack, int par2)
    • getIsRepairable

      public boolean getIsRepairable(ItemStack par1ItemStack, ItemStack par2ItemStack)
      Return whether this item is repairable in an anvil.
      Overrides:
      getIsRepairable in class Item
    • registerIcons

      public void registerIcons(IconRegister par1IconRegister)
      Overrides:
      registerIcons in class Item
    • onItemRightClick

      public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
      Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer
      Overrides:
      onItemRightClick in class Item
    • func_94602_b

      public static Icon func_94602_b(int par0)
    • isEnchantmentApplicable

      public boolean isEnchantmentApplicable(Enchantment enchantment)
      Overrides:
      isEnchantmentApplicable in class Item