Package net.minecraft.world.item
Class ArmorItem
java.lang.Object
net.minecraft.world.item.Item
net.minecraft.world.item.ArmorItem
- All Implemented Interfaces:
Vanishable
,Wearable
,ItemLike
,IForgeItem
- Direct Known Subclasses:
CustomArmorModelTest.EndermanArmorItem
,CustomArmorModelTest.TintedArmorItem
,DyeableArmorItem
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.item.Item
Item.Properties
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final UUID[]
private final com.google.common.collect.Multimap<Attribute,
AttributeModifier> private final int
static final DispenseItemBehavior
protected final float
protected final ArmorMaterial
protected final EquipmentSlot
private final float
Fields inherited from class net.minecraft.world.item.Item
BASE_ATTACK_DAMAGE_UUID, BASE_ATTACK_SPEED_UUID, BY_BLOCK, canRepair, category, EAT_DURATION, MAX_BAR_WIDTH, MAX_STACK_SIZE
-
Constructor Summary
ConstructorDescriptionArmorItem
(ArmorMaterial p_40386_, EquipmentSlot p_40387_, 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.getSlot()
float
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
allowedIn, appendHoverText, asItem, builtInRegistryHolder, byBlock, byId, canAttackBlock, canBeDepleted, canBeHurtBy, canFitInsideContainerItems, fillItemCategory, finishUsingItem, getBarColor, getBarWidth, getCraftingRemainingItem, getDefaultInstance, getDescription, getDescriptionId, getDescriptionId, getDestroySpeed, getDrinkingSound, getEatingSound, getFoodProperties, getId, getItemCategory, 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, 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.minecraftforge.common.extensions.IForgeItem
canApplyAtEnchantingTable, canContinueUsing, canDisableShield, canElytraFly, canEquip, canPerformAction, canWalkOnPowderedSnow, createEntity, damageItem, doesSneakBypassUse, elytraFlightTick, getAllEnchantments, getArmorTexture, getAttributeModifiers, getBurnTime, getCraftingRemainingItem, getCreativeTabs, 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, onItemUseFirst, onLeftClickEntity, onUsingTick, readShareTag, setDamage, shouldCauseBlockBreakReset, shouldCauseReequipAnimation
-
Field Details
-
ARMOR_MODIFIER_UUID_PER_SLOT
-
DISPENSE_ITEM_BEHAVIOR
-
slot
-
defense
private final int defense -
toughness
private final float toughness -
knockbackResistance
protected final float knockbackResistance -
material
-
defaultModifiers
-
-
Constructor Details
-
ArmorItem
-
-
Method Details
-
dispenseArmor
-
getSlot
-
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() -
getEquipSound
- Overrides:
getEquipSound
in classItem
-