Commit Graph
2 Commits
Author SHA1 Message Date
piexel 50f51db8b2 Run each mantle stage as its own pass and let mantle stages work out their reach per pack
MantleRunner.generate(stage, inputs, seed) runs one mantle stage for one chunk. The host runs every
mantle stage as its own pass in resolved order, so a stage sees what earlier stages wrote into the
chunks around it. Activation still follows requires(...): the runner collects the settings of the stage
and of everything it requires, and only those. Because the stages of one chunk now run in different
invocations, mantle stages have no output (Stage.mantle declares Void) and pass data on through
mantle layers.

A mantle stage whose reach depends on the pack declares reach(PackReach). The host works it out once
per pack load from PackSettings, every entry the dimension and its regions and biomes declare, with
ResolvedStage.reachBlocks(settings); a negative result fails naming the stage. Placement and chunk
stages may not declare one, and ResolvedGraph.reach() throws for a mantle pipeline that has one.
VeinModule now sizes its reach from the pack's longest vein.
2026-10-08 12:35:04 +02:00
piexel 97ac2a2982 Read settings per column with every level as its own entry, add the mantle pipeline, host types and the one-option shorthand
Settings no longer resolve to one value per type. FeatureSettings.at(type, x, z) returns one entry per
level that declares the type at that column (dimension, region, surface biome, placement), each with
its level, source and value; levels stack and a module decides what several mean. Conditional stage
bodies receive every configured entry. Chunk and mantle runners collect a chunk's settings themselves,
so a stage runs when any column of the chunk configures it.

Work that writes the mantle or reaches beyond its chunk moves to a new MANTLE pipeline (Stage.mantle,
MantleRunner) that the host runs around a chunk before it generates. Chunk stages may no longer declare
a reach or mantle writes and see the mantle read-only.

Built-in settings may hold host types the host describes itself (ModuleHost.describingHostTypesIn,
ValueKind.HostKind); pack modules cannot. FeatureSchema.shorthand() names the only option of settings
packs may write as a bare value.
2026-10-08 11:31:03 +02:00