[PR #5319] [MERGED] Grow a shulker box's collision box with its lid and push entities as it opens #6207

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

📋 Pull Request Information

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

Base: main ← Head: fix/shulker-box-collision


📝 Commits (1)

  • d2e17a7 Shulker boxes: grow the lid's hitbox and push what it meets (#4882)

📊 Changes

5 files changed (+291 additions, -12 deletions)

View changed files

📝 crates/horizon-client-render/src/collisions.rs (+158 -4)
📝 crates/horizon-client-render/src/world.rs (+5 -0)
📝 crates/horizon-client/src/game/block_entity_anims.rs (+12 -7)
📝 crates/horizon-client/src/game/block_entity_ticks.rs (+53 -0)
📝 crates/horizon-client/src/game/piston_push.rs (+63 -1)

📄 Description

🤖 Opened by readerkid's AI agent (opencode + DeepSeek V4.1 Flash), not by readerkid himself.

What and why

A shulker box's lid animated, but its collision shape never did: a closed box checked as a plain block and an open one kept the same 1×1×1 hitbox, so nothing could stand on the 1.5-high lid or be pushed by it as vanilla does. Fixes #4882.

  • SceneCollisions answers shulker_collision_state and shulker_is_closed from the level's boxes now (the copy-after-tick path moving pistons already use) instead of None.
  • The level ticks those lids in tick_shulkers on its server pass, so a single-player world grows the box; a remote world still only animates what the server sends.
  • An opening lid applies moveCollidedEntities to the bodies the game moves itself (push_shulker_entities), resolving the move as a piston's does.

Kind

  • parity: Horizon now does what vanilla 26.3 does

Vanilla reference

  • ShulkerBoxBlock.getCollisionShape and getShape, through ShulkerBoxBlockEntity.isClosed (a closed box uses the block's shape, an opening one its grown box).
  • ShulkerBoxBlockEntity.getBoundingBox (Shulker.getProgressDeltaAabb) and ShulkerBoxBlockEntity.moveCollidedEntities.

Harness: python3 tools/parity.py block_entity_anim dynamic_support entity_move. block_entity_anim already replays shulker box lid steps and the level calls a tick makes through VanillaBlockEntityAnimOracle; dynamic_support feeds ShulkerCollisionState progress pairs through the dynamic collision queries.

Self-check

python3 tools/pr_ready.py --base origin/main could not finish on this machine. The client's default-feature build needs ALSA and udev headers, which exist here only in a container, and the horizon-client test link exhausted this 15 GiB box's memory and killed the run. What did run, in that container where headers were needed:

Check Result
Public tree pass
Python tests pass (486)
rustfmt pass
clippy (-p horizon-client-render --all-targets -- -D warnings) pass
cargo test -p horizon-client-render pass (685 passed, 17 ignored)
cargo check -p horizon-client --no-default-features pass
Harnesses not run here: no .local/minecraft; CI runs them

CI's verify is the authority for the default-feature build and doc tests, and parity for the harnesses; I'll fix anything they report.

Screenshots

Not capturable from this checkout: it has no prepared .local/ game resources, so the game cannot start here. The visible change is the lid's 1.5-block hitbox when a box opens, and the entity push as it opens.

🤖 Generated with opencode (DeepSeek V4.1 Flash)


🔄 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/5319 **Author:** [@readerkid](https://github.com/readerkid) **Created:** 10/31/2026 **Status:** ✅ Merged **Merged:** 10/31/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/shulker-box-collision` --- ### 📝 Commits (1) - [`d2e17a7`](https://github.com/horizon-rust/horizon/commit/d2e17a70c087291c3f3505a6ba85b94ecb7e5189) Shulker boxes: grow the lid's hitbox and push what it meets (#4882) ### 📊 Changes **5 files changed** (+291 additions, -12 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client-render/src/collisions.rs` (+158 -4) 📝 `crates/horizon-client-render/src/world.rs` (+5 -0) 📝 `crates/horizon-client/src/game/block_entity_anims.rs` (+12 -7) 📝 `crates/horizon-client/src/game/block_entity_ticks.rs` (+53 -0) 📝 `crates/horizon-client/src/game/piston_push.rs` (+63 -1) </details> ### 📄 Description > 🤖 Opened by readerkid's AI agent (opencode + DeepSeek V4.1 Flash), not by readerkid himself. ## What and why A shulker box's lid animated, but its collision shape never did: a closed box checked as a plain block and an open one kept the same 1×1×1 hitbox, so nothing could stand on the 1.5-high lid or be pushed by it as vanilla does. Fixes #4882. - `SceneCollisions` answers `shulker_collision_state` and `shulker_is_closed` from the level's boxes now (the copy-after-tick path moving pistons already use) instead of `None`. - The level ticks those lids in `tick_shulkers` on its server pass, so a single-player world grows the box; a remote world still only animates what the server sends. - An opening lid applies `moveCollidedEntities` to the bodies the game moves itself (`push_shulker_entities`), resolving the move as a piston's does. ## Kind - [x] parity: Horizon now does what vanilla 26.3 does ## Vanilla reference - `ShulkerBoxBlock.getCollisionShape` and `getShape`, through `ShulkerBoxBlockEntity.isClosed` (a closed box uses the block's shape, an opening one its grown box). - `ShulkerBoxBlockEntity.getBoundingBox` (`Shulker.getProgressDeltaAabb`) and `ShulkerBoxBlockEntity.moveCollidedEntities`. Harness: `python3 tools/parity.py block_entity_anim dynamic_support entity_move`. `block_entity_anim` already replays shulker box lid steps and the level calls a tick makes through `VanillaBlockEntityAnimOracle`; `dynamic_support` feeds `ShulkerCollisionState` progress pairs through the dynamic collision queries. ## Self-check `python3 tools/pr_ready.py --base origin/main` could not finish on this machine. The client's default-feature build needs ALSA and udev headers, which exist here only in a container, and the `horizon-client` test link exhausted this 15 GiB box's memory and killed the run. What did run, in that container where headers were needed: | Check | Result | | --- | --- | | Public tree | pass | | Python tests | pass (486) | | rustfmt | pass | | clippy (`-p horizon-client-render --all-targets -- -D warnings`) | pass | | `cargo test -p horizon-client-render` | pass (685 passed, 17 ignored) | | `cargo check -p horizon-client --no-default-features` | pass | | Harnesses | not run here: no `.local/minecraft`; CI runs them | CI's `verify` is the authority for the default-feature build and doc tests, and `parity` for the harnesses; I'll fix anything they report. ## Screenshots Not capturable from this checkout: it has no prepared `.local/` game resources, so the game cannot start here. The visible change is the lid's 1.5-block hitbox when a box opens, and the entity push as it opens. 🤖 Generated with [opencode](https://opencode.ai) (DeepSeek V4.1 Flash) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:15:53 +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#6207
No description provided.