Package net.minecraft.item
Enum Class Item.ToolMaterialType
- All Implemented Interfaces:
Serializable,Comparable<Item.ToolMaterialType>,Constable
- Enclosing class:
- Item
The ToolMaterialType enum is the basis for all tool materials. It stores useful information about the tool such as it's enchantability, maximum durability and mining level.
All ToolItem constructors require one argument as a ToolMaterialType.
- See Also:
- Mappings:
Namespace Name official ain$aintermediary net/minecraft/class_1069$class_1070named net/minecraft/item/Item$ToolMaterialType
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final floatThe attack multiplier for the toolprivate final intThe tool's enchantabilityprivate final intThe maximum durability of the toolprivate final intThe mining level of the toolprivate final floatThe mining speed multiplier of the tool -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateToolMaterialType(int miningLevel, int maxDurability, float speedMultiplier, float attackMultiplier, int enchantability) Enum constructor -
Method Summary
Modifier and TypeMethodDescriptionfloatGetter for attackMultiplierintGetter for enchantabilityintGetter for maxDurabilityintGetter for miningLevelfloatGetter for SpeedMultiplierReturns the repair ingredient of the tool material.static Item.ToolMaterialTypeReturns the enum constant of this class with the specified name.static Item.ToolMaterialType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
WOOD
- Mappings:
Namespace Name Mixin selector official aLain$a;a:Lain$a;intermediary field_4365Lnet/minecraft/class_1069$class_1070;field_4365:Lnet/minecraft/class_1069$class_1070;named WOODLnet/minecraft/item/Item$ToolMaterialType;WOOD:Lnet/minecraft/item/Item$ToolMaterialType;
-
STONE
- Mappings:
Namespace Name Mixin selector official bLain$a;b:Lain$a;intermediary field_4366Lnet/minecraft/class_1069$class_1070;field_4366:Lnet/minecraft/class_1069$class_1070;named STONELnet/minecraft/item/Item$ToolMaterialType;STONE:Lnet/minecraft/item/Item$ToolMaterialType;
-
IRON
- Mappings:
Namespace Name Mixin selector official cLain$a;c:Lain$a;intermediary field_4367Lnet/minecraft/class_1069$class_1070;field_4367:Lnet/minecraft/class_1069$class_1070;named IRONLnet/minecraft/item/Item$ToolMaterialType;IRON:Lnet/minecraft/item/Item$ToolMaterialType;
-
DIAMOND
- Mappings:
Namespace Name Mixin selector official dLain$a;d:Lain$a;intermediary field_12305Lnet/minecraft/class_1069$class_1070;field_12305:Lnet/minecraft/class_1069$class_1070;named DIAMONDLnet/minecraft/item/Item$ToolMaterialType;DIAMOND:Lnet/minecraft/item/Item$ToolMaterialType;
-
GOLD
- Mappings:
Namespace Name Mixin selector official eLain$a;e:Lain$a;intermediary field_4369Lnet/minecraft/class_1069$class_1070;field_4369:Lnet/minecraft/class_1069$class_1070;named GOLDLnet/minecraft/item/Item$ToolMaterialType;GOLD:Lnet/minecraft/item/Item$ToolMaterialType;
-
-
Field Details
-
miningLevel
private final int miningLevelThe mining level of the tool- Mappings:
Namespace Name Mixin selector official fLain$a;f:Iintermediary field_4370Lnet/minecraft/class_1069$class_1070;field_4370:Inamed miningLevelLnet/minecraft/item/Item$ToolMaterialType;miningLevel:I
-
maxDurability
private final int maxDurabilityThe maximum durability of the tool- Mappings:
Namespace Name Mixin selector official gLain$a;g:Iintermediary field_4371Lnet/minecraft/class_1069$class_1070;field_4371:Inamed maxDurabilityLnet/minecraft/item/Item$ToolMaterialType;maxDurability:I
-
speedMultiplier
private final float speedMultiplierThe mining speed multiplier of the tool- Mappings:
Namespace Name Mixin selector official hLain$a;h:Fintermediary field_4372Lnet/minecraft/class_1069$class_1070;field_4372:Fnamed speedMultiplierLnet/minecraft/item/Item$ToolMaterialType;speedMultiplier:F
-
attackMultiplier
private final float attackMultiplierThe attack multiplier for the tool- Mappings:
Namespace Name Mixin selector official iLain$a;i:Fintermediary field_6948Lnet/minecraft/class_1069$class_1070;field_6948:Fnamed attackMultiplierLnet/minecraft/item/Item$ToolMaterialType;attackMultiplier:F
-
enchantability
private final int enchantabilityThe tool's enchantability- Mappings:
Namespace Name Mixin selector official jLain$a;j:Iintermediary field_4374Lnet/minecraft/class_1069$class_1070;field_4374:Inamed enchantabilityLnet/minecraft/item/Item$ToolMaterialType;enchantability:I
-
-
Constructor Details
-
ToolMaterialType
private ToolMaterialType(int miningLevel, int maxDurability, float speedMultiplier, float attackMultiplier, int enchantability) Enum constructor- Mappings:
Namespace Name Mixin selector official <init>Lain$a;<init>(Ljava/lang/String;IIIFFI)Vintermediary <init>Lnet/minecraft/class_1069$class_1070;<init>(Ljava/lang/String;IIIFFI)Vnamed <init>Lnet/minecraft/item/Item$ToolMaterialType;<init>(Ljava/lang/String;IIIFFI)V
-
-
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
-
getMaxDurability
public int getMaxDurability()Getter for maxDurability- Mappings:
Namespace Name Mixin selector official aLain$a;a()Iintermediary method_3399Lnet/minecraft/class_1069$class_1070;method_3399()Inamed getMaxDurabilityLnet/minecraft/item/Item$ToolMaterialType;getMaxDurability()I
-
getMiningSpeedMultiplier
public float getMiningSpeedMultiplier()Getter for SpeedMultiplier- Mappings:
Namespace Name Mixin selector official bLain$a;b()Fintermediary method_3400Lnet/minecraft/class_1069$class_1070;method_3400()Fnamed getMiningSpeedMultiplierLnet/minecraft/item/Item$ToolMaterialType;getMiningSpeedMultiplier()F
-
getAttackMultiplier
public float getAttackMultiplier()Getter for attackMultiplier- Mappings:
Namespace Name Mixin selector official cLain$a;c()Fintermediary method_3401Lnet/minecraft/class_1069$class_1070;method_3401()Fnamed getAttackMultiplierLnet/minecraft/item/Item$ToolMaterialType;getAttackMultiplier()F
-
getMiningLevel
public int getMiningLevel()Getter for miningLevel- Mappings:
Namespace Name Mixin selector official dLain$a;d()Iintermediary method_3402Lnet/minecraft/class_1069$class_1070;method_3402()Inamed getMiningLevelLnet/minecraft/item/Item$ToolMaterialType;getMiningLevel()I
-
getEnchantability
public int getEnchantability()Getter for enchantability- Mappings:
Namespace Name Mixin selector official eLain$a;e()Iintermediary method_3403Lnet/minecraft/class_1069$class_1070;method_3403()Inamed getEnchantabilityLnet/minecraft/item/Item$ToolMaterialType;getEnchantability()I
-
getRepairIngredient
Returns the repair ingredient of the tool material. Currently, this is hardcoded.- Returns:
- Repair Ingredient
- Mappings:
Namespace Name Mixin selector official fLain$a;f()Lain;intermediary method_6370Lnet/minecraft/class_1069$class_1070;method_6370()Lnet/minecraft/class_1069;named getRepairIngredientLnet/minecraft/item/Item$ToolMaterialType;getRepairIngredient()Lnet/minecraft/item/Item;
-