Record Class Enchantment.class_9427

java.lang.Object
java.lang.Record
net.minecraft.enchantment.Enchantment.class_9427
Record Components:
supportedItems -
primaryItems -
weight -
maxLevel -
minCost -
maxCost -
anvilCost -
slots -
Enclosing class:
Enchantment

public static record Enchantment.class_9427(TagKey<Item> supportedItems, Optional<TagKey<Item>> primaryItems, int weight, int maxLevel, Enchantment.class_9426 minCost, Enchantment.class_9426 maxCost, int anvilCost, EquipmentSlot[] slots) extends Record
Mappings:
Namespace Name
official cyg$b
intermediary net/minecraft/class_1887$class_9427
named net/minecraft/enchantment/Enchantment$class_9427
official a
intermediary comp_2506
named supportedItems
official b
intermediary comp_2507
named primaryItems
official c
intermediary comp_2508
named weight
official d
intermediary comp_2509
named maxLevel
official e
intermediary comp_2510
named minCost
official f
intermediary comp_2511
named maxCost
official g
intermediary comp_2512
named anvilCost
official h
intermediary comp_2513
named slots
  • Field Details

  • Constructor Details

  • Method Details

    • 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.
    • supportedItems

      public TagKey<Item> supportedItems()
      Returns the value of the supportedItems record component.
      Returns:
      the value of the supportedItems record component
    • primaryItems

      public Optional<TagKey<Item>> primaryItems()
      Returns the value of the primaryItems record component.
      Returns:
      the value of the primaryItems record component
    • weight

      public int weight()
      Returns the value of the weight record component.
      Returns:
      the value of the weight record component
    • maxLevel

      public int maxLevel()
      Returns the value of the maxLevel record component.
      Returns:
      the value of the maxLevel record component
    • minCost

      public Enchantment.class_9426 minCost()
      Returns the value of the minCost record component.
      Returns:
      the value of the minCost record component
    • maxCost

      public Enchantment.class_9426 maxCost()
      Returns the value of the maxCost record component.
      Returns:
      the value of the maxCost record component
    • anvilCost

      public int anvilCost()
      Returns the value of the anvilCost record component.
      Returns:
      the value of the anvilCost record component
    • slots

      public EquipmentSlot[] slots()
      Returns the value of the slots record component.
      Returns:
      the value of the slots record component