Class DustColorTransitionData


public final class DustColorTransitionData extends DustData
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 Details

    • DustColorTransitionData

      public DustColorTransitionData(Color color, Color fadeColor, float size)
      Creates a new DustColorTransitionData instance.
      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 new DustColorTransitionData instance.
      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

      public Object 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.

      Overrides:
      toNMSData in class DustData
      Returns:
      the nms counterpart of this class.