Minecraft:Bedrock Edition protocol/Login Sequence
More actions
This page describes the usual login sequence for the Template:BE protocol after a transport connection has been established. Packet order can vary with encryption, resource-pack negotiation, and server behavior. For packet fields, see Packets. The packet descriptions below are based on Mojang's protocol 2193 schemas for Minecraft:26.51.<ref name="schema-release">Mojang: Protocol 2193 schema release</ref>
Typical sequence
The following is a general outline, not a guarantee that every connection sends each packet in exactly this order.
- C→S: Request Network Settings
- S→C: Network Settings
- C→S: Login
- S→C: Server To Client Handshake (when application-layer encryption is used)
- C→S: Client To Server Handshake (when application-layer encryption is used)
- S→C: Play Status with the
LoginSuccessstatus - S→C: Resource Packs Info (if the server offers resource packs)
- C↔S: Resource-pack negotiation and transfer (if needed)
- S→C: Resource Pack Stack (if resource packs are offered)
- S→C: Start Game and world-initialization packets
- C→S: Set Local Player As Initialized
- S→C: Play Status with the
PlayerSpawnstatus
Network settings
After the transport connection is established, the client sends Request Network Settings, including its protocol version. The server responds with Network Settings, which specifies the compression threshold and algorithm. The client uses the negotiated settings for subsequent game packets.<ref>Mojang: Request Network Settings</ref><ref>Mojang: Network Settings</ref>
Login and encryption
The client sends a Login packet containing its protocol version and connection request. The server validates the request and authenticates the client.<ref>Mojang: Login</ref>
When application-layer encryption is used, the server sends Server To Client Handshake. The client responds with Client To Server Handshake; encrypted communication then continues. Connections that do not use application-layer encryption omit this exchange.<ref>Mojang: Server To Client Handshake</ref><ref>Mojang: Client To Server Handshake</ref>
After login succeeds, the server sends Play Status with the LoginSuccess status. This marks successful login; it does not by itself mean that the player has spawned in the world. The relative order of this packet and resource-pack negotiation can vary by server.<ref>Mojang: Play Status</ref>
Resource packs
If the server offers resource packs, it sends Resource Packs Info. The client can cancel or report that it is downloading the offered packs using Resource Pack Client Response. Pack data is transferred as needed. When downloads finish, the client reports completion; the server then sends Resource Pack Stack to specify the packs to apply. After applying the stack, the client reports that the stack is finished using Resource Pack Client Response. Servers that do not offer packs can skip this negotiation; resource-pack responses are not required in that case.<ref>Mojang: Resource Packs Info</ref><ref>Mojang: Resource Pack Client Response</ref><ref>Mojang: Resource Pack Stack</ref>
Starting the game
The server sends Start Game and the packets needed to initialize the world. These can include Creative Content, Biome Definition List, and Level Chunk packets, depending on the connection and the data the client needs. The client sends Set Local Player As Initialized when it is ready; the server sends Play Status with the PlayerSpawn status to indicate that the player has spawned. World-initialization packets can vary in presence and order.<ref>Mojang: Start Game</ref><ref>Mojang: Set Local Player As Initialized</ref><ref>Mojang: Play Status</ref>