Package net.minecraft.item
Enum ArmorMaterials
- All Implemented Interfaces:
Serializable,Comparable<ArmorMaterials>,java.lang.constant.Constable,ArmorMaterial
public enum ArmorMaterials extends Enum<ArmorMaterials> implements ArmorMaterial
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
-
Field Summary
Fields Modifier and Type Field Description private static int[]BASE_DURABILITYprivate intdurabilityMultiplierprivate intenchantabilityprivate SoundEventequipSoundprivate floatknockbackResistanceprivate Stringnameprivate int[]protectionAmountsprivate Lazy<Ingredient>repairIngredientSupplierprivate floattoughness -
Constructor Summary
Constructors Modifier Constructor Description privateArmorMaterials(String name, int durabilityMultiplier, int[] protectionAmounts, int enchantability, SoundEvent equipSound, float toughness, float knockbackResistance, Supplier<Ingredient> repairIngredientSupplier) -
Method Summary
Modifier and Type Method Description intgetDurability(EquipmentSlot slot)intgetEnchantability()SoundEventgetEquipSound()floatgetKnockbackResistance()StringgetName()intgetProtectionAmount(EquipmentSlot slot)IngredientgetRepairIngredient()floatgetToughness()static ArmorMaterialsvalueOf(String name)Returns the enum constant of this type with the specified name.static ArmorMaterials[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
LEATHER
-
CHAIN
-
IRON
-
GOLD
-
DIAMOND
-
TURTLE
-
NETHERITE
-
-
Field Details
-
BASE_DURABILITY
private static final int[] BASE_DURABILITY -
name
-
durabilityMultiplier
private final int durabilityMultiplier -
protectionAmounts
private final int[] protectionAmounts -
enchantability
private final int enchantability -
equipSound
-
toughness
private final float toughness -
knockbackResistance
private final float knockbackResistance -
repairIngredientSupplier
-
-
Constructor Details
-
ArmorMaterials
private ArmorMaterials(String name, int durabilityMultiplier, int[] protectionAmounts, int enchantability, SoundEvent equipSound, float toughness, float knockbackResistance, Supplier<Ingredient> repairIngredientSupplier)
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException- if the argument is null
-
getDurability
- Specified by:
getDurabilityin interfaceArmorMaterial
-
getProtectionAmount
- Specified by:
getProtectionAmountin interfaceArmorMaterial
-
getEnchantability
public int getEnchantability()- Specified by:
getEnchantabilityin 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
-