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 Summary
ConstructorsConstructorDescriptionEnchantmentData(int rarityMultiplier, int maxLevel, Set<Enchantment.JavaEnchantment> incompatibleEnchantments, it.unimi.dsi.fastutil.ints.IntSet validItems)Creates an instance of aEnchantmentDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanIndicates whether some other object is "equal to" this one.inthashCode()Returns a hash code value for this object.Returns the value of theincompatibleEnchantmentsrecord component.intmaxLevel()Returns the value of themaxLevelrecord component.intReturns the value of therarityMultiplierrecord component.toString()Returns a string representation of this record class.it.unimi.dsi.fastutil.ints.IntSetReturns the value of thevalidItemsrecord component.
-
Constructor Details
-
EnchantmentData
public EnchantmentData(int rarityMultiplier, int maxLevel, Set<Enchantment.JavaEnchantment> incompatibleEnchantments, it.unimi.dsi.fastutil.ints.IntSet validItems)Creates an instance of aEnchantmentDatarecord class.- Parameters:
rarityMultiplier- the value for therarityMultiplierrecord componentmaxLevel- the value for themaxLevelrecord componentincompatibleEnchantments- the value for theincompatibleEnchantmentsrecord componentvalidItems- the value for thevalidItemsrecord component
-
-
Method Details
-
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. -
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
rarityMultiplier
public int rarityMultiplier()Returns the value of therarityMultiplierrecord component.- Returns:
- the value of the
rarityMultiplierrecord component
-
maxLevel
public int maxLevel()Returns the value of themaxLevelrecord component.- Returns:
- the value of the
maxLevelrecord component
-
incompatibleEnchantments
Returns the value of theincompatibleEnchantmentsrecord component.- Returns:
- the value of the
incompatibleEnchantmentsrecord component
-
validItems
public it.unimi.dsi.fastutil.ints.IntSet validItems()Returns the value of thevalidItemsrecord component.- Returns:
- the value of the
validItemsrecord component
-