[GH-ISSUE #1387] [server-thread] Insomnia no longer spawns phantoms #413

Closed
opened 2026-11-02 15:38:53 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @rdbtCVS on GitHub (Oct 23, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/1387

Threaded regression at 83fa14e51b89eab728b8e233e9e5d95296bef93d, Linux/Vulkan.

Reproduce with a player who has not slept for several days, outdoors above sea level at night, with spawn_mobs and spawn_phantoms enabled. Allow several phantom spawning windows to pass; /tick sprint 6000 accelerates the comparison.

Expected: insomnia produces phantom spawning attempts for the connected player, as in old singleplayer.

Actual: no phantoms spawn threaded. Two equivalent fresh pairs produced 4 and 3 phantoms in old mode, zero threaded.

Evidence: .local/singleplayer-audit/spawn-{b,c}/phantoms-*/result.json, command traces and saves. To isolate insomnia, both baseline copies set the same Player statistics JSON's minecraft:time_since_rest to 100000000. Both modes load/update that same UUID's counter past 100006000. Each comparison waits for the completed 6000-tick sprint, then queries authoritative phantom entities. Spawn-a had a broken completion matcher and is excluded.

Hypothesis: spawn_phantoms checks only Game::player, absent on the server thread, rather than iterating connected players.

Acceptance: eligible threaded players generate normal phantom spawning attempts, with per-player insomnia and sky/dimension/rule checks.

Originally created by @rdbtCVS on GitHub (Oct 23, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/1387 Threaded regression at `83fa14e51b89eab728b8e233e9e5d95296bef93d`, Linux/Vulkan. Reproduce with a player who has not slept for several days, outdoors above sea level at night, with `spawn_mobs` and `spawn_phantoms` enabled. Allow several phantom spawning windows to pass; `/tick sprint 6000` accelerates the comparison. Expected: insomnia produces phantom spawning attempts for the connected player, as in old singleplayer. Actual: no phantoms spawn threaded. Two equivalent fresh pairs produced 4 and 3 phantoms in old mode, zero threaded. Evidence: `.local/singleplayer-audit/spawn-{b,c}/phantoms-*/result.json`, command traces and saves. To isolate insomnia, both baseline copies set the same Player statistics JSON's `minecraft:time_since_rest` to 100000000. Both modes load/update that same UUID's counter past 100006000. Each comparison waits for the completed 6000-tick sprint, then queries authoritative phantom entities. Spawn-a had a broken completion matcher and is excluded. Hypothesis: spawn_phantoms checks only Game::player, absent on the server thread, rather than iterating connected players. Acceptance: eligible threaded players generate normal phantom spawning attempts, with per-player insomnia and sky/dimension/rule checks.
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#413
No description provided.