Interface ParticleType
-
- All Superinterfaces:
DefaultedRegistryValue
@CatalogedBy(ParticleTypes.class) public interface ParticleType extends DefaultedRegistryValue
Represents a particle that can be sent on a Minecraft client.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default <V> Optional<V>
defaultOption(Supplier<? extends ParticleOption<V>> option)
Gets the default value for the specifiedParticleOption
, it may returnOptional.empty()
if the particle option isn't supported by this particle type.<V> Optional<V>
defaultOption(ParticleOption<V> option)
Gets the default value for the specifiedParticleOption
, it may returnOptional.empty()
if the particle option isn't supported by this particle type.Map<ParticleOption<?>,Object>
defaultOptions()
Gets a immutableMap
with all the availableParticleOption
s and their values.-
Methods inherited from interface org.spongepowered.api.registry.DefaultedRegistryValue
asDefaultedReference, findKey, key
-
-
-
-
Method Detail
-
defaultOption
default <V> Optional<V> defaultOption(Supplier<? extends ParticleOption<V>> option)
Gets the default value for the specifiedParticleOption
, it may returnOptional.empty()
if the particle option isn't supported by this particle type.- Type Parameters:
V
- The value type- Parameters:
option
- The particle option- Returns:
- The option value if present, otherwise
Optional.empty()
-
defaultOption
<V> Optional<V> defaultOption(ParticleOption<V> option)
Gets the default value for the specifiedParticleOption
, it may returnOptional.empty()
if the particle option isn't supported by this particle type.- Type Parameters:
V
- The value type- Parameters:
option
- The particle option- Returns:
- The option value if present, otherwise
Optional.empty()
-
defaultOptions
Map<ParticleOption<?>,Object> defaultOptions()
Gets a immutableMap
with all the availableParticleOption
s and their values. When a option isn't available inside thisMap
it's most likely not supported by this particle type.- Returns:
- The default options
-
-