---
title: Packets
description: Every packet mc-protocol can read and write, by connection state.
---

257 packets for Minecraft 26.2, generated from the packet definitions in `src/Core/Versions/776/Packets`. Every one has `read()` and `write()`.

| State | Packets | |
|---|---|---|
| [Handshake](/packets/handshake) | 2 | The first packet on a new socket. Nothing is sent back. |
| [Status](/packets/status) | 4 | Server list ping. The client closes the socket when done. |
| [Login](/packets/login) | 11 | Identity, optional encryption, and the compression threshold. |
| [Configuration](/packets/config) | 30 | Registries, tags, feature flags and resource packs before the world. |
| [Play](/packets/play) | 210 | Everything in the world: chunks, entities, chat, movement. |

## How to read these pages

- **Direction.** _Serverbound_ is client → server; _clientbound_ is server → client. A `Server` sends clientbound packets and receives serverbound ones. A `Client` does the reverse.
- **Names.** Pass the packet name to `client.sendPacket(name, data)` and listen with `client.on(name, handler)`. Names follow the vanilla server's class names, so `Intension` is the handshake and `Hello` is login start.
- **Aliases.** Some fields accept a second key when writing (for example `protocol` for `protocolVersion`). The alias column lists them.
- **State.** Sending a packet from the wrong state throws `Unknown packet: state/bound/name` before anything is written.
