Package org.spongepowered.api.item
Interface FireworkEffect.Builder
-
- All Superinterfaces:
Buildable.Builder<FireworkEffect>
,Builder<FireworkEffect,FireworkEffect.Builder>
,CopyableBuilder<FireworkEffect,FireworkEffect.Builder>
,ResettableBuilder<FireworkEffect,FireworkEffect.Builder>
- Enclosing interface:
- FireworkEffect
public static interface FireworkEffect.Builder extends Builder<FireworkEffect,FireworkEffect.Builder>, CopyableBuilder<FireworkEffect,FireworkEffect.Builder>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description FireworkEffect
build()
Builds aFireworkEffect
based on the current state of this builder.FireworkEffect.Builder
color(Color color)
Adds the givenColor
to the initial explosion colors.FireworkEffect.Builder
colors(Iterable<Color> colors)
Adds the givenColor
s to the initial explosion colors.FireworkEffect.Builder
colors(Color... colors)
Adds the givenColor
s to the initial explosion colors.FireworkEffect.Builder
fade(Color color)
Adds the givenColor
to the fade colors.FireworkEffect.Builder
fades(Iterable<Color> colors)
Adds the givenColor
s to the fade colors.FireworkEffect.Builder
fades(Color... colors)
Adds the givenColor
s to the fade colors.FireworkEffect.Builder
flicker(boolean flicker)
Sets whether theFireworkEffect
is going to flicker on explosion.default FireworkEffect.Builder
shape(Supplier<? extends FireworkShape> shape)
Sets the shape of theFireworkEffect
explosion.FireworkEffect.Builder
shape(FireworkShape shape)
Sets the shape of theFireworkEffect
explosion.FireworkEffect.Builder
trail(boolean trail)
Sets whether theFireworkEffect
is going to have a trail or not.-
Methods inherited from interface org.spongepowered.api.util.CopyableBuilder
from
-
-
-
-
Method Detail
-
trail
FireworkEffect.Builder trail(boolean trail)
Sets whether theFireworkEffect
is going to have a trail or not.- Parameters:
trail
- Whether the firework will have a trail- Returns:
- This builder, for chaining
-
flicker
FireworkEffect.Builder flicker(boolean flicker)
Sets whether theFireworkEffect
is going to flicker on explosion.- Parameters:
flicker
- Whether the explosion will flicker- Returns:
- This builder, for chaining
-
color
FireworkEffect.Builder color(Color color)
Adds the givenColor
to the initial explosion colors.Colors can be mixed and matched in the order they are added in.
- Parameters:
color
- The color to add to the explosion- Returns:
- This builder, for chaining
-
colors
FireworkEffect.Builder colors(Color... colors)
Adds the givenColor
s to the initial explosion colors.Colors can be mixed and matched in the order they are added in.
- Parameters:
colors
- The colors to add to the explosion- Returns:
- This builder, for chaining
-
colors
FireworkEffect.Builder colors(Iterable<Color> colors)
Adds the givenColor
s to the initial explosion colors.Colors can be mixed and matched in the order they are added in.
- Parameters:
colors
- The colors to add to the explosion- Returns:
- This builder, for chaining
-
fade
FireworkEffect.Builder fade(Color color)
Adds the givenColor
to the fade colors.Colors can be mixed and matched in the order they are added in.
- Parameters:
color
- The colors to add to the fade- Returns:
- This builder, for chaining
-
fades
FireworkEffect.Builder fades(Color... colors)
Adds the givenColor
s to the fade colors.Colors can be mixed and matched in the order they are added in.
- Parameters:
colors
- The colors to add to the fade- Returns:
- This builder, for chaining
-
fades
FireworkEffect.Builder fades(Iterable<Color> colors)
Adds the givenColor
s to the fade colors.Colors can be mixed and matched in the order they are added in.
- Parameters:
colors
- The colors to add to the fade- Returns:
- This builder, for chaining
-
shape
FireworkEffect.Builder shape(FireworkShape shape)
Sets the shape of theFireworkEffect
explosion.- Parameters:
shape
- The shape of the explosion- Returns:
- This builder, for chaining
-
shape
default FireworkEffect.Builder shape(Supplier<? extends FireworkShape> shape)
Sets the shape of theFireworkEffect
explosion.- Parameters:
shape
- The shape of the explosion- Returns:
- This builder, for chaining
-
build
FireworkEffect build()
Builds aFireworkEffect
based on the current state of this builder.- Specified by:
build
in interfaceBuildable.Builder<FireworkEffect>
- Returns:
- A newly created firework effect
-
-