[GH-ISSUE #5065] Player position and inventory reset after using "Save and Quit" and re-entering world in Creative Mode #1542

Closed
opened 2026-11-02 15:47:49 +07:00 by bsakaguchi · 3 comments
Owner

Originally created by @lowcomplex-mint on GitHub (Oct 31, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/5065

Originally assigned to: @mulareal on GitHub.

When I create a new world in the nightly-9d979ca version, there is a predetermined spawn point. This is normal. However, I noticed, upon playing around with the build in creative mode, if I were to press "Save and Quit" in the esc menu, and thereafter immediately reload, no matter how far I went or what I had in my inventory, I would get spawned at that same predetermined world spawn with no items. This did not apply however to deforming the environment, since I was able to place blocks, spawn mobs, and change blocks like turning grass into dirt paths without it reverting after I reloaded.

System specs:

OS: Linux Mint 22.1 x86_64
Kernel: 6.8.0-107-generic
DE: Cinnamon 6.4.8
Terminal: gnome-terminal
CPU: AMD Ryzen 7 7800X3D (16) @ 5.05
GPU: NVIDIA GeForce RTX 5070 (12 GB)
Memory: 32GB DDR5

Steps to reproduce

  1. Create a new world using the nightly-9d979ca version.
  2. Enter Creative
  3. Move away from the predetermined spawn point.
  4. Place blocks, modify the terrain, and/or spawn mobs.
  5. Make changes to the inventory, if applicable.
  6. Open the ESC menu and select "Save and Quit".
  7. Reload the same world.

Expected behavior: Player will spawn in with the same inventory and location as it was when the world was exited
Actual behavior: Players loads in at world spawn with an empty inventory

Originally created by @lowcomplex-mint on GitHub (Oct 31, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/5065 Originally assigned to: @mulareal on GitHub. When I create a new world in the **nightly-9d979ca** version, there is a predetermined spawn point. This is normal. However, I noticed, upon playing around with the build in creative mode, if I were to press "Save and Quit" in the esc menu, and thereafter immediately reload, no matter how far I went or what I had in my inventory, I would get spawned at that same predetermined world spawn with no items. This did not apply however to deforming the environment, since I was able to place blocks, spawn mobs, and change blocks like turning grass into dirt paths without it reverting after I reloaded. System specs: OS: Linux Mint 22.1 x86_64 Kernel: 6.8.0-107-generic DE: Cinnamon 6.4.8 Terminal: gnome-terminal CPU: AMD Ryzen 7 7800X3D (16) @ 5.05 GPU: NVIDIA GeForce RTX 5070 (12 GB) Memory: 32GB DDR5 Steps to reproduce 1. Create a new world using the nightly-9d979ca version. 2. Enter Creative 3. Move away from the predetermined spawn point. 4. Place blocks, modify the terrain, and/or spawn mobs. 5. Make changes to the inventory, if applicable. 6. Open the ESC menu and select "Save and Quit". 7. Reload the same world. Expected behavior: Player will spawn in with the same inventory and location as it was when the world was exited Actual behavior: Players loads in at world spawn with an empty inventory
Author
Owner

@mulareal commented on GitHub (Oct 31, 2026):

🤖 Agent: /claim

<!-- gh-comment-id:6542128720 --> @mulareal commented on GitHub (Oct 31, 2026): 🤖 Agent: /claim
Author
Owner

@baltikaa9 commented on GitHub (Oct 31, 2026):

its the same in survival

<!-- gh-comment-id:6542245929 --> @baltikaa9 commented on GitHub (Oct 31, 2026): its the same in survival
Author
Owner

@ludovic111 commented on GitHub (Oct 31, 2026):

🤖 Agent: Cause and fix, verified in the real game.

Cause: #4866 made the world save skip the player file (players/data/<uuid>.dat) on dedicated servers, but it tested options.dedicated, which the single-player server thread sets too. So in single player the world (blocks, mobs) was saved but your own player (position, inventory, health, XP, game mode) never was. It affects the Nightlies 7635280, 7aa0e28 and 9d979ca; 1da354b and older are fine. The in-frame mode (--in-frame) and dedicated servers aren't affected.

Fix: #5092 by @mulareal writes the player file again for single player (and keeps a dedicated server's world save from touching it). Tested: Save and Quit, then reopen keeps the position and inventory; a dedicated server keeps them over leave/rejoin and a restart. It is queued to merge and ships in the next Nightly. #5105 adds a check that reopens a world and compares the players, so this can't come back unnoticed.

Your data: the loss happened when saving, so the fix can't bring it back. What you did as a player on those Nightlies wasn't written to disk. A world you already had comes back with the player as the last older build saved it; a world created on these Nightlies starts at spawn with an empty inventory. Your world changes are all saved.

<!-- gh-comment-id:6542919582 --> @ludovic111 commented on GitHub (Oct 31, 2026): 🤖 Agent: Cause and fix, verified in the real game. **Cause:** #4866 made the world save skip the player file (`players/data/<uuid>.dat`) on dedicated servers, but it tested `options.dedicated`, which the single-player server thread sets too. So in single player the world (blocks, mobs) was saved but your own player (position, inventory, health, XP, game mode) never was. It affects the Nightlies 7635280, 7aa0e28 and 9d979ca; 1da354b and older are fine. The in-frame mode (`--in-frame`) and dedicated servers aren't affected. **Fix:** #5092 by @mulareal writes the player file again for single player (and keeps a dedicated server's world save from touching it). Tested: Save and Quit, then reopen keeps the position and inventory; a dedicated server keeps them over leave/rejoin and a restart. It is queued to merge and ships in the next Nightly. #5105 adds a check that reopens a world and compares the players, so this can't come back unnoticed. **Your data:** the loss happened when saving, so the fix can't bring it back. What you did as a player on those Nightlies wasn't written to disk. A world you already had comes back with the player as the last older build saved it; a world created on these Nightlies starts at spawn with an empty inventory. Your world changes are all saved.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#1542
No description provided.