Interface ParticleEffect.Builder

    • Method Detail

      • type

        ParticleEffect.Builder type​(ParticleType particleType)
        Sets the particle type for the particle effect.
        Parameters:
        particleType - The particle type
        Returns:
        This builder for chaining
      • type

        default ParticleEffect.Builder type​(java.util.function.Supplier<? extends ParticleType> particleType)
        Sets the particle type for the particle effect.
        Parameters:
        particleType - The particle type
        Returns:
        This builder for chaining
      • option

        <V> ParticleEffect.Builder option​(ParticleOption<V> option,
                                          V value)
                                   throws java.lang.IllegalArgumentException
        Sets the value of the specified ParticleOption.
        Type Parameters:
        V - The type of option value
        Parameters:
        option - The option
        value - The value
        Returns:
        This builder for chaining
        Throws:
        java.lang.IllegalArgumentException - If the specified value isn't valid
      • option

        default <V> ParticleEffect.Builder option​(java.util.function.Supplier<? extends ParticleOption<V>> option,
                                                  V value)
                                           throws java.lang.IllegalArgumentException
        Sets the value of the specified ParticleOption.
        Type Parameters:
        V - The type of option value
        Parameters:
        option - The option
        value - The value
        Returns:
        This builder for chaining
        Throws:
        java.lang.IllegalArgumentException - If the specified value isn't valid
      • scale

        default <V> ParticleEffect.Builder scale​(java.lang.Double scale)
        Sets the scale of the particle effect.

        The default scale is 1.

        Parameters:
        scale - The scale
        Returns:
        This builder for chaining
      • velocity

        default ParticleEffect.Builder velocity​(Vector3d velocity)
        Sets the velocity of the particle effect.

        The default velocity is Vector3d.ZERO.

        Parameters:
        velocity - The velocity
        Returns:
        This builder for chaining
      • quantity

        default ParticleEffect.Builder quantity​(int quantity)
                                         throws java.lang.IllegalArgumentException
        Sets the amount of particles of the particle effect.

        The default quantity is 1.

        Parameters:
        quantity - The quantity particles
        Returns:
        This builder, for chaining
        Throws:
        java.lang.IllegalArgumentException - If the quantity is less than one