[PR #2619] [MERGED] Streaming: the last finished ring is lit against decorated neighbours #4479

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/2619
Author: @FusselTV
Created: 10/27/2026
Status: ✅ Merged
Merged: 10/27/2026
Merged by: @ludovic111

Base: main ← Head: fix/light-edge-from-protos


📝 Commits (1)

  • d601715 Streaming: the last finished ring is lit against decorated neighbours

📊 Changes

4 files changed (+53 additions, -6 deletions)

View changed files

📝 crates/horizon-client/src/game/commands/execute.rs (+6 -4)
📝 crates/horizon-client/src/save.rs (+3 -0)
📝 crates/horizon-client/src/streaming.rs (+38 -2)
📝 crates/horizon-client/src/vanillagen.rs (+6 -0)

📄 Description

🤖 Opened by FusselTV's AI agent (Claude Code, Opus 5.5), not by FusselTV personally.

What and why

A chunk was lit only once all eight neighbours were finished columns (Streaming::region). The outermost finished ring of a loaded area, such as a /forceload square, the edge of a /pregen band or a player's last ring, never has that, so it stayed unlit. It was saved as Status: minecraft:full with isLightOn: 0 and no SkyLight or BlockLight in any section. With generation animals waiting for light, it would also get none.

Vanilla's LIGHT step only needs its neighbours at INITIALIZE_LIGHT (ChunkPyramid), after FEATURES, so vanilla lights its last FULL ring against decorated, not yet full neighbours.

Seed 1, chunks -32..31 force-loaded, compared ring by ring with vanilla 26.3. Ring 0 is the outermost forced ring:

Ring Vanilla Before After
inside full, lit full, lit full, lit
0 full, lit full, isLightOn 0, no light arrays (252 chunks) full, lit
1 full, lit features features

What changes:

  • A light job reads a neighbour that will not finish (outside the area: !in_range(n, 1)) from its decorated proto chunk. The new ChunkGenerator::light_view (vanilla generator: VanillaTerrain::column) is built on the main thread when the job is scheduled. The protos stay where they are.
  • A chunk saved unlit (no saved light) is saved again once lit, and so is a chunk whose light changes when a neighbour finishes later.
  • execute if loaded needs the chunk lit, as vanilla's ExecuteCommand.isChunkLoaded needs it ENTITY_TICKING. A script that force-loads in batches and waits for if loaded no longer lets a chunk go before it is lit.

Not included: vanilla's FORCED ticket also makes the two rings outside a forced area FULL (level 31 → 33). Horizon keeps them as protos, as before.

Vanilla reference

  • ChunkPyramid (LIGHT ← INITIALIZE_LIGHT ← FEATURES), ChunkStatusTasks.light.
  • ExecuteCommand.isChunkLoaded: getFullStatus() == ENTITY_TICKING.

Tests

  • tools/test_light_parity.py: light parity ok.
  • tools/test_dedicated_server_parity.py: 602 transcript lines identical.
  • End to end, seed 1, all three dimensions, 1,024 × 1,024 blocks: no chunk is saved full and unlit any more (before: 252 per dimension).
  • Not run here: test_save_roundtrip_parity.py and test_spawn_loot_parity.py need a game window, which the build container does not have.

Self-check

pr_ready (tools/pr_ready.py --quick --base upstream/main on d3132c5722b7, against upstream/main at cb43e3278, 5 min 33 s)

Check Result
Scope ✅ 4 files, +53 −6
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 320 passed (25 s)
rustfmt ✅ (7 s)
clippy ✅ (59 s)
tests: horizon-client ✅ 1336 passed (3 min 35 s)
doc tests ✅ 0 passed (25 s)
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ 332 affected, to run in CI (--quick): arrow, attribute_map_queries, auto_jump, biome_source_codec, biome_temperature, biome_weather, biome_zoom, block_blob, block_collision_scan, block_column, block_entity_anim, block_entity_render and 320 more
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

🤖 Generated with Claude Code


🔄 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/2619 **Author:** [@FusselTV](https://github.com/FusselTV) **Created:** 10/27/2026 **Status:** ✅ Merged **Merged:** 10/27/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/light-edge-from-protos` --- ### 📝 Commits (1) - [`d601715`](https://github.com/horizon-rust/horizon/commit/d6017151266c7c9890a6d5d5604b0949daecd7c1) Streaming: the last finished ring is lit against decorated neighbours ### 📊 Changes **4 files changed** (+53 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/commands/execute.rs` (+6 -4) 📝 `crates/horizon-client/src/save.rs` (+3 -0) 📝 `crates/horizon-client/src/streaming.rs` (+38 -2) 📝 `crates/horizon-client/src/vanillagen.rs` (+6 -0) </details> ### 📄 Description > 🤖 Opened by FusselTV's AI agent (Claude Code, Opus 5.5), not by FusselTV personally. ## What and why A chunk was lit only once all eight neighbours were finished columns (`Streaming::region`). The outermost finished ring of a loaded area, such as a `/forceload` square, the edge of a `/pregen` band or a player's last ring, never has that, so it stayed unlit. It was saved as `Status: minecraft:full` with `isLightOn: 0` and no `SkyLight` or `BlockLight` in any section. With generation animals waiting for light, it would also get none. Vanilla's LIGHT step only needs its neighbours at INITIALIZE_LIGHT (`ChunkPyramid`), after FEATURES, so vanilla lights its last FULL ring against decorated, not yet full neighbours. Seed 1, chunks -32..31 force-loaded, compared ring by ring with vanilla 26.3. Ring 0 is the outermost forced ring: | Ring | Vanilla | Before | After | |---|---|---|---| | inside | full, lit | full, lit | full, lit | | 0 | full, lit | **full, `isLightOn` 0, no light arrays** (252 chunks) | full, lit | | 1 | full, lit | features | features | What changes: - A light job reads a neighbour that will not finish (outside the area: `!in_range(n, 1)`) from its decorated proto chunk. The new `ChunkGenerator::light_view` (vanilla generator: `VanillaTerrain::column`) is built on the main thread when the job is scheduled. The protos stay where they are. - A chunk saved unlit (no saved light) is saved again once lit, and so is a chunk whose light changes when a neighbour finishes later. - `execute if loaded` needs the chunk lit, as vanilla's `ExecuteCommand.isChunkLoaded` needs it `ENTITY_TICKING`. A script that force-loads in batches and waits for `if loaded` no longer lets a chunk go before it is lit. Not included: vanilla's FORCED ticket also makes the two rings outside a forced area FULL (level 31 → 33). Horizon keeps them as protos, as before. ## Vanilla reference - `ChunkPyramid` (LIGHT ← INITIALIZE_LIGHT ← FEATURES), `ChunkStatusTasks.light`. - `ExecuteCommand.isChunkLoaded`: `getFullStatus() == ENTITY_TICKING`. ## Tests - `tools/test_light_parity.py`: light parity ok. - `tools/test_dedicated_server_parity.py`: 602 transcript lines identical. - End to end, seed 1, all three dimensions, 1,024 × 1,024 blocks: no chunk is saved full and unlit any more (before: 252 per dimension). - Not run here: `test_save_roundtrip_parity.py` and `test_spawn_loot_parity.py` need a game window, which the build container does not have. ## Self-check **pr_ready** (`tools/pr_ready.py --quick --base upstream/main` on d3132c5722b7, against upstream/main at cb43e3278, 5 min 33 s) | Check | Result | | --- | --- | | Scope | ✅ 4 files, +53 −6 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 320 passed (25 s) | | rustfmt | ✅ (7 s) | | clippy | ✅ (59 s) | | tests: horizon-client | ✅ 1336 passed (3 min 35 s) | | doc tests | ✅ 0 passed (25 s) | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ 332 affected, to run in CI (--quick): arrow, attribute_map_queries, auto_jump, biome_source_codec, biome_temperature, biome_weather, biome_zoom, block_blob, block_collision_scan, block_column, block_entity_anim, block_entity_render and 320 more | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:17:27 +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#4479
No description provided.