Class AnimatedCircleEffect
java.lang.Object
me.emafire003.dev.particleanimationlib.Effect
me.emafire003.dev.particleanimationlib.effects.base.YPREffect
me.emafire003.dev.particleanimationlib.effects.AnimatedCircleEffect
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classAnimatedCircleEffectbuilder static inner class. -
Field Summary
FieldsModifier and TypeFieldDescriptiondoubleTurns the circle by this angle each iteration around the x-axisdoubleTurns the circle by this angle each iteration around the y-axisdoubleTurns the circle by this angle each iteration around the z-axisbooleanShould it rotate?doubleUsed to make a partial circleintAmount of particles per circlefloatRadius of circle above headfloatGrowth in blocks per iteration on the radius Setting to zero will disable it and fall back to the normal radiusbooleanStart at the same origin each step, use this along with maxAngle and wholeCircle to form persistent semicirclesprotected floatCurrent step.booleanTo make a whole circle each iterationfloatRotation of the torus.floatRotation of the torus.floatRotation of the torus.Fields inherited from class me.emafire003.dev.particleanimationlib.effects.base.YPREffect
pitch, pitchOffset, roll, rollOffset, shouldUpdateYPR, yaw, yawOffsetFields inherited from class me.emafire003.dev.particleanimationlib.Effect
delay, done, entityOrigin, executeOnStop, forced, iterations, limitParticlesEveryNIterations, originOffset, originPos, particle, particleLimit, shouldLimitParticlesEveryNIterations, shouldLimitParticlesSpawnedPerIteration, shouldSpawnParticlesEveryNIteration, spawnParticlesEveryNIteration, ticks, type, updatePositions, useEyePosAsOrigin, world -
Constructor Summary
ConstructorsConstructorDescriptionAnimatedCircleEffect(net.minecraft.server.world.ServerWorld world, net.minecraft.particle.ParticleEffect particle, net.minecraft.util.math.Vec3d origin) Creates a new circle effectAnimatedCircleEffect(net.minecraft.server.world.ServerWorld world, net.minecraft.particle.ParticleEffect particle, net.minecraft.util.math.Vec3d origin, float yaw, float pitch) Creates a new circle effectAnimatedCircleEffect(net.minecraft.server.world.ServerWorld world, net.minecraft.particle.ParticleEffect particle, net.minecraft.util.math.Vec3d origin, float yaw, float pitch, int particles_per_circle, float radius, float radiusGrow, double maxAngle, boolean wholeCircle, boolean resetCircle, boolean enableRotation, net.minecraft.util.math.Vec3d angularVelocity, net.minecraft.util.math.Vec3d rotations) Creates a new circle effect -
Method Summary
Modifier and TypeMethodDescriptionstatic AnimatedCircleEffect.Builderbuilder(net.minecraft.server.world.ServerWorld world, net.minecraft.particle.ParticleEffect particle, net.minecraft.util.math.Vec3d originPos) Returns a builder for the effect.static voidcopy(AnimatedCircleEffect original, AnimatedCircleEffect copy) doubleintfloatfloatnet.minecraft.util.math.Vec3dbooleanbooleanbooleanvoidonRun()Main method to extend, here the animation code is run EACH tickvoidsetAngularVelocity(net.minecraft.util.math.Vec3d angularVelocity) voidsetEnableRotation(boolean enableRotation) voidsetMaxAngle(double maxAngle) voidsetParticles(int particles) voidsetRadius(float radius) voidsetRadiusGrow(float radiusGrow) voidsetResetCircle(boolean resetCircle) voidsetRotations(net.minecraft.util.math.Vec3d rotations) voidsetWholeCircle(boolean wholeCircle) Methods inherited from class me.emafire003.dev.particleanimationlib.effects.base.YPREffect
copy, getDirection, getPitch, getPitchOffset, getRoll, getRollOffset, getShouldUpdateYPR, getYaw, getYawOffset, setPitch, setPitchOffset, setRoll, setRollOffset, setShouldUpdateYPR, setYaw, setYawOffset, updatePosMethods inherited from class me.emafire003.dev.particleanimationlib.Effect
copy, displayParticle, displayParticle, displayParticle, getDelay, getEntityOrigin, getExecuteOnStop, getIterations, getLimitParticlesEveryNIterations, getOriginOffset, getOriginPos, getParticle, getParticleLimit, getSpawnParticlesEveryNIteration, getType, getWorld, getWorldRegistryKey, isForced, isUpdatePositions, isUseEyePosAsOrigin, onStop, run, run, runFor, runFor, setDelay, setEntityOrigin, setExecuteOnStop, setForced, setIterations, setLimitParticlesEveryNIterations, setOriginOffset, setOriginPos, setParticle, setParticleLimit, setShouldLimitParticlesEveryNIterations, setShouldLimitParticlesSpawnedPerIteration, setShouldSpawnParticlesEveryNIteration, setSpawnParticlesEveryNIteration, setUpdatePositions, setUseEyePosAsOrigin, setWorld, shouldLimitParticlesEveryNIterations, shouldLimitParticlesSpawnedPerIteration, shouldSpawnParticlesEveryNIteration
-
Field Details
-
xRotation
public float xRotationRotation of the torus. -
yRotation
public float yRotationRotation of the torus. -
zRotation
public float zRotationRotation of the torus. -
angularVelocityX
public double angularVelocityXTurns the circle by this angle each iteration around the x-axis -
angularVelocityY
public double angularVelocityYTurns the circle by this angle each iteration around the y-axis -
angularVelocityZ
public double angularVelocityZTurns the circle by this angle each iteration around the z-axis -
radius
public float radiusRadius of circle above head -
maxAngle
public double maxAngleUsed to make a partial circle -
resetCircle
public boolean resetCircleStart at the same origin each step, use this along with maxAngle and wholeCircle to form persistent semicircles -
enableRotation
public boolean enableRotationShould it rotate? -
particles
public int particlesAmount of particles per circle -
wholeCircle
public boolean wholeCircleTo make a whole circle each iteration -
radiusGrow
public float radiusGrowGrowth in blocks per iteration on the radius Setting to zero will disable it and fall back to the normal radius -
step
protected float stepCurrent step. Works as a counter
-
-
Constructor Details
-
AnimatedCircleEffect
public AnimatedCircleEffect(net.minecraft.server.world.ServerWorld world, net.minecraft.particle.ParticleEffect particle, net.minecraft.util.math.Vec3d origin, float yaw, float pitch, int particles_per_circle, float radius, float radiusGrow, double maxAngle, boolean wholeCircle, boolean resetCircle, boolean enableRotation, net.minecraft.util.math.Vec3d angularVelocity, net.minecraft.util.math.Vec3d rotations) Creates a new circle effect- Parameters:
world- The world the particles are going to spawn inparticle- The particle effect that is going to be spawned. You can useParticleTypesorigin- The origin position of the effect, aka the center point of the circleyaw- 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()particles_per_circle- Number of particles that make up each circleradius- The radius of the circleradiusGrow- Radius growth amount per each iteration. Setting to 0 won't make the radius grow. It can be used to make spirals instead of circles.maxAngle- Used to make a partial circle. Expressed in radianswholeCircle- Makes a whole circle every iteration. If disabled there will be an animation of particles completing the circle, similar toAnimatedBallEffector a "loading" circleresetCircle- Start at the same origin each step, use this along with maxAngle and wholeCircle to form persistent semicircles. (If you have wholeCircle on false it won't work)enableRotation- Should the circle rotate?angularVelocity- AVec3dof the angular velocities of the effect (for the rotation) expressed in radials. Turns the circle by this angle each iteration around the (x|y|z)-axis Tip: It also works with restCircle, and it creates interesting shapes! It can also work a bit like the animated ball!rotations- AVec3dof Rotations of the torus/circles
-
AnimatedCircleEffect
public AnimatedCircleEffect(net.minecraft.server.world.ServerWorld world, net.minecraft.particle.ParticleEffect particle, net.minecraft.util.math.Vec3d origin, float yaw, float pitch) Creates a new circle effect- Parameters:
world- The world the particles are going to spawn inparticle- The particle effect that is going to be spawned. You can useParticleTypesorigin- The origin position of the effect, aka the center point of the circleyaw- 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()
-
AnimatedCircleEffect
public AnimatedCircleEffect(net.minecraft.server.world.ServerWorld world, net.minecraft.particle.ParticleEffect particle, net.minecraft.util.math.Vec3d origin) Creates a new circle effect- Parameters:
world- The world the particles are going to spawn inparticle- The particle effect that is going to be spawned. You can useParticleTypesorigin- The origin position of the effect, aka the center point of the circle
-
-
Method Details
-
builder
public static AnimatedCircleEffect.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 inparticle- The particle effect that is going to be spawned. You can useParticleTypesoriginPos- The origin position of the effectSetting 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
-
onRun
public void onRun()Description copied from class:EffectMain method to extend, here the animation code is run EACH tick -
getRadius
public float getRadius() -
setRadius
public void setRadius(float radius) -
getMaxAngle
public double getMaxAngle() -
setMaxAngle
public void setMaxAngle(double maxAngle) -
isResetCircle
public boolean isResetCircle() -
setResetCircle
public void setResetCircle(boolean resetCircle) -
isEnableRotation
public boolean isEnableRotation() -
setEnableRotation
public void setEnableRotation(boolean enableRotation) -
getParticles
public int getParticles() -
setParticles
public void setParticles(int particles) -
isWholeCircle
public boolean isWholeCircle() -
setWholeCircle
public void setWholeCircle(boolean wholeCircle) -
getRadiusGrow
public float getRadiusGrow() -
setRadiusGrow
public void setRadiusGrow(float radiusGrow) -
getRotations
public net.minecraft.util.math.Vec3d getRotations() -
setRotations
public void setRotations(net.minecraft.util.math.Vec3d rotations) -
setAngularVelocity
public void setAngularVelocity(net.minecraft.util.math.Vec3d angularVelocity)
-