Record Class EnchantmentData

java.lang.Object
java.lang.Record
org.geysermc.connector.registry.type.EnchantmentData

public record EnchantmentData(int rarityMultiplier, int maxLevel, Set<Enchantment.JavaEnchantment> incompatibleEnchantments, it.unimi.dsi.fastutil.ints.IntSet validItems) extends Record
  • Constructor Details

    • EnchantmentData

      public EnchantmentData(int rarityMultiplier, int maxLevel, Set<Enchantment.JavaEnchantment> incompatibleEnchantments, it.unimi.dsi.fastutil.ints.IntSet validItems)
      Creates an instance of a EnchantmentData record class.
      Parameters:
      rarityMultiplier - the value for the rarityMultiplier record component
      maxLevel - the value for the maxLevel record component
      incompatibleEnchantments - the value for the incompatibleEnchantments record component
      validItems - the value for the validItems record component
  • 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 o)
      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:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • rarityMultiplier

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

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

      public Set<Enchantment.JavaEnchantment> incompatibleEnchantments()
      Returns the value of the incompatibleEnchantments record component.
      Returns:
      the value of the incompatibleEnchantments record component
    • validItems

      public it.unimi.dsi.fastutil.ints.IntSet validItems()
      Returns the value of the validItems record component.
      Returns:
      the value of the validItems record component