Package net.minecraft.world.item
Enum Class ArmorMaterials
- All Implemented Interfaces:
Serializable
,Comparable<ArmorMaterials>
,Constable
,ArmorMaterial
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Field Summary
Modifier and TypeFieldDescriptionprivate int
private int
private static int[]
private float
private String
private LazyLoadedValue<Ingredient>
private int[]
private SoundEvent
private float
-
Constructor Summary
ModifierConstructorDescriptionprivate
ArmorMaterials(String p_40474_, int p_40475_, int[] p_40476_, int p_40477_, SoundEvent p_40478_, float p_40479_, float p_40480_, Supplier<Ingredient> p_40481_)
-
Method Summary
Modifier and TypeMethodDescriptionint
getDefenseForSlot(EquipmentSlot p_40487_)
int
getDurabilityForSlot(EquipmentSlot p_40484_)
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
-
HEALTH_PER_SLOT
private static final int[] HEALTH_PER_SLOT -
name
-
durabilityMultiplier
private final int durabilityMultiplier -
slotProtections
private final int[] slotProtections -
enchantmentValue
private final int enchantmentValue -
sound
-
toughness
private final float toughness -
knockbackResistance
private final float knockbackResistance -
repairIngredient
-
-
Constructor Details
-
ArmorMaterials
private ArmorMaterials(String p_40474_, int p_40475_, int[] p_40476_, int p_40477_, SoundEvent p_40478_, float p_40479_, float p_40480_, Supplier<Ingredient> p_40481_)
-
-
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
-
getDurabilityForSlot
- Specified by:
getDurabilityForSlot
in interfaceArmorMaterial
-
getDefenseForSlot
- Specified by:
getDefenseForSlot
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
-