The direct palette in the chunk data packet no longer writes anything to the packet buffer (instead of just writing a 0); this changed in 17w47a (the flattening). However, they still claim to have a serialized size of 1 byte. This means that the buffer allocated for the chunk data packet has between 1 and 16 extra bytes, one for the palette for each chunk section using the global palette.
In 1.12.2, what MCP calls BlockStatePaletteRegistry has this:
public void read(PacketBuffer buf) { buf.readVarInt(); } public void write(PacketBuffer buf) { buf.writeVarInt(0); } public int getSerializedSize() { return PacketBuffer.getVarIntSize(0); }
In the current 1.13 snapshots, it instead has this:
public void read(PacketBuffer buf) { } public void write(PacketBuffer buf) { } public int getSerializedSize() { return PacketBuffer.getVarIntSize(0); }
The return PacketBuffer.getVarIntSize(0) should be changed to return 0.
- relates to
-
MC-242385 Inconsistency on the buffer size calculation in the chunk packet data
- Resolved