Interface ParticleEffect
- All Superinterfaces:
DataSerializable
Represents a particle effect that can be send to the Minecraft client.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Represents a builder to create aParticleEffect
. -
Method Summary
Modifier and TypeMethodDescriptionstatic 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.type()
Gets the type of the particle effect.Methods inherited from interface org.spongepowered.api.data.persistence.DataSerializable
contentVersion, toContainer
-
Method Details
-
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
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
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
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
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
-