diff --git a/src/main/java/com/github/steveice10/mc/protocol/packet/ingame/server/ServerJoinGamePacket.java b/src/main/java/com/github/steveice10/mc/protocol/packet/ingame/server/ServerJoinGamePacket.java index 1cef9d78..c15ded79 100644 --- a/src/main/java/com/github/steveice10/mc/protocol/packet/ingame/server/ServerJoinGamePacket.java +++ b/src/main/java/com/github/steveice10/mc/protocol/packet/ingame/server/ServerJoinGamePacket.java @@ -27,7 +27,7 @@ public class ServerJoinGamePacket implements Packet { private int entityId; private boolean hardcore; private @NonNull GameMode gameMode; - private @NonNull GameMode gameMode2; + private @NonNull GameMode previousGamemode; private int worldCount; private String[] worldNames; private @NonNull CompoundTag dimensionCodec; @@ -48,7 +48,7 @@ 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.gameMode2 = MagicValues.key(GameMode.class, in.readUnsignedByte()); + this.previousGamemode = MagicValues.key(GameMode.class, in.readUnsignedByte()); this.worldCount = in.readVarInt(); this.worldNames = new String[this.worldCount]; for (int i = 0; i < this.worldCount; i++) { @@ -76,7 +76,7 @@ public class ServerJoinGamePacket implements Packet { } out.writeByte(gameMode); - out.writeByte(MagicValues.value(Integer.class, this.gameMode2)); + out.writeByte(MagicValues.value(Integer.class, this.previousGamemode)); out.writeVarInt(this.worldCount); for (String worldName : this.worldNames) { out.writeString(worldName); diff --git a/src/main/java/com/github/steveice10/mc/protocol/packet/ingame/server/ServerRespawnPacket.java b/src/main/java/com/github/steveice10/mc/protocol/packet/ingame/server/ServerRespawnPacket.java index 1548cd90..cc651b5c 100644 --- a/src/main/java/com/github/steveice10/mc/protocol/packet/ingame/server/ServerRespawnPacket.java +++ b/src/main/java/com/github/steveice10/mc/protocol/packet/ingame/server/ServerRespawnPacket.java @@ -23,7 +23,7 @@ public class ServerRespawnPacket implements Packet { private String worldName; private long hashedSeed; private @NonNull GameMode gamemode; - private @NonNull GameMode gamemode2; + private @NonNull GameMode previousGamemode; private boolean debug; private boolean flat; private boolean copyMetadata; @@ -34,7 +34,7 @@ public class ServerRespawnPacket implements Packet { this.worldName = in.readString(); this.hashedSeed = in.readLong(); this.gamemode = MagicValues.key(GameMode.class, in.readUnsignedByte()); - this.gamemode2 = MagicValues.key(GameMode.class, in.readUnsignedByte()); + this.previousGamemode = MagicValues.key(GameMode.class, in.readUnsignedByte()); this.debug = in.readBoolean(); this.flat = in.readBoolean(); this.copyMetadata = in.readBoolean(); @@ -46,7 +46,7 @@ public class ServerRespawnPacket implements Packet { out.writeString(this.worldName); out.writeLong(this.hashedSeed); out.writeByte(MagicValues.value(Integer.class, this.gamemode)); - out.writeByte(MagicValues.value(Integer.class, this.gamemode2)); + out.writeByte(MagicValues.value(Integer.class, this.previousGamemode)); out.writeBoolean(this.debug); out.writeBoolean(this.flat); out.writeBoolean(this.copyMetadata);