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
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<net.minecraft.core.Holder<ParticleSettings>> static final com.mojang.serialization.Codec<ParticleSettings> -
Constructor Summary
ConstructorsConstructorDescriptionParticleSettings(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 aParticleSettingsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.@Nullable net.minecraft.resources.ResourceLocationfinal inthashCode()Returns a hash code value for this object.org.joml.Vector3fcReturns the value of theinitialDirectionrecord component.org.joml.Vector3fcinitialDirection(net.minecraft.util.RandomSource random) org.joml.Vector3fparticleDirection(net.minecraft.util.RandomSource random) intReturns the value of theparticleLifetimerecord component.intparticleLifetime(net.minecraft.util.RandomSource random) floatReturns the value of theparticleLifetimeVariationrecord component.floatReturns the value of theparticleSizerecord component.floatparticleSize(net.minecraft.util.RandomSource random) floatReturns the value of theparticleSizeVariationrecord component.floatReturns the value of theparticleSpeedrecord component.floatparticleSpeed(net.minecraft.util.RandomSource random) booleanReturns the value of therandomInitialDirectionrecord component.booleanReturns the value of therandomInitialRotationrecord component.booleanReturns the value of therandomLifetimerecord component.booleanReturns the value of therandomSizerecord component.booleanReturns the value of therandomSpeedrecord component.final StringtoString()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 aParticleSettingsrecord class.- Parameters:
particleSpeed- the value for theparticleSpeedrecord componentparticleSize- the value for theparticleSizerecord componentparticleSizeVariation- the value for theparticleSizeVariationrecord componentparticleLifetime- the value for theparticleLifetimerecord componentparticleLifetimeVariation- the value for theparticleLifetimeVariationrecord componentinitialDirection- the value for theinitialDirectionrecord componentrandomInitialDirection- the value for therandomInitialDirectionrecord componentrandomInitialRotation- the value for therandomInitialRotationrecord componentrandomSpeed- the value for therandomSpeedrecord componentrandomSize- the value for therandomSizerecord componentrandomLifetime- the value for therandomLifetimerecord 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 theparticleSpeedrecord component.- Returns:
- the value of the
particleSpeedrecord component
-
particleSize
public float particleSize()Returns the value of theparticleSizerecord component.- Returns:
- the value of the
particleSizerecord component
-
particleSizeVariation
public float particleSizeVariation()Returns the value of theparticleSizeVariationrecord component.- Returns:
- the value of the
particleSizeVariationrecord component
-
particleLifetime
public int particleLifetime()Returns the value of theparticleLifetimerecord component.- Returns:
- the value of the
particleLifetimerecord component
-
particleLifetimeVariation
public float particleLifetimeVariation()Returns the value of theparticleLifetimeVariationrecord component.- Returns:
- the value of the
particleLifetimeVariationrecord component
-
initialDirection
public org.joml.Vector3fc initialDirection()Returns the value of theinitialDirectionrecord component.- Returns:
- the value of the
initialDirectionrecord component
-
randomInitialDirection
public boolean randomInitialDirection()Returns the value of therandomInitialDirectionrecord component.- Returns:
- the value of the
randomInitialDirectionrecord component
-
randomInitialRotation
public boolean randomInitialRotation()Returns the value of therandomInitialRotationrecord component.- Returns:
- the value of the
randomInitialRotationrecord component
-
randomSpeed
public boolean randomSpeed()Returns the value of therandomSpeedrecord component.- Returns:
- the value of the
randomSpeedrecord component
-
randomSize
public boolean randomSize()Returns the value of therandomSizerecord component.- Returns:
- the value of the
randomSizerecord component
-
randomLifetime
public boolean randomLifetime()Returns the value of therandomLifetimerecord component.- Returns:
- the value of the
randomLifetimerecord component
-