Package org.spongepowered.api.item
Interface FireworkEffect
-
- All Superinterfaces:
DataSerializable
public interface FireworkEffect extends DataSerializable
Represents a firework explosion.FireworkEffect
s are immutable once created. To change one or create one, useFireworkEffect.Builder
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
FireworkEffect.Builder
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static FireworkEffect.Builder
builder()
Creates a newFireworkEffect.Builder
to build aFireworkEffect
.List<Color>
colors()
Gets the ordered list of colors.List<Color>
fadeColors()
Gets the ordered list of colors.boolean
flickers()
Gets whether thisFireworkEffect
will flicker when detonated.boolean
hasTrail()
Gets whether thisFireworkEffect
will have a trail when detonated.FireworkShape
shape()
Gets the explosion shape.-
Methods inherited from interface org.spongepowered.api.data.persistence.DataSerializable
contentVersion, toContainer
-
-
-
-
Method Detail
-
builder
static FireworkEffect.Builder builder()
Creates a newFireworkEffect.Builder
to build aFireworkEffect
.- Returns:
- The new builder
-
flickers
boolean flickers()
Gets whether thisFireworkEffect
will flicker when detonated.- Returns:
- Whether this effect will flicker
-
hasTrail
boolean hasTrail()
Gets whether thisFireworkEffect
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
-
-