Record Class ArmorMaterial

java.lang.Object
java.lang.Record
net.minecraft.item.equipment.ArmorMaterial
Record Components:
durability -
defense -
enchantmentValue -
equipSound -
toughness -
knockbackResistance -
repairIngredient -
modelId -

public record ArmorMaterial(int durability, Map<EquipmentType,Integer> defense, int enchantmentValue, RegistryEntry<SoundEvent> equipSound, float toughness, float knockbackResistance, TagKey<Item> repairIngredient, Identifier modelId) extends Record
Defines the material stats of an
invalid reference
ArmorItem
item.

To view available vanilla armor materials, visit ArmorMaterials.

Mappings:
Namespace Name
named net/minecraft/item/equipment/ArmorMaterial
intermediary net/minecraft/class_1741
official dfo
named durability
intermediary comp_3166
official a
named defense
intermediary comp_2298
official b
named enchantmentValue
intermediary comp_3167
official c
named equipSound
intermediary comp_2300
official d
named toughness
intermediary comp_2303
official e
named knockbackResistance
intermediary comp_2304
official f
named repairIngredient
intermediary comp_2301
official g
named modelId
intermediary comp_3168
official h
  • Field Details

    • durability

      private final int durability
      The field for the durability record component.
    • defense

      private final Map<EquipmentType,Integer> defense
      The field for the defense record component.
    • enchantmentValue

      private final int enchantmentValue
      The field for the enchantmentValue record component.
    • equipSound

      private final RegistryEntry<SoundEvent> equipSound
      The field for the equipSound record component.
    • toughness

      private final float toughness
      The field for the toughness record component.
    • knockbackResistance

      private final float knockbackResistance
      The field for the knockbackResistance record component.
    • repairIngredient

      private final TagKey<Item> repairIngredient
      The field for the repairIngredient record component.
    • modelId

      private final Identifier modelId
      The field for the modelId record component.
  • Constructor Details

  • Method Details

    • applySettings

      public Item.Settings applySettings(Item.Settings settings, EquipmentType equipmentType)
      Mappings:
      Namespace Name Mixin selector
      named applySettings Lnet/minecraft/item/equipment/ArmorMaterial;applySettings(Lnet/minecraft/item/Item$Settings;Lnet/minecraft/item/equipment/EquipmentType;)Lnet/minecraft/item/Item$Settings;
      intermediary method_63991 Lnet/minecraft/class_1741;method_63991(Lnet/minecraft/class_1792$class_1793;Lnet/minecraft/class_8051;)Lnet/minecraft/class_1792$class_1793;
      official a Ldfo;a(Lcxk$a;Ldfq;)Lcxk$a;
    • applyBodyArmorSettings

      public Item.Settings applyBodyArmorSettings(Item.Settings settings, RegistryEntryList<EntityType<?>> allowedEntities)
      Mappings:
      Namespace Name Mixin selector
      named applyBodyArmorSettings Lnet/minecraft/item/equipment/ArmorMaterial;applyBodyArmorSettings(Lnet/minecraft/item/Item$Settings;Lnet/minecraft/registry/entry/RegistryEntryList;)Lnet/minecraft/item/Item$Settings;
      intermediary method_63992 Lnet/minecraft/class_1741;method_63992(Lnet/minecraft/class_1792$class_1793;Lnet/minecraft/class_6885;)Lnet/minecraft/class_1792$class_1793;
      official a Ldfo;a(Lcxk$a;Lju;)Lcxk$a;
    • applyBodyArmorSettings

      public Item.Settings applyBodyArmorSettings(Item.Settings settings, RegistryEntry<SoundEvent> equipSound, boolean damageOnHurt, RegistryEntryList<EntityType<?>> allowedEntities)
      Mappings:
      Namespace Name Mixin selector
      named applyBodyArmorSettings Lnet/minecraft/item/equipment/ArmorMaterial;applyBodyArmorSettings(Lnet/minecraft/item/Item$Settings;Lnet/minecraft/registry/entry/RegistryEntry;ZLnet/minecraft/registry/entry/RegistryEntryList;)Lnet/minecraft/item/Item$Settings;
      intermediary method_64503 Lnet/minecraft/class_1741;method_64503(Lnet/minecraft/class_1792$class_1793;Lnet/minecraft/class_6880;ZLnet/minecraft/class_6885;)Lnet/minecraft/class_1792$class_1793;
      official a Ldfo;a(Lcxk$a;Ljq;ZLju;)Lcxk$a;
    • createAttributeModifiers

      private AttributeModifiersComponent createAttributeModifiers(EquipmentType equipmentType)
      Mappings:
      Namespace Name Mixin selector
      named createAttributeModifiers Lnet/minecraft/item/equipment/ArmorMaterial;createAttributeModifiers(Lnet/minecraft/item/equipment/EquipmentType;)Lnet/minecraft/component/type/AttributeModifiersComponent;
      intermediary method_63993 Lnet/minecraft/class_1741;method_63993(Lnet/minecraft/class_8051;)Lnet/minecraft/class_9285;
      official a Ldfo;a(Ldfq;)Ldaf;
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object object)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      object - the object with which to compare
      Returns:
      true if this object is the same as the object argument; false otherwise.
    • durability

      public int durability()
      Returns the value of the durability record component.
      Returns:
      the value of the durability record component
    • defense

      public Map<EquipmentType,Integer> defense()
      Returns the value of the defense record component.
      Returns:
      the value of the defense record component
    • enchantmentValue

      public int enchantmentValue()
      Returns the value of the enchantmentValue record component.
      Returns:
      the value of the enchantmentValue record component
    • equipSound

      public RegistryEntry<SoundEvent> equipSound()
      Returns the value of the equipSound record component.
      Returns:
      the value of the equipSound record component
    • toughness

      public float toughness()
      Returns the value of the toughness record component.
      Returns:
      the value of the toughness record component
    • knockbackResistance

      public float knockbackResistance()
      Returns the value of the knockbackResistance record component.
      Returns:
      the value of the knockbackResistance record component
    • repairIngredient

      public TagKey<Item> repairIngredient()
      Returns the value of the repairIngredient record component.
      Returns:
      the value of the repairIngredient record component
    • modelId

      public Identifier modelId()
      Returns the value of the modelId record component.
      Returns:
      the value of the modelId record component