[PR #1809] [MERGED] A server's client shows the nether portal effect #3780

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/1809
Author: @ludovic111
Created: 10/25/2026
Status: ✅ Merged
Merged: 10/26/2026
Merged by: @ludovic111

Base: main ← Head: fix/portal-effect-on-server-clients


📝 Commits (2)

  • 319c7fc A server's client shows the nether portal effect
  • 0958cb2 Merge origin/main into fix/portal-effect-on-server-clients

📊 Changes

2 files changed (+18 additions, -0 deletions)

View changed files

📝 crates/horizon-client/src/game/nether_portal.rs (+12 -0)
📝 crates/horizon-client/src/game/remote.rs (+6 -0)

📄 Description

🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself.

What the player reported

.dezerx on Discord (#horizon-bugs, 2026-10-25, single player): "No purple animation when entering nether portal".

Vanilla rule

NetherPortalBlock.entityInside also runs on the client's own level: Entity.canUsePortal(false) (alive, not a passenger) → setAsInsidePortal. LocalPlayer.handlePortalTransitionEffect then grows the portal overlay (Gui.renderPortalOverlay), closes screens other than chat and death, and plays block.portal.trigger when the effect starts. The server does the travel.

Cause

On a server's client (single player on the server thread since #1514, LAN guests, dedicated servers' players) the remote motion loop (remote.rs) dropped MotionEvent::InsidePortal, so portals.client_inside never went up: the player went through with only the portal particles. In-frame had it (game.rs's own motion events).

Change

The remote motion loop forwards InsidePortal to client_inside_nether_portal (nether_portal.rs): alive and not riding → the client effect only.

Tested

  • Server thread, survival, standing in a lit portal for 2 s: main shows only the particles; with this branch the purple portal overlay covers the screen, and the player still reaches the Nether after the 80-tick wait (state: minecraft:the_nether).
  • --in-frame is unchanged (its own path). LAN guests and dedicated servers use the same remote code.

pr_ready (tools/pr_ready.py --quick on ludovics-mac-mini, against origin/main at 6a065fa48, 3 min 30 s)

Check Result
Scope ✅ 2 files, +18 −0
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ➖ no Python change
rustfmt ✅ (5 s)
clippy ✅ (6 s)
tests: horizon-client ✅ 1236 passed (3 min 4 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 ➖ 27 affected, to run in CI (--quick): arrow, block_removal, command_exec, composter, crafter, dedicated_server, dispenser, interaction_input, locator_bar, mace, online_mode, player_sync and 15 more
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

Named harness (local): nether_portal PASS.

🤖 Generated with Claude Code


🔄 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/1809 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/25/2026 **Status:** ✅ Merged **Merged:** 10/26/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/portal-effect-on-server-clients` --- ### 📝 Commits (2) - [`319c7fc`](https://github.com/horizon-rust/horizon/commit/319c7fcaee27a70ac847e55c7f04147df648b476) A server's client shows the nether portal effect - [`0958cb2`](https://github.com/horizon-rust/horizon/commit/0958cb297a2d7081274c2553fb20a6718748a118) Merge origin/main into fix/portal-effect-on-server-clients ### 📊 Changes **2 files changed** (+18 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/nether_portal.rs` (+12 -0) 📝 `crates/horizon-client/src/game/remote.rs` (+6 -0) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. ## What the player reported .dezerx on Discord (#horizon-bugs, 2026-10-25, single player): "No purple animation when entering nether portal". ## Vanilla rule `NetherPortalBlock.entityInside` also runs on the client's own level: `Entity.canUsePortal(false)` (alive, not a passenger) → `setAsInsidePortal`. `LocalPlayer.handlePortalTransitionEffect` then grows the portal overlay (`Gui.renderPortalOverlay`), closes screens other than chat and death, and plays `block.portal.trigger` when the effect starts. The server does the travel. ## Cause On a server's client (single player on the server thread since #1514, LAN guests, dedicated servers' players) the remote motion loop (`remote.rs`) dropped `MotionEvent::InsidePortal`, so `portals.client_inside` never went up: the player went through with only the portal particles. In-frame had it (game.rs's own motion events). ## Change The remote motion loop forwards `InsidePortal` to `client_inside_nether_portal` (nether_portal.rs): alive and not riding → the client effect only. ## Tested - Server thread, survival, standing in a lit portal for 2 s: main shows only the particles; with this branch the purple portal overlay covers the screen, and the player still reaches the Nether after the 80-tick wait (`state`: `minecraft:the_nether`). - `--in-frame` is unchanged (its own path). LAN guests and dedicated servers use the same remote code. **pr_ready** (`tools/pr_ready.py --quick` on ludovics-mac-mini, against origin/main at 6a065fa48, 3 min 30 s) | Check | Result | | --- | --- | | Scope | ✅ 2 files, +18 −0 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ➖ no Python change | | rustfmt | ✅ (5 s) | | clippy | ✅ (6 s) | | tests: horizon-client | ✅ 1236 passed (3 min 4 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 | ➖ 27 affected, to run in CI (--quick): arrow, block_removal, command_exec, composter, crafter, dedicated_server, dispenser, interaction_input, locator_bar, mace, online_mode, player_sync and 15 more | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | Named harness (local): nether_portal PASS. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:12:16 +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#3780
No description provided.