Record Class ParticleSpawner

java.lang.Object
java.lang.Record
at.minecraftschurli.mods.arsmagicalegacy.api.client.particle.ParticleSpawner
Record Components:
particle - The ParticleOptions to 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 by SpellStat.COLOR.
alpha - The alpha of the particles.
controllers - A list of ParticleControllers to add ParticleControllerInstances 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
    Modifier and Type
    Field
    Description
    static final com.mojang.serialization.Codec<ParticleSpawner>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    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 a ParticleSpawner record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    float
    Returns the value of the alpha record component.
    int
    Returns the value of the color record component.
    Returns the value of the controllers record component.
    int
    Returns the value of the count record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    float
    Returns the value of the gravity record component.
    final int
    Returns a hash code value for this object.
    int
    Returns the value of the maxLifetime record component.
    net.minecraft.world.phys.Vec3
    Returns the value of the maxOffset record component.
    net.minecraft.world.phys.Vec3
    Returns the value of the maxSpeed record component.
    int
    Returns the value of the minLifetime record component.
    net.minecraft.world.phys.Vec3
    Returns the value of the minOffset record component.
    net.minecraft.world.phys.Vec3
    Returns the value of the minSpeed record component.
    net.minecraft.core.particles.ParticleOptions
    Returns the value of the particle record component.
    float
    Returns the value of the scale record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class Object

    getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • CODEC

      public static final com.mojang.serialization.Codec<ParticleSpawner> 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 a ParticleSpawner record class.
      Parameters:
      particle - the value for the particle record component
      count - the value for the count record component
      minLifetime - the value for the minLifetime record component
      maxLifetime - the value for the maxLifetime record component
      minOffset - the value for the minOffset record component
      maxOffset - the value for the maxOffset record component
      minSpeed - the value for the minSpeed record component
      maxSpeed - the value for the maxSpeed record component
      gravity - the value for the gravity record component
      scale - the value for the scale record component
      color - the value for the color record component
      alpha - the value for the alpha record component
      controllers - the value for the controllers record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • particle

      public net.minecraft.core.particles.ParticleOptions particle()
      Returns the value of the particle record component.
      Returns:
      the value of the particle record component
    • count

      public int count()
      Returns the value of the count record component.
      Returns:
      the value of the count record component
    • minLifetime

      public int minLifetime()
      Returns the value of the minLifetime record component.
      Returns:
      the value of the minLifetime record component
    • maxLifetime

      public int maxLifetime()
      Returns the value of the maxLifetime record component.
      Returns:
      the value of the maxLifetime record component
    • minOffset

      public net.minecraft.world.phys.Vec3 minOffset()
      Returns the value of the minOffset record component.
      Returns:
      the value of the minOffset record component
    • maxOffset

      public net.minecraft.world.phys.Vec3 maxOffset()
      Returns the value of the maxOffset record component.
      Returns:
      the value of the maxOffset record component
    • minSpeed

      public net.minecraft.world.phys.Vec3 minSpeed()
      Returns the value of the minSpeed record component.
      Returns:
      the value of the minSpeed record component
    • maxSpeed

      public net.minecraft.world.phys.Vec3 maxSpeed()
      Returns the value of the maxSpeed record component.
      Returns:
      the value of the maxSpeed record component
    • gravity

      public float gravity()
      Returns the value of the gravity record component.
      Returns:
      the value of the gravity record component
    • scale

      public float scale()
      Returns the value of the scale record component.
      Returns:
      the value of the scale record component
    • color

      public int color()
      Returns the value of the color record component.
      Returns:
      the value of the color record component
    • alpha

      public float alpha()
      Returns the value of the alpha record component.
      Returns:
      the value of the alpha record component
    • controllers

      public List<ParticleController> controllers()
      Returns the value of the controllers record component.
      Returns:
      the value of the controllers record component