Package net.minecraft.item
Enum Class ArmorMaterial
- All Implemented Interfaces:
Serializable
,Comparable<ArmorMaterial>
,Constable
,IArmorMaterial
-
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 final int
private final int
private static final int[]
private final float
private final String
private final LazyValue<Ingredient>
private final int[]
private final SoundEvent
private final float
-
Constructor Summary
ModifierConstructorDescriptionprivate
ArmorMaterial
(String p_i231593_3_, int p_i231593_4_, int[] p_i231593_5_, int p_i231593_6_, SoundEvent p_i231593_7_, float p_i231593_8_, float p_i231593_9_, Supplier<Ingredient> p_i231593_10_) -
Method Summary
Modifier and TypeMethodDescriptionint
getDefenseForSlot
(EquipmentSlotType p_200902_1_) int
getDurabilityForSlot
(EquipmentSlotType p_200896_1_) int
float
getName()
float
static ArmorMaterial
Returns the enum constant of this class with the specified name.static ArmorMaterial[]
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
-
ArmorMaterial
private ArmorMaterial(String p_i231593_3_, int p_i231593_4_, int[] p_i231593_5_, int p_i231593_6_, SoundEvent p_i231593_7_, float p_i231593_8_, float p_i231593_9_, Supplier<Ingredient> p_i231593_10_)
-
-
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 interfaceIArmorMaterial
-
getDefenseForSlot
- Specified by:
getDefenseForSlot
in interfaceIArmorMaterial
-
getEnchantmentValue
public int getEnchantmentValue()- Specified by:
getEnchantmentValue
in interfaceIArmorMaterial
-
getEquipSound
- Specified by:
getEquipSound
in interfaceIArmorMaterial
-
getRepairIngredient
- Specified by:
getRepairIngredient
in interfaceIArmorMaterial
-
getName
- Specified by:
getName
in interfaceIArmorMaterial
-
getToughness
public float getToughness()- Specified by:
getToughness
in interfaceIArmorMaterial
-
getKnockbackResistance
public float getKnockbackResistance()- Specified by:
getKnockbackResistance
in interfaceIArmorMaterial
-