AmbientParticle Wrapper
Ambient particles are a visual effect that can be added to biomes to enhance their atmosphere. BiomesAPI provides wrappers for ambient particles that can be used to easily add them to your custom biomes.
Ambient particles come in two forms, simple and complex.
Simple particle types only require a particle type and a float specifying the density of the ambient particles.
Complex particle types require a type, density, and a custom data specific to the particle type.
BiomesAPI supports all particle types that are available on the server version you’re running on, but some new particle types may not be available on older server versions.
Example Usage
Section titled “Example Usage”import me.outspending.biomesapi.biome.CustomBiome;
import me.outspending.biomesapi.wrapper.environment.particle.WrappedParticleTypes;
import me.outspending.biomesapi.wrapper.environment.particle.options.DustParticle;
import org.bukkit.plugin.java.JavaPlugin;
public class ExamplePlugin extends JavaPlugin {
@Override
public void onEnable() {
CustomBiome.builder()
// Other biome settings...
.ambientParticle(WrappedParticleTypes.SMOKE, 0.001f)
.ambientParticle(WrappedParticleTypes.DUST, 0.002f, DustParticle.of("#FF0000"))
.build();
}
} Particle Catalogs
Section titled “Particle Catalogs”BiomesAPI provides a built-in ParticleCatalog
which can be used for storing a list of ambient particles that you may want to apply across multiple biomes.
Example Usage
Section titled “Example Usage”import me.outspending.biomesapi.biome.CustomBiome;
import me.outspending.biomesapi.wrapper.environment.particle.ParticleCatalog;
import me.outspending.biomesapi.wrapper.environment.particle.WrappedParticleTypes;
import me.outspending.biomesapi.wrapper.environment.particle.options.DustParticle;
import org.bukkit.plugin.java.JavaPlugin;
public class ExamplePlugin extends JavaPlugin {
@Override
public void onEnable() {
ParticleCatalog catalog = ParticleCatalog.builder()
.addSimple(WrappedParticleTypes.ASH, 0.001f)
.addComplex(WrappedParticleTypes.DUST, 0.002f, DustParticle.of("#FF0000"))
.build();
CustomBiome.builder()
// Other biome settings...
.particleCatalog(catalog)
.build();
}
}