[PR #2349] [MERGED] Predict putting out a lit campfire with a shovel on the client #4229

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

📋 Pull Request Information

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

Base: main ← Head: fix/campfire-douse-client


📝 Commits (3)

  • 5b89508 Predict putting out a lit campfire with a shovel on the client
  • a0b4721 Merge main into fix/campfire-douse-client
  • c7f448c Merge main into fix/campfire-douse-client

📊 Changes

2 files changed (+58 additions, -15 deletions)

View changed files

📝 crates/horizon-client/src/game/campfire_douse.rs (+52 -14)
📝 crates/horizon-client/src/game/remote.rs (+6 -1)

📄 Description

What and why

Follow-up to #2183, addressing rdbtCVS's review comment on campfire_douse.rs ("handle dousing in the normal client block-use path too").

In default single player and LAN, the client's block-use path (remote_use_block) did not recognize a shovel used on a lit campfire. The server put the fire out, but the player saw no dousing smoke, and a shovel in the main hand with a shield in the off hand also raised the shield, because the client went on to the other hand.

The client now predicts the douse like other block uses. When the clicked block is a lit campfire or soul campfire and the hand holds an item from #minecraft:douses_campfires (not sneaking), it spawns the twenty smoke puffs, sets the campfire unlit as a predicted block change under the use's sequence, swings the hand and ends the click. The extinguish sound is the server's level event 1009, which already reaches the clicker, so it is not played twice. The check is shared with the server-side helper, so both agree on what counts.

Vanilla reference

  • CampfireBlock.useItemOn: shovel (SHOVEL_DOUSE) on a LIT campfire returns SUCCESS.
  • CampfireBlock.douse: on the client, 20 makeParticles(..., signal_fire, true).
  • MultiPlayerGameMode.useItemOn: a SUCCESS ends the click, so the other hand is not tried.

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/2349 **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/campfire-douse-client` --- ### 📝 Commits (3) - [`5b89508`](https://github.com/horizon-rust/horizon/commit/5b89508fe92abd98e2035e95c08c0be6269dfc87) Predict putting out a lit campfire with a shovel on the client - [`a0b4721`](https://github.com/horizon-rust/horizon/commit/a0b4721c5b85dd6379cdf9b0d3832fdda510ea3c) Merge main into fix/campfire-douse-client - [`c7f448c`](https://github.com/horizon-rust/horizon/commit/c7f448c5234192569dfee5b58d4f6498725ea60f) Merge main into fix/campfire-douse-client ### 📊 Changes **2 files changed** (+58 additions, -15 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/campfire_douse.rs` (+52 -14) 📝 `crates/horizon-client/src/game/remote.rs` (+6 -1) </details> ### 📄 Description ## What and why Follow-up to #2183, addressing rdbtCVS's review comment on `campfire_douse.rs` ("handle dousing in the normal client block-use path too"). In default single player and LAN, the client's block-use path (`remote_use_block`) did not recognize a shovel used on a lit campfire. The server put the fire out, but the player saw no dousing smoke, and a shovel in the main hand with a shield in the off hand also raised the shield, because the client went on to the other hand. The client now predicts the douse like other block uses. When the clicked block is a lit campfire or soul campfire and the hand holds an item from `#minecraft:douses_campfires` (not sneaking), it spawns the twenty smoke puffs, sets the campfire unlit as a predicted block change under the use's sequence, swings the hand and ends the click. The extinguish sound is the server's level event 1009, which already reaches the clicker, so it is not played twice. The check is shared with the server-side helper, so both agree on what counts. ## Vanilla reference - `CampfireBlock.useItemOn`: shovel (`SHOVEL_DOUSE`) on a `LIT` campfire returns `SUCCESS`. - `CampfireBlock.douse`: on the client, 20 `makeParticles(..., signal_fire, true)`. - `MultiPlayerGameMode.useItemOn`: a `SUCCESS` ends the click, so the other hand is not tried. ## 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:15: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#4229
No description provided.