[PR #6127] [MERGED] Cauldron clicks predict the cauldron, not the held bucket's use #6667

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

📋 Pull Request Information

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

Base: main ← Head: fix/cauldron-prediction


📝 Commits (1)

  • 34f8c67 Cauldron clicks predict the cauldron, not the held bucket's use

📊 Changes

1 file changed (+96 additions, -2 deletions)

View changed files

📝 crates/horizon-client/src/game/remote.rs (+96 -2)

📄 Description

🤖 Opened by readerkid's AI agent (opencode + DeepSeek V4.1 Flash), not by readerkid personally.

What and why

In multiplayer, using a water bucket on an empty cauldron put a water block where the cauldron was clicked instead of filling it, and an empty bucket on a full cauldron put water on top of it instead of emptying it. The server corrected the block a tick later, so players saw a ghost of water appear and disappear.

The click was lost in client-side prediction. remote_use_item_on sends predicted clicks through remote_block_reacts, which had arms for many blocks but none for cauldrons, so a cauldron click fell through to Item.use while the water bucket was still in hand; BucketItem.use then emptied the bucket into the clicked face. Single-player never showed it because the host path calls use_on_cauldron directly.

This adds remote_cauldron_reacts, which runs cauldron::interact on a dry copy of the held stack, mirroring use_on_cauldron, and returns early only for outcomes other than Pass, so clicks vanilla passes on still reach the block. Cauldrons also join hand_operated.

Fixes #5296

Kind

  • parity: Horizon now does what vanilla 26.3 does

Vanilla reference

AbstractCauldronBlock.useItemOn and the CauldronInteractions handlers (bucket fill and empty, bottle fill, dye, banner, shulker box, powder snow). Checked by tools/test_cauldron_parity.py against the pinned 26.3 server jar: 23,863 of 23,863 cases match.

Other projects' code

none

Self-check

**pr_ready** (`tools/pr_ready.py --quick` on elliots-laptop, against origin/main at ba2106689, 26 min 4 s)

| Check | Result |
| --- | --- |
| Scope | ✅ 1 files, +96 −2 |
| Cargo.lock | ✅ unchanged |
| Public tree | ✅ |
| Python tests | ✅ 510 passed (1 min 18 s) |
| rustfmt | ✅ (18 s) |
| Rust | ⚠️ 1.98.1 is older than CI's stable (1.99): clippy may flag lints CI doesn't, update with `rustup update` |
| clippy | ✅ (7 min 52 s) |
| tests: horizon-client | ❌ 1553 passed, 13 failed (16 min 18 s) |
| doc tests | ✅ 0 passed (7 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 | ➖ not run (--quick): CI's parity job picks the affected harnesses |
| Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) |

The 13 failures are all in tests/lan_bot.rs and none are from this change: with crates/horizon-client/src/game/remote.rs taken straight from origin/main they fail identically (2 passed, 13 failed), while the 442 unit tests in that crate's bin pass. They failed the same way before this branch existed.

Parity was run directly too, because --quick skips it: python3 tools/test_cauldron_parity.py --limit 4 against the pinned 26.3 server jar with JDK 25 printed 23863/23863 cases match and exited 0 on this commit, and cargo test -p horizon-client --bin horizon-client -- every_cauldron_counts_as_hand_operated passes.

Screenshots

No before/after still, because there is nothing stationary to photograph: the wrong state was a single-tick client prediction that the server corrected within about 50 ms, so a still of the settled result is identical either way. Verified on a dedicated server instead: a water bucket on an empty cauldron gives water_cauldron[level=3] and leaves a bucket in hand; an empty bucket on a full cauldron gives cauldron and a water_bucket; a glass bottle on level 3 lowers it to level 2 and yields a potion; the face above the cauldron stays air; and a scan of the surrounding region finds one water_cauldron and zero minecraft:water blocks.


🔄 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/6127 **Author:** [@readerkid](https://github.com/readerkid) **Created:** 11/1/2026 **Status:** ✅ Merged **Merged:** 11/1/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/cauldron-prediction` --- ### 📝 Commits (1) - [`34f8c67`](https://github.com/horizon-rust/horizon/commit/34f8c670f5a47ec50b45e727f0d7a403f3fc3a21) Cauldron clicks predict the cauldron, not the held bucket's use ### 📊 Changes **1 file changed** (+96 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/remote.rs` (+96 -2) </details> ### 📄 Description > 🤖 Opened by readerkid's AI agent (opencode + DeepSeek V4.1 Flash), not by readerkid personally. ## What and why In multiplayer, using a water bucket on an empty cauldron put a water block where the cauldron was clicked instead of filling it, and an empty bucket on a full cauldron put water on top of it instead of emptying it. The server corrected the block a tick later, so players saw a ghost of water appear and disappear. The click was lost in client-side prediction. `remote_use_item_on` sends predicted clicks through `remote_block_reacts`, which had arms for many blocks but none for cauldrons, so a cauldron click fell through to `Item.use` while the water bucket was still in hand; `BucketItem.use` then emptied the bucket into the clicked face. Single-player never showed it because the host path calls `use_on_cauldron` directly. This adds `remote_cauldron_reacts`, which runs `cauldron::interact` on a dry copy of the held stack, mirroring `use_on_cauldron`, and returns early only for outcomes other than `Pass`, so clicks vanilla passes on still reach the block. Cauldrons also join `hand_operated`. Fixes #5296 ## Kind - [x] parity: Horizon now does what vanilla 26.3 does ## Vanilla reference `AbstractCauldronBlock.useItemOn` and the `CauldronInteractions` handlers (bucket fill and empty, bottle fill, dye, banner, shulker box, powder snow). Checked by `tools/test_cauldron_parity.py` against the pinned 26.3 server jar: 23,863 of 23,863 cases match. ## Other projects' code none ## Self-check ``` **pr_ready** (`tools/pr_ready.py --quick` on elliots-laptop, against origin/main at ba2106689, 26 min 4 s) | Check | Result | | --- | --- | | Scope | ✅ 1 files, +96 −2 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 510 passed (1 min 18 s) | | rustfmt | ✅ (18 s) | | Rust | ⚠️ 1.98.1 is older than CI's stable (1.99): clippy may flag lints CI doesn't, update with `rustup update` | | clippy | ✅ (7 min 52 s) | | tests: horizon-client | ❌ 1553 passed, 13 failed (16 min 18 s) | | doc tests | ✅ 0 passed (7 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 | ➖ not run (--quick): CI's parity job picks the affected harnesses | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | ``` The 13 failures are all in `tests/lan_bot.rs` and none are from this change: with `crates/horizon-client/src/game/remote.rs` taken straight from `origin/main` they fail identically (2 passed, 13 failed), while the 442 unit tests in that crate's bin pass. They failed the same way before this branch existed. Parity was run directly too, because `--quick` skips it: `python3 tools/test_cauldron_parity.py --limit 4` against the pinned 26.3 server jar with JDK 25 printed `23863/23863 cases match` and exited 0 on this commit, and `cargo test -p horizon-client --bin horizon-client -- every_cauldron_counts_as_hand_operated` passes. ## Screenshots No before/after still, because there is nothing stationary to photograph: the wrong state was a single-tick client prediction that the server corrected within about 50 ms, so a still of the settled result is identical either way. Verified on a dedicated server instead: a water bucket on an empty cauldron gives `water_cauldron[level=3]` and leaves a `bucket` in hand; an empty bucket on a full cauldron gives `cauldron` and a `water_bucket`; a glass bottle on level 3 lowers it to level 2 and yields a `potion`; the face above the cauldron stays `air`; and a scan of the surrounding region finds one `water_cauldron` and zero `minecraft:water` blocks. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:24:40 +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#6667
No description provided.