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 float
attackDamage
private int
enchantability
private int
itemDurability
private int
miningLevel
private float
miningSpeed
private Lazy<Ingredient>
repairIngredient
-
Constructor Summary
Constructors Modifier Constructor Description private
ToolMaterials(int miningLevel, int itemDurability, float miningSpeed, float attackDamage, int enchantability, Supplier<Ingredient> repairIngredient)
-
Method Summary
Modifier and Type Method Description float
getAttackDamage()
int
getDurability()
int
getEnchantability()
int
getMiningLevel()
float
getMiningSpeedMultiplier()
Ingredient
getRepairIngredient()
static ToolMaterials
valueOf(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:
getDurability
in interfaceToolMaterial
-
getMiningSpeedMultiplier
public float getMiningSpeedMultiplier()- Specified by:
getMiningSpeedMultiplier
in interfaceToolMaterial
-
getAttackDamage
public float getAttackDamage()- Specified by:
getAttackDamage
in interfaceToolMaterial
-
getMiningLevel
public int getMiningLevel()- Specified by:
getMiningLevel
in interfaceToolMaterial
-
getEnchantability
public int getEnchantability()- Specified by:
getEnchantability
in interfaceToolMaterial
-
getRepairIngredient
- Specified by:
getRepairIngredient
in interfaceToolMaterial
-