Enum Class ArmorMaterials
- All Implemented Interfaces:
Serializable
,Comparable<ArmorMaterials>
,Constable
,ArmorMaterial
,StringIdentifiable
- Mappings:
Namespace Name official cgr
intermediary net/minecraft/class_1740
named 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.EnumCodec<E extends Enum<E> & StringIdentifiable>
-
Enum Constant Summary
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final EnumMap<ArmorItem.Type,
Integer> static final StringIdentifiable.EnumCodec<ArmorMaterials>
private final int
private final int
private final SoundEvent
private final float
private final String
private final EnumMap<ArmorItem.Type,
Integer> private final Lazy<Ingredient>
private final float
Fields inherited from interface net.minecraft.util.StringIdentifiable
CACHED_MAP_THRESHOLD
-
Constructor Summary
ModifierConstructorDescriptionprivate
ArmorMaterials
(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.int
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
.static ArmorMaterials
Returns 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 a
Lcgr;a:Lcgr;
intermediary field_7897
Lnet/minecraft/class_1740;field_7897:Lnet/minecraft/class_1740;
named LEATHER
Lnet/minecraft/item/ArmorMaterials;LEATHER:Lnet/minecraft/item/ArmorMaterials;
-
CHAIN
- Mappings:
Namespace Name Mixin selector official b
Lcgr;b:Lcgr;
intermediary field_7887
Lnet/minecraft/class_1740;field_7887:Lnet/minecraft/class_1740;
named CHAIN
Lnet/minecraft/item/ArmorMaterials;CHAIN:Lnet/minecraft/item/ArmorMaterials;
-
IRON
- Mappings:
Namespace Name Mixin selector official c
Lcgr;c:Lcgr;
intermediary field_7892
Lnet/minecraft/class_1740;field_7892:Lnet/minecraft/class_1740;
named IRON
Lnet/minecraft/item/ArmorMaterials;IRON:Lnet/minecraft/item/ArmorMaterials;
-
GOLD
- Mappings:
Namespace Name Mixin selector official d
Lcgr;d:Lcgr;
intermediary field_7895
Lnet/minecraft/class_1740;field_7895:Lnet/minecraft/class_1740;
named GOLD
Lnet/minecraft/item/ArmorMaterials;GOLD:Lnet/minecraft/item/ArmorMaterials;
-
DIAMOND
- Mappings:
Namespace Name Mixin selector official e
Lcgr;e:Lcgr;
intermediary field_7889
Lnet/minecraft/class_1740;field_7889:Lnet/minecraft/class_1740;
named DIAMOND
Lnet/minecraft/item/ArmorMaterials;DIAMOND:Lnet/minecraft/item/ArmorMaterials;
-
TURTLE
- Mappings:
Namespace Name Mixin selector official f
Lcgr;f:Lcgr;
intermediary field_7890
Lnet/minecraft/class_1740;field_7890:Lnet/minecraft/class_1740;
named TURTLE
Lnet/minecraft/item/ArmorMaterials;TURTLE:Lnet/minecraft/item/ArmorMaterials;
-
NETHERITE
- Mappings:
Namespace Name Mixin selector official g
Lcgr;g:Lcgr;
intermediary field_21977
Lnet/minecraft/class_1740;field_21977:Lnet/minecraft/class_1740;
named NETHERITE
Lnet/minecraft/item/ArmorMaterials;NETHERITE:Lnet/minecraft/item/ArmorMaterials;
-
-
Field Details
-
CODEC
- Mappings:
Namespace Name Mixin selector official h
Lcgr;h:Lasp$a;
intermediary field_41941
Lnet/minecraft/class_1740;field_41941:Lnet/minecraft/class_3542$class_7292;
named CODEC
Lnet/minecraft/item/ArmorMaterials;CODEC:Lnet/minecraft/util/StringIdentifiable$EnumCodec;
-
BASE_DURABILITY
- Mappings:
Namespace Name Mixin selector official i
Lcgr;i:Ljava/util/EnumMap;
intermediary field_41942
Lnet/minecraft/class_1740;field_41942:Ljava/util/EnumMap;
named BASE_DURABILITY
Lnet/minecraft/item/ArmorMaterials;BASE_DURABILITY:Ljava/util/EnumMap;
-
name
- Mappings:
Namespace Name Mixin selector official j
Lcgr;j:Ljava/lang/String;
intermediary field_7884
Lnet/minecraft/class_1740;field_7884:Ljava/lang/String;
named name
Lnet/minecraft/item/ArmorMaterials;name:Ljava/lang/String;
-
durabilityMultiplier
private final int durabilityMultiplier- Mappings:
Namespace Name Mixin selector official k
Lcgr;k:I
intermediary field_7883
Lnet/minecraft/class_1740;field_7883:I
named durabilityMultiplier
Lnet/minecraft/item/ArmorMaterials;durabilityMultiplier:I
-
protectionAmounts
- Mappings:
Namespace Name Mixin selector official l
Lcgr;l:Ljava/util/EnumMap;
intermediary field_41943
Lnet/minecraft/class_1740;field_41943:Ljava/util/EnumMap;
named protectionAmounts
Lnet/minecraft/item/ArmorMaterials;protectionAmounts:Ljava/util/EnumMap;
-
enchantability
private final int enchantability- Mappings:
Namespace Name Mixin selector official m
Lcgr;m:I
intermediary field_7896
Lnet/minecraft/class_1740;field_7896:I
named enchantability
Lnet/minecraft/item/ArmorMaterials;enchantability:I
-
equipSound
- Mappings:
Namespace Name Mixin selector official n
Lcgr;n:Lapc;
intermediary field_7886
Lnet/minecraft/class_1740;field_7886:Lnet/minecraft/class_3414;
named equipSound
Lnet/minecraft/item/ArmorMaterials;equipSound:Lnet/minecraft/sound/SoundEvent;
-
toughness
private final float toughness- Mappings:
Namespace Name Mixin selector official o
Lcgr;o:F
intermediary field_7894
Lnet/minecraft/class_1740;field_7894:F
named toughness
Lnet/minecraft/item/ArmorMaterials;toughness:F
-
knockbackResistance
private final float knockbackResistance- Mappings:
Namespace Name Mixin selector official p
Lcgr;p:F
intermediary field_21978
Lnet/minecraft/class_1740;field_21978:F
named knockbackResistance
Lnet/minecraft/item/ArmorMaterials;knockbackResistance:F
-
repairIngredientSupplier
- Mappings:
Namespace Name Mixin selector official q
Lcgr;q:Larr;
intermediary field_7885
Lnet/minecraft/class_1740;field_7885:Lnet/minecraft/class_3528;
named repairIngredientSupplier
Lnet/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>
Lcgr;<init>(Ljava/lang/String;ILjava/lang/String;ILjava/util/EnumMap;ILapc;FFLjava/util/function/Supplier;)V
intermediary <init>
Lnet/minecraft/class_1740;<init>(Ljava/lang/String;ILjava/lang/String;ILjava/util/EnumMap;ILnet/minecraft/class_3414;FFLjava/util/function/Supplier;)V
named <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 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.- Specified by:
getDurability
in interfaceArmorMaterial
- 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.- Specified by:
getProtection
in interfaceArmorMaterial
- 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
public 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
.- Specified by:
getEnchantability
in interfaceArmorMaterial
- 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
- Specified by:
getEquipSound
in interfaceArmorMaterial
- 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
Returns theIngredient
used to repair items using thisArmorMaterial
.By default,
ArmorItem
will delegateItem.canRepair(ItemStack, ItemStack)
back to this method.- Specified by:
getRepairIngredient
in interfaceArmorMaterial
- 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
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
.- Specified by:
getName
in interfaceArmorMaterial
- 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
public 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.- Specified by:
getToughness
in interfaceArmorMaterial
- 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
public 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.- Specified by:
getKnockbackResistance
in interfaceArmorMaterial
- 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
-
asString
Returns the unique string representation of the enum, used for serialization.- Specified by:
asString
in interfaceStringIdentifiable
- Returns:
- the unique string representation of the enum, used for serialization
- Mappings:
Namespace Name Mixin selector official c
Lasp;c()Ljava/lang/String;
intermediary method_15434
Lnet/minecraft/class_3542;method_15434()Ljava/lang/String;
named asString
Lnet/minecraft/util/StringIdentifiable;asString()Ljava/lang/String;
-