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 p_344775_, RandomSource p_342972_) 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
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
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
-