refactor package
This commit is contained in:
45
login-sequence.txt
Normal file
45
login-sequence.txt
Normal file
@ -0,0 +1,45 @@
|
||||
The recommended login sequence as of 1.21 looks like this, where C is the client and S is the server:
|
||||
|
||||
Client connects to the server
|
||||
C→S: Handshake State=2
|
||||
C→S: Login Start
|
||||
S→C: Encryption Request (optional)
|
||||
Client auth (Only if server sent Encryption Request)
|
||||
C→S: Encryption Response (Only if server sent Encryption Request)
|
||||
Server auth, both enable encryption (Only if server sent Encryption Request)
|
||||
S → C: Set Compression (Optional, enables compression)
|
||||
S → C: Login Success
|
||||
C → S: Login Acknowledged
|
||||
C → S: Serverbound Plugin Message (Optional, minecraft:brand with the client's brand)
|
||||
C → S: Client Information (Optional)
|
||||
S → C: Clientbound Plugin Message (Optional, minecraft:brand with the server's brand)
|
||||
S → C: Feature Flags (Optional)
|
||||
S → C: Clientbound Known Packs
|
||||
C → S: Serverbound Known Packs
|
||||
S → C: Registry Data (Multiple)
|
||||
S → C: Update Tags (Optional)
|
||||
S → C: Finish Configuration
|
||||
C → S: Acknowledge Finish Configuration
|
||||
S → C: Login (play)
|
||||
S → C: Change Difficulty (Optional)
|
||||
S → C: Player Abilities (Optional)
|
||||
S → C: Set Held Item (Optional)
|
||||
S → C: Update Recipes (Optional)
|
||||
S → C: Entity Event (Optional, for the OP permission level; see Entity statuses#Player)
|
||||
S → C: Commands (Optional)
|
||||
S → C: Update Recipe Book (Optional)
|
||||
S → C: Synchronize Player Position
|
||||
C → S: Confirm Teleportation
|
||||
C → S: Set Player Position and Rotation (Optional, to confirm the spawn position)
|
||||
S → C: Server Data (Optional)
|
||||
S → C: Player Info Update (Add Player action, all players except the one joining (the vanilla server separates these, you don't need to))
|
||||
S → C: Player Info Update (Add Player action, joining player)
|
||||
S → C: Initialize World Border (Optional)
|
||||
S → C: Update Time (Optional)
|
||||
S → C: Set Default Spawn Position (Optional, “home” spawn, not where the client will spawn on login)
|
||||
S → C: Game Event (Start waiting for level chunks event, required for the client to spawn)
|
||||
S → C: Set Ticking State (Optional)
|
||||
S → C: Step Tick (Optional, the vanilla server sends this regardless of ticking state)
|
||||
S → C: Set Center Chunk
|
||||
S → C: Chunk Data and Update Light (One sent for each chunk in a circular area centered on the player's position)
|
||||
S → C: inventory, entities, etc.
|
Reference in New Issue
Block a user