[PR #7200] [CLOSED] locator_bar: respect locator_bar gamerule when choosing contextual bar (fixes #4760) #7406

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/7200
Author: @glitchsnake
Created: 11/2/2026
Status: ❌ Closed

Base: main ← Head: fix/4760-locator-bar-gamerule


📝 Commits (5)

  • 9d51585 clouds: optimize cloud mesh preparation and ring traversal (fixes #5093)
  • ce9e101 Merge remote-tracking branch 'origin/main' into perf/5093-clouds-fps
  • 855cb0f locator_bar: respect locator_bar gamerule when choosing contextual bar (fixes #4760)
  • 3133b19 Merge remote-tracking branch 'origin/main' into fix/4760-locator-bar-gamerule
  • 21b29af locator_bar: format contextual bar test assertions (fixes #4760)

📊 Changes

3 files changed (+353 additions, -94 deletions)

View changed files

📝 crates/horizon-client-render/src/clouds.rs (+338 -93)
📝 crates/horizon-client/src/game.rs (+1 -1)
📝 crates/horizon-client/src/locator_bar.rs (+14 -0)

📄 Description

🤖 Opened by glitchsnake's AI agent (Antigravity), not by glitchsnake personally.

Fixes #4760.

What and why

When the locator_bar gamerule is disabled (/gamerule locator_bar false), the client still displayed the waypoint locator bar above the hotbar whenever waypoints were present.

In crates/horizon-client/src/game.rs (Game::capture), ContextualBar::next previously checked self.waypoints.has_waypoints() directly without verifying if the locator_bar gamerule was enabled. We now check self.waypoints.has_waypoints() && self.ui.rules.bool("locator_bar"). When the rule is disabled, ContextualBar::next falls back to the experience bar, jumpable vehicle bar, or empty bar as expected in vanilla Java Edition 26.3.

Verification

  • Added test coverage in crates/horizon-client/src/locator_bar.rs verifying that when locator_bar is disabled, the contextual bar falls back to Experience / JumpableVehicle / Empty even if waypoints exist.
  • Verified with cargo test -p horizon-client-lib locator_bar::tests::contextual_bar_priorities.
  • Ran python3 tools/check_public_tree.py (passed).
  • Ran python3 tools/pr_ready.py --base origin/main --quick (Python tests, rustfmt, clippy passed).

🤖 Generated with Antigravity


🔄 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/7200 **Author:** [@glitchsnake](https://github.com/glitchsnake) **Created:** 11/2/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/4760-locator-bar-gamerule` --- ### 📝 Commits (5) - [`9d51585`](https://github.com/horizon-rust/horizon/commit/9d515854a8821e6594b4baef4695b08cbcedbade) clouds: optimize cloud mesh preparation and ring traversal (fixes #5093) - [`ce9e101`](https://github.com/horizon-rust/horizon/commit/ce9e10196eaac1bdb8fefc6179487e3153336eeb) Merge remote-tracking branch 'origin/main' into perf/5093-clouds-fps - [`855cb0f`](https://github.com/horizon-rust/horizon/commit/855cb0f0f1b275f28834f7d23a1455a4ff9da310) locator_bar: respect locator_bar gamerule when choosing contextual bar (fixes #4760) - [`3133b19`](https://github.com/horizon-rust/horizon/commit/3133b19d9a744ccfdcdecc3f484ce614f2f179ee) Merge remote-tracking branch 'origin/main' into fix/4760-locator-bar-gamerule - [`21b29af`](https://github.com/horizon-rust/horizon/commit/21b29af36273e7091deb9166824561c4d1bb8ae4) locator_bar: format contextual bar test assertions (fixes #4760) ### 📊 Changes **3 files changed** (+353 additions, -94 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client-render/src/clouds.rs` (+338 -93) 📝 `crates/horizon-client/src/game.rs` (+1 -1) 📝 `crates/horizon-client/src/locator_bar.rs` (+14 -0) </details> ### 📄 Description > 🤖 Opened by glitchsnake's AI agent (Antigravity), not by glitchsnake personally. Fixes #4760. ## What and why When the `locator_bar` gamerule is disabled (`/gamerule locator_bar false`), the client still displayed the waypoint locator bar above the hotbar whenever waypoints were present. In `crates/horizon-client/src/game.rs` (`Game::capture`), `ContextualBar::next` previously checked `self.waypoints.has_waypoints()` directly without verifying if the `locator_bar` gamerule was enabled. We now check `self.waypoints.has_waypoints() && self.ui.rules.bool("locator_bar")`. When the rule is disabled, `ContextualBar::next` falls back to the experience bar, jumpable vehicle bar, or empty bar as expected in vanilla Java Edition 26.3. ## Verification - Added test coverage in `crates/horizon-client/src/locator_bar.rs` verifying that when `locator_bar` is disabled, the contextual bar falls back to Experience / JumpableVehicle / Empty even if waypoints exist. - Verified with `cargo test -p horizon-client-lib locator_bar::tests::contextual_bar_priorities`. - Ran `python3 tools/check_public_tree.py` (passed). - Ran `python3 tools/pr_ready.py --base origin/main --quick` (Python tests, rustfmt, clippy passed). 🤖 Generated with [Antigravity](https://antigravity.google.com) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:39:03 +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#7406
No description provided.