mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-11-27 00:04:42 +00:00
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.
This commit is contained in:
1 parent
09df1af88e
commit
97ac2a2982
61 files changed
+1316
-184
No files matched your search
@@ -6,7 +6,7 @@ import java.util.Objects;
|
||||
|
||||
/** Reference executor of a resolved chunk graph: active stages run once, in resolved order.
|
||||
* It does not schedule neighbors or roll back hunks; a failed invocation must prevent the host
|
||||
* from publishing the chunk.
|
||||
* from publishing the chunk. Stages see the mantle read-only.
|
||||
*/
|
||||
public final class ChunkRunner {
|
||||
private final ResolvedGraph graph;
|
||||
@@ -18,10 +18,16 @@ public final class ChunkRunner {
|
||||
}
|
||||
}
|
||||
|
||||
/** Runs one chunk. The host derives {@code invocationSeed} from the world seed and the chunk
|
||||
* position; each stage draws from its own stream of that seed ({@link StageStreams}).
|
||||
/** Runs one chunk. A conditional stage is active when any of the chunk's 16 by 16 columns has an
|
||||
* entry of its settings in {@code inputs.settings()}, and receives every distinct entry of those
|
||||
* columns. The host derives {@code invocationSeed} from the world seed and the chunk position; each
|
||||
* stage draws from its own stream of that seed ({@link StageStreams}).
|
||||
*/
|
||||
public void generate(GenerationContext inputs, long invocationSeed, ConfiguredSettings settings) {
|
||||
public void generate(GenerationContext inputs, long invocationSeed) {
|
||||
if (graph.size() == 0) {
|
||||
return;
|
||||
}
|
||||
var settings = ChunkSettings.collect(graph, inputs::settings, inputs.originX(), inputs.originZ());
|
||||
var chunk = new ChunkInvocation(new StageInvocation(graph, invocationSeed, settings), inputs);
|
||||
for (int position = 0; position < graph.size(); position++) {
|
||||
chunk.stages().runInvocationStage(position, chunk);
|
||||
|
||||
Reference in new issue
Block a user