This section specifies the Minecraft Java Edition network protocol as shipped with Minecraft 26.1.2 (mcVersion=26.1.2 in PaperMC). Mojang dropped the 1.x.y versioning scheme; the version this spec targets is simply 26.1.2. It describes the wire format, every packet of every state, and the subsystems a server must implement to serve a vanilla client.
Start with the foundations, then move to the state-by-state packet listings, and finally the cross-cutting subsystems.
Every packet on the wire is framed as:
Packet ID + Payload. It does not include itself.Once the connection enters the compression mode (see Login), the framing changes:
Data Length is 0, the rest of the packet is uncompressed.Data Length is the uncompressed size, and the remainder is zlib-compressed.Encryption, when enabled, is applied as an outer AES/CFB8 layer over the framed bytes.