-
Bug
-
Resolution: Unresolved
-
None
-
1.19.3, 23w07a, 1.19.4 Pre-release 4, 1.19.4, 23w14a, 1.20.1, 1.20.6, 1.21
-
Community Consensus
-
Commands
-
Normal
-
Platform
The bug
When joining a world or switching dimensions while in spectator mode, the game will forget the last game mode you were in and will put you into spectator mode (The game mode you are already in) when using F3 + N or F3 + F4.
Expected result
You should be set to survival/creative/adventure (whatever your last game mode was) whenever you use F3 + N or F3 + F4.
To reproduce
Steps (1)
- Join a world.
- Set your game mode to spectator mode.
- Use the /execute command to teleport into the nether.
- Press F3 + N to attempt to switch back to your previous game mode.
Steps (2)
- Join a world.
- Set your game mode to spectator mode.
- Leave and rejoin the world.
- Press F3 + N to attempt to switch back to your previous game mode.
Steps (3)
- Join a world.
- /gamemode creative
- /gamemode spectator
- Press F3 + F4
- The game switches back to creative mode
- /kill or rejoin the world/server
- Press F3 + F4
- The game switches back to spectator mode
Code analysis
Code analysis by senseiwells can be found in MC-260836 (Yarn mappings).
ServerPlayerInteractionManager#changeGameMode (1.19.3):
ServerPlayerInteractionManager#changeGameMode (prior to 1.19.3):
The previous game mode being set in ServerPlayerInteractionManager#setGameMode is no longer being set to the existing gamemode but instead the previous one, meaning that this never changes - it is always null, unless the player had set their previous gamemode in a version prior to 1.19.3.
- is duplicated by
-
MC-260303 Game mode switcher and F3 + N bugs out after death
- Resolved
-
MC-260836 Previously Selected Gamemode Not Being Saved
- Resolved
-
MC-261645 When dying in specator mode F3 + N always cycles to Creative Mode even when the previous gamemode wasn't Creative
- Resolved
-
MC-262042 Gamemode switcher resets upon death
- Resolved
-
MC-264201 F3 + N switches to creative every time after dying and respawning in spectator gamemode.
- Resolved
-
MC-264849 F3 + N doesn't work initially when joining a world as spectator
- Resolved
-
MC-272070 Game mode switcher resets to default when switching dimensions
- Resolved
- relates to
-
MC-184277 Last game mode for game mode switcher and F3 + N is always survival after relogging
- Resolved