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 newBuilderfor constructing aBiomeSettingsinstance.defaultSettings(): Returns aBiomeSettingswith default values: depth0.1, scale0.2, temperature0.5, downfall0.5, modifierNONE, 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.
depth(float): Sets the biome depth. Default0.1.scale(float): Sets the biome scale. Default0.2.temperature(float): Sets the biome temperature. Default0.5.downfall(float): Sets the biome downfall. Default0.5.modifier(BiomeTempModifier): Sets the temperature modifier. DefaultBiomeTempModifier.NONE.hasPrecipitation(boolean): Sets whether the biome has precipitation. Defaulttrue.build(): Builds and returns a newBiomeSettingsfrom the configured values.
Example Usage
Section titled “Example Usage”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();
}
}