CaveBiomes: a biome's minimum cave depth depends on the world and the biome only, so the host asks once per biome and keeps it

This commit is contained in:
piexel committed 2026-10-10 14:46:16 +02:00
1 parent b39c750e26
commit f99dbc6344
2 files changed
+3 -2

No files matched your search

+1 -1
View File
@@ -998,7 +998,7 @@ from a sapling, which drops a block has. A module answers such questions through
switch over every outcome). Keys are pack keys as packs write them and match without regard to case. switch over every outcome). Keys are pack keys as packs write them and match without regard to case.
`CaveBiomes` (`ONE`): the pack biome a module puts at a position whatever the regions say (a band of the deep dark, `CaveBiomes` (`ONE`): the pack biome a module puts at a position whatever the regions say (a band of the deep dark,
`overriddenBiome`, the height counted above the dimension's bottom) and how deep below the surface a biome's caves begin `overriddenBiome`, the height counted above the dimension's bottom) and how deep below the surface a biome's caves begin
(`minDepthBelowSurface`). The host owns the 3D biome of a position (its regions, terrain height and the cave biome stream) (`minDepthBelowSurface`, asked once per biome and kept while the world runs). The host owns the 3D biome of a position (its regions, terrain height and the cave biome stream)
and asks this only where a module decides; one provider, since two modules could not both decide the biome of one cave. and asks this only where a module decides; one provider, since two modules could not both decide the biome of one cave.
- **Settings that name biomes.** The host owns the biome tree (a region's biomes and their children) and the set of - **Settings that name biomes.** The host owns the biome tree (a region's biomes and their children) and the set of
biomes a dimension reaches, and both must include biomes that module settings name: a cave band's biome, the target of a biomes a dimension reaches, and both must include biomes that module settings name: a cave band's biome, the target of a
@@ -21,7 +21,8 @@ public interface CaveBiomes {
/** /**
* How many blocks below the surface a position must lie for the pack biome {@code biomeKey} to be the cave biome there; * How many blocks below the surface a position must lie for the pack biome {@code biomeKey} to be the cave biome there;
* nearer the surface the surface's biome is. 0 for a biome that has no such limit. * nearer the surface the surface's biome is. 0 for a biome that has no such limit. The answer depends on the world and the
* biome only: the host asks once per biome and keeps it while the world runs.
*/ */
int minDepthBelowSurface(PackWorld world, String biomeKey); int minDepthBelowSurface(PackWorld world, String biomeKey);
} }