From 319c7fcaee27a70ac847e55c7f04147df648b476 Mon Sep 17 00:00:00 2001 From: Ludovic Marie <136255825+ludovic111@users.noreply.github.com> Date: Sun, 25 Oct 2026 14:58:51 +0100 Subject: [PATCH] A server's client shows the nether portal effect NetherPortalBlock.entityInside runs on the client's own level too: its setAsInsidePortal drives LocalPlayer.handlePortalTransitionEffect (the purple overlay, block.portal.trigger). The remote motion loop dropped MotionEvent::InsidePortal, so single player on the server thread, LAN guests and dedicated servers' players went through portals without it. Co-Authored-By: Claude Opus 5.5 --- crates/horizon-client/src/game/nether_portal.rs | 12 ++++++++++++ crates/horizon-client/src/game/remote.rs | 6 ++++++ 2 files changed, 18 insertions(+) diff --git a/crates/horizon-client/src/game/nether_portal.rs b/crates/horizon-client/src/game/nether_portal.rs index a30cf822a..353ad216c 100644 --- a/crates/horizon-client/src/game/nether_portal.rs +++ b/crates/horizon-client/src/game/nether_portal.rs @@ -270,6 +270,18 @@ impl Game<'_> { self.portals.player.set_inside(pos, PLAYER_DELAY); self.portals.client_inside = true; } + /// The same on a server's client: `Entity.canUsePortal` (alive, not a + /// passenger), then only the client's `setAsInsidePortal`, which drives + /// the confusion effect (`client_portal_effect`). + pub(super) fn client_inside_nether_portal(&mut self) { + let alive = self + .player + .as_ref() + .is_some_and(|p| !p.health.dead_or_dying()); + if alive && self.riding.is_none() { + self.portals.client_inside = true; + } + } /// `ServerPlayer.handlePortal` (not while changing dimension: there is no /// player then). Players wait `players_nether_portal_default_delay` /// ticks, or the creative delay with invulnerable abilities. diff --git a/crates/horizon-client/src/game/remote.rs b/crates/horizon-client/src/game/remote.rs index 044e43835..c3fc23535 100644 --- a/crates/horizon-client/src/game/remote.rs +++ b/crates/horizon-client/src/game/remote.rs @@ -3318,6 +3318,12 @@ impl Game<'_> { self.audio .play("minecraft:entity.player.swim", Some(feet), volume, pitch); } + // NetherPortalBlock.entityInside on the client's own level: + // the portal overlay and its trigger sound (the server moves + // the player). + horizon_client::motion::MotionEvent::InsidePortal { .. } => { + self.client_inside_nether_portal(); + } _ => {} } }