[PR #7555] A heart-bound creaking refuses to use a portal #7666

Open
opened 2026-11-03 07:21:40 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/7555
Author: @MSedgeMC
Created: 11/2/2026
Status: 🔄 Open

Base: main ← Head: fix/creaking-portal


📝 Commits (6)

  • d94cfd2 fix: a heart-bound creaking refuses to use a portal
  • b5f6846 test: a heart-bound creaking does not use a portal
  • 88ab564 port_map: Creaking.canUsePortal is creaking::can_use_portal
  • 999e57b test: build the creaking from the sensor-scan fixture
  • 98524f1 test: ask the shared mob rule, not the creaking helper
  • 8f711a7 Format the creaking portal test

📊 Changes

4 files changed (+53 additions, -6 deletions)

View changed files

📝 crates/horizon-client/src/game/nether_portal.rs (+4 -5)
📝 crates/horizon-client/src/mobs.rs (+7 -0)
📝 crates/horizon-client/src/mobs/creaking.rs (+41 -0)
📝 tools/port_map/game2-003.tsv (+1 -1)

📄 Description

Vanilla

Creaking.canUsePortal(boolean) (26.3) returns false while the creaking is bound to a creaking heart — isHeartBound(), that is getHomePos() != null — and only otherwise defers to Monster.canUsePortal(boolean). A creaking that walked into a nether or end portal would leave the heart that keeps it alive behind, so vanilla refuses the portal.

What Horizon got wrong

Game::mob_can_use_portal (crates/horizon-client/src/game/nether_portal.rs) checked alive, riding nothing, the guest-ride rule and the wither, and nothing about the heart, so a heart-bound creaking travelled through a portal like any other monster. mobs/creaking.rs::heart_bound already existed for the damage rule; the portal rule just never asked it.

mobs/creaking.rs::can_use_portal is now that override, and mob_can_use_portal asks it last. The ledger row tools/port_map/game2-003.tsv:71 said missing; it now points at the port.

Proven: javap -p -c -constants -cp /tmp/cj net.minecraft.world.entity.monster.creaking.Creaking → canUsePortal(boolean): isHeartBound() → false, else super (Monster.canUsePortal). The new unit test pins both sides — an unbound creaking still travels, a creaking bound with set_transient is refused, and a zombie is unaffected.

Not proven: VM in cooldown, CI will run it — the test has not been run locally, and no in-game portal walk was driven.


🔄 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/7555 **Author:** [@MSedgeMC](https://github.com/MSedgeMC) **Created:** 11/2/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/creaking-portal` --- ### 📝 Commits (6) - [`d94cfd2`](https://github.com/horizon-rust/horizon/commit/d94cfd2c0f06724ce2b8519761012312ba18d360) fix: a heart-bound creaking refuses to use a portal - [`b5f6846`](https://github.com/horizon-rust/horizon/commit/b5f6846cb78349428a553709c9bbfc78a70f8453) test: a heart-bound creaking does not use a portal - [`88ab564`](https://github.com/horizon-rust/horizon/commit/88ab564aef5227237ee463ee3ade0f085dcb4947) port_map: Creaking.canUsePortal is creaking::can_use_portal - [`999e57b`](https://github.com/horizon-rust/horizon/commit/999e57ba5155c10f5ec0863c5183f3c862899e5a) test: build the creaking from the sensor-scan fixture - [`98524f1`](https://github.com/horizon-rust/horizon/commit/98524f1a147515d30bcac6a99b68b5356fcefdfe) test: ask the shared mob rule, not the creaking helper - [`8f711a7`](https://github.com/horizon-rust/horizon/commit/8f711a709004c989ae6dab4026fd09fbea1916df) Format the creaking portal test ### 📊 Changes **4 files changed** (+53 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/nether_portal.rs` (+4 -5) 📝 `crates/horizon-client/src/mobs.rs` (+7 -0) 📝 `crates/horizon-client/src/mobs/creaking.rs` (+41 -0) 📝 `tools/port_map/game2-003.tsv` (+1 -1) </details> ### 📄 Description ## Vanilla `Creaking.canUsePortal(boolean)` (26.3) returns `false` while the creaking is bound to a creaking heart — `isHeartBound()`, that is `getHomePos() != null` — and only otherwise defers to `Monster.canUsePortal(boolean)`. A creaking that walked into a nether or end portal would leave the heart that keeps it alive behind, so vanilla refuses the portal. ## What Horizon got wrong `Game::mob_can_use_portal` (`crates/horizon-client/src/game/nether_portal.rs`) checked alive, riding nothing, the guest-ride rule and the wither, and nothing about the heart, so a heart-bound creaking travelled through a portal like any other monster. `mobs/creaking.rs::heart_bound` already existed for the damage rule; the portal rule just never asked it. `mobs/creaking.rs::can_use_portal` is now that override, and `mob_can_use_portal` asks it last. The ledger row `tools/port_map/game2-003.tsv:71` said `missing`; it now points at the port. **Proven:** `javap -p -c -constants -cp /tmp/cj net.minecraft.world.entity.monster.creaking.Creaking` → `canUsePortal(boolean)`: `isHeartBound()` → `false`, else `super` (`Monster.canUsePortal`). The new unit test pins both sides — an unbound creaking still travels, a creaking bound with `set_transient` is refused, and a zombie is unaffected. **Not proven:** VM in cooldown, CI will run it — the test has not been run locally, and no in-game portal walk was driven. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
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#7666
No description provided.