Class SphereEffect
java.lang.Object
me.emafire003.dev.particleanimationlib.Effect
me.emafire003.dev.particleanimationlib.effects.SphereEffect
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classSphereEffectbuilder static inner class. -
Field Summary
FieldsModifier and TypeFieldDescriptionintintParticles to displaydoubleRadius of the spheredoubleAmount to increase the radius per tickFields inherited from class me.emafire003.dev.particleanimationlib.Effect
delay, done, entityOrigin, iterations, originOffset, originPos, particle, ticks, type, updatePositions, useEyePosAsOrigin, world -
Constructor Summary
ConstructorsConstructorDescriptionSphereEffect(net.minecraft.server.world.ServerWorld world, net.minecraft.particle.ParticleEffect particle, net.minecraft.util.math.Vec3d origin) Creates a new sphere effect.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.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) Creates a new sphere effect. -
Method Summary
Modifier and TypeMethodDescriptionstatic SphereEffect.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(SphereEffect original, SphereEffect copy) intintdoubledoublevoidonRun()Main method to extend, here the animation code is run EACH tickvoidsetParticleIncrease(int particleIncrease) voidsetParticles(int particles) voidsetRadius(double radius) voidsetRadiusIncrease(double radiusIncrease) Methods inherited from class me.emafire003.dev.particleanimationlib.Effect
copy, displayParticle, displayParticle, getDelay, getEntityOrigin, getIterations, getOriginOffset, getOriginPos, getParticle, getWorld, isUpdatePositions, isUseEyePosAsOrigin, onStop, run, run, runFor, runFor, setDelay, setEntityOrigin, setIterations, setOriginOffset, setOriginPos, setParticle, setUpdatePositions, setUseEyePosAsOrigin, setWorld, updatePos
-
Field Details
-
radius
public double radiusRadius of the sphere -
particles
public int particlesParticles to display -
radiusIncrease
public double radiusIncreaseAmount to increase the radius per tick -
particleIncrease
public int particleIncrease
-
-
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) Creates a new sphere 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 of the sphereparticles- The number of particles the sphere will be made ofradius- The radius of the sphereradiusIncrease- The amount to increase the radius per iteration/tickparticleIncrease- The amount to increase the particles per iteration/tick
-
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 inparticle- The particle effect that is going to be spawned. You can useParticleTypesorigin- 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 inparticle- The particle effect that is going to be spawned. You can useParticleTypesorigin- The origin position of the effect. Aka the center of the sphereparticles- The number of particles the sphere will be made ofradius- The radius of the sphere
-
-
Method Details
-
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 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!
-
onRun
public void onRun()Description copied from class:EffectMain method to extend, here the animation code is run EACH tick -
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)
-