Skip to content

API reference Obsidian.API.World.Generator

BiomeSourceBase class

A biome source type a plugin adds, like a NeoForge mod's BiomeSource: a level stem's biome_source names it in its type, and the object's other keys set its properties. Register it with IPluginRegistry.RegisterWorldgenType<BiomeSourceBase, TSource>.

public abstract class BiomeSourceBase

In Obsidian.API.

Remarks

Biomes are chosen per quart, a 4x4x4 block cell, like vanilla's. BiomeSourceBase.GetBiome runs for every quart of every chunk generated, and for biome lookups, on several threads at once, so keep it fast and don't change the source's state in it.

Constructors

protected BiomeSourceBase();

Properties

PossibleBiomes

public abstract IReadOnlyList<string> PossibleBiomes { get; }

Every biome BiomeSourceBase.GetBiome can return, vanilla's or plugins', like minecraft:plains. Read once, when the dimension is read; its order orders the features of the dimension's biomes, like vanilla's possibleBiomes.

Type

public abstract string Type { get; }

The type's identifier, the one it's registered with.

Methods

GetBiome(int, int, int, IClimateSampler)

public abstract string GetBiome(int quartX, int quartY, int quartZ, IClimateSampler climate);

The biome at quart coordinates (block coordinates divided by 4), one of BiomeSourceBase.PossibleBiomes.

Parameters

climate
Samples the noise settings' climate.

On this page