-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdev_notes.txt
60 lines (57 loc) · 3.8 KB
/
dev_notes.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Requetes serveur --> client:
- version incompatible : (fait/à tester)
b'E\x00C{"translate":"multiplayer.disconnect.incompatible","with":["1.16.5"]}' (message tiré d'un srv 1.19)
- Info pour la liste des serveurs (exemple) :
b'\xca\x01\x00\xc7\x01{"previewsChat":false,"description":{"text":"\xc2\xa79Aujourd\u0027hui : serveur ouvert de\xc2\xa72 truc\xc2\xa79 jusqu\u0027\xc3\xa0\xc2\xa74 truc\xc2\xa79."},"players":{"max":10,"online":0},"version":{"name":"1.19","protocol":759}}'
#####
TRES IMPORTANT
#####
- les § sont codés \xc2\xa7 dans les requetes. Cela donne \xc2\xa7 + code couleur
--> \xc2\xa79 par exemple pour §9 ou \u00A79
J'ai retirer le load de plugin api parce-que ca buggait !
Client connects to the server
C→S: Handshake State=2 DONE
C→S: Login Start DONE
S→C: Encryption Request (optional) DONE
Client auth (Only if server sent Encryption Request) TO CHECK
C→S: Encryption Response (Only if server sent Encryption Request) IN THE WORK
Server auth, both enable encryption (Only if server sent Encryption Request)
S → C: Set Compression (Optional, enables compression) FUTURE VERSION ?
S → C: Login Success DONE ?
C → S: Login Acknowledged DONE
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 Notchian 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 Notchian 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.
Offline mode
If the server is in offline mode, it will not send the Encryption Request packet, and likewise, the client should not send Encryption Response. In this case, encryption is never enabled, and no authentication is performed.
Clients can tell that a server is in offline mode if the server sends a Login Success without sending Encryption Request.