[GH-ISSUE #890] Server: no block ticks without a local player (dedicated server, --server-thread) #249

Closed
opened 2026-11-02 15:37:38 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @ludovic111 on GitHub (Oct 18, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/890

🤖 Filed by Ludovic's AI agent (Claude), not by Ludovic himself.

Found while working on #848.

On a dedicated server, and on the integrated server that --server-thread / HORIZON_SERVER_THREAD=1 runs, the world has no local player. Game::tick_blocks (game.rs) starts like this:

let Some(p) = self.player.as_ref() else { return Ok(()); };

So without a local player, none of the following run:

  • scheduled block and fluid ticks
  • random ticks
  • block events
  • pistons
  • the entity-inside checks (pressure plates, tripwires, detector rails)

Crops don't grow, water doesn't flow, redstone doesn't update, and pressure plates never press. On a LAN host, the same function also ticks only the chunks near the host player, not the chunks near guests.

In vanilla, ServerLevel.tick ticks every chunk that a player's simulation ticket keeps entity-ticking (DistanceManager), whoever the player is.

A first try did this:

  • ticked the chunks within the simulation distance of the local player and of every streaming.extra centre (the guests' areas, which block_ticking_area already uses for block entities)
  • dropped the early return

It made tools/lan_e2e.py --check plates --server-thread pass. But tools/parity.py dedicated_server then failed: chunks 3,-4 and 3,-5 sent to the joining client differed from vanilla's. The vanilla timing has to be matched: when a newly loaded chunk starts ticking relative to when it is sent, and the ticket levels. Doing that is a task of its own.

Check with:

  • tools/parity.py dedicated_server
  • tools/lan_e2e.py --check plates --server-thread, which fails until this is fixed. The check comes in the #848 pressure plate PR.
Originally created by @ludovic111 on GitHub (Oct 18, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/890 > 🤖 Filed by Ludovic's AI agent (Claude), not by Ludovic himself. Found while working on #848. On a dedicated server, and on the integrated server that `--server-thread` / `HORIZON_SERVER_THREAD=1` runs, the world has no local player. `Game::tick_blocks` (game.rs) starts like this: ```rust let Some(p) = self.player.as_ref() else { return Ok(()); }; ``` So without a local player, none of the following run: - scheduled block and fluid ticks - random ticks - block events - pistons - the entity-inside checks (pressure plates, tripwires, detector rails) Crops don't grow, water doesn't flow, redstone doesn't update, and pressure plates never press. On a LAN host, the same function also ticks only the chunks near the host player, not the chunks near guests. In vanilla, `ServerLevel.tick` ticks every chunk that a player's simulation ticket keeps entity-ticking (`DistanceManager`), whoever the player is. A first try did this: - ticked the chunks within the simulation distance of the local player and of every `streaming.extra` centre (the guests' areas, which `block_ticking_area` already uses for block entities) - dropped the early return It made `tools/lan_e2e.py --check plates --server-thread` pass. But `tools/parity.py dedicated_server` then failed: chunks 3,-4 and 3,-5 sent to the joining client differed from vanilla's. The vanilla timing has to be matched: when a newly loaded chunk starts ticking relative to when it is sent, and the ticket levels. Doing that is a task of its own. Check with: - `tools/parity.py dedicated_server` - `tools/lan_e2e.py --check plates --server-thread`, which fails until this is fixed. The check comes in the #848 pressure plate PR.
Author
Owner

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

Claimed by ludovic on Discord (GitHub: ludovic111), to avoid duplicate work. The claim lapses after 14 days without activity (a comment, a pull request or a commit mentioning #890).

<!-- gh-comment-id:6253179197 --> @ludovic111 commented on GitHub (Oct 18, 2026): Claimed by `ludovic` on Discord (GitHub: `ludovic111`), to avoid duplicate work. The claim lapses after 14 days without activity (a comment, a pull request or a commit mentioning #890). <!-- kira:work -->
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#249
No description provided.