mirror of
https://github.com/GeyserMC/MCProtocolLib.git
synced 2025-01-05 20:21:59 -05:00
Change the type of ServerJoinGamePacket's gamemode to int
This commit is contained in:
parent
820da1d459
commit
f8ea987395
1 changed files with 2 additions and 2 deletions
|
@ -75,7 +75,7 @@ public class ServerJoinGamePacket implements Packet {
|
||||||
this.hardcore = (gamemode & 8) == 8;
|
this.hardcore = (gamemode & 8) == 8;
|
||||||
gamemode &= -9;
|
gamemode &= -9;
|
||||||
this.gamemode = MagicValues.key(GameMode.class, gamemode);
|
this.gamemode = MagicValues.key(GameMode.class, gamemode);
|
||||||
this.dimension = in.readByte();
|
this.dimension = in.readInt();
|
||||||
this.difficulty = MagicValues.key(Difficulty.class, in.readUnsignedByte());
|
this.difficulty = MagicValues.key(Difficulty.class, in.readUnsignedByte());
|
||||||
this.maxPlayers = in.readUnsignedByte();
|
this.maxPlayers = in.readUnsignedByte();
|
||||||
this.worldType = MagicValues.key(WorldType.class, in.readString().toLowerCase());
|
this.worldType = MagicValues.key(WorldType.class, in.readString().toLowerCase());
|
||||||
|
@ -91,7 +91,7 @@ public class ServerJoinGamePacket implements Packet {
|
||||||
}
|
}
|
||||||
|
|
||||||
out.writeByte(gamemode);
|
out.writeByte(gamemode);
|
||||||
out.writeByte(this.dimension);
|
out.writeInt(this.dimension);
|
||||||
out.writeByte(MagicValues.value(Integer.class, this.difficulty));
|
out.writeByte(MagicValues.value(Integer.class, this.difficulty));
|
||||||
out.writeByte(this.maxPlayers);
|
out.writeByte(this.maxPlayers);
|
||||||
out.writeString(MagicValues.value(String.class, this.worldType));
|
out.writeString(MagicValues.value(String.class, this.worldType));
|
||||||
|
|
Loading…
Reference in a new issue