[PR #3288] [MERGED] Keep beacon beams visible outside the render distance #4893

Closed
opened 2026-11-03 05:08:42 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/3288
Author: @hectoreccles
Created: 10/28/2026
Status: ✅ Merged
Merged: 10/29/2026
Merged by: @levzzz5154

Base: main ← Head: feat/beacon-beam-lod


📝 Commits (2)

  • 8422225 Keep beacon beams visible past the render distance
  • 22a4620 Build beacon beam sections on server clients

📊 Changes

3 files changed (+83 additions, -23 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+5 -0)
📝 crates/horizon-client/src/game/beacon.rs (+77 -23)
📝 crates/horizon-client/src/game/remote.rs (+1 -0)

📄 Description

🤖 Opened by Hector Eccles's AI agent (DeepSeek V4.1 Flash via OpenCode), not by Hector himself.

What and why

Beacon beams were invisible in the default server-thread path, and on LAN and multiplayer clients, even inside the render distance. A chunk's block entity data carries a beacon's Levels and powers but not its beam sections, and the client never ran the beacon tick, so BeaconRenderer skipped every beam. Only --in-frame drew them.

  • Build the beam sections on the client, where ClientLevel.tickBlockEntities runs the beacon tick, without the effects, sounds and advancement the server owns.
  • With far terrain LOD on, remember a beam's sections when its chunk unloads and keep drawing it until the chunk loads again and its block entity says whether it is still there. Beam sections are not saved in NBT; the live block entity stays the source of truth.
  • Extend BeaconRenderer.shouldRender's renderDistance * 16 cull to the far-terrain distance, and clear the cache on world, dimension and LOD changes so nothing leaks between worlds.
  • The cache and the client tick only touch beacon beam state; no NBT or save changes.

Vanilla reference

BeaconBlockEntity.tick (the checkingBeamSections / beamSections pass and updateBase for Levels), ClientLevel.tickBlockEntities for the client side, and BeaconRenderer.submit / submitBeaconBeam / shouldRender (renderDistance * 16). No new worldgen.

Self-check

pr_ready (tools/pr_ready.py --quick on Hectors-MacBook-Pro-590, against origin/main at e1b2b0b2f, 3 min 26 s)

Check Result
Scope ✅ 3 files, +83 −23
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 401 passed (27 s)
rustfmt ✅ (4 s)
clippy ✅ (59 s)
tests: horizon-client ✅ 1264 passed (1 min 34 s)
doc tests ✅ 0 passed (21 s)
content root tests ➖ content root untouched
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ 278 affected, to run in CI (--quick): ambient_sound, ..., block_entity_render, ..., and 266 more
Label player-facing: feature

The beacon unit test only_active_beacons_have_beams passes.

Visual check

Beacon beam at close range

Beacon beam 670 blocks away, chunk unloaded

Offscreen server-thread session: a one-level pyramid and beacon at /setblock -30 68 -9 minecraft:beacon; beam drawn next to it. After tp to -699.5 67 -8.5, block -30 68 -9 reports loaded: false and the beam is still drawn by the far-terrain path. The screenshots live on a fork-only beacon-shots branch so they stay out of this diff.

🤖 Generated with OpenCode


🔄 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/3288 **Author:** [@hectoreccles](https://github.com/hectoreccles) **Created:** 10/28/2026 **Status:** ✅ Merged **Merged:** 10/29/2026 **Merged by:** [@levzzz5154](https://github.com/levzzz5154) **Base:** `main` ← **Head:** `feat/beacon-beam-lod` --- ### 📝 Commits (2) - [`8422225`](https://github.com/horizon-rust/horizon/commit/8422225047b97571c577e5d8dc3eea6b9122d62e) Keep beacon beams visible past the render distance - [`22a4620`](https://github.com/horizon-rust/horizon/commit/22a4620643f32888510e0f7cf4513e6a57b638e8) Build beacon beam sections on server clients ### 📊 Changes **3 files changed** (+83 additions, -23 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+5 -0) 📝 `crates/horizon-client/src/game/beacon.rs` (+77 -23) 📝 `crates/horizon-client/src/game/remote.rs` (+1 -0) </details> ### 📄 Description > 🤖 Opened by Hector Eccles's AI agent (DeepSeek V4.1 Flash via OpenCode), not by Hector himself. ## What and why Beacon beams were invisible in the default server-thread path, and on LAN and multiplayer clients, even inside the render distance. A chunk's block entity data carries a beacon's `Levels` and powers but not its beam sections, and the client never ran the beacon tick, so `BeaconRenderer` skipped every beam. Only `--in-frame` drew them. - Build the beam sections on the client, where `ClientLevel.tickBlockEntities` runs the beacon tick, without the effects, sounds and advancement the server owns. - With far terrain LOD on, remember a beam's sections when its chunk unloads and keep drawing it until the chunk loads again and its block entity says whether it is still there. Beam sections are not saved in NBT; the live block entity stays the source of truth. - Extend `BeaconRenderer.shouldRender`'s `renderDistance * 16` cull to the far-terrain distance, and clear the cache on world, dimension and LOD changes so nothing leaks between worlds. - The cache and the client tick only touch beacon beam state; no NBT or save changes. ## Vanilla reference `BeaconBlockEntity.tick` (the `checkingBeamSections` / `beamSections` pass and `updateBase` for `Levels`), `ClientLevel.tickBlockEntities` for the client side, and `BeaconRenderer.submit` / `submitBeaconBeam` / `shouldRender` (`renderDistance * 16`). No new worldgen. ## Self-check **pr_ready** (`tools/pr_ready.py --quick` on Hectors-MacBook-Pro-590, against origin/main at e1b2b0b2f, 3 min 26 s) | Check | Result | | --- | --- | | Scope | ✅ 3 files, +83 −23 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 401 passed (27 s) | | rustfmt | ✅ (4 s) | | clippy | ✅ (59 s) | | tests: horizon-client | ✅ 1264 passed (1 min 34 s) | | doc tests | ✅ 0 passed (21 s) | | content root tests | ➖ content root untouched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ 278 affected, to run in CI (--quick): ambient_sound, ..., block_entity_render, ..., and 266 more | | Label | player-facing: `feature` | The beacon unit test `only_active_beacons_have_beams` passes. ## Visual check ![Beacon beam at close range](https://raw.githubusercontent.com/hectoreccles/horizon/beacon-shots/shots/beacon-beam-near.png) ![Beacon beam 670 blocks away, chunk unloaded](https://raw.githubusercontent.com/hectoreccles/horizon/beacon-shots/shots/beacon-beam-far.png) Offscreen server-thread session: a one-level pyramid and beacon at `/setblock -30 68 -9 minecraft:beacon`; beam drawn next to it. After `tp` to `-699.5 67 -8.5`, `block -30 68 -9` reports `loaded: false` and the beam is still drawn by the far-terrain path. The screenshots live on a fork-only `beacon-shots` branch so they stay out of this diff. 🤖 Generated with [OpenCode](https://opencode.ai) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:08:42 +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#4893
No description provided.