Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-258163

ClientboundSectionBlocksUpdatePacket serialization breaks after 2^19 block states

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 23w03a
    • 1.19.2, 1.19.3 Pre-release 2, 1.19.3 Pre-release 3, 1.19.3 Release Candidate 1
    • None
    • Plausible
    • Networking

      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.

            panda4994 [Mojang] Panda
            Patbox Patbox
            Votes:
            5 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: