Class QuasarParticleData

java.lang.Object
foundry.veil.api.quasar.data.QuasarParticleData

public final class QuasarParticleData extends Object

Data passed to each particle when it is created.

This class is used to store all the data that is passed to each particle when it is created. This includes the particle settings, whether or not the particle should collide with blocks, whether or not the particle should face its velocity, and the list of sub emitters.

This class also stores the list of particle modules that are applied to each particle. These modules are used to modify the particle's behavior. The following are valid particle modules:

  • Init Modules - Applied when a particle is created
  • Update Modules - Applied at the beginning of the particle tick
  • Collision Modules - Applied when the particle collides with a block or entity
  • Force Modules - Applied each physics tick to update velocity
  • Render Modules - Applied when the particle is rendered
See Also:
  • Field Details

    • DIRECT_CODEC

      public static final com.mojang.serialization.Codec<QuasarParticleData> DIRECT_CODEC
    • CODEC

      public static final com.mojang.serialization.Codec<net.minecraft.core.Holder<QuasarParticleData>> CODEC
  • Constructor Details

    • QuasarParticleData

      public QuasarParticleData(boolean shouldCollide, boolean faceVelocity, float velocityStretchFactor, List<net.minecraft.core.Holder<ParticleModuleData>> modules, @Nullable @Nullable SpriteData spriteData, boolean additive, RenderStyle renderStyle)
  • Method Details

    • getRegistryId

      @Nullable public @Nullable net.minecraft.resources.ResourceLocation getRegistryId()
    • shouldCollide

      public boolean shouldCollide()
    • setShouldCollide

      public void setShouldCollide(boolean shouldCollide)
      Since:
      4.3.0
    • faceVelocity

      public boolean faceVelocity()
    • setFaceVelocity

      public void setFaceVelocity(boolean faceVelocity)
      Since:
      4.3.0
    • velocityStretchFactor

      public float velocityStretchFactor()
    • setVelocityStretchFactor

      public void setVelocityStretchFactor(float velocityStretchFactor)
      Since:
      4.3.0
    • getAllModules

      @ScheduledForRemoval(inVersion="5.0.0") @Deprecated public List<net.minecraft.core.Holder<ParticleModuleData>> getAllModules()
      Deprecated.
      Use modules() instead
      Returns:
      A list containing all modules in the particle
      Since:
      1.3.0
    • modules

      public @UnmodifiableView List<net.minecraft.core.Holder<ParticleModuleData>> modules()
    • spriteData

      @Nullable public @Nullable SpriteData spriteData()
    • setSpriteData

      public void setSpriteData(@Nullable @Nullable SpriteData data)
      Since:
      4.3.0
    • additive

      public boolean additive()
    • setAdditive

      public void setAdditive(boolean additive)
      Since:
      4.3.0
    • renderStyle

      public RenderStyle renderStyle()
    • setRenderStyle

      public void setRenderStyle(RenderStyle renderStyle)
      Since:
      4.3.0
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object