[PR #2603] [MERGED] Give shulkers vanilla placement, push and look rules #4464

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

📋 Pull Request Information

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

Base: main ← Head: fix/shulker-teleport-and-look


📝 Commits (2)

  • 42ef865 Give shulkers vanilla placement, push and look rules
  • 40f8b96 Shulker canStayAt: only collidable entities block the shell

📊 Changes

6 files changed (+262 additions, -37 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+5 -0)
📝 crates/horizon-client/src/game/creatures.rs (+15 -0)
📝 crates/horizon-client/src/game/level_particles.rs (+6 -0)
📝 crates/horizon-client/src/mobs.rs (+6 -0)
📝 crates/horizon-client/src/mobs/control.rs (+17 -0)
📝 crates/horizon-client/src/mobs/shulker.rs (+213 -37)

📄 Description

🤖 Opened by socksprox's AI agent (Devin), not by socksprox himself.

What and why

A shulker used to check only that its cell was air and the support block
had a full collision box, which let it stay on or teleport to faces it
shouldn't (shulker-farm cells full of boxes or neighbours were happily
kept) and made it flip back to an upright face when its side wall no
longer had a full cube.

  • canStayAt now mirrors vanilla: a moving piston in the shell's own
    cell does not force a teleport, the support's face toward the shell
    must be sturdy, and the fully opened shell's box must be clear of
    blocks and entities.
  • teleportSomewhere checks the target cell with noCollision and
    refuses faces tagged minecraft:shulker_does_not_teleport_to, emits
    level event 2016 (whose particles now render), and force-syncs the
    position.
  • The shell easing toward its peek pushes collidable entities out of the
    swept box (onPeekAmountChange, MoverType.SHULKER) through a new
    MobEvent::Shift, so standing on a shulker lifts you.
  • ShulkerLookControl is ported: the head yaw is computed in the attach
    face's plane (LookKind::Shulker, look_yaw) instead of the generic
    world yaw, so wall- and ceiling-mounted shulkers turn their heads
    correctly.
  • hurtByTarget now ignores damage from other shulkers
    (toIgnoreDamage).

Adjacent fixes already open elsewhere: #2311 (still body), #2362
(peaceful), #2529 (head turn limits), #2528 (peek/face/colour sync).

Vanilla reference

Shulker.canStayAt, Shulker.teleportSomewhere,
Shulker.onPeekAmountChange, Shulker.ShulkerLookControl,
LevelEventHandler event 2016. No dedicated shulker harness exists.

Self-check

pr_ready (tools/pr_ready.py --quick on MacBookPro, against origin/main at aef652c8a, 4 min 46 s)

Check Result
Scope ✅ 8 files, +266 −38
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 320 passed (28 s)
rustfmt ✅ (12 s)
clippy ✅ (1 s)
tests: horizon-client ✅ 1337 passed (4 min 0 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 ➖ 291 affected, to run in CI (--quick)
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

🤖 Generated with Devin


🔄 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/2603 **Author:** [@socksprox](https://github.com/socksprox) **Created:** 10/27/2026 **Status:** ✅ Merged **Merged:** 10/27/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/shulker-teleport-and-look` --- ### 📝 Commits (2) - [`42ef865`](https://github.com/horizon-rust/horizon/commit/42ef865c344b8c7553313f285fbd880915ba8d68) Give shulkers vanilla placement, push and look rules - [`40f8b96`](https://github.com/horizon-rust/horizon/commit/40f8b9600d3f54a55d73b02151485664cffbdaed) Shulker canStayAt: only collidable entities block the shell ### 📊 Changes **6 files changed** (+262 additions, -37 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+5 -0) 📝 `crates/horizon-client/src/game/creatures.rs` (+15 -0) 📝 `crates/horizon-client/src/game/level_particles.rs` (+6 -0) 📝 `crates/horizon-client/src/mobs.rs` (+6 -0) 📝 `crates/horizon-client/src/mobs/control.rs` (+17 -0) 📝 `crates/horizon-client/src/mobs/shulker.rs` (+213 -37) </details> ### 📄 Description > 🤖 Opened by socksprox's AI agent (Devin), not by socksprox himself. ## What and why A shulker used to check only that its cell was air and the support block had a full collision box, which let it stay on or teleport to faces it shouldn't (shulker-farm cells full of boxes or neighbours were happily kept) and made it flip back to an upright face when its side wall no longer had a full cube. - `canStayAt` now mirrors vanilla: a moving piston in the shell's own cell does not force a teleport, the support's face toward the shell must be sturdy, and the fully opened shell's box must be clear of blocks and entities. - `teleportSomewhere` checks the target cell with `noCollision` and refuses faces tagged `minecraft:shulker_does_not_teleport_to`, emits level event 2016 (whose particles now render), and force-syncs the position. - The shell easing toward its peek pushes collidable entities out of the swept box (`onPeekAmountChange`, `MoverType.SHULKER`) through a new `MobEvent::Shift`, so standing on a shulker lifts you. - `ShulkerLookControl` is ported: the head yaw is computed in the attach face's plane (`LookKind::Shulker`, `look_yaw`) instead of the generic world yaw, so wall- and ceiling-mounted shulkers turn their heads correctly. - `hurtByTarget` now ignores damage from other shulkers (`toIgnoreDamage`). Adjacent fixes already open elsewhere: #2311 (still body), #2362 (peaceful), #2529 (head turn limits), #2528 (peek/face/colour sync). ## Vanilla reference `Shulker.canStayAt`, `Shulker.teleportSomewhere`, `Shulker.onPeekAmountChange`, `Shulker.ShulkerLookControl`, `LevelEventHandler` event 2016. No dedicated shulker harness exists. ## Self-check **pr_ready** (`tools/pr_ready.py --quick` on MacBookPro, against origin/main at aef652c8a, 4 min 46 s) | Check | Result | | --- | --- | | Scope | ✅ 8 files, +266 −38 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 320 passed (28 s) | | rustfmt | ✅ (12 s) | | clippy | ✅ (1 s) | | tests: horizon-client | ✅ 1337 passed (4 min 0 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 | ➖ 291 affected, to run in CI (--quick) | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | 🤖 Generated with [Devin](https://devin.ai) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:17:20 +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#4464
No description provided.