[PR #5535] [MERGED] Keep a horse inventory open while another level ticks (#5331) #6339

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/5535
Author: @mariuslozo-boop
Created: 10/31/2026
Status: ✅ Merged
Merged: 11/1/2026
Merged by: @ludovic111

Base: main ← Head: fix/horse-inventory-close


📝 Commits (8)

  • 8b5a93c Keep a horse inventory open while another level ticks (#5331)
  • 75c6194 lan_e2e: realign the riding entry of the check list
  • 276b77a lan_e2e: mount_other_level covers every mount, the End, getting off and reopening (#5331)
  • bc13a04 lan_e2e mount_other_level: the player in the Nether, and no clicks on the last mount
  • 2c93d81 lan_e2e mount_other_level: horse and camel in the Nether by default
  • 003f47c Merge main into #5535 (both new lan_e2e checks kept whole)
  • 9c1bd32 Merge main into #5535 (the level check before main's lan_mount_valid)
  • 072ad5d Merge remote-tracking branch 'origin/main' into n5535

📊 Changes

2 files changed (+190 additions, -1 deletions)

View changed files

📝 crates/horizon-client/src/game/lan_mount_menu.rs (+6 -1)
📝 tools/lan_e2e.py (+184 -0)

📄 Description

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

What and why

Fixes #5331. A horse's inventory closed the tick it opened whenever the server ticked a second level: a player or a force-loaded chunk in the Nether or the End, or a portal ticket. tick_lan_mount_menus ran on every level's pass and checked each open mount menu there; in a level without the mount it found no such mob and closed the menu. Like the station, crafting and merchant ticks, it now only checks the players in the level in place (host.hub.here(g)). The range and death checks are unchanged.

Kind

  • parity: Horizon now does what vanilla 26.3 does
  • bug: a crash or a breakage
  • perf: faster, or less memory
  • feature: something new for players (listed under New in the release notes)
  • extra: Horizon-only, off by default
  • tooling: tools, CI, tests, harnesses
  • docs

Vanilla reference

ServerPlayer.tick / ServerPlayer.doTick check containerMenu.stillValid(this) in the player's own tick; AbstractMountInventoryMenu.stillValid (mount alive, Player.isWithinEntityInteractionRange(mount, 4.0)).

Checked by the new tools/lan_e2e.py --check mount_other_level: the host on its server thread and a LAN guest each open a tamed horse's inventory by shift + right click and by the inventory key while riding, with a Nether chunk force-loaded, and the screen must still be open 20 ticks later. It fails before the fix (the host's shift + right click opened no horse inventory) and passes after; --check mounts still passes. Also tested by hand in a window (creative world, Nether chunk force-loaded, a tamed horse opened both ways).

Not tested: camels, llamas and the nautilus, which share this code path.

Other projects' code

none

Self-check

pr_ready (tools/pr_ready.py --base upstream/main on PCDKBLENDER, against upstream/main at a4873dec4, 8 min 12 s)

Check Result
Scope ✅ 2 files, +72 −2
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 510 passed (1 min 7 s)
rustfmt ✅ (11 s)
clippy ✅ (42 s)
tests: horizon-client ❌ 1552 passed, 13 failed (6 min 4 s)
doc tests ✅ 0 passed (3 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 ❌ 373 affected, (1 s)
  • The 13 failures are all tests/lan_bot.rs (minecraft:dialog at lan_bot.rs:142), the known failure on main tracked in #5505; this change doesn't touch that path.
  • Parity: run on Windows, where the runner needs fcntl and can't start; not run on Linux for this branch.

🤖 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/5535 **Author:** [@mariuslozo-boop](https://github.com/mariuslozo-boop) **Created:** 10/31/2026 **Status:** ✅ Merged **Merged:** 11/1/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/horse-inventory-close` --- ### 📝 Commits (8) - [`8b5a93c`](https://github.com/horizon-rust/horizon/commit/8b5a93cbd0982158d5a67ea2be739ce5ad88e2ca) Keep a horse inventory open while another level ticks (#5331) - [`75c6194`](https://github.com/horizon-rust/horizon/commit/75c6194615a120a574ea4726af8bf2635df29de5) lan_e2e: realign the riding entry of the check list - [`276b77a`](https://github.com/horizon-rust/horizon/commit/276b77a0f09708f8ce267f95deecae87bfe80f67) lan_e2e: mount_other_level covers every mount, the End, getting off and reopening (#5331) - [`bc13a04`](https://github.com/horizon-rust/horizon/commit/bc13a0403fe8c300b73ef9f6df6621a9cd6e16da) lan_e2e mount_other_level: the player in the Nether, and no clicks on the last mount - [`2c93d81`](https://github.com/horizon-rust/horizon/commit/2c93d81d0c88c81cae62f79b70c7ad2ddd245b64) lan_e2e mount_other_level: horse and camel in the Nether by default - [`003f47c`](https://github.com/horizon-rust/horizon/commit/003f47c4650bc959ab1b1eb8849e46075821937f) Merge main into #5535 (both new lan_e2e checks kept whole) - [`9c1bd32`](https://github.com/horizon-rust/horizon/commit/9c1bd32c77a6809269b7f3f1ed7a5ea710bba6fe) Merge main into #5535 (the level check before main's lan_mount_valid) - [`072ad5d`](https://github.com/horizon-rust/horizon/commit/072ad5d00a2feb61bc41f6e1b6e3ac5e0cceb453) Merge remote-tracking branch 'origin/main' into n5535 ### 📊 Changes **2 files changed** (+190 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/lan_mount_menu.rs` (+6 -1) 📝 `tools/lan_e2e.py` (+184 -0) </details> ### 📄 Description > 🤖 Opened by mariuslozo-boop's AI agent (Claude Code, Claude Opus 5.5), not by mariuslozo-boop personally. ## What and why Fixes #5331. A horse's inventory closed the tick it opened whenever the server ticked a second level: a player or a force-loaded chunk in the Nether or the End, or a portal ticket. `tick_lan_mount_menus` ran on every level's pass and checked each open mount menu there; in a level without the mount it found no such mob and closed the menu. Like the station, crafting and merchant ticks, it now only checks the players in the level in place (`host.hub.here(g)`). The range and death checks are unchanged. ## Kind - [ ] parity: Horizon now does what vanilla 26.3 does - [x] bug: a crash or a breakage - [ ] perf: faster, or less memory - [ ] feature: something new for players (listed under New in the release notes) - [ ] extra: Horizon-only, off by default - [ ] tooling: tools, CI, tests, harnesses - [ ] docs ## Vanilla reference `ServerPlayer.tick` / `ServerPlayer.doTick` check `containerMenu.stillValid(this)` in the player's own tick; `AbstractMountInventoryMenu.stillValid` (mount alive, `Player.isWithinEntityInteractionRange(mount, 4.0)`). Checked by the new `tools/lan_e2e.py --check mount_other_level`: the host on its server thread and a LAN guest each open a tamed horse's inventory by shift + right click and by the inventory key while riding, with a Nether chunk force-loaded, and the screen must still be open 20 ticks later. It fails before the fix (`the host's shift + right click opened no horse inventory`) and passes after; `--check mounts` still passes. Also tested by hand in a window (creative world, Nether chunk force-loaded, a tamed horse opened both ways). Not tested: camels, llamas and the nautilus, which share this code path. ## Other projects' code none ## Self-check **pr_ready** (`tools/pr_ready.py --base upstream/main` on PCDKBLENDER, against upstream/main at a4873dec4, 8 min 12 s) | Check | Result | | --- | --- | | Scope | ✅ 2 files, +72 −2 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 510 passed (1 min 7 s) | | rustfmt | ✅ (11 s) | | clippy | ✅ (42 s) | | tests: horizon-client | ❌ 1552 passed, 13 failed (6 min 4 s) | | doc tests | ✅ 0 passed (3 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 | ❌ 373 affected, (1 s) | - The 13 failures are all `tests/lan_bot.rs` (`minecraft:dialog` at lan_bot.rs:142), the known failure on main tracked in #5505; this change doesn't touch that path. - Parity: run on Windows, where the runner needs `fcntl` and can't start; not run on Linux for this branch. 🤖 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:18:32 +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#6339
No description provided.