Class ArcEffect
java.lang.Object
me.emafire003.dev.particleanimationlib.Effect
me.emafire003.dev.particleanimationlib.effects.base.TargetedEffect
me.emafire003.dev.particleanimationlib.effects.ArcEffect
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classArcEffectbuilder static inner class. -
Field Summary
FieldsModifier and TypeFieldDescriptionfloatHeight of the arc in blocksintParticles per arcprotected intInternal counterFields inherited from class me.emafire003.dev.particleanimationlib.effects.base.TargetedEffect
entityTarget, targetOffset, targetPos, updateTargetPositions, useEyePosAsTargetFields 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
ConstructorsConstructorDescriptionArcEffect(net.minecraft.server.world.ServerWorld world, net.minecraft.particle.ParticleEffect particle, net.minecraft.util.math.Vec3d origin, net.minecraft.util.math.Vec3d target) Creates a new arc effect between two pointsArcEffect(net.minecraft.server.world.ServerWorld world, net.minecraft.particle.ParticleEffect particle, net.minecraft.util.math.Vec3d origin, net.minecraft.util.math.Vec3d target, int count) Creates a new arc effect between two pointsArcEffect(net.minecraft.server.world.ServerWorld world, net.minecraft.particle.ParticleEffect particle, net.minecraft.util.math.Vec3d origin, net.minecraft.util.math.Vec3d target, int count, float height) Creates a new arc effect between two points -
Method Summary
Modifier and TypeMethodDescriptionstatic ArcEffect.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 voidfloatintvoidonRun()Main method to extend, here the animation code is run EACH tickvoidsetHeight(float height) voidsetParticles(int particles) Methods inherited from class me.emafire003.dev.particleanimationlib.effects.base.TargetedEffect
copy, getEntityTarget, getTargetOffset, getTargetPos, isUpdateTargetPositions, isUseEyePosAsTarget, setEntityTarget, setTargetOffset, setTargetPos, setUpdateTargetPositions, setUseEyePosAsTarget, shouldUpdateTargetPositions, 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
-
height
public float heightHeight of the arc in blocks -
particles
public int particlesParticles per arc -
step
protected int stepInternal counter
-
-
Constructor Details
-
ArcEffect
public ArcEffect(net.minecraft.server.world.ServerWorld world, net.minecraft.particle.ParticleEffect particle, net.minecraft.util.math.Vec3d origin, net.minecraft.util.math.Vec3d target, int count, float height) Creates a new arc effect between two points- 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 initial point of the arctarget- The target position of the effect, aka the finial point of the arccount- The number of particles to spread between the two pointsheight- The height (in blocks) of the arc, aka its curvature.
-
ArcEffect
public ArcEffect(net.minecraft.server.world.ServerWorld world, net.minecraft.particle.ParticleEffect particle, net.minecraft.util.math.Vec3d origin, net.minecraft.util.math.Vec3d target) Creates a new arc effect between two points- 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 initial point of the arctarget- The target position of the effect, aka the finial point of the arc
-
ArcEffect
public ArcEffect(net.minecraft.server.world.ServerWorld world, net.minecraft.particle.ParticleEffect particle, net.minecraft.util.math.Vec3d origin, net.minecraft.util.math.Vec3d target, int count) Creates a new arc effect between two points- 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 initial point of the arctarget- The target position of the effect, aka the finial point of the arccount- The number of particles to spread between the two points
-
-
Method Details
-
copy
-
builder
public static ArcEffect.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 -
getHeight
public float getHeight() -
setHeight
public void setHeight(float height) -
getParticles
public int getParticles() -
setParticles
public void setParticles(int particles)
-