Package net.minecraft.item
Enum ToolMaterials
- All Implemented Interfaces:
Serializable,Comparable<ToolMaterials>,java.lang.constant.Constable,ToolMaterial
public enum ToolMaterials extends Enum<ToolMaterials> implements ToolMaterial
-
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 floatattackDamageprivate intenchantabilityprivate intitemDurabilityprivate intminingLevelprivate floatminingSpeedprivate Lazy<Ingredient>repairIngredient -
Constructor Summary
Constructors Modifier Constructor Description privateToolMaterials(int miningLevel, int itemDurability, float miningSpeed, float attackDamage, int enchantability, Supplier<Ingredient> repairIngredient) -
Method Summary
Modifier and Type Method Description floatgetAttackDamage()intgetDurability()intgetEnchantability()intgetMiningLevel()floatgetMiningSpeedMultiplier()IngredientgetRepairIngredient()static ToolMaterialsvalueOf(String name)Returns the enum constant of this type with the specified name.static ToolMaterials[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
WOOD
-
STONE
-
IRON
-
DIAMOND
-
GOLD
-
NETHERITE
-
-
Field Details
-
miningLevel
private final int miningLevel -
itemDurability
private final int itemDurability -
miningSpeed
private final float miningSpeed -
attackDamage
private final float attackDamage -
enchantability
private final int enchantability -
repairIngredient
-
-
Constructor Details
-
ToolMaterials
private ToolMaterials(int miningLevel, int itemDurability, float miningSpeed, float attackDamage, int enchantability, Supplier<Ingredient> repairIngredient)
-
-
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
public int getDurability()- Specified by:
getDurabilityin interfaceToolMaterial
-
getMiningSpeedMultiplier
public float getMiningSpeedMultiplier()- Specified by:
getMiningSpeedMultiplierin interfaceToolMaterial
-
getAttackDamage
public float getAttackDamage()- Specified by:
getAttackDamagein interfaceToolMaterial
-
getMiningLevel
public int getMiningLevel()- Specified by:
getMiningLevelin interfaceToolMaterial
-
getEnchantability
public int getEnchantability()- Specified by:
getEnchantabilityin interfaceToolMaterial
-
getRepairIngredient
- Specified by:
getRepairIngredientin interfaceToolMaterial
-