Moving through a nether portal, end portal or end gateway in Spectator mode and switching to a different game mode after moving out of the block acts as if the player is still inside the block and teleports them.
How to reproduce:
Execute one of the following commands:
/setblock ~ ~ ~2 minecraft:nether_portal
/setblock ~ ~ ~2 minecraft:end_portal
/setblock ~ ~ ~2 minecraft:end_gateway{exit_portal:[I;0,0,0]}
Switch to Spectator mode.
Fly through the block you placed.
Switch to Adventure, Creative or Survival mode.
→ ❌ You are teleported as if you were still inside the portal/gateway.
Expected result:
The player would not be teleported through a portal or gateway when not inside it.
Observed result:
The player is teleported through a portal or gateway when not inside it by moving through it in Spectator mode and switching to another game mode.
Linked issues
is duplicated by 8
Attachments
Comments 6
This bug also creates hug server lagspikes after switching the gamemode to smth else than spectator.
Can confirm in 1.21.4: video
@unknown, the report is already set to "Community Consensus", and 1.21.4 is already marked as affected. There is no need for another confirmation.
I had the same thing I went into spectator fly through the end portal moved out and changed back into creative mode and I got teleported to the end this is a strange bug
Can confirm.