Class ParticleCatalog.Builder

java.lang.Object
dev.wyck.wrapper.environment.particle.ParticleCatalog.Builder
Enclosing class:
ParticleCatalog

@AsOf("2.1.0") public static class ParticleCatalog.Builder extends Object
A builder for creating ParticleCatalog instances.
Since:
1.1.0
  • Constructor Details

    • Builder

      public Builder()
    • Builder

      public Builder(ParticleCatalog catalog)
  • Method Details

    • particle

      @AsOf("1.1.0") public ParticleCatalog.Builder particle(ParticleTypes particleType, float probability, @Nullable ParticleData data)
      Adds a particle to the catalog.
      Parameters:
      particleType - The wrapped particle type.
      probability - The probability of the particle.
      data - The particle data, or null for simple particles.
      Returns:
      The builder instance.
    • particle

      @AsOf("1.1.0") public ParticleCatalog.Builder particle(ParticleTypes particleType, float probability)
      Adds a particle to the catalog.
      Parameters:
      particleType - The wrapped particle type.
      probability - The probability of the particle.
      Returns:
      The builder instance.
    • complex

      @AsOf("1.1.0") public ParticleCatalog.Builder complex(ParticleTypes particleType, float probability, ParticleData data)
      Adds a complex particle to the catalog.
      Parameters:
      particleType - The wrapped particle type.
      probability - The probability of the particle.
      data - The particle data.
      Returns:
      The builder instance.
    • simple

      @AsOf("1.1.0") public ParticleCatalog.Builder simple(ParticleTypes particleType, float probability)
      Adds a simple particle to the catalog.
      Parameters:
      particleType - The wrapped particle type.
      probability - The probability of the particle.
      Returns:
      The builder instance.
    • clear

      @AsOf("2.1.0") public ParticleCatalog.Builder clear()
      Clears the catalog.
      Returns:
      The builder instance.
      Since:
      2.1.0
    • merge

      @AsOf("2.1.0") public ParticleCatalog.Builder merge(ParticleCatalog source)
      Adds all particles from another ParticleCatalog to this one.
      Parameters:
      source - The source ParticleCatalog.
      Returns:
      The builder instance.
      Since:
      2.1.0
    • build

      @AsOf("1.1.0") public ParticleCatalog build()
      Builds the ParticleCatalog.
      Returns:
      The constructed ParticleCatalog.