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
Modifier and TypeFieldDescriptionprivate final FloatProvider
The field for thebase
record component.static final com.mojang.serialization.MapCodec
<SpawnParticlesEffect.VelocitySource> private final float
The field for themovementScale
record component. -
Constructor Summary
ConstructorDescriptionVelocitySource
(float movementScale, FloatProvider base) Creates an instance of aVelocitySource
record class. -
Method Summary
Modifier and TypeMethodDescriptionbase()
Returns the value of thebase
record component.final boolean
Indicates whether some other object is "equal to" this one.double
getVelocity
(double p_344775_, RandomSource p_342972_) final int
hashCode()
Returns a hash code value for this object.float
Returns the value of themovementScale
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
movementScale
private final float movementScaleThe field for themovementScale
record component. -
base
The field for thebase
record component. -
CODEC
-
-
Constructor Details
-
VelocitySource
Creates an instance of aVelocitySource
record class.- Parameters:
movementScale
- the value for themovementScale
record componentbase
- the value for thebase
record 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 themovementScale
record component.- Returns:
- the value of the
movementScale
record component
-
base
Returns the value of thebase
record component.- Returns:
- the value of the
base
record component
-