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
.java.util.List<Color>
colors()
Gets the ordered list of colors.java.util.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
java.util.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
java.util.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
-
-