World gen stuff

This commit is contained in:
2026-11-13 00:01:59 -03:00
parent e013fbe550
commit e8ca9753f5
25 changed files with 645 additions and 162 deletions
+5 -4
View File
@@ -38,7 +38,7 @@ at y 64.
"ores": [
{
"id": "copper_tools:rich_copper_ore",
"replaces": "bworld:stone",
"replaces": "#bworld:raw_rocks",
"min_y": 5,
"max_y": 40,
"scale": 0.05,
@@ -48,9 +48,10 @@ at y 64.
}
```
Every block in the chunk that is `replaces` and between `min_y` and `max_y` becomes the first ore whose 3D noise,
sampled at `(x, y, z) × scale`, is above `threshold`. A smaller `scale` makes bigger veins, and a higher `threshold`
makes rarer ones. Each ore's noise is seeded with its id, so ores don't line up with each other.
`replaces` is a block, a `#tag` of blocks, or a list of those, like `["bworld:stone", "#bworld:raw_rocks"]`. Every block
in the chunk that is one of them and between `min_y` and `max_y` becomes the first ore whose 3D noise, sampled at
`(x, y, z) × scale`, is above `threshold`. A smaller `scale` makes bigger veins, and a higher `threshold` makes rarer
ones. Each ore's noise is seeded with its id, so ores don't line up with each other.
Each mod's ores are a pass of their own, after the mods loaded before it. So a mod's ore can replace another mod's, like
`"replaces": "bworld:coal_ore"` for a rare vein inside coal. The base game's are in `mods/bworld/worldgen/ores.json`.