Last player game mode not saved after player dies or the game is reloaded
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 Sensei 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.
Linked Issues
is duplicated by7
Created Issue:
Spectator does not remember your last game mode when starting in spectator and using f3+n.
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.
What should happen: You should be set to survival/creative/adventure (whatever your last game mode was) whenever you use f3+n.
How to reproduce (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.
How to reproduce (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.
Duplicate of
MC-193120.
is duplicated by
is duplicated by
Spectator does not remember your last game mode when starting in spectator and usingf3+n.Spectator does not remember your last game mode when starting in spectator and using F3 + N
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.
What should happen:You should be set to survival/creative/adventure (whatever your last game mode was) whenever you usef3+n.How to reproduce (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.
How to reproduce (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.
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
Spectator does not remember your last game mode when starting in spectator andusing F3 + NSpectator does not remember your last game mode when starting in spectator and changing the game mode
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 Sensei 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 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.
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 Sensei 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 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.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 Sensei 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 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.
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 Sensei 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.
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 Sensei 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.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 Sensei 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.
Spectator does not remember your last game mode when starting in spectator andchanging the game modeLast player game mode not saved after changing the game mode
Last player game mode not saved after changing the game modeLast player game mode not saved after changing it
Last player game mode not saved afterchanging itLast player game mode not saved after player dies or the game is reloaded
relates to
is duplicated by
is duplicated by
is duplicated by
is duplicated by
is duplicated by
Duplicate of MC-259571; I too can only reproduce it in one world, but not another. It appears to be caused by player NBT getting a wrong value, though no clue what causes it.
Duplicate of MC-259571; your report does have clear steps to reproduce and analysis though.
I'd suggest mods copy that over.
Thank you for your report!
We're tracking this issue in MC-259571, so this ticket is being resolved and linked as a duplicate.
If you would like to add a vote and any extra information to the main ticket it would be appreciated.
If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki
Dupe of MC-259571
Thank you for your report!
We're tracking this issue in MC-259571, so this ticket is being resolved and linked as a duplicate.
If you would like to add a vote and any extra information to the main ticket it would be appreciated.
If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki
Thank you for your report!
We're tracking this issue in MC-259571, so this ticket is being resolved and linked as a duplicate.
If you would like to add a vote and any extra information to the main ticket it would be appreciated.
If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki
Duplicate of MC-259571.
Thank you for your report!
We're tracking this issue in MC-259571, so this ticket is being resolved and linked as a duplicate.
If you would like to add a vote and any extra information to the main ticket it would be appreciated.
If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki
– I am a bot. This action was performed automatically! The ticket was resolved by one of our moderators, and I left this message to give more information to you.
Thank you for your report!
We're actually already tracking this issue in MC-259571, so this ticket is being resolved and linked as a duplicate.
If you would like to add a vote or any additional information to the main ticket it would be appreciated.
Please be sure to use the search feature before creating a ticket to see if the issue has already been reported.
Quick Links:
📗 Tracker Guidelines | 🛠 Community Support | 📧 Mojang Support | 🔑 Account Support | ✍️ Feedback Discord
Confirmed, previousPlayerGameType is set to the current game mode upon switching dimension, even if that game mode is spectator.
Edit: actually, that value never seems to change for me anymore... but still, confirmed in a specific world though.
Can confirm in 1.21
Confirmed in 1.21.3
As stated in the comments section here and in the comments section of the duplicate, there are worlds that are reproduced and worlds that are not reproduced. This bug is very troublesome. (Using a translator)
Confirmed in 1.21.4