[PR #1082] [MERGED] Cobwebs slow falling blocks (WebBlock.entityInside) #3031

Closed
opened 2026-11-02 16:00:57 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: main ← Head: fix/cobweb-falling-blocks


📝 Commits (1)

  • 8a7ebee Cobwebs hold falling blocks (WebBlock.entityInside)

📊 Changes

5 files changed (+139 additions, -7 deletions)

View changed files

📝 crates/horizon-client/src/falling_block.rs (+100 -2)
📝 crates/horizon-client/src/game.rs (+28 -1)
📝 crates/horizon-client/src/game/persist.rs (+1 -0)
📝 crates/horizon-client/src/game/remote_projectiles.rs (+1 -0)
📝 tools/test_server_entities_parity.py (+9 -4)

📄 Description

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

Fixes #933. Reported by brabus on Discord: thanks!

What

Falling blocks (sand, gravel, anvils, and so on) now slow down in cobwebs as in vanilla, instead of dropping straight through.

  • FallingBlockEntity.tick → Entity.move → applyEffectsFromBlocks: after each move, vanilla's checkInsideBlocks walks the path one axis step at a time (16 iterations, the box deflated by 1.0E-5F). A cobweb on the path or at the end calls WebBlock.entityInside → makeStuckInBlock((0.25, 0.05F, 0.25)), which also resets the fall distance.
  • On the next move the stuck multiplier scales the movement, then it is cleared and the velocity is set to zero (Entity.move), so the block creeps down through the web.

How

  • falling_block.rs: passes_cobweb (the axis-step sweep) and web_multiplier, plus a unit test.
  • game.rs tick_falling: a new stuck field on FallingBlock, applied before the move and set after it.
  • Harness: tools/test_server_entities_parity.py's scene gains a cobweb with sand falling into it.

Proof

Run on one integration commit holding all five B3 branches, rebased on origin/main 85f65a69, on the Mac mini:

cargo fmt --all --check                                         ok
set -o pipefail; cargo clippy --workspace --all-targets -- -D warnings   exit 0, 0 errors
cargo test -p horizon-client                                    1052 passed, 0 failed
  • tools/test_server_entities_parity.py on the integration commit: 29 entities identical, including the sand in the cobweb.
  • Unit test a_cobweb_on_the_path_or_at_the_end_holds_a_falling_block passes.

tools/parity.py --changed origin/main: this branch changes game.rs, so it selects all 325 harnesses. Today's Mac mini (load ~70 from other agents' parity runs) couldn't finish the main baseline within the 2 h job limit; it was still building probes. CI's parity job runs the same --changed selection for this PR on the runner. Known failure on main: mob_ai drowned_* (#290).

Needs Ludovic

Nothing. Still missing, noted under LATER in the parity notes: cobwebs for mobs and dropped items, and falling blocks' other entityInside effects (bubble columns, and so on).

🤖 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/1082 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/21/2026 **Status:** ✅ Merged **Merged:** 10/21/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/cobweb-falling-blocks` --- ### 📝 Commits (1) - [`8a7ebee`](https://github.com/horizon-rust/horizon/commit/8a7ebee269ec17a2a6689c4fb50706b9d0c374f8) Cobwebs hold falling blocks (WebBlock.entityInside) ### 📊 Changes **5 files changed** (+139 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/falling_block.rs` (+100 -2) 📝 `crates/horizon-client/src/game.rs` (+28 -1) 📝 `crates/horizon-client/src/game/persist.rs` (+1 -0) 📝 `crates/horizon-client/src/game/remote_projectiles.rs` (+1 -0) 📝 `tools/test_server_entities_parity.py` (+9 -4) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. Fixes #933. Reported by **brabus** on Discord: thanks! ## What Falling blocks (sand, gravel, anvils, and so on) now slow down in cobwebs as in vanilla, instead of dropping straight through. - `FallingBlockEntity.tick` → `Entity.move` → `applyEffectsFromBlocks`: after each move, vanilla's `checkInsideBlocks` walks the path one axis step at a time (16 iterations, the box deflated by `1.0E-5F`). A cobweb on the path or at the end calls `WebBlock.entityInside` → `makeStuckInBlock((0.25, 0.05F, 0.25))`, which also resets the fall distance. - On the next move the stuck multiplier scales the movement, then it is cleared and the velocity is set to zero (`Entity.move`), so the block creeps down through the web. ## How - `falling_block.rs`: `passes_cobweb` (the axis-step sweep) and `web_multiplier`, plus a unit test. - `game.rs` `tick_falling`: a new `stuck` field on `FallingBlock`, applied before the move and set after it. - Harness: `tools/test_server_entities_parity.py`'s scene gains a cobweb with sand falling into it. ## Proof Run on one integration commit holding all five B3 branches, rebased on origin/main `85f65a69`, on the Mac mini: ``` cargo fmt --all --check ok set -o pipefail; cargo clippy --workspace --all-targets -- -D warnings exit 0, 0 errors cargo test -p horizon-client 1052 passed, 0 failed ``` - `tools/test_server_entities_parity.py` on the integration commit: **29 entities identical**, including the sand in the cobweb. - Unit test `a_cobweb_on_the_path_or_at_the_end_holds_a_falling_block` passes. `tools/parity.py --changed origin/main`: this branch changes `game.rs`, so it selects all 325 harnesses. Today's Mac mini (load ~70 from other agents' parity runs) couldn't finish the main baseline within the 2 h job limit; it was still building probes. CI's parity job runs the same `--changed` selection for this PR on the runner. Known failure on main: mob_ai drowned_* (#290). ## Needs Ludovic Nothing. Still missing, noted under LATER in the parity notes: cobwebs for mobs and dropped items, and falling blocks' other `entityInside` effects (bubble columns, and so on). 🤖 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-02 16:00:57 +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#3031
No description provided.