ClientCloseWindowPacket window id is a byte, not a var int

This commit is contained in:
TheMode 2021-04-14 02:00:19 +02:00
parent b68c30423c
commit 7d574317dc

View File

@ -7,15 +7,15 @@ import org.jetbrains.annotations.NotNull;
public class ClientCloseWindowPacket extends ClientPlayPacket { public class ClientCloseWindowPacket extends ClientPlayPacket {
public int windowId; public byte windowId;
@Override @Override
public void read(@NotNull BinaryReader reader) { public void read(@NotNull BinaryReader reader) {
this.windowId = reader.readVarInt(); this.windowId = reader.readByte();
} }
@Override @Override
public void write(@NotNull BinaryWriter writer) { public void write(@NotNull BinaryWriter writer) {
writer.writeVarInt(windowId); writer.writeByte(windowId);
} }
} }