Class DustColorTransitionData
java.lang.Object
xyz.xenondevs.particle.data.ParticleData
xyz.xenondevs.particle.data.color.ParticleColor
xyz.xenondevs.particle.data.color.RegularColor
xyz.xenondevs.particle.data.color.DustData
xyz.xenondevs.particle.data.color.DustColorTransitionData
This
DustData implementation is solely built
for the ParticleEffect.DUST_COLOR_TRANSITION
effect. It supports 2 colors and a custom size. The
resulting particle will show a color fade between
those 2 colors.- Author:
- ByteZ
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDustColorTransitionData(int red, int green, int blue, int fadeRed, int fadeGreen, int fadeBlue, float size) Creates a newDustColorTransitionDatainstance.DustColorTransitionData(Color color, Color fadeColor, float size) Creates a newDustColorTransitionDatainstance. -
Method Summary
Modifier and TypeMethodDescriptionfloatGets the blue value of the color the particle will fade to.floatGets the green value of the color the particle will fade to.floatGets the red value of the color the particle will fade to.Creates a new instance of the nms counterpart of this class.Methods inherited from class xyz.xenondevs.particle.data.color.RegularColor
fromHSVHue, getBlue, getGreen, getRed, random, randomMethods inherited from class xyz.xenondevs.particle.data.ParticleData
getEffect, setEffect
-
Constructor Details
-
DustColorTransitionData
Creates a newDustColorTransitionDatainstance.- Parameters:
color- the start color of the particle.fadeColor- the color the particle will fade to.size- the size of the particle.
-
DustColorTransitionData
public DustColorTransitionData(int red, int green, int blue, int fadeRed, int fadeGreen, int fadeBlue, float size) Creates a newDustColorTransitionDatainstance.- Parameters:
red- the red value of the start color.green- the green value of the start color.blue- the blue value of the start color.fadeRed- the red value of the second color.fadeGreen- the green value of the second color.fadeBlue- the blue value of the second color.size- the size of the particle.
-
-
Method Details
-
getFadeRed
public float getFadeRed()Gets the red value of the color the particle will fade to. (Value range is 0f-1f)- Returns:
- the red value of the second color.
-
getFadeGreen
public float getFadeGreen()Gets the green value of the color the particle will fade to. (Value range is 0f-1f)- Returns:
- the red value of the second color.
-
getFadeBlue
public float getFadeBlue()Gets the blue value of the color the particle will fade to. (Value range is 0f-1f)- Returns:
- the red value of the second color.
-
toNMSData
Creates a new instance of the nms counterpart of this class.Please note that this class is not supported in any versions before 1.17 and could lead to errors if used in legacy versions.
-