Class ParticleCatalog.Builder
java.lang.Object
dev.wyck.wrapper.environment.particle.ParticleCatalog.Builder
- Enclosing class:
ParticleCatalog
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the ParticleCatalog.clear()Clears the catalog.complex(ParticleTypes particleType, float probability, ParticleData data) Adds a complex particle to the catalog.merge(ParticleCatalog source) Adds all particles from another ParticleCatalog to this one.particle(ParticleTypes particleType, float probability) Adds a particle to the catalog.particle(ParticleTypes particleType, float probability, @Nullable ParticleData data) Adds a particle to the catalog.simple(ParticleTypes particleType, float probability) Adds a simple particle to the catalog.
-
Constructor Details
-
Builder
public Builder() -
Builder
-
-
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
Adds a simple particle to the catalog.- Parameters:
particleType- The wrapped particle type.probability- The probability of the particle.- Returns:
- The builder instance.
-
clear
Clears the catalog.- Returns:
- The builder instance.
- Since:
- 2.1.0
-
merge
Adds all particles from another ParticleCatalog to this one.- Parameters:
source- The source ParticleCatalog.- Returns:
- The builder instance.
- Since:
- 2.1.0
-
build
Builds the ParticleCatalog.- Returns:
- The constructed ParticleCatalog.
-