Packets
Packets can be described as messages that go between the client and server. These typically consist of the packet id and the data the specified packet holds.
In total there are 57 packets.
36Clientbound (S->C)7Serverbound (C->S)14Bidirectional (C<->S)
This page offers a few different ways to sort the packets, to make finding the relevant one easier.
- Information direction
- Categorized
- Numerical (same as sidebar)
Information direction
Sorted by which way information travels, at least in practice. All packets have the ability to be serialized and deseralized by both the client and server, but often only one or the other is used, depending on the packet.
Both (C<->S)
Packets that are sent by either the client or server.
- 0x00: Keep Alive
- 0x01: Login
- 0x02: Pre-Login
- 0x03: Chat Message
- 0x09: Respawn
- 0x0A: Player Movement
- 0x0B: Player Position
- 0x0C: Player Rotation
- 0x0D: Player Position and Rotation
- 0x12: Animation
- 0x65: Close Container
- 0x6A: Container Transaction
- 0x82: Update Sign
- 0xFF: Disconnect
Serverbound (C->S)
Packets that are only sent by the client.
- 0x07: Interact with Entity
- 0x0E: Mine Block
- 0x0F: Place Block
- 0x10: Set Hotbar Slot
- 0x13: Player Action
- 0x1B: Player Input (unused)
- 0x66: Click Slot
Clientbound (S->C)
Packets that are only sent by the server.
- 0x04: Set Time
- 0x05: Set Equipment
- 0x06: Set Spawn Position
- 0x08: Set Health
- 0x11: Interact with Block
- 0x14: Spawn Player
- 0x15: Spawn Item
- 0x16: Collect Item
- 0x17: Spawn Object
- 0x18: Spawn Mob
- 0x19: Spawn Painting
- 0x1C: Entity Velocity
- 0x1D: Despawn Entity
- 0x1E: Entity Movement (unused)
- 0x1F: Entity Position
- 0x20: Entity Rotation
- 0x21: Entity Position and Rotation
- 0x22: Teleport Entity
- 0x26: Entity Event
- 0x27: Add Passenger
- 0x28: Entity Metadata
- 0x32: Set Chunk Visibility
- 0x33: Chunk
- 0x34: Set Multiple Blocks
- 0x35: Set Block
- 0x36: Block Event
- 0x3C: Explosion
- 0x3D: World Event
- 0x46: Game Event
- 0x47: Lightning Bolt
- 0x64: Open Container
- 0x67: Set Slot
- 0x68: Fill Container
- 0x69: Container Data
- 0x83: Item Data
- 0xC8: Increment Statistic
Categorized
This is a rather arbitrary way to put the packets together, but it simplifies finding related ones
Connection State
Packets relating to establishing, maintaining or ending the connection.
Player
Packets relating to the player.
Player State
Player Movement
Player Action
- 0x07: Interact with Entity
- 0x09: Respawn
- 0x0E: Mine Block
- 0x0F: Place Block
- 0x10: Set Hotbar Slot
- 0x11: Interact with Block
- 0x13: Player Action
Entity
Packets relating to entities.
Entity Spawning
- 0x14: Spawn Player
- 0x15: Spawn Item
- 0x16: Collect Item
- 0x17: Spawn Object
- 0x18: Spawn Mob
- 0x19: Spawn Painting
- 0x1D: Despawn Entity
Entity Position
- 0x1C: Entity Velocity
- 0x1E: Entity Movement (unused)
- 0x1F: Entity Position
- 0x20: Entity Rotation
- 0x21: Entity Position and Rotation
- 0x22: Teleport Entity
Entity Attributes
Container State
Packets that relate to container management.
- 0x6A: Container Transaction
- 0x64: Open Container
- 0x65: Close Container
- 0x66: Click Slot
- 0x67: Set Slot
- 0x68: Fill Container
- 0x69: Container Data
World
Packets that provide info on the world.
World Events
World Blocks
Misc
Packets that provide other info.
Numerical
All the packets, listed in numerical order.
- 0x00: Keep Alive
- 0x01: Login
- 0x02: Pre-Login
- 0x03: Chat Message
- 0x04: Set Time
- 0x05: Set Equipment
- 0x06: Set Spawn Position
- 0x07: Interact with Entity
- 0x08: Set Health
- 0x09: Respawn
- 0x0A: Player Movement
- 0x0B: Player Position
- 0x0C: Player Rotation
- 0x0D: Player Position and Rotation
- 0x0E: Mine Block
- 0x0F: Place Block
- 0x10: Set Hotbar Slot
- 0x11: Interact with Block
- 0x12: Animation
- 0x13: Player Action
- 0x14: Spawn Player
- 0x15: Spawn Item
- 0x16: Collect Item
- 0x17: Spawn Object
- 0x18: Spawn Mob
- 0x19: Spawn Painting
- 0x1B: Player Input (unused)
- 0x1C: Entity Velocity
- 0x1D: Despawn Entity
- 0x1E: Entity Movement (unused)
- 0x1F: Entity Position
- 0x20: Entity Rotation
- 0x21: Entity Position and Rotation
- 0x22: Teleport Entity
- 0x26: Entity Event
- 0x27: Add Passenger
- 0x28: Entity Metadata
- 0x32: Set Chunk Visibility
- 0x33: Chunk
- 0x34: Set Multiple Blocks
- 0x35: Set Block
- 0x36: Block Event
- 0x3C: Explosion
- 0x3D: World Event
- 0x46: Game Event
- 0x47: Lightning Bolt
- 0x64: Open Container
- 0x65: Close Container
- 0x66: Click Slot
- 0x67: Set Slot
- 0x68: Fill Container
- 0x69: Container Data
- 0x6A: Container Transaction
- 0x82: Update Sign
- 0x83: Item Data
- 0xC8: Increment Statistic
- 0xFF: Disconnect