Package foundry.veil.api.quasar.data
Record Class ParticleEmitterData
java.lang.Object
java.lang.Record
foundry.veil.api.quasar.data.ParticleEmitterData
- Record Components:
maxLifetime
-loop
- Whether the emitter will loop. Iftrue
, the emitter will reset after maxLifetime ticksrate
- The rate at which particles are emitted. Count particles per rate ticks.count
- The number of particles emitted per rate ticksmaxParticles
- The maximum number of particles to have aliveemitterSettings
- The settings for how to emit particlesparticleDataHolder
- The particle to emit
public record ParticleEmitterData(int maxLifetime, boolean loop, int rate, int count, int maxParticles, EmitterSettings emitterSettings, net.minecraft.core.Holder<QuasarParticleData> particleDataHolder)
extends Record
-
Field Summary
Modifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec
<net.minecraft.core.Holder<ParticleEmitterData>> static final com.mojang.serialization.Codec
<ParticleEmitterData> -
Constructor Summary
ConstructorDescriptionParticleEmitterData
(int maxLifetime, boolean loop, int rate, int count, int maxParticles, EmitterSettings emitterSettings, net.minecraft.core.Holder<QuasarParticleData> particleDataHolder) Creates an instance of aParticleEmitterData
record class. -
Method Summary
Modifier and TypeMethodDescriptionint
count()
Returns the value of thecount
record component.Returns the value of theemitterSettings
record component.final 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.boolean
loop()
Returns the value of theloop
record component.int
Returns the value of themaxLifetime
record component.int
Returns the value of themaxParticles
record component.net.minecraft.core.Holder
<QuasarParticleData> Returns the value of theparticleDataHolder
record component.int
rate()
Returns the value of therate
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<ParticleEmitterData>> CODEC
-
-
Constructor Details
-
ParticleEmitterData
public ParticleEmitterData(int maxLifetime, boolean loop, int rate, int count, int maxParticles, EmitterSettings emitterSettings, net.minecraft.core.Holder<QuasarParticleData> particleDataHolder) Creates an instance of aParticleEmitterData
record class.- Parameters:
maxLifetime
- the value for themaxLifetime
record componentloop
- the value for theloop
record componentrate
- the value for therate
record componentcount
- the value for thecount
record componentmaxParticles
- the value for themaxParticles
record componentemitterSettings
- the value for theemitterSettings
record componentparticleDataHolder
- the value for theparticleDataHolder
record component
-
-
Method Details
-
particleData
-
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 '=='. -
maxLifetime
public int maxLifetime()Returns the value of themaxLifetime
record component.- Returns:
- the value of the
maxLifetime
record component
-
loop
public boolean loop()Returns the value of theloop
record component.- Returns:
- the value of the
loop
record component
-
rate
public int rate()Returns the value of therate
record component.- Returns:
- the value of the
rate
record component
-
count
public int count()Returns the value of thecount
record component.- Returns:
- the value of the
count
record component
-
maxParticles
public int maxParticles()Returns the value of themaxParticles
record component.- Returns:
- the value of the
maxParticles
record component
-
emitterSettings
Returns the value of theemitterSettings
record component.- Returns:
- the value of the
emitterSettings
record component
-
particleDataHolder
Returns the value of theparticleDataHolder
record component.- Returns:
- the value of the
particleDataHolder
record component
-