Package net.minecraft.enchantment
Record Class Enchantment.Cost
java.lang.Object
java.lang.Record
net.minecraft.enchantment.Enchantment.Cost
- Record Components:
base-perLevel-
- Enclosing class:
Enchantment
- Mappings:
Namespace Name official cyg$aintermediary net/minecraft/class_1887$class_9426named net/minecraft/enchantment/Enchantment$Costofficial aintermediary comp_2504named baseofficial bintermediary comp_2505named perLevel
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintbase()Returns the value of thebaserecord component.final booleanIndicates whether some other object is "equal to" this one.intforLevel(int level) final inthashCode()Returns a hash code value for this object.intperLevel()Returns the value of theperLevelrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
Constructor Details
-
Cost
public Cost(int int2, int int3)
-
-
Method Details
-
forLevel
public int forLevel(int level) - Mappings:
Namespace Name Mixin selector official aLcyg$a;a(I)Iintermediary method_58447Lnet/minecraft/class_1887$class_9426;method_58447(I)Inamed forLevelLnet/minecraft/enchantment/Enchantment$Cost;forLevel(I)I
-
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. All components in this record class are compared with '=='. -
base
public int base()Returns the value of thebaserecord component.- Returns:
- the value of the
baserecord component
-
perLevel
public int perLevel()Returns the value of theperLevelrecord component.- Returns:
- the value of the
perLevelrecord component
-