Package net.minecraft.enchantment
Record Class Enchantment.Cost
java.lang.Object
java.lang.Record
net.minecraft.enchantment.Enchantment.Cost
- Record Components:
base-perLevelAboveFirst-
- Enclosing class:
Enchantment
- Mappings:
Namespace Name named net/minecraft/enchantment/Enchantment$Costintermediary net/minecraft/class_1887$class_9426official dac$bnamed baseintermediary comp_2504official bnamed perLevelAboveFirstintermediary comp_2690official c
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intThe field for thebaserecord component.static final com.mojang.serialization.Codec<Enchantment.Cost> private final intThe field for theperLevelAboveFirstrecord component. -
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.intReturns the value of theperLevelAboveFirstrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
base
private final int baseThe field for thebaserecord component. -
perLevelAboveFirst
private final int perLevelAboveFirstThe field for theperLevelAboveFirstrecord component. -
CODEC
- Mappings:
Namespace Name Mixin selector named CODECLnet/minecraft/enchantment/Enchantment$Cost;CODEC:Lcom/mojang/serialization/Codec;intermediary field_51649Lnet/minecraft/class_1887$class_9426;field_51649:Lcom/mojang/serialization/Codec;official aLdac$b;a:Lcom/mojang/serialization/Codec;
-
-
Constructor Details
-
Cost
public Cost(int int2, int int3)
-
-
Method Details
-
forLevel
public int forLevel(int level) - Mappings:
Namespace Name Mixin selector named forLevelLnet/minecraft/enchantment/Enchantment$Cost;forLevel(I)Iintermediary method_58447Lnet/minecraft/class_1887$class_9426;method_58447(I)Iofficial aLdac$b;a(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
-
perLevelAboveFirst
public int perLevelAboveFirst()Returns the value of theperLevelAboveFirstrecord component.- Returns:
- the value of the
perLevelAboveFirstrecord component
-