Module: Hard Hoof: Portals (hardhoof_portals)
Dimensions can be created, catalogued, restored across restarts, and used as portal destinations while the server is running.
Hard Hoof stands up extra worlds at runtime. A durable catalog records every definition so a pocket world is reconstructed on restart instead of vanishing into orphan chunk folders.
How it works
Three pieces stay separate on purpose:
-
Dimension id -- free identity at runtime (for example
hardhoof_portals:pocket_0). -
Dimension type -- a registered type from datapack data (
hardhoof_portals:pocketby default for operator-created worlds). Types are never invented mid-session; both sides already know them. -
Level -- the live
ServerLevelbuilt from type + generator when the catalog asks for it.
RuntimeDimensionManager mirrors vanilla's level-creation sequence on the server thread: stem, derived level data, world map insert, markWorldsDirty(), border listener, load event. Custom spawners are empty on create so opening a portal does not silently start phantom/patrol spawning.
Adopt vs create: if the level key already exists (overworld, datapack dim, another mod), Hard Hoof adopts it -- it never builds a second ServerLevel on the same save directory. External (non-runtime-owned) definitions are catalogued for linking but not reconstructed by Hard Hoof.
Generators (GeneratorSpec)
| Kind | Role |
|---|---|
VOID |
Empty world with a cheap bedrock-style floor; default for /hardhoofportals setup and bare create. |
FLAT |
Superflat pocket; fast to generate and stream. |
NOISE |
Ordinary noise terrain (default settings: overworld noise). |
DEBUG |
Vanilla debug world (geometry testing, not player destinations). |
EXTERNAL |
Marker for levels Hard Hoof does not own and must not rebuild. |
Seeds for runtime worlds are derived from the dimension id hash so two pockets do not match by accident.
Persistence and restore
DimensionCatalog lives in overworld saved data (PortalWorldData). Ordinals are monotonic and never reused. On ServerStarting, restoreFromCatalog recreates every missing runtime-owned level before players can be placed into a saved pocket -- otherwise a logout inside a missing dimension dumps the player at world spawn.
Operator commands
Under /hardhoofportals (gamemaster):
| Command | Effect |
|---|---|
list |
Catalog entries (ownership / generator / loaded) plus loaded externals not adopted. |
create <name> [void|flat|noise] |
Allocates ordinal, builds hardhoof_portals:<name>_<ordinal>, records and syncs. |
adopt <dimension> |
Catalog an already-loaded level as external. |
info / delete
|
Inspect or remove a catalog entry (delete policy follows manager rules for created vs adopted). |
restore |
Force restore-from-catalog now. |
setup [name] |
Create void pocket + linked portal pair -- see Portals. |
Adventure and other modules
Adventure's Backrooms (hardhoof_adventure:backrooms) is a datapack dimension with its own generator, not a Portals runtime pocket. Portals can still adopt or link into loaded levels. Deeper "Patterns / Secrets of Reality" fantasy remains design direction on top of this infrastructure -- it is not a claim that no dimensional system exists.