From 672f781132a64c0795cf82ce46b985c42e5c69b9 Mon Sep 17 00:00:00 2001 From: piexel Date: Fri, 6 Nov 2026 07:31:09 +0100 Subject: [PATCH] Document the stage-id disabledComponents and rule-based seeds --- README.md | 6 +++--- src/main/java/art/arcane/iris/builtin/IrisSeedPurposes.java | 4 +--- .../java/art/arcane/iris/engine/modifier/CarveModule.java | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 8d9f8b9ba..b97b0d1e2 100644 --- a/README.md +++ b/README.md @@ -150,7 +150,7 @@ per target across all modules and Iris's own fields, so a new built-in or pack m Every built-in stage is a full port: the module owns its logic and per-engine state, and the mantle stages work out their reach from the pack when it loads. A dimension's `disabledComponents` turns a mantle stage off -by its flag (`CARVED`, `OBJECT`, `FLOATING_OBJECT`, `JIGSAW`) or by its stage id. +by its stage id, such as `iris:carve/caves`; a name that matches no stage fails the world. ## Building @@ -206,8 +206,8 @@ through the thread or a cast: a module asks `world.extension(X.class)` for what `StructureHost`, `spawn.SpawnCooldowns`), `context.extension(X.class)` for what belongs to one invocation (`MatterMantle` in a chunk or mantle stage) and `settings.extension(X.class)` for a reach worked out before any world exists, each with `.orElseThrow()`, since a built-in runs only where Iris offers them. Iris's per-feature world seeds are -IrisApi purpose seeds: `world.seed(IrisSeedPurposes.CARVE)` (`iris:seed/carve`), which Iris answers with the seeds its worlds always -had, so existing worlds generate the same; `spawn.SpawnCooldowns` (the spawner cooldowns +IrisApi purpose seeds: `world.seed(IrisSeedPurposes.CARVE)` (`iris:seed/carve`), by the API's rule like any module's; +`spawn.SpawnCooldowns` (the spawner cooldowns Iris saves with the world's data, so they survive a restart), `loot.LootResolver` (the random streams loot is drawn from, shared with the hosts that fill containers) and the loot and marker lists of an object placement (`loot.ObjectLoot`, `loot.ObjectVanillaLoot`, `spawn.PlacementMarker`). The placement stages need more of the object being diff --git a/src/main/java/art/arcane/iris/builtin/IrisSeedPurposes.java b/src/main/java/art/arcane/iris/builtin/IrisSeedPurposes.java index 11ec40496..22f61d389 100644 --- a/src/main/java/art/arcane/iris/builtin/IrisSeedPurposes.java +++ b/src/main/java/art/arcane/iris/builtin/IrisSeedPurposes.java @@ -22,9 +22,7 @@ import com.volmit.resource.ResourceId; import com.volmit.world.PackWorld; /** - * The purposes Iris's built-in modules ask {@link PackWorld#seed(ResourceId)} for. Iris answers each with the seed its - * worlds always used for that feature, derived one after another from a shared random rather than by the API's rule, - * so worlds generated before the features were modules generate the same. + * The purposes Iris's built-in modules ask {@link PackWorld#seed(ResourceId)} for, one per feature. */ public final class IrisSeedPurposes { public static final ResourceId BIOME = purpose("biome"); diff --git a/src/main/java/art/arcane/iris/engine/modifier/CarveModule.java b/src/main/java/art/arcane/iris/engine/modifier/CarveModule.java index 71f50bec1..d1db8d7de 100644 --- a/src/main/java/art/arcane/iris/engine/modifier/CarveModule.java +++ b/src/main/java/art/arcane/iris/engine/modifier/CarveModule.java @@ -126,7 +126,7 @@ public final class CarveModule implements IrisModule { } /** - * A dimension turns carving off with {@code carvingEnabled}. Listing {@code CARVED} in {@code disabledComponents} + * A dimension turns carving off with {@code carvingEnabled}. Listing {@code iris:carve/caves} in {@code disabledComponents} * also does: Iris then skips this stage's mantle pass like any disabled component. */ private static boolean carves(ChunkContext context) {