A setting has one JSON key, its feature id, and one shape, its settings object.
Aliases were the only reason for reserved host fields (ids contain ':', host
fields never do), so ModuleHost.reservingFields goes too.
ReservedNamespaces and ModuleHost.reservingNamespaces are gone: a pack module may use any
namespace, iris included. A module id is still loaded once, and the duplicate error now names
the origin and class of both modules, so two modules of one jar can be told apart.
A jar lists one module class per line in META-INF/services/com.volmit.IrisModule and loads all
of them in that order; each class must still be defined in the jar. A jar with several modules
is excused by the optional packages of all of them.
ModuleJarCheck runs the load's class checks on one jar without loading it.
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.
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.
ModuleHost.copyingJarsTo(directory) and loggingTo(logger) replace the fixed
java.io.tmpdir and System.getLogger. A System.LoggerFinder would not work
for a plugin, whose classes are not on the system class loader.
- Packs write settings under the feature id. @Feature(field) becomes an
optional alias that only built-in modules may set, so existing pack JSON
keeps loading; a pack module setting one fails the load. Reserved host
fields now only constrain aliases. FeatureSchema exposes key and alias.
- Pack snippet names live under their module's folder
(snippet/<namespace>/<path>/...); snippet names are folder paths.
- OptionsMetadata lists options in declaration order, read from the class
file, a superclass's first.
- @Ref(PACK_BIOME|PACK_REGION|PACK_OBJECT) fits String only.
- Stage definitions declare reach(blocks) and writesMantle(layers);
ResolvedGraph.reach() collects the pipeline and per-layer maximum, and
the load fails on an unregistered or mistyped layer.
pick(items) is items.get(nextInt(items.size())) and throws on an empty
list. shuffle(items) is Fisher-Yates from the last index down, swapping
i with nextInt(i + 1). RandomAccess lists swap through List.set; other
lists are shuffled in an array copy and written back through their
ListIterator, with the same result. Both are pinned to the Python
reference, including draw counts.
DESIGN describes WorldRandom's algorithms per method, why it does not
implement RandomGenerator, why StrictMath suffices for the gaussian and how
the pinned values are produced. README and CONTRACTS name it as the
generator stages and object generators see. The namespace rule now reads
that feature ids and mantle keys are the module id or below it, with the
new error text, and ModuleHost's methods are documented to accumulate.
README, DESIGN and CONTRACTS now describe: the per-stage random stream
contract and why java.util.Random; module-prefixed stage ids, module ids
without '/', reserved namespaces and settings/registration namespaces;
info() read once; LoadedPack and ModuleHost as the host entry point; and
loading from temporary jar copies with stale-copy cleanup.
DESIGN gains the export row at the top of the class check table, why it
comes first, how --add-exports ...=ALL-UNNAMED is honoured and that
qualified exports do not count. CONTRACTS and README name sun.misc.Unsafe
from jdk.unsupported as the supported route, README shows the new error
group and the addExportsTest task.
README, DESIGN and CONTRACTS describe how a module declares optional
packages in info() (with an example), that they cover only its own jar
and never excuse a load error, why missingClasses() drops excused
classes, and the new error for classes of JDK modules outside the
platform class loader, including the check order and that one error
groups every kind of unusable class.
README, DESIGN and CONTRACTS now say that modules may use any library
they ship in the pack but never Iris's copy, that classes nobody has
only warn, how each missing reference is classified, and that the host
chooses which packages besides the always-exposed API pack modules can
see, meant for built-in modules' stage constants.
Modules compile against the API compileOnly, never ship it, and can use
only the API, the JDK and their own pack's jars. Describe the pack
loader's parent, the resource rule, the reserved com.volmit. prefix, the
load-time class reference check and its limits, and the new errors.
Drop version gating as an open question: packs ship their module jars
and nothing is downloaded, so compatibility is the pack publisher's
responsibility. Describe the duplicate-class rule including
multi-release jars, the per-pack log summary, and the adapter's job of
routing System.Logger output.
README, DESIGN and CONTRACTS now describe stages, ordering, fusion, activation,
outputs and diagnostics, and drop the removed modifier and planner types.