<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wikivg.spaghett.dev/index.php?action=history&amp;feed=atom&amp;title=Zh%3AMinecraft_Forge_Handshake</id>
	<title>Zh:Minecraft Forge Handshake - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wikivg.spaghett.dev/index.php?action=history&amp;feed=atom&amp;title=Zh%3AMinecraft_Forge_Handshake"/>
	<link rel="alternate" type="text/html" href="https://wikivg.spaghett.dev/index.php?title=Zh:Minecraft_Forge_Handshake&amp;action=history"/>
	<updated>2026-04-06T04:08:21Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>https://wikivg.spaghett.dev/index.php?title=Zh:Minecraft_Forge_Handshake&amp;diff=11416&amp;oldid=prev</id>
		<title>imported&gt;Minecraftkuhei at 09:14, 1 June 2022</title>
		<link rel="alternate" type="text/html" href="https://wikivg.spaghett.dev/index.php?title=Zh:Minecraft_Forge_Handshake&amp;diff=11416&amp;oldid=prev"/>
		<updated>2022-06-01T09:14:50Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 09:14, 1 June 2022&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l640&quot;&gt;Line 640:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 640:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Protocol Details]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Protocol Details]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Minecraft Modern]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;:ZH&lt;/ins&gt;:Minecraft Modern]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>imported&gt;Minecraftkuhei</name></author>
	</entry>
	<entry>
		<id>https://wikivg.spaghett.dev/index.php?title=Zh:Minecraft_Forge_Handshake&amp;diff=11415&amp;oldid=prev</id>
		<title>imported&gt;Minecraftkuhei at 06:28, 27 May 2022</title>
		<link rel="alternate" type="text/html" href="https://wikivg.spaghett.dev/index.php?title=Zh:Minecraft_Forge_Handshake&amp;diff=11415&amp;oldid=prev"/>
		<updated>2022-05-27T06:28:47Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 06:28, 27 May 2022&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l70&quot;&gt;Line 70:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 70:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;C: 客户端&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;C: 客户端&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &#039;&#039;&#039;S→C&#039;&#039;&#039;: [[Plugin channel#REGISTER|&amp;lt;code&amp;gt;注册&amp;lt;/code&amp;gt;]] forge的通道: FML|HS, FML, FML|MP, FML, FORGE (&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;yes&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;FML is there twice; technically, it does not need to be there twice &lt;/del&gt;but that is the way that Forge sends it and sending it that way will act more similar to forge)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &#039;&#039;&#039;S→C&#039;&#039;&#039;: [[Plugin channel#REGISTER|&amp;lt;code&amp;gt;注册&amp;lt;/code&amp;gt;]] forge的通道: FML|HS, FML, FML|MP, FML, FORGE (&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;没错，这里有两个FML，技术上其实不需要两个FML&lt;/ins&gt;, but that is the way that Forge sends it and sending it that way will act more similar to forge)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;#039;&amp;#039;&amp;#039;S→C&amp;#039;&amp;#039;&amp;#039;: A ServerHello packet is sent on &amp;lt;code&amp;gt;FML|HS&amp;lt;/code&amp;gt; including the player&amp;#039;s dimension (0 if it&amp;#039;s the first login)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;#039;&amp;#039;&amp;#039;S→C&amp;#039;&amp;#039;&amp;#039;: A ServerHello packet is sent on &amp;lt;code&amp;gt;FML|HS&amp;lt;/code&amp;gt; including the player&amp;#039;s dimension (0 if it&amp;#039;s the first login)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;#039;&amp;#039;&amp;#039;C→S&amp;#039;&amp;#039;&amp;#039;: &amp;lt;code&amp;gt;REGISTER&amp;lt;/code&amp;gt; the plugin channels: FML|HS, FML, FML|MP, FML, FORGE.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;#039;&amp;#039;&amp;#039;C→S&amp;#039;&amp;#039;&amp;#039;: &amp;lt;code&amp;gt;REGISTER&amp;lt;/code&amp;gt; the plugin channels: FML|HS, FML, FML|MP, FML, FORGE.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>imported&gt;Minecraftkuhei</name></author>
	</entry>
	<entry>
		<id>https://wikivg.spaghett.dev/index.php?title=Zh:Minecraft_Forge_Handshake&amp;diff=11414&amp;oldid=prev</id>
		<title>imported&gt;Minecraftkuhei at 06:25, 27 May 2022</title>
		<link rel="alternate" type="text/html" href="https://wikivg.spaghett.dev/index.php?title=Zh:Minecraft_Forge_Handshake&amp;diff=11414&amp;oldid=prev"/>
		<updated>2022-05-27T06:25:50Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 06:25, 27 May 2022&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l60&quot;&gt;Line 60:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 60:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Forge握手 ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Forge握手 ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Forge&#039;s handshake occurs in the middle of the &lt;/del&gt;[[Protocol FAQ#What&#039;s the normal login sequence for a client?|&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;normal login sequence&lt;/del&gt;]]&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;, right after &lt;/del&gt;[[Protocol#Login Success|0x02 Login Success]] &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;is received by the client.&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Forge的握手发生于&lt;/ins&gt;[[Protocol FAQ#What&#039;s the normal login sequence for a client?|&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;正常的登录&lt;/ins&gt;]]&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;之后，也就是客户端收到&lt;/ins&gt;[[Protocol#Login Success|0x02 Login Success]] &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;之后。&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;In addition to the [[Debugging|normal packet debugging]] for the server, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;if &lt;/del&gt;&amp;lt;code&amp;gt;-Dfml.debugNetworkHandshake=true&amp;lt;/code&amp;gt; &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;is passed to the forge server, some more information about the current handshake status will be outputted.&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;In addition to the [[Debugging|normal packet debugging]] for the server, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;如果&lt;/ins&gt;&amp;lt;code&amp;gt;-Dfml.debugNetworkHandshake=true&amp;lt;/code&amp;gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;jvm参数被添加到forge服务器上，将会输出更多关于握手的信息。&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{Need Info|Why does it send the CompleteHandshake packet to itself?  How does it keep synchronized (especially near the end with the ACKs)?}}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{Need Info|Why does it send the CompleteHandshake packet to itself?  How does it keep synchronized (especially near the end with the ACKs)?}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &#039;&#039;&#039;S→C&#039;&#039;&#039;: [[Plugin channel#REGISTER|&amp;lt;code&amp;gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;REGISTER&lt;/del&gt;&amp;lt;/code&amp;gt;]] &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;forge&#039;s plugin channels&lt;/del&gt;: FML|HS, FML, FML|MP, FML, FORGE (yes, FML is there twice; technically, it does not need to be there twice but that is the way that Forge sends it and sending it that way will act more similar to forge)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;S: 服务端&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;C: 客户端&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &#039;&#039;&#039;S→C&#039;&#039;&#039;: [[Plugin channel#REGISTER|&amp;lt;code&amp;gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;注册&lt;/ins&gt;&amp;lt;/code&amp;gt;]] &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;forge的通道&lt;/ins&gt;: FML|HS, FML, FML|MP, FML, FORGE (yes, FML is there twice; technically, it does not need to be there twice but that is the way that Forge sends it and sending it that way will act more similar to forge)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;#039;&amp;#039;&amp;#039;S→C&amp;#039;&amp;#039;&amp;#039;: A ServerHello packet is sent on &amp;lt;code&amp;gt;FML|HS&amp;lt;/code&amp;gt; including the player&amp;#039;s dimension (0 if it&amp;#039;s the first login)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;#039;&amp;#039;&amp;#039;S→C&amp;#039;&amp;#039;&amp;#039;: A ServerHello packet is sent on &amp;lt;code&amp;gt;FML|HS&amp;lt;/code&amp;gt; including the player&amp;#039;s dimension (0 if it&amp;#039;s the first login)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;#039;&amp;#039;&amp;#039;C→S&amp;#039;&amp;#039;&amp;#039;: &amp;lt;code&amp;gt;REGISTER&amp;lt;/code&amp;gt; the plugin channels: FML|HS, FML, FML|MP, FML, FORGE.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;#039;&amp;#039;&amp;#039;C→S&amp;#039;&amp;#039;&amp;#039;: &amp;lt;code&amp;gt;REGISTER&amp;lt;/code&amp;gt; the plugin channels: FML|HS, FML, FML|MP, FML, FORGE.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>imported&gt;Minecraftkuhei</name></author>
	</entry>
	<entry>
		<id>https://wikivg.spaghett.dev/index.php?title=Zh:Minecraft_Forge_Handshake&amp;diff=11413&amp;oldid=prev</id>
		<title>imported&gt;Minecraftkuhei at 14:24, 17 October 2021</title>
		<link rel="alternate" type="text/html" href="https://wikivg.spaghett.dev/index.php?title=Zh:Minecraft_Forge_Handshake&amp;diff=11413&amp;oldid=prev"/>
		<updated>2021-10-17T14:24:16Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 14:24, 17 October 2021&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l54&quot;&gt;Line 54:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 54:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;尝试连接到forge服务器而不进行任何更改会导致被踢出，并且显示消息：“&amp;lt;code&amp;gt;This server requires FML/Forge to be installed. Contact your server admin for more details.&amp;lt;/code&amp;gt;”.  This message is displayed in [https://github.com/MinecraftForge/MinecraftForge/blob/ebe9b6d4cbc4a5281c386994f1fbda04df5d2e1f/src/main/java/net/minecraftforge/fml/common/FMLCommonHandler.java#L653-L661 FMLCommonHandler] and is [https://github.com/MinecraftForge/MinecraftForge/blob/ebe9b6d4cbc4a5281c386994f1fbda04df5d2e1f/patches/minecraft/net/minecraft/network/handshake/client/C00Handshake.java.patch#L35 injected] in a modified [[Protocol#Handshake|0x00 Handshake packet]].&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;尝试连接到forge服务器而不进行任何更改会导致被踢出，并且显示消息：“&amp;lt;code&amp;gt;This server requires FML/Forge to be installed. Contact your server admin for more details.&amp;lt;/code&amp;gt;”.  This message is displayed in [https://github.com/MinecraftForge/MinecraftForge/blob/ebe9b6d4cbc4a5281c386994f1fbda04df5d2e1f/src/main/java/net/minecraftforge/fml/common/FMLCommonHandler.java#L653-L661 FMLCommonHandler] and is [https://github.com/MinecraftForge/MinecraftForge/blob/ebe9b6d4cbc4a5281c386994f1fbda04df5d2e1f/patches/minecraft/net/minecraft/network/handshake/client/C00Handshake.java.patch#L35 injected] in a modified [[Protocol#Handshake|0x00 Handshake packet]].&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;如果&amp;lt;code&amp;gt;\0FML\0&amp;lt;/code&amp;gt;被添加到服务器IP地址后面 (其中&amp;lt;code&amp;gt;\0&amp;lt;/code&amp;gt;是[&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[Wikipedia&lt;/del&gt;:空字符&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;]&lt;/del&gt;]) (again, in the 0x00 handshake packet)，服务器不会立即拒绝您。但是，您仍然不会完成连接。&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;如果&amp;lt;code&amp;gt;\0FML\0&amp;lt;/code&amp;gt;被添加到服务器IP地址后面 (其中&amp;lt;code&amp;gt;\0&amp;lt;/code&amp;gt;是[&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;https&lt;/ins&gt;:&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;//zh.wikipedia.org/wiki/%E7%A9%BA%E5%AD%97%E7%AC%A6 &lt;/ins&gt;空字符]) (again, in the 0x00 handshake packet)，服务器不会立即拒绝您。但是，您仍然不会完成连接。&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;发生这种情况是因为Minecraft Forge有一组额外的握手（用于确定模组和方块ID），必须在服务器允许登录之前完成。&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;发生这种情况是因为Minecraft Forge有一组额外的握手（用于确定模组和方块ID），必须在服务器允许登录之前完成。&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>imported&gt;Minecraftkuhei</name></author>
	</entry>
	<entry>
		<id>https://wikivg.spaghett.dev/index.php?title=Zh:Minecraft_Forge_Handshake&amp;diff=11412&amp;oldid=prev</id>
		<title>imported&gt;Minecraftkuhei at 14:22, 17 October 2021</title>
		<link rel="alternate" type="text/html" href="https://wikivg.spaghett.dev/index.php?title=Zh:Minecraft_Forge_Handshake&amp;diff=11412&amp;oldid=prev"/>
		<updated>2021-10-17T14:22:42Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 14:22, 17 October 2021&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l6&quot;&gt;Line 6:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 6:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== [[Server List Ping]]的更改 ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== [[Server List Ping]]的更改 ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;When forge is installed, the &lt;/del&gt;[[Server List Ping]] &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;changes with additional &lt;/del&gt;mod &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;information:&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;安装forge后，&lt;/ins&gt;[[Server List Ping]]&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;会随其他 &lt;/ins&gt;mod &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;信息而变化：&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l42&quot;&gt;Line 42:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 42:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;因此，为了测试是否安装forge，查找&amp;lt;code&amp;gt;modinfo&amp;lt;/code&amp;gt;键和里面的&amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt;键里的值&amp;lt;code&amp;gt;FML&amp;lt;/code&amp;gt;。（语死早）&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;So, to test whether forge is installed, look for the &lt;/del&gt;&amp;lt;code&amp;gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;modinfo&amp;lt;/code&amp;gt; key and then a &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; of &amp;lt;code&amp;gt;FML&lt;/del&gt;&amp;lt;/code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;code&amp;gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;modList&lt;/ins&gt;&amp;lt;/code&amp;gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;键包含每个已安装MOD的版本和ID。&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;The &amp;lt;code&amp;gt;modList&amp;lt;/code&amp;gt; contains each installed mod&#039;s version and ID.&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{warning|&amp;lt;code&amp;gt;modList&amp;lt;/code&amp;gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;键与 &lt;/ins&gt;ping &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;结果中的其他键不同，该键有一个大写的“L”！&lt;/ins&gt;}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{warning|&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;The key &lt;/del&gt;&amp;lt;code&amp;gt;modList&amp;lt;/code&amp;gt; &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;has a capital &#039;L&#039;, unlike any other key in the &lt;/del&gt;ping &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;result!&lt;/del&gt;}}&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This is injected in [https://github.com/MinecraftForge/MinecraftForge/blob/ebe9b6d4cbc4a5281c386994f1fbda04df5d2e1f/patches/minecraft/net/minecraft/network/ServerStatusResponse.java.patch#L45 ServerStatusResponse] by calling [https://github.com/MinecraftForge/MinecraftForge/blob/ebe9b6d4cbc4a5281c386994f1fbda04df5d2e1f/src/main/java/net/minecraftforge/fml/common/network/internal/FMLNetworkHandler.java#L197-L211 FMLNetworkHandler.enhanceStatusQuery()].&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This is injected in [https://github.com/MinecraftForge/MinecraftForge/blob/ebe9b6d4cbc4a5281c386994f1fbda04df5d2e1f/patches/minecraft/net/minecraft/network/ServerStatusResponse.java.patch#L45 ServerStatusResponse] by calling [https://github.com/MinecraftForge/MinecraftForge/blob/ebe9b6d4cbc4a5281c386994f1fbda04df5d2e1f/src/main/java/net/minecraftforge/fml/common/network/internal/FMLNetworkHandler.java#L197-L211 FMLNetworkHandler.enhanceStatusQuery()].&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Connection to a forge server &lt;/del&gt;==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;连接到forge服务器 &lt;/ins&gt;==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Attempting to connect to a forge server without making any changes results in getting immediately disconnected with the message &quot;&lt;/del&gt;&amp;lt;code&amp;gt;This server requires FML/Forge to be installed. Contact your server admin for more details.&amp;lt;/code&amp;gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot;&lt;/del&gt;.  This message is displayed in [https://github.com/MinecraftForge/MinecraftForge/blob/ebe9b6d4cbc4a5281c386994f1fbda04df5d2e1f/src/main/java/net/minecraftforge/fml/common/FMLCommonHandler.java#L653-L661 FMLCommonHandler] and is [https://github.com/MinecraftForge/MinecraftForge/blob/ebe9b6d4cbc4a5281c386994f1fbda04df5d2e1f/patches/minecraft/net/minecraft/network/handshake/client/C00Handshake.java.patch#L35 injected] in a modified [[Protocol#Handshake|0x00 Handshake packet]].&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;尝试连接到forge服务器而不进行任何更改会导致被踢出，并且显示消息：“&lt;/ins&gt;&amp;lt;code&amp;gt;This server requires FML/Forge to be installed. Contact your server admin for more details.&amp;lt;/code&amp;gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;”&lt;/ins&gt;.  This message is displayed in [https://github.com/MinecraftForge/MinecraftForge/blob/ebe9b6d4cbc4a5281c386994f1fbda04df5d2e1f/src/main/java/net/minecraftforge/fml/common/FMLCommonHandler.java#L653-L661 FMLCommonHandler] and is [https://github.com/MinecraftForge/MinecraftForge/blob/ebe9b6d4cbc4a5281c386994f1fbda04df5d2e1f/patches/minecraft/net/minecraft/network/handshake/client/C00Handshake.java.patch#L35 injected] in a modified [[Protocol#Handshake|0x00 Handshake packet]].&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;If &lt;/del&gt;&amp;lt;code&amp;gt;\0FML\0&amp;lt;/code&amp;gt; &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;is added to the end of the server&#039;s address &lt;/del&gt;(&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;where &lt;/del&gt;&amp;lt;code&amp;gt;\0&amp;lt;/code&amp;gt; &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;is a &lt;/del&gt;[[Wikipedia:&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;null character&lt;/del&gt;]]) (again, in the 0x00 handshake packet)&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;, the server will not immediately reject you.  However, you still will not complete the connection.&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;如果&lt;/ins&gt;&amp;lt;code&amp;gt;\0FML\0&amp;lt;/code&amp;gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;被添加到服务器IP地址后面 &lt;/ins&gt;(&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;其中&lt;/ins&gt;&amp;lt;code&amp;gt;\0&amp;lt;/code&amp;gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;是&lt;/ins&gt;[[Wikipedia:&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;空字符&lt;/ins&gt;]]) (again, in the 0x00 handshake packet)&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;，服务器不会立即拒绝您。但是，您仍然不会完成连接。&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;This occurs because Minecraft Forge has an additional set of handshakes (for determining mods and block IDs), that must be completed before the server allows logging in.&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;发生这种情况是因为Minecraft Forge有一组额外的握手（用于确定模组和方块ID），必须在服务器允许登录之前完成。&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Forge handshake &lt;/del&gt;==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Forge握手 &lt;/ins&gt;==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Forge&amp;#039;s handshake occurs in the middle of the [[Protocol FAQ#What&amp;#039;s the normal login sequence for a client?|normal login sequence]], right after [[Protocol#Login Success|0x02 Login Success]] is received by the client.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Forge&amp;#039;s handshake occurs in the middle of the [[Protocol FAQ#What&amp;#039;s the normal login sequence for a client?|normal login sequence]], right after [[Protocol#Login Success|0x02 Login Success]] is received by the client.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>imported&gt;Minecraftkuhei</name></author>
	</entry>
	<entry>
		<id>https://wikivg.spaghett.dev/index.php?title=Zh:Minecraft_Forge_Handshake&amp;diff=11411&amp;oldid=prev</id>
		<title>imported&gt;Minecraftkuhei: Created page with &quot;该页是关于 &#039;&#039;&#039;[https://minecraftforge.net/ Minecraft Forge] 协议&#039;&#039;&#039;的文档，包含如何连接到Minecraft Forge的服务器和Minecraft Forge相较于原版修改...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wikivg.spaghett.dev/index.php?title=Zh:Minecraft_Forge_Handshake&amp;diff=11411&amp;oldid=prev"/>
		<updated>2021-10-17T14:01:12Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;该页是关于 &amp;#039;&amp;#039;&amp;#039;[https://minecraftforge.net/ Minecraft Forge] 协议&amp;#039;&amp;#039;&amp;#039;的文档，包含如何连接到Minecraft Forge的服务器和Minecraft Forge相较于原版修改...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;该页是关于 &amp;#039;&amp;#039;&amp;#039;[https://minecraftforge.net/ Minecraft Forge] 协议&amp;#039;&amp;#039;&amp;#039;的文档，包含如何连接到Minecraft Forge的服务器和Minecraft Forge相较于原版修改了哪些协议。&lt;br /&gt;
= FML protocol (1.7 - 1.12) =&lt;br /&gt;
&lt;br /&gt;
本节主要基于[https://github.com/ORelio/Minecraft-Console-Client/pull/100 Pokechu22&amp;#039;s work on getting Minecraft Console Client to connect to Forge servers]，描述了用于 Minecraft 1.7.X 到 1.12.X 的 FML 协议。&lt;br /&gt;
&lt;br /&gt;
== [[Server List Ping]]的更改 ==&lt;br /&gt;
&lt;br /&gt;
When forge is installed, the [[Server List Ping]] changes with additional mod information:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;description&amp;quot;: &amp;quot;A Minecraft Server&amp;quot;,&lt;br /&gt;
    &amp;quot;players&amp;quot;: {&lt;br /&gt;
        &amp;quot;max&amp;quot;: 20,&lt;br /&gt;
        &amp;quot;online&amp;quot;: 0&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;version&amp;quot;: {&lt;br /&gt;
        &amp;quot;name&amp;quot;: &amp;quot;1.8&amp;quot;,&lt;br /&gt;
        &amp;quot;protocol&amp;quot;: 47&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;modinfo&amp;quot;: {&lt;br /&gt;
        &amp;quot;type&amp;quot;: &amp;quot;FML&amp;quot;,&lt;br /&gt;
        &amp;quot;modList&amp;quot;: [&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;modid&amp;quot;: &amp;quot;mcp&amp;quot;,&lt;br /&gt;
                &amp;quot;version&amp;quot;: &amp;quot;9.05&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;modid&amp;quot;: &amp;quot;FML&amp;quot;,&lt;br /&gt;
                &amp;quot;version&amp;quot;: &amp;quot;8.0.99.99&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;modid&amp;quot;: &amp;quot;Forge&amp;quot;,&lt;br /&gt;
                &amp;quot;version&amp;quot;: &amp;quot;11.14.3.1512&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;modid&amp;quot;: &amp;quot;rpcraft&amp;quot;,&lt;br /&gt;
                &amp;quot;version&amp;quot;: &amp;quot;Beta 1.3 - 1.8.0&amp;quot;&lt;br /&gt;
            }&lt;br /&gt;
        ]&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So, to test whether forge is installed, look for the &amp;lt;code&amp;gt;modinfo&amp;lt;/code&amp;gt; key and then a &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; of &amp;lt;code&amp;gt;FML&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;modList&amp;lt;/code&amp;gt; contains each installed mod&amp;#039;s version and ID.&lt;br /&gt;
&lt;br /&gt;
{{warning|The key &amp;lt;code&amp;gt;modList&amp;lt;/code&amp;gt; has a capital &amp;#039;L&amp;#039;, unlike any other key in the ping result!}}&lt;br /&gt;
&lt;br /&gt;
This is injected in [https://github.com/MinecraftForge/MinecraftForge/blob/ebe9b6d4cbc4a5281c386994f1fbda04df5d2e1f/patches/minecraft/net/minecraft/network/ServerStatusResponse.java.patch#L45 ServerStatusResponse] by calling [https://github.com/MinecraftForge/MinecraftForge/blob/ebe9b6d4cbc4a5281c386994f1fbda04df5d2e1f/src/main/java/net/minecraftforge/fml/common/network/internal/FMLNetworkHandler.java#L197-L211 FMLNetworkHandler.enhanceStatusQuery()].&lt;br /&gt;
&lt;br /&gt;
== Connection to a forge server ==&lt;br /&gt;
&lt;br /&gt;
Attempting to connect to a forge server without making any changes results in getting immediately disconnected with the message &amp;quot;&amp;lt;code&amp;gt;This server requires FML/Forge to be installed. Contact your server admin for more details.&amp;lt;/code&amp;gt;&amp;quot;.  This message is displayed in [https://github.com/MinecraftForge/MinecraftForge/blob/ebe9b6d4cbc4a5281c386994f1fbda04df5d2e1f/src/main/java/net/minecraftforge/fml/common/FMLCommonHandler.java#L653-L661 FMLCommonHandler] and is [https://github.com/MinecraftForge/MinecraftForge/blob/ebe9b6d4cbc4a5281c386994f1fbda04df5d2e1f/patches/minecraft/net/minecraft/network/handshake/client/C00Handshake.java.patch#L35 injected] in a modified [[Protocol#Handshake|0x00 Handshake packet]].&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;\0FML\0&amp;lt;/code&amp;gt; is added to the end of the server&amp;#039;s address (where &amp;lt;code&amp;gt;\0&amp;lt;/code&amp;gt; is a [[Wikipedia:null character]]) (again, in the 0x00 handshake packet), the server will not immediately reject you.  However, you still will not complete the connection.&lt;br /&gt;
&lt;br /&gt;
This occurs because Minecraft Forge has an additional set of handshakes (for determining mods and block IDs), that must be completed before the server allows logging in.&lt;br /&gt;
&lt;br /&gt;
== Forge handshake ==&lt;br /&gt;
&lt;br /&gt;
Forge&amp;#039;s handshake occurs in the middle of the [[Protocol FAQ#What&amp;#039;s the normal login sequence for a client?|normal login sequence]], right after [[Protocol#Login Success|0x02 Login Success]] is received by the client.&lt;br /&gt;
&lt;br /&gt;
In addition to the [[Debugging|normal packet debugging]] for the server, if &amp;lt;code&amp;gt;-Dfml.debugNetworkHandshake=true&amp;lt;/code&amp;gt; is passed to the forge server, some more information about the current handshake status will be outputted.&lt;br /&gt;
&lt;br /&gt;
{{Need Info|Why does it send the CompleteHandshake packet to itself?  How does it keep synchronized (especially near the end with the ACKs)?}}&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;S→C&amp;#039;&amp;#039;&amp;#039;: [[Plugin channel#REGISTER|&amp;lt;code&amp;gt;REGISTER&amp;lt;/code&amp;gt;]] forge&amp;#039;s plugin channels: FML|HS, FML, FML|MP, FML, FORGE (yes, FML is there twice; technically, it does not need to be there twice but that is the way that Forge sends it and sending it that way will act more similar to forge)&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;S→C&amp;#039;&amp;#039;&amp;#039;: A ServerHello packet is sent on &amp;lt;code&amp;gt;FML|HS&amp;lt;/code&amp;gt; including the player&amp;#039;s dimension (0 if it&amp;#039;s the first login)&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;C→S&amp;#039;&amp;#039;&amp;#039;: &amp;lt;code&amp;gt;REGISTER&amp;lt;/code&amp;gt; the plugin channels: FML|HS, FML, FML|MP, FML, FORGE.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;C→S&amp;#039;&amp;#039;&amp;#039;: A ClientHello packet is sent on the &amp;lt;code&amp;gt;FML|HS&amp;lt;/code&amp;gt; channel.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;C→S&amp;#039;&amp;#039;&amp;#039;: A ModList packet is sent.&lt;br /&gt;
* Server checks that the mod list is compatible.  If incompatible, the player is [[Protocol#Disconnect|disconnected]] with an explanatory message.  Otherwise, continue.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;S→C&amp;#039;&amp;#039;&amp;#039;: A ModList packet is sent.&lt;br /&gt;
* Client checks that the mod list is compatible.  If incompatible, it disconnects.  Otherwise, continue.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;C→S&amp;#039;&amp;#039;&amp;#039;: A HandshakeAck packet is sent, with the phase being &amp;lt;code&amp;gt;WAITINGSERVERDATA&amp;lt;/code&amp;gt; (2).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;S→C&amp;#039;&amp;#039;&amp;#039;: A series of RegistryData packets is sent, with hasMore being true for all packets except the last.&lt;br /&gt;
* Client reads and stores each RegistryData, continuing reading until hasMore is false.  Once hasMore is false, it checks whether it has all of the needed blocks/items.  If it does not, it disconnects.  Otherwise, continue.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;C→S&amp;#039;&amp;#039;&amp;#039;: A HandshakeAck packet is sent with phase being &amp;lt;code&amp;gt;WAITINGSERVERCOMPLETE&amp;lt;/code&amp;gt; (3).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;S→C&amp;#039;&amp;#039;&amp;#039;: A HandshakeAck packet is sent with phase being &amp;lt;code&amp;gt;WAITINGCACK&amp;lt;/code&amp;gt; (2).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;C→S&amp;#039;&amp;#039;&amp;#039;: A HandshakeAck packet is sent with phase being &amp;lt;code&amp;gt;PENDINGCOMPLETE&amp;lt;/code&amp;gt; (4).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;S→C&amp;#039;&amp;#039;&amp;#039;: A HandshakeAck packet is sent with phase being &amp;lt;code&amp;gt;COMPLETE&amp;lt;/code&amp;gt; (3).&lt;br /&gt;
* The server sends a &amp;quot;CompleteHandshake&amp;quot; packet &amp;#039;&amp;#039;&amp;#039;to itself&amp;#039;&amp;#039;&amp;#039;.  (Not sure why)&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;C→S&amp;#039;&amp;#039;&amp;#039;: A HandshakeAck packet is sent with phase being &amp;lt;code&amp;gt;COMPLETE&amp;lt;/code&amp;gt; (5).&lt;br /&gt;
* The client sends a &amp;quot;CompleteHandshake&amp;quot; packet &amp;#039;&amp;#039;&amp;#039;to itself&amp;#039;&amp;#039;&amp;#039;.  (Not sure why)&lt;br /&gt;
&lt;br /&gt;
== Definitions ==&lt;br /&gt;
&lt;br /&gt;
Minecraft Forge uses an additional type not covered in [[data types]] for some things -- a varshort.  This is essentially the same as a regular short, except that if the top byte (what is normally sign) is set, it is followed by an additional byte.  This allows forge to retain backwards compatibility but extend the length of certain numbers -- the varshort is only used in places where, in vanilla Minecraft, the sign bit would not have been set.  It is implemented in [https://github.com/MinecraftForge/MinecraftForge/blob/ebe9b6d4cbc4a5281c386994f1fbda04df5d2e1f/src/main/java/net/minecraftforge/fml/common/network/ByteBufUtils.java#L58-L89 ByteBufUtils].&lt;br /&gt;
&lt;br /&gt;
Discriminator bytes are the way that Minecraft Forge allows sending multiple messages on one [[plugin channel]].  They aren&amp;#039;t part of the original specification, but a similar concept is used with the [https://wiki.vg/index.php?title=Plugin_channels&amp;amp;oldid=14089#MC.7CAdvCmd &amp;lt;code&amp;gt;MC|AdvCdm&amp;lt;/code&amp;gt; plugin channel] (used for command blocks).  That packet decides whether a block location is being sent or an entity ID (minecart command blocks) is being sent based off of the value of the first byte in the packet.&lt;br /&gt;
&lt;br /&gt;
In the same way, forge uses the first byte of the plugin message to specify which packet to use.  It uses [https://github.com/MinecraftForge/MinecraftForge/blob/ebe9b6d4cbc4a5281c386994f1fbda04df5d2e1f/src/main/java/net/minecraftforge/fml/common/network/FMLIndexedMessageToMessageCodec.java FMLIndexedMessageToMessageCodec] to automatically switch the value.&lt;br /&gt;
&lt;br /&gt;
Discriminator bytes change depending on the channel: 0 for &amp;lt;code&amp;gt;FML|HS&amp;lt;/code&amp;gt; means something different from 0 for &amp;lt;code&amp;gt;FML&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;code&amp;gt;FML|HS&amp;lt;/code&amp;gt; Packet structure ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;FML|HS&amp;lt;/code&amp;gt; is used to perform the handshake.  Discriminator bytes are found in [https://github.com/MinecraftForge/MinecraftForge/blob/ebe9b6d4cbc4a5281c386994f1fbda04df5d2e1f/src/main/java/net/minecraftforge/fml/common/network/handshake/FMLHandshakeCodec.java FMLHandshakeCodec].&lt;br /&gt;
&lt;br /&gt;
=== [https://github.com/MinecraftForge/MinecraftForge/blob/ebe9b6d4cbc4a5281c386994f1fbda04df5d2e1f/src/main/java/net/minecraftforge/fml/common/network/handshake/FMLHandshakeMessage.java#L33-L76 ServerHello] ===&lt;br /&gt;
&lt;br /&gt;
Starts the handshake.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
 ! Channel&lt;br /&gt;
 ! Bound To&lt;br /&gt;
 ! Field Name&lt;br /&gt;
 ! Field Type&lt;br /&gt;
 ! Notes&lt;br /&gt;
 |-&lt;br /&gt;
 |rowspan=&amp;quot;3&amp;quot;| &amp;lt;code&amp;gt;FML|HS&amp;lt;/code&amp;gt;&lt;br /&gt;
 |rowspan=&amp;quot;3&amp;quot;| Client&lt;br /&gt;
 | Discriminator&lt;br /&gt;
 | Byte&lt;br /&gt;
 | Always 0 for ServerHello&lt;br /&gt;
 |-&lt;br /&gt;
 | FML protocol Version&lt;br /&gt;
 | Byte&lt;br /&gt;
 | Determined from [https://github.com/MinecraftForge/MinecraftForge/blob/ebe9b6d4cbc4a5281c386994f1fbda04df5d2e1f/src/main/java/net/minecraftforge/fml/common/network/NetworkRegistry.java#L67-L69 NetworkRegistery].  Currently &amp;lt;code&amp;gt;2&amp;lt;/code&amp;gt;.&lt;br /&gt;
 |-&lt;br /&gt;
 | Override dimension&lt;br /&gt;
 | Optional Int&lt;br /&gt;
 | Only sent if protocol version is greater than 1.&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
=== [https://github.com/MinecraftForge/MinecraftForge/blob/ebe9b6d4cbc4a5281c386994f1fbda04df5d2e1f/src/main/java/net/minecraftforge/fml/common/network/handshake/FMLHandshakeMessage.java#L77-L95 ClientHello] ===&lt;br /&gt;
&lt;br /&gt;
Response from the client to the ServerHello packet.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
 ! Channel&lt;br /&gt;
 ! Bound To&lt;br /&gt;
 ! Field Name&lt;br /&gt;
 ! Field Type&lt;br /&gt;
 ! Notes&lt;br /&gt;
 |-&lt;br /&gt;
 |rowspan=&amp;quot;2&amp;quot;| &amp;lt;code&amp;gt;FML|HS&amp;lt;/code&amp;gt;&lt;br /&gt;
 |rowspan=&amp;quot;2&amp;quot;| Server&lt;br /&gt;
 | Discriminator&lt;br /&gt;
 | Byte&lt;br /&gt;
 | Always 1 for ClientHello.&lt;br /&gt;
 |-&lt;br /&gt;
 | FML protocol Version&lt;br /&gt;
 | Byte&lt;br /&gt;
 | Determined from [https://github.com/MinecraftForge/MinecraftForge/blob/ebe9b6d4cbc4a5281c386994f1fbda04df5d2e1f/src/main/java/net/minecraftforge/fml/common/network/NetworkRegistry.java#L67-L69 NetworkRegistery].  Currently &amp;lt;code&amp;gt;2&amp;lt;/code&amp;gt;.&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
=== [https://github.com/MinecraftForge/MinecraftForge/blob/ebe9b6d4cbc4a5281c386994f1fbda04df5d2e1f/src/main/java/net/minecraftforge/fml/common/network/handshake/FMLHandshakeMessage.java#L96-L152 ModList] ===&lt;br /&gt;
&lt;br /&gt;
Contains a list of all mods installed on the server or client.  Sent from the client to the server first, and then the server responds with its mod list.  The server&amp;#039;s mod list matches the one sent in the ping.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
 ! Channel&lt;br /&gt;
 ! Bound To&lt;br /&gt;
 !colspan=&amp;quot;2&amp;quot;| Field Name&lt;br /&gt;
 !colspan=&amp;quot;2&amp;quot;| Field Type&lt;br /&gt;
 ! Notes&lt;br /&gt;
 |-&lt;br /&gt;
 |rowspan=&amp;quot;4&amp;quot;| &amp;lt;code&amp;gt;FML|HS&amp;lt;/code&amp;gt;&lt;br /&gt;
 |rowspan=&amp;quot;4&amp;quot;| Both&lt;br /&gt;
 |colspan=&amp;quot;2&amp;quot;| Discriminator&lt;br /&gt;
 |colspan=&amp;quot;2&amp;quot;| Byte&lt;br /&gt;
 | Always 2 for ModList&lt;br /&gt;
 |-&lt;br /&gt;
 |colspan=&amp;quot;2&amp;quot;| Number of mods&lt;br /&gt;
 |colspan=&amp;quot;2&amp;quot;| Varint&lt;br /&gt;
 | Number of mods below&lt;br /&gt;
 |-&lt;br /&gt;
 |rowspan=&amp;quot;2&amp;quot;| Mods&lt;br /&gt;
 | Mod name&lt;br /&gt;
 |rowspan=&amp;quot;2&amp;quot;| Array&lt;br /&gt;
 | String&lt;br /&gt;
 | Name of the mod&lt;br /&gt;
 |-&lt;br /&gt;
 | Mod version&lt;br /&gt;
 | String&lt;br /&gt;
 | Version of the mod&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
=== [https://github.com/MinecraftForge/MinecraftForge/blob/6e90348dc546164b21735aefd83ed0bac0d8283c/src/main/java/net/minecraftforge/fml/common/network/handshake/FMLHandshakeMessage.java#L154-L240 RegistryData] ===&lt;br /&gt;
&lt;br /&gt;
{{Need Info|Explain exactly what registries are, and figure out what Substitutions and Dummies are}}&lt;br /&gt;
&lt;br /&gt;
The server sends several of this packet, one for each registry.  It&amp;#039;ll keep sending them until the hasMore value is no longer true.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
 ! Channel&lt;br /&gt;
 ! Bound To&lt;br /&gt;
 !colspan=&amp;quot;2&amp;quot;| Field Name&lt;br /&gt;
 !colspan=&amp;quot;2&amp;quot;| Field Type&lt;br /&gt;
 ! Notes&lt;br /&gt;
 |-&lt;br /&gt;
 |rowspan=&amp;quot;10&amp;quot;| &amp;lt;code&amp;gt;FML|HS&amp;lt;/code&amp;gt;&lt;br /&gt;
 |rowspan=&amp;quot;10&amp;quot;| Both&lt;br /&gt;
 |colspan=&amp;quot;2&amp;quot;| Discriminator&lt;br /&gt;
 |colspan=&amp;quot;2&amp;quot;| Byte&lt;br /&gt;
 | Always 3 for RegistryData.&lt;br /&gt;
 |-&lt;br /&gt;
 |colspan=&amp;quot;2&amp;quot;| Has more&lt;br /&gt;
 |colspan=&amp;quot;2&amp;quot;| Boolean&lt;br /&gt;
 | Marks whether another RegistryData packet will be sent after this.&lt;br /&gt;
 |-&lt;br /&gt;
 |colspan=&amp;quot;2&amp;quot;| Name&lt;br /&gt;
 |colspan=&amp;quot;2&amp;quot;| String&lt;br /&gt;
 | Name of the registry for this packet&lt;br /&gt;
 |-&lt;br /&gt;
 |colspan=&amp;quot;2&amp;quot;| Number of ids&lt;br /&gt;
 |colspan=&amp;quot;2&amp;quot;| Varint&lt;br /&gt;
 | Number of ids sent below&lt;br /&gt;
 |-&lt;br /&gt;
 |rowspan=&amp;quot;2&amp;quot;| Ids&lt;br /&gt;
 | Name&lt;br /&gt;
 |rowspan=&amp;quot;2&amp;quot;| Array&lt;br /&gt;
 | String&lt;br /&gt;
 | Name of the thing&lt;br /&gt;
 |-&lt;br /&gt;
 | Id&lt;br /&gt;
 | Varint&lt;br /&gt;
 | Numerical id of the thing&lt;br /&gt;
 |-&lt;br /&gt;
 |colspan=&amp;quot;2&amp;quot;| Number of substitutions&lt;br /&gt;
 |colspan=&amp;quot;2&amp;quot;| Varint&lt;br /&gt;
 | Number of substitutions sent below&lt;br /&gt;
 |-&lt;br /&gt;
 |colspan=&amp;quot;2&amp;quot;| Substitutions&lt;br /&gt;
 |colspan=&amp;quot;2&amp;quot;| Array of strings&lt;br /&gt;
 | Each substitution&lt;br /&gt;
 |-&lt;br /&gt;
 |colspan=&amp;quot;2&amp;quot;| Number of dummies&lt;br /&gt;
 |colspan=&amp;quot;2&amp;quot;| Varint&lt;br /&gt;
 | Number of dummies in the array below.  &amp;#039;&amp;#039;&amp;#039;May not be present in older versions of forge&amp;#039;&amp;#039;&amp;#039;; check if there still is data remaining in the packet before continuing to read data.&lt;br /&gt;
 |-&lt;br /&gt;
 |colspan=&amp;quot;2&amp;quot;| Dummies&lt;br /&gt;
 |colspan=&amp;quot;2&amp;quot;| Array of strings&lt;br /&gt;
 | Each dummy?&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
=== [https://github.com/MinecraftForge/MinecraftForge/blob/ebe9b6d4cbc4a5281c386994f1fbda04df5d2e1f/src/main/java/net/minecraftforge/fml/common/network/handshake/FMLHandshakeMessage.java#L241-L264 HandshakeAck] ===&lt;br /&gt;
&lt;br /&gt;
Confirms that the client is able to use the settings sent previously.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
 ! Channel&lt;br /&gt;
 ! Bound To&lt;br /&gt;
 ! Field Name&lt;br /&gt;
 ! Field Type&lt;br /&gt;
 ! Notes&lt;br /&gt;
 |-&lt;br /&gt;
 |rowspan=&amp;quot;2&amp;quot;| &amp;lt;code&amp;gt;FML|HS&amp;lt;/code&amp;gt;&lt;br /&gt;
 |rowspan=&amp;quot;2&amp;quot;| Both&lt;br /&gt;
 | Discriminator&lt;br /&gt;
 | Byte&lt;br /&gt;
 | Always -1 (255) for HandshakeAck&lt;br /&gt;
 |-&lt;br /&gt;
 | Phase&lt;br /&gt;
 | Byte&lt;br /&gt;
 | The current phase, which is the ordinal (0-indexed) in the [https://github.com/MinecraftForge/MinecraftForge/blob/ebe9b6d4cbc4a5281c386994f1fbda04df5d2e1f/src/main/java/net/minecraftforge/fml/common/network/handshake/FMLHandshakeClientState.java FMLHandshakeClientState] or [https://github.com/MinecraftForge/MinecraftForge/blob/ebe9b6d4cbc4a5281c386994f1fbda04df5d2e1f/src/main/java/net/minecraftforge/fml/common/network/handshake/FMLHandshakeServerState.java FMLHandshakeServerState] enums (if the server is sending it, it is in the ServerState enum, and if the client is sending it, it is the ClientState enum).&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
=== [https://github.com/MinecraftForge/MinecraftForge/blob/ebe9b6d4cbc4a5281c386994f1fbda04df5d2e1f/src/main/java/net/minecraftforge/fml/common/network/handshake/FMLHandshakeMessage.java#L265-L267 HandshakeReset] ===&lt;br /&gt;
&lt;br /&gt;
Causes the client to recomplete the entire handshake from the start.  There is no payload beyond the discriminator byte.&lt;br /&gt;
&lt;br /&gt;
The normal forge server does not ever use this packet, but it is used [https://github.com/SpigotMC/BungeeCord/blob/aaddc9fcfdcada8d19ab115f2dcc8aed413a9206/proxy/src/main/java/net/md_5/bungee/ServerConnector.java#L126-L138 when connecting through a BungeeCord instance], specifically when transitioning from a vanilla server to a modded one or from a modded server to another modded server.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
 ! Channel&lt;br /&gt;
 ! Bound To&lt;br /&gt;
 ! Field Name&lt;br /&gt;
 ! Field Type&lt;br /&gt;
 ! Notes&lt;br /&gt;
 |-&lt;br /&gt;
 |rowspan=&amp;quot;1&amp;quot;| &amp;lt;code&amp;gt;FML|HS&amp;lt;/code&amp;gt;&lt;br /&gt;
 |rowspan=&amp;quot;1&amp;quot;| Client&lt;br /&gt;
 | Discriminator&lt;br /&gt;
 | Byte&lt;br /&gt;
 | Always -2 (254) for HandshakeReset&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;code&amp;gt;FML|MP&amp;lt;/code&amp;gt; and multipart packets ==&lt;br /&gt;
&lt;br /&gt;
Forge supports splitting large clientbound plugin message packets into smaller multipart packets.  This functionality does not &amp;lt;!-- appear to --&amp;gt; exist serverbound. &amp;lt;!-- which seems odd, given that the clientbound packet has a max size of 1 megabyte while the serverbound one is much smaller --&amp;gt; This system is available in all versions. &amp;lt;!-- or at least in 1.7.10 and above --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This system starts by [https://github.com/MinecraftForge/MinecraftForge/blob/16bfd8cef1d12ee9ca0de1122addaf9916767ae9/src/main/java/net/minecraftforge/fml/common/network/internal/FMLProxyPacket.java#L164-L167 sending] an &amp;lt;code&amp;gt;FML|MP&amp;lt;/code&amp;gt; packet to indicate what the actual packet is (note that this is within the plugin message itself):&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
 ! Channel&lt;br /&gt;
 ! Bound To&lt;br /&gt;
 ! Field Name&lt;br /&gt;
 ! Field Type&lt;br /&gt;
 ! Notes&lt;br /&gt;
 |-&lt;br /&gt;
 |rowspan=&amp;quot;3&amp;quot;| &amp;lt;code&amp;gt;FML|MP&amp;lt;/code&amp;gt;&lt;br /&gt;
 |rowspan=&amp;quot;3&amp;quot;| Client&lt;br /&gt;
 | Channel&lt;br /&gt;
 | String (20)&lt;br /&gt;
 | The wrapped channel&lt;br /&gt;
 |-&lt;br /&gt;
 | Parts&lt;br /&gt;
 | Unsigned byte&lt;br /&gt;
 | Total number of parts (equal to &amp;lt;code&amp;gt;ceil(dataLength / (double)(1048495))&amp;lt;/code&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | Length&lt;br /&gt;
 | Int&lt;br /&gt;
 | Total length of wrapped data&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
This is [https://github.com/MinecraftForge/MinecraftForge/blob/16bfd8cef1d12ee9ca0de1122addaf9916767ae9/src/main/java/net/minecraftforge/fml/common/network/internal/FMLProxyPacket.java#L173-L178 followed] by a series of additional &amp;lt;code&amp;gt;FML|MP&amp;lt;/code&amp;gt; packets which write the payload.  Each packet is prefixed with the part number as an unsigned byte (starting at 0), followed by the rest of the packet containing up to 1048495 bytes of the actual message.  Each packet must be sent in order.&lt;br /&gt;
&lt;br /&gt;
Up to 52424750 &amp;lt;!-- (0x100000 - 0x50 - 1) * 255 - the -1 is different from what FML actually checks, but matches what it seems to encode --&amp;gt; bytes (~52 megabytes) may be sent through this system.&lt;br /&gt;
&lt;br /&gt;
== Differences from Forge 1.7.10 ==&lt;br /&gt;
&lt;br /&gt;
Forge for Minecraft 1.8 made some changes from the 1.7.10 version.&lt;br /&gt;
&lt;br /&gt;
The most important thing to keep track of isn&amp;#039;t (entirely) a forge change.  In 1.7.10, [http://wiki.vg/index.php?title=Protocol&amp;amp;oldid=6003#Plugin_Message_2 plugin channel packets] are length prefixed, while in 1.8 they are not.  However, forge makes [https://github.com/MinecraftForge/MinecraftForge/blob/605457deecba2144d69113d3c9ce6589021f542b/fml/patches/minecraft/net/minecraft/network/play/server/S3FPacketCustomPayload.java.patch some more changes] to the server to client packet (but not the client to server packet): Rather than using a short for the length, a varshort is used.  Due to the way that varshorts work, this is backwards compatible, but if this is not accounted for you may receive forge packets that seem corrupted as there is an extra byte that appears seemingly randomly.&lt;br /&gt;
&lt;br /&gt;
{{Warning|While it may seem like you can get away with not handling varshorts, on servers with lots of mods (EG FTB), this will appear.}}&lt;br /&gt;
&lt;br /&gt;
Additionally, in 1.7.10 the registries packet is instead &amp;quot;ModIdData&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
=== [https://github.com/MinecraftForge/MinecraftForge/blob/ebe9b6d4cbc4a5281c386994f1fbda04df5d2e1f/src/main/java/net/minecraftforge/fml/common/network/handshake/FMLHandshakeMessage.java#L154-L240 ModIdData] ===&lt;br /&gt;
&lt;br /&gt;
Contains numeric ID mapping for blocks and items.&lt;br /&gt;
&lt;br /&gt;
{{Need Info|Again, what are blockSubstitutions and itemSubstitutions?}}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
 ! Channel&lt;br /&gt;
 ! Bound to&lt;br /&gt;
 ! colspan=&amp;quot;2&amp;quot;|Name&lt;br /&gt;
 ! colspan=&amp;quot;2&amp;quot;|Type&lt;br /&gt;
 ! Notes&lt;br /&gt;
 |-&lt;br /&gt;
 | rowspan=&amp;quot;8&amp;quot;|&amp;lt;code&amp;gt;FML|HS&amp;lt;/code&amp;gt;&lt;br /&gt;
 | rowspan=&amp;quot;8&amp;quot;|Client&lt;br /&gt;
 | colspan=&amp;quot;2&amp;quot;|Discriminator&lt;br /&gt;
 | colspan=&amp;quot;2&amp;quot;|Byte&lt;br /&gt;
 | Always 3 for ModIdData&lt;br /&gt;
 |-&lt;br /&gt;
 | colspan=&amp;quot;2&amp;quot;|Mapping length&lt;br /&gt;
 | colspan=&amp;quot;2&amp;quot;|VarInt&lt;br /&gt;
 | Length of the following mapping&lt;br /&gt;
 |-&lt;br /&gt;
 | rowspan=&amp;quot;2&amp;quot;|Mapping&lt;br /&gt;
 | Name&lt;br /&gt;
 | rowspan=&amp;quot;2&amp;quot;|Array&lt;br /&gt;
 | String&lt;br /&gt;
 | Name of the block/item. Prefixed with a [https://github.com/MinecraftForge/MinecraftForge/blob/1.7.10/fml/src/main/java/cpw/mods/fml/common/registry/GameData.java#L763-L766 discriminator byte], 01 = block, 02 = item.&lt;br /&gt;
 |-&lt;br /&gt;
 | ID&lt;br /&gt;
 | VarInt&lt;br /&gt;
 | Numeric ID of the item.&lt;br /&gt;
 |-&lt;br /&gt;
 | colspan=&amp;quot;2&amp;quot;|Block substitutions length&lt;br /&gt;
 | colspan=&amp;quot;2&amp;quot;|VarInt&lt;br /&gt;
 | Length of the following array&lt;br /&gt;
 |-&lt;br /&gt;
 | colspan=&amp;quot;2&amp;quot;|Block substitutions&lt;br /&gt;
 | colspan=&amp;quot;2&amp;quot;|Array of strings&lt;br /&gt;
 | Block substitutions&lt;br /&gt;
 |-&lt;br /&gt;
 | colspan=&amp;quot;2&amp;quot;|Item substitutions length&lt;br /&gt;
 | colspan=&amp;quot;2&amp;quot;|VarInt&lt;br /&gt;
 | Length of the following array&lt;br /&gt;
 |-&lt;br /&gt;
 | colspan=&amp;quot;2&amp;quot;|Item substitutions&lt;br /&gt;
 | colspan=&amp;quot;2&amp;quot;|Array of strings&lt;br /&gt;
 | Item substitutions&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
= FML2 protocol (1.13 - Current) =&lt;br /&gt;
&lt;br /&gt;
This section is also mostly based off [https://github.com/ORelio/Minecraft-Console-Client/commit/a28409043ca66f811103e2cd57a6b8130baf7768#diff-8ecd732a672d36828f2451352c312eb7R243 research on making Minecraft Console Client join 1.13+ Forge servers]. As a result, it only describes the necessary steps for joining a Forge server, but not all its network protocol.&lt;br /&gt;
&lt;br /&gt;
== Changes to [[Server List Ping]] ==&lt;br /&gt;
&lt;br /&gt;
When forge is installed, the [[Server List Ping]] changes with additional mod information. Example for 1.13.2:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;description&amp;quot;: {&lt;br /&gt;
    &amp;quot;text&amp;quot;: &amp;quot;A Minecraft Server&amp;quot;&lt;br /&gt;
  },&lt;br /&gt;
  &amp;quot;players&amp;quot;: {&lt;br /&gt;
    &amp;quot;max&amp;quot;: 20,&lt;br /&gt;
    &amp;quot;online&amp;quot;: 0&lt;br /&gt;
  },&lt;br /&gt;
  &amp;quot;version&amp;quot;: {&lt;br /&gt;
    &amp;quot;name&amp;quot;: &amp;quot;1.13.2&amp;quot;,&lt;br /&gt;
    &amp;quot;protocol&amp;quot;: 404&lt;br /&gt;
  },&lt;br /&gt;
  &amp;quot;forgeData&amp;quot;: {&lt;br /&gt;
    &amp;quot;channels&amp;quot;: [&lt;br /&gt;
      {&lt;br /&gt;
        &amp;quot;res&amp;quot;: &amp;quot;ironchest:main_channel&amp;quot;,&lt;br /&gt;
        &amp;quot;version&amp;quot;: &amp;quot;1&amp;quot;,&lt;br /&gt;
        &amp;quot;required&amp;quot;: false&lt;br /&gt;
      }&lt;br /&gt;
    ],&lt;br /&gt;
    &amp;quot;mods&amp;quot;: [&lt;br /&gt;
      {&lt;br /&gt;
        &amp;quot;modId&amp;quot;: &amp;quot;forge&amp;quot;,&lt;br /&gt;
        &amp;quot;modmarker&amp;quot;: &amp;quot;ANY&amp;quot;&lt;br /&gt;
      },&lt;br /&gt;
      {&lt;br /&gt;
        &amp;quot;modId&amp;quot;: &amp;quot;ironchest&amp;quot;,&lt;br /&gt;
        &amp;quot;modmarker&amp;quot;: &amp;quot;1.13.2-8.0.2&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    ],&lt;br /&gt;
    &amp;quot;fmlNetworkVersion&amp;quot;: 2&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{warning|The key &amp;lt;code&amp;gt;modId&amp;lt;/code&amp;gt; has a capital &amp;#039;I&amp;#039;, unlike &amp;lt;code&amp;gt;modid&amp;lt;/code&amp;gt; pre-1.13}} for the previous FML protocol.&lt;br /&gt;
&lt;br /&gt;
== Changes to [[Protocol#Handshake|Handshake]] packet ==&lt;br /&gt;
&lt;br /&gt;
Forge adds a marker to the &amp;lt;code&amp;gt;Server Address&amp;lt;/code&amp;gt; field of the [[Protocol#Handshake|Handshake]] packet: &amp;lt;code&amp;gt;\0FML2\0&amp;lt;/code&amp;gt; is added to the end of the server&amp;#039;s address, where &amp;lt;code&amp;gt;\0&amp;lt;/code&amp;gt; is a [https://en.wikipedia.org/wiki/Null_character null character]. Unless the Forge server has no mods installed, attempting to connect to a Forge server without making any changes results in getting immediately disconnected with the message &amp;lt;code&amp;gt;This server has mods that require Forge to be installed on the client. Contact your server admin for more details.&amp;lt;/code&amp;gt;. Inferring the correct marker to use is possible by examining the Server List Ping response from the server. FML2 will set the &amp;lt;code&amp;gt;forgeData&amp;lt;/code&amp;gt; &amp;gt; &amp;lt;code&amp;gt;fmlNetworkVersion&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;2&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;References:&amp;#039;&amp;#039;&lt;br /&gt;
* [https://github.com/MinecraftForge/MinecraftForge/blob/638d1d31deabd8a83cf4b84496549703bc527ab4/src/main/java/net/minecraftforge/fml/network/FMLNetworkConstants.java#L37 FMLNetworkConstants.java]: &amp;lt;code&amp;gt;FML2&amp;lt;/code&amp;gt; marker&lt;br /&gt;
* [https://github.com/MinecraftForge/MinecraftForge/blob/638d1d31deabd8a83cf4b84496549703bc527ab4/src/main/java/net/minecraftforge/fml/network/NetworkHooks.java#L57 NetworkHooks.java]: Get marker from server IP&lt;br /&gt;
* [https://github.com/MinecraftForge/MinecraftForge/blob/638d1d31deabd8a83cf4b84496549703bc527ab4/src/main/java/net/minecraftforge/fml/network/FMLHandshakeHandler.java#L116 FMLHandshakeHandler.java]: Get connection type from maker&lt;br /&gt;
* [https://github.com/MinecraftForge/MinecraftForge/blob/fe43088c96cf65c6793260eae96416871a9eb8f2/src/main/java/net/minecraftforge/fml/server/ServerLifecycleHooks.java#L165 ServerLifecycleHooks.java]: Reject vanilla clients on mising marker&lt;br /&gt;
&lt;br /&gt;
== Handshake Protocol ==&lt;br /&gt;
&lt;br /&gt;
After receiving the [[Protocol#Login_Start|Login Start]] packet, the Forge server communicates with the Forge client using [[Protocol#Login_Plugin_Request|Login Plugin Request]] and [[Protocol#Login_Plugin_Response|Login Plugin Response]] packets before allowing the vanilla login phase to proceed as usual. Each packet must be understood and replied accordingly by the client, or the login attempt is rejected with a [[Protocol#Disconnect_.28login.29|Disconnect (Login)]] packet.&lt;br /&gt;
&lt;br /&gt;
=== Login Wrapper ===&lt;br /&gt;
&lt;br /&gt;
As per [https://github.com/MinecraftForge/MinecraftForge/blob/638d1d31deabd8a83cf4b84496549703bc527ab4/src/main/java/net/minecraftforge/fml/network/FMLLoginWrapper.java FMLLoginWrapper.java], the [[Protocol#Login_Plugin_Request|Login Plugin Request]] and [[Protocol#Login_Plugin_Response|Login Plugin Response]] are formatted as follows:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;Channel&amp;lt;/code&amp;gt; is &amp;lt;code&amp;gt;fml:loginwrapper&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;Data&amp;lt;/code&amp;gt; has the following layout:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
 ! Field Name&lt;br /&gt;
 ! Field Type&lt;br /&gt;
 ! Notes&lt;br /&gt;
 |-&lt;br /&gt;
 | Channel&lt;br /&gt;
 | Identifier&lt;br /&gt;
 | Name of the plugin channel. &amp;lt;code&amp;gt;fml:handshake&amp;lt;/code&amp;gt; for FML handshake.&lt;br /&gt;
 |-&lt;br /&gt;
 | Inner Packet&lt;br /&gt;
 | [[Protocol#Packet_format|Packet]]&lt;br /&gt;
 | Same layout as vanilla packets. Forge [https://github.com/MinecraftForge/MinecraftForge/blob/638d1d31deabd8a83cf4b84496549703bc527ab4/src/main/java/net/minecraftforge/fml/network/FMLLoginWrapper.java#L59 uses Minecraft&amp;#039;s PacketBuffer class] to decode the packet.&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
=== Handshake Channel ===&lt;br /&gt;
&lt;br /&gt;
Packets exchanged on the &amp;lt;code&amp;gt;fml:handshake&amp;lt;/code&amp;gt; channel are described below. As per [[Protocol#Login_Plugin_Request|Login Plugin Request]] and [[Protocol#Login_Plugin_Response|Login Plugin Response]] requirements, each request sent by the server expects exactly one packet back from the client, wrapped as described in [[Minecraft_Forge_Handshake#Login Wrapper|Login Wrapper]]. The client can only respond to requests from the server. The FML handshake completes successfully once the client has correctly responded to all requests from the server.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;References:&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MinecraftForge/MinecraftForge/blob/fe43088c96cf65c6793260eae96416871a9eb8f2/src/main/java/net/minecraftforge/fml/network/NetworkInitialization.java NetworkInitialization.java]: Packet IDs&lt;br /&gt;
* [https://github.com/MinecraftForge/MinecraftForge/blob/fe43088c96cf65c6793260eae96416871a9eb8f2/src/main/java/net/minecraftforge/fml/network/FMLHandshakeMessages.java FMLHandshakeMessages.java]: Packet layouts&lt;br /&gt;
* [https://github.com/MinecraftForge/MinecraftForge/blob/fe43088c96cf65c6793260eae96416871a9eb8f2/src/main/java/net/minecraftforge/fml/network/FMLHandshakeHandler.java FMLHandshakeHandler.java]: Packet handling code&lt;br /&gt;
&lt;br /&gt;
==== [https://github.com/MinecraftForge/MinecraftForge/blob/fe43088c96cf65c6793260eae96416871a9eb8f2/src/main/java/net/minecraftforge/fml/network/FMLHandshakeMessages.java#L63 Mod List] ====&lt;br /&gt;
&lt;br /&gt;
Advertises the list of Mods, [[Plugin channel]] and Registries on the Forge server.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
 ! Packet ID&lt;br /&gt;
 ! Bound To&lt;br /&gt;
 ! colspan=&amp;quot;2&amp;quot; | Field Name&lt;br /&gt;
 ! colspan=&amp;quot;2&amp;quot; | Field Type&lt;br /&gt;
 ! Notes&lt;br /&gt;
 |-&lt;br /&gt;
 | rowspan=&amp;quot;7&amp;quot; | 1&lt;br /&gt;
 | rowspan=&amp;quot;7&amp;quot; | Client&lt;br /&gt;
 | colspan=&amp;quot;2&amp;quot; | Mod Count&lt;br /&gt;
 | colspan=&amp;quot;2&amp;quot; | VarInt&lt;br /&gt;
 | Length of the Mods array&lt;br /&gt;
 |-&lt;br /&gt;
 | colspan=&amp;quot;2&amp;quot; | Mod Names&lt;br /&gt;
 | colspan=&amp;quot;2&amp;quot; | Array of String&lt;br /&gt;
 | List of Mods installed on the Server&lt;br /&gt;
 |-&lt;br /&gt;
 | colspan=&amp;quot;2&amp;quot; | Channel Count&lt;br /&gt;
 | colspan=&amp;quot;2&amp;quot; | VarInt&lt;br /&gt;
 | Length of the Channels array&lt;br /&gt;
 |-&lt;br /&gt;
 | rowspan=&amp;quot;2&amp;quot; | Channels&lt;br /&gt;
 | Name&lt;br /&gt;
 | rowspan=&amp;quot;2&amp;quot; | Array&lt;br /&gt;
 | Identifier&lt;br /&gt;
 | Name of the [[Plugin channel]]&lt;br /&gt;
 |-&lt;br /&gt;
 | Marker&lt;br /&gt;
 | String&lt;br /&gt;
 | Version of the [[Plugin channel]]&lt;br /&gt;
 |-&lt;br /&gt;
 | colspan=&amp;quot;2&amp;quot; | Registry Count&lt;br /&gt;
 | colspan=&amp;quot;2&amp;quot; | VarInt&lt;br /&gt;
 | Length of the Registries array&lt;br /&gt;
 |-&lt;br /&gt;
 | colspan=&amp;quot;2&amp;quot; | Registries&lt;br /&gt;
 | colspan=&amp;quot;2&amp;quot; | Array of Identifier&lt;br /&gt;
 | List of Registries on the Server&lt;br /&gt;
 |-&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
The client is supposed to check the list of mods against its own list, and [https://github.com/MinecraftForge/MinecraftForge/blob/fe43088c96cf65c6793260eae96416871a9eb8f2/src/main/java/net/minecraftforge/fml/network/FMLHandshakeHandler.java#L178 abort login if a mismatch is detected]. Otherwise, it should reply with [[Minecraft_Forge_Handshake#Mod_List_Reply|Mod List Reply]] to continue the handshake process.&lt;br /&gt;
&lt;br /&gt;
==== [https://github.com/MinecraftForge/MinecraftForge/blob/fe43088c96cf65c6793260eae96416871a9eb8f2/src/main/java/net/minecraftforge/fml/network/FMLHandshakeMessages.java#L131 Mod List Reply] ====&lt;br /&gt;
&lt;br /&gt;
Advertises the list of Mods, [[Plugin channels]] and Registries on the Forge client, in reply to [[Minecraft_Forge_Handshake#Mod_List|Mod List]].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
 ! Packet ID&lt;br /&gt;
 ! Bound To&lt;br /&gt;
 ! colspan=&amp;quot;2&amp;quot; | Field Name&lt;br /&gt;
 ! colspan=&amp;quot;2&amp;quot; | Field Type&lt;br /&gt;
 ! Notes&lt;br /&gt;
 |-&lt;br /&gt;
 | rowspan=&amp;quot;8&amp;quot; | 2&lt;br /&gt;
 | rowspan=&amp;quot;8&amp;quot; | Server&lt;br /&gt;
 | colspan=&amp;quot;2&amp;quot; | Mod Count&lt;br /&gt;
 | colspan=&amp;quot;2&amp;quot; | VarInt&lt;br /&gt;
 | Length of the Mods array&lt;br /&gt;
 |-&lt;br /&gt;
 | colspan=&amp;quot;2&amp;quot; | Mod Names&lt;br /&gt;
 | colspan=&amp;quot;2&amp;quot; | Array of String&lt;br /&gt;
 | List of Mods installed on the Server&lt;br /&gt;
 |-&lt;br /&gt;
 | colspan=&amp;quot;2&amp;quot; | Channel Count&lt;br /&gt;
 | colspan=&amp;quot;2&amp;quot; | VarInt&lt;br /&gt;
 | Length of the Channels array&lt;br /&gt;
 |-&lt;br /&gt;
 | rowspan=&amp;quot;2&amp;quot; | Channels&lt;br /&gt;
 | Name&lt;br /&gt;
 | rowspan=&amp;quot;2&amp;quot; | Array&lt;br /&gt;
 | Identifier&lt;br /&gt;
 | Name of the [[Plugin channel]]&lt;br /&gt;
 |-&lt;br /&gt;
 | Marker&lt;br /&gt;
 | String&lt;br /&gt;
 | Version of the [[Plugin channel]]&lt;br /&gt;
 |-&lt;br /&gt;
 | colspan=&amp;quot;2&amp;quot; | Registry Count&lt;br /&gt;
 | colspan=&amp;quot;2&amp;quot; | VarInt&lt;br /&gt;
 | Length of the Registries array&lt;br /&gt;
 |-&lt;br /&gt;
 | rowspan=&amp;quot;2&amp;quot; | Registries&lt;br /&gt;
 | Name&lt;br /&gt;
 | rowspan=&amp;quot;2&amp;quot; | Array&lt;br /&gt;
 | Identifier&lt;br /&gt;
 | Name of the registry&lt;br /&gt;
 |-&lt;br /&gt;
 | Marker&lt;br /&gt;
 | String&lt;br /&gt;
 | Version of the registry&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
Compared to [[Minecraft_Forge_Handshake#Mod_List|Mod List]], this packet also includes a Marker for each Registry. As of MC 1.16, the Forge server [https://github.com/MinecraftForge/MinecraftForge/blob/fe43088c96cf65c6793260eae96416871a9eb8f2/src/main/java/net/minecraftforge/fml/network/FMLHandshakeHandler.java#L202 only checks the contents of the mod list], so a client just wanting to pass the server-side check can reply with the data provided by the server and leave an empty string in the Registry Marker field.&lt;br /&gt;
&lt;br /&gt;
==== [https://github.com/MinecraftForge/MinecraftForge/blob/fe43088c96cf65c6793260eae96416871a9eb8f2/src/main/java/net/minecraftforge/fml/network/FMLHandshakeMessages.java#L212 Server Registry] ====&lt;br /&gt;
&lt;br /&gt;
Advertises a registry to the client. The Forge server will send one request/packet per registry.&lt;br /&gt;
&lt;br /&gt;
{{Need Info|The [https://github.com/MinecraftForge/MinecraftForge/blob/fe43088c96cf65c6793260eae96416871a9eb8f2/src/main/java/net/minecraftforge/registries/ForgeRegistry.java#L812 Forge Snapshot] data format is not documented yet. }}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
 ! Packet ID&lt;br /&gt;
 ! Bound To&lt;br /&gt;
 ! Field Name&lt;br /&gt;
 ! Field Type&lt;br /&gt;
 ! Notes&lt;br /&gt;
 |-&lt;br /&gt;
 | rowspan=&amp;quot;3&amp;quot; | 3&lt;br /&gt;
 | rowspan=&amp;quot;3&amp;quot; | Client&lt;br /&gt;
 | Registry Name&lt;br /&gt;
 | Identifier&lt;br /&gt;
 | Name of the registry&lt;br /&gt;
 |-&lt;br /&gt;
 | Snapshot Present&lt;br /&gt;
 | Boolean&lt;br /&gt;
 | Indicates if a Snapshot is present&lt;br /&gt;
 |-&lt;br /&gt;
 | Snapshot&lt;br /&gt;
 | [https://github.com/MinecraftForge/MinecraftForge/blob/fe43088c96cf65c6793260eae96416871a9eb8f2/src/main/java/net/minecraftforge/registries/ForgeRegistry.java#L812 Forge Snapshot]&lt;br /&gt;
 | Snapshot of the registry&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
A client is expected to process the registry and reply with an [[Minecraft_Forge_Handshake#Acknowledgement|Acknowledgement]] packet.&lt;br /&gt;
&lt;br /&gt;
==== [https://github.com/MinecraftForge/MinecraftForge/blob/fe43088c96cf65c6793260eae96416871a9eb8f2/src/main/java/net/minecraftforge/fml/network/FMLHandshakeMessages.java#L252 Configuration Data] ====&lt;br /&gt;
&lt;br /&gt;
Advertises configuration data to the client.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
 ! Packet ID&lt;br /&gt;
 ! Bound To&lt;br /&gt;
 ! Field Name&lt;br /&gt;
 ! Field Type&lt;br /&gt;
 ! Notes&lt;br /&gt;
 |-&lt;br /&gt;
 | rowspan=&amp;quot;2&amp;quot; | 4&lt;br /&gt;
 | rowspan=&amp;quot;2&amp;quot; | Client&lt;br /&gt;
 | File Name&lt;br /&gt;
 | String&lt;br /&gt;
 | Name of the configuration file&lt;br /&gt;
 |-&lt;br /&gt;
 | Data&lt;br /&gt;
 | Array of Bytes&lt;br /&gt;
 | File contents (may be a String)&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
A client is expected to process the configuration data and reply with an [[Minecraft_Forge_Handshake#Acknowledgement|Acknowledgement]] packet.&lt;br /&gt;
&lt;br /&gt;
==== [https://github.com/MinecraftForge/MinecraftForge/blob/fe43088c96cf65c6793260eae96416871a9eb8f2/src/main/java/net/minecraftforge/fml/network/FMLHandshakeMessages.java#L202 Acknowledgement] ====&lt;br /&gt;
&lt;br /&gt;
Acknowledges a [[Minecraft_Forge_Handshake#Server_Registry|Server Registry]] or [[Minecraft_Forge_Handshake#Configuration_Data|Configuration Data]] packet.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
 ! Packet ID&lt;br /&gt;
 ! Bound To&lt;br /&gt;
 ! Field Name&lt;br /&gt;
 ! Field Type&lt;br /&gt;
 ! Notes&lt;br /&gt;
 |-&lt;br /&gt;
 | 99&lt;br /&gt;
 | Server&lt;br /&gt;
 |&lt;br /&gt;
 |&lt;br /&gt;
 |&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
This is a dummy packet sent back when no reply payload is required, as each request sent by the server expects a packet back from the client.&lt;br /&gt;
&lt;br /&gt;
[[Category:Protocol Details]]&lt;br /&gt;
[[Category:Minecraft Modern]]&lt;/div&gt;</summary>
		<author><name>imported&gt;Minecraftkuhei</name></author>
	</entry>
</feed>