mojira.dev
MC-258163

ClientboundSectionBlocksUpdatePacket serialization breaks after 2^19 block states

The serialization of ClientboundSectionBlocksUpdatePacket works only for first 2^19 (524288) registered block states. Currently it mostly effects heavily modded game instances, however once vanilla achieves that blockstate count (for 1.19.3-pre2, it's 23232) it will be also affected.
The cause of the issue is code bitshifting on an int type instead of a long, likely an mistake caused by implicit casting to log.

Decompiler output. The bitshift operations are performed on int returned by getId, then casted to long as a method parameter. Code for deserializing data is correct.

[media]

Attachments

Comments 2

Please, make sure it is fixed in all places for all packets. For example, I'm getting also the same issue with "ClientboundBlockChangedAckPacket".

If this is happening with other packets, please create a new bug report (if we don't have one already).

Patbox

Panda4994

Plausible

Networking

1.19.2, 1.19.3 Pre-release 2, 1.19.3 Pre-release 3, 1.19.3 Release Candidate 1

23w03a

Retrieved