Record Class MultiplyValue
java.lang.Object
java.lang.Record
net.minecraft.world.item.enchantment.effects.MultiplyValue
- All Implemented Interfaces:
EnchantmentValueEffect
public record MultiplyValue(LevelBasedValue factor)
extends Record
implements EnchantmentValueEffect
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<MultiplyValue> private final LevelBasedValueThe field for thefactorrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionMultiplyValue(LevelBasedValue factor) Creates an instance of aMultiplyValuerecord class. -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.MapCodec<MultiplyValue> codec()final booleanIndicates whether some other object is "equal to" this one.factor()Returns the value of thefactorrecord component.final inthashCode()Returns a hash code value for this object.floatprocess(int p_344987_, RandomSource p_344070_, float p_343762_) final StringtoString()Returns a string representation of this record class.
-
Field Details
-
factor
The field for thefactorrecord component. -
CODEC
-
-
Constructor Details
-
MultiplyValue
Creates an instance of aMultiplyValuerecord class.- Parameters:
factor- the value for thefactorrecord 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). -
factor
Returns the value of thefactorrecord component.- Returns:
- the value of the
factorrecord component
-