Interface AmbientParticle

All Superinterfaces:
Wrapper

@NullMarked @AsOf("1.1.0") public interface AmbientParticle extends Wrapper
A wrapper for ambient particles in a biome, including their type, probability, and optional data.
Since:
1.1.0
See Also:
  • Field Details

  • Method Details

    • type

      @AsOf("1.1.0") ParticleTypes type()
      Gets the particle type.
      Returns:
      the particle type
      Since:
      1.1.0
    • probability

      @AsOf("1.1.0") float probability()
      Gets the probability of this particle being spawned.
      Returns:
      the probability of this particle being spawned
      Since:
      1.1.0
    • particleData

      @AsOf("1.1.0") @Nullable ParticleData particleData()
      Gets the particle data.
      Returns:
      the particle data, or null if type() is simple
      Since:
      1.1.0
    • particleOptions

      @AsOf("1.1.0") default ParticleOptions particleOptions()
      Delegates the wrapped ambient particle to a Minecraft ParticleOptions.
      Returns:
      The corresponding Minecraft ParticleOptions.
      Since:
      1.1.0
    • toBuilder

      @AsOf("3.0.0") default AmbientParticle.Builder toBuilder()
      Converts this AmbientParticle to a Builder instance.
      Returns:
      a new Builder instance with the same properties as this instance
      Since:
      3.0.0
    • of

      @AsOf("3.0.0") static AmbientParticle of(ParticleTypes ambientParticle, float probability, @Nullable ParticleData particleData)
      Creates a new AmbientParticle instance.
      Parameters:
      ambientParticle - The particle type.
      probability - The probability of the particle.
      particleData - The particle data, or null if the particle is simple.
      Returns:
      A new AmbientParticle instance.
      Since:
      3.0.0
    • of

      @AsOf("3.0.0") static AmbientParticle of(ParticleTypes ambientParticle, float probability)
      Creates a new AmbientParticle instance with no particle data.
      Parameters:
      ambientParticle - The particle type.
      probability - The probability of the particle.
      Returns:
      A new AmbientParticle instance with no particle data.
      Since:
      3.0.0
    • builder

      @AsOf("3.0.0") static AmbientParticle.Builder builder()
      Creates a new AmbientParticle builder.
      Returns:
      A new AmbientParticle builder.
      Since:
      3.0.0