[GH-ISSUE #2277] Wood breaking sounds are strange, sounds like they're played too often #625

Closed
opened 2026-11-02 15:40:37 +07:00 by bsakaguchi · 5 comments
Owner

Originally created by @ludovic111 on GitHub (Oct 26, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/2277

What I did: opened a world, started breaking the wood
What happened: breaking sound is played too often and it sounds strange
What I expected: to sound like in vanilla
Horizon version: c048292f
OS, CPU, GPU: Windows 11, Ryzen 3700x, RX 7600

Reported on Discord by andrij in #horizon-bugs · Discord thread
Tags: sound

Attachments (Discord links expire after a while; the thread keeps them)

Opened by Kira from Discord. Replies from the reporter in the thread are added here as comments.

Originally created by @ludovic111 on GitHub (Oct 26, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/2277 > What I did: opened a world, started breaking the wood > What happened: breaking sound is played too often and it sounds strange > What I expected: to sound like in vanilla > Horizon version: c048292f > OS, CPU, GPU: Windows 11, Ryzen 3700x, RX 7600 Reported on Discord by **andrij** in #horizon-bugs · [Discord thread](https://discord.com/channels/1559227979002028052/1564295344072958096) Tags: sound **Attachments** (Discord links expire after a while; the thread keeps them) - [Recording_2026-10-26_160937.mp4](https://cdn.discordapp.com/attachments/1564295344072958096/1564295345989750924/Recording_2026-10-26_160937.mp4?ex=6ae0bf11&is=6adf6d91&hm=dd6aef910aaddadff8da1405e316ff72afcd2b149f8a5b9778b9205bba92e1d1&) <sub>Opened by Kira from Discord. Replies from the reporter in the thread are added here as comments.</sub><!-- kira -->
bsakaguchi 2026-11-02 15:40:37 +07:00
Author
Owner

@ludovic111 commented on GitHub (Oct 26, 2026):

andrij added on Discord:

p.s.: the same issue is present with all blocks

<!-- gh-comment-id:6419601844 --> @ludovic111 commented on GitHub (Oct 26, 2026): **andrij** added on Discord: > p.s.: the same issue is present with all blocks <!-- kira -->
Author
Owner

@rdbtCVS commented on GitHub (Oct 26, 2026):

🤖 Agent: rdbt's AI agent (OpenCode, GPT-6.1 Sol) is taking this. I traced mining hit sounds through both the client and server playback paths and will prepare a small fix with regression coverage.

<!-- gh-comment-id:6421756828 --> @rdbtCVS commented on GitHub (Oct 26, 2026): 🤖 Agent: rdbt's AI agent (OpenCode, GPT-6.1 Sol) is taking this. I traced mining hit sounds through both the client and server playback paths and will prepare a small fix with regression coverage.
Author
Owner

@rdbtCVS commented on GitHub (Oct 26, 2026):

🤖 Agent: rdbt's AI agent (OpenCode, GPT-6.1 Sol) is releasing this reservation without a PR. The fixer's vanilla check found that mining sound delivery also needs the missing level-event handlers (2019/2020); a simple playback suppression could change what nearby players or clients of vanilla servers hear. The mandatory quick self-check was attempted but a stale preparation hook blocked its public-tree step. No code changes were made. This task is stopped for a broader, independently validated fix.

<!-- gh-comment-id:6422730055 --> @rdbtCVS commented on GitHub (Oct 26, 2026): 🤖 Agent: rdbt's AI agent (OpenCode, GPT-6.1 Sol) is releasing this reservation without a PR. The fixer's vanilla check found that mining sound delivery also needs the missing level-event handlers (2019/2020); a simple playback suppression could change what nearby players or clients of vanilla servers hear. The mandatory quick self-check was attempted but a stale preparation hook blocked its public-tree step. No code changes were made. This task is stopped for a broader, independently validated fix.
Author
Owner

@kacpherek commented on GitHub (Oct 26, 2026):

Thanks andrij for the report! A fix is up in #2350: mining plays each hit sound once again, from the server's destroy-progress level events like vanilla. It's waiting for review.

<!-- gh-comment-id:6423690255 --> @kacpherek commented on GitHub (Oct 26, 2026): Thanks andrij for the report! A fix is up in #2350: mining plays each hit sound once again, from the server's destroy-progress level events like vanilla. It's waiting for review.
Author
Owner

@levzzz5154 commented on GitHub (Oct 27, 2026):

🤖 Agent: the double playback that made the sound "played too often" is gone from the current main, and this pull request adds the regression coverage for it.

What was wrong. The block's hit sound was played twice for the digger: once by the digger's own client (every fourth tick of the dig) and once by the server, which played it in its guest simulation and sent it to the clients as a sound packet. The two copies landed a tick or two apart with different random pitches, so every hit was heard twice — that is the "too often, and it sounds strange" of the report. The players around heard only the server's copy, so they heard the right count and the digger the wrong one.

Where vanilla puts it. The hit sound is the server's: ServerPlayerGameMode.tick sends levelEvent(null, 2020 or 2019, destroyPos, destroyDirection.ordinal()) every tick of the dig (the hit sound on every fourth one), and ServerLevel.levelEvent with a null source broadcasts it to every player, the digger included. The digger's own client plays it exactly once, when the dig starts (MultiPlayerGameMode.startDestroyBlock → ClientLevel.addBreakingBlockEffects(pos, direction, true)).

The evidence. In a LAN world (the host and a guest, the default --server-thread mode) with the host holding the attack on a stone block for 40 ticks, the hit sounds each side counted:

  • before the fix: the digger counted 20, the player standing next to it counted 10 — every hit twice;
  • on the current main: the digger counts 11, the player next to it 10 — the digger's own start sound, then the server's hits, once each.

The current main already plays the sound the vanilla way (the fix landed in #2350), and this pull request adds the check that keeps it that way: a dig_sounds case in the LAN harness that compares the hit sounds both sides count while one of them digs, and an assertion in the remote mining fixture that the client plays the hit sound once, when the dig starts, and not in the loop. The check fails on the tree before #2350 and passes on main.

Pull request: #2732

<!-- gh-comment-id:6439216063 --> @levzzz5154 commented on GitHub (Oct 27, 2026): 🤖 Agent: the double playback that made the sound "played too often" is gone from the current `main`, and this pull request adds the regression coverage for it. **What was wrong.** The block's hit sound was played twice for the digger: once by the digger's own client (every fourth tick of the dig) and once by the server, which played it in its guest simulation and sent it to the clients as a sound packet. The two copies landed a tick or two apart with different random pitches, so every hit was heard twice — that is the "too often, and it sounds strange" of the report. The players around heard only the server's copy, so they heard the right count and the digger the wrong one. **Where vanilla puts it.** The hit sound is the server's: `ServerPlayerGameMode.tick` sends `levelEvent(null, 2020 or 2019, destroyPos, destroyDirection.ordinal())` every tick of the dig (the hit sound on every fourth one), and `ServerLevel.levelEvent` with a `null` source broadcasts it to every player, the digger included. The digger's own client plays it exactly once, when the dig starts (`MultiPlayerGameMode.startDestroyBlock` → `ClientLevel.addBreakingBlockEffects(pos, direction, true)`). **The evidence.** In a LAN world (the host and a guest, the default `--server-thread` mode) with the host holding the attack on a stone block for 40 ticks, the hit sounds each side counted: * before the fix: the digger counted **20**, the player standing next to it counted **10** — every hit twice; * on the current `main`: the digger counts **11**, the player next to it **10** — the digger's own start sound, then the server's hits, once each. The current `main` already plays the sound the vanilla way (the fix landed in #2350), and this pull request adds the check that keeps it that way: a `dig_sounds` case in the LAN harness that compares the hit sounds both sides count while one of them digs, and an assertion in the remote mining fixture that the client plays the hit sound once, when the dig starts, and not in the loop. The check fails on the tree before #2350 and passes on `main`. Pull request: #2732
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#625
No description provided.