[PR #2210] [MERGED] Play no place sound after using an empty hand or a non-block item on a block #4107

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

📋 Pull Request Information

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

Base: main ← Head: fix/2174-empty-hand-place-sound


📝 Commits (1)

  • 4abf5c0 Play no place sound after using an empty hand or a non-block item on a block

📊 Changes

1 file changed (+3 additions, -7 deletions)

View changed files

📝 crates/horizon-client/src/game/remote.rs (+3 -7)

📄 Description

What and why

Right-clicking the face of a block that has a torch attached played a wood place sound in single player
on its server thread, though nothing was placed. The sound is the torch's own place sound (torches use
the wood sound type).

After every use the server resends the clicked block and the cell next to it. The client marked that
next cell as "placing" on every click, so the resent torch was taken for a fresh placement. #1980 already
clears the mark when a held block item is refused; this covers the rest: an empty hand or an item that is
not a block. The mark is now set only by predict_place, i.e. when the client predicts a placement.

Fixes #2174.

Vanilla reference

  • BlockItem.place: the place sound is played only after the block is set
    (level.playSound(player, pos, soundType.getPlaceSound(), ...)); no other use path plays it.
  • ServerGamePacketListenerImpl.handleUseItemOn: resends pos and pos.relative(direction) after the use,
    whatever was held.
  • TorchBlock / Blocks.TORCH: SoundType.WOOD.

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/2210 **Author:** [@kacpherek](https://github.com/kacpherek) **Created:** 10/26/2026 **Status:** ✅ Merged **Merged:** 10/26/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/2174-empty-hand-place-sound` --- ### 📝 Commits (1) - [`4abf5c0`](https://github.com/horizon-rust/horizon/commit/4abf5c0ea2d907024318aaf2343139fd1273b7b2) Play no place sound after using an empty hand or a non-block item on a block ### 📊 Changes **1 file changed** (+3 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/remote.rs` (+3 -7) </details> ### 📄 Description ## What and why Right-clicking the face of a block that has a torch attached played a wood place sound in single player on its server thread, though nothing was placed. The sound is the torch's own place sound (torches use the wood sound type). After every use the server resends the clicked block and the cell next to it. The client marked that next cell as "placing" on every click, so the resent torch was taken for a fresh placement. #1980 already clears the mark when a held block item is refused; this covers the rest: an empty hand or an item that is not a block. The mark is now set only by `predict_place`, i.e. when the client predicts a placement. Fixes #2174. ## Vanilla reference - `BlockItem.place`: the place sound is played only after the block is set (`level.playSound(player, pos, soundType.getPlaceSound(), ...)`); no other use path plays it. - `ServerGamePacketListenerImpl.handleUseItemOn`: resends `pos` and `pos.relative(direction)` after the use, whatever was held. - `TorchBlock` / `Blocks.TORCH`: `SoundType.WOOD`. ## 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:14:44 +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#4107
No description provided.