PackWorld.minHeight: the platform's Y of the dimension's bottom, for settings that name an absolute world Y

This commit is contained in:
piexel committed 2026-10-10 18:07:22 +02:00
1 parent 24eeeab615
commit ceac26bd18
3 files changed
+14 -1

No files matched your search

@@ -26,6 +26,14 @@ public interface PackWorld {
/** The settings of the world's dimension and of every region and biome it can reach, as mantle reaches see them. */
PackSettings settings();
/** The platform's Y of the dimension's bottom (-64 in the overworld). Every height the API carries is above that
* bottom; settings that name an absolute world Y, as packs write them for the platform, are converted with it:
* {@code heightAboveBottom = worldY - minHeight()}. Zero unless the host's dimensions begin below Y 0.
*/
default int minHeight() {
return 0;
}
/**
* The world's one {@code type} instance, created by {@code create} the first time anyone asks for it. Modules keep
* their caches and per-world workers here instead of in fields, since stage bodies and services are shared by every