Class AnimatedBallEffect
java.lang.Object
me.emafire003.dev.particleanimationlib.Effect
me.emafire003.dev.particleanimationlib.effects.AnimatedBallEffect
Creates an animated Sphere. Thanks to the author for sharing it!
Demo on YouTube
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classAnimatedBallEffectbuilder static inner class. -
Field Summary
FieldsModifier and TypeFieldDescriptionintBall particles total (150)intThe amount of particles, displayed in one iteration (10)floatSize of this ball (1)protected intInternal CounterfloatFactors (1, 1, 1) Aka dimensions of the ball, like the "diameters"doubleRotation of the ball.floatFactors (1, 1, 1) Aka dimensions of the ball, like the "diameters"doubleRotation of the ball.floatFactors (1, 1, 1) Aka dimensions of the ball, like the "diameters"doubleRotation of the ball.Fields 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
ConstructorsConstructorDescriptionAnimatedBallEffect(net.minecraft.server.world.ServerWorld world, net.minecraft.particle.ParticleEffect particle, net.minecraft.util.math.Vec3d origin) Creates a new animated "ball" effect.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.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.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. -
Method Summary
Modifier and TypeMethodDescriptionstatic AnimatedBallEffect.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(AnimatedBallEffect original, AnimatedBallEffect copy) intintfloatgetSize()floatdoublefloatdoublefloatdoubleprotected voidonRun()Main method to extend, here the animation code is run EACH tickvoidsetParticles(int particles) voidsetParticlesPerIteration(int particlesPerIteration) voidsetSize(float size) voidsetxFactor(float xFactor) voidsetxRotation(double xRotation) voidsetyFactor(float yFactor) voidsetyRotation(double yRotation) voidsetzFactor(float zFactor) voidsetzRotation(double zRotation) Methods 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, updatePos
-
Field Details
-
particles
public int particlesBall particles total (150) -
particlesPerIteration
public int particlesPerIterationThe amount of particles, displayed in one iteration (10) -
size
public float sizeSize of this ball (1) -
xFactor
public float xFactorFactors (1, 1, 1) Aka dimensions of the ball, like the "diameters" -
yFactor
public float yFactorFactors (1, 1, 1) Aka dimensions of the ball, like the "diameters" -
zFactor
public float zFactorFactors (1, 1, 1) Aka dimensions of the ball, like the "diameters" -
xRotation
public double xRotationRotation of the ball. -
yRotation
public double yRotationRotation of the ball. -
zRotation
public double zRotationRotation of the ball. -
step
protected int stepInternal 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 inparticle- The particle effect that is going to be spawned. You can useParticleTypesorigin- The origin position of the effectcount- The total number of particles that will be displayedparticles_per_iteration- The number of particles displayed in each iterationsize- The size of the ball effectfactors- AVec3dof 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 ovalrotation- AVec3dof 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 inparticle- The particle effect that is going to be spawned. You can useParticleTypesorigin- 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 inparticle- The particle effect that is going to be spawned. You can useParticleTypesorigin- The origin position of the effectcount- The total number of particles that will be displayedparticles_per_iteration- The number of particles displayed in each iterationsize- 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 inparticle- The particle effect that is going to be spawned. You can useParticleTypesorigin- The origin position of the effectcount- The total number of particles that will be displayedparticles_per_iteration- The number of particles displayed in each iterationsize- The size of the ball effectfactors- AVec3dof 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 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
protected void onRun()Description copied from class:EffectMain method to extend, here the animation code is run EACH tick -
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)
-