Record Class ScaleExponentially
java.lang.Object
java.lang.Record
net.minecraft.world.item.enchantment.effects.ScaleExponentially
- All Implemented Interfaces:
EnchantmentValueEffect
public record ScaleExponentially(LevelBasedValue base, LevelBasedValue exponent)
extends Record
implements EnchantmentValueEffect
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final LevelBasedValueThe field for thebaserecord component.static final com.mojang.serialization.MapCodec<ScaleExponentially> private final LevelBasedValueThe field for theexponentrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionScaleExponentially(LevelBasedValue base, LevelBasedValue exponent) Creates an instance of aScaleExponentiallyrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbase()Returns the value of thebaserecord component.com.mojang.serialization.MapCodec<ScaleExponentially> codec()final booleanIndicates whether some other object is "equal to" this one.exponent()Returns the value of theexponentrecord component.final inthashCode()Returns a hash code value for this object.floatprocess(int p_455580_, RandomSource p_455771_, float p_454723_) final StringtoString()Returns a string representation of this record class.
-
Field Details
-
base
The field for thebaserecord component. -
exponent
The field for theexponentrecord component. -
CODEC
-
-
Constructor Details
-
ScaleExponentially
Creates an instance of aScaleExponentiallyrecord class.- Parameters:
base- the value for thebaserecord componentexponent- the value for theexponentrecord component
-
-
Method Details
-
process
- Specified by:
processin interfaceEnchantmentValueEffect
-
codec
- Specified by:
codecin interfaceEnchantmentValueEffect
-
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 withObjects::equals(Object,Object). -
base
Returns the value of thebaserecord component.- Returns:
- the value of the
baserecord component
-
exponent
Returns the value of theexponentrecord component.- Returns:
- the value of the
exponentrecord component
-