Interface ControlledParticle


@NonExtendable public interface ControlledParticle
Accessor interface for a particle controlled by a ParticleControllerInstance.
  • Method Summary

    Modifier and Type
    Method
    Description
    float
     
    int
     
    int
     
    net.minecraft.world.phys.Vec3
     
    double
    horizontalDistanceTo(net.minecraft.world.phys.Vec3 vec)
     
    boolean
     
    net.minecraft.client.multiplayer.ClientLevel
     
    void
    move(double x, double y, double z)
    Moves the particle by the specified amounts.
    net.minecraft.util.RandomSource
     
    net.minecraft.client.particle.Particle
    scale(float scale)
     
    void
    setAlpha(float alpha)
     
    void
    setColor(int color)
     
    void
    setLifetime(int lifetime)
     
    void
    setParticleSpeed(double x, double y, double z)
    Sets the speed of the particle.
    void
    setPos(double x, double y, double z)
    Sets the position of the particle.
    void
    setRemoved(boolean removed)
    Sets the particle to be removed.
    double
    x()
     
    double
    y()
     
    double
    z()
     
  • Method Details

    • isRemoved

      boolean isRemoved()
      Returns:
      Whether the particle is removed.
    • setRemoved

      void setRemoved(boolean removed)
      Sets the particle to be removed.
      Parameters:
      removed - The removal state to set.
    • x

      double x()
      Returns:
      The x position of the particle.
    • y

      double y()
      Returns:
      The y position of the particle.
    • z

      double z()
      Returns:
      The z position of the particle.
    • getPos

      net.minecraft.world.phys.Vec3 getPos()
      Returns:
      The position of the particle.
    • setPos

      void setPos(double x, double y, double z)
      Sets the position of the particle.
      Parameters:
      x - The x position to set.
      y - The y position to set.
      z - The z position to set.
    • setParticleSpeed

      void setParticleSpeed(double x, double y, double z)
      Sets the speed of the particle.
      Parameters:
      x - The x speed to set.
      y - The y speed to set.
      z - The z speed to set.
    • getColor

      int getColor()
      Returns:
      The color of the particle.
    • setColor

      void setColor(int color)
      Parameters:
      color - The color to set.
    • getAlpha

      float getAlpha()
      Returns:
      The alpha value of the particle.
    • setAlpha

      void setAlpha(float alpha)
      Parameters:
      alpha - The alpha value to set.
    • level

      net.minecraft.client.multiplayer.ClientLevel level()
      Returns:
      The ClientLevel the particle is in.
    • random

      net.minecraft.util.RandomSource random()
      Returns:
      The particle's RandomSource.
    • getLifetime

      int getLifetime()
      Returns:
      The particle's lifetime.
    • setLifetime

      void setLifetime(int lifetime)
      Parameters:
      lifetime - The lifetime to set.
    • horizontalDistanceTo

      double horizontalDistanceTo(net.minecraft.world.phys.Vec3 vec)
      Parameters:
      vec - The Vec3 to measure the horizontal distance to.
      Returns:
      The horizontal distance between the particle and the given Vec3.
    • scale

      net.minecraft.client.particle.Particle scale(float scale)
      Parameters:
      scale - The scale factor to apply.
      Returns:
      The particle.
    • move

      void move(double x, double y, double z)
      Moves the particle by the specified amounts.
      Parameters:
      x - The amount to move by in x direction.
      y - The amount to move by in y direction.
      z - The amount to move by in z direction.