Mojira Archive
MC-260836

Previously Selected Gamemode Not Being Saved

The player's previous gamemode is not saved correctly on the server.

Expected behaviour (behaviour in versions prior to 1.19.3):

  • /gamemode creative
  • /gamemode spectator
  • Press f3 + f4 (switches back to creative)
  • /kill or rejoin the world/server
  • Press f3 + f4 (switches back to spectator)

Observed behaviour (1.19.3+):

  • /gamemode creative
  • /gamemode spectator
  • Press f3 + f4 (switches back to creative)
  • /kill or rejoin the world/server
  • Press f3 + f4 (switches to survival)

Code analysis (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.

Duplicate

Sensei

2023-03-08, 09:18 PM

2023-03-08, 10:13 PM

2023-03-08, 10:13 PM

0

1

Unconfirmed

(Unassigned)

1.19.3, 1.19.4 Pre-release 4

-