[PR #5679] [MERGED] Fix End portal travel for mobs and falling blocks #6433

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

📋 Pull Request Information

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

Base: main ← Head: fix/end-portal-entities


📝 Commits (5)

  • 48b3388 fix(portals): transfer mobs and falling blocks through End portals
  • b1d9448 Merge remote-tracking branch 'origin/main' into g/5679
  • 675fba8 Merge main into #5679; a native-spawned falling block starts with no portal state
  • 49e91c5 Merge #5875 into #5679: the harness's break and falling ops side by side
  • d635bc5 Merge remote-tracking branch 'origin/main' into HEAD

📊 Changes

12 files changed (+245 additions, -45 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+42 -21)
📝 crates/horizon-client/src/game/command_harness.rs (+28 -1)
📝 crates/horizon-client/src/game/falling_damage.rs (+13 -6)
📝 crates/horizon-client/src/game/levels.rs (+4 -0)
📝 crates/horizon-client/src/game/native_falling.rs (+1 -0)
📝 crates/horizon-client/src/game/nether_portal.rs (+58 -5)
📝 crates/horizon-client/src/game/persist.rs (+14 -4)
📝 crates/horizon-client/src/game/remote_projectiles.rs (+1 -0)
📝 mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCommandExecOracle.java (+28 -0)
📝 tools/command_exec_corpus.py (+43 -1)
📝 tools/port_map/game2-002.tsv (+1 -1)
📝 tools/test_command_exec_parity.py (+12 -6)

📄 Description

🤖 Opened by TiggerTakkyTTT's AI agent (Codex, GPT-6), not by TiggerTakkyTTT personally.

What and why

Fixes #5664.

Mobs could remain in an End portal when another dimension was ticking: one level's portal pass pruned the portal state belonging to entities in the other level. Keep that state with each level when swapping dimensions.

Falling blocks never handled portal travel. Process their portal after movement and impact damage, before landing can place or discard them. Preserve their saved data, gravity flag and portal cooldown, including vanilla's final source-side placement/drop branch when crossing the End.

A placed dragon egg directly above an End portal remains suspended in vanilla too: FallingBlock.isFree(end_portal) is false, despite the empty collision shape. This change fixes travelling entities while retaining that placed-block behaviour.

Add seven regression observations covering a mob leaving the End while two levels tick, sand crossing the portal on its landing tick and placing at world spawn, a no-gravity gravel entity transferring between the actual level entity lists, and the suspended placed egg. The direct falling-block probe avoids Horizon's separate command-selector gap for physical falling blocks. The command runner now uses its integrated server rather than forcing the deprecated in-frame flag, and accepts an existing game binary for local verification.

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

  • EndPortalBlock.entityInside / getPortalDestination and Entity.handlePortal: contact, entity-owned portal state and destination.
  • FallingBlockEntity.tick / teleport: block effects, portal handling before landing, and forceTickAfterTeleportToDuplicate for End travel.
  • FallingBlockEntity.causeFallDamage: impact and anvil wear during movement, before block effects and transfer.
  • Entity saved portal cooldown and gravity state; FallingBlock.isFree for the placed egg.

The local Minecraft 26.3 jars and libraries were checksum-verified. tools/test_command_exec_parity.py --binary target/debug/horizon-client passed 986/986 observations against the real vanilla server, including all 7/7 new End-portal observations and the existing Nether/dimension travel cases. Horizon ran its integrated server with a connected headless client in isolated test homes.

Other projects' code

None.

Self-check

pr_ready (tools/pr_ready.py --quick --base upstream/main, against upstream/main at 690a1a451, 18 min 51 s)

Check Result
Scope ✅ 14 files, +272 −46
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 511 passed (2 min 23 s)
rustfmt ✅ (27 s)
clippy ✅ (2 min 22 s)
tests: horizon-client ✅ 1604 passed (13 min 35 s)
doc tests ✅ 0 passed (3 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 ➖ not run (--quick): CI's parity job picks the affected harnesses
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

The self-check scope includes two pre-existing untracked text files, excluded from this twelve-file commit. The full command-execution vanilla comparison ran separately and passed 986/986 observations. The port-ledger check completed and the impact-method mapping was updated.


🔄 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/5679 **Author:** [@TiggerTakkyTTT](https://github.com/TiggerTakkyTTT) **Created:** 11/1/2026 **Status:** ✅ Merged **Merged:** 11/1/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/end-portal-entities` --- ### 📝 Commits (5) - [`48b3388`](https://github.com/horizon-rust/horizon/commit/48b338836f006c306ecc59d802decfd6aaa6f89c) fix(portals): transfer mobs and falling blocks through End portals - [`b1d9448`](https://github.com/horizon-rust/horizon/commit/b1d944801862dfcf3c5a054bb8edb9d1527e6a83) Merge remote-tracking branch 'origin/main' into g/5679 - [`675fba8`](https://github.com/horizon-rust/horizon/commit/675fba85db43ad557c2b1e5b3a237bd6e346bfdd) Merge main into #5679; a native-spawned falling block starts with no portal state - [`49e91c5`](https://github.com/horizon-rust/horizon/commit/49e91c58c240e0bad5033a0b31d90df667c29f45) Merge #5875 into #5679: the harness's break and falling ops side by side - [`d635bc5`](https://github.com/horizon-rust/horizon/commit/d635bc57f9b0ff95f9944ea72b292b769761295e) Merge remote-tracking branch 'origin/main' into HEAD ### 📊 Changes **12 files changed** (+245 additions, -45 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+42 -21) 📝 `crates/horizon-client/src/game/command_harness.rs` (+28 -1) 📝 `crates/horizon-client/src/game/falling_damage.rs` (+13 -6) 📝 `crates/horizon-client/src/game/levels.rs` (+4 -0) 📝 `crates/horizon-client/src/game/native_falling.rs` (+1 -0) 📝 `crates/horizon-client/src/game/nether_portal.rs` (+58 -5) 📝 `crates/horizon-client/src/game/persist.rs` (+14 -4) 📝 `crates/horizon-client/src/game/remote_projectiles.rs` (+1 -0) 📝 `mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCommandExecOracle.java` (+28 -0) 📝 `tools/command_exec_corpus.py` (+43 -1) 📝 `tools/port_map/game2-002.tsv` (+1 -1) 📝 `tools/test_command_exec_parity.py` (+12 -6) </details> ### 📄 Description > 🤖 Opened by TiggerTakkyTTT's AI agent (Codex, GPT-6), not by TiggerTakkyTTT personally. ## What and why Fixes #5664. Mobs could remain in an End portal when another dimension was ticking: one level's portal pass pruned the portal state belonging to entities in the other level. Keep that state with each level when swapping dimensions. Falling blocks never handled portal travel. Process their portal after movement and impact damage, before landing can place or discard them. Preserve their saved data, gravity flag and portal cooldown, including vanilla's final source-side placement/drop branch when crossing the End. A placed dragon egg directly above an End portal remains suspended in vanilla too: `FallingBlock.isFree(end_portal)` is false, despite the empty collision shape. This change fixes travelling entities while retaining that placed-block behaviour. Add seven regression observations covering a mob leaving the End while two levels tick, sand crossing the portal on its landing tick and placing at world spawn, a no-gravity gravel entity transferring between the actual level entity lists, and the suspended placed egg. The direct falling-block probe avoids Horizon's separate command-selector gap for physical falling blocks. The command runner now uses its integrated server rather than forcing the deprecated in-frame flag, and accepts an existing game binary for local verification. ## 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 - `EndPortalBlock.entityInside` / `getPortalDestination` and `Entity.handlePortal`: contact, entity-owned portal state and destination. - `FallingBlockEntity.tick` / `teleport`: block effects, portal handling before landing, and `forceTickAfterTeleportToDuplicate` for End travel. - `FallingBlockEntity.causeFallDamage`: impact and anvil wear during movement, before block effects and transfer. - `Entity` saved portal cooldown and gravity state; `FallingBlock.isFree` for the placed egg. The local Minecraft 26.3 jars and libraries were checksum-verified. `tools/test_command_exec_parity.py --binary target/debug/horizon-client` passed **986/986** observations against the real vanilla server, including all **7/7** new End-portal observations and the existing Nether/dimension travel cases. Horizon ran its integrated server with a connected headless client in isolated test homes. ## Other projects' code None. ## Self-check **pr_ready** (`tools/pr_ready.py --quick --base upstream/main`, against upstream/main at 690a1a451, 18 min 51 s) | Check | Result | | --- | --- | | Scope | ✅ 14 files, +272 −46 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 511 passed (2 min 23 s) | | rustfmt | ✅ (27 s) | | clippy | ✅ (2 min 22 s) | | tests: horizon-client | ✅ 1604 passed (13 min 35 s) | | doc tests | ✅ 0 passed (3 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 | ➖ not run (--quick): CI's parity job picks the affected harnesses | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | The self-check scope includes two pre-existing untracked text files, excluded from this twelve-file commit. The full command-execution vanilla comparison ran separately and passed 986/986 observations. The port-ledger check completed and the impact-method mapping was updated. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:20:32 +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#6433
No description provided.