Record Class SpawnParticlesEffect.VelocitySource
java.lang.Object
java.lang.Record
net.minecraft.world.item.enchantment.effects.SpawnParticlesEffect.VelocitySource
- Enclosing class:
SpawnParticlesEffect
public static record SpawnParticlesEffect.VelocitySource(float movementScale, FloatProvider base)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final FloatProviderThe field for thebaserecord component.static final com.mojang.serialization.MapCodec<SpawnParticlesEffect.VelocitySource> private final floatThe field for themovementScalerecord component. -
Constructor Summary
ConstructorsConstructorDescriptionVelocitySource(float movementScale, FloatProvider base) Creates an instance of aVelocitySourcerecord class. -
Method Summary
Modifier and TypeMethodDescriptionbase()Returns the value of thebaserecord component.final booleanIndicates whether some other object is "equal to" this one.doublegetVelocity(double movement, RandomSource random) final inthashCode()Returns a hash code value for this object.floatReturns the value of themovementScalerecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
movementScale
private final float movementScaleThe field for themovementScalerecord component. -
base
The field for thebaserecord component. -
CODEC
-
-
Constructor Details
-
VelocitySource
Creates an instance of aVelocitySourcerecord class.- Parameters:
movementScale- the value for themovementScalerecord componentbase- the value for thebaserecord component
-
-
Method Details
-
getVelocity
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
movementScale
public float movementScale()Returns the value of themovementScalerecord component.- Returns:
- the value of the
movementScalerecord component
-
base
Returns the value of thebaserecord component.- Returns:
- the value of the
baserecord component
-