[PR #6385] [MERGED] Cobweb and powder snow slow dropped items #6839

Closed
opened 2026-11-03 06:27:48 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/6385
Author: @HrafnaValkyrja
Created: 11/1/2026
Status: ✅ Merged
Merged: 11/1/2026
Merged by: @ludovic111

Base: main ← Head: fix/items-stuck-in-web


📝 Commits (2)

  • 1f6a8bb Cobweb and powder snow slow dropped items
  • ee3f178 Merge remote-tracking branch 'origin/main' into fix/items-stuck-in-web

📊 Changes

6 files changed (+98 additions, -1 deletions)

View changed files

📝 crates/horizon-client/src/entities.rs (+92 -1)
📝 crates/horizon-client/src/entities/fluids.rs (+1 -0)
📝 crates/horizon-client/src/entity_nbt.rs (+2 -0)
📝 crates/horizon-client/src/game.rs (+1 -0)
📝 crates/horizon-client/src/game/machines.rs (+1 -0)
📝 crates/horizon-client/src/game/remote.rs (+1 -0)

📄 Description

🤖 Opened by Valkyrie's AI agent (Claude Code, Opus 5.5), not by Valkyrie herself.

What and why

Dropped items ignored cobweb and powder snow. A cobweb stops an item sliding into it (vanilla makeStuckInBlock), powder snow slows it; Horizon let the item slide straight through. ItemEntity now notes the stuck factor of the cobweb (0.25, 0.05, 0.25) or powder snow (0.9, 1.5, 0.9) its box is in after a move, and the next move is scaled by it and zeroes the item's velocity (Entity.move). Like vanilla, an item is stuck in powder snow whichever block its feet are in (only living entities need the snow at their feet).

Changed: entities.rs (new field stuck on ItemEntity, set to zero where items are built).

Fixes #6384

Kind

  • parity: Horizon now does what vanilla 26.3 does
  • bug: a crash or a breakage
  • perf: faster, or less memory
  • feature: something new for players (listed under New in the release notes)
  • extra: Horizon-only, off by default
  • tooling: tools, CI, tests, harnesses
  • docs

Vanilla reference

WebBlock.entityInside, PowderSnowBlock.entityInside, Entity.makeStuckInBlock, Entity.move (stuckSpeedMultiplier), ItemEntity.tick.

Test

a_cobweb_and_powder_snow_slow_an_item (entities.rs): an item sliding at 0.4 on stone for 12 ticks stops at the cobweb cell and is slowed in powder snow. With the stuck step switched off it fails (web and free runs end at the same x); with it, it passes.

Numbers

Side-by-side items scene (item with Motion x 0.4 sliding into the cell), x position, vanilla / Horizon before / Horizon after:

tick 5 tick 20
cobweb 9.998 / 10.738 / 9.998 10.0015 / 10.850 / 10.0015
powder snow -6.7472 / -6.262 / -6.7472 -6.7472 / -6.149 / -6.7472

Scene total 299 -> 309 of 342 values equal. At tick 80 and later the web and snow items differ from vanilla by about 5e-4 (float32 friction drift also seen on the other floors).

What wasn't compared

  • Items only. Sweet berry bushes do not stick items in vanilla and were not changed.
  • Weaving does not affect items; not run.
  • Items resting in a cobweb that never move (skipped ticks) were not run beyond the scene's 200 ticks.

Proved by script against the real 26.3 server; no human played this change.

Other projects' code

none

Self-check

pr_ready (tools/pr_ready.py --quick on Valhalla, against origin/main at 8101f23df, 6 min 1 s)

Check Result
Scope ✅ 7 files, +98 −1
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 594 passed (26 s)
rustfmt ✅ (6 s)
Rust ⚠️ 1.98.0 is older than CI's stable (1.99): clippy may flag lints CI doesn't, update with rustup update
clippy ✅ (1 min 17 s)
tests: horizon-client, horizon-client-lib ✅ 1848 passed (4 min 9 s)
doc tests ✅ 0 passed (2 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 ➖ 336 affected, to run in CI (--quick): armor_stand_frost, arrow, arrow_wind_charge, auto_jump, block_entity_anim, block_entity_render, block_entity_tickers, block_particles, block_removal, block_tint, block_transformer, boat_authority and 324 more
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

🤖 Generated with Claude Code

https://claude.ai/code/session_018zuDTsnyHkP28bzn3u7S3m


🔄 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/6385 **Author:** [@HrafnaValkyrja](https://github.com/HrafnaValkyrja) **Created:** 11/1/2026 **Status:** ✅ Merged **Merged:** 11/1/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/items-stuck-in-web` --- ### 📝 Commits (2) - [`1f6a8bb`](https://github.com/horizon-rust/horizon/commit/1f6a8bb3dacb72627f679b27b779572911ab60b0) Cobweb and powder snow slow dropped items - [`ee3f178`](https://github.com/horizon-rust/horizon/commit/ee3f1787ff1f76e893d037559c3f186c1fe2c9df) Merge remote-tracking branch 'origin/main' into fix/items-stuck-in-web ### 📊 Changes **6 files changed** (+98 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/entities.rs` (+92 -1) 📝 `crates/horizon-client/src/entities/fluids.rs` (+1 -0) 📝 `crates/horizon-client/src/entity_nbt.rs` (+2 -0) 📝 `crates/horizon-client/src/game.rs` (+1 -0) 📝 `crates/horizon-client/src/game/machines.rs` (+1 -0) 📝 `crates/horizon-client/src/game/remote.rs` (+1 -0) </details> ### 📄 Description > 🤖 Opened by Valkyrie's AI agent (Claude Code, Opus 5.5), not by Valkyrie herself. ## What and why Dropped items ignored cobweb and powder snow. A cobweb stops an item sliding into it (vanilla `makeStuckInBlock`), powder snow slows it; Horizon let the item slide straight through. `ItemEntity` now notes the stuck factor of the cobweb (0.25, 0.05, 0.25) or powder snow (0.9, 1.5, 0.9) its box is in after a move, and the next move is scaled by it and zeroes the item's velocity (`Entity.move`). Like vanilla, an item is stuck in powder snow whichever block its feet are in (only living entities need the snow at their feet). Changed: `entities.rs` (new field `stuck` on `ItemEntity`, set to zero where items are built). Fixes #6384 ## Kind - [x] parity: Horizon now does what vanilla 26.3 does - [ ] bug: a crash or a breakage - [ ] perf: faster, or less memory - [ ] feature: something new for players (listed under New in the release notes) - [ ] extra: Horizon-only, off by default - [ ] tooling: tools, CI, tests, harnesses - [ ] docs ## Vanilla reference `WebBlock.entityInside`, `PowderSnowBlock.entityInside`, `Entity.makeStuckInBlock`, `Entity.move` (`stuckSpeedMultiplier`), `ItemEntity.tick`. ## Test `a_cobweb_and_powder_snow_slow_an_item` (`entities.rs`): an item sliding at 0.4 on stone for 12 ticks stops at the cobweb cell and is slowed in powder snow. With the stuck step switched off it fails (web and free runs end at the same x); with it, it passes. ## Numbers Side-by-side `items` scene (item with Motion x 0.4 sliding into the cell), x position, vanilla / Horizon before / Horizon after: | | tick 5 | tick 20 | |---|---|---| | cobweb | 9.998 / 10.738 / 9.998 | 10.0015 / 10.850 / 10.0015 | | powder snow | -6.7472 / -6.262 / -6.7472 | -6.7472 / -6.149 / -6.7472 | Scene total 299 -> 309 of 342 values equal. At tick 80 and later the web and snow items differ from vanilla by about 5e-4 (float32 friction drift also seen on the other floors). ## What wasn't compared - Items only. Sweet berry bushes do not stick items in vanilla and were not changed. - Weaving does not affect items; not run. - Items resting in a cobweb that never move (skipped ticks) were not run beyond the scene's 200 ticks. Proved by script against the real 26.3 server; no human played this change. ## Other projects' code none ## Self-check **pr_ready** (`tools/pr_ready.py --quick` on Valhalla, against origin/main at 8101f23df, 6 min 1 s) | Check | Result | | --- | --- | | Scope | ✅ 7 files, +98 −1 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 594 passed (26 s) | | rustfmt | ✅ (6 s) | | Rust | ⚠️ 1.98.0 is older than CI's stable (1.99): clippy may flag lints CI doesn't, update with `rustup update` | | clippy | ✅ (1 min 17 s) | | tests: horizon-client, horizon-client-lib | ✅ 1848 passed (4 min 9 s) | | doc tests | ✅ 0 passed (2 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 | ➖ 336 affected, to run in CI (--quick): armor_stand_frost, arrow, arrow_wind_charge, auto_jump, block_entity_anim, block_entity_render, block_entity_tickers, block_particles, block_removal, block_tint, block_transformer, boat_authority and 324 more | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_018zuDTsnyHkP28bzn3u7S3m --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:27:48 +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#6839
No description provided.