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 TypeFieldDescriptionbooleanShould it display as an half sphere?booleanIf it is an half sphere, should it be inverted the other way around?intAmount to increase the particles per tickintParticles to displaydoubleRadius of the spheredoubleAmount to increase the radius per tickFields 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
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, boolean half_sphere, boolean invert_half_sphere) 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) intintdoubledoublebooleanbooleanvoidonRun()Main method to extend, here the animation code is run EACH tickvoidsetHalfSphere(boolean half_sphere) voidsetInvertedHalfSphere(boolean invert_half_sphere) voidsetParticleIncrease(int particleIncrease) voidsetParticles(int particles) voidsetRadius(double radius) voidsetRadiusIncrease(double radiusIncrease) 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
-
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 particleIncreaseAmount to increase the particles per tick -
halfSphere
public boolean halfSphereShould it display as an half sphere? -
invertHalfSphere
public boolean invertHalfSphereIf it is an half sphere, should it be inverted the other way around? Like upside down
-
-
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, boolean half_sphere, boolean invert_half_sphere) 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 used to increase the radius per iteration/tickparticleIncrease- The amount used to increase the particles per iteration/tickhalf_sphere- If true, displays as an half sphere/domeinvert_half_sphere- If true and displaying as an half sphere, displays the bottom half
-
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) -
isHalfSphere
public boolean isHalfSphere() -
setHalfSphere
public void setHalfSphere(boolean half_sphere) -
isInvertHalSphere
public boolean isInvertHalSphere() -
setInvertedHalfSphere
public void setInvertedHalfSphere(boolean invert_half_sphere)
-