Login Sequence
Minimal Login
The bare minimum number of packets to join a server with a Notchian client is as follows.
| Packet | Contents |
|---|---|
C->S Pre-Login | Telling the server a client would like to connect |
S->C Pre-Login | Gives the client the server id |
C->S Login | Gives the server info about the client |
S->C Login | Gives the client info about the to-be-used player and world |
S->C Player Position and Rotation | Sets the players position in the world |
A vanilla client will become responsive upon receiving the player's initial starting position and rotation from the server. After this, the client will continuously send Position and Look packets as needed.
This will place the player into an empty world at sunrise. The player will begin to fall shortly after connecting, since there are no solid blocks for it to collide with.
Vanilla Login
| Packet | Contents |
|---|---|
C->S Pre-Login | Telling the server a client would like to connect |
S->C Pre-Login | Gives the client the server id |
C->S Login | Gives the server info about the client |
S->C Login | Gives the client info about the to-be-used player and world |
S->C Set Compass Target Position | Makes the players compass point at their spawn |
S->C Set Time | Sets the current time |
S->C Set Health | Sets the shown health |
S->C Fill Container | Sets the players inventory |
This is followed by a bunch of Set Chunk Visibility packets to load the chunks, and Chunk packets which contain the actual chunk data, alongside the server and Client exchanging position and rotation information.
For info on how Authencation/Online Mode comes into play, check the Authentication page.