public class ItemArmor extends Item
Modifier and Type | Class and Description |
---|---|
static class |
ItemArmor.ArmorMaterial |
Item.ToolMaterial
Modifier and Type | Field and Description |
---|---|
int |
armorType
Stores the armor type: 0 is helmet, 1 is plate, 2 is legs and 3 is boots
|
int |
damageReduceAmount
Holds the amount of damage that the armor reduces at full durability.
|
private static IBehaviorDispenseItem |
dispenserBehavior |
static java.lang.String[] |
EMPTY_SLOT_NAMES |
private ItemArmor.ArmorMaterial |
material
The EnumArmorMaterial used for this ItemArmor
|
private static int[] |
maxDamageArray
Holds the 'base' maxDamage that each armorType have.
|
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.
|
bFull3D, hasSubtypes, itemModifierUUID, itemRand, itemRegistry, maxStackSize
Constructor and Description |
---|
ItemArmor(ItemArmor.ArmorMaterial material,
int renderIndex,
int armorType) |
Modifier and Type | Method and Description |
---|---|
ItemArmor.ArmorMaterial |
getArmorMaterial()
Return the armor material for this armor item.
|
int |
getColor(ItemStack stack)
Return the color for the specified armor ItemStack.
|
int |
getColorFromItemStack(ItemStack stack,
int renderPass) |
boolean |
getIsRepairable(ItemStack toRepair,
ItemStack repair)
Return whether this item is repairable in an anvil.
|
int |
getItemEnchantability()
Return the enchantability factor of the item, most of the time is based on material.
|
boolean |
hasColor(ItemStack stack)
Return whether the specified armor ItemStack has a color.
|
ItemStack |
onItemRightClick(ItemStack itemStackIn,
World worldIn,
EntityPlayer playerIn)
Called whenever this item is equipped and the right mouse button is pressed.
|
void |
removeColor(ItemStack stack)
Remove the color from the specified armor ItemStack.
|
void |
setColor(ItemStack stack,
int color)
Sets the color of the specified armor ItemStack
|
addInformation, canHarvestBlock, canItemEditBlocks, getByNameOrId, getContainerItem, getCreativeTab, getHasSubtypes, getIdFromItem, getItemAttributeModifiers, getItemById, getItemFromBlock, getItemStackDisplayName, getItemStackLimit, getItemUseAction, getMaxDamage, getMaxItemUseDuration, getMetadata, getMovingObjectPositionFromPlayer, getPotionEffect, getRarity, getShareTag, getStrVsBlock, getSubItems, getUnlocalizedName, getUnlocalizedName, getUnlocalizedNameInefficiently, hasContainerItem, hasEffect, hitEntity, isDamageable, isFull3D, isItemTool, isMap, isPotionIngredient, itemInteractionForEntity, onBlockDestroyed, onCreated, onItemUse, onItemUseFinish, onPlayerStoppedUsing, onUpdate, registerItemBlock, registerItems, setContainerItem, setCreativeTab, setFull3D, setHasSubtypes, setMaxDamage, setMaxStackSize, setPotionEffect, setUnlocalizedName, shouldRotateAroundWhenRendering, updateItemStackNBT
private static final int[] maxDamageArray
public static final java.lang.String[] EMPTY_SLOT_NAMES
private static final IBehaviorDispenseItem dispenserBehavior
public final int armorType
public final int damageReduceAmount
public final int renderIndex
private final ItemArmor.ArmorMaterial material
public ItemArmor(ItemArmor.ArmorMaterial material, int renderIndex, int armorType)
public int getColorFromItemStack(ItemStack stack, int renderPass)
getColorFromItemStack
in class Item
public int getItemEnchantability()
getItemEnchantability
in class Item
public ItemArmor.ArmorMaterial getArmorMaterial()
public boolean hasColor(ItemStack stack)
public int getColor(ItemStack stack)
public void removeColor(ItemStack stack)
public void setColor(ItemStack stack, int color)
public boolean getIsRepairable(ItemStack toRepair, ItemStack repair)
getIsRepairable
in class Item
public ItemStack onItemRightClick(ItemStack itemStackIn, World worldIn, EntityPlayer playerIn)
onItemRightClick
in class Item