public class ItemArmor extends Item
Modifier and Type | Class and Description |
---|---|
static class |
ItemArmor.ArmorMaterial |
Item.ToolMaterial
IForgeRegistryEntry.Impl<T extends IForgeRegistryEntry<T>>
Modifier and Type | Field and Description |
---|---|
EntityEquipmentSlot |
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 IBehaviorDispenseItem |
DISPENSER_BEHAVIOR |
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.
|
float |
toughness |
ATTACK_DAMAGE_MODIFIER, ATTACK_SPEED_MODIFIER, bFull3D, canRepair, hasSubtypes, itemRand, maxStackSize, REGISTRY
delegate
Constructor and Description |
---|
ItemArmor(ItemArmor.ArmorMaterial materialIn,
int renderIndexIn,
EntityEquipmentSlot equipmentSlotIn) |
Modifier and Type | Method and Description |
---|---|
static ItemStack |
dispenseArmor(IBlockSource blockSource,
ItemStack stack) |
ItemArmor.ArmorMaterial |
getArmorMaterial()
Return the armor material for this armor item.
|
int |
getColor(ItemStack stack)
Return the color for the specified armor ItemStack.
|
EntityEquipmentSlot |
getEquipmentSlot()
Gets the equipment slot of this armor piece (formerly known as armor type)
|
boolean |
getIsRepairable(ItemStack toRepair,
ItemStack repair)
Return whether this item is repairable in an anvil.
|
<any> |
getItemAttributeModifiers(EntityEquipmentSlot equipmentSlot)
Gets a map of item attribute modifiers, used by ItemSword to increase hit damage.
|
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.
|
boolean |
hasOverlay(ItemStack stack)
Determines if this armor will be rendered with the secondary 'overlay' texture.
|
ActionResult<ItemStack> |
onItemRightClick(World worldIn,
EntityPlayer playerIn,
EnumHand handIn)
Called when the equipped item is right clicked.
|
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, addPropertyOverride, canApplyAtEnchantingTable, canDestroyBlockInCreative, canHarvestBlock, canHarvestBlock, canItemEditBlocks, createEntity, doesSneakBypassUse, getAnimationParameters, getArmorModel, getArmorTexture, getAttributeModifiers, getByNameOrId, getContainerItem, getContainerItem, getCreativeTab, getCreativeTabs, getDamage, getDefaultInstance, getDurabilityForDisplay, getEntityLifespan, getFontRenderer, getHarvestLevel, getHasSubtypes, getHighlightTip, getIdFromItem, getItemById, getItemEnchantability, getItemFromBlock, getItemStackDisplayName, getItemStackLimit, getItemStackLimit, getItemUseAction, getMaxDamage, getMaxDamage, getMaxItemUseDuration, getMetadata, getMetadata, getNBTShareTag, getPropertyGetter, getRarity, getRGBDurabilityForDisplay, getShareTag, getSmeltingExperience, getStrVsBlock, getSubItems, getToolClasses, getUnlocalizedName, getUnlocalizedName, getUnlocalizedNameInefficiently, hasContainerItem, hasContainerItem, hasCustomEntity, hasCustomProperties, hasEffect, hitEntity, initCapabilities, isBeaconPayment, isBookEnchantable, isDamageable, isDamaged, isEnchantable, isFull3D, isMap, isRepairable, isValidArmor, itemInteractionForEntity, onArmorTick, onBlockDestroyed, onBlockStartBreak, onCreated, onDroppedByPlayer, onEntityItemUpdate, onEntitySwing, onItemUse, onItemUseFinish, onItemUseFirst, onLeftClickEntity, onPlayerStoppedUsing, onUpdate, onUsingTick, rayTrace, registerItemBlock, registerItems, renderHelmetOverlay, setContainerItem, setCreativeTab, setDamage, setFull3D, setHarvestLevel, setHasSubtypes, setMaxDamage, setMaxStackSize, setNoRepair, setUnlocalizedName, shouldCauseBlockBreakReset, shouldCauseReequipAnimation, shouldRotateAroundWhenRendering, showDurabilityBar, updateItemStackNBT
getRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryName
public static final java.lang.String[] EMPTY_SLOT_NAMES
public static final IBehaviorDispenseItem DISPENSER_BEHAVIOR
public final EntityEquipmentSlot armorType
public final int damageReduceAmount
public final float toughness
public final int renderIndex
public ItemArmor(ItemArmor.ArmorMaterial materialIn, int renderIndexIn, EntityEquipmentSlot equipmentSlotIn)
public static ItemStack dispenseArmor(IBlockSource blockSource, ItemStack stack)
public EntityEquipmentSlot getEquipmentSlot()
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 ActionResult<ItemStack> onItemRightClick(World worldIn, EntityPlayer playerIn, EnumHand handIn)
onItemRightClick
in class Item
public <any> getItemAttributeModifiers(EntityEquipmentSlot equipmentSlot)
getItemAttributeModifiers
in class Item
public boolean hasOverlay(ItemStack stack)
stack
- The stack