Enum Class ArmorMaterials
- All Implemented Interfaces:
Serializable,Comparable<ArmorMaterials>,Constable,ArmorMaterial,StringIdentifiable
- Mappings:
Namespace Name official ckkintermediary net/minecraft/class_1740named net/minecraft/item/ArmorMaterials
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>Nested classes/interfaces inherited from interface net.minecraft.util.StringIdentifiable
StringIdentifiable.BasicCodec<S extends StringIdentifiable>, StringIdentifiable.EnumCodec<E extends Enum<E> & StringIdentifiable> -
Enum Constant Summary
Enum Constants -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final EnumMap<ArmorItem.Type,Integer> static final com.mojang.serialization.Codec<ArmorMaterials>private final intprivate final intprivate final SoundEventprivate final floatprivate final Stringprivate final EnumMap<ArmorItem.Type,Integer> private final Lazy<Ingredient>private final floatFields inherited from interface net.minecraft.util.StringIdentifiable
CACHED_MAP_THRESHOLD -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateArmorMaterials(String name, int durabilityMultiplier, EnumMap<ArmorItem.Type, Integer> protectionAmounts, int enchantability, SoundEvent equipSound, float toughness, float knockbackResistance, Supplier<Ingredient> repairIngredientSupplier) -
Method Summary
Modifier and TypeMethodDescriptionasString()Returns the unique string representation of the enum, used for serialization.intgetDurability(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.static ArmorMaterialsReturns the enum constant of this class with the specified name.static ArmorMaterials[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
LEATHER
- Mappings:
Namespace Name Mixin selector official aLckk;a:Lckk;intermediary field_7897Lnet/minecraft/class_1740;field_7897:Lnet/minecraft/class_1740;named LEATHERLnet/minecraft/item/ArmorMaterials;LEATHER:Lnet/minecraft/item/ArmorMaterials;
-
CHAIN
- Mappings:
Namespace Name Mixin selector official bLckk;b:Lckk;intermediary field_7887Lnet/minecraft/class_1740;field_7887:Lnet/minecraft/class_1740;named CHAINLnet/minecraft/item/ArmorMaterials;CHAIN:Lnet/minecraft/item/ArmorMaterials;
-
IRON
- Mappings:
Namespace Name Mixin selector official cLckk;c:Lckk;intermediary field_7892Lnet/minecraft/class_1740;field_7892:Lnet/minecraft/class_1740;named IRONLnet/minecraft/item/ArmorMaterials;IRON:Lnet/minecraft/item/ArmorMaterials;
-
GOLD
- Mappings:
Namespace Name Mixin selector official dLckk;d:Lckk;intermediary field_7895Lnet/minecraft/class_1740;field_7895:Lnet/minecraft/class_1740;named GOLDLnet/minecraft/item/ArmorMaterials;GOLD:Lnet/minecraft/item/ArmorMaterials;
-
DIAMOND
- Mappings:
Namespace Name Mixin selector official eLckk;e:Lckk;intermediary field_7889Lnet/minecraft/class_1740;field_7889:Lnet/minecraft/class_1740;named DIAMONDLnet/minecraft/item/ArmorMaterials;DIAMOND:Lnet/minecraft/item/ArmorMaterials;
-
TURTLE
- Mappings:
Namespace Name Mixin selector official fLckk;f:Lckk;intermediary field_7890Lnet/minecraft/class_1740;field_7890:Lnet/minecraft/class_1740;named TURTLELnet/minecraft/item/ArmorMaterials;TURTLE:Lnet/minecraft/item/ArmorMaterials;
-
NETHERITE
- Mappings:
Namespace Name Mixin selector official gLckk;g:Lckk;intermediary field_21977Lnet/minecraft/class_1740;field_21977:Lnet/minecraft/class_1740;named NETHERITELnet/minecraft/item/ArmorMaterials;NETHERITE:Lnet/minecraft/item/ArmorMaterials;
-
-
Field Details
-
CODEC
- Mappings:
Namespace Name Mixin selector official hLckk;h:Lcom/mojang/serialization/Codec;intermediary field_41941Lnet/minecraft/class_1740;field_41941:Lcom/mojang/serialization/Codec;named CODECLnet/minecraft/item/ArmorMaterials;CODEC:Lcom/mojang/serialization/Codec;
-
BASE_DURABILITY
- Mappings:
Namespace Name Mixin selector official iLckk;i:Ljava/util/EnumMap;intermediary field_41942Lnet/minecraft/class_1740;field_41942:Ljava/util/EnumMap;named BASE_DURABILITYLnet/minecraft/item/ArmorMaterials;BASE_DURABILITY:Ljava/util/EnumMap;
-
name
- Mappings:
Namespace Name Mixin selector official jLckk;j:Ljava/lang/String;intermediary field_7884Lnet/minecraft/class_1740;field_7884:Ljava/lang/String;named nameLnet/minecraft/item/ArmorMaterials;name:Ljava/lang/String;
-
durabilityMultiplier
private final int durabilityMultiplier- Mappings:
Namespace Name Mixin selector official kLckk;k:Iintermediary field_7883Lnet/minecraft/class_1740;field_7883:Inamed durabilityMultiplierLnet/minecraft/item/ArmorMaterials;durabilityMultiplier:I
-
protectionAmounts
- Mappings:
Namespace Name Mixin selector official lLckk;l:Ljava/util/EnumMap;intermediary field_41943Lnet/minecraft/class_1740;field_41943:Ljava/util/EnumMap;named protectionAmountsLnet/minecraft/item/ArmorMaterials;protectionAmounts:Ljava/util/EnumMap;
-
enchantability
private final int enchantability- Mappings:
Namespace Name Mixin selector official mLckk;m:Iintermediary field_7896Lnet/minecraft/class_1740;field_7896:Inamed enchantabilityLnet/minecraft/item/ArmorMaterials;enchantability:I
-
equipSound
- Mappings:
Namespace Name Mixin selector official nLckk;n:Larr;intermediary field_7886Lnet/minecraft/class_1740;field_7886:Lnet/minecraft/class_3414;named equipSoundLnet/minecraft/item/ArmorMaterials;equipSound:Lnet/minecraft/sound/SoundEvent;
-
toughness
private final float toughness- Mappings:
Namespace Name Mixin selector official oLckk;o:Fintermediary field_7894Lnet/minecraft/class_1740;field_7894:Fnamed toughnessLnet/minecraft/item/ArmorMaterials;toughness:F
-
knockbackResistance
private final float knockbackResistance- Mappings:
Namespace Name Mixin selector official pLckk;p:Fintermediary field_21978Lnet/minecraft/class_1740;field_21978:Fnamed knockbackResistanceLnet/minecraft/item/ArmorMaterials;knockbackResistance:F
-
repairIngredientSupplier
- Mappings:
Namespace Name Mixin selector official qLckk;q:Lauj;intermediary field_7885Lnet/minecraft/class_1740;field_7885:Lnet/minecraft/class_3528;named repairIngredientSupplierLnet/minecraft/item/ArmorMaterials;repairIngredientSupplier:Lnet/minecraft/util/Lazy;
-
-
Constructor Details
-
ArmorMaterials
private ArmorMaterials(String name, int durabilityMultiplier, EnumMap<ArmorItem.Type, Integer> protectionAmounts, int enchantability, SoundEvent equipSound, float toughness, float knockbackResistance, Supplier<Ingredient> repairIngredientSupplier) - Mappings:
Namespace Name Mixin selector official <init>Lckk;<init>(Ljava/lang/String;ILjava/lang/String;ILjava/util/EnumMap;ILarr;FFLjava/util/function/Supplier;)Vintermediary <init>Lnet/minecraft/class_1740;<init>(Ljava/lang/String;ILjava/lang/String;ILjava/util/EnumMap;ILnet/minecraft/class_3414;FFLjava/util/function/Supplier;)Vnamed <init>Lnet/minecraft/item/ArmorMaterials;<init>(Ljava/lang/String;ILjava/lang/String;ILjava/util/EnumMap;ILnet/minecraft/sound/SoundEvent;FFLjava/util/function/Supplier;)V
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
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.- Specified by:
getDurabilityin interfaceArmorMaterial- 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.- Specified by:
getProtectionin interfaceArmorMaterial- 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
public 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.- Specified by:
getEnchantabilityin interfaceArmorMaterial- 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
- Specified by:
getEquipSoundin interfaceArmorMaterial- 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
Returns theIngredientused to repair items using thisArmorMaterial.By default,
ArmorItemwill delegateItem.canRepair(ItemStack, ItemStack)back to this method.- Specified by:
getRepairIngredientin interfaceArmorMaterial- 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
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.- Specified by:
getNamein interfaceArmorMaterial- 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
public 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.- Specified by:
getToughnessin interfaceArmorMaterial- 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
public 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.- Specified by:
getKnockbackResistancein interfaceArmorMaterial- 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
-
asString
Returns the unique string representation of the enum, used for serialization.- Specified by:
asStringin interfaceStringIdentifiable- Returns:
- the unique string representation of the enum, used for serialization
- Mappings:
Namespace Name Mixin selector official cLavk;c()Ljava/lang/String;intermediary method_15434Lnet/minecraft/class_3542;method_15434()Ljava/lang/String;named asStringLnet/minecraft/util/StringIdentifiable;asString()Ljava/lang/String;
-