Interface ParticleEffect
-
- All Superinterfaces:
DataSerializable
public interface ParticleEffect extends DataSerializable
Represents a particle effect that can be send to the Minecraft client.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
ParticleEffect.Builder
Represents a builder to create aParticleEffect
.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static ParticleEffect.Builder
builder()
Creates a newParticleEffect.Builder
to build aParticleEffect
.default <V> Optional<V>
option(Supplier<? extends ParticleOption<V>> option)
Gets the value for the specifiedParticleOption
.<V> Optional<V>
option(ParticleOption<V> option)
Gets the value for the specifiedParticleOption
.default <V> Optional<V>
optionOrDefault(Supplier<? extends ParticleOption<V>> option)
Gets the value for the specifiedParticleOption
or the default value if not present.default <V> Optional<V>
optionOrDefault(ParticleOption<V> option)
Gets the value for the specifiedParticleOption
or the default value if not present.Map<ParticleOption<?>,Object>
options()
Gets a immutableMap
with all the availableParticleOption
s and their values.ParticleType
type()
Gets the type of the particle effect.-
Methods inherited from interface org.spongepowered.api.data.persistence.DataSerializable
contentVersion, toContainer
-
-
-
-
Method Detail
-
builder
static ParticleEffect.Builder builder()
Creates a newParticleEffect.Builder
to build aParticleEffect
.- Returns:
- The new builder
-
type
ParticleType type()
Gets the type of the particle effect.- Returns:
- The particle type
-
option
default <V> Optional<V> option(Supplier<? extends ParticleOption<V>> option)
Gets the value for the specifiedParticleOption
.- Type Parameters:
V
- The value type- Parameters:
option
- The particle option- Returns:
- The option value if present, otherwise
Optional.empty()
-
option
<V> Optional<V> option(ParticleOption<V> option)
Gets the value for the specifiedParticleOption
.- Type Parameters:
V
- The value type- Parameters:
option
- The particle option- Returns:
- The option value if present, otherwise
Optional.empty()
-
optionOrDefault
default <V> Optional<V> optionOrDefault(Supplier<? extends ParticleOption<V>> option)
Gets the value for the specifiedParticleOption
or the default value if not present.- Type Parameters:
V
- The value type- Parameters:
option
- The particle option- Returns:
- The option value if present, otherwise
Optional.empty()
-
optionOrDefault
default <V> Optional<V> optionOrDefault(ParticleOption<V> option)
Gets the value for the specifiedParticleOption
or the default value if not present.- Type Parameters:
V
- The value type- Parameters:
option
- The particle option- Returns:
- The option value if present, otherwise
Optional.empty()
-
options
Map<ParticleOption<?>,Object> options()
Gets a immutableMap
with all the availableParticleOption
s and their values.- Returns:
- The default options
-
-