Interface FireworkEffect

All Superinterfaces:
DataSerializable

public interface FireworkEffect extends DataSerializable
Represents a firework explosion.

FireworkEffects are immutable once created. To change one or create one, use FireworkEffect.Builder.

  • Method Details

    • builder

      static FireworkEffect.Builder builder()
      Creates a new FireworkEffect.Builder to build a FireworkEffect.
      Returns:
      The new builder
    • flickers

      boolean flickers()
      Gets whether this FireworkEffect will flicker when detonated.
      Returns:
      Whether this effect will flicker
    • hasTrail

      boolean hasTrail()
      Gets whether this FireworkEffect will have a trail when detonated.
      Returns:
      Whether this effect will have a trail
    • colors

      List<Color> colors()
      Gets the ordered list of colors.

      In some implementations, the order of colors defines the colors showing from edge to center of the firework explosion.

      Returns:
      The list of colors
    • fadeColors

      List<Color> fadeColors()
      Gets the ordered list of colors.

      Normally in vanilla, the order of colors defines the colors showing from edge to center of the firework explosion.

      Returns:
      The list of colors
    • shape

      FireworkShape shape()
      Gets the explosion shape.
      Returns:
      The explosion shape