Login
| Packet ID | Direction | Mojang Name | MCP Name |
|---|---|---|---|
0x01 | Both | LoginPacket | Packet1Login |
This packet is sent after Pre-Login to finish logging in. The server is expected to kick the client if any fields are invalid or the client's protocol version does not match the server. The unused fields are also useful for negotiating mod support.
Clientbound
| Field | Type | Description |
|---|---|---|
| Entity ID | Integer | The entity ID of the player |
| Unused | String16 | This string is always Empty (Size of 0) |
| World Seed | Long | The random seed for terrain generation |
| Dimension | Byte | The player's spawning dimension |
The player's dimension is specified as 0 for the Overworld, -1 for the Nether and 1 for the Sky. The client accepts all three values, but the vanilla server only ever sends the Overworld and the Nether. See the Sky section on the dimensions page for more information.
NOTE
Unlike the Overworld, if the Sky dimension is used, the whole world just uses the sky biome, giving all biome-tinted blocks the same color
Serverbound
| Field | Type | Description |
|---|---|---|
| Protocol Version | Integer | The current protocol version is 14 |
| Username | String16 | The name of the connecting user |
| Unused | Long | This value is not used by the client but still expects it |
| Unused | Byte | This value is not used by the client but still expects it |
Example Packets
Clientbound
| Field | Value |
|---|---|
| Entity ID | 1298 |
| Unused | (EMPTY) |
| World Seed | 971768181197178410 |
| Dimension | 0 |
Serverbound
| Field | Value |
|---|---|
| Protocol Version | 14 |
| Username | Notch |
| Unused | 0 |
| Unused | 0 |