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

public class SphereEffect extends Effect
  • Field Details

    • radius

      public double radius
      Radius of the sphere
    • particles

      public int particles
      Particles to display
    • radiusIncrease

      public double radiusIncrease
      Amount to increase the radius per tick
    • particleIncrease

      public int particleIncrease
      Amount to increase the particles per tick
    • halfSphere

      public boolean halfSphere
      Should it display as an half sphere?
    • invertHalfSphere

      public boolean invertHalfSphere
      If it is an half sphere, should it be inverted the other way around? Like upside down
  • Constructor Details

    • SphereEffect

      public SphereEffect(net.minecraft.server.world.ServerWorld world, net.minecraft.particle.ParticleEffect particle, net.minecraft.util.math.Vec3d origin, int particles, double radius, double radiusIncrease, int particleIncrease, boolean half_sphere, boolean invert_half_sphere)
      Creates a new sphere 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. Aka the center of the sphere
      particles - The number of particles the sphere will be made of
      radius - The radius of the sphere
      radiusIncrease - The amount used to increase the radius per iteration/tick
      particleIncrease - The amount used to increase the particles per iteration/tick
      half_sphere - If true, displays as an half sphere/dome
      invert_half_sphere - If true and displaying as an half sphere, displays the bottom half
    • SphereEffect

      public SphereEffect(net.minecraft.server.world.ServerWorld world, net.minecraft.particle.ParticleEffect particle, net.minecraft.util.math.Vec3d origin)
      Creates a new sphere 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. Aka the center of the sphere
    • SphereEffect

      public SphereEffect(net.minecraft.server.world.ServerWorld world, net.minecraft.particle.ParticleEffect particle, net.minecraft.util.math.Vec3d origin, int particles, double radius)
      Creates a new sphere 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. Aka the center of the sphere
      particles - The number of particles the sphere will be made of
      radius - The radius of the sphere
  • Method Details

    • copy

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

      public static SphereEffect.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
    • getRadius

      public double getRadius()
    • setRadius

      public void setRadius(double radius)
    • getRadiusIncrease

      public double getRadiusIncrease()
    • setRadiusIncrease

      public void setRadiusIncrease(double radiusIncrease)
    • getParticleIncrease

      public int getParticleIncrease()
    • setParticleIncrease

      public void setParticleIncrease(int particleIncrease)
    • getParticles

      public int getParticles()
    • setParticles

      public void setParticles(int particles)
    • isHalfSphere

      public boolean isHalfSphere()
    • setHalfSphere

      public void setHalfSphere(boolean half_sphere)
    • isInvertHalSphere

      public boolean isInvertHalSphere()
    • setInvertedHalfSphere

      public void setInvertedHalfSphere(boolean invert_half_sphere)