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 interfaceParticleEffect.BuilderRepresents a builder to create aParticleEffect.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static ParticleEffect.Builderbuilder()Creates a newParticleEffect.Builderto 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 specifiedParticleOptionor the default value if not present.default <V> Optional<V>optionOrDefault(ParticleOption<V> option)Gets the value for the specifiedParticleOptionor the default value if not present.Map<ParticleOption<?>,Object>options()Gets a immutableMapwith all the availableParticleOptions and their values.ParticleTypetype()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.Builderto 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 specifiedParticleOptionor 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 specifiedParticleOptionor 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 immutableMapwith all the availableParticleOptions and their values.- Returns:
- The default options
-
-