mirror of
https://github.com/GeyserMC/MCProtocolLib.git
synced 2024-12-04 21:01:02 -05:00
Add workaround for if previous gamemode is set to 255
This commit is contained in:
parent
f9d0a142a0
commit
c614376c0c
1 changed files with 2 additions and 1 deletions
|
@ -48,7 +48,8 @@ public class ServerJoinGamePacket implements Packet {
|
|||
int gameMode = in.readUnsignedByte();
|
||||
this.hardcore = (gameMode & GAMEMODE_FLAG_HARDCORE) != 0;
|
||||
this.gameMode = MagicValues.key(GameMode.class, gameMode & GAMEMODE_MASK);
|
||||
this.previousGamemode = MagicValues.key(GameMode.class, in.readUnsignedByte());
|
||||
int previousGamemode = in.readUnsignedByte();
|
||||
this.previousGamemode = MagicValues.key(GameMode.class, previousGamemode != 255 ? previousGamemode : 0);
|
||||
this.worldCount = in.readVarInt();
|
||||
this.worldNames = new String[this.worldCount];
|
||||
for (int i = 0; i < this.worldCount; i++) {
|
||||
|
|
Loading…
Reference in a new issue