Server players go through End gateways

handle_server_portal ignored End gateways, so on a server (dedicated, or
single player's server thread) no player could use one: the in-frame game's
gateway code moved only its own player.

A gateway that is not cooling down now takes a server player at once
(EndGatewayBlock.entityInside, triggerCooldown, setAsInsidePortal), within
the End, keeping its motion and look (Relative.DELTA and ROTATION). An exact
exit is reached straight away; otherwise the player waits at the destination
while it loads, and the exit is found or built there (the in-frame
resolve_gateway, shared through gateway_job).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Ludovic Marie
2026-10-22 12:51:16 +02:00
parent 9fe228cd1e
commit 86fdc72069
5 changed files with 117 additions and 22 deletions
+2 -2
View File
@@ -17,7 +17,7 @@ the other dimensions' levels as `Parked` values and swaps one into place (`enter
| `MinecraftServer.levels` | the level in place plus `Levels::parked` |
| `MinecraftServer.tickChildren`, every level | `tick_server`: each level with a player in it, in Overworld, Nether, End order. The first pass reads the network and runs the shared parts (clock, weather, functions, autosave). |
| `ServerLevel.players` | `Hub::here`: the guests whose `dimension` is the level in place |
| `ServerPlayer.teleport` into another level | `server_travel.rs`: a Respawn packet, then the teleport once the destination has loaded (portals and `execute in … tp`) |
| `ServerPlayer.teleport` into another level | `server_travel.rs`: a Respawn packet, then the teleport once the destination has loaded (portals and `execute in … tp`). An End gateway teleports within the End. |
| `PlayerList.respawn` | `guest_respawn`: back into the Overworld's level |
| `ServerLevel.noPlayersEmptyTime`, chunk unloading | `close_idle_levels`: a level other than the Overworld with nobody in it for 300 ticks is saved and closed |
| `CommandSourceStack.getLevel` | `with_source` puts the source's level in place for a command (`execute in`, `execute at` a player in another level) |
@@ -78,7 +78,7 @@ the Nether, or whose host saves and quits, joins again in the Nether where it wa
- The guest leaves in the Nether and joins again there.
- The guest dies in the Nether and respawns in the Overworld.
- The host takes a Nether portal alone.
- The guest takes an End portal and then the exit portal alone.
- The guest takes an End portal, an End gateway and then the exit portal alone.
- The host saves, quits and opens the world again with the guest in the Nether, and the guest
joins again there.