[PR #5811] [MERGED] Buckets used on a cauldron no longer pour water or lava beside it too #6518

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

📋 Pull Request Information

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

Base: main ← Head: fix/cauldron-bucket


📝 Commits (3)

📊 Changes

4 files changed (+174 additions, -12 deletions)

View changed files

📝 crates/horizon-client/src/cauldron.rs (+63 -0)
📝 crates/horizon-client/src/game.rs (+45 -10)
📝 crates/horizon-client/src/game/remote.rs (+12 -0)
📝 tools/lan_e2e.py (+54 -2)

📄 Description

🤖 Opened by asowneryt's AI agent (Claude), not by asowneryt himself.

What and why

Using a water or lava bucket on a cauldron filled the cauldron, but water or lava also showed up next to it for a moment, along with a second "bucket empties" sound. In creative, the water stayed there.

Cause: a client of the server (single player's window on its server thread, a LAN guest, a dedicated server's player) decided whether the clicked block takes the item by asking only horizon-world's use_item_on, which doesn't know cauldrons. So after UseItemOn the click went on to UseItem. The client ran its own BucketItem.use prediction (a water or lava block placed beside or above the cauldron until the server's ack, plus its sound), and in creative, where the hand keeps the full bucket, the server poured it a second time beside the cauldron.

Fix: the client now asks cauldron::outcome, a dry run of the existing cauldron::interact that changes nothing. On SUCCESS or CONSUME the click ends at the cauldron, and only SUCCESS swings, like any other block use. use_on_cauldron and the client check share a new Game::cauldron_at lookup. A sneak with an item in hand now skips the cauldron on both sides (Player.isSecondaryUseActive), so the client and the server agree on that click too.

Fixes #5294.

Vanilla reference

AbstractCauldronBlock.useItemOn, CauldronInteractions (fillBucket, emptyBucket, fillLavaInteraction, …: each checks its conditions on both sides, acts only if (!level.isClientSide()), and returns SUCCESS, or CONSUME for lava or powder snow under water), and MultiPlayerGameMode.useItemOn/startUseItem (a consuming useItemOn ends the click, so no UseItem follows).

Checked by:

  • A new lan_e2e.py --check cauldron: a guest uses a creative water bucket, a survival lava bucket and an empty bucket on a full water cauldron, each on the cauldron's side. It samples the block beside the cauldron right after the click (in one script call) and again later, and checks the cauldron and the inventory. On upstream/main it fails: water beside, which in creative stays and later turns to obsidian next to the lava. With this change it passes.
  • A single-player server-thread run driven by horizon-ctl, with a temporary log line on upstream: each bucket click also ran UseItem with a predicted pour beside or above the cauldron. With this change, none.
  • A unit test cauldron::tests::a_client_sees_the_bucket_taken_without_acting.
  • cauldron parity is unchanged (cauldron::interact is untouched).

Self-check

pr_ready (tools/pr_ready.py --base upstream/main on cachyos, against upstream/main at 78043f09a, 31 min 1 s)

Check Result
Scope ✅ 4 files, +174 −12
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ❌ 511 run, FAILED (failures=2, skipped=1) (27 s)
rustfmt ✅ (5 s)
clippy ✅ (1 min 20 s)
tests: horizon-client ✅ 1659 passed (3 min 40 s)
doc tests ✅ 0 passed (2 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 ✅ 39 affected, 38 passed (25 min 15 s)

The two Python failures come from this machine, not this change. They are test_lab.GameEnvScreenTests.test_macos_and_windows_start_no_virtual_screen (darwin and win32), which fails because pr_ready ran inside this machine's virtual screen, whose VSCREEN variable is in the environment. Without the vscreen environment, python3 -m unittest tests.test_lab passes (21 tests OK). The parity runner recorded no failures; pr_ready doesn't name the one affected harness that didn't report a pass.

Suggested label: none (a 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/5811 **Author:** [@ASOwnerYT](https://github.com/ASOwnerYT) **Created:** 11/1/2026 **Status:** ✅ Merged **Merged:** 11/1/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/cauldron-bucket` --- ### 📝 Commits (3) - [`51b8552`](https://github.com/horizon-rust/horizon/commit/51b8552e7088217998b9cc30a7acb05acc3d8fa0) Buckets used on a cauldron no longer pour beside it too - [`43f96dd`](https://github.com/horizon-rust/horizon/commit/43f96dda2bd9c98e2681ca287e9ae7ea130397d8) Merge main into #5811 - [`45e9566`](https://github.com/horizon-rust/horizon/commit/45e95666d238216238ff6eb1d2ea776a4eecdf17) Merge main into #5811 ### 📊 Changes **4 files changed** (+174 additions, -12 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/cauldron.rs` (+63 -0) 📝 `crates/horizon-client/src/game.rs` (+45 -10) 📝 `crates/horizon-client/src/game/remote.rs` (+12 -0) 📝 `tools/lan_e2e.py` (+54 -2) </details> ### 📄 Description > 🤖 Opened by asowneryt's AI agent (Claude), not by asowneryt himself. ## What and why Using a water or lava bucket on a cauldron filled the cauldron, but water or lava also showed up next to it for a moment, along with a second "bucket empties" sound. In creative, the water stayed there. Cause: a client of the server (single player's window on its server thread, a LAN guest, a dedicated server's player) decided whether the clicked block takes the item by asking only horizon-world's `use_item_on`, which doesn't know cauldrons. So after `UseItemOn` the click went on to `UseItem`. The client ran its own `BucketItem.use` prediction (a water or lava block placed beside or above the cauldron until the server's ack, plus its sound), and in creative, where the hand keeps the full bucket, the server poured it a second time beside the cauldron. Fix: the client now asks `cauldron::outcome`, a dry run of the existing `cauldron::interact` that changes nothing. On SUCCESS or CONSUME the click ends at the cauldron, and only SUCCESS swings, like any other block use. `use_on_cauldron` and the client check share a new `Game::cauldron_at` lookup. A sneak with an item in hand now skips the cauldron on both sides (`Player.isSecondaryUseActive`), so the client and the server agree on that click too. Fixes #5294. ## Vanilla reference `AbstractCauldronBlock.useItemOn`, `CauldronInteractions` (`fillBucket`, `emptyBucket`, `fillLavaInteraction`, …: each checks its conditions on both sides, acts only `if (!level.isClientSide())`, and returns SUCCESS, or CONSUME for lava or powder snow under water), and `MultiPlayerGameMode.useItemOn`/`startUseItem` (a consuming `useItemOn` ends the click, so no `UseItem` follows). Checked by: - A new `lan_e2e.py --check cauldron`: a guest uses a creative water bucket, a survival lava bucket and an empty bucket on a full water cauldron, each on the cauldron's side. It samples the block beside the cauldron right after the click (in one `script` call) and again later, and checks the cauldron and the inventory. On upstream/main it fails: water beside, which in creative stays and later turns to obsidian next to the lava. With this change it passes. - A single-player server-thread run driven by horizon-ctl, with a temporary log line on upstream: each bucket click also ran `UseItem` with a predicted pour beside or above the cauldron. With this change, none. - A unit test `cauldron::tests::a_client_sees_the_bucket_taken_without_acting`. - `cauldron` parity is unchanged (`cauldron::interact` is untouched). ## Self-check **pr_ready** (`tools/pr_ready.py --base upstream/main` on cachyos, against upstream/main at 78043f09a, 31 min 1 s) | Check | Result | | --- | --- | | Scope | ✅ 4 files, +174 −12 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ❌ 511 run, FAILED (failures=2, skipped=1) (27 s) | | rustfmt | ✅ (5 s) | | clippy | ✅ (1 min 20 s) | | tests: horizon-client | ✅ 1659 passed (3 min 40 s) | | doc tests | ✅ 0 passed (2 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 | ✅ 39 affected, 38 passed (25 min 15 s) | The two Python failures come from this machine, not this change. They are `test_lab.GameEnvScreenTests.test_macos_and_windows_start_no_virtual_screen` (darwin and win32), which fails because pr_ready ran inside this machine's virtual screen, whose `VSCREEN` variable is in the environment. Without the vscreen environment, `python3 -m unittest tests.test_lab` passes (21 tests OK). The parity runner recorded no failures; pr_ready doesn't name the one affected harness that didn't report a pass. Suggested label: none (a 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:22: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#6518
No description provided.