Package org.spongepowered.api.item
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, useFireworkEffect.Builder.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceFireworkEffect.Builder
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static FireworkEffect.Builderbuilder()Creates a newFireworkEffect.Builderto build aFireworkEffect.java.util.List<Color>colors()Gets the ordered list of colors.java.util.List<Color>fadeColors()Gets the ordered list of colors.booleanflickers()Gets whether thisFireworkEffectwill flicker when detonated.booleanhasTrail()Gets whether thisFireworkEffectwill have a trail when detonated.FireworkShapeshape()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.Builderto build aFireworkEffect.- Returns:
- The new builder
-
flickers
boolean flickers()
Gets whether thisFireworkEffectwill flicker when detonated.- Returns:
- Whether this effect will flicker
-
hasTrail
boolean hasTrail()
Gets whether thisFireworkEffectwill 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
-
-