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
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<net.minecraft.core.Holder<ParticleEmitterData>> static final com.mojang.serialization.Codec<ParticleEmitterData> -
Constructor Summary
ConstructorsConstructorDescriptionParticleEmitterData(int maxLifetime, boolean loop, int rate, int count, int maxParticles, EmitterSettings emitterSettings, net.minecraft.core.Holder<QuasarParticleData> particleDataHolder) Creates an instance of aParticleEmitterDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionintcount()Returns the value of thecountrecord component.Returns the value of theemitterSettingsrecord component.final booleanIndicates whether some other object is "equal to" this one.@Nullable net.minecraft.resources.ResourceLocationfinal inthashCode()Returns a hash code value for this object.booleanloop()Returns the value of thelooprecord component.intReturns the value of themaxLifetimerecord component.intReturns the value of themaxParticlesrecord component.net.minecraft.core.Holder<QuasarParticleData> Returns the value of theparticleDataHolderrecord component.intrate()Returns the value of theraterecord 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<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 aParticleEmitterDatarecord class.- Parameters:
maxLifetime- the value for themaxLifetimerecord componentloop- the value for thelooprecord componentrate- the value for theraterecord componentcount- the value for thecountrecord componentmaxParticles- the value for themaxParticlesrecord componentemitterSettings- the value for theemitterSettingsrecord componentparticleDataHolder- the value for theparticleDataHolderrecord 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 themaxLifetimerecord component.- Returns:
- the value of the
maxLifetimerecord component
-
loop
public boolean loop()Returns the value of thelooprecord component.- Returns:
- the value of the
looprecord component
-
rate
public int rate()Returns the value of theraterecord component.- Returns:
- the value of the
raterecord component
-
count
public int count()Returns the value of thecountrecord component.- Returns:
- the value of the
countrecord component
-
maxParticles
public int maxParticles()Returns the value of themaxParticlesrecord component.- Returns:
- the value of the
maxParticlesrecord component
-
emitterSettings
Returns the value of theemitterSettingsrecord component.- Returns:
- the value of the
emitterSettingsrecord component
-
particleDataHolder
Returns the value of theparticleDataHolderrecord component.- Returns:
- the value of the
particleDataHolderrecord component
-