[PR #3645] [MERGED] block placement: a click on a block is handled before the move behind it, so pillar blocks are heard #5119

Closed
opened 2026-11-03 05:10:21 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/3645
Author: @iLostName
Created: 10/29/2026
Status: ✅ Merged
Merged: 10/30/2026
Merged by: @levzzz5154

Base: main ← Head: pillar-place-sound


📝 Commits (1)

  • 3c9b259 block placement: a click on a block is handled before the move behind it, so pillar blocks are heard

📊 Changes

2 files changed (+76 additions, -5 deletions)

View changed files

📝 crates/horizon-client/src/lan/hub.rs (+22 -5)
📝 crates/horizon-client/tests/lan_bot.rs (+54 -0)

📄 Description

What and why

Building straight up (jump and place), some blocks went down silently. The server applied the player's move before the click on a block sent ahead of it, so mid-jump it placed blocks the player's client had refused, and only that client plays the placer's own sound. A move queued behind a click on a block now waits for the next tick, as it already does behind a dig; the new lan_bot test fails on main and passes here. Fixes #3568.

Vanilla reference

ServerGamePacketListenerImpl handles a player's packets in order, so BlockItem.canPlace (Level.isUnobstructed) sees the player where they clicked from, as their client did. BlockItem.place plays the sound with level.playSound(player, ...), which the server sends only to the other players.

Self-check

pr_ready (tools/pr_ready.py --quick on PC-Lost, against origin/main at 64990cd32, 2 min 12 s)

Check Result
Scope ✅ 2 files, +76 −5
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ❌ 408 run, FAILED (failures=1, skipped=12) (1 min 2 s)
rustfmt ✅ (10 s)
clippy ✅ (15 s)
tests: horizon-client ✅ 798 passed (34 s)
doc tests ✅ 0 passed (9 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 ➖ not run (--quick): CI's parity job picks the affected harnesses
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

The one failure under Python tests is test_port_publish.PublishTests.test_body_has_names_and_signatures_only, a ~/ against ~\ path check that fails on Windows on main too. Parity is left to CI.


🔄 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/3645 **Author:** [@iLostName](https://github.com/iLostName) **Created:** 10/29/2026 **Status:** ✅ Merged **Merged:** 10/30/2026 **Merged by:** [@levzzz5154](https://github.com/levzzz5154) **Base:** `main` ← **Head:** `pillar-place-sound` --- ### 📝 Commits (1) - [`3c9b259`](https://github.com/horizon-rust/horizon/commit/3c9b2599d88341243c1adf1a97dc9a0ee9263dfd) block placement: a click on a block is handled before the move behind it, so pillar blocks are heard ### 📊 Changes **2 files changed** (+76 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/lan/hub.rs` (+22 -5) 📝 `crates/horizon-client/tests/lan_bot.rs` (+54 -0) </details> ### 📄 Description ## What and why Building straight up (jump and place), some blocks went down silently. The server applied the player's move before the click on a block sent ahead of it, so mid-jump it placed blocks the player's client had refused, and only that client plays the placer's own sound. A move queued behind a click on a block now waits for the next tick, as it already does behind a dig; the new `lan_bot` test fails on main and passes here. Fixes #3568. ## Vanilla reference `ServerGamePacketListenerImpl` handles a player's packets in order, so `BlockItem.canPlace` (`Level.isUnobstructed`) sees the player where they clicked from, as their client did. `BlockItem.place` plays the sound with `level.playSound(player, ...)`, which the server sends only to the other players. ## Self-check **pr_ready** (`tools/pr_ready.py --quick` on PC-Lost, against origin/main at 64990cd32, 2 min 12 s) | Check | Result | | --- | --- | | Scope | ✅ 2 files, +76 −5 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ❌ 408 run, FAILED (failures=1, skipped=12) (1 min 2 s) | | rustfmt | ✅ (10 s) | | clippy | ✅ (15 s) | | tests: horizon-client | ✅ 798 passed (34 s) | | doc tests | ✅ 0 passed (9 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 | ➖ not run (--quick): CI's parity job picks the affected harnesses | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | The one failure under Python tests is `test_port_publish.PublishTests.test_body_has_names_and_signatures_only`, a `~/` against `~\` path check that fails on Windows on main too. Parity is left to CI. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:10:21 +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#5119
No description provided.