Interface ParticleEffect
- All Superinterfaces:
DataSerializable
Represents a particle effect that can be send to the Minecraft client.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceRepresents a builder to create aParticleEffect. -
Method Summary
Modifier and TypeMethodDescriptionstatic 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.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.Builderto 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 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
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
-