Class AnimatedBallEffect

java.lang.Object
me.emafire003.dev.particleanimationlib.Effect
me.emafire003.dev.particleanimationlib.effects.AnimatedBallEffect

public class AnimatedBallEffect extends Effect
Creates an animated Sphere. Thanks to the author for sharing it! Demo on YouTube
  • Field Details

    • particles

      public int particles
      Ball particles total (150)
    • particlesPerIteration

      public int particlesPerIteration
      The amount of particles, displayed in one iteration (10)
    • size

      public float size
      Size of this ball (1)
    • xFactor

      public float xFactor
      Factors (1, 1, 1) Aka dimensions of the ball, like the "diameters"
    • yFactor

      public float yFactor
      Factors (1, 1, 1) Aka dimensions of the ball, like the "diameters"
    • zFactor

      public float zFactor
      Factors (1, 1, 1) Aka dimensions of the ball, like the "diameters"
    • xRotation

      public double xRotation
      Rotation of the ball.
    • yRotation

      public double yRotation
      Rotation of the ball.
    • zRotation

      public double zRotation
      Rotation of the ball.
    • step

      protected int step
      Internal Counter
  • Constructor Details

    • AnimatedBallEffect

      public AnimatedBallEffect(net.minecraft.server.world.ServerWorld world, net.minecraft.particle.ParticleEffect particle, net.minecraft.util.math.Vec3d origin, int count, int particles_per_iteration, float size, net.minecraft.util.math.Vec3d factors, net.minecraft.util.math.Vec3d rotation)
      Creates a new animated "ball" effect.
      Parameters:
      world - The world the particles are going to spawn in
      particle - The particle effect that is going to be spawned. You can use ParticleTypes
      origin - The origin position of the effect
      count - The total number of particles that will be displayed
      particles_per_iteration - The number of particles displayed in each iteration
      size - The size of the ball effect
      factors - A Vec3d of xyz float factors for the ball effect. Non-uniform values will elongate the ball in one direction, for example (1,2,1) makes a vertical oval
      rotation - A Vec3d of xyz rotations (in radians) for the ball effect.
    • AnimatedBallEffect

      public AnimatedBallEffect(net.minecraft.server.world.ServerWorld world, net.minecraft.particle.ParticleEffect particle, net.minecraft.util.math.Vec3d origin)
      Creates a new animated "ball" effect.
      Parameters:
      world - The world the particles are going to spawn in
      particle - The particle effect that is going to be spawned. You can use ParticleTypes
      origin - The origin position of the effect
    • AnimatedBallEffect

      public AnimatedBallEffect(net.minecraft.server.world.ServerWorld world, net.minecraft.particle.ParticleEffect particle, net.minecraft.util.math.Vec3d origin, int count, int particles_per_iteration, float size)
      Creates a new animated "ball" effect.
      Parameters:
      world - The world the particles are going to spawn in
      particle - The particle effect that is going to be spawned. You can use ParticleTypes
      origin - The origin position of the effect
      count - The total number of particles that will be displayed
      particles_per_iteration - The number of particles displayed in each iteration
      size - The size of the ball effect
    • AnimatedBallEffect

      public AnimatedBallEffect(net.minecraft.server.world.ServerWorld world, net.minecraft.particle.ParticleEffect particle, net.minecraft.util.math.Vec3d origin, int count, int particles_per_iteration, float size, net.minecraft.util.math.Vec3d factors)
      Creates a new animated "ball" effect.
      Parameters:
      world - The world the particles are going to spawn in
      particle - The particle effect that is going to be spawned. You can use ParticleTypes
      origin - The origin position of the effect
      count - The total number of particles that will be displayed
      particles_per_iteration - The number of particles displayed in each iteration
      size - The size of the ball effect
      factors - A Vec3d of xyz float factors for the ball effect. Non-uniform values will elongate the ball in one direction, for example (1,2,1) makes a vertical oval
  • Method Details

    • builder

      public static AnimatedBallEffect.Builder builder(net.minecraft.server.world.ServerWorld world, net.minecraft.particle.ParticleEffect particle, net.minecraft.util.math.Vec3d originPos)
      Returns a builder for the effect.
      Parameters:
      world - The world the particles are going to spawn in
      particle - The particle effect that is going to be spawned. You can use ParticleTypes
      originPos - The origin position of the effect

      Setting a world, a particle effect and an origin position is ALWAYS mandatory, hence their presence in this method! If this is an effect that uses Yaw and Pitch, remember to set those as well!

    • copy

      public static void copy(AnimatedBallEffect original, AnimatedBallEffect copy)
    • onRun

      protected void onRun()
      Description copied from class: Effect
      Main method to extend, here the animation code is run EACH tick
      Overrides:
      onRun in class Effect
    • getParticles

      public int getParticles()
    • setParticles

      public void setParticles(int particles)
    • getParticlesPerIteration

      public int getParticlesPerIteration()
    • setParticlesPerIteration

      public void setParticlesPerIteration(int particlesPerIteration)
    • getSize

      public float getSize()
    • setSize

      public void setSize(float size)
    • getxFactor

      public float getxFactor()
    • setxFactor

      public void setxFactor(float xFactor)
    • getyFactor

      public float getyFactor()
    • setyFactor

      public void setyFactor(float yFactor)
    • getzFactor

      public float getzFactor()
    • setzFactor

      public void setzFactor(float zFactor)
    • getxRotation

      public double getxRotation()
    • setxRotation

      public void setxRotation(double xRotation)
    • getyRotation

      public double getyRotation()
    • setyRotation

      public void setyRotation(double yRotation)
    • getzRotation

      public double getzRotation()
    • setzRotation

      public void setzRotation(double zRotation)