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,IItemExtension
- Direct Known Subclasses:
AnimalArmorItem,CustomArmorModelTest.EndermanArmorItem,CustomArmorModelTest.TintedArmorItem
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class net.minecraft.world.item.Item
Item.Properties, Item.TooltipContext -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final EnumMap<ArmorItem.Type, UUID> private final Supplier<ItemAttributeModifiers> static final DispenseItemBehaviorprotected final Holder<ArmorMaterial> protected final ArmorItem.TypeFields inherited from class net.minecraft.world.item.Item
ABSOLUTE_MAX_STACK_SIZE, BASE_ATTACK_DAMAGE_UUID, BASE_ATTACK_SPEED_UUID, BY_BLOCK, canRepair, DEFAULT_MAX_STACK_SIZE, MAX_BAR_WIDTHFields inherited from interface net.minecraft.world.flag.FeatureElement
FILTERED_REGISTRIES -
Constructor Summary
ConstructorsConstructorDescriptionArmorItem(Holder<ArmorMaterial> p_323783_, ArmorItem.Type p_266831_, Item.Properties p_40388_) -
Method Summary
Modifier and TypeMethodDescriptionstatic booleandispenseArmor(BlockSource p_302421_, ItemStack p_40400_) intintfloatgetType()booleanisValidRepairItem(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, isRepairable, mineBlock, modifyDefaultComponentsFrom, onCraftedBy, onCraftedPostProcess, onDestroyed, onUseTick, overrideOtherStackedOnMe, overrideStackedOnOther, releaseUsing, requiredFeatures, toString, useOn, useOnRelease, verifyComponentsAfterLoadMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.world.item.Equipable
swapWithEquipmentSlotMethods inherited from interface net.minecraft.world.flag.FeatureElement
isEnabledMethods inherited from interface net.neoforged.neoforge.common.extensions.IItemExtension
canApplyAtEnchantingTable, canContinueUsing, canDisableShield, canElytraFly, canEquip, canGrindstoneRepair, canPerformAction, canWalkOnPowderedSnow, createEntity, damageItem, doesSneakBypassUse, elytraFlightTick, getAllEnchantments, getArmorTexture, getAttributeModifiers, getBurnTime, getCraftingRemainingItem, getCreatorModId, getDamage, getEnchantmentLevel, getEnchantmentValue, getEntityLifespan, getEquipmentSlot, getFoodProperties, getHighlightTip, getMaxDamage, getMaxStackSize, getSweepHitBox, getXpRepairRatio, hasCraftingRemainingItem, hasCustomEntity, isBookEnchantable, isDamageable, isDamaged, isEnderMask, isNotReplaceableByPickAction, isPiglinCurrency, makesPiglinsNeutral, onAnimalArmorTick, onArmorTick, onDestroyed, onDroppedByPlayer, onEntityItemUpdate, onEntitySwing, onItemUseFirst, onLeftClickEntity, onStopUsing, setDamage, shouldCauseBlockBreakReset, shouldCauseReequipAnimation
-
Field Details
-
ARMOR_MODIFIER_UUID_PER_TYPE
-
DISPENSE_ITEM_BEHAVIOR
-
type
-
material
-
defaultModifiers
-
-
Constructor Details
-
ArmorItem
public ArmorItem(Holder<ArmorMaterial> p_323783_, ArmorItem.Type p_266831_, Item.Properties p_40388_)
-
-
Method Details
-
dispenseArmor
-
getType
-
getEnchantmentValue
public int getEnchantmentValue()- Overrides:
getEnchantmentValuein classItem
-
getMaterial
-
isValidRepairItem
- Overrides:
isValidRepairItemin classItem
-
use
public InteractionResultHolder<ItemStack> use(Level p_40395_, Player p_40396_, InteractionHand p_40397_) -
getDefaultAttributeModifiers
- Overrides:
getDefaultAttributeModifiersin classItem
-
getDefense
public int getDefense() -
getToughness
public float getToughness() -
getEquipmentSlot
- Specified by:
getEquipmentSlotin interfaceEquipable
-
getEquipSound
- Specified by:
getEquipSoundin interfaceEquipable
-