0x00 C00Handshake
The very first packet sent by the client. Initiates the connection and requests a protocol state transition.
Published 2026-06-18 · Updated 2026-10-14
Fields
| Field | Type | Description |
|---|---|---|
| protocolVersion | VarInt | Protocol version (47 for 1.8.9) |
| serverAddress | String (max 255) | Hostname the client connected to |
| serverPort | unsigned short | Port the client connected to |
| requestedState | VarInt | 1=STATUS, 2=LOGIN |
Wire Encoding
| Field | Type | Notes |
|---|---|---|
| Protocol Version | VarInt | 47 for 1.8.9 |
| Server Address | String | Hostname or IP |
| Server Port | unsigned short | Big-endian uint16 |
| Next State | VarInt | 1=Status, 2=Login |
MCP References
NetHandlerHandshakeTCP.processHandshake()NetHandlerHandshakeMemory.processHandshake()Handler Interface
INetHandlerHandshakeServerNotes
Vanilla Source
| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 | |
| 24 | |
| 25 | |
| 26 | |
| 27 | |
| 28 | |
| 29 | |
| 30 | |
| 31 | |
| 32 | |
| 33 | |
| 34 | |
| 35 | |
| 36 | |
| 37 | |
| 38 | |
| 39 | |
| 40 | |
| 41 | |
| 42 | |
| 43 | |
| 44 | |
| 45 | |
| 46 | |
| 47 | |
| 48 | |
| 49 | |
| 50 | |
| 51 | |
| 52 | |
| 53 | |
| 54 | |
| 55 | |
| 56 | |
| 57 | |
| 58 | |
| 59 | |
| 60 | |
| 61 | |
| 62 | |
| 63 | |
| 64 | |
| 65 | |
| 66 | |
| 67 | |
Deobfuscated MCP 1.8.9 source of C00Handshake, fetched directly from Marcelektro/MavenMCP-1.8.9 (net/minecraft/network/handshake/client/C00Handshake.java) at build time and verified present.
Deep Dive
Role in the protocol
The handshake is the first packet of every connection: a single serverbound C00PacketHandshake carrying the protocol version, the server address as a length-prefixed string, the destination port, and an int state (1 = status, 2 = login). It is sent exactly once, before any encryption, and its state field selects which protocol machine the server runs next. Nothing in the 8 reference clients constructs or intercepts it at runtime; the MCP code path that builds it lives in GuiConnecting.attemptHandshake and the integrated-server path skips it entirely.
Why clients do not touch it
grep of all 8 reference sources (Memeware 7.3, Nekoware v1 private, Rise 5.99, Rise 6.1.30, Rise 6.2.4, Sigma 4.11, Spicy, Tenacity 6.0) returns zero module references to C00PacketHandshake. The reasons are structural: it is sent once before the game world exists, so there is no per-tick module hook active; the vanilla client builds it from GuiConnecting state that modules never influence; and the server trusts its fields for routing only. The one place clients historically touch it is a server-list pinger spoofing protocol version 1 (or 0) to enumerate servers, which these 8 clients do not implement.
Vanilla handling
NetHandlerHandshakeTCP.processHandshake reads the state int. State 1 routes the connection to the status handler (NetHandlerStatusServer), state 2 to the login handler (NetHandlerLoginServer). Mojang's version of the packet also carries a second address string (the 'hostname the client thinks it is connecting to'), which proxies and BungeeCord-style setups use for server routing. The server compares the protocol version against its own and answers with a disconnect or LoginDisconnect if the client is too old or too new.
Exploit surface
Because the packet is unencrypted and fully client-controlled, its real abuse is server-side: protocol-version lying (clients claiming an older version than they speak), hostname injection for proxy routing, and state-flip confusion (sending state 1 then 2) which some anti-bot plugins used to fingerprint scanners. For a client cheat, the packet is a dead end: no timing, no per-tick value, no server-side math to abuse. This is why every one of the 8 clients leaves it to vanilla.
Server-Side Handling
NetHandlerHandshakeTCP.processHandshake validates the protocol version against the server's registered versions and selects the next state machine from the state int (1 = status, 2 = login). A mismatched version produces an immediate disconnect (S00PacketDisconnect in login state) or a protocol-error kick. The embedded hostname is used by proxy frontends to route the connection; vanilla singleplayer and most offline servers ignore it.
Protocol Analysis
Wire format: VarInt protocol version, String server address (VarInt length prefix), Unsigned Short port, VarInt next state. Sent over an unencrypted, uncompressed channel. The 1.8.9 protocol version is 47. After this packet the connection switches state machines, and the next serverbound packet must match the chosen state.
Anti-Cheat Landscape
Anti-cheats almost never inspect the handshake because it arrives before the play state and before any player entity exists. The relevant detection is proxy/ban management: plugins (AntiVPN, server-list bots) fingerprint scanners by protocol-version lies or by abnormal status-then-login sequences. None of the 8 clients participate in that game.
implementation Implementation Cases
The one-shot connection preamble: protocol version, hostname, port, and target state. None of the 8 reference clients touch it at runtime, because it is sent once before any module hook exists and carries no per-tick state to exploit.
anticheat Anti-Cheat Checks
The handshake is the first packet on the connection and arrives before any anticheat pipeline exists, so no check in the corpus runs on it. The corpus hits are keyword noise from the proxy and Bungee search terms: chat-component imports, proxy registries and config flags. The only real processing is at the packet-library level, where Artemis decodes GPacketHandshakeClientSetProtocol in ArtemisDecoder.handleHandshake and routes the next-state field into the player profile, and Negativity intercepts PacketType.Handshake.IS_SET_PROTOCOL in its channel inbound handler. Both are infrastructure that establishes protocol state, not checks.
Related Packets
Wiki Cross-Reference
The vanilla server does not use the Server Address or Server Port fields for anything; they exist for proxies and server routing, so address spoofing only matters on BungeeCord-style setups.
By convention a client pinging only to determine the server version should send protocol version -1 in the handshake.
The handshake should be sent immediately after opening the TCP connection or the server may disconnect, and servers should also still accept the legacy 0xFE server list ping which uses a nonstandard non-length-prefixed format.
MCP 1.8.9 C00Handshake implements Packet
1.8.9 callers: Minecraft.? sends new C00Handshake (line 2338) +4 more: https://github.com/Marcelektro/MavenMCP-1.8.9/blob/master/src/main/java/net/minecraft/client/Minecraft.java
Cross-checked against minecraft.wiki (CC BY-SA 3.0) for 1.8.9 accuracy.
Vanilla Internals
Full 1.8.9 logic-class sources that send or handle this packet, stored verbatim.