Package net.minecraft.item.equipment
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
item.
invalid reference
ArmorItem
To view available vanilla armor materials, visit ArmorMaterials.
- Mappings:
Namespace Name named net/minecraft/item/equipment/ArmorMaterialintermediary net/minecraft/class_1741official dfonamed durabilityintermediary comp_3166official anamed defenseintermediary comp_2298official bnamed enchantmentValueintermediary comp_3167official cnamed equipSoundintermediary comp_2300official dnamed toughnessintermediary comp_2303official enamed knockbackResistanceintermediary comp_2304official fnamed repairIngredientintermediary comp_2301official gnamed modelIdintermediary comp_3168official h
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Map<EquipmentType, Integer> The field for thedefenserecord component.private final intThe field for thedurabilityrecord component.private final intThe field for theenchantmentValuerecord component.private final RegistryEntry<SoundEvent> The field for theequipSoundrecord component.private final floatThe field for theknockbackResistancerecord component.private final IdentifierThe field for themodelIdrecord component.The field for therepairIngredientrecord component.private final floatThe field for thetoughnessrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionArmorMaterial(int int2, Map<EquipmentType, Integer> map, int int3, RegistryEntry<SoundEvent> registryEntry, float float2, float float3, TagKey<Item> tagKey, Identifier identifier) -
Method Summary
Modifier and TypeMethodDescriptionapplyBodyArmorSettings(Item.Settings settings, RegistryEntry<SoundEvent> equipSound, boolean damageOnHurt, RegistryEntryList<EntityType<?>> allowedEntities) applyBodyArmorSettings(Item.Settings settings, RegistryEntryList<EntityType<?>> allowedEntities) applySettings(Item.Settings settings, EquipmentType equipmentType) private AttributeModifiersComponentcreateAttributeModifiers(EquipmentType equipmentType) defense()Returns the value of thedefenserecord component.intReturns the value of thedurabilityrecord component.intReturns the value of theenchantmentValuerecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theequipSoundrecord component.final inthashCode()Returns a hash code value for this object.floatReturns the value of theknockbackResistancerecord component.modelId()Returns the value of themodelIdrecord component.Returns the value of therepairIngredientrecord component.final StringtoString()Returns a string representation of this record class.floatReturns the value of thetoughnessrecord component.
-
Field Details
-
durability
private final int durabilityThe field for thedurabilityrecord component. -
defense
The field for thedefenserecord component. -
enchantmentValue
private final int enchantmentValueThe field for theenchantmentValuerecord component. -
equipSound
The field for theequipSoundrecord component. -
toughness
private final float toughnessThe field for thetoughnessrecord component. -
knockbackResistance
private final float knockbackResistanceThe field for theknockbackResistancerecord component. -
repairIngredient
The field for therepairIngredientrecord component. -
modelId
The field for themodelIdrecord component.
-
-
Constructor Details
-
ArmorMaterial
public ArmorMaterial(int int2, Map<EquipmentType, Integer> map, int int3, RegistryEntry<SoundEvent> registryEntry, float float2, float float3, TagKey<Item> tagKey, Identifier identifier)
-
-
Method Details
-
applySettings
- Mappings:
Namespace Name Mixin selector named applySettingsLnet/minecraft/item/equipment/ArmorMaterial;applySettings(Lnet/minecraft/item/Item$Settings;Lnet/minecraft/item/equipment/EquipmentType;)Lnet/minecraft/item/Item$Settings;intermediary method_63991Lnet/minecraft/class_1741;method_63991(Lnet/minecraft/class_1792$class_1793;Lnet/minecraft/class_8051;)Lnet/minecraft/class_1792$class_1793;official aLdfo;a(Lcxk$a;Ldfq;)Lcxk$a;
-
applyBodyArmorSettings
public Item.Settings applyBodyArmorSettings(Item.Settings settings, RegistryEntryList<EntityType<?>> allowedEntities) - Mappings:
Namespace Name Mixin selector named applyBodyArmorSettingsLnet/minecraft/item/equipment/ArmorMaterial;applyBodyArmorSettings(Lnet/minecraft/item/Item$Settings;Lnet/minecraft/registry/entry/RegistryEntryList;)Lnet/minecraft/item/Item$Settings;intermediary method_63992Lnet/minecraft/class_1741;method_63992(Lnet/minecraft/class_1792$class_1793;Lnet/minecraft/class_6885;)Lnet/minecraft/class_1792$class_1793;official aLdfo;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 applyBodyArmorSettingsLnet/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_64503Lnet/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 aLdfo;a(Lcxk$a;Ljq;ZLju;)Lcxk$a;
-
createAttributeModifiers
- Mappings:
Namespace Name Mixin selector named createAttributeModifiersLnet/minecraft/item/equipment/ArmorMaterial;createAttributeModifiers(Lnet/minecraft/item/equipment/EquipmentType;)Lnet/minecraft/component/type/AttributeModifiersComponent;intermediary method_63993Lnet/minecraft/class_1741;method_63993(Lnet/minecraft/class_8051;)Lnet/minecraft/class_9285;official aLdfo;a(Ldfq;)Ldaf;
-
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. -
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
durability
public int durability()Returns the value of thedurabilityrecord component.- Returns:
- the value of the
durabilityrecord component
-
defense
Returns the value of thedefenserecord component.- Returns:
- the value of the
defenserecord component
-
enchantmentValue
public int enchantmentValue()Returns the value of theenchantmentValuerecord component.- Returns:
- the value of the
enchantmentValuerecord component
-
equipSound
Returns the value of theequipSoundrecord component.- Returns:
- the value of the
equipSoundrecord component
-
toughness
public float toughness()Returns the value of thetoughnessrecord component.- Returns:
- the value of the
toughnessrecord component
-
knockbackResistance
public float knockbackResistance()Returns the value of theknockbackResistancerecord component.- Returns:
- the value of the
knockbackResistancerecord component
-
repairIngredient
Returns the value of therepairIngredientrecord component.- Returns:
- the value of the
repairIngredientrecord component
-
modelId
Returns the value of themodelIdrecord component.- Returns:
- the value of the
modelIdrecord component
-