public class ArcEffect extends TargetedEffect
  • Field Details

    • height

      public float height
      Height of the arc in blocks
    • particles

      public int particles
      Particles per arc
    • step

      protected int step
      Internal counter
  • Constructor Details

    • ArcEffect

      public ArcEffect(net.minecraft.server.world.ServerWorld world, net.minecraft.particle.ParticleEffect particle, net.minecraft.util.math.Vec3d origin, net.minecraft.util.math.Vec3d target, int count, float height)
      Creates a new arc effect between two points
      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, aka the initial point of the arc
      target - The target position of the effect, aka the finial point of the arc
      count - The number of particles to spread between the two points
      height - The height (in blocks) of the arc, aka its curvature.
    • ArcEffect

      public ArcEffect(net.minecraft.server.world.ServerWorld world, net.minecraft.particle.ParticleEffect particle, net.minecraft.util.math.Vec3d origin, net.minecraft.util.math.Vec3d target)
      Creates a new arc effect between two points
      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, aka the initial point of the arc
      target - The target position of the effect, aka the finial point of the arc
    • ArcEffect

      public ArcEffect(net.minecraft.server.world.ServerWorld world, net.minecraft.particle.ParticleEffect particle, net.minecraft.util.math.Vec3d origin, net.minecraft.util.math.Vec3d target, int count)
      Creates a new arc effect between two points
      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, aka the initial point of the arc
      target - The target position of the effect, aka the finial point of the arc
      count - The number of particles to spread between the two points
  • Method Details

    • copy

      public static void copy(ArcEffect original, ArcEffect copy)
    • builder

      public static ArcEffect.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!

    • onRun

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

      public float getHeight()
    • setHeight

      public void setHeight(float height)
    • getParticles

      public int getParticles()
    • setParticles

      public void setParticles(int particles)