public class DonutEffect extends YPREffect
  • Field Details

    • particlesCircle

      public int particlesCircle
      Amount of particles inside a single vertical circle
    • circles

      public int circles
      Amount of circles to build the torus
    • radiusDonut

      public float radiusDonut
      Radius of the torus
    • radiusTube

      public float radiusTube
      Radius of the tube (the circles on the outside).
    • rotation

      public net.minecraft.util.math.Vec3d rotation
      Rotation of the torus.
    • radiusDonutIncrease

      public float radiusDonutIncrease
      Increases the donut radius this much each tick
    • radiusTubeIncrease

      public float radiusTubeIncrease
      Increases the radius of the tube (the circles on the outside) this much each iteration
    • particlesCircleIncrease

      public int particlesCircleIncrease
      Increases the amount of particles inside a single vertical circle this much each iteration
    • circlesIncrease

      public int circlesIncrease
      Increase the amount of circles making up the donut
    • increaseCirclesEveryNIterations

      public int increaseCirclesEveryNIterations
      Increases the number of circles by circleIncrease once every tot iterations By default it's 20 iterations, so once every second
    • increaseParticlesCircleEveryNIterations

      public int increaseParticlesCircleEveryNIterations
      Increases the number of particles per circle by particlesCircleIncrease once every tot iterations By default it's 20 iterations, so once every second
  • Constructor Details

    • DonutEffect

      public DonutEffect(net.minecraft.server.world.ServerWorld world, net.minecraft.particle.ParticleEffect particle, net.minecraft.util.math.Vec3d originPos, float yaw, float pitch, int particlesCircle, int circles, float radiusDonut, float radiusTube, net.minecraft.util.math.Vec3d rotation, float radiusDonutIncrease, float radiusTubeIncrease, int particlesCircleIncrease, int increaseParticlesCircleEveryNIterations, int circlesIncrease, int increaseCirclesEveryNIterations)
      Creates a new donut effect

      A few details: The rotation is in radians, while the yaw/pitch are like in vanilla, in degrees Rotation is applied AFTER the yaw and pitch. Yaw and pitch are adjusted so the hole faces the player when given the yaw and pitch values.

      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
      yaw - The yaw of the effect. For example, you can get it from an Entity using getYaw()
      pitch - The pitch of the effect. For example, you can get it from an Entity using getPitch()
      particlesCircle - The number of particles that make up each circle
      circles - The amount of circles to build the torus with (this will go on the "outside" of the hole, the more, the more defined the donut will be)
      radiusDonut - The radius of whole the donut/torus
      radiusTube - The radius of the tube (the individual circles that make the tube part of the donut torus. Not the hole, the donut part)
      rotation - The rotation of the whole donut/torus
      radiusDonutIncrease - The amount used to increase the radius of the donut per iteration/tick. (also works with negatives!)
      radiusTubeIncrease - The amount used to increase the radius of the tube per iteration/tick (also works with negatives!)
      particlesCircleIncrease - The number of particles used to increase the circles' each iteration/tick (also works with negatives!)
      increaseParticlesCircleEveryNIterations - Increases the number of particles per circle by particlesCircleIncrease once every tot iterations * By default it's 20 iterations, so once every second
      circlesIncrease - Increase the number of circles by this much every n iterations specified next (also works with negatives!)
      increaseCirclesEveryNIterations - Increases the number of circles by circleIncrease once every tot iterations * By default it's 20 iterations, so once every second
    • DonutEffect

      public DonutEffect(net.minecraft.server.world.ServerWorld world, net.minecraft.particle.ParticleEffect particle, net.minecraft.util.math.Vec3d originPos)
  • Method Details

    • copy

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

      public static DonutEffect.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
    • getParticlesCircle

      public int getParticlesCircle()
    • setParticlesCircle

      public void setParticlesCircle(int particlesCircle)
    • getCircles

      public int getCircles()
    • setCircles

      public void setCircles(int circles)
    • getRadiusTube

      public float getRadiusTube()
    • setRadiusTube

      public void setRadiusTube(float radiusTube)
    • getRadiusDonut

      public float getRadiusDonut()
    • setRadiusDonut

      public void setRadiusDonut(float radiusDonut)
    • getRotation

      public net.minecraft.util.math.Vec3d getRotation()
    • setRotation

      public void setRotation(net.minecraft.util.math.Vec3d rotation)
    • getRadiusDonutIncrease

      public float getRadiusDonutIncrease()
    • setRadiusDonutIncrease

      public void setRadiusDonutIncrease(float radiusDonutIncrease)
    • getParticlesCircleIncrease

      public int getParticlesCircleIncrease()
    • setParticlesCircleIncrease

      public void setParticlesCircleIncrease(int particlesCircleIncrease)
    • getRadiusTubeIncrease

      public float getRadiusTubeIncrease()
    • setRadiusTubeIncrease

      public void setRadiusTubeIncrease(float radiusTubeIncrease)
    • getCirclesIncrease

      public int getCirclesIncrease()
    • setCirclesIncrease

      public void setCirclesIncrease(int circlesIncrease)
    • getIncreaseCirclesEveryNIterations

      public int getIncreaseCirclesEveryNIterations()
    • setIncreaseCirclesEveryNIterations

      public void setIncreaseCirclesEveryNIterations(int increaseCirclesEveryNIterations)
    • getIncreaseParticlesCircleEveryNIterations

      public int getIncreaseParticlesCircleEveryNIterations()
    • setIncreaseParticlesCircleEveryNIterations

      public void setIncreaseParticlesCircleEveryNIterations(int increaseParticlesCircleEveryNIterations)