feat: wowmine: immersive portals
This commit is contained in:
@@ -0,0 +1,69 @@
|
||||
# wowmine respawn and Overworld access
|
||||
|
||||
The server-only `wowmine-world-policy` mod is built from source by Nix and
|
||||
installed by the Minecraft service's `preStart`. Clients need no additional
|
||||
mod. It targets Minecraft 1.21.1 and NeoForge 21.1.250.
|
||||
|
||||
Valid beds keep their normal respawn behavior. Missing or destroyed beds
|
||||
fall back to Azeroth at `3742.5 89 8891.5`, matching the existing first-join
|
||||
spawn. Login records and player dimension transfers targeting the Overworld
|
||||
also resolve to this Azeroth spawn. Nether portals returning from the Nether
|
||||
resolve their destination in Azeroth, preserving portal coordinate scaling.
|
||||
Other dimension destinations remain unchanged.
|
||||
|
||||
The Overworld stays registered because Minecraft requires it internally.
|
||||
This policy prevents normal player entry; it does not delete world files or
|
||||
unregister the engine dimension.
|
||||
|
||||
## Why the race could disappear after a destroyed bed
|
||||
|
||||
Production tests on November 22, 2026 confirmed that valid-bed deaths kept
|
||||
Tiny's scale at 0.5. Destroying the bed caused vanilla fallback to the
|
||||
Overworld and scale 1.0, despite the saved Tiny selection remaining intact.
|
||||
Reconnecting restored the abilities.
|
||||
|
||||
The Overworld's shared spawn, at `3742 89 8891`, is above ocean water.
|
||||
An isolated reproduction with the same 227 mod JARs traced the failure:
|
||||
|
||||
1. `PlayerList.respawn` constructs the replacement `ServerPlayer`.
|
||||
2. Its constructor searches for a collision-free spawn over water.
|
||||
3. NeoOrigins' fluid-collision hook queries `ActiveOriginService` before the
|
||||
old player's origin attachment has been copied.
|
||||
4. The resulting empty cache has data version 0. The copied, serialized
|
||||
attachment also has version 0, so the cache remains valid even though the
|
||||
origin selection changed from empty to populated.
|
||||
5. The respawn grant sees no powers. Later cache rebuilding does not grant
|
||||
the missing permanent attribute modifiers; login does.
|
||||
|
||||
The world policy selects Azeroth in `PlayerRespawnPositionEvent`, before
|
||||
Minecraft constructs the replacement player. This avoids the ocean spawn
|
||||
initialization path. It does not reset races or repeatedly rewrite player
|
||||
attributes.
|
||||
|
||||
## Verification
|
||||
|
||||
Use a disposable matching server and real client, never production test
|
||||
deaths or player-data edits. The regression fixture needs water beneath the
|
||||
Overworld spawn; an ordinary flat-world spawn does not expose the cache bug.
|
||||
Load the selected race from a saved player record rather than selecting it
|
||||
again before each death.
|
||||
|
||||
Checks exercised during development:
|
||||
|
||||
- A real bed click saves the Azeroth point; death returns beside that bed.
|
||||
- Death in the Nether with the bed chunk unloaded still returns to the bed.
|
||||
- A destroyed bed without the policy reproduces Overworld fallback, an
|
||||
unchanged Tiny selection, an empty power cache, and scale 1.0.
|
||||
- Missing-bed fallback with the policy selects the Azeroth spawn.
|
||||
- With the ocean fixture unchanged, two consecutive missing-bed deaths with
|
||||
the policy retain Tiny's scale 0.5 and resolved powers. Disconnecting and
|
||||
rejoining preserves the race, class, background, and Azeroth location.
|
||||
- A saved Overworld login and an explicit Overworld teleport resolve to
|
||||
Azeroth.
|
||||
- A real Nether return portal resolves in Azeroth.
|
||||
- Outland and End entry remain available; a real End exit portal and its
|
||||
credits return to the selected Azeroth bed.
|
||||
|
||||
The production artifact is compiled against the pinned NeoForge server SDK.
|
||||
Its class files were compared with the runtime-tested prototype. NixOS
|
||||
activation must use the existing Minecraft maintenance/backup lock.
|
||||
Reference in New Issue
Block a user