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
,Vanishable
,ItemLike
,IForgeItem
- Direct Known Subclasses:
DyeableArmorItem
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.item.Item
Item.Properties
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final EnumMap<ArmorItem.Type,
UUID> private final com.google.common.collect.Multimap<Attribute,
AttributeModifier> private final int
static final DispenseItemBehavior
protected final float
protected final ArmorMaterial
private final float
protected final ArmorItem.Type
Fields inherited from class net.minecraft.world.item.Item
BASE_ATTACK_DAMAGE_UUID, BASE_ATTACK_SPEED_UUID, BY_BLOCK, canRepair, EAT_DURATION, MAX_BAR_WIDTH, MAX_STACK_SIZE
Fields inherited from interface net.minecraft.world.flag.FeatureElement
FILTERED_REGISTRIES
-
Constructor Summary
ConstructorDescriptionArmorItem
(ArmorMaterial p_40386_, ArmorItem.Type p_266831_, Item.Properties p_40388_) -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
dispenseArmor
(BlockSource p_40399_, ItemStack p_40400_) com.google.common.collect.Multimap<Attribute,
AttributeModifier> getDefaultAttributeModifiers
(EquipmentSlot p_40390_) int
int
Forge: Use ItemStack sensitive version.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, canBeDepleted, canBeHurtBy, canFitInsideContainerItems, finishUsingItem, getBarColor, getBarWidth, getCraftingRemainingItem, getDefaultInstance, getDescription, getDescriptionId, getDescriptionId, getDestroySpeed, getDrinkingSound, getEatingSound, getFoodProperties, getId, getMaxDamage, getMaxStackSize, getName, getOrCreateDescriptionId, getPlayerPOVHitResult, getRarity, getRenderPropertiesInternal, getTooltipImage, getUseAnimation, getUseDuration, hasCraftingRemainingItem, hurtEnemy, initializeClient, interactLivingEntity, inventoryTick, isBarVisible, isComplex, isCorrectToolForDrops, isEdible, isEnchantable, isFireResistant, isFoil, isRepairable, mineBlock, onCraftedBy, onDestroyed, onUseTick, overrideOtherStackedOnMe, overrideStackedOnOther, releaseUsing, requiredFeatures, shouldOverrideMultiplayerNbt, toString, useOn, useOnRelease, verifyTagAfterLoad
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, damageItem, doesSneakBypassUse, elytraFlightTick, getAllEnchantments, getArmorTexture, getAttributeModifiers, getBurnTime, getCraftingRemainingItem, getCreatorModId, getDamage, getDefaultTooltipHideFlags, getEnchantmentLevel, getEnchantmentValue, getEntityLifespan, getEquipmentSlot, getFoodProperties, getHighlightTip, getMaxDamage, getMaxStackSize, getShareTag, getSweepHitBox, getXpRepairRatio, hasCraftingRemainingItem, hasCustomEntity, initCapabilities, isBookEnchantable, isCorrectToolForDrops, isDamageable, isDamaged, isEnderMask, isNotReplaceableByPickAction, isPiglinCurrency, makesPiglinsNeutral, onArmorTick, onBlockStartBreak, onDestroyed, onDroppedByPlayer, onEntityItemUpdate, onEntitySwing, onHorseArmorTick, onInventoryTick, onItemUseFirst, onLeftClickEntity, onStopUsing, readShareTag, setDamage, shouldCauseBlockBreakReset, shouldCauseReequipAnimation
-
Field Details
-
ARMOR_MODIFIER_UUID_PER_TYPE
-
DISPENSE_ITEM_BEHAVIOR
-
type
-
defense
private final int defense -
toughness
private final float toughness -
knockbackResistance
protected final float knockbackResistance -
material
-
defaultModifiers
-
-
Constructor Details
-
ArmorItem
-
-
Method Details
-
dispenseArmor
-
getType
-
getEnchantmentValue
public int getEnchantmentValue()Description copied from class:Item
Forge: Use ItemStack sensitive version.- 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
public com.google.common.collect.Multimap<Attribute,AttributeModifier> getDefaultAttributeModifiers(EquipmentSlot p_40390_) - Overrides:
getDefaultAttributeModifiers
in classItem
-
getDefense
public int getDefense() -
getToughness
public float getToughness() -
getEquipmentSlot
- Specified by:
getEquipmentSlot
in interfaceEquipable
-
getEquipSound
- Specified by:
getEquipSound
in interfaceEquipable
-