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 enchantmentLevel, RandomSource random, float inputValue) 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
-
hashCode
-
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
-