conduit-instance
conduit-instance creates and destroys Minecraft dimensions at runtime — one fresh world per match, torn down when the match ends. It’s the on-demand alternative to a fixed, pre-declared instance pool.
When to depend on this
Section titled “When to depend on this”- You run concurrent matches and want each in its own isolated world.
- You want a throwaway arena built from a prefab that vanishes when the round is over — no leftover dimensions, no datapack edits to add capacity.
- You’re done with hard-coded instance slots and want the count to scale with demand.
If a small fixed number of reusable arenas is enough, you don’t need this — a static set of datapack dimensions is simpler.
How it works
Section titled “How it works”Minecraft freezes its dimension registry after the server loads; there’s no public “add a world now” call. conduit-instance reaches the live MinecraftServer level map through a single accessor mixin and inserts/removes runtime worlds directly, firing Fabric’s ServerLevelEvents.LOAD / UNLOAD so chunk tracking and other mods stay in sync.
That accessor is the entire invasive surface — one @Accessor. Everything else is public Minecraft API plus Fabric events.
Features
Section titled “Features”- Runtime dimensions —
RuntimeDimensions.create/release, the lifecycle, and the safety guarantees. - Dimension spec & handle —
RuntimeDimensionSpec(what world to build) andRuntimeDimensionHandle(a live reference to it).
API surface
Section titled “API surface”me.zlex.conduit.instance.runtime.RuntimeDimensionsme.zlex.conduit.instance.runtime.RuntimeDimensionSpecme.zlex.conduit.instance.runtime.RuntimeDimensionHandlePersistence
Section titled “Persistence”A persist=true spec is recorded to a manifest and recreated on the next server start, loading its existing region data. persist controls restart survival, not release survival — release always fully destroys. Discard-on-release temp worlds (persist=false) are swept on the next boot if a crash left them behind.
Used by the arena
Section titled “Used by the arena”As of 0.8.0, conduit-arena’s InstanceManager is built on this module — its game instances are on-demand runtime dimensions (no fixed pool, addressed by dimension key, persisted across restart). conduit-instance is the backbone of the arena lifecycle, not just a standalone capability.