Enum Item.ToolMaterialType

java.lang.Object
java.lang.Enum<Item.ToolMaterialType>
net.minecraft.item.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$a
intermediary net/minecraft/class_2054$class_2055
named net/minecraft/item/Item$ToolMaterialType
  • Enum Constant Details

    • WOOD

      public static final Item.ToolMaterialType WOOD
      Mappings:
      Namespace Name Mixin selector
      official a Lzw$a;a:Lzw$a;
      intermediary field_8641 Lnet/minecraft/class_2054$class_2055;field_8641:Lnet/minecraft/class_2054$class_2055;
      named WOOD Lnet/minecraft/item/Item$ToolMaterialType;WOOD:Lnet/minecraft/item/Item$ToolMaterialType;
    • STONE

      public static final Item.ToolMaterialType STONE
      Mappings:
      Namespace Name Mixin selector
      official b Lzw$a;b:Lzw$a;
      intermediary field_8642 Lnet/minecraft/class_2054$class_2055;field_8642:Lnet/minecraft/class_2054$class_2055;
      named STONE Lnet/minecraft/item/Item$ToolMaterialType;STONE:Lnet/minecraft/item/Item$ToolMaterialType;
    • IRON

      public static final Item.ToolMaterialType IRON
      Mappings:
      Namespace Name Mixin selector
      official c Lzw$a;c:Lzw$a;
      intermediary field_8643 Lnet/minecraft/class_2054$class_2055;field_8643:Lnet/minecraft/class_2054$class_2055;
      named IRON Lnet/minecraft/item/Item$ToolMaterialType;IRON:Lnet/minecraft/item/Item$ToolMaterialType;
    • DIAMOND

      public static final Item.ToolMaterialType DIAMOND
      Mappings:
      Namespace Name Mixin selector
      official d Lzw$a;d:Lzw$a;
      intermediary field_8644 Lnet/minecraft/class_2054$class_2055;field_8644:Lnet/minecraft/class_2054$class_2055;
      named DIAMOND Lnet/minecraft/item/Item$ToolMaterialType;DIAMOND:Lnet/minecraft/item/Item$ToolMaterialType;
    • GOLD

      public static final Item.ToolMaterialType GOLD
      Mappings:
      Namespace Name Mixin selector
      official e Lzw$a;e:Lzw$a;
      intermediary field_8645 Lnet/minecraft/class_2054$class_2055;field_8645:Lnet/minecraft/class_2054$class_2055;
      named GOLD Lnet/minecraft/item/Item$ToolMaterialType;GOLD:Lnet/minecraft/item/Item$ToolMaterialType;
  • Field Details

    • miningLevel

      private final int miningLevel
      The mining level of the tool
      Mappings:
      Namespace Name Mixin selector
      official f Lzw$a;f:I
      intermediary field_8646 Lnet/minecraft/class_2054$class_2055;field_8646:I
      named miningLevel Lnet/minecraft/item/Item$ToolMaterialType;miningLevel:I
    • maxDurability

      private final int maxDurability
      The maximum durability of the tool
      Mappings:
      Namespace Name Mixin selector
      official g Lzw$a;g:I
      intermediary field_8647 Lnet/minecraft/class_2054$class_2055;field_8647:I
      named maxDurability Lnet/minecraft/item/Item$ToolMaterialType;maxDurability:I
    • speedMultiplier

      private final float speedMultiplier
      The mining speed multiplier of the tool
      Mappings:
      Namespace Name Mixin selector
      official h Lzw$a;h:F
      intermediary field_8648 Lnet/minecraft/class_2054$class_2055;field_8648:F
      named speedMultiplier Lnet/minecraft/item/Item$ToolMaterialType;speedMultiplier:F
    • attackMultiplier

      private final float attackMultiplier
      The attack multiplier for the tool
      Mappings:
      Namespace Name Mixin selector
      official i Lzw$a;i:F
      intermediary field_8649 Lnet/minecraft/class_2054$class_2055;field_8649:F
      named attackMultiplier Lnet/minecraft/item/Item$ToolMaterialType;attackMultiplier:F
    • enchantability

      private final int enchantability
      The tool's enchantability
      Mappings:
      Namespace Name Mixin selector
      official j Lzw$a;j:I
      intermediary field_8650 Lnet/minecraft/class_2054$class_2055;field_8650:I
      named enchantability Lnet/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)V
      intermediary <init> Lnet/minecraft/class_2054$class_2055;<init>(Ljava/lang/String;IIIFFI)V
      named <init> Lnet/minecraft/item/Item$ToolMaterialType;<init>(Ljava/lang/String;IIIFFI)V
  • Method Details

    • values

      public static Item.ToolMaterialType[] 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

      public static Item.ToolMaterialType valueOf​(String name)
      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 name
      NullPointerException - if the argument is null
    • getMaxDurability

      public int getMaxDurability()
      Getter for maxDurability
      Mappings:
      Namespace Name Mixin selector
      official a Lzw$a;a()I
      intermediary method_8323 Lnet/minecraft/class_2054$class_2055;method_8323()I
      named getMaxDurability Lnet/minecraft/item/Item$ToolMaterialType;getMaxDurability()I
    • getMiningSpeedMultiplier

      public float getMiningSpeedMultiplier()
      Getter for SpeedMultiplier
      Mappings:
      Namespace Name Mixin selector
      official b Lzw$a;b()F
      intermediary method_8324 Lnet/minecraft/class_2054$class_2055;method_8324()F
      named getMiningSpeedMultiplier Lnet/minecraft/item/Item$ToolMaterialType;getMiningSpeedMultiplier()F
    • getAttackMultiplier

      public float getAttackMultiplier()
      Getter for attackMultiplier
      Mappings:
      Namespace Name Mixin selector
      official c Lzw$a;c()F
      intermediary method_8325 Lnet/minecraft/class_2054$class_2055;method_8325()F
      named getAttackMultiplier Lnet/minecraft/item/Item$ToolMaterialType;getAttackMultiplier()F
    • getMiningLevel

      public int getMiningLevel()
      Getter for miningLevel
      Mappings:
      Namespace Name Mixin selector
      official d Lzw$a;d()I
      intermediary method_8326 Lnet/minecraft/class_2054$class_2055;method_8326()I
      named getMiningLevel Lnet/minecraft/item/Item$ToolMaterialType;getMiningLevel()I
    • getEnchantability

      public int getEnchantability()
      Getter for enchantability
      Mappings:
      Namespace Name Mixin selector
      official e Lzw$a;e()I
      intermediary method_8327 Lnet/minecraft/class_2054$class_2055;method_8327()I
      named getEnchantability Lnet/minecraft/item/Item$ToolMaterialType;getEnchantability()I
    • getRepairIngredient

      public Item getRepairIngredient()
      Returns the repair ingredient of the tool material. Currently, this is hardcoded.
      Returns:
      Repair Ingredient
      Mappings:
      Namespace Name Mixin selector
      official f Lzw$a;f()Lzw;
      intermediary method_8328 Lnet/minecraft/class_2054$class_2055;method_8328()Lnet/minecraft/class_2054;
      named getRepairIngredient Lnet/minecraft/item/Item$ToolMaterialType;getRepairIngredient()Lnet/minecraft/item/Item;