Enum Class Item.ToolMaterialType

java.lang.Object
java.lang.Enum<Item.ToolMaterialType>
net.minecraft.item.Item.ToolMaterialType
All Implemented Interfaces:
Serializable, Comparable<Item.ToolMaterialType>, 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:
Mappings:
Namespace Name
official afh$a
intermediary net/minecraft/class_1069$class_1070
named net/minecraft/item/Item$ToolMaterialType
  • Enum Constant Details

    • WOOD

      public static final Item.ToolMaterialType WOOD
      Mappings:
      Namespace Name Mixin selector
      official a Lafh$a;a:Lafh$a;
      intermediary field_4365 Lnet/minecraft/class_1069$class_1070;field_4365:Lnet/minecraft/class_1069$class_1070;
      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 Lafh$a;b:Lafh$a;
      intermediary field_4366 Lnet/minecraft/class_1069$class_1070;field_4366:Lnet/minecraft/class_1069$class_1070;
      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 Lafh$a;c:Lafh$a;
      intermediary field_4367 Lnet/minecraft/class_1069$class_1070;field_4367:Lnet/minecraft/class_1069$class_1070;
      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 Lafh$a;d:Lafh$a;
      intermediary field_12305 Lnet/minecraft/class_1069$class_1070;field_12305:Lnet/minecraft/class_1069$class_1070;
      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 Lafh$a;e:Lafh$a;
      intermediary field_4369 Lnet/minecraft/class_1069$class_1070;field_4369:Lnet/minecraft/class_1069$class_1070;
      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 Lafh$a;f:I
      intermediary field_4370 Lnet/minecraft/class_1069$class_1070;field_4370: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 Lafh$a;g:I
      intermediary field_4371 Lnet/minecraft/class_1069$class_1070;field_4371: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 Lafh$a;h:F
      intermediary field_4372 Lnet/minecraft/class_1069$class_1070;field_4372: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 Lafh$a;i:F
      intermediary field_6948 Lnet/minecraft/class_1069$class_1070;field_6948: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 Lafh$a;j:I
      intermediary field_4374 Lnet/minecraft/class_1069$class_1070;field_4374: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> Lafh$a;<init>(Ljava/lang/String;IIIFFI)V
      intermediary <init> Lnet/minecraft/class_1069$class_1070;<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 class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

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

      public int getMaxDurability()
      Getter for maxDurability
      Mappings:
      Namespace Name Mixin selector
      official a Lafh$a;a()I
      intermediary method_3399 Lnet/minecraft/class_1069$class_1070;method_3399()I
      named getMaxDurability Lnet/minecraft/item/Item$ToolMaterialType;getMaxDurability()I
    • getMiningSpeedMultiplier

      public float getMiningSpeedMultiplier()
      Getter for SpeedMultiplier
      Mappings:
      Namespace Name Mixin selector
      official b Lafh$a;b()F
      intermediary method_3400 Lnet/minecraft/class_1069$class_1070;method_3400()F
      named getMiningSpeedMultiplier Lnet/minecraft/item/Item$ToolMaterialType;getMiningSpeedMultiplier()F
    • getAttackMultiplier

      public float getAttackMultiplier()
      Getter for attackMultiplier
      Mappings:
      Namespace Name Mixin selector
      official c Lafh$a;c()F
      intermediary method_3401 Lnet/minecraft/class_1069$class_1070;method_3401()F
      named getAttackMultiplier Lnet/minecraft/item/Item$ToolMaterialType;getAttackMultiplier()F
    • getMiningLevel

      public int getMiningLevel()
      Getter for miningLevel
      Mappings:
      Namespace Name Mixin selector
      official d Lafh$a;d()I
      intermediary method_3402 Lnet/minecraft/class_1069$class_1070;method_3402()I
      named getMiningLevel Lnet/minecraft/item/Item$ToolMaterialType;getMiningLevel()I
    • getEnchantability

      public int getEnchantability()
      Getter for enchantability
      Mappings:
      Namespace Name Mixin selector
      official e Lafh$a;e()I
      intermediary method_3403 Lnet/minecraft/class_1069$class_1070;method_3403()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 Lafh$a;f()Lafh;
      intermediary method_6370 Lnet/minecraft/class_1069$class_1070;method_6370()Lnet/minecraft/class_1069;
      named getRepairIngredient Lnet/minecraft/item/Item$ToolMaterialType;getRepairIngredient()Lnet/minecraft/item/Item;