Package net.minecraft.world.item
Enum Class ArmorMaterials
- All Implemented Interfaces:
Serializable
,Comparable<ArmorMaterials>
,Constable
,StringRepresentable
,ArmorMaterial
public enum ArmorMaterials
extends Enum<ArmorMaterials>
implements StringRepresentable, ArmorMaterial
-
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.StringRepresentable
StringRepresentable.EnumCodec<E extends Enum<E> & StringRepresentable>, StringRepresentable.StringRepresentableCodec<S extends StringRepresentable>
-
Enum Constant Summary
-
Field Summary
Modifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<ArmorMaterials>
private final int
private final int
private static final EnumMap<ArmorItem.Type,
Integer> private final float
private final String
private final EnumMap<ArmorItem.Type,
Integer> private final LazyLoadedValue<Ingredient>
private final SoundEvent
private final float
Fields inherited from interface net.minecraft.util.StringRepresentable
PRE_BUILT_MAP_THRESHOLD
-
Constructor Summary
ModifierConstructorDescriptionprivate
ArmorMaterials
(String p_268171_, int p_268303_, EnumMap<ArmorItem.Type, Integer> p_267941_, int p_268086_, SoundEvent p_268145_, float p_268058_, float p_268180_, Supplier<Ingredient> p_268256_) -
Method Summary
Modifier and TypeMethodDescriptionint
getDefenseForType
(ArmorItem.Type p_266752_) int
getDurabilityForType
(ArmorItem.Type p_266745_) int
float
getName()
float
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
-
CHAIN
-
IRON
-
GOLD
-
DIAMOND
-
TURTLE
-
NETHERITE
-
-
Field Details
-
CODEC
-
HEALTH_FUNCTION_FOR_TYPE
-
name
-
durabilityMultiplier
private final int durabilityMultiplier -
protectionFunctionForType
-
enchantmentValue
private final int enchantmentValue -
sound
-
toughness
private final float toughness -
knockbackResistance
private final float knockbackResistance -
repairIngredient
-
-
Constructor Details
-
ArmorMaterials
private ArmorMaterials(String p_268171_, int p_268303_, EnumMap<ArmorItem.Type, Integer> p_267941_, int p_268086_, SoundEvent p_268145_, float p_268058_, float p_268180_, Supplier<Ingredient> p_268256_)
-
-
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
-
getDurabilityForType
- Specified by:
getDurabilityForType
in interfaceArmorMaterial
-
getDefenseForType
- Specified by:
getDefenseForType
in interfaceArmorMaterial
-
getEnchantmentValue
public int getEnchantmentValue()- Specified by:
getEnchantmentValue
in interfaceArmorMaterial
-
getEquipSound
- Specified by:
getEquipSound
in interfaceArmorMaterial
-
getRepairIngredient
- Specified by:
getRepairIngredient
in interfaceArmorMaterial
-
getName
- Specified by:
getName
in interfaceArmorMaterial
-
getToughness
public float getToughness()- Specified by:
getToughness
in interfaceArmorMaterial
-
getKnockbackResistance
public float getKnockbackResistance()- Specified by:
getKnockbackResistance
in interfaceArmorMaterial
-
getSerializedName
- Specified by:
getSerializedName
in interfaceStringRepresentable
-