Package net.minecraft.world.item
Class ArmorItem
java.lang.Object
net.minecraft.world.item.Item
net.minecraft.world.item.ArmorItem
- All Implemented Interfaces:
FeatureElement
,Equipable
,ItemLike
,IForgeItem
- Direct Known Subclasses:
AnimalArmorItem
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.item.Item
Item.Properties, Item.TooltipContext
-
Field Summary
Modifier and TypeFieldDescriptionprivate final Supplier
<ItemAttributeModifiers> static final DispenseItemBehavior
protected final Holder
<ArmorMaterial> protected final ArmorItem.Type
Fields inherited from class net.minecraft.world.item.Item
ABSOLUTE_MAX_STACK_SIZE, BASE_ATTACK_DAMAGE_ID, BASE_ATTACK_SPEED_ID, BY_BLOCK, DEFAULT_MAX_STACK_SIZE, MAX_BAR_WIDTH, STREAM_CODEC
Fields inherited from interface net.minecraft.world.flag.FeatureElement
FILTERED_REGISTRIES
-
Constructor Summary
ConstructorDescriptionArmorItem
(Holder<ArmorMaterial> p_329451_, ArmorItem.Type p_266831_, Item.Properties p_40388_) -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
dispenseArmor
(BlockSource p_40399_, ItemStack p_40400_) int
int
float
getType()
boolean
isValidRepairItem
(ItemStack p_40392_, ItemStack p_40393_) use
(Level p_40395_, Player p_40396_, InteractionHand p_40397_) Methods inherited from class net.minecraft.world.item.Item
appendHoverText, asItem, builtInRegistryHolder, byBlock, byId, canAttackBlock, canFitInsideContainerItems, components, finishUsingItem, getAttackDamageBonus, getBarColor, getBarWidth, getBreakingSound, getCraftingRemainingItem, getDefaultInstance, getDefaultMaxStackSize, getDescription, getDescriptionId, getDescriptionId, getDestroySpeed, getDrinkingSound, getEatingSound, getId, getName, getOrCreateDescriptionId, getPlayerPOVHitResult, getRenderPropertiesInternal, getTooltipImage, getUseAnimation, getUseDuration, hasCraftingRemainingItem, hurtEnemy, initializeClient, interactLivingEntity, inventoryTick, isBarVisible, isComplex, isCorrectToolForDrops, isEnchantable, isFoil, mineBlock, onCraftedBy, onCraftedPostProcess, onDestroyed, onUseTick, overrideOtherStackedOnMe, overrideStackedOnOther, postHurtEnemy, releaseUsing, requiredFeatures, toString, useOn, useOnRelease, verifyComponentsAfterLoad
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.world.item.Equipable
swapWithEquipmentSlot
Methods inherited from interface net.minecraft.world.flag.FeatureElement
isEnabled
Methods inherited from interface net.minecraftforge.common.extensions.IForgeItem
canApplyAtEnchantingTable, canContinueUsing, canDisableShield, canElytraFly, canEquip, canGrindstoneRepair, canPerformAction, canWalkOnPowderedSnow, createEntity, doesSneakBypassUse, elytraFlightTick, getArmorTexture, getAttributeModifiers, getBurnTime, getCraftingRemainingItem, getCreatorModId, getDefaultTooltipHideFlags, getEnchantmentValue, getEntityLifespan, getEquipmentSlot, getHighlightTip, getSweepHitBox, hasCraftingRemainingItem, hasCustomEntity, isBookEnchantable, isEnderMask, isNotReplaceableByPickAction, isPiglinCurrency, makesPiglinsNeutral, onBlockStartBreak, onDestroyed, onDroppedByPlayer, onEntityItemUpdate, onEntitySwing, onHorseArmorTick, onInventoryTick, onItemUseFirst, onLeftClickEntity, onStopUsing, shouldCauseBlockBreakReset, shouldCauseReequipAnimation
-
Field Details
-
DISPENSE_ITEM_BEHAVIOR
-
type
-
material
-
defaultModifiers
-
-
Constructor Details
-
ArmorItem
public ArmorItem(Holder<ArmorMaterial> p_329451_, ArmorItem.Type p_266831_, Item.Properties p_40388_)
-
-
Method Details
-
dispenseArmor
-
getType
-
getEnchantmentValue
public int getEnchantmentValue()- Overrides:
getEnchantmentValue
in classItem
-
getMaterial
-
isValidRepairItem
- Overrides:
isValidRepairItem
in classItem
-
use
public InteractionResultHolder<ItemStack> use(Level p_40395_, Player p_40396_, InteractionHand p_40397_) -
getDefaultAttributeModifiers
- Overrides:
getDefaultAttributeModifiers
in classItem
-
getDefense
public int getDefense() -
getToughness
public float getToughness() -
getEquipmentSlot
- Specified by:
getEquipmentSlot
in interfaceEquipable
-
getEquipSound
- Specified by:
getEquipSound
in interfaceEquipable
-