Structure services answer what Iris core still asked its locator directly: placed keys and the starts a module makes of platform structures

StructureLocator.placed(world) (default: locatable): every key under which locate finds what the module places, its own
structures and the platform structures it starts or stands in for; the host routes locate by it.
VanillaStructures.startedStructures(world), locatableStarts(world) and locateStart(world, structure, fromX, fromZ,
maxRings, ChunkFilter): the platform structures a module starts itself, the ones it can find, and the nearest start of
one, ring by ring through the module's grids, trying only the chunks the host's filter accepts (the platform's /locate
checks each start in the world and asks again without a refused chunk). README, DESIGN, CONTRACTS; test.
This commit is contained in:
piexel committed 2026-10-10 18:18:01 +02:00
1 parent 030cbbb8fc
commit 750e0691a6
6 files changed
+90 -6

No files matched your search

+2 -1
View File
@@ -1020,7 +1020,8 @@ from a sapling, which drops a block has. A module answers such questions through
state) and every random value they carry, the host only plays them.
- **Services now.** `ObjectsAt` (`ALL`): pack object keys a module would place in a chunk, predicted without
generating it, and the biomes and regions whose settings place a given object (`PlacedBy`, named by pack keys; the
host builds its search area from them through the biome tree it owns). `StructureLocator` (`FIRST`): every structure key a module knows, the ones a world places, and the
host builds its search area from them through the biome tree it owns). `StructureLocator` (`FIRST`): every structure key a module knows, the ones a world places (`locatable`; `placed` adds the
platform structures the module starts or stands in for, and keys it places but cannot search for), and the
nearest start of one as a `LocateResult` (`Found`, `NotFound`, `SearchLimitReached`; a sealed interface, so callers
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,