Class CuboidEffect
java.lang.Object
me.emafire003.dev.particleanimationlib.Effect
me.emafire003.dev.particleanimationlib.effects.base.TargetedEffect
me.emafire003.dev.particleanimationlib.effects.CuboidEffect
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classCuboidEffectbuilder static inner class. -
Field Summary
FieldsModifier and TypeFieldDescriptionbooleanUse corners of blocksprotected net.minecraft.util.math.Vec3dState variablesdoubleAmount of padding to add around the cubeintParticles in each rowdoubleLength of x component of cuboiddoubleLength of y component of cuboiddoubleLength of z component of cuboidFields 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
ConstructorsConstructorDescriptionCuboidEffect(@NotNull net.minecraft.server.world.ServerWorld world, @NotNull net.minecraft.particle.ParticleEffect particle, @NotNull net.minecraft.util.math.Vec3d origin, int particles_per_row, double x_length, double y_length, double z_length) Creates a new cuboid effect.CuboidEffect(@NotNull net.minecraft.server.world.ServerWorld world, @NotNull net.minecraft.particle.ParticleEffect particle, @NotNull net.minecraft.util.math.Vec3d origin, int particles_per_row, double x_length, double y_length, double z_length, double padding, boolean blockSnap) Creates a new cuboid effect.CuboidEffect(@NotNull net.minecraft.server.world.ServerWorld world, @NotNull net.minecraft.particle.ParticleEffect particle, @NotNull net.minecraft.util.math.Vec3d origin, @NotNull net.minecraft.util.math.Vec3d target, int particles_per_row) Creates a new cuboid effect.CuboidEffect(@NotNull net.minecraft.server.world.ServerWorld world, @NotNull net.minecraft.particle.ParticleEffect particle, @NotNull net.minecraft.util.math.Vec3d origin, @NotNull net.minecraft.util.math.Vec3d target, int particles_per_row, double padding, boolean blockSnap) Creates a new cuboid effect.CuboidEffect(@NotNull net.minecraft.server.world.ServerWorld world, @NotNull net.minecraft.particle.ParticleEffect particle, @NotNull net.minecraft.util.math.Vec3d origin, @NotNull net.minecraft.util.math.Vec3d target, int particles_per_row, double x_length, double y_length, double z_length, double padding, boolean blockSnap) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionstatic CuboidEffect.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(CuboidEffect original, CuboidEffect copy) doubleintdoubledoubledoublebooleanprotected voidonRun()Main method to extend, here the animation code is run EACH tickvoidsetBlockSnap(boolean blockSnap) voidsetPadding(double padding) voidsetParticles(int particles) voidsetXLength(double xLength) voidsetYLength(double yLength) voidsetZLength(double zLength) 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
-
particles
public int particlesParticles in each row -
xLength
public double xLengthLength of x component of cuboid -
yLength
public double yLengthLength of y component of cuboid -
zLength
public double zLengthLength of z component of cuboid -
padding
public double paddingAmount of padding to add around the cube -
blockSnap
public boolean blockSnapUse corners of blocks -
minCorner
protected net.minecraft.util.math.Vec3d minCornerState variables
-
-
Constructor Details
-
CuboidEffect
@Deprecated public CuboidEffect(@NotNull @NotNull net.minecraft.server.world.ServerWorld world, @NotNull @NotNull net.minecraft.particle.ParticleEffect particle, @NotNull @NotNull net.minecraft.util.math.Vec3d origin, @NotNull @NotNull net.minecraft.util.math.Vec3d target, int particles_per_row, double x_length, double y_length, double z_length, double padding, boolean blockSnap) Deprecated.Creates a new cuboid effect. Don't use this constructor, since xyz lengths and origin-target exclude each other- 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 first corner of the cuboidtarget- The target position of the effect, aka the opposite corner of the cuboidparticles_per_row- How many particles should each side/row havex_length- The length of the x component of the cuboid. The minimum is 1 blocky_length- The length of the y component of the cuboid. The minimum is 1 blockz_length- The length of the z component of the cuboid. The minimum is 1 blockpadding- The padding to add to the sides of the cuboid. A padding of 0.5 will result in having the effect closer to the border of a block, a padding of 0 will place the effect in the middle of a blockblockSnap- Weather or not the corners should snap to blocks to be more precise.
-
CuboidEffect
public CuboidEffect(@NotNull @NotNull net.minecraft.server.world.ServerWorld world, @NotNull @NotNull net.minecraft.particle.ParticleEffect particle, @NotNull @NotNull net.minecraft.util.math.Vec3d origin, @NotNull @NotNull net.minecraft.util.math.Vec3d target, int particles_per_row, double padding, boolean blockSnap) Creates a new cuboid 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 first corner of the cuboidtarget- The target position of the effect, aka the opposite corner of the cuboidparticles_per_row- How many particles should each side/row havepadding- The padding to add to the sides of the cuboid. A padding of 0.5 will result in having the effect closer to the border of a block, a padding of 0 will place the effect in the middle of a blockblockSnap- Weather or not the corners should snap to blocks to be more precise.
-
CuboidEffect
public CuboidEffect(@NotNull @NotNull net.minecraft.server.world.ServerWorld world, @NotNull @NotNull net.minecraft.particle.ParticleEffect particle, @NotNull @NotNull net.minecraft.util.math.Vec3d origin, int particles_per_row, double x_length, double y_length, double z_length, double padding, boolean blockSnap) Creates a new cuboid 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 first corner of the cuboidparticles_per_row- How many particles should each side/row havex_length- The length of the x component of the cuboid. The minimum is 1 block.y_length- The length of the y component of the cuboid. The minimum is 1 blockz_length- The length of the z component of the cuboid. The minimum is 1 blockpadding- The padding to add to the sides of the cuboid. A padding of 0.5 will result in having the effect closer to the border of a block, a padding of 0 will place the effect in the middle of a blockblockSnap- Weather or not the corners should snap to blocks to be more precise.
-
CuboidEffect
public CuboidEffect(@NotNull @NotNull net.minecraft.server.world.ServerWorld world, @NotNull @NotNull net.minecraft.particle.ParticleEffect particle, @NotNull @NotNull net.minecraft.util.math.Vec3d origin, int particles_per_row, double x_length, double y_length, double z_length) Creates a new cuboid 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 first corner of the cuboidparticles_per_row- How many particles should each side/row havex_length- The length of the x component of the cuboid. The minimum is 1 blocky_length- The length of the y component of the cuboid. The minimum is 1 blockz_length- The length of the z component of the cuboid. The minimum is 1 block
-
CuboidEffect
public CuboidEffect(@NotNull @NotNull net.minecraft.server.world.ServerWorld world, @NotNull @NotNull net.minecraft.particle.ParticleEffect particle, @NotNull @NotNull net.minecraft.util.math.Vec3d origin, @NotNull @NotNull net.minecraft.util.math.Vec3d target, int particles_per_row) Creates a new cuboid 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 first corner of the cuboidtarget- The target position of the effect, aka the opposite corner of the cuboidparticles_per_row- How many particles should each side/row have
-
-
Method Details
-
copy
-
builder
public static CuboidEffect.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
protected void onRun()Description copied from class:EffectMain method to extend, here the animation code is run EACH tick -
getXLength
public double getXLength() -
setXLength
public void setXLength(double xLength) -
getYLength
public double getYLength() -
setYLength
public void setYLength(double yLength) -
getZLength
public double getZLength() -
setZLength
public void setZLength(double zLength) -
getPadding
public double getPadding() -
setPadding
public void setPadding(double padding) -
isBlockSnap
public boolean isBlockSnap() -
setBlockSnap
public void setBlockSnap(boolean blockSnap) -
getParticles
public int getParticles() -
setParticles
public void setParticles(int particles)
-