Skip to content

Biome Settings

A record holding the environmental settings for a custom biome, such as depth, scale, temperature, downfall, and precipitation. Instances are created either with sensible defaults or through the nested fluent Builder.

Each numeric property is bounded to a @Range(from = 0, to = 25).

  • builder(): Creates a new Builder for constructing a BiomeSettings instance.
  • defaultSettings(): Returns a BiomeSettings with default values: depth 0.1, scale 0.2, temperature 0.5, downfall 0.5, modifier NONE, and precipitation enabled.

A fluent builder for BiomeSettings. Each setter returns the builder for chaining, and build() produces the final record. Any property left unset falls back to its default.

ExamplePlugin.java Java
import me.outspending.biomesapi.wrapper.BiomeSettings;
import me.outspending.biomesapi.wrapper.environment.BiomeTempModifier;
import org.bukkit.plugin.java.JavaPlugin;

public class ExamplePlugin extends JavaPlugin {
  @Override
  public void onEnable() {
      // The quickest option, using vanilla defaults.
      BiomeSettings defaults = BiomeSettings.defaultSettings();

      // Or customize individual properties via the builder.
      // Omit an option to use the default value for that property.
      BiomeSettings settings = BiomeSettings.builder()
          .depth(0.15F)
          .scale(0.25F)
          .temperature(0.8F)
          .downfall(0.4F)
          .modifier(BiomeTempModifier.FROZEN)
          .hasPrecipitation(true)
          .build();
  }
}