mirror of
https://github.com/GeyserMC/MCProtocolLib.git
synced 2024-12-04 21:01:02 -05:00
gamemode2 is previousGamemode
This commit is contained in:
parent
ec957221a9
commit
f040b4ee71
2 changed files with 6 additions and 6 deletions
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue