Expand description
Biome source abstraction for dimension-agnostic biome generation.
Mirrors vanilla’s BiomeSource hierarchy:
MultiNoiseBiomeSource— Overworld and Nether (climate parameter matching viaRTree)TheEndBiomeSource— The End (spatial + erosion threshold)
Each dimension creates a different BiomeSourceKind variant. The chunk generator
calls chunk_sampler() per chunk to get a ChunkBiomeSampler that holds per-chunk
caches (column cache, R-tree warm-start index).
§R-tree cache strategy
Vanilla uses ThreadLocal<Leaf> which persists the warm-start index across chunks,
making tie-breaking at equidistant biome boundaries depend on chunk generation order.
We use a per-sampler cache instead: reset per chunk, deterministic regardless of
generation order, and better L1 locality since the cache lives on the sampler struct
alongside the column cache. The only cost is one cold start per chunk (1/1536 lookups).
Structs§
- EndBiome
Source - Biome source for The End dimension.
- EndChunk
Biome Sampler - Nether
Biome Source - Multi-noise biome source for the nether.
- Nether
Chunk Biome Sampler - Overworld
Biome Source - Multi-noise biome source for the overworld.
- Overworld
Chunk Biome Sampler
Enums§
- Biome
Source Kind - Dimension-specific biome source.
- Chunk
Biome Sampler - Per-chunk biome sampler with internal caches.