Package net.minecraft.item
Enum Item.ToolMaterialType
- All Implemented Interfaces:
Serializable,Comparable<Item.ToolMaterialType>,java.lang.constant.Constable
- Enclosing class:
- Item
public static enum Item.ToolMaterialType extends Enum<Item.ToolMaterialType>
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:
ToolItem- Mappings:
Namespace Name official zw$aintermediary net/minecraft/class_2054$class_2055named 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
-
Field Summary
Fields Modifier and Type Field Description private floatattackMultiplierThe attack multiplier for the toolprivate intenchantabilityThe tool's enchantabilityprivate intmaxDurabilityThe maximum durability of the toolprivate intminingLevelThe mining level of the toolprivate floatspeedMultiplierThe mining speed multiplier of the tool -
Constructor Summary
Constructors Modifier Constructor Description privateToolMaterialType(int miningLevel, int maxDurability, float speedMultiplier, float attackMultiplier, int enchantability)Enum constructor -
Method Summary
Modifier and Type Method Description floatgetAttackMultiplier()Getter for attackMultiplierintgetEnchantability()Getter for enchantabilityintgetMaxDurability()Getter for maxDurabilityintgetMiningLevel()Getter for miningLevelfloatgetMiningSpeedMultiplier()Getter for SpeedMultiplierItemgetRepairIngredient()Returns the repair ingredient of the tool material.static Item.ToolMaterialTypevalueOf(String name)Returns the enum constant of this type with the specified name.static Item.ToolMaterialType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
WOOD
- Mappings:
Namespace Name Mixin selector official aLzw$a;a:Lzw$a;intermediary field_8641Lnet/minecraft/class_2054$class_2055;field_8641:Lnet/minecraft/class_2054$class_2055;named WOODLnet/minecraft/item/Item$ToolMaterialType;WOOD:Lnet/minecraft/item/Item$ToolMaterialType;
-
STONE
- Mappings:
Namespace Name Mixin selector official bLzw$a;b:Lzw$a;intermediary field_8642Lnet/minecraft/class_2054$class_2055;field_8642:Lnet/minecraft/class_2054$class_2055;named STONELnet/minecraft/item/Item$ToolMaterialType;STONE:Lnet/minecraft/item/Item$ToolMaterialType;
-
IRON
- Mappings:
Namespace Name Mixin selector official cLzw$a;c:Lzw$a;intermediary field_8643Lnet/minecraft/class_2054$class_2055;field_8643:Lnet/minecraft/class_2054$class_2055;named IRONLnet/minecraft/item/Item$ToolMaterialType;IRON:Lnet/minecraft/item/Item$ToolMaterialType;
-
DIAMOND
- Mappings:
Namespace Name Mixin selector official dLzw$a;d:Lzw$a;intermediary field_8644Lnet/minecraft/class_2054$class_2055;field_8644:Lnet/minecraft/class_2054$class_2055;named DIAMONDLnet/minecraft/item/Item$ToolMaterialType;DIAMOND:Lnet/minecraft/item/Item$ToolMaterialType;
-
GOLD
- Mappings:
Namespace Name Mixin selector official eLzw$a;e:Lzw$a;intermediary field_8645Lnet/minecraft/class_2054$class_2055;field_8645:Lnet/minecraft/class_2054$class_2055;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 fLzw$a;f:Iintermediary field_8646Lnet/minecraft/class_2054$class_2055;field_8646:Inamed miningLevelLnet/minecraft/item/Item$ToolMaterialType;miningLevel:I
-
maxDurability
private final int maxDurabilityThe maximum durability of the tool- Mappings:
Namespace Name Mixin selector official gLzw$a;g:Iintermediary field_8647Lnet/minecraft/class_2054$class_2055;field_8647: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 hLzw$a;h:Fintermediary field_8648Lnet/minecraft/class_2054$class_2055;field_8648:Fnamed speedMultiplierLnet/minecraft/item/Item$ToolMaterialType;speedMultiplier:F
-
attackMultiplier
private final float attackMultiplierThe attack multiplier for the tool- Mappings:
Namespace Name Mixin selector official iLzw$a;i:Fintermediary field_8649Lnet/minecraft/class_2054$class_2055;field_8649:Fnamed attackMultiplierLnet/minecraft/item/Item$ToolMaterialType;attackMultiplier:F
-
enchantability
private final int enchantabilityThe tool's enchantability- Mappings:
Namespace Name Mixin selector official jLzw$a;j:Iintermediary field_8650Lnet/minecraft/class_2054$class_2055;field_8650: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>Lzw$a;<init>(Ljava/lang/String;IIIFFI)Vintermediary <init>Lnet/minecraft/class_2054$class_2055;<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 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
-
getMaxDurability
public int getMaxDurability()Getter for maxDurability- Mappings:
Namespace Name Mixin selector official aLzw$a;a()Iintermediary method_8323Lnet/minecraft/class_2054$class_2055;method_8323()Inamed getMaxDurabilityLnet/minecraft/item/Item$ToolMaterialType;getMaxDurability()I
-
getMiningSpeedMultiplier
public float getMiningSpeedMultiplier()Getter for SpeedMultiplier- Mappings:
Namespace Name Mixin selector official bLzw$a;b()Fintermediary method_8324Lnet/minecraft/class_2054$class_2055;method_8324()Fnamed getMiningSpeedMultiplierLnet/minecraft/item/Item$ToolMaterialType;getMiningSpeedMultiplier()F
-
getAttackMultiplier
public float getAttackMultiplier()Getter for attackMultiplier- Mappings:
Namespace Name Mixin selector official cLzw$a;c()Fintermediary method_8325Lnet/minecraft/class_2054$class_2055;method_8325()Fnamed getAttackMultiplierLnet/minecraft/item/Item$ToolMaterialType;getAttackMultiplier()F
-
getMiningLevel
public int getMiningLevel()Getter for miningLevel- Mappings:
Namespace Name Mixin selector official dLzw$a;d()Iintermediary method_8326Lnet/minecraft/class_2054$class_2055;method_8326()Inamed getMiningLevelLnet/minecraft/item/Item$ToolMaterialType;getMiningLevel()I
-
getEnchantability
public int getEnchantability()Getter for enchantability- Mappings:
Namespace Name Mixin selector official eLzw$a;e()Iintermediary method_8327Lnet/minecraft/class_2054$class_2055;method_8327()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 fLzw$a;f()Lzw;intermediary method_8328Lnet/minecraft/class_2054$class_2055;method_8328()Lnet/minecraft/class_2054;named getRepairIngredientLnet/minecraft/item/Item$ToolMaterialType;getRepairIngredient()Lnet/minecraft/item/Item;
-