[PR #2445] [MERGED] Predict the sort and tweak clicks on a server like an ordinary click #4323

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

📋 Pull Request Information

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

Base: main ← Head: fix/2384-sort-cursor-item


📝 Commits (1)

  • 591b7b7 Predict the sort and tweak clicks on a server like an ordinary click

📊 Changes

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

View changed files

📝 crates/horizon-client/src/game/remote.rs (+0 -20)
📝 crates/horizon-client/src/game/tweaks.rs (+1 -2)

📄 Description

What and why

On a server (single player included), the sort buttons sent their clicks without predicting them: every ContainerClick went out with no changed slots and the carried stack as it was before the first click (an empty hand). The server found the carried stack and slots different at every step and kept sending the menu back, so the stack picked up by the last click of the sort showed under the cursor.

The tweak clicks (sort, and the mouse tweaks that click through tweak_click) now go through remote_menu_ops, the path an ordinary click takes: the menu engine predicts each click, and the packet carries the slots it changed and the carried stack after it. The old unpredicted remote_slot_click had no other caller and is removed.

Fixes #2384.

Vanilla reference

  • MultiPlayerGameMode.handleContainerInput: predicts the click on the client menu, then sends the changed slots and the carried stack.
  • ServerGamePacketListenerImpl.handleContainerClick: compares those hashes with its own result.

Self-check

cargo check -p horizon-client passes.


🔄 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/2445 **Author:** [@kacpherek](https://github.com/kacpherek) **Created:** 10/26/2026 **Status:** ✅ Merged **Merged:** 10/27/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/2384-sort-cursor-item` --- ### 📝 Commits (1) - [`591b7b7`](https://github.com/horizon-rust/horizon/commit/591b7b74daab63df7e042a7d270c2490960f39a9) Predict the sort and tweak clicks on a server like an ordinary click ### 📊 Changes **2 files changed** (+1 additions, -22 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/remote.rs` (+0 -20) 📝 `crates/horizon-client/src/game/tweaks.rs` (+1 -2) </details> ### 📄 Description ## What and why On a server (single player included), the sort buttons sent their clicks without predicting them: every `ContainerClick` went out with no changed slots and the carried stack as it was before the first click (an empty hand). The server found the carried stack and slots different at every step and kept sending the menu back, so the stack picked up by the last click of the sort showed under the cursor. The tweak clicks (sort, and the mouse tweaks that click through `tweak_click`) now go through `remote_menu_ops`, the path an ordinary click takes: the menu engine predicts each click, and the packet carries the slots it changed and the carried stack after it. The old unpredicted `remote_slot_click` had no other caller and is removed. Fixes #2384. ## Vanilla reference - `MultiPlayerGameMode.handleContainerInput`: predicts the click on the client menu, then sends the changed slots and the carried stack. - `ServerGamePacketListenerImpl.handleContainerClick`: compares those hashes with its own result. ## Self-check `cargo check -p horizon-client` passes. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:16:20 +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#4323
No description provided.