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
Enum Constants -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<ArmorMaterials>private final intprivate final intprivate static final EnumMap<ArmorItem.Type,Integer> private final floatprivate final Stringprivate final EnumMap<ArmorItem.Type,Integer> private final LazyLoadedValue<Ingredient>private final SoundEventprivate final floatFields inherited from interface net.minecraft.util.StringRepresentable
PRE_BUILT_MAP_THRESHOLD -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateArmorMaterials(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 TypeMethodDescriptionintgetDefenseForType(ArmorItem.Type p_266752_) intgetDurabilityForType(ArmorItem.Type p_266745_) intfloatgetName()floatstatic 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
-
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:
getDurabilityForTypein interfaceArmorMaterial
-
getDefenseForType
- Specified by:
getDefenseForTypein interfaceArmorMaterial
-
getEnchantmentValue
public int getEnchantmentValue()- Specified by:
getEnchantmentValuein interfaceArmorMaterial
-
getEquipSound
- Specified by:
getEquipSoundin interfaceArmorMaterial
-
getRepairIngredient
- Specified by:
getRepairIngredientin interfaceArmorMaterial
-
getName
- Specified by:
getNamein interfaceArmorMaterial
-
getToughness
public float getToughness()- Specified by:
getToughnessin interfaceArmorMaterial
-
getKnockbackResistance
public float getKnockbackResistance()- Specified by:
getKnockbackResistancein interfaceArmorMaterial
-
getSerializedName
- Specified by:
getSerializedNamein interfaceStringRepresentable
-