Interface ArmorMaterial

All Known Implementing Classes:
ArmorMaterials

public interface ArmorMaterial
Defines the material stats of an ArmorItem item.

To view available vanilla armor materials, visit ArmorMaterials.

Mappings:
Namespace Name
official cgq
intermediary net/minecraft/class_1741
named net/minecraft/item/ArmorMaterial
  • Method Details

    • getDurability

      int getDurability(ArmorItem.Type type)
      Returns the total amount of durability points an ArmorItem using this ArmorMaterial has.

      The value returned here will set the Item.Settings max durability option when passed into ArmorItem(net.minecraft.item.ArmorMaterial, ArmorItem.Type, Item.Settings) if the value was not already specified.

      Parameters:
      type - the ArmorItem.Type of the Item with this ArmorMaterial
      Returns:
      the total durability an ArmorItem with this ArmorMaterial has
      Mappings:
      Namespace Name Mixin selector
      official a Lcgq;a(Lcgp$a;)I
      intermediary method_48402 Lnet/minecraft/class_1741;method_48402(Lnet/minecraft/class_1738$class_8051;)I
      named getDurability Lnet/minecraft/item/ArmorMaterial;getDurability(Lnet/minecraft/item/ArmorItem$Type;)I
    • getProtection

      int getProtection(ArmorItem.Type type)
      Returns the amount of armor protection points offered by an ArmorItem using this ArmorMaterial while it is worn by a player.

      The protection value returned here is applied as an EntityAttributeModifier to a player wearing the ArmorItem piece via the EntityAttributeModifier.Operation.ADDITION modifier.

      Parameters:
      type - the ArmorItem.Type of the Item with this ArmorMaterial
      Returns:
      the amount of armor protection points offered by an ArmorItem with this ArmorMaterial
      Mappings:
      Namespace Name Mixin selector
      official b Lcgq;b(Lcgp$a;)I
      intermediary method_48403 Lnet/minecraft/class_1741;method_48403(Lnet/minecraft/class_1738$class_8051;)I
      named getProtection Lnet/minecraft/item/ArmorMaterial;getProtection(Lnet/minecraft/item/ArmorItem$Type;)I
    • getEnchantability

      int getEnchantability()
      Returns the base enchantment value used by ArmorItem with this material.

      By default, ArmorItem will override Item.getEnchantability() and delegate the call back to this method.

      A higher return value will result in better enchantment results when using an Enchanting Table. The highest enchantability value in vanilla is Netherite, at 37.

      Returns:
      the enchantment value sent back to Item.getEnchantability() for armor using this material
      Mappings:
      Namespace Name Mixin selector
      official a Lcgq;a()I
      intermediary method_7699 Lnet/minecraft/class_1741;method_7699()I
      named getEnchantability Lnet/minecraft/item/ArmorMaterial;getEnchantability()I
    • getEquipSound

      SoundEvent getEquipSound()
      Returns:
      the SoundEvent played when a LivingEntity equips an ArmorItem using this ArmorMaterial
      Mappings:
      Namespace Name Mixin selector
      official b Lcgq;b()Lapc;
      intermediary method_7698 Lnet/minecraft/class_1741;method_7698()Lnet/minecraft/class_3414;
      named getEquipSound Lnet/minecraft/item/ArmorMaterial;getEquipSound()Lnet/minecraft/sound/SoundEvent;
    • getRepairIngredient

      Ingredient getRepairIngredient()
      Returns the Ingredient used to repair items using this ArmorMaterial.

      By default, ArmorItem will delegate Item.canRepair(ItemStack, ItemStack) back to this method.

      Returns:
      the Ingredient required to repair items with this ArmorMaterial
      Mappings:
      Namespace Name Mixin selector
      official d Lcgq;d()Lcmg;
      intermediary method_7695 Lnet/minecraft/class_1741;method_7695()Lnet/minecraft/class_1856;
      named getRepairIngredient Lnet/minecraft/item/ArmorMaterial;getRepairIngredient()Lnet/minecraft/recipe/Ingredient;
    • getName

      String getName()
      Returns the name of this ArmorMaterial, which is used for locating armor texture files.

      The return value of this method should be in snake_case. ArmorFeatureRenderer will expect to find an armor texture file matching minecraft:textures/models/armor/{material_name}_layer_[1/2].png based off the return result of this method.

      Example: given a return value of cool_material, ArmorFeatureRenderer will require a file at minecraft:textures/models/armor/cool_material_layer_1.png and minecraft:textures/models/armor/cool_material_layer_2.png.

      Returns:
      the name of this armor material in snake_case, used for finding armor textures
      Mappings:
      Namespace Name Mixin selector
      official e Lcgq;e()Ljava/lang/String;
      intermediary method_7694 Lnet/minecraft/class_1741;method_7694()Ljava/lang/String;
      named getName Lnet/minecraft/item/ArmorMaterial;getName()Ljava/lang/String;
    • getToughness

      float getToughness()
      Returns the toughness value of an ArmorItem piece using this ArmorMaterial.

      ArmorItem will cover the value returned here into the EntityAttributes.GENERIC_ARMOR_TOUGHNESS statistic with the EntityAttributeModifier.Operation.ADDITION modifier type.

      Returns:
      the toughness value of any ArmorItem using this ArmorMaterial
      Mappings:
      Namespace Name Mixin selector
      official f Lcgq;f()F
      intermediary method_7700 Lnet/minecraft/class_1741;method_7700()F
      named getToughness Lnet/minecraft/item/ArmorMaterial;getToughness()F
    • getKnockbackResistance

      float getKnockbackResistance()
      Returns the knockback resistance value of an ArmorItem piece using this ArmorMaterial.

      ArmorItem will cover the value returned here into the EntityAttributes.GENERIC_KNOCKBACK_RESISTANCE statistic with the EntityAttributeModifier.Operation.ADDITION modifier type.

      Returns:
      the knockback resistance value of an ArmorItem piece using this ArmorMaterial
      Mappings:
      Namespace Name Mixin selector
      official g Lcgq;g()F
      intermediary method_24355 Lnet/minecraft/class_1741;method_24355()F
      named getKnockbackResistance Lnet/minecraft/item/ArmorMaterial;getKnockbackResistance()F