Enum ToolMaterials

java.lang.Object
java.lang.Enum<ToolMaterials>
net.minecraft.item.ToolMaterials
All Implemented Interfaces:
Serializable, Comparable<ToolMaterials>, java.lang.constant.Constable, ToolMaterial

public enum ToolMaterials
extends Enum<ToolMaterials>
implements ToolMaterial
  • Enum Constant Details

  • 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

      private final Lazy<Ingredient> repairIngredient
  • Constructor Details

    • ToolMaterials

      private ToolMaterials​(int miningLevel, int itemDurability, float miningSpeed, float attackDamage, int enchantability, Supplier<Ingredient> repairIngredient)
  • Method Details

    • values

      public static ToolMaterials[] 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 ToolMaterials 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
    • getDurability

      public int getDurability()
      Specified by:
      getDurability in interface ToolMaterial
    • getMiningSpeedMultiplier

      public float getMiningSpeedMultiplier()
      Specified by:
      getMiningSpeedMultiplier in interface ToolMaterial
    • getAttackDamage

      public float getAttackDamage()
      Specified by:
      getAttackDamage in interface ToolMaterial
    • getMiningLevel

      public int getMiningLevel()
      Specified by:
      getMiningLevel in interface ToolMaterial
    • getEnchantability

      public int getEnchantability()
      Specified by:
      getEnchantability in interface ToolMaterial
    • getRepairIngredient

      public Ingredient getRepairIngredient()
      Specified by:
      getRepairIngredient in interface ToolMaterial