Record Class ParticleSpawner
java.lang.Object
java.lang.Record
at.minecraftschurli.mods.arsmagicalegacy.api.client.particle.ParticleSpawner
- Record Components:
particle- TheParticleOptionsto use.count- The amount of particles to spawn.minLifetime- The min lifetime of the particles. Particles will be given a random lifetime between minLifetime and maxLifetime.maxLifetime- The max lifetime of the particles. Particles will be given a random lifetime between minLifetime and maxLifetime.minOffset- The min offset of the particles. Particles will be randomly offset between minOffset and maxOffset.maxOffset- The max offset of the particles. Particles will be randomly offset between minOffset and maxOffset.minSpeed- The min speed of the particles. Particles will be given a random speed between minSpeed and maxSpeed.maxSpeed- The max speed of the particles. Particles will be given a random speed between minSpeed and maxSpeed.gravity- The gravity of the particles.scale- The scale of the particles.color- The color of the particles. May be overridden bySpellStat.COLOR.alpha- The alpha of the particles.controllers- A list ofParticleControllers to addParticleControllerInstances of to the particles.
public record ParticleSpawner(net.minecraft.core.particles.ParticleOptions particle, int count, int minLifetime, int maxLifetime, net.minecraft.world.phys.Vec3 minOffset, net.minecraft.world.phys.Vec3 maxOffset, net.minecraft.world.phys.Vec3 minSpeed, net.minecraft.world.phys.Vec3 maxSpeed, float gravity, float scale, int color, float alpha, List<ParticleController> controllers)
extends Record
Represents a particle spawner. A particle spawner is looked up by id in
ArsMagicaClientApi.spawnParticles(ParticleSpawner, Vec3, int, LivingEntity, Entity, HitResult) and used to spawn particles.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionParticleSpawner(net.minecraft.core.particles.ParticleOptions particle, int count, int minLifetime, int maxLifetime, net.minecraft.world.phys.Vec3 minOffset, net.minecraft.world.phys.Vec3 maxOffset, net.minecraft.world.phys.Vec3 minSpeed, net.minecraft.world.phys.Vec3 maxSpeed, float gravity, float scale, int color, float alpha, List<ParticleController> controllers) Creates an instance of aParticleSpawnerrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfloatalpha()Returns the value of thealpharecord component.intcolor()Returns the value of thecolorrecord component.Returns the value of thecontrollersrecord component.intcount()Returns the value of thecountrecord component.final booleanIndicates whether some other object is "equal to" this one.floatgravity()Returns the value of thegravityrecord component.final inthashCode()Returns a hash code value for this object.intReturns the value of themaxLifetimerecord component.net.minecraft.world.phys.Vec3Returns the value of themaxOffsetrecord component.net.minecraft.world.phys.Vec3maxSpeed()Returns the value of themaxSpeedrecord component.intReturns the value of theminLifetimerecord component.net.minecraft.world.phys.Vec3Returns the value of theminOffsetrecord component.net.minecraft.world.phys.Vec3minSpeed()Returns the value of theminSpeedrecord component.net.minecraft.core.particles.ParticleOptionsparticle()Returns the value of theparticlerecord component.floatscale()Returns the value of thescalerecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
CODEC
-
-
Constructor Details
-
ParticleSpawner
public ParticleSpawner(net.minecraft.core.particles.ParticleOptions particle, int count, int minLifetime, int maxLifetime, net.minecraft.world.phys.Vec3 minOffset, net.minecraft.world.phys.Vec3 maxOffset, net.minecraft.world.phys.Vec3 minSpeed, net.minecraft.world.phys.Vec3 maxSpeed, float gravity, float scale, int color, float alpha, List<ParticleController> controllers) Creates an instance of aParticleSpawnerrecord class.- Parameters:
particle- the value for theparticlerecord componentcount- the value for thecountrecord componentminLifetime- the value for theminLifetimerecord componentmaxLifetime- the value for themaxLifetimerecord componentminOffset- the value for theminOffsetrecord componentmaxOffset- the value for themaxOffsetrecord componentminSpeed- the value for theminSpeedrecord componentmaxSpeed- the value for themaxSpeedrecord componentgravity- the value for thegravityrecord componentscale- the value for thescalerecord componentcolor- the value for thecolorrecord componentalpha- the value for thealpharecord componentcontrollers- the value for thecontrollersrecord component
-
-
Method Details
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
particle
-
count
-
minLifetime
public int minLifetime()Returns the value of theminLifetimerecord component.- Returns:
- the value of the
minLifetimerecord component
-
maxLifetime
public int maxLifetime()Returns the value of themaxLifetimerecord component.- Returns:
- the value of the
maxLifetimerecord component
-
minOffset
-
maxOffset
-
minSpeed
-
maxSpeed
-
gravity
-
scale
-
color
-
alpha
-
controllers
Returns the value of thecontrollersrecord component.- Returns:
- the value of the
controllersrecord component
-