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_DURABILITY
private int
durabilityMultiplier
private int
enchantability
private SoundEvent
equipSound
private float
knockbackResistance
private String
name
private int[]
protectionAmounts
private Lazy<Ingredient>
repairIngredientSupplier
private float
toughness
-
Constructor Summary
Constructors Modifier Constructor Description private
ArmorMaterials(String name, int durabilityMultiplier, int[] protectionAmounts, int enchantability, SoundEvent equipSound, float toughness, float knockbackResistance, Supplier<Ingredient> repairIngredientSupplier)
-
Method Summary
Modifier and Type Method Description int
getDurability(EquipmentSlot slot)
int
getEnchantability()
SoundEvent
getEquipSound()
float
getKnockbackResistance()
String
getName()
int
getProtectionAmount(EquipmentSlot slot)
Ingredient
getRepairIngredient()
float
getToughness()
static ArmorMaterials
valueOf(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:
getDurability
in interfaceArmorMaterial
-
getProtectionAmount
- Specified by:
getProtectionAmount
in interfaceArmorMaterial
-
getEnchantability
public int getEnchantability()- Specified by:
getEnchantability
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
-