Enforce namespace ownership: reserved namespaces and module-prefixed stage ids

- LoadedModules.load takes the host's reserved namespaces (such as iris);
  a pack module whose id uses one fails, naming its jar and the namespace.
- A module defines only stages whose ids start with its own id and '/'.
  Module ids may no longer contain '/', so ids cannot nest and every
  stage id has exactly one possible owner.
- Object feature ids and mantle keys must use the registering module's
  namespace; ModuleRegistry.register(DiscoveredModule) scopes registration.
- A settings type named in when(...) needs a feature id in the namespace
  of some module naming it, so modules can still condition on another
  module's settings.
This commit is contained in:
piexel committed 2026-10-05 21:31:55 +02:00
1 parent 6263075ecd
commit 4cb718f706
13 files changed
+413 -129

No files matched your search

@@ -7,7 +7,8 @@ import com.volmit.object.ObjectGeneratorFactory;
/** Host implementation collects non-stage registrations before loading pack configuration.
* Feature IDs must be unique. JSON fields must be unique per attachment target, including the
* settings types stages name in {@code when(...)}.
* settings types stages name in {@code when(...)}. Feature IDs and mantle keys a module registers
* use the namespace of its module id.
*/
public interface FeatureRegistry {
/** Registers a layer before pack loading. Null arguments throw NullPointerException;