Class ColoredImageEffect
java.lang.Object
me.emafire003.dev.particleanimationlib.Effect
me.emafire003.dev.particleanimationlib.effects.base.YPREffect
me.emafire003.dev.particleanimationlib.effects.image.BaseImageEffect
me.emafire003.dev.particleanimationlib.effects.image.ColoredImageEffect
Draw an image or animated gif using colored particles
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classColoredImageEffectbuilder static inner class.Nested classes/interfaces inherited from class me.emafire003.dev.particleanimationlib.effects.image.BaseImageEffect
BaseImageEffect.Plane -
Field Summary
Fields inherited from class me.emafire003.dev.particleanimationlib.effects.image.BaseImageEffect
angularVelocityX, angularVelocityY, angularVelocityZ, enableRotation, ERROR_IMAGE, fileName, frameDelay, imageLoadCallback, images, orient, particleSize, plane, rotation, rotationStepCounter, scale, step, stepDelay, stepX, stepY, transparencyFields 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, iterations, originOffset, originPos, particle, ticks, type, updatePositions, useEyePosAsOrigin, world -
Constructor Summary
ConstructorsConstructorDescriptionColoredImageEffect(net.minecraft.server.world.ServerWorld world, net.minecraft.util.math.Vec3d origin, float yaw, float pitch, String fileName, boolean transparency, int frameDelay, int stepX, int stepY, float scale, float particleSize, net.minecraft.util.math.Vec3d rotation, boolean orient, boolean enableRotation, BaseImageEffect.Plane plane, double angularVelocityX, double angularVelocityY, double angularVelocityZ) Creates a new Colored Image effectColoredImageEffect(net.minecraft.server.world.ServerWorld world, net.minecraft.util.math.Vec3d originPos, String image_fileName) ColoredImageEffect(net.minecraft.server.world.ServerWorld world, net.minecraft.util.math.Vec3d originPos, net.minecraft.util.Identifier image) -
Method Summary
Modifier and TypeMethodDescriptionstatic ColoredImageEffect.Builderbuilder(net.minecraft.server.world.ServerWorld world, net.minecraft.util.math.Vec3d originPos, String fileName) Returns a builder for the effect.static ColoredImageEffect.Builderbuilder(net.minecraft.server.world.ServerWorld world, net.minecraft.util.math.Vec3d originPos, net.minecraft.util.Identifier image) Returns a builder for the effect.protected voiddisplay(BufferedImage image, net.minecraft.util.math.Vec3d v, net.minecraft.util.math.Vec3d pos, int pixel_color) This method is to be overridden by extending classes such asColoredImageEffectMethods inherited from class me.emafire003.dev.particleanimationlib.effects.image.BaseImageEffect
copy, getAngularVelocityX, getAngularVelocityY, getAngularVelocityZ, getFileName, getFrameDelay, getParticleSize, getPlane, getRotation, getScale, getStepX, getStepY, isEnableRotation, isOrient, isTransparency, load, load, loadFile, onRun, setAngularVelocityX, setAngularVelocityY, setAngularVelocityZ, setEnableRotation, setFileName, setFrameDelay, setOrient, setParticleSize, setPlane, setRotation, setScale, setStepX, setStepY, setTransparencyMethods 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, getOriginOffset, getOriginPos, getParticle, getWorld, isUpdatePositions, isUseEyePosAsOrigin, onStop, run, run, runFor, runFor, setDelay, setEntityOrigin, setExecuteOnStop, setIterations, setOriginOffset, setOriginPos, setParticle, setUpdatePositions, setUseEyePosAsOrigin, setWorld
-
Constructor Details
-
ColoredImageEffect
public ColoredImageEffect(net.minecraft.server.world.ServerWorld world, net.minecraft.util.math.Vec3d originPos, String image_fileName) -
ColoredImageEffect
public ColoredImageEffect(net.minecraft.server.world.ServerWorld world, net.minecraft.util.math.Vec3d originPos, net.minecraft.util.Identifier image) -
ColoredImageEffect
public ColoredImageEffect(net.minecraft.server.world.ServerWorld world, net.minecraft.util.math.Vec3d origin, float yaw, float pitch, String fileName, boolean transparency, int frameDelay, int stepX, int stepY, float scale, float particleSize, net.minecraft.util.math.Vec3d rotation, boolean orient, boolean enableRotation, BaseImageEffect.Plane plane, double angularVelocityX, double angularVelocityY, double angularVelocityZ) Creates a new Colored Image effect- Parameters:
world- The world the particles are going to spawn inorigin- The origin position of the effect, aka the starting point of the coneyaw- 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()fileName- The path and the name of the file that you want to display. It can also be an URL. Supported formats include jpg, png, giftransparency- If true transparent pixels will be transparent, otherwise they will be black.frameDelay- How many ticks to show each frame forstepX- How many pixel should be skipped on the X? Aka show only one pixel every *n* on the X planestepY- How many pixel should be skipped on the Y? Aka show only one pixel every *n* on the Y planescale- Scale factor for the imageparticleSize- How big should each individual Dust particle be? See alsoDustParticleEffectrotation- Apply a fixed rotation (independent of enableRotation)orient- Should the image orient towards yaw and pitch? For example orient to the player's facing directionenableRotation- Should it rotate?plane- What plane should it rotate?angularVelocityX- Turns the image by this angle each iteration around the x-axis (radians)angularVelocityY- Turns the image by this angle each iteration around the y-axis (radians)angularVelocityZ- Turns the image by this angle each iteration around the z-axis (radians)
-
-
Method Details
-
builder
public static ColoredImageEffect.Builder builder(net.minecraft.server.world.ServerWorld world, net.minecraft.util.math.Vec3d originPos, String fileName) Returns a builder for the effect.- Parameters:
world- The world the particles are going to spawn inoriginPos- The origin position of the effectSetting a world, an image path 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!
fileName- The path and the name of the file that you want to display. It can also be an URL. * You can also usenew Identifier(modid, resource).getPath(). Supported formats include jpg, png, gif
-
builder
public static ColoredImageEffect.Builder builder(net.minecraft.server.world.ServerWorld world, net.minecraft.util.math.Vec3d originPos, net.minecraft.util.Identifier image) Returns a builder for the effect.- Parameters:
world- The world the particles are going to spawn inoriginPos- The origin position of the effectSetting a world, an image path 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!
image- An identifier representing the image that will be displayed. The image must be placed in the /data/ folder and not the /assets/ folder!
-
display
protected void display(BufferedImage image, net.minecraft.util.math.Vec3d v, net.minecraft.util.math.Vec3d pos, int pixel_color) Description copied from class:BaseImageEffectThis method is to be overridden by extending classes such asColoredImageEffect- Specified by:
displayin classBaseImageEffect
-