3D biomes
This commit is contained in:
@@ -151,7 +151,7 @@ A generator. The base game's is `worldgen/noise_settings/overworld.json`:
|
||||
| `cell_width` | How far apart across `terrain` and `caves` are sampled, 1 to 16. |
|
||||
| `terrain`, `caves` | Their density function, and how far apart up they're sampled. Solid where both are above 0. |
|
||||
| `preliminary_surface` | The ground's height before 3D noise. Surface rules, `steep` and `/locatebiome` use it. |
|
||||
| `climate` | Named values biome rules look at. Any names, except `surface` and `steep`. |
|
||||
| `climate` | Named values biome rules look at. Any names, except `surface`, `y`, `depth` and `steep`. |
|
||||
| `steep` | A column is steep when its preliminary surface is this much higher or lower than a neighbor's. |
|
||||
| `biome_source` | The biome source that picks its biomes. |
|
||||
| `fluids` | What empty space becomes, the first that applies: below `below`, where there's `open_sky` (nothing but air above) or where a density function is in a range. |
|
||||
@@ -187,8 +187,18 @@ with `bworld:dark_forest`, which holds everywhere:
|
||||
}
|
||||
```
|
||||
|
||||
`when` holds when all its conditions do: a range of one of the generator's `climate` values, a range of `surface` (the y
|
||||
of the column's top solid block), or `"steep": true` or `false`. Rules without `when` always hold.
|
||||
Rules pick a biome for each 4 blocks tall cell of a column, see [Biomes](biomes.md). `when` holds when all its
|
||||
conditions do, each a range of one of these, or `"steep": true` or `false`. Rules without `when` always hold.
|
||||
|
||||
| Name | Meaning |
|
||||
| ----------------- | ---------------------------------------------------------------------------------------- |
|
||||
| a `climate` value | One of the generator's, the same all the way up a column. |
|
||||
| `surface` | The y of the column's top solid block. |
|
||||
| `y` | The cell's lowest y. |
|
||||
| `depth` | How far the cell is below the ground, `surface - y`: 0 at the ground, negative above it. |
|
||||
|
||||
A rule that looks at neither `y` nor `depth` holds all the way up a column, so the base game's rules give a column one
|
||||
biome. When no rule looks at them, a column's biome is worked out once.
|
||||
|
||||
This is bworld's own, not Minecraft's multi-noise biome source: a rule can look at how high the ground really is and
|
||||
whether it's a cliff, which is how beaches, peaks and stony shores are placed.
|
||||
@@ -217,6 +227,34 @@ plains:
|
||||
|
||||
Rules from several mods go in in load order. The biome itself is a [biome file](biomes.md) as usual.
|
||||
|
||||
### Underground Biomes
|
||||
|
||||
A rule with `depth` or `y` puts a biome under the ground. It has to come before the rules it takes the place of, and the
|
||||
base game's all hold all the way down, so it goes before the first one. Mossy caves more than 16 blocks down, where it's
|
||||
humid:
|
||||
|
||||
```json
|
||||
{
|
||||
"format_version": 1,
|
||||
"biome_source": {
|
||||
"id": "my_mod:mossy_caves",
|
||||
"extends": "bworld:overworld",
|
||||
"rules": [{
|
||||
"id": "my_mod:mossy_caves",
|
||||
"before": "bworld:river_bed_frozen",
|
||||
"when": {
|
||||
"depth": { "min_exclusive": 16 },
|
||||
"humidity": { "min_exclusive": 0.4 }
|
||||
},
|
||||
"biome": "my_mod:mossy_caves"
|
||||
}]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
The ground keeps the biome of its own cell, surface blocks and all. Spawns, `entity.biome`, seasons and grass, leaf and
|
||||
water colors follow the biome where they are, so an underground biome's spawn list and colors work under the ground.
|
||||
|
||||
## Surface Rules
|
||||
|
||||
What a solid block becomes, like Minecraft's surface rules: a rule gives a block or nothing, and the first one in a
|
||||
|
||||
Reference in New Issue
Block a user