<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.sasgaming.net/index.php?action=history&amp;feed=atom&amp;title=Minecraft%3AJava_Edition_protocol%2FFAQ</id>
	<title>Minecraft:Java Edition protocol/FAQ - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.sasgaming.net/index.php?action=history&amp;feed=atom&amp;title=Minecraft%3AJava_Edition_protocol%2FFAQ"/>
	<link rel="alternate" type="text/html" href="https://wiki.sasgaming.net/index.php?title=Minecraft:Java_Edition_protocol/FAQ&amp;action=history"/>
	<updated>2026-06-10T23:05:28Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://wiki.sasgaming.net/index.php?title=Minecraft:Java_Edition_protocol/FAQ&amp;diff=141122&amp;oldid=prev</id>
		<title>SyncBot: Sync: new page from Minecraft</title>
		<link rel="alternate" type="text/html" href="https://wiki.sasgaming.net/index.php?title=Minecraft:Java_Edition_protocol/FAQ&amp;diff=141122&amp;oldid=prev"/>
		<updated>2026-06-10T11:15:04Z</updated>

		<summary type="html">&lt;p&gt;Sync: new page from Minecraft&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;People very, very often have questions regarding the [[Minecraft:Java Edition protocol|&amp;#039;&amp;#039;Java Edition&amp;#039;&amp;#039; protocol]], so we&amp;#039;ll try to address some of the most common ones on this document. If you&amp;#039;re still having trouble, join us on the [[Minecraft:MCW:Discord|Minecraft Wiki&amp;#039;s Discord server]], the [https://discord.gg/Tf4xwK3Ke7 Minecraft Protocol Discord server], or our IRC channel [ircs://irc.libera.chat:6697/mcdevs #mcdevs on irc.libera.chat].&lt;br /&gt;
&lt;br /&gt;
== Is the protocol documentation complete? ==&lt;br /&gt;
Depending on your definition, &amp;#039;&amp;#039;yes&amp;#039;&amp;#039;! All packet types are known and their layout documented. Some finer details are missing, but everything you need to make functional programs is present. We also collect information on the [[Minecraft:Java Edition protocol/Development version|pre-release protocol]] changes, allowing us to quickly document new releases.&lt;br /&gt;
&lt;br /&gt;
== What&amp;#039;s the normal login sequence for a client? ==&lt;br /&gt;
&lt;br /&gt;
(This is about joining a Minecraft server. See [[Minecraft:Microsoft authentication]] for how to log in to a Minecraft account, and [[Minecraft:protocol encryption]] for details on player authentication during server login.)&lt;br /&gt;
&lt;br /&gt;
The recommended login sequence as of 1.21 looks like this, where &amp;#039;&amp;#039;&amp;#039;C&amp;#039;&amp;#039;&amp;#039; is the client and &amp;#039;&amp;#039;&amp;#039;S&amp;#039;&amp;#039;&amp;#039; is the server:&lt;br /&gt;
# Client connects to the server&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;C&amp;#039;&amp;#039;&amp;#039;→&amp;#039;&amp;#039;&amp;#039;S&amp;#039;&amp;#039;&amp;#039;: [[Minecraft:Java Edition protocol/Packets#Handshake|Handshake]] State=2&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;C&amp;#039;&amp;#039;&amp;#039;→&amp;#039;&amp;#039;&amp;#039;S&amp;#039;&amp;#039;&amp;#039;: [[Minecraft:Java Edition protocol/Packets#Login Start|Login Start]]&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;S&amp;#039;&amp;#039;&amp;#039;→&amp;#039;&amp;#039;&amp;#039;C&amp;#039;&amp;#039;&amp;#039;: [[Minecraft:Java Edition protocol/Packets#Encryption Request|Encryption Request]] (optional)&lt;br /&gt;
# Client auth (Only if server sent Encryption Request)&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;C&amp;#039;&amp;#039;&amp;#039;→&amp;#039;&amp;#039;&amp;#039;S&amp;#039;&amp;#039;&amp;#039;: [[Minecraft:Java Edition protocol/Packets#Encryption Response|Encryption Response]] (Only if server sent Encryption Request)&lt;br /&gt;
# Server auth, both enable encryption (Only if server sent Encryption Request)&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;S&amp;#039;&amp;#039;&amp;#039; → &amp;#039;&amp;#039;&amp;#039;C&amp;#039;&amp;#039;&amp;#039;: [[Minecraft:Java Edition protocol/Packets#Set Compression|Set Compression]] (Optional, enables compression)&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;S&amp;#039;&amp;#039;&amp;#039; → &amp;#039;&amp;#039;&amp;#039;C&amp;#039;&amp;#039;&amp;#039;: [[Minecraft:Java Edition protocol/Packets#Login Success|Login Success]]&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;C&amp;#039;&amp;#039;&amp;#039; → &amp;#039;&amp;#039;&amp;#039;S&amp;#039;&amp;#039;&amp;#039;: [[Minecraft:Java Edition protocol/Packets#Login Acknowledged|Login Acknowledged]]&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;C&amp;#039;&amp;#039;&amp;#039; → &amp;#039;&amp;#039;&amp;#039;S&amp;#039;&amp;#039;&amp;#039;: [[Minecraft:Java Edition protocol/Packets#Serverbound Plugin Message (configuration)|Serverbound Plugin Message]] (Optional, &amp;lt;code&amp;gt;[[Minecraft:Java Edition protocol/Plugin channels#Brand|minecraft:brand]]&amp;lt;/code&amp;gt; with the client&amp;#039;s brand)&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;C&amp;#039;&amp;#039;&amp;#039; → &amp;#039;&amp;#039;&amp;#039;S&amp;#039;&amp;#039;&amp;#039;: [[Minecraft:Java Edition protocol/Packets#Client Information (configuration)|Client Information]] (Optional)&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;S&amp;#039;&amp;#039;&amp;#039; → &amp;#039;&amp;#039;&amp;#039;C&amp;#039;&amp;#039;&amp;#039;: [[Minecraft:Java Edition protocol/Packets#Clientbound Plugin Message (configuration)|Clientbound Plugin Message]] (Optional, &amp;lt;code&amp;gt;[[Minecraft:Java Edition protocol/Plugin channels#Brand|minecraft:brand]]&amp;lt;/code&amp;gt; with the server&amp;#039;s brand)&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;S&amp;#039;&amp;#039;&amp;#039; → &amp;#039;&amp;#039;&amp;#039;C&amp;#039;&amp;#039;&amp;#039;: [[Minecraft:Java Edition protocol/Packets#Feature Flags|Feature Flags]] (Optional)&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;S&amp;#039;&amp;#039;&amp;#039; → &amp;#039;&amp;#039;&amp;#039;C&amp;#039;&amp;#039;&amp;#039;: [[Minecraft:Java Edition protocol/Packets#Clientbound Known Packs|Clientbound Known Packs]] (Optional)&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;C&amp;#039;&amp;#039;&amp;#039; → &amp;#039;&amp;#039;&amp;#039;S&amp;#039;&amp;#039;&amp;#039;: [[Minecraft:Java Edition protocol/Packets#Serverbound Known Packs|Serverbound Known Packs]] (Optional)&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;S&amp;#039;&amp;#039;&amp;#039; → &amp;#039;&amp;#039;&amp;#039;C&amp;#039;&amp;#039;&amp;#039;: [[Minecraft:Java Edition protocol/Packets#Registry Data 2|Registry Data]] (Multiple)&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;S&amp;#039;&amp;#039;&amp;#039; → &amp;#039;&amp;#039;&amp;#039;C&amp;#039;&amp;#039;&amp;#039;: [[Minecraft:Java Edition protocol/Packets#Update Tags (configuration)|Update Tags]] (Optional)&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;S&amp;#039;&amp;#039;&amp;#039; → &amp;#039;&amp;#039;&amp;#039;C&amp;#039;&amp;#039;&amp;#039;: [[Minecraft:Java Edition protocol/Packets#Finish Configuration|Finish Configuration]]&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;C&amp;#039;&amp;#039;&amp;#039; → &amp;#039;&amp;#039;&amp;#039;S&amp;#039;&amp;#039;&amp;#039;: [[Minecraft:Java Edition protocol/Packets#Acknowledge Finish Configuration|Acknowledge Finish Configuration]]&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;S&amp;#039;&amp;#039;&amp;#039; → &amp;#039;&amp;#039;&amp;#039;C&amp;#039;&amp;#039;&amp;#039;: [[Minecraft:Java Edition protocol/Packets#Login (play)|Login (play)]]&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;S&amp;#039;&amp;#039;&amp;#039; → &amp;#039;&amp;#039;&amp;#039;C&amp;#039;&amp;#039;&amp;#039;: [[Minecraft:Java Edition protocol/Packets#Change Difficulty|Change Difficulty]] (Optional)&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;S&amp;#039;&amp;#039;&amp;#039; → &amp;#039;&amp;#039;&amp;#039;C&amp;#039;&amp;#039;&amp;#039;: [[Minecraft:Java Edition protocol/Packets#Player Abilities (clientbound)|Player Abilities]] (Optional)&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;S&amp;#039;&amp;#039;&amp;#039; → &amp;#039;&amp;#039;&amp;#039;C&amp;#039;&amp;#039;&amp;#039;: [[Minecraft:Java Edition protocol/Packets#Set Held Item (clientbound)|Set Held Item]] (Optional)&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;S&amp;#039;&amp;#039;&amp;#039; → &amp;#039;&amp;#039;&amp;#039;C&amp;#039;&amp;#039;&amp;#039;: [[Minecraft:Java Edition protocol/Packets#Update Recipes|Update Recipes]] (Optional)&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;S&amp;#039;&amp;#039;&amp;#039; → &amp;#039;&amp;#039;&amp;#039;C&amp;#039;&amp;#039;&amp;#039;: [[Minecraft:Java Edition protocol/Packets#Entity Event|Entity Event]] (Optional, for the [[Minecraft:Server.properties#op-permission-level|OP permission level]]; see [[Minecraft:Minecraft Wiki:Projects/wiki.vg merge/Entity statuses#Player|Entity statuses#Player]])&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;S&amp;#039;&amp;#039;&amp;#039; → &amp;#039;&amp;#039;&amp;#039;C&amp;#039;&amp;#039;&amp;#039;: [[Minecraft:Java Edition protocol/Packets#Commands|Commands]] (Optional)&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;S&amp;#039;&amp;#039;&amp;#039; → &amp;#039;&amp;#039;&amp;#039;C&amp;#039;&amp;#039;&amp;#039;: [[Minecraft:Java Edition protocol/Packets#Update Recipe Book|Update Recipe Book]] (Optional)&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;S&amp;#039;&amp;#039;&amp;#039; → &amp;#039;&amp;#039;&amp;#039;C&amp;#039;&amp;#039;&amp;#039;: [[Minecraft:Java Edition protocol/Packets#Synchronize Player Position|Synchronize Player Position]]&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;C&amp;#039;&amp;#039;&amp;#039; → &amp;#039;&amp;#039;&amp;#039;S&amp;#039;&amp;#039;&amp;#039;: [[Minecraft:Java Edition protocol/Packets#Confirm Teleportation|Confirm Teleportation]]&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;C&amp;#039;&amp;#039;&amp;#039; → &amp;#039;&amp;#039;&amp;#039;S&amp;#039;&amp;#039;&amp;#039;: [[Minecraft:Java Edition protocol/Packets#Set Player Position and Rotation|Set Player Position and Rotation]] (Optional, to confirm the spawn position)&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;S&amp;#039;&amp;#039;&amp;#039; → &amp;#039;&amp;#039;&amp;#039;C&amp;#039;&amp;#039;&amp;#039;: [[Minecraft:Java Edition protocol/Packets#Server Data|Server Data]] (Optional)&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;S&amp;#039;&amp;#039;&amp;#039; → &amp;#039;&amp;#039;&amp;#039;C&amp;#039;&amp;#039;&amp;#039;: [[Minecraft:Java Edition protocol/Packets#Player Info Update|Player Info Update]] (Add Player action, all players except the one joining (the vanilla server separates these, you don&amp;#039;t need to))&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;S&amp;#039;&amp;#039;&amp;#039; → &amp;#039;&amp;#039;&amp;#039;C&amp;#039;&amp;#039;&amp;#039;: [[Minecraft:Java Edition protocol/Packets#Player Info Update|Player Info Update]] (Add Player action, joining player)&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;S&amp;#039;&amp;#039;&amp;#039; → &amp;#039;&amp;#039;&amp;#039;C&amp;#039;&amp;#039;&amp;#039;: [[Minecraft:Java Edition protocol/Packets#Initialize World Border|Initialize World Border]] (Optional)&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;S&amp;#039;&amp;#039;&amp;#039; → &amp;#039;&amp;#039;&amp;#039;C&amp;#039;&amp;#039;&amp;#039;: [[Minecraft:Java Edition protocol/Packets#Update Time|Update Time]] (Optional)&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;S&amp;#039;&amp;#039;&amp;#039; → &amp;#039;&amp;#039;&amp;#039;C&amp;#039;&amp;#039;&amp;#039;: [[Minecraft:Java Edition protocol/Packets#Set Default Spawn Position|Set Default Spawn Position]] (Optional, “home” spawn, not where the client will spawn on login)&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;S&amp;#039;&amp;#039;&amp;#039; → &amp;#039;&amp;#039;&amp;#039;C&amp;#039;&amp;#039;&amp;#039;: [[Minecraft:Java Edition protocol/Packets#Game Event|Game Event]] (Start waiting for level chunks event, required for the client to spawn. Despite the name, a custom server may choose to send some chunks before sending this packet)&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;S&amp;#039;&amp;#039;&amp;#039; → &amp;#039;&amp;#039;&amp;#039;C&amp;#039;&amp;#039;&amp;#039;: [[Minecraft:Java Edition protocol/Packets#Set Ticking State|Set Ticking State]] (Optional)&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;S&amp;#039;&amp;#039;&amp;#039; → &amp;#039;&amp;#039;&amp;#039;C&amp;#039;&amp;#039;&amp;#039;: [[Minecraft:Java Edition protocol/Packets#Step Tick|Step Tick]] (Optional, the vanilla server sends this regardless of ticking state)&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;S&amp;#039;&amp;#039;&amp;#039; → &amp;#039;&amp;#039;&amp;#039;C&amp;#039;&amp;#039;&amp;#039;: [[Minecraft:Java Edition protocol/Packets#Set Center Chunk|Set Center Chunk]]&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;S&amp;#039;&amp;#039;&amp;#039; → &amp;#039;&amp;#039;&amp;#039;C&amp;#039;&amp;#039;&amp;#039;: [[Minecraft:Java Edition protocol/Packets#Chunk Data and Update Light|Chunk Data and Update Light]] (One sent for each chunk in a circular area centered on the player&amp;#039;s position)&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;C&amp;#039;&amp;#039;&amp;#039; → &amp;#039;&amp;#039;&amp;#039;S&amp;#039;&amp;#039;&amp;#039;: [[Minecraft:Java Edition protocol/Packets#Player Loaded|Player Loaded]] (After the &amp;quot;Loading terrain...&amp;quot; screen has closed (see [[#…my_player_isn&amp;#039;t_spawning!|below]]), or skipped if 60 ticks pass before then)&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;S&amp;#039;&amp;#039;&amp;#039; → &amp;#039;&amp;#039;&amp;#039;C&amp;#039;&amp;#039;&amp;#039;: inventory, entities, etc.&lt;br /&gt;
&lt;br /&gt;
=== Offline mode ===&lt;br /&gt;
If the vanilla server is in offline mode, it will not send the [[Minecraft:Java Edition protocol/Packets#Encryption Request|Encryption Request]] packet, and likewise, the client should not send [[Minecraft:Java Edition protocol/Packets#Encryption Response|Encryption Response]]. In this case, encryption is never enabled, and no authentication is performed.&lt;br /&gt;
&lt;br /&gt;
Clients can tell that a server is in offline mode if the server sends a [[Minecraft:Java Edition protocol/Packets#Login Success|Login Success]] without sending [[Minecraft:Java Edition protocol/Packets#Encryption Request|Encryption Request]].&lt;br /&gt;
&lt;br /&gt;
Versions 1.20.5 and newer support protocol encryption in offline mode, in which case the [[Minecraft:Java Edition protocol/Packets#Encryption Request|Encryption Request]] packet can be sent with Should Authenticate set to false, and both the client and server should not authenticate with Mojang. However, it&amp;#039;s currently not possible to configure the vanilla server to do this.&lt;br /&gt;
&lt;br /&gt;
== What does the normal status ping sequence look like? ==&lt;br /&gt;
When a vanilla client and server exchange information in a status ping, the exchange of packets will be as follows:&lt;br /&gt;
&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;C&amp;#039;&amp;#039;&amp;#039; → &amp;#039;&amp;#039;&amp;#039;S&amp;#039;&amp;#039;&amp;#039;: [[Minecraft:Java Edition protocol/Packets#Handshake|Handshake]] with Next State set to 1 ([[Minecraft:Java Edition protocol/Packets#Status|Status]])&lt;br /&gt;
# Client and Server set protocol state to [[Minecraft:Java Edition protocol/Packets#Status|Status]].&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;C&amp;#039;&amp;#039;&amp;#039; → &amp;#039;&amp;#039;&amp;#039;S&amp;#039;&amp;#039;&amp;#039;: [[Minecraft:Java Edition protocol/Packets#Status Request|Status Request]]&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;S&amp;#039;&amp;#039;&amp;#039; → &amp;#039;&amp;#039;&amp;#039;C&amp;#039;&amp;#039;&amp;#039;: [[Minecraft:Java Edition protocol/Packets#Status Response|Status Response]]&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;C&amp;#039;&amp;#039;&amp;#039; → &amp;#039;&amp;#039;&amp;#039;S&amp;#039;&amp;#039;&amp;#039;: [[Minecraft:Java Edition protocol/Packets#Ping Request (status)|Ping Request]]&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;S&amp;#039;&amp;#039;&amp;#039; → &amp;#039;&amp;#039;&amp;#039;C&amp;#039;&amp;#039;&amp;#039;: [[Minecraft:Java Edition protocol/Packets#Pong Response (status)|Pong Response]]&lt;br /&gt;
# Both sides close the connection&lt;br /&gt;
&lt;br /&gt;
(Note that &amp;#039;&amp;#039;&amp;#039;C&amp;#039;&amp;#039;&amp;#039; is the vanilla client and &amp;#039;&amp;#039;&amp;#039;S&amp;#039;&amp;#039;&amp;#039; is the vanilla server).&lt;br /&gt;
&lt;br /&gt;
The [[Minecraft:Java Edition protocol/Packets#Ping Request (status)|Ping Request]] packet may be left out, however the client will not receive a [[Minecraft:Java Edition protocol/Packets#Pong Response (status)|Pong Response]] packet and the server won&amp;#039;t close the connection.{{more info|How long does it take for the connection to time out if this occurs?}}&lt;br /&gt;
&lt;br /&gt;
== I think I&amp;#039;ve done everything right, but… ==&lt;br /&gt;
=== …my player isn&amp;#039;t spawning! ===&lt;br /&gt;
&lt;br /&gt;
The Minecraft client will wait at the &amp;quot;Loading Terrain...&amp;quot; screen until late in the login sequence. As of 1.21.4 (and starting with 1.20.3), in order for the client to spawn, it must have received a [[Minecraft:Java Edition protocol/Packets#Game Event|Game Event]] packet with event 13 (&amp;quot;Start waiting for level chunks&amp;quot;), and at least one of the following conditions must be met:&lt;br /&gt;
&lt;br /&gt;
* The player is in a loaded chunk (sent via [[Minecraft:Java Edition protocol/Packets#Chunk Data and Update Light|Chunk Data and Update Light]]).&lt;br /&gt;
* The player is below the minimum world height or above the maximum world height (teleported via [[Minecraft:Java Edition protocol/Packets#Synchronize Player Position|Synchronize Player Position]], or moved by gravity after the [[Minecraft:Java Edition protocol/Packets#Player Loaded|Player Loaded]] timeout has expired).&lt;br /&gt;
* The player is in spectator mode (set via [[Minecraft:Java Edition protocol/Packets#Player Info Update|Player Info Update]], &amp;#039;&amp;#039;not&amp;#039;&amp;#039; the Game Mode field in Login (play)!)&lt;br /&gt;
* The player is dead (set via [[Minecraft:Java Edition protocol/Packets#Set Health|Set Health]] or [[Minecraft:Java Edition protocol/Packets#Combat Death|Combat Death]]).&lt;br /&gt;
&lt;br /&gt;
The client will also spawn after spending 30 seconds in the loading screen, even if it never received Game Event 13.&lt;br /&gt;
&lt;br /&gt;
In past versions, you could either (1.19.3 through 1.20.2) send the default spawn position packet or (pre-1.19.3) send the player position packet. In general, try sending packets that inform the client about the player&amp;#039;s position in the world in order to get past the loading terrain screen.&lt;br /&gt;
&lt;br /&gt;
As of 1.21.4, the minimum packets that need to be received and sent by the server in order to get the client past the loading terrain screen and into the world appear to be:&lt;br /&gt;
&lt;br /&gt;
# Receive [[Minecraft:Java Edition protocol/Packets#Handshake|Handshake]]&lt;br /&gt;
# Receive [[Minecraft:Java Edition protocol/Packets#Login Start|Login Start]]&lt;br /&gt;
# Send [[Minecraft:Java Edition protocol/Packets#Login Success|Login Success]]&lt;br /&gt;
# Receive [[Minecraft:Java Edition protocol/Packets#Login Acknowledged|Login Acknowledged]]&lt;br /&gt;
# Send multiple [[Minecraft:Java Edition protocol/Packets#Registry Data 2|Registry Data]] (one for each registry, must contain NBT unless the server also negotiates [[Minecraft:Java Edition protocol/Registries#Known packs negotiation|known packs]] and the client indicates support in the reply)&lt;br /&gt;
# Send [[Minecraft:Java Edition protocol/Packets#Finish Configuration|Finish Configuration]]&lt;br /&gt;
# Receive [[Minecraft:Java Edition protocol/Packets#Acknowledge Finish Configuration|Acknowledge Finish Configuration]]&lt;br /&gt;
# Send [[Minecraft:Java Edition protocol/Packets#Login .28play.29|Login (Play)]]&lt;br /&gt;
# Send [[Minecraft:Java Edition protocol/Packets#Game Event|Game Event]], Start waiting for level chunks&lt;br /&gt;
# Send [[Minecraft:Java Edition protocol/Packets#Chunk Data and Update Light|Chunk Data and Update Light]] and/or [[Minecraft:Java Edition protocol/Packets#Synchronize Player Position|Synchronize Player Position]] (see above)&lt;br /&gt;
&lt;br /&gt;
The most difficult part of this may be sending the Registry Data packets required to define the contents of server-side data packs (including the vanilla data pack) which the client needs to know about. The amount of data that is strictly required is rather small compared to the amount sent by a vanilla server, but depending on your expectations and chosen approach, it may be easier to send all vanilla entries anyway. A complete list of requirements can be found at [[Minecraft:Java Edition protocol/Registries#List of synchronized registries]].&lt;br /&gt;
&lt;br /&gt;
Possible approaches include:&lt;br /&gt;
&lt;br /&gt;
* Parse the JSON files in the vanilla data pack (and possibly custom data packs), convert them to NBT, and send them as entries in Registry Data packets. The vanilla client is rather lenient in its interpretation of NBT, so no knowledge of the schema is required to perform this conversion (though the vanilla server does use a schema, and it may be wise to do so later in development). It is also necessary to send [[Minecraft:Java Edition protocol/Packets#Update Tags (configuration)|Update Tags]] to define the tags referenced in the vanilla registry JSON. They can also be obtained from JSON files in the data pack. This was the vanilla server behavior prior to 1.21, and is still used as a fallback when known packs negotiation fails, e.g. due to mismatched game versions with the same PVN.&lt;br /&gt;
* Gather a list of JSON files provided for each registry in the vanilla data pack. Negotiate [[Minecraft:Java Edition protocol/Registries#Known packs negotiation|known packs]], and send listings of the vanilla entries for each registry (removing the &amp;lt;code&amp;gt;.json&amp;lt;/code&amp;gt; from the names), &amp;#039;&amp;#039;without&amp;#039;&amp;#039; NBT. The client will load the JSON files from its copy of the data pack, and behave as if they were sent by the server as NBT. It is still necessary to send Update Tags as before. This is done by the vanilla server since 1.21 when known packs negotiation succeeds, in order to save bandwidth. A server may take advantage of this to avoid needing to encode NBT early in development, but serious implementations should also support the fallback case. One may also want to support a mix of fully vanilla entries that can be sourced from known packs, and custom entries/overrides, as is done by the vanilla server when custom data packs are in use.&lt;br /&gt;
* Negotiate known packs, and send the minimum required entries without NBT. As of 1.21.10 this includes the [[Minecraft:Java Edition protocol/Registries#Damage type requirements|required damage types]], the biome &amp;lt;code&amp;gt;minecraft:plains&amp;lt;/code&amp;gt;, and one arbitrary entry for each of the registries that are required to be non-empty (variants and dimension types). As of 1.21.10 no tags are required for these vanilla entries. This is the absolute minimum amount of data required to be sent by the server, but also the least flexible approach.&lt;br /&gt;
* Do not negotiate known packs, and send entirely custom data. There is no strict requirement to use any definitions from the vanilla data pack. The only required entries with specific names are the ones listed above, and even these do not need to have the same data as in vanilla. This approach may be preferred by servers that demand extreme customization of client behavior, and may or may not also be considered more fun/interesting by the developer.&lt;br /&gt;
&lt;br /&gt;
Regardless of the approach, the order in which the entries are listed in the Registry Data packets is critically important, as it determines the IDs used to refer to the entries elsewhere in the protocol. The server may choose this order arbitrarily, but it must keep track of the IDs assigned as a result.&lt;br /&gt;
&lt;br /&gt;
=== …chunks are randomly showing and disappearing! ===&lt;br /&gt;
The vanilla client only reliably renders chunks surrounded by other loaded chunks on all sides. See [[Minecraft:Minecraft Wiki:Projects/wiki.vg merge/Chunk Format#Tips and notes|Chunk Format#Tips and notes]].&lt;br /&gt;
&lt;br /&gt;
=== …the client is trying to send an invalid packet that begins with 0xFE01 ===&lt;br /&gt;
The client is attempting a [[Minecraft:Minecraft Wiki:Projects/wiki.vg merge/Server_List_Ping#1.6|legacy ping]], this happens if your server did not respond to the [[Minecraft:Minecraft Wiki:Projects/wiki.vg merge/Server List Ping|Server List Ping]] properly, including if it sent malformed JSON.&lt;br /&gt;
&lt;br /&gt;
=== …the client disconnects after some time with a &amp;quot;Timed out&amp;quot; error ===&lt;br /&gt;
The server is expected to send a [[Minecraft:Java Edition protocol/Packets#Keep Alive (clientbound)|Keep Alive]] packet every 1-15 seconds (if the server does not send a keep alive within 20 seconds of state change to Play, the client will disconnect from the server for &amp;#039;&amp;#039;&amp;#039;Timed Out&amp;#039;&amp;#039;&amp;#039;), and the client should respond with the serverbound version of that packet. If either party does not receive keep alives for some period of time, they will disconnect.&lt;br /&gt;
&lt;br /&gt;
=== ...some of the packets I expect to receive seem to be missing or too short ===&lt;br /&gt;
&lt;br /&gt;
You may be misusing the socket API. In particular, it is invalid to assume that the amount of data returned by calls to &amp;lt;code&amp;gt;recv&amp;lt;/code&amp;gt; (or equivalent, depending on the API you&amp;#039;re using) relates to packet boundaries in any way. There are no &amp;quot;borders&amp;quot; in a [[Minecraft:wikipedia:Transmission Control Protocol|TCP]] data stream, only bytes. Regardless of how any two consecutive packets are sent, the receiver may get one packet, then the other, both at once, half of one, then the rest of both, or any other permutation of buffer sizes adding up to the total size of the packets. The only correct way to know where one packet ends and another begins is the packet length field, and you need to be prepared to handle multiple packets in one buffer, packets split across multiple buffers, etc. (as well as length fields split across multiple buffers!)&lt;br /&gt;
&lt;br /&gt;
Similarly, depending on the API being used, a &amp;lt;code&amp;gt;send&amp;lt;/code&amp;gt; call may also not guarantee that its whole input buffer is sent (consult the relevant documentation for details). This may also cause the connection to appear to hang during the login process, since the server will be left waiting indefinitely for the rest of the packet to arrive.&lt;br /&gt;
&lt;br /&gt;
One reason why packets sent separately may arrive at once is [[Minecraft:wikipedia:Nagle&amp;#039;s algorithm|Nagle&amp;#039;s algorithm]], a feature of many TCP implementations intended to improve efficiency particularly for applications making lots of small &amp;lt;code&amp;gt;send&amp;lt;/code&amp;gt; calls. It is not the &amp;#039;&amp;#039;only&amp;#039;&amp;#039; reason, though, and disabling it should not be seen as a solution to the problem discussed here. Nonetheless, the delays it introduces are detrimental to real-time applications like Minecraft, so the vanilla client and server disable it, and you should too. This is typically done by enabling a socket option called &amp;lt;code&amp;gt;TCP_NODELAY&amp;lt;/code&amp;gt;. Especially when disabling Nagle&amp;#039;s algorithm, you should group multiple packets sent during the same tick in one send buffer for the best performance.&lt;br /&gt;
&lt;br /&gt;
== Navigation ==&lt;br /&gt;
{{Navbox Java Edition technical|General}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Protocol Details]]&lt;br /&gt;
[[Category:Java Edition protocol]]&lt;br /&gt;
{{license wiki.vg}}&lt;/div&gt;</summary>
		<author><name>SyncBot</name></author>
	</entry>
</feed>