Interface ArmorMaterial
- All Known Implementing Classes:
ArmorMaterials
ArmorItem item.
To view available vanilla armor materials, visit ArmorMaterials.
- Mappings:
Namespace Name official ckjintermediary net/minecraft/class_1741named net/minecraft/item/ArmorMaterial
-
Method Summary
Modifier and TypeMethodDescriptionintgetDurability(ArmorItem.Type type) Returns the total amount of durability points anArmorItemusing thisArmorMaterialhas.intReturns the base enchantment value used byArmorItemwith this material.floatReturns the knockback resistance value of anArmorItempiece using thisArmorMaterial.getName()Returns thenameof thisArmorMaterial, which is used for locating armor texture files.intgetProtection(ArmorItem.Type type) Returns the amount of armor protection points offered by anArmorItemusing thisArmorMaterialwhile it is worn by a player.Returns theIngredientused to repair items using thisArmorMaterial.floatReturns the toughness value of anArmorItempiece using thisArmorMaterial.
-
Method Details
-
getDurability
Returns the total amount of durability points anArmorItemusing thisArmorMaterialhas.The value returned here will set the
Item.Settingsmax durability option when passed intoArmorItem(net.minecraft.item.ArmorMaterial, ArmorItem.Type, Item.Settings)if the value was not already specified.- Parameters:
type- theArmorItem.Typeof theItemwith thisArmorMaterial- Returns:
- the total durability an
ArmorItemwith thisArmorMaterialhas - Mappings:
Namespace Name Mixin selector official aLckj;a(Lcki$a;)Iintermediary method_48402Lnet/minecraft/class_1741;method_48402(Lnet/minecraft/class_1738$class_8051;)Inamed getDurabilityLnet/minecraft/item/ArmorMaterial;getDurability(Lnet/minecraft/item/ArmorItem$Type;)I
-
getProtection
Returns the amount of armor protection points offered by anArmorItemusing thisArmorMaterialwhile it is worn by a player.The protection value returned here is applied as an
EntityAttributeModifierto a player wearing theArmorItempiece via theEntityAttributeModifier.Operation.ADDITIONmodifier.- Parameters:
type- theArmorItem.Typeof theItemwith thisArmorMaterial- Returns:
- the amount of armor protection points offered by an
ArmorItemwith thisArmorMaterial - Mappings:
Namespace Name Mixin selector official bLckj;b(Lcki$a;)Iintermediary method_48403Lnet/minecraft/class_1741;method_48403(Lnet/minecraft/class_1738$class_8051;)Inamed getProtectionLnet/minecraft/item/ArmorMaterial;getProtection(Lnet/minecraft/item/ArmorItem$Type;)I
-
getEnchantability
int getEnchantability()Returns the base enchantment value used byArmorItemwith this material.By default,
ArmorItemwill overrideItem.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, at37.- Returns:
- the enchantment value sent back to
Item.getEnchantability()for armor using this material - Mappings:
Namespace Name Mixin selector official aLckj;a()Iintermediary method_7699Lnet/minecraft/class_1741;method_7699()Inamed getEnchantabilityLnet/minecraft/item/ArmorMaterial;getEnchantability()I
-
getEquipSound
SoundEvent getEquipSound()- Returns:
- the
SoundEventplayed when aLivingEntityequips anArmorItemusing thisArmorMaterial - Mappings:
Namespace Name Mixin selector official bLckj;b()Larr;intermediary method_7698Lnet/minecraft/class_1741;method_7698()Lnet/minecraft/class_3414;named getEquipSoundLnet/minecraft/item/ArmorMaterial;getEquipSound()Lnet/minecraft/sound/SoundEvent;
-
getRepairIngredient
Ingredient getRepairIngredient()Returns theIngredientused to repair items using thisArmorMaterial.By default,
ArmorItemwill delegateItem.canRepair(ItemStack, ItemStack)back to this method.- Returns:
- the
Ingredientrequired to repair items with thisArmorMaterial - Mappings:
Namespace Name Mixin selector official dLckj;d()Lcpz;intermediary method_7695Lnet/minecraft/class_1741;method_7695()Lnet/minecraft/class_1856;named getRepairIngredientLnet/minecraft/item/ArmorMaterial;getRepairIngredient()Lnet/minecraft/recipe/Ingredient;
-
getName
String getName()Returns thenameof thisArmorMaterial, which is used for locating armor texture files.The return value of this method should be in
snake_case.ArmorFeatureRendererwill expect to find an armor texture file matchingminecraft:textures/models/armor/{material_name}_layer_[1/2].pngbased off the return result of this method.Example: given a return value of
cool_material,ArmorFeatureRendererwill require a file atminecraft:textures/models/armor/cool_material_layer_1.pngandminecraft:textures/models/armor/cool_material_layer_2.png.- Returns:
- the
nameof this armor material in snake_case, used for finding armor textures - Mappings:
Namespace Name Mixin selector official eLckj;e()Ljava/lang/String;intermediary method_7694Lnet/minecraft/class_1741;method_7694()Ljava/lang/String;named getNameLnet/minecraft/item/ArmorMaterial;getName()Ljava/lang/String;
-
getToughness
float getToughness()Returns the toughness value of anArmorItempiece using thisArmorMaterial.ArmorItemwill cover the value returned here into theEntityAttributes.GENERIC_ARMOR_TOUGHNESSstatistic with theEntityAttributeModifier.Operation.ADDITIONmodifier type.- Returns:
- the toughness value of any
ArmorItemusing thisArmorMaterial - Mappings:
Namespace Name Mixin selector official fLckj;f()Fintermediary method_7700Lnet/minecraft/class_1741;method_7700()Fnamed getToughnessLnet/minecraft/item/ArmorMaterial;getToughness()F
-
getKnockbackResistance
float getKnockbackResistance()Returns the knockback resistance value of anArmorItempiece using thisArmorMaterial.ArmorItemwill cover the value returned here into theEntityAttributes.GENERIC_KNOCKBACK_RESISTANCEstatistic with theEntityAttributeModifier.Operation.ADDITIONmodifier type.- Returns:
- the knockback resistance value of an
ArmorItempiece using thisArmorMaterial - Mappings:
Namespace Name Mixin selector official gLckj;g()Fintermediary method_24355Lnet/minecraft/class_1741;method_24355()Fnamed getKnockbackResistanceLnet/minecraft/item/ArmorMaterial;getKnockbackResistance()F
-