Interface ArmorMaterial
- All Known Implementing Classes:
ArmorMaterials
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 Summary
Modifier and TypeMethodDescriptionint
getDurability
(ArmorItem.Type type) Returns the total amount of durability points anArmorItem
using thisArmorMaterial
has.int
Returns the base enchantment value used byArmorItem
with this material.float
Returns the knockback resistance value of anArmorItem
piece using thisArmorMaterial
.getName()
Returns thename
of thisArmorMaterial
, which is used for locating armor texture files.int
getProtection
(ArmorItem.Type type) Returns the amount of armor protection points offered by anArmorItem
using thisArmorMaterial
while it is worn by a player.Returns theIngredient
used to repair items using thisArmorMaterial
.float
Returns the toughness value of anArmorItem
piece using thisArmorMaterial
.
-
Method Details
-
getDurability
Returns the total amount of durability points anArmorItem
using thisArmorMaterial
has.The value returned here will set the
Item.Settings
max durability option when passed intoArmorItem(net.minecraft.item.ArmorMaterial, ArmorItem.Type, Item.Settings)
if the value was not already specified.- Parameters:
type
- theArmorItem.Type
of theItem
with thisArmorMaterial
- Returns:
- the total durability an
ArmorItem
with thisArmorMaterial
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
Returns the amount of armor protection points offered by anArmorItem
using thisArmorMaterial
while it is worn by a player.The protection value returned here is applied as an
EntityAttributeModifier
to a player wearing theArmorItem
piece via theEntityAttributeModifier.Operation.ADDITION
modifier.- Parameters:
type
- theArmorItem.Type
of theItem
with thisArmorMaterial
- Returns:
- the amount of armor protection points offered by an
ArmorItem
with thisArmorMaterial
- 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 byArmorItem
with this material.By default,
ArmorItem
will 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 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 aLivingEntity
equips anArmorItem
using thisArmorMaterial
- 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 theIngredient
used to repair items using thisArmorMaterial
.By default,
ArmorItem
will delegateItem.canRepair(ItemStack, ItemStack)
back to this method.- Returns:
- the
Ingredient
required to repair items with thisArmorMaterial
- 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 thename
of thisArmorMaterial
, 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 matchingminecraft: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 atminecraft:textures/models/armor/cool_material_layer_1.png
andminecraft: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 anArmorItem
piece using thisArmorMaterial
.ArmorItem
will cover the value returned here into theEntityAttributes.GENERIC_ARMOR_TOUGHNESS
statistic with theEntityAttributeModifier.Operation.ADDITION
modifier type.- Returns:
- the toughness value of any
ArmorItem
using thisArmorMaterial
- 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 anArmorItem
piece using thisArmorMaterial
.ArmorItem
will cover the value returned here into theEntityAttributes.GENERIC_KNOCKBACK_RESISTANCE
statistic with theEntityAttributeModifier.Operation.ADDITION
modifier type.- Returns:
- the knockback resistance value of an
ArmorItem
piece using thisArmorMaterial
- 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
-