Interface ParticleEffect

  • All Superinterfaces:
    DataSerializable

    public interface ParticleEffect
    extends DataSerializable
    Represents a particle effect that can be send to the Minecraft client.
    • Method Detail

      • 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 specified ParticleOption.
        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 specified ParticleOption.
        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 specified ParticleOption 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 specified ParticleOption 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 immutable Map with all the available ParticleOptions and their values.
        Returns:
        The default options