Record Class ToolMaterial

java.lang.Object
java.lang.Record
net.minecraft.item.ToolMaterial
Record Components:
incorrectBlocksForDrops -
durability -
speed -
attackDamageBonus -
enchantmentValue -
repairItems -

public record ToolMaterial(TagKey<Block> incorrectBlocksForDrops, int durability, float speed, float attackDamageBonus, int enchantmentValue, TagKey<Item> repairItems) extends Record
Mappings:
Namespace Name
named net/minecraft/item/ToolMaterial
intermediary net/minecraft/class_9886
official czf
named incorrectBlocksForDrops
intermediary comp_2930
official g
named durability
intermediary comp_2931
official h
named speed
intermediary comp_2932
official i
named attackDamageBonus
intermediary comp_2933
official j
named enchantmentValue
intermediary comp_2934
official k
named repairItems
intermediary comp_2935
official l
  • Field Details

    • incorrectBlocksForDrops

      private final TagKey<Block> incorrectBlocksForDrops
      The field for the incorrectBlocksForDrops record component.
    • durability

      private final int durability
      The field for the durability record component.
    • speed

      private final float speed
      The field for the speed record component.
    • attackDamageBonus

      private final float attackDamageBonus
      The field for the attackDamageBonus record component.
    • enchantmentValue

      private final int enchantmentValue
      The field for the enchantmentValue record component.
    • repairItems

      private final TagKey<Item> repairItems
      The field for the repairItems record component.
    • WOOD

      public static final ToolMaterial WOOD
      Mappings:
      Namespace Name Mixin selector
      named WOOD Lnet/minecraft/item/ToolMaterial;WOOD:Lnet/minecraft/item/ToolMaterial;
      intermediary field_52585 Lnet/minecraft/class_9886;field_52585:Lnet/minecraft/class_9886;
      official a Lczf;a:Lczf;
    • STONE

      public static final ToolMaterial STONE
      Mappings:
      Namespace Name Mixin selector
      named STONE Lnet/minecraft/item/ToolMaterial;STONE:Lnet/minecraft/item/ToolMaterial;
      intermediary field_52586 Lnet/minecraft/class_9886;field_52586:Lnet/minecraft/class_9886;
      official b Lczf;b:Lczf;
    • IRON

      public static final ToolMaterial IRON
      Mappings:
      Namespace Name Mixin selector
      named IRON Lnet/minecraft/item/ToolMaterial;IRON:Lnet/minecraft/item/ToolMaterial;
      intermediary field_52587 Lnet/minecraft/class_9886;field_52587:Lnet/minecraft/class_9886;
      official c Lczf;c:Lczf;
    • DIAMOND

      public static final ToolMaterial DIAMOND
      Mappings:
      Namespace Name Mixin selector
      named DIAMOND Lnet/minecraft/item/ToolMaterial;DIAMOND:Lnet/minecraft/item/ToolMaterial;
      intermediary field_52588 Lnet/minecraft/class_9886;field_52588:Lnet/minecraft/class_9886;
      official d Lczf;d:Lczf;
    • GOLD

      public static final ToolMaterial GOLD
      Mappings:
      Namespace Name Mixin selector
      named GOLD Lnet/minecraft/item/ToolMaterial;GOLD:Lnet/minecraft/item/ToolMaterial;
      intermediary field_52589 Lnet/minecraft/class_9886;field_52589:Lnet/minecraft/class_9886;
      official e Lczf;e:Lczf;
    • NETHERITE

      public static final ToolMaterial NETHERITE
      Mappings:
      Namespace Name Mixin selector
      named NETHERITE Lnet/minecraft/item/ToolMaterial;NETHERITE:Lnet/minecraft/item/ToolMaterial;
      intermediary field_52590 Lnet/minecraft/class_9886;field_52590:Lnet/minecraft/class_9886;
      official f Lczf;f:Lczf;
  • Constructor Details

    • ToolMaterial

      public ToolMaterial(TagKey<Block> tagKey, int int2, float float2, float float3, int int3, TagKey<Item> tagKey2)
  • Method Details

    • applyBaseSettings

      private Item.Settings applyBaseSettings(Item.Settings settings)
      Mappings:
      Namespace Name Mixin selector
      named applyBaseSettings Lnet/minecraft/item/ToolMaterial;applyBaseSettings(Lnet/minecraft/item/Item$Settings;)Lnet/minecraft/item/Item$Settings;
      intermediary method_61661 Lnet/minecraft/class_9886;method_61661(Lnet/minecraft/class_1792$class_1793;)Lnet/minecraft/class_1792$class_1793;
      official a Lczf;a(Lcxk$a;)Lcxk$a;
    • applyToolSettings

      public Item.Settings applyToolSettings(Item.Settings settings, TagKey<Block> effectiveBlocks, float attackDamage, float attackSpeed)
      Mappings:
      Namespace Name Mixin selector
      named applyToolSettings Lnet/minecraft/item/ToolMaterial;applyToolSettings(Lnet/minecraft/item/Item$Settings;Lnet/minecraft/registry/tag/TagKey;FF)Lnet/minecraft/item/Item$Settings;
      intermediary method_61663 Lnet/minecraft/class_9886;method_61663(Lnet/minecraft/class_1792$class_1793;Lnet/minecraft/class_6862;FF)Lnet/minecraft/class_1792$class_1793;
      official a Lczf;a(Lcxk$a;Layk;FF)Lcxk$a;
    • createToolAttributeModifiers

      private AttributeModifiersComponent createToolAttributeModifiers(float attackDamage, float attackSpeed)
      Mappings:
      Namespace Name Mixin selector
      named createToolAttributeModifiers Lnet/minecraft/item/ToolMaterial;createToolAttributeModifiers(FF)Lnet/minecraft/component/type/AttributeModifiersComponent;
      intermediary method_61660 Lnet/minecraft/class_9886;method_61660(FF)Lnet/minecraft/class_9285;
      official a Lczf;a(FF)Ldaf;
    • applySwordSettings

      public Item.Settings applySwordSettings(Item.Settings settings, float attackDamage, float attackSpeed)
      Mappings:
      Namespace Name Mixin selector
      named applySwordSettings Lnet/minecraft/item/ToolMaterial;applySwordSettings(Lnet/minecraft/item/Item$Settings;FF)Lnet/minecraft/item/Item$Settings;
      intermediary method_61662 Lnet/minecraft/class_9886;method_61662(Lnet/minecraft/class_1792$class_1793;FF)Lnet/minecraft/class_1792$class_1793;
      official a Lczf;a(Lcxk$a;FF)Lcxk$a;
    • createSwordAttributeModifiers

      private AttributeModifiersComponent createSwordAttributeModifiers(float attackDamage, float attackSpeed)
      Mappings:
      Namespace Name Mixin selector
      named createSwordAttributeModifiers Lnet/minecraft/item/ToolMaterial;createSwordAttributeModifiers(FF)Lnet/minecraft/component/type/AttributeModifiersComponent;
      intermediary method_61664 Lnet/minecraft/class_9886;method_61664(FF)Lnet/minecraft/class_9285;
      official b Lczf;b(FF)Ldaf;
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object object)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      object - the object with which to compare
      Returns:
      true if this object is the same as the object argument; false otherwise.
    • incorrectBlocksForDrops

      public TagKey<Block> incorrectBlocksForDrops()
      Returns the value of the incorrectBlocksForDrops record component.
      Returns:
      the value of the incorrectBlocksForDrops record component
    • durability

      public int durability()
      Returns the value of the durability record component.
      Returns:
      the value of the durability record component
    • speed

      public float speed()
      Returns the value of the speed record component.
      Returns:
      the value of the speed record component
    • attackDamageBonus

      public float attackDamageBonus()
      Returns the value of the attackDamageBonus record component.
      Returns:
      the value of the attackDamageBonus record component
    • enchantmentValue

      public int enchantmentValue()
      Returns the value of the enchantmentValue record component.
      Returns:
      the value of the enchantmentValue record component
    • repairItems

      public TagKey<Item> repairItems()
      Returns the value of the repairItems record component.
      Returns:
      the value of the repairItems record component