Class DonutEffect
java.lang.Object
me.emafire003.dev.particleanimationlib.Effect
me.emafire003.dev.particleanimationlib.effects.base.YPREffect
me.emafire003.dev.particleanimationlib.effects.DonutEffect
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classDonutEffectbuilder static inner class. -
Field Summary
FieldsModifier and TypeFieldDescriptionintAmount of circles to build the torusintIncrease the amount of circles making up the donutintIncreases the number of circles bycircleIncreaseonce every tot iterations By default it's 20 iterations, so once every secondintIncreases the number of particles per circle byparticlesCircleIncreaseonce every tot iterations By default it's 20 iterations, so once every secondintAmount of particles inside a single vertical circleintIncreases the amount of particles inside a single vertical circle this much each iterationfloatRadius of the torusfloatIncreases the donut radius this much each tickfloatRadius of the tube (the circles on the outside).floatIncreases the radius of the tube (the circles on the outside) this much each iterationnet.minecraft.util.math.Vec3dRotation of the torus.Fields inherited from class me.emafire003.dev.particleanimationlib.effects.base.YPREffect
pitch, pitchOffset, roll, rollOffset, shouldUpdateYPR, yaw, yawOffsetFields 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
ConstructorsConstructorDescriptionDonutEffect(net.minecraft.server.world.ServerWorld world, net.minecraft.particle.ParticleEffect particle, net.minecraft.util.math.Vec3d originPos) DonutEffect(net.minecraft.server.world.ServerWorld world, net.minecraft.particle.ParticleEffect particle, net.minecraft.util.math.Vec3d originPos, float yaw, float pitch, int particlesCircle, int circles, float radiusDonut, float radiusTube, net.minecraft.util.math.Vec3d rotation, float radiusDonutIncrease, float radiusTubeIncrease, int particlesCircleIncrease, int increaseParticlesCircleEveryNIterations, int circlesIncrease, int increaseCirclesEveryNIterations) Creates a new donut effect -
Method Summary
Modifier and TypeMethodDescriptionstatic DonutEffect.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(DonutEffect original, DonutEffect copy) intintintintintintfloatfloatfloatfloatnet.minecraft.util.math.Vec3dvoidonRun()Main method to extend, here the animation code is run EACH tickvoidsetCircles(int circles) voidsetCirclesIncrease(int circlesIncrease) voidsetIncreaseCirclesEveryNIterations(int increaseCirclesEveryNIterations) voidsetIncreaseParticlesCircleEveryNIterations(int increaseParticlesCircleEveryNIterations) voidsetParticlesCircle(int particlesCircle) voidsetParticlesCircleIncrease(int particlesCircleIncrease) voidsetRadiusDonut(float radiusDonut) voidsetRadiusDonutIncrease(float radiusDonutIncrease) voidsetRadiusTube(float radiusTube) voidsetRadiusTubeIncrease(float radiusTubeIncrease) voidsetRotation(net.minecraft.util.math.Vec3d rotation) Methods inherited from class me.emafire003.dev.particleanimationlib.effects.base.YPREffect
copy, getDirection, getPitch, getPitchOffset, getRoll, getRollOffset, getShouldUpdateYPR, getYaw, getYawOffset, setPitch, setPitchOffset, setRoll, setRollOffset, setShouldUpdateYPR, setYaw, setYawOffset, 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
-
particlesCircle
public int particlesCircleAmount of particles inside a single vertical circle -
circles
public int circlesAmount of circles to build the torus -
radiusDonut
public float radiusDonutRadius of the torus -
radiusTube
public float radiusTubeRadius of the tube (the circles on the outside). -
rotation
public net.minecraft.util.math.Vec3d rotationRotation of the torus. -
radiusDonutIncrease
public float radiusDonutIncreaseIncreases the donut radius this much each tick -
radiusTubeIncrease
public float radiusTubeIncreaseIncreases the radius of the tube (the circles on the outside) this much each iteration -
particlesCircleIncrease
public int particlesCircleIncreaseIncreases the amount of particles inside a single vertical circle this much each iteration -
circlesIncrease
public int circlesIncreaseIncrease the amount of circles making up the donut -
increaseCirclesEveryNIterations
public int increaseCirclesEveryNIterationsIncreases the number of circles bycircleIncreaseonce every tot iterations By default it's 20 iterations, so once every second -
increaseParticlesCircleEveryNIterations
public int increaseParticlesCircleEveryNIterationsIncreases the number of particles per circle byparticlesCircleIncreaseonce every tot iterations By default it's 20 iterations, so once every second
-
-
Constructor Details
-
DonutEffect
public DonutEffect(net.minecraft.server.world.ServerWorld world, net.minecraft.particle.ParticleEffect particle, net.minecraft.util.math.Vec3d originPos, float yaw, float pitch, int particlesCircle, int circles, float radiusDonut, float radiusTube, net.minecraft.util.math.Vec3d rotation, float radiusDonutIncrease, float radiusTubeIncrease, int particlesCircleIncrease, int increaseParticlesCircleEveryNIterations, int circlesIncrease, int increaseCirclesEveryNIterations) Creates a new donut effectA few details: The rotation is in radians, while the yaw/pitch are like in vanilla, in degrees Rotation is applied AFTER the yaw and pitch. Yaw and pitch are adjusted so the hole faces the player when given the yaw and pitch values.
- 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 effectyaw- The yaw of the effect. For example, you can get it from an Entity using getYaw()pitch- The pitch of the effect. For example, you can get it from an Entity using getPitch()particlesCircle- The number of particles that make up each circlecircles- The amount of circles to build the torus with (this will go on the "outside" of the hole, the more, the more defined the donut will be)radiusDonut- The radius of whole the donut/torusradiusTube- The radius of the tube (the individual circles that make the tube part of the donut torus. Not the hole, the donut part)rotation- The rotation of the whole donut/torusradiusDonutIncrease- The amount used to increase the radius of the donut per iteration/tick. (also works with negatives!)radiusTubeIncrease- The amount used to increase the radius of the tube per iteration/tick (also works with negatives!)particlesCircleIncrease- The number of particles used to increase the circles' each iteration/tick (also works with negatives!)increaseParticlesCircleEveryNIterations- Increases the number of particles per circle byparticlesCircleIncreaseonce every tot iterations * By default it's 20 iterations, so once every secondcirclesIncrease- Increase the number of circles by this much every n iterations specified next (also works with negatives!)increaseCirclesEveryNIterations- Increases the number of circles bycircleIncreaseonce every tot iterations * By default it's 20 iterations, so once every second
-
DonutEffect
public DonutEffect(net.minecraft.server.world.ServerWorld world, net.minecraft.particle.ParticleEffect particle, net.minecraft.util.math.Vec3d originPos)
-
-
Method Details
-
copy
-
builder
public static DonutEffect.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 -
getParticlesCircle
public int getParticlesCircle() -
setParticlesCircle
public void setParticlesCircle(int particlesCircle) -
getCircles
public int getCircles() -
setCircles
public void setCircles(int circles) -
getRadiusTube
public float getRadiusTube() -
setRadiusTube
public void setRadiusTube(float radiusTube) -
getRadiusDonut
public float getRadiusDonut() -
setRadiusDonut
public void setRadiusDonut(float radiusDonut) -
getRotation
public net.minecraft.util.math.Vec3d getRotation() -
setRotation
public void setRotation(net.minecraft.util.math.Vec3d rotation) -
getRadiusDonutIncrease
public float getRadiusDonutIncrease() -
setRadiusDonutIncrease
public void setRadiusDonutIncrease(float radiusDonutIncrease) -
getParticlesCircleIncrease
public int getParticlesCircleIncrease() -
setParticlesCircleIncrease
public void setParticlesCircleIncrease(int particlesCircleIncrease) -
getRadiusTubeIncrease
public float getRadiusTubeIncrease() -
setRadiusTubeIncrease
public void setRadiusTubeIncrease(float radiusTubeIncrease) -
getCirclesIncrease
public int getCirclesIncrease() -
setCirclesIncrease
public void setCirclesIncrease(int circlesIncrease) -
getIncreaseCirclesEveryNIterations
public int getIncreaseCirclesEveryNIterations() -
setIncreaseCirclesEveryNIterations
public void setIncreaseCirclesEveryNIterations(int increaseCirclesEveryNIterations) -
getIncreaseParticlesCircleEveryNIterations
public int getIncreaseParticlesCircleEveryNIterations() -
setIncreaseParticlesCircleEveryNIterations
public void setIncreaseParticlesCircleEveryNIterations(int increaseParticlesCircleEveryNIterations)
-