[PR #5933] [MERGED] Rebuild the world-border wall when the camera changes section #6571

Closed
opened 2026-11-03 06:23:12 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/5933
Author: @Joansitoh
Created: 11/1/2026
Status: ✅ Merged
Merged: 11/1/2026
Merged by: @ludovic111

Base: main ← Head: fix/border-wall-section


📝 Commits (1)

  • 10531b1 Rebuild the world-border wall when the camera changes section

📊 Changes

1 file changed (+10 additions, -0 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+10 -0)

📄 Description

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

Fixes #4465

Cause. The red tint is per frame and stays right, but the wall mesh is the stretch inside render distance at build time, and BorderRenderer::prepare only rebuilds when needs_rebuild is set or the border limits change. Game::border_draw never called invalidate, so after a respawn onto the border or a walk along it, the wall stayed on the old stretch (missing or in the wrong place). Vanilla's LevelRenderer.repositionCamera calls worldBorderRenderer.invalidate() when the camera's SectionPos changes.

Change. game.rs only (+10): border_section: Option<[i32; 3]>; in border_draw, before prepare, compute floor(coord) >> 4 on X, Y and Z and call invalidate() when it differs. prepare is unchanged. Not reusing gfx.rs camera_section, which subtracts min_y on Y.

Tests. No new test: world_border_render calls prepare only and rebuilds only when its case sends invalidate, so it cannot see this. It still passes. Not run in the game.

Self-check (pr_ready.py --quick --base upstream/main): scope 1 file +10, rustfmt ✅, Python tests ✅, horizon-client tests ✅ 1685, doc tests ✅, parity.py world_border_render ✅. clippy ❌ only on crates/horizon-world/src/block_state_properties.rs:161 (needless_borrow, already on main, not in this diff). 34 harnesses left to CI.

Suggested label: none (fix).

🤖 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/5933 **Author:** [@Joansitoh](https://github.com/Joansitoh) **Created:** 11/1/2026 **Status:** ✅ Merged **Merged:** 11/1/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/border-wall-section` --- ### 📝 Commits (1) - [`10531b1`](https://github.com/horizon-rust/horizon/commit/10531b1d6494aa44852c0d3634d950c4cb3f8a3c) Rebuild the world-border wall when the camera changes section ### 📊 Changes **1 file changed** (+10 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+10 -0) </details> ### 📄 Description > 🤖 Opened by Joansitoh's AI agent (Claude Code, Sonnet 5.5), not by Joansitoh personally. Fixes #4465 **Cause.** The red tint is per frame and stays right, but the wall mesh is the stretch inside render distance at build time, and `BorderRenderer::prepare` only rebuilds when `needs_rebuild` is set or the border limits change. `Game::border_draw` never called `invalidate`, so after a respawn onto the border or a walk along it, the wall stayed on the old stretch (missing or in the wrong place). Vanilla's `LevelRenderer.repositionCamera` calls `worldBorderRenderer.invalidate()` when the camera's `SectionPos` changes. **Change.** `game.rs` only (+10): `border_section: Option<[i32; 3]>`; in `border_draw`, before `prepare`, compute `floor(coord) >> 4` on X, Y and Z and call `invalidate()` when it differs. `prepare` is unchanged. Not reusing `gfx.rs` `camera_section`, which subtracts `min_y` on Y. **Tests.** No new test: `world_border_render` calls `prepare` only and rebuilds only when its case sends `invalidate`, so it cannot see this. It still passes. Not run in the game. **Self-check** (`pr_ready.py --quick --base upstream/main`): scope 1 file +10, rustfmt ✅, Python tests ✅, horizon-client tests ✅ 1685, doc tests ✅, `parity.py world_border_render` ✅. clippy ❌ only on `crates/horizon-world/src/block_state_properties.rs:161` (`needless_borrow`, already on main, not in this diff). 34 harnesses left to CI. Suggested label: none (fix). 🤖 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 06:23:12 +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#6571
No description provided.