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> java.util.Optional<V>
option(java.util.function.Supplier<? extends ParticleOption<V>> option)
Gets the value for the specifiedParticleOption
.<V> java.util.Optional<V>
option(ParticleOption<V> option)
Gets the value for the specifiedParticleOption
.default <V> java.util.Optional<V>
optionOrDefault(java.util.function.Supplier<? extends ParticleOption<V>> option)
Gets the value for the specifiedParticleOption
or the default value if not present.default <V> java.util.Optional<V>
optionOrDefault(ParticleOption<V> option)
Gets the value for the specifiedParticleOption
or the default value if not present.java.util.Map<ParticleOption<?>,java.lang.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> java.util.Optional<V> option(java.util.function.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> java.util.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> java.util.Optional<V> optionOrDefault(java.util.function.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> java.util.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
java.util.Map<ParticleOption<?>,java.lang.Object> options()
Gets a immutableMap
with all the availableParticleOption
s and their values.- Returns:
- The default options
-
-