[PR #6783] [MERGED] Buckets: water on a double slab pours beside it, like vanilla #7091

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/6783
Author: @some-du6e
Created: 11/2/2026
Status: ✅ Merged
Merged: 11/2/2026
Merged by: @ludovic111

Base: main ← Head: fix/bucket-double-slab


📝 Commits (5)

  • f377286 Pour a refused water bucket beside the clicked block
  • 0d934d8 Merge remote-tracking branch 'upstream/main' into fix/bucket-double-slab
  • 74e6d76 Buckets: one emptying entry point, predict water poured beside into containers
  • cbd7a3b Buckets: aim past a block that refuses the water, as canBlockContainFluid does
  • 955a505 Buckets: say where Shift stops counting

📊 Changes

6 files changed (+182 additions, -104 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+36 -15)
📝 crates/horizon-client/src/game/dispenser.rs (+2 -2)
📝 crates/horizon-client/src/game/remote.rs (+13 -7)
📝 crates/horizon-world/src/level/buckets.rs (+30 -18)
📝 crates/horizon-world/src/level/fluids.rs (+24 -20)
📝 crates/horizon-world/src/level/tests.rs (+77 -42)

📄 Description

Fixes #6782. Clicking a double slab with a water bucket did nothing, and sneak-clicking a slab or stairs with one failed too. Vanilla puts the water in the block next to the clicked face in both cases.

Horizon was missing two parts of vanilla's BucketItem:

  • The target (use). The bucket aims at the clicked block only when canBlockContainFluid holds: the block is a liquid container and canPlaceLiquid accepts water. A double slab, kelp, seagrass and a survival-mode barrier fail that check, so the bucket aims at the block beside from the start. Horizon only checked for a container, so kelp and seagrass swallowed the click. With the retry alone, a fish bucket would also have spawned its fish inside a double slab.
  • The retry (emptyContents). When the target refuses the fluid, vanilla tries again on hitResult.getBlockPos().relative(direction) with no hit result, where Shift no longer counts. Horizon had no retry.

Changes:

  • level/buckets.rs: Behaviours::bucket_empty takes beside: Option<BlockPos> (None for a dispenser, which has no hit result) and returns where the contents went. Shift only counts when there is a hit result, as in vanilla's !shiftKeyDown || hitResult == null.
  • level/fluids.rs: can_place_liquid moves from Sim to Behaviours so the game can ask it. The body is unchanged.
  • game.rs: bucket_target also asks can_place_liquid. The player's bucket passes the block beside the clicked face (Hit::beside, which replaces three copies of pos + face). The Nether evaporation smoke appears where the water went. native_fill_bucket also asks about the block beside the clicked face when that block isn't the target, as vanilla's mayUseItemAt(blockPos2) does, so a claim mod still sees where a refused bucket pours. Powder snow is the exception, since it never pours beside (docs/native-mods.md says so).
  • game/remote.rs: the client leaves waterlogging to the server wherever the water lands, as SimpleWaterloggedBlock.placeLiquid does. Before, it only did this when the water went into the clicked block. Water poured into air beside a refusing block is predicted on the client.
  • level/tests.rs: clicked_bucket_pours_beside_a_refusing_block covers a sneak-click on a slab, a click on a double slab, and both blocks refusing.

Testing:

  • I didn't run pr_ready.py locally; the host builds in CI only.
  • ci.yml on the fork, verify job (fmt, clippy -D warnings, tests): see the latest run on fix/bucket-double-slab at https://github.com/some-du6e/horizon/actions/workflows/ci.yml
  • No test covers bucket_target's new check. It needs a full Game, and only the retry is unit-tested.
  • Nobody has tried it in-game yet.

Note

Filed by Opus 5.5 using 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/6783 **Author:** [@some-du6e](https://github.com/some-du6e) **Created:** 11/2/2026 **Status:** ✅ Merged **Merged:** 11/2/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/bucket-double-slab` --- ### 📝 Commits (5) - [`f377286`](https://github.com/horizon-rust/horizon/commit/f37728687d8cd329c4fad2440d9142b653aca519) Pour a refused water bucket beside the clicked block - [`0d934d8`](https://github.com/horizon-rust/horizon/commit/0d934d8c12add2e4d24585679d8ada8e7bf1eb81) Merge remote-tracking branch 'upstream/main' into fix/bucket-double-slab - [`74e6d76`](https://github.com/horizon-rust/horizon/commit/74e6d760343bc3689103a5d33dd357019a3d2458) Buckets: one emptying entry point, predict water poured beside into containers - [`cbd7a3b`](https://github.com/horizon-rust/horizon/commit/cbd7a3bc9b53bd1997ba068381784ed703945c4a) Buckets: aim past a block that refuses the water, as canBlockContainFluid does - [`955a505`](https://github.com/horizon-rust/horizon/commit/955a5059e9e064cacd61849d506a36f32f90cdd9) Buckets: say where Shift stops counting ### 📊 Changes **6 files changed** (+182 additions, -104 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+36 -15) 📝 `crates/horizon-client/src/game/dispenser.rs` (+2 -2) 📝 `crates/horizon-client/src/game/remote.rs` (+13 -7) 📝 `crates/horizon-world/src/level/buckets.rs` (+30 -18) 📝 `crates/horizon-world/src/level/fluids.rs` (+24 -20) 📝 `crates/horizon-world/src/level/tests.rs` (+77 -42) </details> ### 📄 Description Fixes #6782. Clicking a double slab with a water bucket did nothing, and sneak-clicking a slab or stairs with one failed too. Vanilla puts the water in the block next to the clicked face in both cases. Horizon was missing two parts of vanilla's `BucketItem`: - **The target (`use`).** The bucket aims at the clicked block only when `canBlockContainFluid` holds: the block is a liquid container and `canPlaceLiquid` accepts water. A double slab, kelp, seagrass and a survival-mode barrier fail that check, so the bucket aims at the block beside from the start. Horizon only checked for a container, so kelp and seagrass swallowed the click. With the retry alone, a fish bucket would also have spawned its fish inside a double slab. - **The retry (`emptyContents`).** When the target refuses the fluid, vanilla tries again on `hitResult.getBlockPos().relative(direction)` with no hit result, where Shift no longer counts. Horizon had no retry. Changes: - `level/buckets.rs`: `Behaviours::bucket_empty` takes `beside: Option<BlockPos>` (None for a dispenser, which has no hit result) and returns where the contents went. Shift only counts when there is a hit result, as in vanilla's `!shiftKeyDown || hitResult == null`. - `level/fluids.rs`: `can_place_liquid` moves from `Sim` to `Behaviours` so the game can ask it. The body is unchanged. - `game.rs`: `bucket_target` also asks `can_place_liquid`. The player's bucket passes the block beside the clicked face (`Hit::beside`, which replaces three copies of `pos + face`). The Nether evaporation smoke appears where the water went. `native_fill_bucket` also asks about the block beside the clicked face when that block isn't the target, as vanilla's `mayUseItemAt(blockPos2)` does, so a claim mod still sees where a refused bucket pours. Powder snow is the exception, since it never pours beside (`docs/native-mods.md` says so). - `game/remote.rs`: the client leaves waterlogging to the server wherever the water lands, as `SimpleWaterloggedBlock.placeLiquid` does. Before, it only did this when the water went into the clicked block. Water poured into air beside a refusing block is predicted on the client. - `level/tests.rs`: `clicked_bucket_pours_beside_a_refusing_block` covers a sneak-click on a slab, a click on a double slab, and both blocks refusing. Testing: - I didn't run `pr_ready.py` locally; the host builds in CI only. - `ci.yml` on the fork, `verify` job (fmt, clippy `-D warnings`, tests): see the latest run on `fix/bucket-double-slab` at https://github.com/some-du6e/horizon/actions/workflows/ci.yml - No test covers `bucket_target`'s new check. It needs a full `Game`, and only the retry is unit-tested. - Nobody has tried it in-game yet. > [!NOTE] > Filed by Opus 5.5 using 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:33:38 +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#7091
No description provided.