Package foundry.veil.api.quasar.data
Record Class ParticleSettings
java.lang.Object
java.lang.Record
foundry.veil.api.quasar.data.ParticleSettings
public record ParticleSettings(float particleSpeed, float particleSize, float particleSizeVariation, int particleLifetime, float particleLifetimeVariation, org.joml.Vector3fc initialDirection, boolean randomInitialDirection, boolean randomInitialRotation, boolean randomSpeed, boolean randomSize, boolean randomLifetime)
extends Record
-
Field Summary
Modifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec
<net.minecraft.core.Holder<ParticleSettings>> static final com.mojang.serialization.Codec
<ParticleSettings> -
Constructor Summary
ConstructorDescriptionParticleSettings
(float particleSpeed, float particleSize, float particleSizeVariation, int particleLifetime, float particleLifetimeVariation, org.joml.Vector3fc initialDirection, boolean randomInitialDirection, boolean randomInitialRotation, boolean randomSpeed, boolean randomSize, boolean randomLifetime) Creates an instance of aParticleSettings
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.@Nullable net.minecraft.resources.ResourceLocation
final int
hashCode()
Returns a hash code value for this object.org.joml.Vector3fc
Returns the value of theinitialDirection
record component.org.joml.Vector3fc
initialDirection
(net.minecraft.util.RandomSource random) org.joml.Vector3f
particleDirection
(net.minecraft.util.RandomSource random) int
Returns the value of theparticleLifetime
record component.int
particleLifetime
(net.minecraft.util.RandomSource random) float
Returns the value of theparticleLifetimeVariation
record component.float
Returns the value of theparticleSize
record component.float
particleSize
(net.minecraft.util.RandomSource random) float
Returns the value of theparticleSizeVariation
record component.float
Returns the value of theparticleSpeed
record component.float
particleSpeed
(net.minecraft.util.RandomSource random) boolean
Returns the value of therandomInitialDirection
record component.boolean
Returns the value of therandomInitialRotation
record component.boolean
Returns the value of therandomLifetime
record component.boolean
Returns the value of therandomSize
record component.boolean
Returns the value of therandomSpeed
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
DIRECT_CODEC
-
CODEC
public static final com.mojang.serialization.Codec<net.minecraft.core.Holder<ParticleSettings>> CODEC
-
-
Constructor Details
-
ParticleSettings
public ParticleSettings(float particleSpeed, float particleSize, float particleSizeVariation, int particleLifetime, float particleLifetimeVariation, org.joml.Vector3fc initialDirection, boolean randomInitialDirection, boolean randomInitialRotation, boolean randomSpeed, boolean randomSize, boolean randomLifetime) Creates an instance of aParticleSettings
record class.- Parameters:
particleSpeed
- the value for theparticleSpeed
record componentparticleSize
- the value for theparticleSize
record componentparticleSizeVariation
- the value for theparticleSizeVariation
record componentparticleLifetime
- the value for theparticleLifetime
record componentparticleLifetimeVariation
- the value for theparticleLifetimeVariation
record componentinitialDirection
- the value for theinitialDirection
record componentrandomInitialDirection
- the value for therandomInitialDirection
record componentrandomInitialRotation
- the value for therandomInitialRotation
record componentrandomSpeed
- the value for therandomSpeed
record componentrandomSize
- the value for therandomSize
record componentrandomLifetime
- the value for therandomLifetime
record component
-
-
Method Details
-
particleSpeed
public float particleSpeed(net.minecraft.util.RandomSource random) -
particleSize
public float particleSize(net.minecraft.util.RandomSource random) -
particleLifetime
public int particleLifetime(net.minecraft.util.RandomSource random) -
initialDirection
public org.joml.Vector3fc initialDirection(net.minecraft.util.RandomSource random) -
particleDirection
public org.joml.Vector3f particleDirection(net.minecraft.util.RandomSource random) -
getRegistryId
@Nullable public @Nullable net.minecraft.resources.ResourceLocation getRegistryId() -
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 '=='. -
particleSpeed
public float particleSpeed()Returns the value of theparticleSpeed
record component.- Returns:
- the value of the
particleSpeed
record component
-
particleSize
public float particleSize()Returns the value of theparticleSize
record component.- Returns:
- the value of the
particleSize
record component
-
particleSizeVariation
public float particleSizeVariation()Returns the value of theparticleSizeVariation
record component.- Returns:
- the value of the
particleSizeVariation
record component
-
particleLifetime
public int particleLifetime()Returns the value of theparticleLifetime
record component.- Returns:
- the value of the
particleLifetime
record component
-
particleLifetimeVariation
public float particleLifetimeVariation()Returns the value of theparticleLifetimeVariation
record component.- Returns:
- the value of the
particleLifetimeVariation
record component
-
initialDirection
public org.joml.Vector3fc initialDirection()Returns the value of theinitialDirection
record component.- Returns:
- the value of the
initialDirection
record component
-
randomInitialDirection
public boolean randomInitialDirection()Returns the value of therandomInitialDirection
record component.- Returns:
- the value of the
randomInitialDirection
record component
-
randomInitialRotation
public boolean randomInitialRotation()Returns the value of therandomInitialRotation
record component.- Returns:
- the value of the
randomInitialRotation
record component
-
randomSpeed
public boolean randomSpeed()Returns the value of therandomSpeed
record component.- Returns:
- the value of the
randomSpeed
record component
-
randomSize
public boolean randomSize()Returns the value of therandomSize
record component.- Returns:
- the value of the
randomSize
record component
-
randomLifetime
public boolean randomLifetime()Returns the value of therandomLifetime
record component.- Returns:
- the value of the
randomLifetime
record component
-