Rework biome generation according to tectonic

This commit is contained in:
2026-10-02 18:32:35 -03:00
parent 9f637e6afb
commit 043c526c9c
12 changed files with 514 additions and 285 deletions
+9 -6
View File
@@ -94,13 +94,16 @@ Generated blocks don't run `on_create`, and worldgen scripts can't use the serve
## Terrain
The terrain itself is built into the engine (`common/worldgen/`). It works like Minecraft 1.18+ with the Terralith
datapack: continentalness, erosion and weirdness noises set every column's height and roughness, a 3D density is carved
into caves, and on top of that come terraced plateaus, shattered hills, river valleys and gorges, jagged peaks and rare
sky islands. Biome ids are the keys of `BIOMES` in `common/worldgen/overworld.ts`, like `bworld:yosemite_cliffs` or
`bworld:skylands`.
The terrain itself is built into the engine (`common/worldgen/`). It works like Minecraft 1.18+, shaped after the
[Tectonic](https://github.com/Apollounknowndev/tectonic) mod: continents, erosion and ridges noises set every column's
height and roughness, and a 3D density is carved into caves. Oceans wind between large continents, with islands out at
sea. Mountain ranges rise where erosion is low, and rivers run along the valleys between ridges, going underground where
they reach mountains. The flatter land is split into regions with their own shapes: valleys and plateaus (with badlands
ridges where it's hot), tiered mesas, rolling hills and jungle pillars, and wetlands and desert dunes.
`deno run -A tools/worldgen_preview.ts [seed]` renders it to PNG files.
Biome ids are the keys of `BIOMES` in `common/worldgen/overworld.ts`, like `bworld:plains` or `bworld:jagged_peaks`.
`deno run -A tools/worldgen_preview.ts [seed] [out dir] [x z]` renders it to PNG files, around chunk `x z`.
> [!NOTE]
> `register_terrain` exists in the API for mods that replace the terrain generator, but it throws for now: the terrain