[PR #1411] [MERGED] Items push out of blocks; a server's client digs at the server's speed #3502

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

📋 Pull Request Information

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

Base: main ← Head: fix/items-out-of-blocks


📝 Commits (10+)

  • 7acebba Server players: the HUD's bubbles and golden hearts follow the server, absorption is saved, Nether lava pushes harder
  • ed28e1d Contact damage: magma, cactus, lit campfires and sweet berry bushes hurt in both modes
  • 2898b40 Server players: an axe-disabled shield stays down 5 s, death forgets the digging
  • 5c4600e /setworldspawn moves the world spawn, not the player's respawn point
  • 65bd2d0 Items push out of blocks; a server's client digs at the server's speed
  • f949f08 Merge remote-tracking branch 'origin/main' into fix/server-air-absorption
  • 10f6b18 Merge branch 'fix/server-air-absorption' into fix/contact-damage
  • 48c1b04 Merge branch 'fix/contact-damage' into fix/server-player-shield-mining
  • e84f86a Merge branch 'fix/server-player-shield-mining' into fix/setworldspawn
  • 3d36883 Merge branch 'fix/setworldspawn' into fix/items-out-of-blocks

📊 Changes

16 files changed (+775 additions, -63 deletions)

View changed files

📝 crates/horizon-client/src/attribute_updates.rs (+5 -0)
📝 crates/horizon-client/src/entities.rs (+73 -5)
📝 crates/horizon-client/src/game.rs (+12 -3)
📝 crates/horizon-client/src/game/agent.rs (+5 -0)
📝 crates/horizon-client/src/game/commands.rs (+13 -1)
📝 crates/horizon-client/src/game/lan.rs (+5 -0)
📝 crates/horizon-client/src/game/lan_actions.rs (+61 -0)
📝 crates/horizon-client/src/game/remote.rs (+32 -18)
📝 crates/horizon-client/src/lan/guest.rs (+9 -0)
📝 crates/horizon-client/src/lan/hub.rs (+24 -1)
📝 crates/horizon-client/src/lan/playerdata.rs (+13 -1)
📝 crates/horizon-client/src/motion.rs (+72 -3)
📝 crates/horizon-client/src/motion/environment.rs (+1 -1)
📝 crates/horizon-client/src/save.rs (+20 -3)
📝 tests/test_remote_mining.py (+4 -0)
📝 tools/lan_e2e.py (+426 -27)

📄 Description

🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself.

What

  • #1252 An item stuck inside a full block (for example, one placed on top of it) now moves out toward the closest free side, as vanilla does. On the server it has no physics while stuck (ItemEntity.tick), and it moves 0.1 to 0.3 per tick, checking north, south, west, east, then up (Entity.moveTowardsClosestSpace). It used to stay inside the block.
  • #1254 A server's client (LAN guests, and the window on the server thread) now digs at the same speed as the server. It uses getDestroyProgress, which includes the underwater mining penalty, haste, mining fatigue and efficiency, not the plain tool speed. Under water it no longer finishes early and gets the block put back.

Fixes #1252, Fixes #1254

How tested

tools/lan_e2e.py adds two checks:

  • drops: a diamond under a block placed on it comes out, in both views. On main the item stays in the block in both modes.
  • underwater: dirt broken by hand at eye height under water. Both client and server are about halfway at 35 ticks (progress 0.467), and the block is broken by 105 ticks.

Both checks pass in both modes. tests/test_remote_mining.py's fixture gets the new destroy_progress method.

Self-check

One integration commit: origin/main 357dceb9 with all six of this batch's branches merged (hud, contact, guest, spawn, items, knockback; tools/lan_e2e.py taken from the first side where they conflict). tools/pr_ready.py on the Mac mini:

pr_ready (tools/pr_ready.py on ludovics-mac-mini, against origin/main at 357dceb99, 70 min 26 s)

Check Result
Scope ⚠️ 27 files, +1327 −68; 1139 lines of code: over 500, split it if it can ship in parts
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ❌ 292 run, FAILED (errors=2) (14 s)
rustfmt ✅ (4 s)
clippy ✅ (25 s)
tests: horizon-client, horizon-world ✅ 1382 passed (3 min 25 s)
doc tests ✅ 0 passed (2 s)
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ❌ 313 affected, 312 passed, failed: chat_screen (66 min 10 s)
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

chat_screen (1 of 3021 chat screens, the input cursor drawn on one frame) is unrelated to this batch, which touches no chat code: tools/test_chat_screen_parity.py passed twice when rerun on the same tree ("chat screen parity ok").

The Python test errors are the two that fail on main on macOS (test_parity_runner OracleReuse: java exit 127, test_rust_parity: /private/var vs /var paths).

Merging this batch

These PRs are now a chain: #1407 → #1408 → #1409 → #1410 → #1411 → #1412 → #1416 (#1308, beds). #1407 has main merged in, and each later branch merges the one before it (merge commits only), with the tools/lan_e2e.py conflicts resolved: both sides' checks kept, the shared helpers once, and every def checked with the AST against its source branch. Merge them in that order. Until the earlier ones merge, each PR also shows their commits.

On the top branch (#1416), every new check passes in both modes: absorption breath lava contacts shield deathmining worldspawn drops underwater beds minecarts levels. clippy is clean. #1408 also gained a test fix: the contacts sneaking case now sneaks before landing on the magma and reads the health before Shift is released.

What needs Ludovic

Nothing beyond review and merge.

🤖 Generated with 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/1411 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/23/2026 **Status:** ✅ Merged **Merged:** 10/23/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/items-out-of-blocks` --- ### 📝 Commits (10+) - [`7acebba`](https://github.com/horizon-rust/horizon/commit/7acebbae45fb84ec7c905e05f4ac4e4220914d0b) Server players: the HUD's bubbles and golden hearts follow the server, absorption is saved, Nether lava pushes harder - [`ed28e1d`](https://github.com/horizon-rust/horizon/commit/ed28e1dd0d6f6959179ba5f1914cfb69de14d1ae) Contact damage: magma, cactus, lit campfires and sweet berry bushes hurt in both modes - [`2898b40`](https://github.com/horizon-rust/horizon/commit/2898b40670eb253a924560d5edfe8c3a4256a725) Server players: an axe-disabled shield stays down 5 s, death forgets the digging - [`5c4600e`](https://github.com/horizon-rust/horizon/commit/5c4600e4034ed5a5a0fc50c3d498dccbc8ab04cf) /setworldspawn moves the world spawn, not the player's respawn point - [`65bd2d0`](https://github.com/horizon-rust/horizon/commit/65bd2d0d45e15710af70cad00f642ae80f48b86e) Items push out of blocks; a server's client digs at the server's speed - [`f949f08`](https://github.com/horizon-rust/horizon/commit/f949f08488fc42b3283c20f843c45f604cf09aa0) Merge remote-tracking branch 'origin/main' into fix/server-air-absorption - [`10f6b18`](https://github.com/horizon-rust/horizon/commit/10f6b183e3dcf0fec748c90211b7871c4342e918) Merge branch 'fix/server-air-absorption' into fix/contact-damage - [`48c1b04`](https://github.com/horizon-rust/horizon/commit/48c1b04cb05dc671dbd7b6657e5cf6c6f7f94b26) Merge branch 'fix/contact-damage' into fix/server-player-shield-mining - [`e84f86a`](https://github.com/horizon-rust/horizon/commit/e84f86a813eb3c24301178f3ee4aa69dcff17384) Merge branch 'fix/server-player-shield-mining' into fix/setworldspawn - [`3d36883`](https://github.com/horizon-rust/horizon/commit/3d36883f52c1b8b50af972344a21952079e50803) Merge branch 'fix/setworldspawn' into fix/items-out-of-blocks ### 📊 Changes **16 files changed** (+775 additions, -63 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/attribute_updates.rs` (+5 -0) 📝 `crates/horizon-client/src/entities.rs` (+73 -5) 📝 `crates/horizon-client/src/game.rs` (+12 -3) 📝 `crates/horizon-client/src/game/agent.rs` (+5 -0) 📝 `crates/horizon-client/src/game/commands.rs` (+13 -1) 📝 `crates/horizon-client/src/game/lan.rs` (+5 -0) 📝 `crates/horizon-client/src/game/lan_actions.rs` (+61 -0) 📝 `crates/horizon-client/src/game/remote.rs` (+32 -18) 📝 `crates/horizon-client/src/lan/guest.rs` (+9 -0) 📝 `crates/horizon-client/src/lan/hub.rs` (+24 -1) 📝 `crates/horizon-client/src/lan/playerdata.rs` (+13 -1) 📝 `crates/horizon-client/src/motion.rs` (+72 -3) 📝 `crates/horizon-client/src/motion/environment.rs` (+1 -1) 📝 `crates/horizon-client/src/save.rs` (+20 -3) 📝 `tests/test_remote_mining.py` (+4 -0) 📝 `tools/lan_e2e.py` (+426 -27) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. ## What - **#1252** An item stuck inside a full block (for example, one placed on top of it) now moves out toward the closest free side, as vanilla does. On the server it has no physics while stuck (`ItemEntity.tick`), and it moves 0.1 to 0.3 per tick, checking north, south, west, east, then up (`Entity.moveTowardsClosestSpace`). It used to stay inside the block. - **#1254** A server's client (LAN guests, and the window on the server thread) now digs at the same speed as the server. It uses `getDestroyProgress`, which includes the underwater mining penalty, haste, mining fatigue and efficiency, not the plain tool speed. Under water it no longer finishes early and gets the block put back. Fixes #1252, Fixes #1254 ## How tested `tools/lan_e2e.py` adds two checks: - `drops`: a diamond under a block placed on it comes out, in both views. On main the item stays in the block in both modes. - `underwater`: dirt broken by hand at eye height under water. Both client and server are about halfway at 35 ticks (progress 0.467), and the block is broken by 105 ticks. Both checks pass in both modes. `tests/test_remote_mining.py`'s fixture gets the new `destroy_progress` method. ### Self-check One integration commit: origin/main 357dceb9 with all six of this batch's branches merged (hud, contact, guest, spawn, items, knockback; `tools/lan_e2e.py` taken from the first side where they conflict). `tools/pr_ready.py` on the Mac mini: **pr_ready** (`tools/pr_ready.py` on ludovics-mac-mini, against origin/main at 357dceb99, 70 min 26 s) | Check | Result | | --- | --- | | Scope | ⚠️ 27 files, +1327 −68; 1139 lines of code: over 500, split it if it can ship in parts | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ❌ 292 run, FAILED (errors=2) (14 s) | | rustfmt | ✅ (4 s) | | clippy | ✅ (25 s) | | tests: horizon-client, horizon-world | ✅ 1382 passed (3 min 25 s) | | doc tests | ✅ 0 passed (2 s) | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ❌ 313 affected, 312 passed, failed: chat_screen (66 min 10 s) | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | `chat_screen` (1 of 3021 chat screens, the input cursor drawn on one frame) is unrelated to this batch, which touches no chat code: `tools/test_chat_screen_parity.py` passed twice when rerun on the same tree ("chat screen parity ok"). The Python test errors are the two that fail on main on macOS (`test_parity_runner` OracleReuse: java exit 127, `test_rust_parity`: /private/var vs /var paths). ### Merging this batch These PRs are now a chain: #1407 → #1408 → #1409 → #1410 → #1411 → #1412 → #1416 (#1308, beds). #1407 has main merged in, and each later branch merges the one before it (merge commits only), with the `tools/lan_e2e.py` conflicts resolved: both sides' checks kept, the shared helpers once, and every def checked with the AST against its source branch. Merge them in that order. Until the earlier ones merge, each PR also shows their commits. On the top branch (#1416), every new check passes in both modes: `absorption breath lava contacts shield deathmining worldspawn drops underwater beds minecarts levels`. clippy is clean. #1408 also gained a test fix: the `contacts` sneaking case now sneaks before landing on the magma and reads the health before Shift is released. ### What needs Ludovic Nothing beyond review and merge. 🤖 Generated with [Claude Code](https://claude.com/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 04:09:59 +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#3502
No description provided.