mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-11-30 09:44:24 +00:00
Batch 1 of the API review: one setup entry point, per-pipeline definitions
- IrisModule.setup(ModuleSetup) replaces install(StageGraph) and register(FeatureRegistry); ModuleSetups.run is the host entry point. - The conditional definition variants are gone: a stage body reads the settings it is conditioned on through ctx.configured(Type.class). - Placement, block, chunk and mantle stages each get their own definition interface; chunk definitions offer neither reach nor writesMantle. MantleStage is no longer generic. - softAfter/softBefore take stage constants as well as StageRefs. - A producer that rejected the attempt may return null. - PlacementRunner, ChunkRunner and MantleRunner all take StageTimings. - ConfiguredSettings groups entries by the type that declares @Feature. - README, DESIGN and CONTRACTS updated, with the edge choice table.
This commit is contained in:
1 parent
d3c0e4d6cc
commit
1677f4414b
75 files changed
+1201
-838
No files matched your search
+6
-3
@@ -13,13 +13,14 @@ types that carry them and lists what the Iris adapter still owes.
|
||||
| Namespace ownership | module-prefixed stage, feature and mantle ids, `ModuleInfo.ownsStage`/`ownsId`; no reserved namespaces |
|
||||
| Randomness independent of other modules | `StageContext.random()`, host `StageStreams`, invocation seed passed to the runners |
|
||||
| Random values identical on every JDK | `WorldRandom`, pinned by `WorldRandomTest` |
|
||||
| Module-owned work and ordering | `Stage`, `StageRef`, stage definitions, `requires`/`softAfter`/`softBefore` |
|
||||
| Activation by configuration | `when(settingsType)`, host `ConfiguredSettings` (entries per type; any column of a chunk) |
|
||||
| Module entry point | `IrisModule.info()`, `IrisModule.setup(ModuleSetup)` (`stages()`, `registry()`, `log()`), host `ModuleSetups.run` |
|
||||
| Module-owned work and ordering | `Stage`, `StageRef`, one stage definition type per pipeline, `requires`/`softAfter`/`softBefore` |
|
||||
| Activation by configuration | `when(settingsType)`, `StageContext.configured(settingsType)`, host `ConfiguredSettings` (entries per declared `@Feature` type; any column of a chunk) |
|
||||
| Stacked settings levels, read per column | `FeatureSettings.at(type, x, z)`, `FeatureSettings.Entry` (level, source, value) |
|
||||
| Typed results between modules | stage outputs, `StageContext.output` |
|
||||
| Per-block work with single-pass cost | `BlockStage`, fused block passes |
|
||||
| Pack-load validation and diagnostics | host `StageGraphBuilder`, `ResolvedGraph`, `LoadedModules` |
|
||||
| Reference execution | host `PlacementRunner`, `ChunkRunner`, `MantleRunner` |
|
||||
| Reference execution | host `PlacementRunner`, `ChunkRunner`, `MantleRunner`, each timed through host `StageTimings` |
|
||||
| Work across chunks and mantle writes | `Stage.mantle`, `MantleStage`, `MantleStageContext`, `MantleGenerationContext`; chunk stages read the mantle only |
|
||||
| Annotated settings | `IrisFeature`, `@Feature` (id, short JSON `key`, optional `root`), config annotations, `OptionsMetadata`, `LinkedBiomes` (`treeBiomes`, `usedBiomes`: pack biomes the settings bring into the layout) |
|
||||
| Area a stage writes | `reach(blocks)`, `reach(PackReach)`, `writesMantle(...)` on stage definitions, `PackSettings`, host `StageReach`, `ResolvedStage.reachBlocks`, `PipelineReach` |
|
||||
@@ -118,6 +119,8 @@ running Iris is the pack publisher's responsibility.
|
||||
work inside the ported stages.
|
||||
- Derive one seed per placement (world seed and the placement's stable identity) and per chunk
|
||||
(world seed and chunk position) and pass it to `PlacementRunner.place` / `ChunkRunner.generate`.
|
||||
- Pass every runner a `StageTimings` that records into the host's metrics (or `StageTimings.NONE`), so
|
||||
placement, mantle and chunk stages are all timed by the host rather than by the modules.
|
||||
- Prepare the area a placement may read or write, including neighbors: the placement pipeline's
|
||||
`reach()` around the placed object's bounds, each mantle layer by its own maximum. Never clip.
|
||||
- Work out each mantle stage's reach once per pack load (`ResolvedStage.reachBlocks(PackSettings)`),
|
||||
|
||||
Reference in new issue
Block a user