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.
|
static java.lang.String[] |
EMPTY_SLOT_NAMES |
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, canRepair, delegate, 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, canHarvestBlock, canItemEditBlocks, createEntity, doesSneakBypassUse, getArmorModel, getArmorModel, getArmorTexture, getAttributeModifiers, getByNameOrId, getChestGenBase, getContainerItem, getContainerItem, getCreativeTab, getCreativeTabs, getDamage, getDigSpeed, getDurabilityForDisplay, getEntityLifespan, getFontRenderer, getHarvestLevel, getHasSubtypes, getHighlightTip, getIdFromItem, getItemAttributeModifiers, getItemById, getItemEnchantability, getItemFromBlock, getItemStackDisplayName, getItemStackLimit, getItemStackLimit, getItemUseAction, getMaxDamage, getMaxDamage, getMaxItemUseDuration, getMetadata, getMetadata, getModel, getMovingObjectPositionFromPlayer, getPotionEffect, getRarity, getRegistryName, getShareTag, getSmeltingExperience, getStrVsBlock, getSubItems, getToolClasses, getUnlocalizedName, getUnlocalizedName, getUnlocalizedNameInefficiently, hasContainerItem, hasContainerItem, hasCustomEntity, hasEffect, hitEntity, initCapabilities, isBeaconPayment, isBookEnchantable, isDamageable, isDamaged, isFull3D, isItemTool, isMap, isPotionIngredient, isRepairable, isValidArmor, itemInteractionForEntity, onArmorTick, onBlockDestroyed, onBlockStartBreak, onCreated, onDroppedByPlayer, onEntityItemUpdate, onEntitySwing, onItemUse, onItemUseFinish, onItemUseFirst, onLeftClickEntity, onPlayerStoppedUsing, onUpdate, onUsingTick, registerItemBlock, registerItems, renderHelmetOverlay, setContainerItem, setCreativeTab, setDamage, setFull3D, setHarvestLevel, setHasSubtypes, setMaxDamage, setMaxStackSize, setNoRepair, setPotionEffect, setRegistryName, setRegistryName, setRegistryName, setUnlocalizedName, shouldCauseReequipAnimation, shouldRotateAroundWhenRendering, showDurabilityBar, updateItemStackNBT
public static final java.lang.String[] EMPTY_SLOT_NAMES
public final int armorType
public final int damageReduceAmount
public final int renderIndex
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