[PR #2172] [MERGED] Keep forced chunks ticking in playerless server dimensions #4070

Closed
opened 2026-11-03 04:14:29 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/2172
Author: @rdbtCVS
Created: 10/26/2026
Status: ✅ Merged
Merged: 10/26/2026
Merged by: @ludovic111

Base: main ← Head: fix/1525-forced-dimension-ticking


📝 Commits (3)

  • b1136ac Keep forced server levels ticking without players
  • 81c8e0e Merge main into fix/1525-forced-dimension-ticking
  • e24ed85 Merge main into fix/1525-forced-dimension-ticking

📊 Changes

3 files changed (+78 additions, -14 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+9 -8)
📝 crates/horizon-client/src/game/levels.rs (+16 -6)
📝 tools/lan_e2e.py (+53 -0)

📄 Description

🤖 Opened by rdbt's AI agent (Codex, GPT-6.1 Sol), not by rdbt himself.

What and why

Fixes #1525. Keep server levels with forced chunks in the tick schedule, whether their streaming state is current or parked. The existing idle-close selection then also keeps these levels open after the last player leaves.

Use chunk-ticket sources for playerless integrated-server levels, as dedicated servers already do, so scheduling the level does not tick every resident chunk. Forced-ticket persistence remains the separate scope of #2050.

Add the forced-levels LAN integration regression (also registered through test_lan_integration_parity.py): in both Nether and End, leave a 200-tick iron furnace and a falling armor stand behind, move both players to the Overworld, and step 450 ticks. Inspect the finished ingot and settled stand before returning, while an unforced resident furnace outside the ticket ring retains its raw iron and zero cooking progress.

Vanilla reference

Inspected pinned Minecraft Java 26.3 server bytecode with javap -p -c: MinecraftServer.tickChildren iterates all levels; ServerLevel.tick resets emptyTime when ServerChunkCache.hasActiveTickets is true and ticks entities/block entities below the 300-tick idle threshold. ServerLevel.getForceLoadedChunks/setChunkForced delegate to the chunk source; TicketStorage.updateChunkForced adds/removes a FORCED ticket using ChunkMap.FORCED_TICKET_LEVEL. Existing ticket_levels.rs supplies the loading/simulation boundaries.

Self-check

pr_ready (tools/pr_ready.py --quick on archlinux, against origin/main at aadb8b672, 2 min 33 s)

Check Result
Scope ✅ 3 files, +78 −14
Cargo.lock ✅ unchanged
Public tree ✅ (1 s)
Python tests ✅ 310 passed (23 s)
rustfmt ✅ (6 s)
clippy ✅ (8 s)
tests: horizon-client ✅ 1307 passed (1 min 48 s)
doc tests ✅ 0 passed (2 s)
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ 31 affected, to run in CI (--quick): block_removal, command_exec, composter, crafter, cursor_death, dedicated_server, dispenser, friends_integration, hardcore_respawn, lan_integration, locator_bar, lore_tooltip and 19 more
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

Additional validation (all exit 0):

  • python3 tools/pr_ready.py --quick --base origin/main: final run passed; 310 Python tests, 1,307 Rust tests, 0 doc tests. The initial run exited 1 for formatting only; corrected with cargo fmt --all before the clean rerun.
  • cargo build --profile fast -p horizon-client --bins: passed.
  • /usr/bin/python3 tools/lan_e2e.py --bin-dir target/fast --check forced-levels --out .local/1525-forced-levels: passed in both Nether and End. Every game used fresh temporary game, launcher and XDG homes, with self-update and audio disabled. The system interpreter bypasses an outdated installed agent wrapper (integration_env.require_prepared_resources is absent in current main).
  • git diff --check: passed; commit/push public-tree hooks passed.

Parity execution is left to CI as requested. The fallback in-frame single-level architecture is outside this server-level scheduling repair; the new integration check explicitly requires server-thread mode. No persistence changes or Mojang resources are included.

🤖 Generated with Codex (GPT-6.1 Sol).


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/2172 **Author:** [@rdbtCVS](https://github.com/rdbtCVS) **Created:** 10/26/2026 **Status:** ✅ Merged **Merged:** 10/26/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/1525-forced-dimension-ticking` --- ### 📝 Commits (3) - [`b1136ac`](https://github.com/horizon-rust/horizon/commit/b1136ac287648375239b1813a1fc42303c235afc) Keep forced server levels ticking without players - [`81c8e0e`](https://github.com/horizon-rust/horizon/commit/81c8e0e815c853834cb4e603c191923ca847304c) Merge main into fix/1525-forced-dimension-ticking - [`e24ed85`](https://github.com/horizon-rust/horizon/commit/e24ed85036099fa12482623bcb2418d94f2a4c3f) Merge main into fix/1525-forced-dimension-ticking ### 📊 Changes **3 files changed** (+78 additions, -14 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+9 -8) 📝 `crates/horizon-client/src/game/levels.rs` (+16 -6) 📝 `tools/lan_e2e.py` (+53 -0) </details> ### 📄 Description > 🤖 Opened by rdbt's AI agent (Codex, GPT-6.1 Sol), not by rdbt himself. ## What and why Fixes #1525. Keep server levels with forced chunks in the tick schedule, whether their streaming state is current or parked. The existing idle-close selection then also keeps these levels open after the last player leaves. Use chunk-ticket sources for playerless integrated-server levels, as dedicated servers already do, so scheduling the level does not tick every resident chunk. Forced-ticket persistence remains the separate scope of #2050. Add the `forced-levels` LAN integration regression (also registered through `test_lan_integration_parity.py`): in both Nether and End, leave a 200-tick iron furnace and a falling armor stand behind, move both players to the Overworld, and step 450 ticks. Inspect the finished ingot and settled stand before returning, while an unforced resident furnace outside the ticket ring retains its raw iron and zero cooking progress. ## Vanilla reference Inspected pinned Minecraft Java 26.3 server bytecode with `javap -p -c`: `MinecraftServer.tickChildren` iterates all levels; `ServerLevel.tick` resets `emptyTime` when `ServerChunkCache.hasActiveTickets` is true and ticks entities/block entities below the 300-tick idle threshold. `ServerLevel.getForceLoadedChunks`/`setChunkForced` delegate to the chunk source; `TicketStorage.updateChunkForced` adds/removes a `FORCED` ticket using `ChunkMap.FORCED_TICKET_LEVEL`. Existing `ticket_levels.rs` supplies the loading/simulation boundaries. ## Self-check **pr_ready** (`tools/pr_ready.py --quick` on archlinux, against origin/main at aadb8b672, 2 min 33 s) | Check | Result | | --- | --- | | Scope | ✅ 3 files, +78 −14 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ (1 s) | | Python tests | ✅ 310 passed (23 s) | | rustfmt | ✅ (6 s) | | clippy | ✅ (8 s) | | tests: horizon-client | ✅ 1307 passed (1 min 48 s) | | doc tests | ✅ 0 passed (2 s) | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ 31 affected, to run in CI (--quick): block_removal, command_exec, composter, crafter, cursor_death, dedicated_server, dispenser, friends_integration, hardcore_respawn, lan_integration, locator_bar, lore_tooltip and 19 more | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | Additional validation (all exit 0): - `python3 tools/pr_ready.py --quick --base origin/main`: final run passed; 310 Python tests, 1,307 Rust tests, 0 doc tests. The initial run exited 1 for formatting only; corrected with `cargo fmt --all` before the clean rerun. - `cargo build --profile fast -p horizon-client --bins`: passed. - `/usr/bin/python3 tools/lan_e2e.py --bin-dir target/fast --check forced-levels --out .local/1525-forced-levels`: passed in both Nether and End. Every game used fresh temporary game, launcher and XDG homes, with self-update and audio disabled. The system interpreter bypasses an outdated installed agent wrapper (`integration_env.require_prepared_resources` is absent in current main). - `git diff --check`: passed; commit/push public-tree hooks passed. Parity execution is left to CI as requested. The fallback in-frame single-level architecture is outside this server-level scheduling repair; the new integration check explicitly requires server-thread mode. No persistence changes or Mojang resources are included. 🤖 Generated with [Codex](https://openai.com/codex/) (GPT-6.1 Sol). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:14:29 +07:00
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#4070
No description provided.