Minecraft 1.8.9
Packet Reference

Complete documentation of all 105 packets across 4 protocol states with fields, wire encoding, MCP class references, and real-world implementation cases mined from 10 reference client codebases.

Browse All Packets →

How the Minecraft Protocol Works

Minecraft Java Edition communicates between client and server using TCP packets serialized through Netty. Every packet is an instance of net.minecraft.network.Packet and carries structured binary data (VarInts, strings, positions, item stacks, NBT compounds) written into a PacketBuffer (Netty's ByteBuf wrapper).

The protocol is divided into four states (EnumConnectionState), each with its own packet ID registry and direction (EnumPacketDirection.SERVERBOUND / CLIENTBOUND):

Protocol States

Handshaking

1 packet. The very first packet sent by the client. Contains protocol version (47 for 1.8.9), server address, port, and the requested next state (1=Status, 2=Login). C00Handshake. Serverbound only.

Status

4 packets. Used by the server list ping screen. Client sends server query request → server responds with JSON MOTD/players/favicon. Then client pings with a timestamp → server echoes it back. Fully stateless.

Login

6 packets. Authentication flow. Client sends username → server sends encryption request with public key → client responds with encrypted shared secret → server confirms login success and optionally enables zlib compression.

Play

94 packets. The main game state. Everything happens here: movement, chat, combat, inventory, world loading, entity management, scoreboards, plugin messages. 23 serverbound (client→server) + 71 clientbound (server→client).

Packet Class Structure (MCP)

In MCP (Minecraft Coder Pack) deobfuscated source, packet classes follow a strict naming convention:

  • Serverbound play: net.minecraft.network.play.client.CNNPacketName: e.g. C00PacketKeepAlive, C03PacketPlayer
  • Clientbound play: net.minecraft.network.play.server.SNNPacketName: e.g. S08PacketPlayerPosLook, S02PacketChat
  • Login/Status/Handshake: similarly under login.client, login.server, status.client, etc.
  • The hex ID (0x00–0x49) is assigned by registration order in EnumConnectionState. Packets are registered per-direction within each state.

Each packet class has a readPacketData(PacketBuffer) method for deserialization and writePacketData(PacketBuffer) for serialization. A paired handler interface (e.g. INetHandlerPlayServer for serverbound, INetHandlerPlayClient for clientbound) defines a processPacketName(Packet) method that the server/client calls when the packet arrives.

Wire Encoding

Minecraft uses several custom wire types beyond standard Java primitives:

  • VarInt / VarLong: Variable-length integer encoding. Smaller numbers use fewer bytes. Used for packet IDs, entity IDs, array lengths.
  • String: Length-prefixed with a VarInt, encoded in UTF-8. Max 32767 chars in most cases.
  • Position (BlockPos): Packed into a single 64-bit long: ((x & 0x3FFFFFF) << 38) | ((y & 0xFFF) << 26) | (z & 0x3FFFFFF).
  • Fixed-point coordinates: Entity positions are sent as floor(value * 32) for blocks or floor(value * 8000) for velocity. Divided back on the receiving side.
  • Angle encoding: Yaw/pitch are compressed to single bytes: floor(angle * 256 / 360).
  • ItemStack (Slot): Serialized as: block/item ID (short), count (byte), damage (short), optional NBT tag compound.
  • Chat Component (IChatComponent): JSON-serialized tree of ChatComponentText, ChatComponentTranslation, ChatComponentStyle, etc.
  • DataWatcher (Metadata): Stream of type-prefixed key-value pairs for entity state. Each entry has a type byte and value.
New! Module Analysis Full source code walkthroughs with packet-level annotations Browse Analyses →
New! Vanilla Internals Full MCP 1.8.9 sources that send and handle packets, with deep analysis Browse Classes →
New! Minecraft 1.8.9 Source & Code Graph The whole deobfuscated codebase: 1,612 classes, every resource asset, plus an interactive dependency graph Browse Source →
Index Cheat Modules Every module implementation mapped to the packets it sends and intercepts Browse Modules →

All Packets static index: works without JavaScript

Handshaking

Play → Client

Frequently Asked Questions

Which Minecraft versions does this reference cover?

Minecraft Java Edition 1.8.9, protocol version 47. Every packet page lists its hex ID, direction, protocol state, MCP class path, fields, and wire encoding for that version.

What is MCP, and what do packet names like C03PacketPlayer mean?

MCP (Minecraft Coder Pack) provides deobfuscated class names. A C prefix means serverbound (client to server), S means clientbound (server to client); the number is the packet ID. Classes live under net/minecraft/network/play, login, status, and handshake.

How do I read a packet on the wire?

Each packet is a length-prefixed VarInt, followed by the packet ID as a VarInt, followed by the payload. The meaning of an ID depends on the connection state: handshaking, status, login, or play. This site lists every packet per state with field types.

Which packet carries player movement?

The C03PacketPlayer family (C04 position, C05 look, C06 both), sent by the client every tick. The server answers corrections with S08PacketPlayerPosLook.

Where does the source code on this site come from?

Deobfuscated MCP 1.8.9 sources, cross-checked against minecraft.wiki, plus implementation cases mined from 10 reference clients. Each packet page links its vanilla source file.