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 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.level.ServerLevel world, net.minecraft.core.particles.ParticleOptions particle, net.minecraft.world.phys.Vec3 origin) Creates a new animated "ball" effect.AnimatedBallEffect(net.minecraft.server.level.ServerLevel world, net.minecraft.core.particles.ParticleOptions particle, net.minecraft.world.phys.Vec3 origin, int count, int particles_per_iteration, float size) Creates a new animated "ball" effect.AnimatedBallEffect(net.minecraft.server.level.ServerLevel world, net.minecraft.core.particles.ParticleOptions particle, net.minecraft.world.phys.Vec3 origin, int count, int particles_per_iteration, float size, net.minecraft.world.phys.Vec3 factors) Creates a new animated "ball" effect.AnimatedBallEffect(net.minecraft.server.level.ServerLevel world, net.minecraft.core.particles.ParticleOptions particle, net.minecraft.world.phys.Vec3 origin, int count, int particles_per_iteration, float size, net.minecraft.world.phys.Vec3 factors, net.minecraft.world.phys.Vec3 rotation) Creates a new animated "ball" effect. -
Method Summary
Modifier and TypeMethodDescriptionstatic AnimatedBallEffect.Builderbuilder(net.minecraft.server.level.ServerLevel world, net.minecraft.core.particles.ParticleOptions particle, net.minecraft.world.phys.Vec3 originPos) Returns a builder for the effect.static voidcopy(AnimatedBallEffect original, AnimatedBallEffect copy) intintfloatgetSize()protected 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) floatxFactor()doublefloatyFactor()doublefloatzFactor()doubleMethods inherited from class 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.level.ServerLevel world, net.minecraft.core.particles.ParticleOptions particle, net.minecraft.world.phys.Vec3 origin, int count, int particles_per_iteration, float size, net.minecraft.world.phys.Vec3 factors, net.minecraft.world.phys.Vec3 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- AVec3of 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- AVec3of xyz rotations (in radians) for the ball effect.
-
AnimatedBallEffect
public AnimatedBallEffect(net.minecraft.server.level.ServerLevel world, net.minecraft.core.particles.ParticleOptions particle, net.minecraft.world.phys.Vec3 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.level.ServerLevel world, net.minecraft.core.particles.ParticleOptions particle, net.minecraft.world.phys.Vec3 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.level.ServerLevel world, net.minecraft.core.particles.ParticleOptions particle, net.minecraft.world.phys.Vec3 origin, int count, int particles_per_iteration, float size, net.minecraft.world.phys.Vec3 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- AVec3of 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.level.ServerLevel world, net.minecraft.core.particles.ParticleOptions particle, net.minecraft.world.phys.Vec3 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
-
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) -
xFactor
public float xFactor() -
setxFactor
public void setxFactor(float xFactor) -
yFactor
public float yFactor() -
setyFactor
public void setyFactor(float yFactor) -
zFactor
public float zFactor() -
setzFactor
public void setzFactor(float zFactor) -
xRotation
public double xRotation() -
setxRotation
public void setxRotation(double xRotation) -
yRotation
public double yRotation() -
setyRotation
public void setyRotation(double yRotation) -
zRotation
public double zRotation() -
setzRotation
public void setzRotation(double zRotation)
-