fix(server): move players to another dimension with execute in ... run tp

On a dedicated server, `execute in <dimension> run tp @s ...` from a player
moved them inside the level they were in. It now does what vanilla's
TeleportCommand does: ServerPlayer.teleport into the other level, with the
Respawn packet keeping all data and no portal sound, then the feedback. The
players there are tracked to them and they are removed from the ones they
left.

tools/test_server_dimension_players_parity.py joins two players to a vanilla
and a Horizon server and compares, step by step, the players each is sent and
loses and the dimensions it respawns into, while they go to the Nether and
the End by command and through an End portal. LocatorBarClient gains
`players on` and `still NAME` (the position reminder a still client sends).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Ludovic Marie
2026-10-18 02:14:03 +02:00
parent ce571f789c
commit 9a2d87ec97
9 changed files with 287 additions and 12 deletions
@@ -357,6 +357,7 @@ impl Game<'_> {
silent: false,
store: None,
elsewhere: false,
level: None,
block: Some(pos),
};
// performPrefixedCommand: a leading slash is allowed.