https://wiki.vg/api.php?action=feedcontributions&user=Orladog&feedformat=atomwiki.vg - User contributions [en]2024-03-28T20:15:13ZUser contributionsMediaWiki 1.34.4https://wiki.vg/index.php?title=Bedrock_Protocol_version_numbers&diff=18048Bedrock Protocol version numbers2023-03-15T12:31:58Z<p>Orladog: 1.19.70</p>
<hr />
<div>This page contains lists the protocol version numbers used in the Minecraft Bedrock Edition releases. Official releases are marked bold, betas are in regular font.<br><br />
This page will soon also contain the Pocket Edition protocol version numbers.<br />
<br />
== Bedrock Protocol Versions ==<br />
<br />
{| class="wikitable"<br />
|-<br />
! Release name<br />
! Version number<br />
! Last known documentation<br />
<br />
{{/Entry|1.19.70|575}}<br />
{{/Entry|1.19.70.21|569|beta=1|multi=2}}<br />
{{/Entry|1.19.70.20|beta=1}}<br />
{{/Entry|1.19.63|568}}<br />
{{/Entry|1.19.62|567}}<br />
{{/Entry|1.19.61|567}}<br />
{{/Entry|1.19.60.27|567|beta=1|multi=2}}<br />
{{/Entry|1.19.60.26|beta=1}}<br />
{{/Entry|1.19.60.25|565|beta=1}}<br />
{{/Entry|1.19.60.24|563|beta=1}}<br />
{{/Entry|1.19.60.23|562|beta=1|multi=2}}<br />
{{/Entry|1.19.60.22|beta=1}}<br />
{{/Entry|1.19.60.20|561|beta=1}}<br />
{{/Entry|1.19.51|560|multi=6}}<br />
{{/Entry|1.19.50}}<br />
{{/Entry|1.19.50.25|beta=1}}<br />
{{/Entry|1.19.50.24|beta=1}}<br />
{{/Entry|1.19.50.23|beta=1}}<br />
{{/Entry|1.19.50.22|beta=1}}<br />
{{/Entry|1.19.50.21|559|beta=true}}<br />
{{/Entry|1.19.50.20|558|beta=true}}<br />
{{/Entry|1.19.41|557|multi=4}}<br />
{{/Entry|1.19.40}}<br />
{{/Entry|1.19.40.24|beta=1}}<br />
{{/Entry|1.19.40.23|beta=1}}<br />
{{/Entry|1.19.40.22|555|beta=1|multi=2}}<br />
{{/Entry|1.19.40.21|beta=1}}<br />
{{/Entry|1.19.40.20|554|beta=1|multi=3}}<br />
{{/Entry|1.19.31}}<br />
{{/Entry|1.19.30}}<br />
{{/Entry|1.19.30.25|553|beta=1|multi=3}}<br />
{{/Entry|1.19.30.24|preview=1|beta=1}}<br />
{{/Entry|1.19.30.23|beta=1}}<br />
{{/Entry|1.19.30.22|552|beta=1|multi=2}}<br />
{{/Entry|1.19.30.21|beta=1}}<br />
{{/Entry|1.19.30.20|551|beta=1}}<br />
{{/Entry|1.19.22|545|multi=2}}<br />
{{/Entry|1.19.21}}<br />
{{/Entry|1.19.20|544|multi=2}}<br />
{{/Entry|1.19.20.24|beta=1}}<br />
{{/Entry|1.19.20.23|543|beta=1}}<br />
{{/Entry|1.19.20.22|542|beta|multi=2}}<br />
{{/Entry|1.19.20.20|beta=1}}<br />
{{/Entry|1.19.11|534|multi=4}}<br />
{{/Entry|1.19.10}}<br />
{{/Entry|1.19.10.24|beta=1}}<br />
{{/Entry|1.19.10.23|beta=1}}<br />
{{/Entry|1.19.10.22|533|beta=1}}<br />
{{/Entry|1.19.10.21|532|beta=1}}<br />
{{/Entry|1.19.10.20|530|beta=1}}<br />
{{/Entry|1.19.2|527|multi=2}}<br />
{{/Entry|1.19.0}}<br />
{{/Entry|1.19.0.68|526|multi=4|preview=1|beta=1}}<br />
{{/Entry|1.19.0.34|beta=1}}<br />
{{/Entry|1.19.0.32|beta=1}}<br />
{{/Entry|1.19.0.30|beta=1}}<br />
{{/Entry|1.19.0.28|524|beta=1}}<br />
{{/Entry|1.19.0.26|516|beta=1}}<br />
{{/Entry|1.19.0.24|514|beta=1}}<br />
{{/Entry|1.19.0.20|512|beta=1}} <br />
{{/Entry|1.18.32|503|multi=6}}<br />
{{/Entry|1.18.31}}<br />
{{/Entry|1.18.30}}<br />
{{/Entry|1.18.30.32|beta=1}}<br />
{{/Entry|1.18.30.30|beta=1}}<br />
{{/Entry|1.18.30.28|beta=1}}<br />
{{/Entry|1.18.30.26|498|beta=1}}<br />
{{/Entry|1.18.30.22|497|beta=1}}<br />
{{/Entry|1.18.30.20|495|beta=1}}<br />
{{/Entry|1.18.20.29|491|beta=1|multi=4}}<br />
{{/Entry|1.18.20.27|beta=1}}<br />
{{/Entry|1.18.20.25|beta=1}}<br />
{{/Entry|1.18.20.24|beta=1|preview=1}}<br />
{{/Entry|1.18.20.23|490|multi=2|beta=1}}<br />
{{/Entry|1.18.20.21|beta=1}}<br />
{{/Entry|1.18.12|486|multi=4}}<br />
{{/Entry|1.18.11}}<br />
{{/Entry|1.18.10}}<br />
{{/Entry|1.18.10.28|beta=1}}<br />
{{/Entry|1.18.10.27|485|multi=2|beta=1}}<br />
{{/Entry|1.18.10.26|beta=1}}<br />
{{/Entry|1.18.10.24|479|beta=1}}<br />
{{/Entry|1.18.10.22|477|beta=1}}<br />
{{/Entry|1.18.10.21|476|multi=2|beta=1}}<br />
{{/Entry|1.18.10.20|beta=1}}<br />
{{/Entry|1.18.2|475|multi=6}}<br />
{{/Entry|1.18.1}}<br />
{{/Entry|1.18.0}}<br />
{{/Entry|1.18.0.27|beta=1}}<br />
{{/Entry|1.18.0.25|beta=1}}<br />
{{/Entry|1.18.0.24|beta=1}}<br />
{{/Entry|1.18.0.23|476|multi=2|beta=1}}<br />
{{/Entry|1.18.0.22|beta=1}}<br />
{{/Entry|1.18.0.21|474|multi=2|beta=1}}<br />
{{/Entry|1.18.0.20|beta=1}}<br />
{{/Entry|1.17.41|471|multi=5}}<br />
{{/Entry|1.17.40}}<br />
{{/Entry|1.17.40.23|beta=1}}<br />
{{/Entry|1.17.40.21|beta=1}}<br />
{{/Entry|1.17.40.20|beta=1}}<br />
{{/Entry|1.17.34|465|multi=5}}<br />
{{/Entry|1.17.33}}<br />
{{/Entry|1.17.32}}<br />
{{/Entry|1.17.30}}<br />
{{/Entry|1.17.30.25|beta=1}}<br />
{{/Entry|1.17.30.24|464|multi=3|beta=1}}<br />
{{/Entry|1.17.30.23|beta=1}}<br />
{{/Entry|1.17.30.22|beta=1}}<br />
{{/Entry|1.17.30.21|462|multi=2|beta=1}}<br />
{{/Entry|1.17.30.20|beta=1}}<br />
{{/Entry|1.17.20.23|459|beta=1}}<br />
{{/Entry|1.17.20.22|456|beta=1}}<br />
{{/Entry|1.17.20.21|455|beta=1}}<br />
{{/Entry|1.17.20.20|453|beta=1}}<br />
{{/Entry|1.17.11|448|multi=4}}<br />
{{/Entry|1.17.10}}<br />
{{/Entry|1.17.10.23|beta=1}}<br />
{{/Entry|1.17.10.22|beta=1}}<br />
{{/Entry|1.17.10.21|441|multi=2|beta=1}}<br />
{{/Entry|1.17.10.20|beta=1}}<br />
{{/Entry|1.17.2|440|multi=6}}<br />
{{/Entry|1.17.1}}<br />
{{/Entry|1.17.0}}<br />
{{/Entry|1.17.0.58|beta=1}}<br />
{{/Entry|1.17.0.56|beta=1}}<br />
{{/Entry|1.17.0.54|beta=1}}<br />
{{/Entry|1.17.0.52|437|multi=2|beta=1}}<br />
{{/Entry|1.17.0.50|beta=1}}<br />
{{/Entry|1.16.230.56|435|multi=2|beta=1}}<br />
{{/Entry|1.16.230.54|beta=1}}<br />
{{/Entry|1.16.230.52|434|beta=1}}<br />
{{/Entry|1.16.230.50|433|beta=1}}<br />
{{/Entry|1.16.221|431|multi=3}}<br />
{{/Entry|1.16.220}}<br />
{{/Entry|1.16.220.52|beta=1}}<br />
{{/Entry|1.16.220.51|430|beta=1}}<br />
{{/Entry|1.16.220.50|429|beta=1}}<br />
{{/Entry|1.16.210|428|multi=5}}<br />
{{/Entry|1.16.210.61|beta=1}}<br />
{{/Entry|1.16.210.60|beta=1}}<br />
{{/Entry|1.16.210.59|beta=1}}<br />
{{/Entry|1.16.210.58|beta=1}}<br />
{{/Entry|1.16.210.57|427|multi=2|beta=1}}<br />
{{/Entry|1.16.210.56|beta=1}}<br />
{{/Entry|1.16.210.55|425|multi=2|beta=1}}<br />
{{/Entry|1.16.210.54|beta=1}}<br />
{{/Entry|1.16.210.53|424|beta=1}}<br />
{{/Entry|1.16.210.51|423|multi=2|beta=1}}<br />
{{/Entry|1.16.210.50|beta=1}}<br />
{{/Entry|1.16.201|422|multi=7}}<br />
{{/Entry|1.16.200}}<br />
{{/Entry|1.16.200.57|beta=1}}<br />
{{/Entry|1.16.200.56|beta=1}}<br />
{{/Entry|1.16.200.55|beta=1}}<br />
{{/Entry|1.16.200.54|beta=1}}<br />
{{/Entry|1.16.200.53|beta=1}}<br />
{{/Entry|1.16.200.52|421|beta=1}}<br />
{{/Entry|1.16.200.51|420|multi=2|beta=1}}<br />
{{/Entry|1.16.200.50|beta=1}}<br />
{{/Entry|1.16.101|419|multi=3}}<br />
{{/Entry|1.16.100}}<br />
{{/Entry|1.16.100.60|beta=1}}<br />
{{/Entry|1.16.100.59|418|beta=1}}<br />
{{/Entry|1.16.100.58|417|beta=1}}<br />
{{/Entry|1.16.100.57|416|beta=1}}<br />
{{/Entry|1.16.100.56|415|beta=1}}<br />
{{/Entry|1.16.100.55|414|beta=1}}<br />
{{/Entry|1.16.100.54|413|beta=1}}<br />
{{/Entry|1.16.100.53|412|beta=1}}<br />
{{/Entry|1.16.100.52|411|beta=1}}<br />
{{/Entry|1.16.100.51|410|beta=1}}<br />
{{/Entry|1.16.100.50|409|beta=1}}<br />
{{/Entry|1.16.30.57|418|beta=1|multi=2}}<br />
{{/Entry|1.16.30.56|beta=1}}<br />
{{/Entry|1.16.30.53|407|beta=1|multi=2}}<br />
{{/Entry|1.16.30.52|beta=1}}<br />
{{/Entry|1.16.61|408|multi=9}}<br />
{{/Entry|1.16.60}}<br />
{{/Entry|1.16.50}}<br />
{{/Entry|1.16.42}}<br />
{{/Entry|1.16.40}}<br />
{{/Entry|1.16.21}}<br />
{{/Entry|1.16.20}}<br />
{{/Entry|1.16.20.54|beta=1}}<br />
{{/Entry|1.16.20.53|beta=1}}<br />
{{/Entry|1.16.20.52|407|beta=1|multi=13}}<br />
{{/Entry|1.16.20.51|beta=1}}<br />
{{/Entry|1.16.20.50|beta=1}}<br />
{{/Entry|1.16.10}}<br />
{{/Entry|1.16.1.04}}<br />
{{/Entry|1.16.1.03}}<br />
{{/Entry|1.16.1}}<br />
{{/Entry|1.16.0}}<br />
{{/Entry|1.16.0.68|beta=1}}<br />
{{/Entry|1.16.0.67|beta=1}}<br />
{{/Entry|1.16.0.66|beta=1}}<br />
{{/Entry|1.16.0.65|beta=1}}<br />
{{/Entry|1.16.0.64|beta=1}}<br />
{{/Entry|1.16.0.63|406|beta=1}}<br />
{{/Entry|1.16.0.61|405|beta=1}}<br />
{{/Entry|1.16.0.60|404|beta=1}}<br />
{{/Entry|1.16.0.59|401|beta=1|multi=2}}<br />
{{/Entry|1.16.0.58|beta=1}}<br />
{{/Entry|1.16.0.57|403|beta=1}}<br />
{{/Entry|1.16.0.55|402|beta=1|multi=2}}<br />
{{/Entry|1.16.0.54|beta=1}}<br />
{{/Entry|1.16.0.53|401|beta=1|multi=2}}<br />
{{/Entry|1.16.0.52|beta=1}}<br />
{{/Entry|1.16.0.51|400|beta=1}}<br />
{{/Entry|1.15.0.56|396|beta=1}}<br />
{{/Entry|1.15.0.55|395|beta=1}}<br />
{{/Entry|1.15.0.54|394|beta=1}}<br />
{{/Entry|1.15.0.53|393|beta=1}}<br />
{{/Entry|1.15.0.51|392|beta=1}}<br />
{{/Entry|1.15.0.11|391|multi=3}}<br />
{{/Entry|1.15.0.9}}<br />
{{/Entry|1.15.0.8}}<br />
{{/Entry|1.14.60|390|cur}}<br />
{{/Entry|1.14.41|389|multi=20}}<br />
{{/Entry|1.14.30}}<br />
{{/Entry|1.14.30.51|beta=1}}<br />
{{/Entry|1.14.20}}<br />
{{/Entry|1.14.25.1|beta=1}}<br />
{{/Entry|1.14.2.51|beta=1}}<br />
{{/Entry|1.14.2.50|beta=1}}<br />
{{/Entry|1.14.1}}<br />
{{/Entry|1.14.1.3|beta=1}}<br />
{{/Entry|1.14.1.2|beta=1}}<br />
{{/Entry|1.14.0.12}}<br />
{{/Entry|1.14.0}}<br />
{{/Entry|1.14.0.52|beta=1}}<br />
{{/Entry|1.14.0.51|beta=1}}<br />
{{/Entry|1.14.0.50|beta=1}}<br />
{{/Entry|1.14.0.6|beta=1}}<br />
{{/Entry|1.14.0.5|beta=1}}<br />
{{/Entry|1.14.0.4|beta=1}}<br />
{{/Entry|1.14.0.3|beta=1}}<br />
{{/Entry|1.14.0.2|beta=1}}<br />
{{/Entry|1.14.0.1|390|beta=1}}<br />
{{/Entry|1.13.3|388|multi=4}}<br />
{{/Entry|1.13.2}}<br />
{{/Entry|1.13.1}}<br />
{{/Entry|1.13.0}}<br />
{{/Entry|1.13.0.18|389|beta=1}}<br />
{{/Entry|1.13.0.17|388|beta=1|multi=2}}<br />
{{/Entry|1.13.0.16|beta=1}}<br />
{{/Entry|1.13.0.15|387|beta=1}}<br />
{{/Entry|1.13.0.13|386|beta=1}}<br />
{{/Entry|1.13.0.9|385|beta=1}}<br />
{{/Entry|1.13.0.6|371|beta=1|multi=3}}<br />
{{/Entry|1.13.0.5|beta=1}}<br />
{{/Entry|1.13.0.4|beta=1}}<br />
{{/Entry|1.13.0.3|372|beta=1}}<br />
{{/Entry|1.13.0.2|370|beta=1|multi=2}}<br />
{{/Entry|1.13.0.1|beta=1}}<br />
{{/Entry|1.12.1|361|multi=11}}<br />
{{/Entry|1.12.0}}<br />
{{/Entry|1.12.0.14|beta=1}}<br />
{{/Entry|1.12.0.13|beta=1}}<br />
{{/Entry|1.12.0.12|beta=1}}<br />
{{/Entry|1.12.0.11|beta=1}}<br />
{{/Entry|1.12.0.10|beta=1}}<br />
{{/Entry|1.12.0.9|beta=1}}<br />
{{/Entry|1.12.0.6|beta=1}}<br />
{{/Entry|1.12.0.4|beta=1}}<br />
{{/Entry|1.12.0.3|beta=1}}<br />
{{/Entry|1.12.0.2|360|beta=1}}<br />
{{/Entry|1.11.4|354|multi=9}}<br />
{{/Entry|1.11.3}}<br />
{{/Entry|1.11.2}}<br />
{{/Entry|1.11.1}}<br />
{{/Entry|1.11.0}}<br />
{{/Entry|1.11.0.10|beta=1}}<br />
{{/Entry|1.11.0.9|beta=1}}<br />
{{/Entry|1.11.0.8|beta=1}}<br />
{{/Entry|1.11.0.7|beta=1}}<br />
{{/Entry|1.11.0.5|353|beta=1}}<br />
{{/Entry|1.11.0.4|352|beta=1}}<br />
{{/Entry|1.11.0.3|351|beta=1}}<br />
{{/Entry|1.11.0.1|350|beta=1}}<br />
{{/Entry|1.10.1|340|multi=4}}<br />
{{/Entry|1.10.0}}<br />
{{/Entry|1.10.0.4|beta=1}}<br />
{{/Entry|1.10.0.3|beta=1}}<br />
{{/Entry|1.9.0|332|multi=3}}<br />
{{/Entry|1.9.0.5|beta=1}}<br />
{{/Entry|1.9.0.3|beta=1}}<br />
{{/Entry|1.9.0.2|331|beta=1}}<br />
{{/Entry|1.9.0.0|330|beta=1}}<br />
{{/Entry|1.8.1|313|multi=2}}<br />
{{/Entry|1.8.0}}<br />
{{/Entry|1.8.0.14|312|beta=1|multi=3}}<br />
{{/Entry|1.8.0.13|beta=1}}<br />
{{/Entry|1.8.0.11|beta=1}}<br />
{{/Entry|1.8.0.10|311|beta=1}}<br />
{{/Entry|1.8.0.8|310|beta=1}}<br />
{{/Entry|1.7.1|291|multi=5}}<br />
{{/Entry|1.7.0}}<br />
{{/Entry|1.7.0.9|beta=1}}<br />
{{/Entry|1.7.0.7|beta=1}}<br />
{{/Entry|1.7.0.5|beta=1}}<br />
{{/Entry|1.7.0.3|290|beta=1|multi=2}}<br />
{{/Entry|1.7.0.2|beta=1}}<br />
{{/Entry|1.6.2|282|multi=5}}<br />
{{/Entry|1.6.1}}<br />
{{/Entry|1.6.0}}<br />
{{/Entry|1.6.0.30|beta=1}}<br />
{{/Entry|1.6.0.8|beta=1}}<br />
{{/Entry|1.6.0.6|281|beta=1|multi=2}}<br />
{{/Entry|1.6.0.5|beta=1}}<br />
{{/Entry|1.6.0.1|280|beta=1}}<br />
{{/Entry|1.5.3|274|multi=5}}<br />
{{/Entry|1.5.2}}<br />
{{/Entry|1.5.1}}<br />
{{/Entry|1.5.0}}<br />
{{/Entry|1.5.0.10|beta=1}}<br />
{{/Entry|1.5.0.7|273|beta=1}}<br />
{{/Entry|1.5.0.4|271|beta=1|multi=2}}<br />
{{/Entry|1.5.0.1|beta=1}}<br />
{{/Entry|1.5.0.0|270|beta=1}}<br />
{{/Entry|1.4.4|261|multi=5}}<br />
{{/Entry|1.4.3}}<br />
{{/Entry|1.4.2}}<br />
{{/Entry|1.4.1}}<br />
{{/Entry|1.4.0}}<br />
{{/Entry|1.2.20.2|260|beta=1|multi=2}}<br />
{{/Entry|1.2.20.1|beta=1}}<br />
{{/Entry|1.2.14.3|240|beta=1|multi=2}}<br />
{{/Entry|1.2.14.2|beta=1}}<br />
{{/Entry|1.2.13.12|223|beta=1}}<br />
{{/Entry|1.2.13.11|224|beta=1}}<br />
{{/Entry|1.2.13.10|222|beta=1}}<br />
{{/Entry|1.2.13.8|221|beta=1}}<br />
{{/Entry|1.2.16|223|multi=4}}<br />
{{/Entry|1.2.15}}<br />
{{/Entry|1.2.14}}<br />
{{/Entry|1.2.13}}<br />
{{/Entry|1.2.13.6|220|beta=1|multi=2}}<br />
{{/Entry|1.2.13.5|beta=1}}<br />
{{/Entry|1.2.11|201|multi=2}}<br />
{{/Entry|1.2.10}}<br />
{{/Entry|1.2.10.1|200|beta=1}}<br />
{{/Entry|1.2.9|160|multi=3}}<br />
{{/Entry|1.2.8}}<br />
{{/Entry|1.2.7}}<br />
{{/Entry|1.2.6.1|150|multi=2}}<br />
{{/Entry|1.2.6}}<br />
{{/Entry|1.2.6.2|140|beta=1}}<br />
{{/Entry|1.2.5|141|multi=2}}<br />
{{/Entry|1.2.5.15|beta=1}}<br />
{{/Entry|1.2.5.12|140|beta=1}}<br />
{{/Entry|1.2.5.0|137|multi=6|beta=1}}<br />
{{/Entry|1.2.3}}<br />
{{/Entry|1.2.3.3|beta=1}}<br />
{{/Entry|1.2.2}}<br />
{{/Entry|1.2.1}}<br />
{{/Entry|1.2.0}}<br />
{{/Entry|1.2.0.31|136|beta=1}}<br />
{{/Entry|1.2.0.25|135|beta=1}}<br />
{{/Entry|1.2.0.22|134|beta=1}}<br />
{{/Entry|1.2.0.18|133|beta=1}}<br />
{{/Entry|1.2.0.15|132|beta=1|multi=2}}<br />
{{/Entry|1.2.0.11|beta=1}}<br />
{{/Entry|1.2.0.9|131|beta=1|multi=2}}<br />
{{/Entry|1.2.0.7|beta=1}}<br />
{{/Entry|1.2.0.2|130|beta=1}}<br />
|}<br />
<br />
== Pocket Protocol Versions ==<br />
<br />
<nowiki>Soon!</nowiki><br />
<br />
[[Category:Bedrock Minecraft]]</div>Orladoghttps://wiki.vg/index.php?title=Client_List&diff=17514Client List2022-06-02T19:53:32Z<p>Orladog: Mineweb development was stopped in favour of prismarine-web-client</p>
<hr />
<div>{{ToolsNavbox}}<br />
This is a rather incomplete list of Minecraft clients that users have worked or are working on. This page only lists clients written from scratch; for mods and wrappers, see the [[Utility List]] and the [[Wrapper List]].<br />
<br />
The column ''Game Graphics'' asks if your client displays in-game activity at a graphical level, such as world chunks, people or mobs moving, or any of that sort. If you are simply displaying things as text, that does '''not''' count. You can also optionally tell us the library you're using for your game graphics while providing your answer.<br />
<br />
If you want to add your client, just append it above all others (On the bottom are projects, that are inactive (sorted by date). All active clients are sorted after version. If your client does not support the latest version, it is below the others).<br style="clear:both;" /><br />
<br />
{| class="wikitable sortable" style="text-align: center;"<br />
|-<br />
! Name<br />
!class="unsortable"| Features<br />
! Author(s)<br />
! Language<br />
! License<br />
! Threaded<br />
! Game Graphics<br />
! Last Version Supported<br />
! Development Status<br />
|-<br />
! [https://github.com/adepierre/Botcraft Botcraft]<br />
| C++ Client Library<br />
| [https://github.com/adepierre adepierre]<br />
| {{C++}}<br />
| [http://www.gnu.org/copyleft/gpl.html GPLv3]<br />
| {{yes}}<br />
| {{yes}}<br />
| {{yes|All release versions from 1.12.2 to 1.18.2}}<br />
| {{yes|Active}}<br />
|-<br />
! [https://github.com/Defective4/Another-Minecraft-Chat-Client Another Minecraft Chat Client]<br />
| A GUI Minecraft Chat Client written from scratch in Java with basic movement, inventory handling, and automatic chat messages<br />
| [https://github.com/Defective4 Defective4]<br />
| [http://en.wikipedia.org/wiki/Java_(programming_language) Java]<br />
| [http://www.apache.org/licenses/LICENSE-2.0.html Apache V2]<br />
| {{yes}}<br />
| {{planned|Planned}}<br />
| {{yes|1.8 - 1.18.2 + Forge (1.8 - 1.12.2)}}<br />
| {{yes|Active}}<br />
|-<br />
! [https://github.com/PrismarineJS/prismarine-web-client prismarine-web-client]<br />
| Minecraft client in the browser using PrismarineJS modules<br />
| [https://github.com/Karang Karang] [https://github.com/rom1504 rom1504] [https://github.com/AwesomestCode AwesomestCode] and other contributors<br />
| [https://en.wikipedia.org/wiki/JavaScript Javascript],[http://nodejs.org/ node.js]<br />
| {{MIT}}<br />
| {{yes}}<br />
| {{yes}}<br />
| {{yes|1.8-1.18.1}}<br />
| {{yes|Active}}<br />
|-<br />
! [https://gitlab.bixilon.de/bixilon/minosoft Minosoft]<br />
| A faster work in progress open source client, that supports a ton of versions and is open for all kind of patches. Feel free to take a look at the [https://gitlab.bixilon.de/bixilon/minosoft/-/blob/master/ReadMe.md ReadMe.md]<br />
| [https://bixilon.de/ Bixilon], contributors<br />
| [https://github.com/jetbrains/kotlin Kotlin], {{Java}}<br />
| [http://www.gnu.org/copyleft/gpl.html GPLv3]<br />
| {{yes}}<br />
| {{yes|Yes, using [https://www.opengl.org/ OpenGL]}}<br />
| {{yes|Releases + Snapshots 13w41b-1.18.}}<br />
| {{yes|Active}}<br />
|-<br />
! [https://github.com/PrismarineJS/mineflayer mineflayer]<br />
| Create Minecraft bots with a powerful, stable, and high level JavaScript API.<br />
| [https://github.com/PrismarineJS PrismarineJS]<br />
| [http://nodejs.org/ node.js]<br />
| {{MIT}}<br />
| {{no}}<br />
| {{no}}<br />
| {{yes|1.8-1.18.1}}<br />
| {{yes|Active}}<br />
|-<br />
! [https://github.com/iceiix/stevenarella Stevenarella]<br />
| Multiprotocol<br />
| [https://github.com/Thinkofname/ Thinkofname], [https://github.com/iceiix/ iceiix]<br />
| [https://www.rust-lang.org/ Rust]<br />
| [http://www.apache.org/licenses/LICENSE-2.0.html Apache V2]<br />
| {{yes}}<br />
| {{yes}}<br />
| {{no|1.17.1, 1.16.5, 1.16.4, 1.16.3, 1.16.2, 1.16.1, 1.16, 1.15.2, 1.15.1, 1.14.2, 1.14.1, 1.14, 19w02a, 18w50a, 1.13.2, 1.12.2, 1.11.2, 1.11, 1.10.2, 1.9.2, 1.9, 15w39c, 1.8.9, 1.7.10+Forge (FML, FML2)}}<br />
| {{yes|Active}}<br />
|-<br />
! [https://github.com/Tnze/go-mc/ go-mc]<br />
| Create Minecraft bots with golang<br />
| Tnze<br />
| [https://golang.org Go]<br />
| {{MIT}}<br />
| {{yes}}<br />
| {{no}}<br />
| {{no|1.17}}<br />
| {{yes|Active}}<br />
|-<br />
! [https://github.com/Lea-fish/Leafish Leafish]<br />
| Multiprotocol, Fork of Stevenrella<br />
| [https://github.com/terrarier2111 terrarier2111], [https://github.com/Lea-fish/Leafish/graphs/contributors other contributors]<br />
| [https://www.rust-lang.org/ Rust]<br />
| [http://www.apache.org/licenses/LICENSE-2.0.html Apache V2], [https://en.wikipedia.org/wiki/MIT_License MIT]<br />
| {{yes}}<br />
| {{yes}}<br />
| {{no|1.7.10 - 1.16.5}}<br />
| {{yes|Active}}<br />
|-<br />
! [https://github.com/michaljaz/web-minecraft web-minecraft]<br />
| Minecraft client in web browser using THREE.js<br />
| [https://github.com/michaljaz michaljaz]<br />
| [https://pl.wikipedia.org/wiki/JavaScript Javascript],[http://nodejs.org/ node.js]<br />
| {{MIT}}<br />
| {{yes}}<br />
| {{yes}}<br />
| {{no|1.16.5}}<br />
| {{yes|Active}}<br />
|-<br />
! [https://github.com/ORelio/Minecraft-Console-Client Minecraft Console Client]<br />
| Command-line chat client with C# bot support<br />
| [https://github.com/ORelio ORelio]<br />
| {{C sharp}}<br />
| [http://opensource.org/licenses/CDDL-1.0 CDDL-1.0]<br />
| {{yes}}<br />
| {{no}}<br />
| {{no|1.16.4}}<br />
| {{yes|Active}}<br />
|-<br />
! [https://github.com/stackotter/delta-client delta-client]<br />
| A Minecraft Client for MacOS written in Swift<br />
| [https://github.com/stackotter stackotter]<br />
| [https://developer.apple.com/swift/ Swift] and some [https://en.wikipedia.org/wiki/C_(programming_language) C]<br />
| {{GPLv3}}<br />
| {{yes}}<br />
| {{yes|Yes, using [https://developer.apple.com/metal/ Metal]}}<br />
| {{no|1.16.1}}<br />
| {{yes|Active}}<br />
|-<br />
! [https://github.com/LaG1924/AltCraft AltCraft]<br />
| WIP C++ client<br />
| [https://github.com/LaG1924/ LaG1924]<br />
| [http://en.wikipedia.org/wiki/C++ C++]<br />
| [http://www.apache.org/licenses/LICENSE-2.0.html Apache V2]<br />
| {{yes}}<br />
| {{yes}}<br />
| {{no|1.12.2}}<br />
| {{yes|Active}}<br />
|-<br />
! [https://github.com/SpockBotMC/RikerBot RikerBot]<br />
| Bot Client Framework<br />
| [https://github.com/nickelpro nickelpro]<br />
| {{C++}}, {{Python}}<br />
| [https://en.wikipedia.org/wiki/Zlib_License zlib]<br />
| {{no}}<br />
| {{no}}<br />
| {{no|1.16.5}}<br />
| {{unknown|On hiatus since july 2020}}<br />
|-<br />
! [https://github.com/ammaraskar/pyCraft pyCraft]<br />
| Work in progress client, displays chat at the moment<br />
| Ammar Askar, resba<br />
| {{Python}}<br />
| {{Apache}}<br />
| {{yes}}<br />
| {{no}}<br />
| {{no|1.16.4}}<br />
| {{unknown|On hiatus since december 2020}}<br />
|-<br />
! [https://github.com/qubard/mcidle-python mcidle]<br />
| Idling middleware for constant Minecraft connections<br />
| [https://github.com/qubard cub]<br />
| {{Python}}<br />
| {{MIT}}<br />
| {{yes}}<br />
| {{no}}<br />
| {{no|1.12.2}}<br />
| {{no|Inactive}}<br />
|-<br />
! [https://minewebmc.github.io/ mineweb]<br />
| A work-in-progress HTML5 Minecraft client that runs in your browser<br />
| [https://github.com/Heath123/ Heath123], [https://github.com/TheAlan404/ TheAlan404], SiebeDW<br />
| [http://nodejs.org/ node.js]<br />
| Undecided (will be open-source)<br />
| {{no}}<br />
| {{yes|Yes, using [https://github.com/andyhall/noa noa]}}<br />
| {{no|1.12.2 (may work on other versions but not tested)}}<br />
| {{no|Development stopped in favour of prismarine-web-client}}<br />
|-<br />
! [https://github.com/willemml/rust-mc rust-mc]<br />
| Minecraft client written in rust, very WIP, no rendering.<br />
| [https://github.com/willemml willemml]<br />
| [https://www.rust-lang.org/ Rust]<br />
| {{GPLv3}}<br />
| {{yes}}<br />
| {{no}}<br />
| {{no|1.16.3 and 1.15.2 (requires recompile)}}<br />
| {{unknown|On hiatus since November 2020}}<br />
|-<br />
! [https://github.com/willemml/hl-mc-kt hl-mc-kt]<br />
| API for creating bots/clients, also has a built in CLI for launching instances of the built-in chat bot, also works as a chat CLI supporting multiple servers at once using one or more accounts.<br />
| [https://github.com/willemml willemml]<br />
| [https://github.com/jetbrains/kotlin Kotlin]<br />
| {{GPLv3}}<br />
| {{yes}}<br />
| {{no}}<br />
| {{no|1.16.3}}<br />
| {{unknown|On hiatus since December 2020}}<br />
|-<br />
! [https://github.com/Xandaros/MinecraftCLI MinecraftCLI]<br />
| Command-line client with chat commands<br />
| [https://github.com/Xandaros Xandaros]<br />
| Haskell<br />
| [https://opensource.org/licenses/BSD-2-Clause BSD-2-Clause]<br />
| {{yes}}<br />
| {{no}}<br />
| {{no|1.12.2}}<br />
| {{unknown|On hiatus since April 2018}}<br />
|-<br />
! [https://github.com/Litecrafty/Litecraft Litecraft]<br />
| Work in progress, concurrent and Multi-Render backend.<br />
| [https://github.com/Litecrafty/ Litecraft Team]<br />
| {{D}}<br />
| [http://www.apache.org/licenses/LICENSE-2.0.html Apache 2.0]<br />
| {{yes}}<br />
| {{yes}}<br />
| {{no|1.12.2}}<br />
| {{unknown|On hiatus since January 2019}}<br />
|-<br />
! [https://github.com/Toranktto/CraftProtocol CraftProtocol]<br />
| Open source partial implementation of Minecraft network protocol and NBT in Python 2.7.<br />
| [https://github.com/Toranktto Toranktto]<br />
| {{Python}}<br />
| {{MIT}}<br />
| {{no}}<br />
| {{no}}<br />
| {{no|1.8.x, 1.10.x, 1.12.2}}<br />
| {{unknown|On hiatus since September 2018}}<br />
|-<br />
! [https://github.com/Thinkofname/steven steven]<br />
| Compiles<br />
| [https://github.com/Thinkofname/ Thinkofname]<br />
| [https://www.rust-lang.org/ Rust]<br />
| [http://www.apache.org/licenses/LICENSE-2.0.html Apache V2]<br />
| {{yes}}<br />
| {{yes}}<br />
| {{no|1.10.2}}<br />
| {{no|Inactive}}<br />
|-<br />
! [https://github.com/JavaProphet/Osmium Osmium]<br />
| Rendering Client in C<br />
| [https://github.com/JavaProphet JavaProphet]<br />
| {{C}}<br />
| [http://www.gnu.org/copyleft/gpl.html GPLv3]<br />
| {{yes}}<br />
| {{yes}}<br />
| {{no|1.9.4}}<br />
| {{unknown|On hiatus since August 2016}}<br />
|-<br />
! [https://github.com/Thinkofname/steven-go steven-go]<br />
| Compiles<br />
| [https://github.com/Thinkofname/ Thinkofname]<br />
| [http://golang.org/ Go]<br />
| [http://www.apache.org/licenses/LICENSE-2.0.html Apache V2]<br />
| {{yes}}<br />
| {{yes}}<br />
| {{no|15w32c}}<br />
| {{no|Inactive}}<br />
|-<br />
! [https://github.com/PistonDevelopers/hematite Hematite]<br />
| Render singleplayer worlds (most blocks supported, no entities)<br />
| [http://www.piston.rs/ Piston] developers<br />
| [http://www.rust-lang.org/ Rust]<br />
| {{MIT}}<br />
| {{unknown}}<br />
| {{yes}}<br />
| {{no|1.8.8}}<br />
| {{unknown|On hiatus since February 2019}}<br />
|-<br />
! [https://github.com/SpockBotMC/SpockBot SpockBot]<br />
| SMP Bot framework, based on BarneyGale's protocol implementation<br />
| [https://github.com/SpockBotMC/SpockBot/graphs/contributors The SpockBot Project]<br />
| {{Python}}<br />
| {{MIT}}<br />
| {{no}}<br />
| {{planned|Planned with plugin}}<br />
| {{no|1.8.7}}<br />
| {{unknown|On hiatus since May 2016}}<br />
|-<br />
! [https://github.com/woder/torchbot TorchBot]<br />
| Work in progress standalone bot written from scratch in java, currently supports key features of game(movement, chat, world handling) and plugin system!<br />
| woder22<br />
| {{Java}}<br />
| {{GPLv3}}<br />
| {{yes}}<br />
| {{no}}<br />
| {{no|1.12}}<br />
| {{unknown|On hiatus since April 2018}}<br />
|-<br />
! [http://reticle.mc-atlantida.eu/wiki Reticle]<br />
| Advanced minecraft bot system - Multi-server, API, Plugin system etc<br />
| Encorn<br />
| {{Java}}<br />
| Closed source, binaries {{MIT}}<br />
| {{yes}}<br />
| {{yes|Yes, using Bundle plugin}}<br />
| {{no|1.8}}<br />
| {{unknown|Website down}}<br />
|-<br />
! [https://github.com/phase/minekraft minekraft]<br />
| Minecraft remade in Kotlin. It will soon have all the features of Minecraft and more.<br />
| [https://github.com/phase Phase]<br />
| [https://github.com/jetbrains/kotlin Kotlin]<br />
| {{MIT}}<br />
| {{planned|Maybe}}<br />
| {{planned|OpenGL Planned}}<br />
| {{no|1.8}}<br />
| {{unknown|On hiatus since June 2015}}<br />
|-<br />
! [https://github.com/phase/phasebot PhaseBot]<br />
| A bot that can move, interact with blocks, and loads of other things.<br />
| [https://github.com/phase Phase]<br />
| {{Java}}<br />
| {{no|No License}}<br />
| {{planned|Maybe}}<br />
| {{no|Controlled through chat}}<br />
| {{no|1.8}}<br />
| {{unknown|On hiatus since February 2016}}<br />
|-<br />
! [https://github.com/DarkStorm652/DarkBot DarkBot]<br />
| Bot framework with an easy-to-use API, full world representation, path finding, AI via tasks (mining, farming, combat), and modular protocol handling<br />
| [https://github.com/DarkStorm652 DarkStorm]<br />
| {{Java}}<br />
| {{BSD}}<br />
| {{yes}}<br />
| {{no}}<br />
| {{no|1.7.9}}<br />
| {{unknown| On hiatus since July 2014}}<br />
|-<br />
! [https://github.com/umby24/Minebot C# Minebot]<br />
| Work in progress standalone bot<br />
| Umby24<br />
| {{C sharp}}<br />
| {{MIT}}<br />
| {{yes}}<br />
| {{no}}<br />
| {{no|1.6.4}}<br />
| {{unknown|On hiatus since July 2014}}<br />
|-<br />
! [https://github.com/Dav1dde/BraLa BraLa]<br />
| Minecraft (S)MP-Client, slogan: "Minecraft on a lower (WTF?) level"<br />
| Dav1d<br />
| {{D}}<br />
| {{GPLv3}}<br />
| {{yes}}<br />
| {{yes}}<br />
| {{no|1.6.2}}<br />
| {{unknown|On hiatus since March 2014}}<br />
|-<br />
! [https://github.com/DavidEGrayson/redstone-bot2 redstone-bot2]<br />
| Wheat farming, supersonic flying speed, general awareness of world, but no documentation.<br />
| DavidEGrayson<br />
| {{Ruby}}<br />
| TBD<br />
| {{yes}}<br />
| {{no}}<br />
| {{no|1.6.2}}<br />
| {{unknown|On hiatus since December 2013}}<br />
|-<br />
! [https://github.com/SpoutDev/Spout Spout] (with [https://github.com/VanillaDev/Vanilla Vanilla] plugin)<br />
| Open source, multi-threaded voxel game framework and platform that opens the doors for infinite possibilities. Features infinite height worlds, infinite content, advanced modeling support, and more!<br />
| [http://www.spout.org Spout LLC] and community<br />
| {{Java}}<br />
| [http://spout.in/licensev1 Spout License v1]<br />
| {{yes}}<br />
| {{yes|Yes, using [http://www.lwjgl.org LWJGL]}}<br />
| {{no|1.5.2}}<br />
| {{unknown|On hiatus since December 2013}}<br />
|-<br />
! [https://github.com/lukleh/TwistedBot TwistedBot]<br />
| bot and proxy, up to date information in readme on github<br />
| [https://twitter.com/lukleh lukleh]<br />
| {{Python}}, {{Twisted}}<br />
| {{BSD}}<br />
| {{no}}<br />
| {{no}}<br />
| {{no|1.5.2}}<br />
| {{unknown|On hiatus since May 2013}}<br />
|-<br />
! [https://code.google.com/p/mc-bot mcbot]<br />
| Minecraft NPC emulator<br />
| Shagrat<br />
| {{Pascal}} Delphi XE2<br />
| {{Unknown}}<br />
| {{yes}}<br />
| {{Yes|Debug 2.5 D}}<br />
| {{no|1.5.2}}<br />
| {{unknown|On hiatus since September 2013}}<br />
|-<br />
! [https://github.com/shoghicp/Minecraft-PHP-Client-2 Minecraft PHP Client&nbsp;2]<br />
| Complete rewrite of "Minecraft PHP Client". Has events and actions, and it's modular. Supports online mode and Spoutcraft<br />
| [https://twitter.com/shoghicp shoghicp]<br />
| {{PHP}}<br />
| {{WTFPL}}<br />
| {{no}}<br />
| {{planned|Convert Map to PNG}}<br />
| {{no|1.5.1}}<br />
| {{no|Marked "Outdated". Last Commit March 2013}}<br />
|-<br />
! [https://github.com/Charged/Miners Charged Miners]<br />
| Minecraft Viewer, can connect to classic servers.<br />
| Wallbraker et al.<br />
| {{D}}, {{Lua}}<br />
| {{GPLv2}}<br />
| {{no}}<br />
| {{yes}}<br />
| {{no|1.3.2}}<br />
| {{unknown|On hiatus since August 2017}}<br />
|-<br />
! [http://www.planetminecraft.com/project/new-c-driven-minecraft-client-461392/ Revolutional RedStone]<br />
| Partial Redstone support<br />
| RevolutionalRedstone<br />
| {{C++}}, {{Lua}}<br />
| {{Unknown}}<br />
| {{yes}}<br />
| {{yes}}<br />
| {{no|1.3.2}}<br />
| {{unknown|On hiatus since July 2012}}<br />
|-<br />
! [https://github.com/shoghicp/Minecraft-PHP-Client Minecraft PHP Client]<br />
| "- Superseded by Minecraft PHP Client 2 -" It can move and do other things. [http://shoghicp.wordpress.com/2012/04/08/minecraft-php-client/ Spanish Website]<br />
| [https://twitter.com/shoghicp shoghicp]<br />
| {{PHP}}<br />
| {{LGPL}}<br />
| {{yes|Yes, but only linux}}<br />
| {{no}}<br />
| {{no|1.2.5}}<br />
| {{no|Inactive}}<br />
|-<br />
! [https://github.com/Vijfhoek/Sharpcraft Sharpcraft]<br />
| Work in progress SMP (might add SSP) client.<br />
| [https://github.com/Vijfhoek Vijfhoek] and [https://github.com/F16Gaming F16Gaming]<br />
| {{C sharp}}<br />
| {{GPLv3}}<br />
| {{yes}}<br />
| {{yes|Yes, using [http://en.wikipedia.org/wiki/Microsoft_XNA XNA]}}<br />
| {{no|1.2.5}}<br />
| {{no|Inactive}}<br />
|-<br />
! [https://github.com/axus/libmc--c mc--c]<br />
| Draw the map. Can't talk or move.<br />
| axus<br />
| {{C++}}<br />
| {{LGPL}}<br />
| {{no}}<br />
| {{yes}}<br />
| {{no|1.1}}<br />
| {{unknown|On hiatus since October 2012}}<br />
|-<br />
! [https://github.com/espes/esbot esbot]<br />
| dependency gathering and other awesomeness<br />
| espes<br />
| {{Python}}, {{Twisted}}<br />
| {{GPLv3}}<br />
| {{no}}<br />
| {{no}}<br />
| {{no|Beta 1.8.1}}<br />
| {{unknown|On hiatus since September 2011}}<br />
|-<br />
! [https://github.com/ddevault/TrueCraft TrueCraft]<br />
| Beta 1.7.3 client for Linux and Windows (and OS X, somewhat)<br />
| SirCmpwn and [https://github.com/SirCmpwn/TrueCraft/graphs/contributors others]<br />
| {{C sharp}}<br />
| {{MIT}}<br />
| {{yes}}<br />
| {{yes}}<br />
| {{no|Beta 1.7.3*}}<br />
| {{no|Inactive}}<br />
|-<br />
! [http://hg.sitedethib.com/mcclient/ mcclient]<br />
| Work in progress SMP client<br />
| ThibG<br />
| {{Python}} with {{C}} extension<br />
| {{GPLv3}}<br />
| {{no}}<br />
| {{yes}}<br />
| {{no|Beta 1.7.2}}<br />
| {{unknown|On hiatus since September 2012}}<br />
|-<br />
! [https://github.com/jrupac/minecraft-opengl minecraft-opengl]<br />
| Draw the map, move around, break stuff, gather stuff, etc.; doesn't appear to have networking<br />
| Rohan Bansal, Dmitry Drutskoy, Ajay Roopakalu, Sarah Tang<br />
| {{C++}} with {{OpenGL}}<br />
| {{GPLv2}}<br />
| {{no}}<br />
| {{yes}}<br />
| {{no|Beta 1.6.6}}<br />
| {{unknown|Last code change June 2011}}<br />
|-<br />
! [https://github.com/zerowidth/golem golem]<br />
| ruby 1.9/eventmachine client, acts as a standalone bot or transparent proxy<br />
| zerowidth<br />
| {{Ruby}}<br />
| {{MIT}}<br />
| {{no}}<br />
| {{no}}<br />
| {{no|Beta 1.4}}<br />
| {{no|Inactive}}<br />
|}<br />
<br />
* TrueCraft is being actively developed against beta 1.7.3 and intentionally does not support newer versions<br />
<br />
[[Category:Minecraft Modern]]</div>Orladoghttps://wiki.vg/index.php?title=Bedrock_Protocol&diff=16434Bedrock Protocol2021-02-23T20:45:33Z<p>Orladog: /* Client To Server Handshake */</p>
<hr />
<div>:: '''Remember that this page is a WIP'''. Come back later to see a more complete page.<br />
----<br />
<br />
{{Box<br />
|BORDER = #9999FF<br />
|BACKGROUND = #99CCFF<br />
|WIDTH = 100%<br />
|ICON = <br />
|HEADING = Heads up!<br />
|CONTENT = This article is about the protocol for the release of Minecraft '''Bedrock Edition''' ([[Bedrock Protocol version numbers|1.16.20, protocol 408]]). See [[Protocol]] for the Java Edition Protocol.<br />
}}<br />
<br />
This is the [https://minecraft.gamepedia.com/Bedrock_Edition Bedrock Edition] Protocol Documentation.<br />
The Bedrock Edition Protocol uses [[wikipedia:User Datagram Protocol|UDP]] instead of [[wikipedia:Transmission Control Protocol|TCP]] that is used for the Java Edition.<br />
Bedrock Edition uses [[Raknet Protocol|RakNet]] as its protocol library.<br />
<br />
The default Bedrock Edition port is 19132.<br />
<br />
Information for this page was obtained from the [https://github.com/NukkitX/Protocol NukkitX Protocol library], [https://github.com/NiclasOlofsson/MiNET MiNET] and [https://github.com/Sandertv/gophertunnel gophertunnel].<br />
<br />
== Data types ==<br />
<br />
{| class="wikitable"<br />
|-<br />
!<br />
! Size (Bytes)<br />
! Range<br />
! Notes<br />
|-<br />
! Byte<br />
| 1<br />
| 0 to 255<br />
|<br />
|-<br />
! Boolean<br />
| 1<br />
| 0 or 1<br />
| A Byte treated as boolean, 0 is false but anything greater then that is true<br />
|-<br />
! Short<br />
| 2<br />
| -32768 to 32767<br />
|<br />
|-<br />
! Unsigned Short<br />
| 2<br />
| 0 to 65535<br />
|<br />
|-<br />
! Int<br />
| 4<br />
| -2147483648 to 2147483647<br />
| Signed little-endian 32-bit Integer<br />
|-<br />
! Int (big endian)<br />
| 4<br />
| -2147483648 to 2147483647<br />
| Signed big-endian 32-bit Integer<br />
|-<br />
! Unsigned Int<br />
| 4<br />
| 0 to 4294967295<br />
| Unsigned 32-bit Integer<br />
|-<br />
! Long<br />
| 8<br />
| -2^63 to 2^63-1<br />
| Signed 64-bit Integer<br />
|-<br />
! Unsigned Long<br />
| 8<br />
| 2^64-1<br />
| Unsigned 64-bit Integer<br />
|-<br />
! Float<br />
| 4<br />
| <br />
| A [[wikipedia:Single-precision_Floating-poInt_format|single-precision 32-bit IEEE 754 Floating poInt number]]<br />
|-<br />
! Double<br />
| 8<br />
| <br />
| A [[wikipedia:Double-precision_Floating-poInt_format|Double-precision 64-bit IEEE 754 Floating poInt number]]<br />
|-<br />
! VarInt<br />
| &ge; 1<br>&le; 5<br />
| 0 to 4294967295<br />
| <br />
|-<br />
! SignedVarInt<br />
| &ge; 1<br>&le; 5<br />
| -2147483648 and 2147483647<br />
| <br />
|-<br />
! VarLong<br />
| &ge; 1<br>&le; 10<br />
| <br />
|<br />
|-<br />
! SignedVarLong<br />
| &ge; 1<br>&le; 10<br />
| -2^63 and 2^63-1<br />
|<br />
|-<br />
! String<br />
| <br />
| <br />
| [[wikipedia:UTF-8|UTF-8]] String prefixed with its size in Bytes as a VarInt. This has the same data structure as a ByteArray but it contains textual data.<br />
|-<br />
! Vector3<br />
| 12<br />
| <br />
| Three Float values (X, Y and Z respectively)<br />
|-<br />
! Vector2<br />
| 8<br />
| <br />
| Two Float values (X and Y respectively)<br />
|-<br />
! NBT<br />
| <br />
| <br />
| <br />
|-<br />
! ByteArray<br />
| <br />
| <br />
| An arbitrary array of Bytes prefixed with its size in Bytes as a VarInt.<br />
|-<br />
! BlockCoordinates<br />
| &ge; 3<br>&le; 15<br />
| <br />
| A SignedVarInt, a normal VarInt and another SignedVarInt (X, Y and Z respectively)<br />
|-<br />
! PlayerLocation<br />
| 15<br />
| <br />
| Three Float values (X, Y and Z respectively), followed by three Bytes (pitch, head yaw and yaw respectively). To convert the Bytes to normal pitch and yaw values divide them by 0.71<br />
|-<br />
! UUID<br />
| 16<br />
| A [[wikipedia:Universally_unique_identifier|UUID]]<br />
| Encoded as two unsigned 64-bit Integers: the most significant 64 bits and the least significant 64 bits<br />
|}<br />
<br />
== Packet Format ==<br />
<br />
Bedrock Edition uses [[Raknet Protocol|RakNet]] as its protocol library, so the packets are sent that way. The UDP protocol specifies packet length, so unlike Java Edition and TCP which deal with raw data streams packets are not length-prefixed. Packets seem to always use compression and can also use encryption. Multiple packets can also be batched into a single packet.<br />
Packet compression uses [https://zlib.net/ zlib], and it seems that packet data can be fed directly into zlib (after being decrypted if encryption is enabled).<br />
<br><br><br />
Refer to [https://github.com/Sandertv/gophertunnel/blob/19c96251a36a39d9ffb938053410852e811755e3/minecraft/protocol/packet/decoder.go#L58 gophertunnel] for more information.<br />
<br />
== Login process ==<br />
The login process is as follows:<br />
# C→S: [[#Login|Login]]<br />
# S→C: [[#Server To Client Handshake|Server To Client Handshake]]<br />
# C→S: [[#Client To Server Handshake|Client To Server Handshake]]<br />
# S→C: [[#Play Status|Play Status]] (Login success)<br />
<br />
To spawn, the following packets should be sent, in order, after the ones above:<br />
# S→C: [[#Resource Packs Info|Resource Packs Info]]<br />
# C→S: [[#Resource Pack Client Response|Resource Pack Client Response]]<br />
# S→C: [[#Resource Pack Stack|Resource Pack Stack]]<br />
# C→S: [[#Resource Pack Client Response|Resource Pack Client Response]]<br />
# S→C: [[#Start Game|Start Game]]<br />
# S→C: [[#Creative Content|Creative Content]]<br />
# S→C: [[#Biome Definition List|Biome Definition List]]<br />
# S→C: Chunks<br />
# S→C: [[#Play Status|Play Status]] (Player spawn)<br />
<br />
If there are no resource packs being sent, a [[#Resource Pack Stack|Resource Pack Stack]] can be sent directly after [[#Resource Packs Info|Resource Packs Info]] to avoid the client responses.<br />
<br />
== Packets ==<br />
Please note that some packet ids are missing, so they don't line up.<br />
The following packet ids are missing:<br />
0x10, 0x74, 0x7F, 0x80<br />
(16, 116, 127, 128)<br />
<br />
<br />
==== Login ====<br />
<br />
Sent when the client initially tries to join the server. It is the first packet sent and contains information specific to the player.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x01<br />
|rowspan="3"| Server<br />
| Protocol version<br />
| Int (big-endian)<br />
| <br />
|-<br />
| Chain data<br />
| JSON array of JWT Data<br />
| Contains the display name, UUID and XUID<br />
|-<br />
| Skin data<br />
| JWT Data<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Play Status ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x02<br />
|rowspan="1"| Client<br />
| Status<br />
| Int (big-endian)<br />
| The current status of the connection.<br />
|}<br />
<br />
The values for each status are as follows:<br />
{| class="wikitable"<br />
! Status<br />
! Name<br />
! Notes<br />
|-<br />
| 0<br />
| Login success<br />
| Sent after [[#Login|Login]] has been successfully decoded and the player has logged in<br />
|-<br />
| 1<br />
| Failed client<br />
| Displays "Could not connect: Outdated client!"<br />
|-<br />
| 2<br />
| Failed server<br />
| Displays "Could not connect: Outdated server!"<br />
|-<br />
| 3<br />
| Player spawn<br />
| Sent after world data to spawn the player<br />
|-<br />
| 4<br />
| Failed invalid Tenant<br />
| Displays "Unable to connect to world. Your school does not have access to this server."<br />
|-<br />
| 5<br />
| Failed Vanilla Edu.<br />
| Displays "The server is not running Minecraft: Education Edition. Failed to connect."<br />
|-<br />
| 6<br />
| Failed Edu. Vanilla<br />
| Displays "The server is running an incompatible edition of Minecraft. Failed to connect."<br />
|-<br />
| 7<br />
| Failed server full<br />
| Displays "Wow this server is popular! Check back later to see if space opens up. Server Full"<br />
|}<br />
<br />
==== Server To Client Handshake ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x03<br />
|rowspan="1"| Client<br />
| JWT data<br />
| JWT String<br />
| Contains the salt to complete the Diffie-Hellman key exchange<br />
|}<br />
<br />
<br />
<br />
==== Client To Server Handshake ====<br />
<br />
Sent by the client in response to a [[#Server To Client Handshake|Server To Client Handshake]] packet sent by the server. It is the first encrypted packet in the login handshake and serves as a confirmation that encryption is correctly initialized client side. It has no fields.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x04<br />
|rowspan="1"| Server<br />
|colspan="3" | This packet has no data.<br />
|}<br />
<br />
==== Disconnect ====<br />
<br />
Sent by the server to disconnect a client.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x05<br />
|rowspan="2"| Client<br />
| Hide disconnect screen<br />
| Boolean<br />
| Specifies if the disconnection screen should be hidden when the client is disconnected, meaning it will be sent directly to the main menu.<br />
|-<br />
| Kick message<br />
| String<br />
| An optional message to show when disconnected.<br />
|}<br />
<br />
<br />
<br />
==== Resource Packs info ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x06<br />
|rowspan="4"| Client<br />
| Forced to Accept<br />
| Boolean<br />
| If the resource pack requires the client accept it.<br />
|-<br />
| Scripting Enabled<br />
| Boolean<br />
| If scripting is enabled.<br />
|-<br />
| BehahaviorPackInfos<br />
| ResourcePackInfo[]<br />
| A list of behaviour packs that the client needs to download before joining the server. All of these behaviour packs will be applied together.<br />
|-<br />
| ResourcePackInfos<br />
| ResourcePackInfo[]<br />
| A list of resource packs that the client needs to download before joining the server. The order of these resource packs is not relevant in this packet. It is however important in the Resource Pack Stack packet.<br />
|}<br />
<br />
<br />
<br />
==== Resource Pack Stack ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! colspan="2" | Field Name<br />
! colspan="2" | Field Type<br />
! Notes<br />
|-<br />
| rowspan="11" | 0x07<br />
| rowspan="11" | Client<br />
| colspan="2" | Forced to Accept<br />
| colspan="2" | Boolean<br />
| If the resource pack must be accepted for the player to join the server.<br />
|-<br />
! Resource Pack Entry<br />
! Field Name<br />
! colspan="2" | <br />
! <br />
|-<br />
| rowspan="3" | Array<br />
| Pack ID<br />
| colspan="2" | String<br />
| The ID of the resource pack.<br />
|-<br />
| Pack Version<br />
| colspan="2" | String<br />
| The version of the resource pack.<br />
|-<br />
| Subpack Name<br />
| colspan="2" | String<br />
| The subpack name of the resource pack.<br />
|-<br />
! Behavior Pack Entry<br />
! Field Name<br />
! colspan="2" | <br />
! <br />
|-<br />
| rowspan="3" | Array<br />
| Pack ID<br />
| colspan="2" | String<br />
| The ID of the resource pack.<br />
|-<br />
| Pack Version<br />
| colspan="2" | String<br />
| The version of the resource pack.<br />
|-<br />
| Subpack Name<br />
| colspan="2" | String<br />
| The subpack name of the resource pack.<br />
|-<br />
| colspan="2" | Experimental<br />
| colspan="2" | Boolean<br />
| If the sent resource and behavior packs are experimental.<br />
|-<br />
| colspan="2" | Game Version<br />
| colspan="2" | String<br />
| The version of the game the sent resource and behavior packs were made for.<br />
|}<br />
<br />
<br />
<br />
==== Resource Pack Response ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x08<br />
|rowspan="2"| Server<br />
| Status<br />
| Byte<br />
| See below<br />
|-<br />
| Pack IDs<br />
| ResourcePackIds<br />
| All of the pack IDs.<br />
|}<br />
<br />
The values for each status are as follows:<br />
{| class="wikitable"<br />
! Status<br />
! Name<br />
! Notes<br />
|-<br />
| 0<br />
| None<br />
| <br />
|-<br />
| 1<br />
| Refused<br />
| <br />
|-<br />
| 2<br />
| Send packs<br />
|<br />
|-<br />
| 3<br />
| Have all packs<br />
| <br />
|-<br />
| 4<br />
| Completed<br />
|<br />
|}<br />
<br />
<br />
<br />
==== Text ====<br />
<br />
Sent by the client to the server to send chat messages, and by the server to the client to forward or send messages, which may be chat, popups, tips etc.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! colspan="2" | Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| rowspan="9" | 0x09<br />
| rowspan="9" | Server &amp; Client<br />
| colspan="2" | Type<br />
| Byte<br />
| The type of chat message sent.<br />
|-<br />
| colspan="2" | Needs Translation<br />
| Boolean<br />
| If the message sent is a translation key and needs to be translated.<br />
|-<br />
! Chat Type ID<br />
! Text<br />
! <br />
! Derived from above; values sent here change depending on that.<br />
|-<br />
| rowspan="1" | 0, 1, or 2<br />
| rowspan="1" | Source Name<br />
| rowspan="1" | String<br />
| rowspan="1" | The name of the source.<br />
|-<br />
|-<br />
|-<br />
| rowspan="1" | 3, 4, or 5<br />
| rowspan="1" | Message<br />
| rowspan="1" | String<br />
| rowspan="1" | The message sent with the packet.<br />
|-<br />
|-<br />
|-<br />
|-<br />
| rowspan="2" | 6, 7, or 8<br />
| Message<br />
| String<br />
| The message sent with the packet<br />
|-<br />
| Parameters<br />
| Array<br />
| The parameters sent with the packet. This usually includes translation parameters or similar types depending on what kind of chat type was sent.<br />
|-<br />
| colspan="2" | XUID<br />
| Optional String<br />
| The XUID of the player who sent this message.<br />
|-<br />
| colspan="2" | Platform Chat ID<br />
| Optional String<br />
| The platform chat ID of the sent message.<br />
|}<br />
<br />
{| class="wikitable"<br />
! ID<br />
! Chat Type<br />
|-<br />
| 0<br />
| Raw<br />
|-<br />
| 1<br />
| Chat<br />
|-<br />
| 2<br />
| Translation<br />
|-<br />
| 3<br />
| Popup<br />
|-<br />
| 4<br />
| Jukebox Popup<br />
|-<br />
| 5<br />
| Tip<br />
|-<br />
| 6<br />
| System<br />
|-<br />
| 7<br />
| Whisper<br />
|-<br />
| 8<br />
| Announcement<br />
|-<br />
| 9<br />
| Object<br />
|-<br />
| 10<br />
| Object Whisper<br />
|}<br />
<br />
For additional information and examples of all the chat types above, see here: https://imgur.com/a/KhcFscg<br />
<br />
<br />
<br />
==== Set Time ====<br />
<br />
Sent by the server to update the current time client-side. The client actually advances time client-side by itself, so this packet does not need to be sent each tick. It is merely a means of synchronizing time between server and client.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x0A<br />
|rowspan="1"| Client<br />
| Time<br />
| SignedVarInt<br />
| Time is the current time. The time is not limited to 24000 (time of day), but continues progressing after that.<br />
|}<br />
<br />
<br />
<br />
==== Start Game ====<br />
<br />
Sent by the server to send information about the world the player will be spawned in.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="54"| 0x0B<br />
|rowspan="54"| Client<br />
| Entity ID Self<br />
| SignedVarLong<br />
| The unique ID of the player. The unique ID is a value that remains consistent across different sessions of the same world, but most unofficial servers simply fill the runtime ID of the entity out for this field.<br />
|-<br />
| Runtime Entity ID<br />
| VarLong<br />
| The runtime ID of the player. The runtime ID is unique for each world session, and entities are generally identified in packets using this runtime ID.<br />
|-<br />
| Player Gamemode<br />
| SignedVarInt<br />
|-<br />
| Spawn<br />
| Vector3<br />
| The spawn position of the player in the world. In servers this is often the same as the world's spawn position found below.<br />
|-<br />
| Rotation<br />
| Vector2<br />
| The pitch and yaw of the player<br />
|-<br />
| Seed<br />
| SignedVarInt<br />
| The seed used to generate the world. Unlike in Java edition, the seed is a 32bit Integer here.<br />
|-<br />
| Spawn Biome Type<br />
| Short<br />
| <br />
|-<br />
| Custom Biome Name<br />
| String<br />
| <br />
|-<br />
| Dimension<br />
| SignedVarInt<br />
| Dimension is the ID of the dimension that the player spawns in. It is a value from 0-2, with 0 being the overworld, 1 being the nether and 2 being the end.<br />
|-<br />
| Generator<br />
| SignedVarInt<br />
| Generator is the generator used for the world. It is a value from 0-4, with 0 being old limited worlds, 1 being infinite worlds, 2 being flat worlds, 3 being nether worlds and 4 being end worlds. A value of 0 will actually make the client stop rendering chunks you send beyond the world limit.<br />
|-<br />
| World Gamemode<br />
| SignedVarInt<br />
| The game mode that a player gets when it first spawns in the world. It is shown in the settings and is used if the Player Gamemode is set to 5.<br />
|-<br />
| Difficulty<br />
| SignedVarInt<br />
| Difficulty is the difficulty of the world. It is a value from 0-3, with 0 being peaceful, 1 being easy, 2 being normal and 3 being hard.<br />
|-<br />
| World Spawn<br />
| BlockCoordinates <br />
| The block on which the world spawn of the world. This coordinate has no effect on the place that the client spawns, but it does have an effect on the direction that a compass poInts.<br />
|-<br />
| Has achievements disabled<br />
| Boolean<br />
| Defines if achievements are disabled in the world. The client crashes if this value is set to true while the player's or the world's game mode is creative, and it's recommended to simply always set this to false as a server.<br />
|-<br />
| Day cycle stop time<br />
| SignedVarInt<br />
| The time at which the day cycle was locked if the day cycle is disabled using the respective game rule. The client will maIntain this time as Boolean as the day cycle is disabled.<br />
|-<br />
| EDU offer<br />
| SignedVarInt<br />
| Some Minecraft: Education Edition field that specifies what 'region' the world was from, with 0 being None, 1 being RestOfWorld, and 2 being China. The actual use of this field is unknown.<br />
|-<br />
| Has Education Edition features enabled<br />
| Boolean<br />
| Specifies if the world has education edition features enabled, such as the blocks or entities specific to education edition.<br />
|-<br />
| Education Production ID<br />
| String<br />
|<br />
|-<br />
| Rain level<br />
| Float<br />
| The level specifying the Intensity of the rain falling. When set to 0, no rain falls at all.<br />
|-<br />
| Lightning level<br />
| Float<br />
| The level specifying the Intensity of the thunder. This may actually be set independently from the rain level, meaning dark clouds can be produced without rain.<br />
|-<br />
| Has Confirmed Platform Locked Content<br />
| Boolean<br />
| <br />
|-<br />
| Is Multiplayer<br />
| Boolean<br />
| Specifies if the world is a multi-player game. This should always be set to true for servers.<br />
|-<br />
| Broadcast To LAN<br />
| Boolean<br />
| Specifies if LAN broadcast was Intended to be enabled for the world.<br />
|-<br />
| Xbox Live Broadcast Mode<br />
| VarInt<br />
| The mode used to broadcast the joined game across XBOX Live.<br />
|-<br />
| Platform Broadcast Mode<br />
| VarInt<br />
| The mode used to broadcast the joined game across the platform.<br />
|-<br />
| Enable commands<br />
| Boolean<br />
| If commands are enabled for the player. It is recommended to always set this to true on the server, as setting it to false means the player cannot, under any circumstance, use a command.<br />
|-<br />
| Are texture packs required<br />
| Boolean<br />
| Specifies if the texture pack the world might hold is required, meaning the client was forced to download it before joining.<br />
|-<br />
| GameRules<br />
| GameRules<br />
| Defines game rules currently active with their respective values. The value of these game rules may be either 'bool', 'Int32' or 'Float32'. Some game rules are server side only, and don't necessarily need to be sent to the client.<br />
|-<br />
| Bonus Chest<br />
| Boolean<br />
| Specifies if the world had the bonus map setting enabled when generating it. It does not have any effect client-side.<br />
|-<br />
| Map Enabled<br />
| Boolean<br />
| Specifies if the world has the start with map setting enabled, meaning each joining player obtains a map. This should always be set to false, because the client obtains a map all on its own accord if this is set to true.<br />
|-<br />
| Permission Level<br />
| SignedVarInt<br />
| The permission level of the player. It is a value from 0-3, with 0 being visitor, 1 being member, 2 being operator and 3 being custom.<br />
|-<br />
| Server Chunk Tick Range<br />
| Int<br />
| The radius around the player in which chunks are ticked. Most servers set this value to a fixed number, as it does not necessarily affect anything client-side.<br />
|-<br />
| Has Locked Behavior Pack<br />
| Boolean<br />
| Specifies if the texture pack of the world is locked, meaning it cannot be disabled from the world. This is typically set for worlds on the marketplace that have a dedicated texture pack.<br />
|-<br />
| Has Locked Resource Pack<br />
| Boolean<br />
| Specifies if the texture pack of the world is locked, meaning it cannot be disabled from the world. This is typically set for worlds on the marketplace that have a dedicated texture pack.<br />
|-<br />
| Is From Locked World Template<br />
| Boolean<br />
| Specifies if the world from the server was from a locked world template. For servers this should always be set to false.<br />
|-<br />
| Use MSA Gamertags Only<br />
| Boolean<br />
| <br />
|-<br />
| Is From World Template<br />
| Boolean<br />
| Specifies if the world from the server was from a locked world template. For servers this should always be set to false.<br />
|-<br />
| Is World Template Option Locked<br />
| Boolean<br />
| Specifies if the world was a template that locks all settings that change properties above in the settings GUI. It is recommended to set this to true for servers that do not allow things such as setting game rules through the GUI.<br />
|-<br />
| Only Spawn V1 Villagers<br />
| Boolean<br />
| A hack that Mojang put in place to preserve backwards compatibility with old villagers. The his never actually read though, so it has no functionality.<br />
|-<br />
| Game Version<br />
| String<br />
| The version of the game from which Vanilla features will be used. The exact function of this field isn't clear.<br />
|-<br />
| Limited World Width<br />
| Int<br />
|<br />
|-<br />
| Limited World Height<br />
| Int<br />
|<br />
|-<br />
| Is Nether Type<br />
| Boolean<br />
|<br />
|-<br />
| Is Force Experimental Gameplay<br />
| Boolean<br />
|<br />
|-<br />
| Level ID<br />
| String<br />
| A base64 encoded world ID that is used to identify the world.<br />
|-<br />
| World name<br />
| String<br />
| The name of the world that the player is joining. Note that this field shows up above the player list for the rest of the game session, and cannot be changed. Setting the server name to this field is recommended.<br />
|-<br />
| Premium World Template Id<br />
| String<br />
| A UUID specific to the premium world template that might have been used to generate the world. Servers should always fill out an empty String for this.<br />
|-<br />
| Is Trial<br />
| Boolean<br />
| Specifies if the world was a trial world, meaning features are limited and there is a time limit on the world.<br />
|-<br />
| Is Server Side movement enabled<br />
| Boolean<br />
| Specifies if the server is authoritative over the movement of the player, meaning it controls the movement of it.<br />
|-<br />
| Current Tick<br />
| Boolean<br />
| The total time in ticks that has elapsed since the start of the world.<br />
|-<br />
| Enchantment Seed<br />
| SignedVarInt<br />
| The seed used to seed the random used to produce enchantments in the enchantment table. Note that the exact correct random implementation must be used to produce the correct results both client- and server-side.<br />
|-<br />
| Block Palette<br />
| BlockPalette<br />
| A list of all blocks registered on the server.<br />
|-<br />
| Itemstates<br />
| Itemstates<br />
| A list of all items with their legacy IDs which are available in the game. Failing to send any of the items that are in the game will crash mobile clients.<br />
|-<br />
| Multiplayer Correlation ID<br />
| String<br />
| A unique ID specifying the multi-player session of the player. A random UUID should be filled out for this field.<br />
|}<br />
<br />
<br />
<br />
==== Add Player ====<br />
<br />
Sent by the server to make a player entity show up client-side. It is one of the few entities that cannot be sent using the [[#Add Entity|Add Entity]] packet.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="19"| 0x0C<br />
|rowspan="19"| Client<br />
| UUID<br />
| UUID<br />
| UUID is the UUID of the player. It is the same UUID that the client sent in the Login packet at the start of the session. A player with this UUID must exist in the player list (built up using the Player List packet) for it to show up in-game.<br />
|-<br />
| Username<br />
| String<br />
| Username is the name of the player. This username is the username that will be set as the initial name tag of the player.<br />
|-<br />
| Entity ID Self<br />
| SignedVarLong<br />
| The unique ID of the player. The unique ID is a value that remains consistent across different sessions of the same world, but most unoffical servers simply fill the runtime ID of the player out for this field.<br />
|-<br />
| Runtime Entity ID<br />
| VarLong<br />
| The runtime ID of the player. The runtime ID is unique for each world session, and entities are generally identified in packets using this runtime ID.<br />
|-<br />
| Platform Chat ID<br />
| String<br />
| An identifier only set for particular platforms when chatting (presumably only for Nintendo Switch). It is otherwise an empty string, and is used to decide which players are able to chat with each other.<br />
|-<br />
| Position<br />
| Vector3<br />
| The position to spawn the player at. If the player is at a distance that the viewer cannot see, the player will still show up if the viewer moves closer.<br />
|-<br />
| Velocity<br />
| Vector3<br />
| The initial velocity the player spawns with. This velocity will initiate client side movement of the player.<br />
|-<br />
| Rotation<br />
| Float<br />
| Pitch, yaw and head yaw<br />
|-<br />
| Held Item<br />
| Item<br />
| The item that the player is holding. The item is shown to the viewer as soon as the player itself shows up. Needless to say that this field is rather pointless, as additional packets still must be sent for armour to show up.<br />
|-<br />
| Metadata<br />
| MetadataDictionary<br />
| A map of entity metadata, which includes flags and data properties that alter in particular the way the player looks. Flags include ones such as 'on fire' and 'sprinting'. The metadata values are indexed by their property key.<br />
|-<br />
| Flags<br />
| VarInt<br />
| Flags is a set of flags that specify certain properties of the player, such as whether or not it can fly and/or move through blocks.<br />
|-<br />
| Command permission<br />
| VarInt<br />
| A set of permissions that specify what commands a player is allowed to execute.<br />
|-<br />
| Action Permissions<br />
| VarInt<br />
| Action Permissions is, much like Flags, a set of flags that specify actions that the player is allowed to undertake, such as whether it is allowed to edit blocks, open doors etc.<br />
|-<br />
| Permission Level<br />
| VarInt<br />
| The permission level of the player as it shows up in the player list built up using the PlayerList packet.<br />
|-<br />
| Custom stored permissions<br />
| VarInt<br />
| <br />
|-<br />
| User Id<br />
| Long<br />
| A unique identifier of the player. It appears it is not required to fill this field out with a correct value. Simply writing 0 seems to work.<br />
|-<br />
| Links<br />
| Links<br />
| A list of entity links that are currently active on the player. These links alter the way the player shows up when first spawned in terms of it shown as riding an entity. Setting these links is important for new viewers to see the player is riding another entity.<br />
|-<br />
| Device ID<br />
| String<br />
| The device ID set in one of the files found in the storage of the device of the player. It may be changed freely, so it should not be relied on for anything.<br />
|-<br />
| Device OS<br />
| Int<br />
| The build platform/device OS of the player that is about to be added, as it sent in the Login packet when joining.<br />
|}<br />
<br />
<br />
<br />
==== Add Entity ====<br />
<br />
Sent by the server to spawn an entity to the player. It is used for every entity except other players, paintings and items, for which the [[#Add Player|Add Player]], [[#Add Painting|Add Painting]] and [[#Add Item Entity|Add Item Entity]] packets are used.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="9"| 0x0D<br />
|rowspan="9"| Client<br />
| Entity ID Self<br />
| SignedVarLong<br />
| The unique ID of the entity. The unique ID is a value that remains consistent across different sessions of the same world, but most unofficial servers simply fill the runtime ID of the entity out for this field.<br />
|-<br />
| Runtime Entity ID<br />
| VarLong<br />
| The runtime ID of the entity. The runtime ID is unique for each world session, and entities are generally identified in packets using this runtime ID.<br />
|-<br />
| Entity Type<br />
| String<br />
| The string entity type of the entity, for example 'minecraft:skeleton'.<br />
|-<br />
| Position<br />
| Vector3<br />
| The position to spawn the entity at. If the entity is at a distance that the player cannot see, the entity will still show up if the player moves closer.<br />
|-<br />
| Velocity<br />
| Vector3<br />
| The initial velocity the entity spawns with. This velocity will initiate client side movement of the entity.<br />
|-<br />
| Rotation<br />
| Vector3<br />
| Pitch, yaw and head yaw<br />
|-<br />
| Attributes<br />
| EntityAttributes<br />
| A slice of attributes that the entity has. It includes attributes such as its health, movement speed, etc.<br />
|-<br />
| Metadata<br />
| MetadataDictionary<br />
| A map of entity metadata, which includes flags and data properties that alter in particular the way the entity looks. Flags include ones such as 'on fire' and 'sprinting'. The metadata values are indexed by their property key.<br />
|-<br />
| Links<br />
| Links<br />
| A list of entity links that are currently active on the entity. These links alter the way the entity shows up when first spawned in terms of it shown as riding an entity. Setting these links is important for new viewers to see the entity is riding another entity.<br />
|}<br />
<br />
<br />
<br />
==== Remove Entity ====<br />
<br />
Sent by the server to remove an entity that currently exists in the world from the client-side. Sending this packet if the client cannot already see this entity will have no effect.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x0E<br />
|rowspan="1"| Client<br />
| Unique Entity Id<br />
| SignedVarLong<br />
| The unique ID of the entity to be removed. The unique ID is a value that remains consistent across different sessions of the same world, but most unofficial servers simply fill the runtime ID of the entity out for this field.<br />
|}<br />
<br />
<br />
<br />
==== Add Item Entity ====<br />
<br />
Sent by the server to make an item entity show up. It is one of the few entities that cannot be sent using the [[#Add Entity|Add Entity]] packet.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="7"| 0x0F<br />
|rowspan="7"| Client<br />
| Entity ID Self<br />
| SignedVarLong<br />
| The unique ID of the entity. The unique ID is a value that remains consistent across different sessions of the same world, but most unofficial servers simply fill the runtime ID of the entity out for this field.<br />
|-<br />
| Runtime Entity ID<br />
| VarLong<br />
| The runtime ID of the entity. The runtime ID is unique for each world session, and entities are generally identified in packets using this runtime ID.<br />
|-<br />
| Item<br />
| Item<br />
| The item that is spawned. It must have a valid ID for it to show up client-side. If it is not a valid item, the client will crash when coming near.<br />
|-<br />
| Position<br />
| Vector3<br />
| The position to spawn the entity on. If the entity is at a distance that the player cannot see, the entity will still show up if the player moves closer.<br />
|-<br />
| Velocity<br />
| Vector3<br />
| The initial velocity the entity spawns with. This velocity will initiate client side movement of the entity.<br />
|-<br />
| Metadata<br />
| MetadataDictionary<br />
| A map of entity metadata, which includes flags and data properties that alter in particular the way the entity looks. Flags include ones such as 'on fire' and 'sprinting'. The metadata values are indexed by their property key.<br />
|-<br />
| Is From Fishing<br />
| Boolean<br />
| Specifies if the item was obtained by fishing it up using a fishing rod. It is not clear why the client needs to know this.<br />
|}<br />
<br />
<br />
<br />
==== Take Item Entity ====<br />
<br />
Sent by the server when a player picks up an item entity. It makes the item entity disappear to viewers and shows the pick-up animation.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x11<br />
|rowspan="2"| Client<br />
| Item Runtime Entity Id<br />
| VarLong<br />
| the entity runtime ID of the item that is being taken by another entity. It will disappear to viewers after showing the pick-up animation.<br />
|-<br />
| Runtime Entity Id<br />
| VarLong<br />
| The runtime ID of the entity that took the item, which is usually a player, but could be another entity like a zombie too.<br />
|}<br />
<br />
<br />
<br />
==== Move Entity Absolute ====<br />
<br />
Sent by the server to move an entity to an absolute position. It is typically used for movements where high accuracy isn't needed, such as for long range teleporting.<br />
This packet is also sent by the client when riding a horse/donkey.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x12<br />
|rowspan="4"| Server & Client<br />
| Runtime entity id<br />
| VarLong<br />
| The runtime ID of the entity. The runtime ID is unique for each world session, and entities are generally identified in packets using this runtime ID.<br />
|-<br />
| Flags<br />
| byte<br />
| A combination of flags that specify details of the movement. See below for more info.<br />
|-<br />
| Position<br />
| PlayerLocation<br />
| <br />
|}<br />
<br />
{| class="wikitable"<br />
|-<br />
! Field<br />
! Bit<br />
! Notes<br />
|-<br />
| On ground<br />
| 0x01<br />
| If the entity is touching the ground<br />
|-<br />
| Telported<br />
| 0x02<br />
|<br />
|}<br />
<br />
<br />
<br />
==== Move Player ====<br />
<br />
Sent by players to send their movement to the server, and by the server to update the movement of player entities to other players.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="8"| 0x13<br />
|rowspan="8"| Server & Client<br />
| Runtime entity id<br />
| VarLong<br />
| The runtime ID of the player. The runtime ID is unique for each world session, and entities are generally identified in packets using this runtime ID.<br />
|-<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| Rotation<br />
| Vector3<br />
| Pitch, yaw and head yaw<br />
|-<br />
| Mode<br />
| Byte<br />
| <br />
|-<br />
| On ground<br />
| Boolean<br />
| Specifies if the player is considered on the ground. Note that proxies or hacked clients could fake this to always be true, so it should not be taken for granted.<br />
|-<br />
| Riding runtime entity id<br />
| Float<br />
| The runtime ID of the entity that the player might currently be riding. If not riding, this should be left 0.<br />
|-<br />
| Teleportation cause<br />
| VarLong<br />
| See below. Only needs to exist if Mode cause is 2 (teleport).<br />
|-<br />
| Entity type<br />
| Byte<br />
| Only needs to exist if Mode cause is 2 (teleport).<br />
|}<br />
<br />
Modes:<br />
{| class="wikitable"<br />
! ID<br />
! Mode<br />
|-<br />
| 0<br />
| Normal<br />
|-<br />
| 1<br />
| Reset<br />
|-<br />
| 2<br />
| Teleport<br />
|-<br />
| 3<br />
| Rotation<br />
|}<br />
<br />
Teleportation causes:<br />
{| class="wikitable"<br />
! ID<br />
! Cause<br />
|-<br />
| 0<br />
| Unknown<br />
|-<br />
| 1<br />
| Projectile<br />
|-<br />
| 2<br />
| Chorus fruit<br />
|-<br />
| 3<br />
| Command<br />
|-<br />
| 4<br />
| Behavior<br />
|}<br />
<br />
<br />
<br />
==== Rider Jump ====<br />
<br />
Sent by the client when it jumps while riding an entity that has the WASDControlled entity flag set, for example when riding a horse. According to MiNET this can also be sent from the server to the client, but details on this are unknown.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x14<br />
|rowspan="1"| Server & Client<br />
| Jump Strength<br />
| SignedVarInt<br />
| The strength of the jump, depending on how long the rider has held the jump button.<br />
|}<br />
<br />
<br />
<br />
==== Update Block ====<br />
<br />
Sent by the server to update a block client-side, without resending the entire chunk that the block is located in. It is particularly useful for small modifications like block breaking/placing.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x15<br />
|rowspan="4"| Client<br />
| Coordinates<br />
| BlockCoordinates<br />
| The block position at which a block is updated.<br />
|-<br />
| Block Runtime ID<br />
| VarInt<br />
| The runtime ID of the block that is placed at Position after sending the packet to the client. The runtime ID must point to a block sent in the list in the Start Game packet.<br />
|-<br />
| Flags<br />
| VarInt<br />
| See below. Flags is a combination of flags that specify the way the block is updated client-side. It is a combination of the flags below, but typically sending only the Network flag is sufficient.<br />
|-<br />
| Layer<br />
| VarInt<br />
| The world layer on which the block is updated. In Bedrock, multiple blocks can be put in the same location using layers. The second layer is usually used for liquids, so blocks can be inside a liquid. For most blocks, this is the first layer, as that layer is the default layer to place blocks on, but for blocks inside of each other, this differs. As this system is designed with liquids, there may be bugs when using this to place blocks inside each other. For example, placing an interactable block such as an item frame on the second layer can cause a game crash if the player tries to interact with it.<br />
|}<br />
<br />
{| class="wikitable"<br />
|-<br />
! Field<br />
! Bit<br />
! Notes<br />
|-<br />
| Neighbors<br />
| 0x01<br />
| <br />
|-<br />
| Network<br />
| 0x02<br />
|<br />
|-<br />
| No Graphic<br />
| 0x04<br />
|<br />
|-<br />
| Priority<br />
| 0x08<br />
|<br />
|}<br />
<br />
<br />
<br />
==== Add Painting ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x16<br />
|rowspan="5"| Client<br />
| Unique Entity Id<br />
| SignedVarLong<br />
| The unique ID of the entity. The unique ID is a value that remains consistent across different sessions of the same world, but most unofficial servers simply fill the runtime ID of the entity out for this field.<br />
|-<br />
| Runtime Entity Id<br />
| VarLong<br />
| The runtime ID of the entity. The runtime ID is unique for each world session, and entities are generally identified in packets using this runtime ID.<br />
|-<br />
| Position<br />
| Vector3<br />
| The position to spawn the entity at. If the entity is at a distance that the player cannot see, the entity will still show up if the player moves closer.<br />
|-<br />
| Direction<br />
| SignedVarInt<br />
| The facing direction of the painting. See below.<br />
|-<br />
| Name<br />
| String<br />
| This is the name of the painting (e.g. BurningSkull). See below.<br />
|}<br />
<br />
Valid facing values:<br />
* 0 - Facing towards positive Z (south)<br />
* 1 - Facing towards negative X (west)<br />
* 2 - Facing towards negative Z (north)<br />
* 3 - Facing towards positive X (east)<br />
<br />
Valid name values:<br />
* Kebab<br />
* Aztec<br />
* Alban<br />
* Aztec<br />
* Aztec2<br />
* Bomb<br />
* Plant<br />
* Wasteland<br />
* Wanderer<br />
* Graham<br />
* Pool<br />
* Courbet<br />
* Sunset<br />
* Sea<br />
* Creebet<br />
* Match<br />
* Bust<br />
* Stage<br />
* Void<br />
* SkullAndRoses<br />
* Wither<br />
* Fighters<br />
* Skeleton<br />
* DonkeyKong<br />
* PoInter<br />
* Pigscene<br />
* BurningSkull<br />
<br />
<br />
<br />
==== Tick Sync ====<br />
<br />
Sent by the client and the server to maintain a synchronized, server-authoritative tick between the client and the server. The client sends this packet first, and the server should reply with another one of these packets, including the response time.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x17<br />
|rowspan="2"| Server & Client<br />
| Request Timestamp<br />
| Long<br />
| <br />
|-<br />
| Response Timestamp<br />
| Long<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Level Sound Event (1) ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="6"| 0x18<br />
|rowspan="6"| Server & Client<br />
| Sound ID<br />
| Byte<br />
| <br />
|-<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| Block Id<br />
| SignedVarInt<br />
| <br />
|-<br />
| Entity Type<br />
| SignedVarInt<br />
| <br />
|-<br />
| Is baby mob<br />
| Boolean<br />
| <br />
|-<br />
| Is global<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Level Event ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x19<br />
|rowspan="3"| Client<br />
| Event ID<br />
| SignedVarInt<br />
| <br />
|-<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| Data<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Block Event ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x1A<br />
|rowspan="3"| Client<br />
| Block Position<br />
| BlockCoordinates<br />
| <br />
|-<br />
| Event Type<br />
| SignedVarInt<br />
| <br />
|-<br />
| Event Data<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Entity Event ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x1B<br />
|rowspan="3"| Server & Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Event ID<br />
| Byte<br />
| See [[/Entity Events|Bedrock Protocol/Entity Events]]<br />
|-<br />
| Data<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Mob Effect ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="6"| 0x1C<br />
|rowspan="6"| Client<br />
| Runtime entity id<br />
| VarLong<br />
| <br />
|-<br />
| Event<br />
| Byte<br />
| <br />
|-<br />
| Effect id<br />
| SignedVarInt<br />
| See the Bedrock Edition section of {{Minecraft Wiki|Status effect#Effect_IDs}}<br />
|-<br />
| Amplifier<br />
| SignedVarInt<br />
| <br />
|-<br />
| Particles<br />
| Boolean<br />
| If true, effect particles are not shown<br />
|-<br />
| Duration<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
Events:<br />
* 0: None<br />
* 1: Add<br />
* 2: Modify<br />
* 3: Remove<br />
<br />
==== Update Attributes ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x1D<br />
|rowspan="2"| Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Attributes<br />
| PlayerAttributes<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Inventory Transaction ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x1E<br />
|rowspan="1"| Server & Client<br />
| Transaction<br />
| Transaction<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Mob Equipment ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x1F<br />
|rowspan="5"| Server & Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Item<br />
| Item<br />
| <br />
|-<br />
| Slot<br />
| Byte<br />
| <br />
|-<br />
| Selected Slot<br />
| Byte<br />
| <br />
|-<br />
| Windows Id<br />
| Byte<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Mob Armor Equipment ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x20<br />
|rowspan="5"| Server & Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Helmet<br />
| Item<br />
| <br />
|-<br />
| Chestplate<br />
| Item<br />
| <br />
|-<br />
| Leggings<br />
| Item<br />
| <br />
|-<br />
| Boots<br />
| Item<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Interact ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x21<br />
|rowspan="2"| Server & Client<br />
| Action ID<br />
| Byte<br />
| <br />
|-<br />
| Target Runtime Entity ID<br />
| VarLong<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Block Pick Request ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x22<br />
|rowspan="5"| Server<br />
| Block Position X<br />
| SignedVarInt<br />
| <br />
|-<br />
| Block Position Y<br />
| SignedVarInt<br />
| <br />
|-<br />
| Block Position Z<br />
| SignedVarInt<br />
| <br />
|-<br />
| Add User Data<br />
| bool<br />
| Whether there should be NBT data in the picked block (activated by pressing Ctrl on default keyboard controls)<br />
|-<br />
| Hotbar Slot<br />
| Byte<br />
| <br />
|}<br />
<br />
The Bedrock client sends the position of the block. It expects the server to decide the block to pick and add it to the inventory or switch the hotbar slot if needed.<br />
<br />
<br />
<br />
==== Entity Pick Request ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x23<br />
|rowspan="2"| Server<br />
| Runtime Entity ID<br />
| Unsigned Long<br />
| <br />
|-<br />
| Hotbar Slot<br />
| Byte<br />
| The held hotbar slot of the player at the time of trying to pick the entity. If empty, the resulting spawn egg will be put into this slot.<br />
|}<br />
<br />
<br />
<br />
==== Player Action ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x24<br />
|rowspan="4"| Server<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Action ID<br />
| SignedVarInt<br />
| <br />
|-<br />
| Coordinates<br />
| BlockCoordinates<br />
| <br />
|-<br />
| Face<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Entity Fall ====<br />
<br />
Sent by the client when it falls from a distance onto a block that would damage the player.<br />
<br />
This packet should not be used at all by the server, as it can easily be spoofed using a proxy or custom client. Servers should implement fall damage using their own calculations.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x25<br />
|rowspan="3"| Server<br />
| Runtime Entity Id<br />
| VarLong<br />
| <br />
|-<br />
| Fall Distance<br />
| Float<br />
| The distance that the entity fell until it hit the ground. The damage would otherwise be calculated using this field.<br />
|-<br />
| In Void<br />
| Boolean<br />
| Specifies if the fall was in the void. The player can't fall below roughly Y=-40.<br />
|}<br />
<br />
<br />
<br />
==== Hurt Armor ====<br />
<br />
Sent by the server to damage the player's armor after being hit. <br />
<br />
The packet should never be used by servers as it hands the responsibility over to the player completely, while the server can easily and reliably update the armor damage of players itself.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x26<br />
|rowspan="1"| Client<br />
| Health<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Entity Data ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x27<br />
|rowspan="2"| Server & Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Metadata<br />
| MetadataDictionary<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Entity Motion ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x28<br />
|rowspan="4"| Server & Client<br />
| Runtime Entity Id<br />
| VarLong<br />
| <br />
|-<br />
| Motion X<br />
| Vector3<br />
| <br />
|-<br />
| Motion Y<br />
| Float<br />
| <br />
|-<br />
| Motion Z<br />
| Float<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Entity Link ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x29<br />
|rowspan="4"| Client<br />
| Ridden ID<br />
| SignedVarLong<br />
| <br />
|-<br />
| Rider ID<br />
| SignedVarLong<br />
| <br />
|-<br />
| Link Type<br />
| Byte<br />
| <br />
|-<br />
| Unknown<br />
| Byte<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Health ====<br />
<br />
Sent by the server to set the health of the player it is sent to.<br />
<br />
This packet should no longer be used. Instead, the health attribute should be used so that the health and maximum health may be changed directly.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x2A<br />
|rowspan="1"| Client<br />
| Health<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Spawn Position ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x2B<br />
|rowspan="5"| Client<br />
| Spawn Type<br />
| SignedVarInt<br />
| <br />
|-<br />
| Block Position<br />
| BlockCoordinates<br />
| the new position of the spawn that was set. If spawnType is WORLD_SPAWN, compasses will point to this position. As of 1.16, blockPosition is always the position of the player.<br />
|-<br />
| Dimension ID<br />
| Int<br />
|<br />
|-<br />
| Spawn Position<br />
| Vector3<br />
| Default -2147483648, -2147483648, -2147483648<br />
|-<br />
| Forced<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Animate ====<br />
<br />
Sent by the server to send a player animation from one player to all viewers of that player. <br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x2C<br />
|rowspan="2"| Server & Client<br />
| Action ID<br />
| SignedVarInt<br />
| <br />
|-<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Respawn ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x2D<br />
|rowspan="3"| Server & Client<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| State<br />
| Byte<br />
| <br />
|-<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|}<br />
<br />
States:<br />
{| class="wikitable"<br />
! ID<br />
! Name<br />
|-<br />
| 0<br />
| Server Searching<br />
|-<br />
| 1<br />
| Server Ready<br />
|-<br />
| 2<br />
| Client Ready<br />
|}<br />
<br />
==== Container Open ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x2E<br />
|rowspan="4"| Client<br />
| Window Id<br />
| Byte<br />
| <br />
|-<br />
| Type<br />
| Byte<br />
| <br />
|-<br />
| Block Position<br />
| BlockCoordinates<br />
| <br />
|-<br />
| Unique Entity Id<br />
| SignedVarLong<br />
| <br />
|}<br />
<br />
Bedrock needs either a valid block position, with an actual block at that position, or an entity ID for this to work. The entity must have CONTAINER_BASE_SIZE metadata, or the block must be a container. The entity ID is used for minecart chests etc. but any entity will work. If the entity has NAMETAG metadata this will be used as the container name.<br />
<br />
<br />
<br />
==== Container Close ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x2F<br />
|rowspan="1"| Server & Client<br />
| Window Id<br />
| Byte<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Player Hotbar ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x30<br />
|rowspan="3"| Server & Client<br />
| Selected Hotbar Slot<br />
| VarInt<br />
| <br />
|-<br />
| Container Id<br />
| Byte<br />
| <br />
|-<br />
| Select Hotbar Slot<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Inventory Content ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x31<br />
|rowspan="2"| Server & Client<br />
| Inventory Id<br />
| VarInt<br />
| <br />
|-<br />
| Input<br />
| ItemStacks<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Inventory Slot ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x32<br />
|rowspan="3"| Server & Client<br />
| Inventory Id<br />
| VarInt<br />
| <br />
|-<br />
| Slot<br />
| VarInt<br />
| <br />
|-<br />
| Item<br />
| Item<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Container Set Data ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x33<br />
|rowspan="3"| Client<br />
| Window Id<br />
| Byte<br />
| <br />
|-<br />
| Property<br />
| SignedVarInt<br />
| <br />
|-<br />
| Value<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Crafting Data ====<br />
<br />
Since 1.16.200, each recipe must have a unique network ID. Otherwise, the client will crash.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x34<br />
|rowspan="4"| Client<br />
| Recipes<br />
| Recipes<br />
| <br />
|-<br />
| Potion type recipes<br />
| PotionTypeRecipe[]<br />
| <br />
|-<br />
| potion container recipes<br />
| PotionContainerChangeRecipe[]<br />
| <br />
|-<br />
| Is Clean<br />
| Boolean<br />
| <br />
|}<br />
<br />
==== Crafting Event ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x35<br />
|rowspan="5"| Server & Client<br />
| Window ID<br />
| Byte<br />
| <br />
|-<br />
| Recipe Type<br />
| SignedVarInt<br />
| <br />
|-<br />
| Recipe ID<br />
| UUID<br />
| <br />
|-<br />
| Input<br />
| ItemStacks<br />
| <br />
|-<br />
| Result<br />
| ItemStacks<br />
| <br />
|}<br />
<br />
<br />
<br />
==== GUI Data Pick Item ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x36<br />
|rowspan="4"| Client<br />
|-<br />
| Item name<br />
| String<br />
| The name of the item that shows up in the top part of the popup that shows up when selecting an item. It is shown as if an item was selected by the player itself.<br />
|-<br />
| Item effects<br />
| String<br />
| The line under the Item name, where the effects of the item are usually situated.<br />
|-<br />
| Hotbar Slot<br />
| int<br />
| The hot bar slot to be selected/picked. This does not currently work, so it does not matter what number this is.<br />
|}<br />
<br />
Sent by the server to make the client 'select' a hotbar slot. It currently appears to be broken however, and does not actually set the selected slot to the hotbar slot set in the packet.<br />
<br />
<br />
<br />
==== Adventure Settings ====<br />
<br />
Sent by the server to update gameplay related features, in particular permissions to access these features for the client.<br />
<br />
It includes allowing the player to fly, build, and mine and attack entities. Most of these flags should be checked server-side instead of using this packet only.<br />
<br />
The client my also send this packet to the server when it updates one of these settings through the in-game settings interface. The server should verify if the player actually has permission to update these settings.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="6"| 0x37<br />
|rowspan="6"| Server & Client<br />
| Flags<br />
| VarInt<br />
| <br />
|-<br />
| Command permission<br />
| VarInt<br />
| <br />
|-<br />
| Action permissions<br />
| VarInt<br />
| <br />
|-<br />
| Permission level<br />
| VarInt<br />
| <br />
|-<br />
| Custom stored permissions<br />
| VarInt<br />
| <br />
|-<br />
| User Id<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Block Entity Data ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x38<br />
|rowspan="2"| Server & Client<br />
| Coordinates<br />
| BlockCoordinates<br />
| <br />
|-<br />
| NamedTag<br />
| NBT<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Player Input ====<br />
<br />
Sent by the client when the player is moving but the server does not allow it to update its movement using the [[#Move Player|Move Player]] packet. It includes situations where the player is riding an entity like a boat. If this is the case, the packet is sent roughly every tick.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x39<br />
|rowspan="4"| Server<br />
| Movement<br />
| Vec2<br />
| The movement vector of the input. It should be thought of in Pocket Edition controls, where specific arrows (or a combination of two, resulting in a diagonal arrow) decide the direction of movement. The movement vector typically has a length of 1: Either it has movement on one axis, or it has a combination, resulting in sqrt(2)/2 for both axes.<br />
|-<br />
| Jumping<br />
| Boolean<br />
| Indicates if the player was pressing the jump button or not. It does not define if the player was actually in the air or not.<br />
|-<br />
| Sneaking<br />
| Boolean<br />
| Indicates the player was sneaking during the input. Note that this may also be checked by keeping the sneaking state updated using the [[#Player Action|Player Action]] packet<br />
|}<br />
<br />
<br />
<br />
==== Level Chunk ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x3A<br />
|rowspan="5"| Client<br />
| Chunk X<br />
| SignedVarInt<br />
| <br />
|-<br />
| Chunk Z<br />
| SignedVarInt<br />
| <br />
|-<br />
| Sub Chunk Count<br />
| VarInt<br />
| <br />
|-<br />
| Cache Enabled<br />
| Boolean<br />
| <br />
|-<br />
| Chunk Data<br />
| ByteArray<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Commands Enabled ====<br />
<br />
This packet is sent to the client to enable or disable the ability to execute commands. If disabled, the client itself will stop the execution of commands.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x3B<br />
|rowspan="1"| Client<br />
| Commands enabled<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Difficulty ====<br />
<br />
Sent by the server to update the client-side difficulty pf the client. The actual effect of this packet on the client isn't very significant, as the difficulty is handled server-side.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x3C<br />
|rowspan="1"| Client<br />
| Difficulty<br />
| VarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Change Dimension ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x3D<br />
|rowspan="5"| Client<br />
| Dimension<br />
| SignedVarInt<br />
| <br />
|-<br />
| Position X<br />
| Vector3<br />
| <br />
|-<br />
| Position Y<br />
| Boolean<br />
| <br />
|-<br />
| Position Z<br />
| Float<br />
| <br />
|-<br />
| Respawn<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Player Game Type ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x3E<br />
|rowspan="1"| Server & Client<br />
| Game mode<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Player List ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x3F<br />
|rowspan="1"| Client<br />
| Records<br />
| PlayerRecords<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Simple Event ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x40<br />
|rowspan="1"| Client<br />
| Event Type<br />
| Unsigned Short<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Event ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x41<br />
|rowspan="3"| Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Event data<br />
| SignedVarInt<br />
| <br />
|-<br />
| Event type<br />
| Byte<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Spawn Experience Orb ====<br />
<br />
Sent by the server to spawn an experience orb entity client-side. <br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x42<br />
|rowspan="2"| Client<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| Count<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Map Item Data ====<br />
<br />
Sent by the server to update the data of a map shown to the client. It is sent with a combination of flags that specify what data is updated.<br />
<br />
The packet may be used to update specific parts of the map only. It is not required to send the entire map each time when updating one part.<br />
<br />
TODO<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x43<br />
|rowspan="1"| Client<br />
| Map ID<br />
| VarLong<br />
| The unique identifier that represents the map that is updated over network. It remains consitent across sesions.<br />
|}<br />
<br />
<br />
<br />
==== Map Info Request ====<br />
<br />
Sent by the client to request the server to deliver information of a certain map in the inventory of the player. The serve should respond with a [[#Map Item Data|Map Item Data]] packet.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x44<br />
|rowspan="1"| Server & Client<br />
| Unique Map Id<br />
| SignedVarLong<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Request Chunk Radius ====<br />
<br />
Sent by the client to update the server on the chunk view radius that it has set in the settings. The server may respond with a [[#Chunk Radius Updated|Chunk Radius Updated]] packet with either the radius requested, or a different chunk radius if the server chooses so.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x45<br />
|rowspan="1"| Server & Client<br />
| Chunk radius<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Chunk Radius Updated ====<br />
<br />
Sent by the server in response to a [[#Request Chunk Radius|Request Chunk Radius]] packet. It defines the radius that the server allows the client to have. This may be lower than the chunk radius requested by the client.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x46<br />
|rowspan="1"| Client<br />
| Chunk radius<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== ItemFrame Drop Item ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x47<br />
|rowspan="1"| Server & Client<br />
| Block Position<br />
| BlockCoordinates<br />
|<br />
|}<br />
<br />
==== Game Rules Changed ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x48<br />
|rowspan="1"| Client<br />
| Rules<br />
| GameRules<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Camera ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x49<br />
|rowspan="2"| Client<br />
| Camera Unique Entity Id<br />
| SignedVarLong<br />
| <br />
|-<br />
| Player Unique Entity Id<br />
| SignedVarLong<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Boss Event ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x4A<br />
|rowspan="2"| Client<br />
| Boss Entity ID<br />
| SignedVarLong<br />
| <br />
|-<br />
| Event Type<br />
| VarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Show Credits ====<br />
<br />
Sent by the server to show the Minecraft credits screen to the client. It is typically when the player beats the ender dragon and leaves the End.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x4B<br />
|rowspan="2"| Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Status<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
Statuses:<br />
{| class="wikitable"<br />
! ID<br />
! Name<br />
|-<br />
| 0<br />
| Start Credits<br />
|-<br />
| 1<br />
| End Credits<br />
|}<br />
<br />
<br />
==== Available Commands ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x4C<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== Command Request ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x4D<br />
|rowspan="5"| Server<br />
| Command<br />
| String<br />
| <br />
|-<br />
| Command type<br />
| VarInt<br />
| <br />
|-<br />
| Unknown UUID<br />
| UUID<br />
| <br />
|-<br />
| Request ID<br />
| String<br />
| <br />
|-<br />
| Unknown<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== CommandBlock Update ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x4E<br />
|rowspan="1"| Server<br />
| Is Block<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Command Output ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x4F<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== Update Trade ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="10"| 0x50<br />
|rowspan="10"| Client<br />
| Window ID<br />
| Byte<br />
| <br />
|-<br />
| Window Type<br />
| Byte<br />
| <br />
|-<br />
| Unknown0<br />
| VarInt<br />
| <br />
|-<br />
| Unknown1<br />
| VarInt<br />
| <br />
|-<br />
| Unknown2<br />
| VarInt<br />
| <br />
|-<br />
| Is Willing<br />
| Boolean<br />
| <br />
|-<br />
| Trader Entity ID<br />
| SignedVarLong<br />
| <br />
|-<br />
| Player Entity ID<br />
| SignedVarLong<br />
| <br />
|-<br />
| Display Name<br />
| String<br />
| <br />
|-<br />
| NamedTag<br />
| NBT<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Update Equip ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x51<br />
|rowspan="5"| Client<br />
| Window ID<br />
| Byte<br />
| <br />
|-<br />
| Window Type<br />
| Byte<br />
| <br />
|-<br />
| Unknown<br />
| Byte<br />
| <br />
|-<br />
| Entity ID<br />
| SignedVarLong<br />
| <br />
|-<br />
| NamedTag<br />
| NBT<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Resource Pack Data Info ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="7"| 0x52<br />
|rowspan="7"| Client<br />
| Package ID<br />
| String<br />
| <br />
|-<br />
| Max Chunk Size<br />
| Unsigned Int<br />
| <br />
|-<br />
| Chunk Count<br />
| Unsigned Int<br />
| <br />
|-<br />
| Compressed Package Size<br />
| Unsigned Long<br />
| <br />
|-<br />
| Hash<br />
| ByteArray<br />
| <br />
|-<br />
| Is Premium<br />
| Boolean<br />
| <br />
|-<br />
| Pack Type<br />
| Byte<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Resource Pack Chunk Data ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x53<br />
|rowspan="4"| Client<br />
| Package ID<br />
| String<br />
| <br />
|-<br />
| Chunk Index<br />
| Unsigned Int<br />
| <br />
|-<br />
| Progress<br />
| Unsigned Long<br />
| <br />
|-<br />
| Payload<br />
| ByteArray<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Resource Pack Chunk Request ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x54<br />
|rowspan="2"| Server<br />
| Package ID<br />
| String<br />
| <br />
|-<br />
| Chunk Index<br />
| Unsigned Int<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Transfer ====<br />
<br />
Sent by the server to transfer a player from the current server to another. Doing so will fully disconnect the client, bring it back to the main menu and make it connect to the next server.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x55<br />
|rowspan="2"| Client<br />
| Address<br />
| String<br />
| <br />
|-<br />
| Port<br />
| Unsigned Short<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Play Sound ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x56<br />
|rowspan="4"| Client<br />
| Sound name<br />
| String<br />
| <br />
|-<br />
| Sound position<br />
| Position<br />
| <br />
|-<br />
| Volume<br />
| Float<br />
| <br />
|-<br />
| Pitch<br />
| Float<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Stop Sound ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x57<br />
|rowspan="2"| Client<br />
| Sound Name<br />
| String<br />
| <br />
|-<br />
| Stopping All Sound<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Title ====<br />
<br />
Sent by the server to make a title, subtitle or action bar shown to a player. It has several fields that allow setting the duration of the titles.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x58<br />
|rowspan="5"| Client<br />
| Type<br />
| SignedVarInt<br />
| <br />
|-<br />
| Text<br />
| String<br />
| <br />
|-<br />
| Fade In Time<br />
| SignedVarInt<br />
| <br />
|-<br />
| Stay Time<br />
| SignedVarInt<br />
| <br />
|-<br />
| Fade Out Time<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Add Behavior Tree ====<br />
<br />
Sent by the server. Its usage remains unknown, as behavior packs are typically all sent at the start of the game.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x59<br />
|rowspan="1"| Client<br />
| Behavior Tree JSON<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Structure Block Update ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x5A<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== Show Store Offer ====<br />
<br />
Sent by the server to show a Marketplace store offer to a player. It opens a window client-side that displays the item.<br />
<br />
The packet only works on partnered servers: Servers that are not partnered will not have a store button show up on the in-game pause menu and will, as a result, not be able to open store offers on the client side. Sending the packet does therefore not work when using a proxy that is connected to with the domain of one of the partnered servers.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x5B<br />
|rowspan="2"| Client<br />
| Offer Id<br />
| String<br />
| <br />
|-<br />
| Shown To All<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Purchase Receipt ====<br />
<br />
Sent by the client to notify the server it purchased an item from the marketplace store that was offered by the server.<br />
<br />
The packet is only used for partnered servers.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x5C<br />
|rowspan="1"| Server<br />
<br />
|}<br />
<br />
<br />
<br />
==== Player Skin ====<br />
<br />
Sent by the client when it updates its own skin using the in-game skin picker. It is relayed by the server, or sent if the server changes the skin of a player on its own accord. <br />
<br />
Note that the packet can only be sent for players that are in the player list at the time of sending.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x5D<br />
|rowspan="4"| Server & Client<br />
| UUID<br />
| UUID<br />
| <br />
|-<br />
| Skin<br />
| Skin<br />
| <br />
|-<br />
| Skin Name<br />
| String<br />
| <br />
|-<br />
| Old Skin Name<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Sub Client Login ====<br />
<br />
Sent when an additional player attempts to join from a split screen session. The contents of the chain data and skin data fields use the same format as the [[#Login|Login]] packet, and can be decoded the same way.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x5E<br />
|rowspan="2"| Server<br />
| Chain data<br />
| JSON array of JWT Data<br />
| Contains the display name, UUID and XUID<br />
|-<br />
| Skin data<br />
| JWT Data<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Automation Client Connect ====<br />
<br />
Sent by the server to make the client connect to a websocket server. This websocket server has the ability to execute commands on the behalf of the client and it canlisten for certain events fired by the client.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x5F<br />
|rowspan="1"| Client<br />
| Address<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Last Hurt By ====<br />
<br />
Sent by the server to let the client know what entity type it was last hurt by. At this moment, the packet is useless and should not be used. <br />
There is no behaviour that depends on if this packet is sent or not.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x60<br />
|rowspan="1"| Client<br />
| Entity Type Id<br />
| VarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Book Edit ====<br />
<br />
Sent by the client when it edits a book. It is sent each time a modification was made and the player stops its typing 'session', rather than simply after closing the book.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x61<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== NPC Request ====<br />
<br />
Sent by the client when it interacts with an NPC.<br />
<br />
The packet is specifically for Education Edition, where NPCs are available to use. It has no use in the base game.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x62<br />
|rowspan="4"| Server & Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Unknown0<br />
| Byte<br />
| <br />
|-<br />
| Unknown1<br />
| String<br />
| <br />
|-<br />
| Unknown2<br />
| Byte<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Photo Transfer ====<br />
<br />
Sent by the server to transfer a photo (image) file to the client. It is typically used to transfer photos so that the client can display it in a portfolio in Education Edition.<br />
<br />
While previously usable in the base game, the displaying of photos in books was disabled and the packet has little use anymore.<br />
<br />
The packet is specifically for Education Edition. It has no use in the base game.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x63<br />
|rowspan="3"| Server<br />
| File name<br />
| String<br />
| <br />
|-<br />
| Image data<br />
| String<br />
| <br />
|-<br />
| Unknown2<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Model Form Request ====<br />
<br />
Sent by the server to make the client open a form.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x64<br />
|rowspan="2"| Client<br />
| Form Id<br />
| VarInt<br />
| <br />
|-<br />
| Form Data<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Model Form Response ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x65<br />
|rowspan="2"| Server<br />
| Form Id<br />
| VarInt<br />
| <br />
|-<br />
| Form Data<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Server Settings Request ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x66<br />
|rowspan="1"| Server<br />
<br />
|}<br />
<br />
<br />
<br />
==== Server Settings Response ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x67<br />
|rowspan="2"| Client<br />
| Form Id<br />
| VarLong<br />
| <br />
|-<br />
| Form Data<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Show Profile ====<br />
<br />
Sent by the server to show the Xbox Live profile of one player to another.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x68<br />
|rowspan="1"| Client<br />
| Xuid<br />
| String<br />
| If the XUID is invalid, the client ignores the packet<br />
|}<br />
<br />
<br />
<br />
==== Set Default Game Type ====<br />
<br />
Sent by the client when it toggles the default game type in the settings UI, and is sent by the server when it actually changes the default game type, resulting in the toggle being changed in the settings UI.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x69<br />
|rowspan="1"| Client<br />
| Game mode<br />
| VarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Remove Objective ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x6A<br />
|rowspan="1"| Client<br />
| Objective Id<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Display Objective ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x6B<br />
|rowspan="5"| Client<br />
| Display Slot<br />
| String<br />
| <br />
|-<br />
| Objective Id<br />
| String<br />
| <br />
|-<br />
| Display Name<br />
| String<br />
| <br />
|-<br />
| Criteria<br />
| String<br />
| <br />
|-<br />
| Sort Order<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Score ====<br />
<br />
Sent by the server to send the contents of a scoreboard to the player. It may be used to either add, remove or edit entries on the scoreboard.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x6C<br />
|rowspan="2"| Client<br />
| Action<br />
| byte<br />
| 0 (Add), 1 (Remove)<br />
|-<br />
| Entries<br />
| ScoreEntries<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Lab Table ====<br />
<br />
Sent by the client to let the server know it started a chemical reaction in Education Edition, and is sent by the server to allow other clients to show the effects.<br />
<br />
This packet is only functional if Education features are enabled.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x6D<br />
|rowspan="5"| Server & Client<br />
| Unknown Byte 0<br />
| Byte<br />
| <br />
|-<br />
| Block Entity Position X<br />
| VarInt<br />
| <br />
|-<br />
| Block Entity Position Y<br />
| VarInt<br />
| <br />
|-<br />
| Block Entity Position Z<br />
| VarInt<br />
| <br />
|-<br />
| Reaction Type<br />
| Byte<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Update Block Synced ====<br />
<br />
Sent by the server to synchronize the falling of a falling block entity with the transitioning back and forth from and to a solid block. It is used to prevent the entity from flickering, and is used in places such as the pushing of blocks with pistons.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="6"| 0x6E<br />
|rowspan="6"| Client<br />
| Coordinates<br />
| BlockCoordinates<br />
| <br />
|-<br />
| Block Runtime ID<br />
| VarInt<br />
| <br />
|-<br />
| Block Priority<br />
| VarInt<br />
| <br />
|-<br />
| Data Layer ID<br />
| VarInt<br />
| <br />
|-<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Block Synced Type<br />
| VarLong<br />
| 0 - None, 1 - Create, 2 - Destroy<br />
|}<br />
<br />
==== Move Entity Delta ====<br />
<br />
Sent by the server to move an entity by a given delta. The packet is specifically optimized to save as much space as possible, by only writing non-zero fields.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x6F<br />
|rowspan="2"| Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Flags<br />
| Unsigned Short<br />
| <br />
|}<br />
<br />
Flags<br />
{| class="wikitable"<br />
! Field<br />
! Bit<br />
|-<br />
| HAS_X<br />
| 0x01<br />
|-<br />
| HAS_Y<br />
| 0x02<br />
|-<br />
| HAS_Z<br />
| 0x4<br />
|-<br />
| HAS_PITCH<br />
| 0x8<br />
|-<br />
| HAS_YAW<br />
| 0x10<br />
|-<br />
| HAS_ROLL<br />
| 0x20<br />
|}<br />
<br />
<br />
<br />
==== Set Scoreboard Identity ====<br />
<br />
Sent by the server to change the identity type of one of the entries on a scoreboard. This is used to change, for example, an entry pointing to a player, to a fake player when it leaves the server, and to change it back to a real player when it joins again.<br />
<br />
In non-vanilla situations, this packet is quite useless.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x70<br />
|rowspan="2"| Client<br />
| Action<br />
| byte<br />
| 0 (Add), 1 (Remove)<br />
|-<br />
| Entries<br />
| ScoreboardIdentityEntries<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Local Player As Initialized ====<br />
<br />
Sent by the client in response to a [[#Play Status||Play Status]] with the status Player Spawn (3). The packet marks the moment at which the client is fully initialized and can receive any packet without discarding it.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x71<br />
|rowspan="1"| Server<br />
| Runtime Entity Id<br />
| VarLong<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Update Soft Enum ====<br />
<br />
Sent by the server to update a soft enum, also known as a dynamic enum, previous sent in the [[#Available Commands|Available Commands]] packet. It is sent whenever the enum should get new options or when some of its options should be removed.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x72<br />
|rowspan="3"| Client<br />
|-<br />
| Enum Data<br />
| EnumData<br />
| TODO<br />
|-<br />
| Action<br />
| byte<br />
| 0 (Add), 1 (Remove), 2 (Update)<br />
|}<br />
<br />
<br />
<br />
==== Network Stack Latency ====<br />
<br />
Sent by the server (and the client, on development builds) to measure the latency over the entire Minecraft stack, rather than the RakNet latency. <br />
<br />
It has over usages too, such as the ability to be used as some kind of acknowledgement packet, to know when the client has received a certain other packet.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x73<br />
|rowspan="2"| Server & Client<br />
| Timestamp<br />
| Unsigned Long<br />
| <br />
|-<br />
| Send Back<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Script Custom Event ====<br />
<br />
Sent by both the client and server. It is a way to let scripts communicate with the server, so that the client can let the server know it triggered an event, or the other way around.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x75<br />
|rowspan="2"| Server & Client<br />
| Event Name<br />
| String<br />
| <br />
|-<br />
| Data<br />
| String<br />
| Typically a JSON encoded string that the script is able to encode and decode too<br />
|}<br />
<br />
<br />
<br />
==== Spawn Particle Effect ====<br />
<br />
Sent by the server to spawn a particle effect client-side. Unlike other packets that result in the appearing of particles, this packet can show particles that are not hardcoded in the client. They can be added and changed through behavior packs to implement custom particles.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x76<br />
|rowspan="4"| Client<br />
| Dimension Id<br />
| Byte<br />
| <br />
|-<br />
| Unique Entity Id<br />
| SignedVarLong<br />
| <br />
|-<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| Identifier<br />
| String<br />
| The name of the particle<br />
|}<br />
<br />
<br />
<br />
==== Available Entity Identifiers ====<br />
<br />
Sent by the server at the start of the game to let the client know all entities that are on the server.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x77<br />
|rowspan="1"| Client<br />
| NamedTag<br />
| NBT<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Level Sound Event (2) ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="6"| 0x78<br />
|rowspan="6"| Server & Client<br />
| Sound ID<br />
| Byte<br />
| <br />
|-<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| Block Id<br />
| SignedVarInt<br />
| <br />
|-<br />
| Entity Type<br />
| String<br />
| <br />
|-<br />
| Is baby mob<br />
| Boolean<br />
| <br />
|-<br />
| Is global<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Network Chunk Publisher Update ====<br />
<br />
Sent by the server to change the point around which chunks are and remain loaded. <br />
<br />
This is useful for minigame servers, where only one area is ever loaded, in which case the [[#Network Chunk Publisher|Network Chunk Publisher]] packet can be sent in the middle of it, so that no chunks ever need to be additionally sent during the course of the game.<br />
<br />
In reality, the packet is not extraordinarily useful, and most servers just sent it constantly at the position of the player. <br />
<br />
If the packet is not sent at all, no chunk will be shown to the player, regardless of where they are sent.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x79<br />
|rowspan="2"| Client<br />
| Coordinates<br />
| BlockCoordinates<br />
| <br />
|-<br />
| Radius<br />
| VarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Biome Definition List ====<br />
<br />
Sent by the server to let the client know all biomes that are available and implemented on the server side.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x7A<br />
|rowspan="1"| Client<br />
| NamedTag<br />
| NBT<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Level Sound Event (3) ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="6"| 0x7B<br />
|rowspan="6"| Server & Client<br />
| Sound ID<br />
| VarInt<br />
| <br />
|-<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| Block Id<br />
| SignedVarInt<br />
| <br />
|-<br />
| Entity Type<br />
| String<br />
| <br />
|-<br />
| Is baby mob<br />
| Boolean<br />
| <br />
|-<br />
| Is global<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Level Event Generic ====<br />
<br />
Sent by the server to send a 'generic' level event to the client. This packet sends an NBT serialized object and may for that reason be used for any event holding additional data.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x7C<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== Lectern Update ====<br />
<br />
Sent by the client to update the server on which page was opened in a book on a lectern, or if the book should be removed from it.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x7D<br />
|rowspan="4"| Client<br />
| Page<br />
| Byte<br />
| <br />
|-<br />
| Total Pages<br />
| Byte<br />
| <br />
|-<br />
| Block Position<br />
| Position<br />
| <br />
|-<br />
| Dropping Book<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Video Stream Connect ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x7E<br />
|rowspan="5"| Client<br />
| Server URI<br />
| String<br />
| <br />
|-<br />
| Frame Send Frequency<br />
| Float<br />
| <br />
|-<br />
| Action<br />
| Byte<br />
| <br />
|-<br />
| Resolution X<br />
| Int<br />
| <br />
|-<br />
| Resolution Y<br />
| Int<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Client Cache Status ====<br />
<br />
Sent by the client at the start of the game. It is sent to let the server know if it supports the client-side blob cache. Clients such as Nintendo Switch do not support the cache, and attempting to use it anyway will fail.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x81<br />
|rowspan="1"| Server & Client<br />
| Supported<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== On Screen Texture Animation ====<br />
<br />
Sent by the server to show a certain animation on the screen of the player.<br />
The packet is used, for example, for when a raid is triggered and a raid a defeated.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x82<br />
|rowspan="1"| Client<br />
| Animation Type<br />
| Int<br />
|}<br />
<br />
<br />
<br />
==== Map Create Locked Copy ====<br />
<br />
Sent by the server to create a locked copy of a map into another map. It is used in the cartography table to create a map that is locked and cannot be modified.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x83<br />
|rowspan="2"| Client<br />
| Original Map Id<br />
| VarLong<br />
| <br />
|-<br />
| New Map Id<br />
| VarLong<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Structure Template Data Export Request ====<br />
<br />
Sent by the client to request data of a structure.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x84<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== Structure Template Data Export Response ====<br />
<br />
Sent by the server to send data of a structure to the client in response to a [[#Structure Template Data Export Request|Structure Template Data Export Request]] packet.<br />
<br />
TODO<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x85<br />
|rowspan="1"| Client<br />
| Structure Name<br />
| String<br />
| This is the name used to export the structure to a file<br />
|}<br />
<br />
<br />
<br />
==== Update Block Properties ====<br />
<br />
Sent by the server to update the available block properties.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x86<br />
|rowspan="2"| Client<br />
| NamedTag<br />
| NBT<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Client Cache Blob Status ====<br />
<br />
Sent by the client to let the server know what blobs it already has, in an ACK type system.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x87<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== Client Cache Miss Response ====<br />
<br />
Sent by the server in response to a [[#Client Cache Blob Status|Client Cache Blob Status]] and contains the blob data of all blobs that the client acknowledged not to have yet.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x88<br />
|rowspan="1"| Client<br />
| Blobs<br />
| <br />
|<br />
|}<br />
<br />
<br />
<br />
==== Network Settings ====<br />
<br />
Sent by the server to update a variety of network settings. These settings modify the way packets are sent over the network stack.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x8F<br />
|rowspan="2"| Client<br />
| Compression threshold<br />
| Short<br />
| The maximum size of a packet this is compressed when sent. If the size of the packet is under this value, it is not compressed. When set to 0, all packets will be uncompressed.<br />
|}<br />
<br />
<br />
<br />
==== Player Auth Input ====<br />
<br />
Sent by the client to allow for server authoratative movement. It is used to synchronize the player input with the position server-side.<br />
<br />
The client sends this packet when the 'Server Authoritive Movement' field in the [[#Start Game|Start Game]] packet is set to true, instead of the [[#Move Player|Move Player]] packet. The client will send this packet once every tick.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x90<br />
|rowspan="2"| Client<br />
|}<br />
<br />
<br />
<br />
==== Creative Content ====<br />
<br />
Sent by the server to set the creative inventory's content for a player.<br />
<br />
Introduced in 1.16, this packet replaces the previous method of sending an [[#Inventory Content|Inventory Content]] packet with the creative inventory window ID. <b>This packet must be sent from a server after the StartGamePacket since 1.16.100. Otherwise, the client will crash!</b><br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x91<br />
|rowspan="2"| Client<br />
|}<br />
<br />
==== Player Enchant Options ====<br />
<br />
Sent by the server to update the enchantment options displayed when the user opens the enchantment table and puts an item in.<br />
<br />
This packet was added in 1.16 and allows the server to decide on the enchantment that can be selected by a player. The player should be sent once for every slot update of the enchantment table. The vanilla server sends an empty packet when the player first opens the enchantment table (air is is present in the enchantment table slot) and sends a packet with actual enchantments in it when items are put in that can have enchantments.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x92<br />
|rowspan="2"| Client<br />
|}<br />
<br />
<br />
<br />
==== Item Stack Request ====<br />
<br />
Sent by the client to change item stacks in an inventory. <br />
<br />
Added in 1.16, is essentially a replacement of the [[#Inventory Transaction|Inventory Transaction]] packet for inventory specific actions, such as moving items around or crafting.<br />
<br />
The [[#Inventory Transaction|Inventory Transaction]] packet is still used for actions such as placing blocks and interacting with entities.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x93<br />
|rowspan="2"| Client<br />
|}<br />
<br />
<br />
<br />
==== Item Stack Response ====<br />
<br />
Sent by the server in response to an [[#Item Stack Request|Item Stack Request]] packet from the client.<br />
<br />
This packet is used to either approve or reject ItemStackRequests from the client. If a request is approved, the client will simply continue as normal. If rejected, the client will undo the actions so that the inventory should be in sync with the server again.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x94<br />
|rowspan="2"| Client<br />
|}<br />
<br />
<br />
<br />
==== Player Armor Damage ====<br />
<br />
Sent by the server to damage the armor of a player. It is a very efficient packet, but generally it's much easier to just send a slot update for the damaged armor.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x95<br />
|rowspan="2"| Client<br />
|}<br />
<br />
<br />
<br />
==== Code Builder ====<br />
<br />
Sent by the server to open the URL to a Code Builder (websocket) server.<br />
<br />
This packet is only used by Education Edition and have no affect on the base game.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x96<br />
|rowspan="2"| Client<br />
|}<br />
<br />
<br />
<br />
==== Update Player Game Type ====<br />
<br />
Sent by the server to change the game mode of a player. It is functionally identical to the [[#Set Player Game Type|Set Player Game Type]] packet.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x97<br />
|rowspan="2"| Client<br />
|}<br />
<br />
<br />
<br />
==== Emote List ====<br />
<br />
Sent by the client every time it joins the server and when it equips new emotes. It may be used by the server to find out which emotes the client has available. If the player has no emotes equipped, this packet is not sent.<br />
<br />
Under certain circumstances, this packet is also sent from the server to the client, but more testing is needed for this.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x98<br />
|rowspan="2"| Client<br />
|}<br />
<br />
<br />
<br />
==== Position Tracking DB Server Broadcast ====<br />
<br />
Sent by the server in response to the [[#Position Tracking DB Client Request|Position Tracking DB Client Request]] packet. Thus packet is, as of 1.16, currently only for lodestones. The server maintains a database with tracking IDS and their position and dimension. The client will request these tracking IDs, (NBT tag set on the lodestone compass with the tracking ID?) and the server will respond with the status of those tracking IDs.<br />
<br />
What is actually done with the data sent depends on what the client chooses to do with it. For the lodestone compass, it is used to make the compass point towards lodestones and to make it spin if the lodestone at a position is no longer there.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x99<br />
|rowspan="2"| Client<br />
|}<br />
<br />
<br />
<br />
==== Position Tracking DB Client Request ====<br />
<br />
Sent by the client to request the position and dimension of a 'tracking ID'. These IDs are tracked in a database by the server. In 1.16, this is used for lodestones.<br />
<br />
The client will sent this request to find the position a lodestone compass needs to point to. If found, it will point to the lodestone. If not, it will start spinning around.<br />
<br />
A [[#Position Tracking DB Server Broadcast|Position Tracking DB Server Broadcast]] packet should be sent in response to this packet.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x9a<br />
|rowspan="2"| Client<br />
|}<br />
<br />
<br />
<br />
==== Debug Info ====<br />
<br />
Sent by the server. It does not seem to do anything when sent to the normal client in 1.16;<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x9b<br />
|rowspan="2"| Client<br />
|}<br />
<br />
<br />
<br />
==== Packet Violation Warning ====<br />
<br />
Sent by the client when it receives an invalid packet from the server. It holds some information on the error that occured.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x9c<br />
|rowspan="1"| Client<br />
|}<br />
<br />
==== Item Component ====<br />
<br />
Always sent by a vanilla Bedrock server after the StartGamePacket. Sent not empty for items with data driven information.<br />
<br />
In order for the information in this packet to be used, the experiment data titled <code>data_driven_items</code> must be set to <code>true</code> in the ResourcePackStackPacket (as of 1.16.100), and the item entry in StartGamePacket must have its component toggle set to <code>true</code>.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0xA2<br />
|rowspan="2"| Client<br />
| Items<br />
| ComponentItemData[]<br />
| A list of all item components.<br />
|}<br />
<br />
ComponentItemData takes in a String identifier and an NBT CompoundTag containing item data. Valid, minimal NBT data looks like the following (Any comments are preceded with <code>//</code>):<br />
<br />
<syntaxhighlight lang="json"><br />
{<br />
"components": {<br />
"item_properties": {<br />
"allow_off_hand": 1b,<br />
"hand_equipped": 1b,<br />
"max_stack_size": 1i<br />
},<br />
"minecraft:icon": {<br />
"texture": "example_item" // Required even with a resource pack, or else the client complains about icon texture<br />
}<br />
},<br />
"id": 1020i, // The runtime ID of the item<br />
"name": "wikivg:example_item"<br />
}<br />
</syntaxhighlight><br />
<br />
A list of all known valid item properties (and descriptions, if added):<br />
<br />
{| class="wikitable"<br />
! Property name<br />
! Property type<br />
! Property description<br />
|-<br />
| allow_off_hand<br />
| boolean<br />
| If the item is permitted in the offhand inventory slot.<br />
|-<br />
| animates_in_toolbar<br />
| boolean<br />
|<br />
|-<br />
| can_destroy_in_creative<br />
| boolean<br />
|<br />
|-<br />
| creative_category<br />
| integer<br />
| 1 is the construction, 2 is the nature, 3 is the equipment, 4 is the items, the default value is 1<br />
|-<br />
| creative_group <br />
| string<br />
| TODO<br />
|-<br />
| damage<br />
| integer<br />
| shows the number of damge attacks<br />
|-<br />
| enchantable_slot<br />
| string<br />
|<br />
|-<br />
| enchantable_value<br />
| integer<br />
|<br />
|-<br />
| explodable<br />
| boolean<br />
|<br />
|-<br />
| foil<br />
| boolean<br />
|<br />
|-<br />
| frame_count<br />
| integer<br />
|<br />
|-<br />
| hand_equipped<br />
| boolean<br />
| If the item should be visually held like a tool.<br />
|-<br />
| ignores_permissions<br />
| boolean<br />
|<br />
|-<br />
| liquid_clipped<br />
| boolean<br />
| gives the possibility to click on a liquid<br />
|-<br />
| max_stack_size<br />
| integer<br />
| The maximum amount of this item that can be in an inventory slot.<br />
|-<br />
| mining_speed<br />
| float<br />
|<br />
|-<br />
| mirrored_art<br />
| boolean<br />
|<br />
|-<br />
| requires_interact<br />
| boolean<br />
|<br />
|-<br />
| should_despawn<br />
| boolean<br />
|<br />
|-<br />
| stacked_by_data<br />
| boolean<br />
|<br />
|-<br />
| use_animation<br />
| integer<br />
|<br />
|-<br />
| use_duration<br />
| integer<br />
|<br />
|-<br />
|}<br />
<br />
Other item components can be found here: https://bedrock.dev/docs/stable/Item#Item%20Components (Add these in the same format as <code>minecraft:icon</code> shown above). Also see: https://wiki.bedrock.dev/concepts/items<br />
<br />
[[Category:Bedrock Minecraft]]</div>Orladoghttps://wiki.vg/index.php?title=Bedrock_Protocol&diff=16433Bedrock Protocol2021-02-23T20:45:15Z<p>Orladog: Undo revision 16430 by Orladog (talk)</p>
<hr />
<div>:: '''Remember that this page is a WIP'''. Come back later to see a more complete page.<br />
----<br />
<br />
{{Box<br />
|BORDER = #9999FF<br />
|BACKGROUND = #99CCFF<br />
|WIDTH = 100%<br />
|ICON = <br />
|HEADING = Heads up!<br />
|CONTENT = This article is about the protocol for the release of Minecraft '''Bedrock Edition''' ([[Bedrock Protocol version numbers|1.16.20, protocol 408]]). See [[Protocol]] for the Java Edition Protocol.<br />
}}<br />
<br />
This is the [https://minecraft.gamepedia.com/Bedrock_Edition Bedrock Edition] Protocol Documentation.<br />
The Bedrock Edition Protocol uses [[wikipedia:User Datagram Protocol|UDP]] instead of [[wikipedia:Transmission Control Protocol|TCP]] that is used for the Java Edition.<br />
Bedrock Edition uses [[Raknet Protocol|RakNet]] as its protocol library.<br />
<br />
The default Bedrock Edition port is 19132.<br />
<br />
Information for this page was obtained from the [https://github.com/NukkitX/Protocol NukkitX Protocol library], [https://github.com/NiclasOlofsson/MiNET MiNET] and [https://github.com/Sandertv/gophertunnel gophertunnel].<br />
<br />
== Data types ==<br />
<br />
{| class="wikitable"<br />
|-<br />
!<br />
! Size (Bytes)<br />
! Range<br />
! Notes<br />
|-<br />
! Byte<br />
| 1<br />
| 0 to 255<br />
|<br />
|-<br />
! Boolean<br />
| 1<br />
| 0 or 1<br />
| A Byte treated as boolean, 0 is false but anything greater then that is true<br />
|-<br />
! Short<br />
| 2<br />
| -32768 to 32767<br />
|<br />
|-<br />
! Unsigned Short<br />
| 2<br />
| 0 to 65535<br />
|<br />
|-<br />
! Int<br />
| 4<br />
| -2147483648 to 2147483647<br />
| Signed little-endian 32-bit Integer<br />
|-<br />
! Int (big endian)<br />
| 4<br />
| -2147483648 to 2147483647<br />
| Signed big-endian 32-bit Integer<br />
|-<br />
! Unsigned Int<br />
| 4<br />
| 0 to 4294967295<br />
| Unsigned 32-bit Integer<br />
|-<br />
! Long<br />
| 8<br />
| -2^63 to 2^63-1<br />
| Signed 64-bit Integer<br />
|-<br />
! Unsigned Long<br />
| 8<br />
| 2^64-1<br />
| Unsigned 64-bit Integer<br />
|-<br />
! Float<br />
| 4<br />
| <br />
| A [[wikipedia:Single-precision_Floating-poInt_format|single-precision 32-bit IEEE 754 Floating poInt number]]<br />
|-<br />
! Double<br />
| 8<br />
| <br />
| A [[wikipedia:Double-precision_Floating-poInt_format|Double-precision 64-bit IEEE 754 Floating poInt number]]<br />
|-<br />
! VarInt<br />
| &ge; 1<br>&le; 5<br />
| 0 to 4294967295<br />
| <br />
|-<br />
! SignedVarInt<br />
| &ge; 1<br>&le; 5<br />
| -2147483648 and 2147483647<br />
| <br />
|-<br />
! VarLong<br />
| &ge; 1<br>&le; 10<br />
| <br />
|<br />
|-<br />
! SignedVarLong<br />
| &ge; 1<br>&le; 10<br />
| -2^63 and 2^63-1<br />
|<br />
|-<br />
! String<br />
| <br />
| <br />
| [[wikipedia:UTF-8|UTF-8]] String prefixed with its size in Bytes as a VarInt. This has the same data structure as a ByteArray but it contains textual data.<br />
|-<br />
! Vector3<br />
| 12<br />
| <br />
| Three Float values (X, Y and Z respectively)<br />
|-<br />
! Vector2<br />
| 8<br />
| <br />
| Two Float values (X and Y respectively)<br />
|-<br />
! NBT<br />
| <br />
| <br />
| <br />
|-<br />
! ByteArray<br />
| <br />
| <br />
| An arbitrary array of Bytes prefixed with its size in Bytes as a VarInt.<br />
|-<br />
! BlockCoordinates<br />
| &ge; 3<br>&le; 15<br />
| <br />
| A SignedVarInt, a normal VarInt and another SignedVarInt (X, Y and Z respectively)<br />
|-<br />
! PlayerLocation<br />
| 15<br />
| <br />
| Three Float values (X, Y and Z respectively), followed by three Bytes (pitch, head yaw and yaw respectively). To convert the Bytes to normal pitch and yaw values divide them by 0.71<br />
|-<br />
! UUID<br />
| 16<br />
| A [[wikipedia:Universally_unique_identifier|UUID]]<br />
| Encoded as two unsigned 64-bit Integers: the most significant 64 bits and the least significant 64 bits<br />
|}<br />
<br />
== Packet Format ==<br />
<br />
Bedrock Edition uses [[Raknet Protocol|RakNet]] as its protocol library, so the packets are sent that way. The UDP protocol specifies packet length, so unlike Java Edition and TCP which deal with raw data streams packets are not length-prefixed. Packets seem to always use compression and can also use encryption. Multiple packets can also be batched into a single packet.<br />
Packet compression uses [https://zlib.net/ zlib], and it seems that packet data can be fed directly into zlib (after being decrypted if encryption is enabled).<br />
<br><br><br />
Refer to [https://github.com/Sandertv/gophertunnel/blob/19c96251a36a39d9ffb938053410852e811755e3/minecraft/protocol/packet/decoder.go#L58 gophertunnel] for more information.<br />
<br />
== Login process ==<br />
The login process is as follows:<br />
# C→S: [[#Login|Login]]<br />
# S→C: [[#Server To Client Handshake|Server To Client Handshake]]<br />
# C→S: [[#Client To Server Handshake|Client To Server Handshake]]<br />
# S→C: [[#Play Status|Play Status]] (Login success)<br />
<br />
To spawn, the following packets should be sent, in order, after the ones above:<br />
# S→C: [[#Resource Packs Info|Resource Packs Info]]<br />
# C→S: [[#Resource Pack Client Response|Resource Pack Client Response]]<br />
# S→C: [[#Resource Pack Stack|Resource Pack Stack]]<br />
# C→S: [[#Resource Pack Client Response|Resource Pack Client Response]]<br />
# S→C: [[#Start Game|Start Game]]<br />
# S→C: [[#Creative Content|Creative Content]]<br />
# S→C: [[#Biome Definition List|Biome Definition List]]<br />
# S→C: Chunks<br />
# S→C: [[#Play Status|Play Status]] (Player spawn)<br />
<br />
If there are no resource packs being sent, a [[#Resource Pack Stack|Resource Pack Stack]] can be sent directly after [[#Resource Packs Info|Resource Packs Info]] to avoid the client responses.<br />
<br />
== Packets ==<br />
Please note that some packet ids are missing, so they don't line up.<br />
The following packet ids are missing:<br />
0x10, 0x74, 0x7F, 0x80<br />
(16, 116, 127, 128)<br />
<br />
<br />
==== Login ====<br />
<br />
Sent when the client initially tries to join the server. It is the first packet sent and contains information specific to the player.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x01<br />
|rowspan="3"| Server<br />
| Protocol version<br />
| Int (big-endian)<br />
| <br />
|-<br />
| Chain data<br />
| JSON array of JWT Data<br />
| Contains the display name, UUID and XUID<br />
|-<br />
| Skin data<br />
| JWT Data<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Play Status ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x02<br />
|rowspan="1"| Client<br />
| Status<br />
| Int (big-endian)<br />
| The current status of the connection.<br />
|}<br />
<br />
The values for each status are as follows:<br />
{| class="wikitable"<br />
! Status<br />
! Name<br />
! Notes<br />
|-<br />
| 0<br />
| Login success<br />
| Sent after [[#Login|Login]] has been successfully decoded and the player has logged in<br />
|-<br />
| 1<br />
| Failed client<br />
| Displays "Could not connect: Outdated client!"<br />
|-<br />
| 2<br />
| Failed server<br />
| Displays "Could not connect: Outdated server!"<br />
|-<br />
| 3<br />
| Player spawn<br />
| Sent after world data to spawn the player<br />
|-<br />
| 4<br />
| Failed invalid Tenant<br />
| Displays "Unable to connect to world. Your school does not have access to this server."<br />
|-<br />
| 5<br />
| Failed Vanilla Edu.<br />
| Displays "The server is not running Minecraft: Education Edition. Failed to connect."<br />
|-<br />
| 6<br />
| Failed Edu. Vanilla<br />
| Displays "The server is running an incompatible edition of Minecraft. Failed to connect."<br />
|-<br />
| 7<br />
| Failed server full<br />
| Displays "Wow this server is popular! Check back later to see if space opens up. Server Full"<br />
|}<br />
<br />
==== Server To Client Handshake ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x03<br />
|rowspan="1"| Client<br />
| JWT data<br />
| JWT String<br />
| Contains the salt to complete the Diffie-Hellman key exchange<br />
|}<br />
<br />
<br />
<br />
==== Client To Server Handshake ====<br />
<br />
Sent by the client in response to a [[#Server To Client Handshake|Server To Client Handshake]] packet sent by the server. It is the first encrypted packet in the login handshake and serves as a confirmation that encryption is correctly initialized client side. It has no fields.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x04<br />
|rowspan="1"| Server<br />
<br />
|}<br />
<br />
<br />
<br />
==== Disconnect ====<br />
<br />
Sent by the server to disconnect a client.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x05<br />
|rowspan="2"| Client<br />
| Hide disconnect screen<br />
| Boolean<br />
| Specifies if the disconnection screen should be hidden when the client is disconnected, meaning it will be sent directly to the main menu.<br />
|-<br />
| Kick message<br />
| String<br />
| An optional message to show when disconnected.<br />
|}<br />
<br />
<br />
<br />
==== Resource Packs info ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x06<br />
|rowspan="4"| Client<br />
| Forced to Accept<br />
| Boolean<br />
| If the resource pack requires the client accept it.<br />
|-<br />
| Scripting Enabled<br />
| Boolean<br />
| If scripting is enabled.<br />
|-<br />
| BehahaviorPackInfos<br />
| ResourcePackInfo[]<br />
| A list of behaviour packs that the client needs to download before joining the server. All of these behaviour packs will be applied together.<br />
|-<br />
| ResourcePackInfos<br />
| ResourcePackInfo[]<br />
| A list of resource packs that the client needs to download before joining the server. The order of these resource packs is not relevant in this packet. It is however important in the Resource Pack Stack packet.<br />
|}<br />
<br />
<br />
<br />
==== Resource Pack Stack ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! colspan="2" | Field Name<br />
! colspan="2" | Field Type<br />
! Notes<br />
|-<br />
| rowspan="11" | 0x07<br />
| rowspan="11" | Client<br />
| colspan="2" | Forced to Accept<br />
| colspan="2" | Boolean<br />
| If the resource pack must be accepted for the player to join the server.<br />
|-<br />
! Resource Pack Entry<br />
! Field Name<br />
! colspan="2" | <br />
! <br />
|-<br />
| rowspan="3" | Array<br />
| Pack ID<br />
| colspan="2" | String<br />
| The ID of the resource pack.<br />
|-<br />
| Pack Version<br />
| colspan="2" | String<br />
| The version of the resource pack.<br />
|-<br />
| Subpack Name<br />
| colspan="2" | String<br />
| The subpack name of the resource pack.<br />
|-<br />
! Behavior Pack Entry<br />
! Field Name<br />
! colspan="2" | <br />
! <br />
|-<br />
| rowspan="3" | Array<br />
| Pack ID<br />
| colspan="2" | String<br />
| The ID of the resource pack.<br />
|-<br />
| Pack Version<br />
| colspan="2" | String<br />
| The version of the resource pack.<br />
|-<br />
| Subpack Name<br />
| colspan="2" | String<br />
| The subpack name of the resource pack.<br />
|-<br />
| colspan="2" | Experimental<br />
| colspan="2" | Boolean<br />
| If the sent resource and behavior packs are experimental.<br />
|-<br />
| colspan="2" | Game Version<br />
| colspan="2" | String<br />
| The version of the game the sent resource and behavior packs were made for.<br />
|}<br />
<br />
<br />
<br />
==== Resource Pack Response ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x08<br />
|rowspan="2"| Server<br />
| Status<br />
| Byte<br />
| See below<br />
|-<br />
| Pack IDs<br />
| ResourcePackIds<br />
| All of the pack IDs.<br />
|}<br />
<br />
The values for each status are as follows:<br />
{| class="wikitable"<br />
! Status<br />
! Name<br />
! Notes<br />
|-<br />
| 0<br />
| None<br />
| <br />
|-<br />
| 1<br />
| Refused<br />
| <br />
|-<br />
| 2<br />
| Send packs<br />
|<br />
|-<br />
| 3<br />
| Have all packs<br />
| <br />
|-<br />
| 4<br />
| Completed<br />
|<br />
|}<br />
<br />
<br />
<br />
==== Text ====<br />
<br />
Sent by the client to the server to send chat messages, and by the server to the client to forward or send messages, which may be chat, popups, tips etc.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! colspan="2" | Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| rowspan="9" | 0x09<br />
| rowspan="9" | Server &amp; Client<br />
| colspan="2" | Type<br />
| Byte<br />
| The type of chat message sent.<br />
|-<br />
| colspan="2" | Needs Translation<br />
| Boolean<br />
| If the message sent is a translation key and needs to be translated.<br />
|-<br />
! Chat Type ID<br />
! Text<br />
! <br />
! Derived from above; values sent here change depending on that.<br />
|-<br />
| rowspan="1" | 0, 1, or 2<br />
| rowspan="1" | Source Name<br />
| rowspan="1" | String<br />
| rowspan="1" | The name of the source.<br />
|-<br />
|-<br />
|-<br />
| rowspan="1" | 3, 4, or 5<br />
| rowspan="1" | Message<br />
| rowspan="1" | String<br />
| rowspan="1" | The message sent with the packet.<br />
|-<br />
|-<br />
|-<br />
|-<br />
| rowspan="2" | 6, 7, or 8<br />
| Message<br />
| String<br />
| The message sent with the packet<br />
|-<br />
| Parameters<br />
| Array<br />
| The parameters sent with the packet. This usually includes translation parameters or similar types depending on what kind of chat type was sent.<br />
|-<br />
| colspan="2" | XUID<br />
| Optional String<br />
| The XUID of the player who sent this message.<br />
|-<br />
| colspan="2" | Platform Chat ID<br />
| Optional String<br />
| The platform chat ID of the sent message.<br />
|}<br />
<br />
{| class="wikitable"<br />
! ID<br />
! Chat Type<br />
|-<br />
| 0<br />
| Raw<br />
|-<br />
| 1<br />
| Chat<br />
|-<br />
| 2<br />
| Translation<br />
|-<br />
| 3<br />
| Popup<br />
|-<br />
| 4<br />
| Jukebox Popup<br />
|-<br />
| 5<br />
| Tip<br />
|-<br />
| 6<br />
| System<br />
|-<br />
| 7<br />
| Whisper<br />
|-<br />
| 8<br />
| Announcement<br />
|-<br />
| 9<br />
| Object<br />
|-<br />
| 10<br />
| Object Whisper<br />
|}<br />
<br />
For additional information and examples of all the chat types above, see here: https://imgur.com/a/KhcFscg<br />
<br />
<br />
<br />
==== Set Time ====<br />
<br />
Sent by the server to update the current time client-side. The client actually advances time client-side by itself, so this packet does not need to be sent each tick. It is merely a means of synchronizing time between server and client.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x0A<br />
|rowspan="1"| Client<br />
| Time<br />
| SignedVarInt<br />
| Time is the current time. The time is not limited to 24000 (time of day), but continues progressing after that.<br />
|}<br />
<br />
<br />
<br />
==== Start Game ====<br />
<br />
Sent by the server to send information about the world the player will be spawned in.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="54"| 0x0B<br />
|rowspan="54"| Client<br />
| Entity ID Self<br />
| SignedVarLong<br />
| The unique ID of the player. The unique ID is a value that remains consistent across different sessions of the same world, but most unofficial servers simply fill the runtime ID of the entity out for this field.<br />
|-<br />
| Runtime Entity ID<br />
| VarLong<br />
| The runtime ID of the player. The runtime ID is unique for each world session, and entities are generally identified in packets using this runtime ID.<br />
|-<br />
| Player Gamemode<br />
| SignedVarInt<br />
|-<br />
| Spawn<br />
| Vector3<br />
| The spawn position of the player in the world. In servers this is often the same as the world's spawn position found below.<br />
|-<br />
| Rotation<br />
| Vector2<br />
| The pitch and yaw of the player<br />
|-<br />
| Seed<br />
| SignedVarInt<br />
| The seed used to generate the world. Unlike in Java edition, the seed is a 32bit Integer here.<br />
|-<br />
| Spawn Biome Type<br />
| Short<br />
| <br />
|-<br />
| Custom Biome Name<br />
| String<br />
| <br />
|-<br />
| Dimension<br />
| SignedVarInt<br />
| Dimension is the ID of the dimension that the player spawns in. It is a value from 0-2, with 0 being the overworld, 1 being the nether and 2 being the end.<br />
|-<br />
| Generator<br />
| SignedVarInt<br />
| Generator is the generator used for the world. It is a value from 0-4, with 0 being old limited worlds, 1 being infinite worlds, 2 being flat worlds, 3 being nether worlds and 4 being end worlds. A value of 0 will actually make the client stop rendering chunks you send beyond the world limit.<br />
|-<br />
| World Gamemode<br />
| SignedVarInt<br />
| The game mode that a player gets when it first spawns in the world. It is shown in the settings and is used if the Player Gamemode is set to 5.<br />
|-<br />
| Difficulty<br />
| SignedVarInt<br />
| Difficulty is the difficulty of the world. It is a value from 0-3, with 0 being peaceful, 1 being easy, 2 being normal and 3 being hard.<br />
|-<br />
| World Spawn<br />
| BlockCoordinates <br />
| The block on which the world spawn of the world. This coordinate has no effect on the place that the client spawns, but it does have an effect on the direction that a compass poInts.<br />
|-<br />
| Has achievements disabled<br />
| Boolean<br />
| Defines if achievements are disabled in the world. The client crashes if this value is set to true while the player's or the world's game mode is creative, and it's recommended to simply always set this to false as a server.<br />
|-<br />
| Day cycle stop time<br />
| SignedVarInt<br />
| The time at which the day cycle was locked if the day cycle is disabled using the respective game rule. The client will maIntain this time as Boolean as the day cycle is disabled.<br />
|-<br />
| EDU offer<br />
| SignedVarInt<br />
| Some Minecraft: Education Edition field that specifies what 'region' the world was from, with 0 being None, 1 being RestOfWorld, and 2 being China. The actual use of this field is unknown.<br />
|-<br />
| Has Education Edition features enabled<br />
| Boolean<br />
| Specifies if the world has education edition features enabled, such as the blocks or entities specific to education edition.<br />
|-<br />
| Education Production ID<br />
| String<br />
|<br />
|-<br />
| Rain level<br />
| Float<br />
| The level specifying the Intensity of the rain falling. When set to 0, no rain falls at all.<br />
|-<br />
| Lightning level<br />
| Float<br />
| The level specifying the Intensity of the thunder. This may actually be set independently from the rain level, meaning dark clouds can be produced without rain.<br />
|-<br />
| Has Confirmed Platform Locked Content<br />
| Boolean<br />
| <br />
|-<br />
| Is Multiplayer<br />
| Boolean<br />
| Specifies if the world is a multi-player game. This should always be set to true for servers.<br />
|-<br />
| Broadcast To LAN<br />
| Boolean<br />
| Specifies if LAN broadcast was Intended to be enabled for the world.<br />
|-<br />
| Xbox Live Broadcast Mode<br />
| VarInt<br />
| The mode used to broadcast the joined game across XBOX Live.<br />
|-<br />
| Platform Broadcast Mode<br />
| VarInt<br />
| The mode used to broadcast the joined game across the platform.<br />
|-<br />
| Enable commands<br />
| Boolean<br />
| If commands are enabled for the player. It is recommended to always set this to true on the server, as setting it to false means the player cannot, under any circumstance, use a command.<br />
|-<br />
| Are texture packs required<br />
| Boolean<br />
| Specifies if the texture pack the world might hold is required, meaning the client was forced to download it before joining.<br />
|-<br />
| GameRules<br />
| GameRules<br />
| Defines game rules currently active with their respective values. The value of these game rules may be either 'bool', 'Int32' or 'Float32'. Some game rules are server side only, and don't necessarily need to be sent to the client.<br />
|-<br />
| Bonus Chest<br />
| Boolean<br />
| Specifies if the world had the bonus map setting enabled when generating it. It does not have any effect client-side.<br />
|-<br />
| Map Enabled<br />
| Boolean<br />
| Specifies if the world has the start with map setting enabled, meaning each joining player obtains a map. This should always be set to false, because the client obtains a map all on its own accord if this is set to true.<br />
|-<br />
| Permission Level<br />
| SignedVarInt<br />
| The permission level of the player. It is a value from 0-3, with 0 being visitor, 1 being member, 2 being operator and 3 being custom.<br />
|-<br />
| Server Chunk Tick Range<br />
| Int<br />
| The radius around the player in which chunks are ticked. Most servers set this value to a fixed number, as it does not necessarily affect anything client-side.<br />
|-<br />
| Has Locked Behavior Pack<br />
| Boolean<br />
| Specifies if the texture pack of the world is locked, meaning it cannot be disabled from the world. This is typically set for worlds on the marketplace that have a dedicated texture pack.<br />
|-<br />
| Has Locked Resource Pack<br />
| Boolean<br />
| Specifies if the texture pack of the world is locked, meaning it cannot be disabled from the world. This is typically set for worlds on the marketplace that have a dedicated texture pack.<br />
|-<br />
| Is From Locked World Template<br />
| Boolean<br />
| Specifies if the world from the server was from a locked world template. For servers this should always be set to false.<br />
|-<br />
| Use MSA Gamertags Only<br />
| Boolean<br />
| <br />
|-<br />
| Is From World Template<br />
| Boolean<br />
| Specifies if the world from the server was from a locked world template. For servers this should always be set to false.<br />
|-<br />
| Is World Template Option Locked<br />
| Boolean<br />
| Specifies if the world was a template that locks all settings that change properties above in the settings GUI. It is recommended to set this to true for servers that do not allow things such as setting game rules through the GUI.<br />
|-<br />
| Only Spawn V1 Villagers<br />
| Boolean<br />
| A hack that Mojang put in place to preserve backwards compatibility with old villagers. The his never actually read though, so it has no functionality.<br />
|-<br />
| Game Version<br />
| String<br />
| The version of the game from which Vanilla features will be used. The exact function of this field isn't clear.<br />
|-<br />
| Limited World Width<br />
| Int<br />
|<br />
|-<br />
| Limited World Height<br />
| Int<br />
|<br />
|-<br />
| Is Nether Type<br />
| Boolean<br />
|<br />
|-<br />
| Is Force Experimental Gameplay<br />
| Boolean<br />
|<br />
|-<br />
| Level ID<br />
| String<br />
| A base64 encoded world ID that is used to identify the world.<br />
|-<br />
| World name<br />
| String<br />
| The name of the world that the player is joining. Note that this field shows up above the player list for the rest of the game session, and cannot be changed. Setting the server name to this field is recommended.<br />
|-<br />
| Premium World Template Id<br />
| String<br />
| A UUID specific to the premium world template that might have been used to generate the world. Servers should always fill out an empty String for this.<br />
|-<br />
| Is Trial<br />
| Boolean<br />
| Specifies if the world was a trial world, meaning features are limited and there is a time limit on the world.<br />
|-<br />
| Is Server Side movement enabled<br />
| Boolean<br />
| Specifies if the server is authoritative over the movement of the player, meaning it controls the movement of it.<br />
|-<br />
| Current Tick<br />
| Boolean<br />
| The total time in ticks that has elapsed since the start of the world.<br />
|-<br />
| Enchantment Seed<br />
| SignedVarInt<br />
| The seed used to seed the random used to produce enchantments in the enchantment table. Note that the exact correct random implementation must be used to produce the correct results both client- and server-side.<br />
|-<br />
| Block Palette<br />
| BlockPalette<br />
| A list of all blocks registered on the server.<br />
|-<br />
| Itemstates<br />
| Itemstates<br />
| A list of all items with their legacy IDs which are available in the game. Failing to send any of the items that are in the game will crash mobile clients.<br />
|-<br />
| Multiplayer Correlation ID<br />
| String<br />
| A unique ID specifying the multi-player session of the player. A random UUID should be filled out for this field.<br />
|}<br />
<br />
<br />
<br />
==== Add Player ====<br />
<br />
Sent by the server to make a player entity show up client-side. It is one of the few entities that cannot be sent using the [[#Add Entity|Add Entity]] packet.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="19"| 0x0C<br />
|rowspan="19"| Client<br />
| UUID<br />
| UUID<br />
| UUID is the UUID of the player. It is the same UUID that the client sent in the Login packet at the start of the session. A player with this UUID must exist in the player list (built up using the Player List packet) for it to show up in-game.<br />
|-<br />
| Username<br />
| String<br />
| Username is the name of the player. This username is the username that will be set as the initial name tag of the player.<br />
|-<br />
| Entity ID Self<br />
| SignedVarLong<br />
| The unique ID of the player. The unique ID is a value that remains consistent across different sessions of the same world, but most unoffical servers simply fill the runtime ID of the player out for this field.<br />
|-<br />
| Runtime Entity ID<br />
| VarLong<br />
| The runtime ID of the player. The runtime ID is unique for each world session, and entities are generally identified in packets using this runtime ID.<br />
|-<br />
| Platform Chat ID<br />
| String<br />
| An identifier only set for particular platforms when chatting (presumably only for Nintendo Switch). It is otherwise an empty string, and is used to decide which players are able to chat with each other.<br />
|-<br />
| Position<br />
| Vector3<br />
| The position to spawn the player at. If the player is at a distance that the viewer cannot see, the player will still show up if the viewer moves closer.<br />
|-<br />
| Velocity<br />
| Vector3<br />
| The initial velocity the player spawns with. This velocity will initiate client side movement of the player.<br />
|-<br />
| Rotation<br />
| Float<br />
| Pitch, yaw and head yaw<br />
|-<br />
| Held Item<br />
| Item<br />
| The item that the player is holding. The item is shown to the viewer as soon as the player itself shows up. Needless to say that this field is rather pointless, as additional packets still must be sent for armour to show up.<br />
|-<br />
| Metadata<br />
| MetadataDictionary<br />
| A map of entity metadata, which includes flags and data properties that alter in particular the way the player looks. Flags include ones such as 'on fire' and 'sprinting'. The metadata values are indexed by their property key.<br />
|-<br />
| Flags<br />
| VarInt<br />
| Flags is a set of flags that specify certain properties of the player, such as whether or not it can fly and/or move through blocks.<br />
|-<br />
| Command permission<br />
| VarInt<br />
| A set of permissions that specify what commands a player is allowed to execute.<br />
|-<br />
| Action Permissions<br />
| VarInt<br />
| Action Permissions is, much like Flags, a set of flags that specify actions that the player is allowed to undertake, such as whether it is allowed to edit blocks, open doors etc.<br />
|-<br />
| Permission Level<br />
| VarInt<br />
| The permission level of the player as it shows up in the player list built up using the PlayerList packet.<br />
|-<br />
| Custom stored permissions<br />
| VarInt<br />
| <br />
|-<br />
| User Id<br />
| Long<br />
| A unique identifier of the player. It appears it is not required to fill this field out with a correct value. Simply writing 0 seems to work.<br />
|-<br />
| Links<br />
| Links<br />
| A list of entity links that are currently active on the player. These links alter the way the player shows up when first spawned in terms of it shown as riding an entity. Setting these links is important for new viewers to see the player is riding another entity.<br />
|-<br />
| Device ID<br />
| String<br />
| The device ID set in one of the files found in the storage of the device of the player. It may be changed freely, so it should not be relied on for anything.<br />
|-<br />
| Device OS<br />
| Int<br />
| The build platform/device OS of the player that is about to be added, as it sent in the Login packet when joining.<br />
|}<br />
<br />
<br />
<br />
==== Add Entity ====<br />
<br />
Sent by the server to spawn an entity to the player. It is used for every entity except other players, paintings and items, for which the [[#Add Player|Add Player]], [[#Add Painting|Add Painting]] and [[#Add Item Entity|Add Item Entity]] packets are used.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="9"| 0x0D<br />
|rowspan="9"| Client<br />
| Entity ID Self<br />
| SignedVarLong<br />
| The unique ID of the entity. The unique ID is a value that remains consistent across different sessions of the same world, but most unofficial servers simply fill the runtime ID of the entity out for this field.<br />
|-<br />
| Runtime Entity ID<br />
| VarLong<br />
| The runtime ID of the entity. The runtime ID is unique for each world session, and entities are generally identified in packets using this runtime ID.<br />
|-<br />
| Entity Type<br />
| String<br />
| The string entity type of the entity, for example 'minecraft:skeleton'.<br />
|-<br />
| Position<br />
| Vector3<br />
| The position to spawn the entity at. If the entity is at a distance that the player cannot see, the entity will still show up if the player moves closer.<br />
|-<br />
| Velocity<br />
| Vector3<br />
| The initial velocity the entity spawns with. This velocity will initiate client side movement of the entity.<br />
|-<br />
| Rotation<br />
| Vector3<br />
| Pitch, yaw and head yaw<br />
|-<br />
| Attributes<br />
| EntityAttributes<br />
| A slice of attributes that the entity has. It includes attributes such as its health, movement speed, etc.<br />
|-<br />
| Metadata<br />
| MetadataDictionary<br />
| A map of entity metadata, which includes flags and data properties that alter in particular the way the entity looks. Flags include ones such as 'on fire' and 'sprinting'. The metadata values are indexed by their property key.<br />
|-<br />
| Links<br />
| Links<br />
| A list of entity links that are currently active on the entity. These links alter the way the entity shows up when first spawned in terms of it shown as riding an entity. Setting these links is important for new viewers to see the entity is riding another entity.<br />
|}<br />
<br />
<br />
<br />
==== Remove Entity ====<br />
<br />
Sent by the server to remove an entity that currently exists in the world from the client-side. Sending this packet if the client cannot already see this entity will have no effect.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x0E<br />
|rowspan="1"| Client<br />
| Unique Entity Id<br />
| SignedVarLong<br />
| The unique ID of the entity to be removed. The unique ID is a value that remains consistent across different sessions of the same world, but most unofficial servers simply fill the runtime ID of the entity out for this field.<br />
|}<br />
<br />
<br />
<br />
==== Add Item Entity ====<br />
<br />
Sent by the server to make an item entity show up. It is one of the few entities that cannot be sent using the [[#Add Entity|Add Entity]] packet.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="7"| 0x0F<br />
|rowspan="7"| Client<br />
| Entity ID Self<br />
| SignedVarLong<br />
| The unique ID of the entity. The unique ID is a value that remains consistent across different sessions of the same world, but most unofficial servers simply fill the runtime ID of the entity out for this field.<br />
|-<br />
| Runtime Entity ID<br />
| VarLong<br />
| The runtime ID of the entity. The runtime ID is unique for each world session, and entities are generally identified in packets using this runtime ID.<br />
|-<br />
| Item<br />
| Item<br />
| The item that is spawned. It must have a valid ID for it to show up client-side. If it is not a valid item, the client will crash when coming near.<br />
|-<br />
| Position<br />
| Vector3<br />
| The position to spawn the entity on. If the entity is at a distance that the player cannot see, the entity will still show up if the player moves closer.<br />
|-<br />
| Velocity<br />
| Vector3<br />
| The initial velocity the entity spawns with. This velocity will initiate client side movement of the entity.<br />
|-<br />
| Metadata<br />
| MetadataDictionary<br />
| A map of entity metadata, which includes flags and data properties that alter in particular the way the entity looks. Flags include ones such as 'on fire' and 'sprinting'. The metadata values are indexed by their property key.<br />
|-<br />
| Is From Fishing<br />
| Boolean<br />
| Specifies if the item was obtained by fishing it up using a fishing rod. It is not clear why the client needs to know this.<br />
|}<br />
<br />
<br />
<br />
==== Take Item Entity ====<br />
<br />
Sent by the server when a player picks up an item entity. It makes the item entity disappear to viewers and shows the pick-up animation.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x11<br />
|rowspan="2"| Client<br />
| Item Runtime Entity Id<br />
| VarLong<br />
| the entity runtime ID of the item that is being taken by another entity. It will disappear to viewers after showing the pick-up animation.<br />
|-<br />
| Runtime Entity Id<br />
| VarLong<br />
| The runtime ID of the entity that took the item, which is usually a player, but could be another entity like a zombie too.<br />
|}<br />
<br />
<br />
<br />
==== Move Entity Absolute ====<br />
<br />
Sent by the server to move an entity to an absolute position. It is typically used for movements where high accuracy isn't needed, such as for long range teleporting.<br />
This packet is also sent by the client when riding a horse/donkey.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x12<br />
|rowspan="4"| Server & Client<br />
| Runtime entity id<br />
| VarLong<br />
| The runtime ID of the entity. The runtime ID is unique for each world session, and entities are generally identified in packets using this runtime ID.<br />
|-<br />
| Flags<br />
| byte<br />
| A combination of flags that specify details of the movement. See below for more info.<br />
|-<br />
| Position<br />
| PlayerLocation<br />
| <br />
|}<br />
<br />
{| class="wikitable"<br />
|-<br />
! Field<br />
! Bit<br />
! Notes<br />
|-<br />
| On ground<br />
| 0x01<br />
| If the entity is touching the ground<br />
|-<br />
| Telported<br />
| 0x02<br />
|<br />
|}<br />
<br />
<br />
<br />
==== Move Player ====<br />
<br />
Sent by players to send their movement to the server, and by the server to update the movement of player entities to other players.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="8"| 0x13<br />
|rowspan="8"| Server & Client<br />
| Runtime entity id<br />
| VarLong<br />
| The runtime ID of the player. The runtime ID is unique for each world session, and entities are generally identified in packets using this runtime ID.<br />
|-<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| Rotation<br />
| Vector3<br />
| Pitch, yaw and head yaw<br />
|-<br />
| Mode<br />
| Byte<br />
| <br />
|-<br />
| On ground<br />
| Boolean<br />
| Specifies if the player is considered on the ground. Note that proxies or hacked clients could fake this to always be true, so it should not be taken for granted.<br />
|-<br />
| Riding runtime entity id<br />
| Float<br />
| The runtime ID of the entity that the player might currently be riding. If not riding, this should be left 0.<br />
|-<br />
| Teleportation cause<br />
| VarLong<br />
| See below. Only needs to exist if Mode cause is 2 (teleport).<br />
|-<br />
| Entity type<br />
| Byte<br />
| Only needs to exist if Mode cause is 2 (teleport).<br />
|}<br />
<br />
Modes:<br />
{| class="wikitable"<br />
! ID<br />
! Mode<br />
|-<br />
| 0<br />
| Normal<br />
|-<br />
| 1<br />
| Reset<br />
|-<br />
| 2<br />
| Teleport<br />
|-<br />
| 3<br />
| Rotation<br />
|}<br />
<br />
Teleportation causes:<br />
{| class="wikitable"<br />
! ID<br />
! Cause<br />
|-<br />
| 0<br />
| Unknown<br />
|-<br />
| 1<br />
| Projectile<br />
|-<br />
| 2<br />
| Chorus fruit<br />
|-<br />
| 3<br />
| Command<br />
|-<br />
| 4<br />
| Behavior<br />
|}<br />
<br />
<br />
<br />
==== Rider Jump ====<br />
<br />
Sent by the client when it jumps while riding an entity that has the WASDControlled entity flag set, for example when riding a horse. According to MiNET this can also be sent from the server to the client, but details on this are unknown.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x14<br />
|rowspan="1"| Server & Client<br />
| Jump Strength<br />
| SignedVarInt<br />
| The strength of the jump, depending on how long the rider has held the jump button.<br />
|}<br />
<br />
<br />
<br />
==== Update Block ====<br />
<br />
Sent by the server to update a block client-side, without resending the entire chunk that the block is located in. It is particularly useful for small modifications like block breaking/placing.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x15<br />
|rowspan="4"| Client<br />
| Coordinates<br />
| BlockCoordinates<br />
| The block position at which a block is updated.<br />
|-<br />
| Block Runtime ID<br />
| VarInt<br />
| The runtime ID of the block that is placed at Position after sending the packet to the client. The runtime ID must point to a block sent in the list in the Start Game packet.<br />
|-<br />
| Flags<br />
| VarInt<br />
| See below. Flags is a combination of flags that specify the way the block is updated client-side. It is a combination of the flags below, but typically sending only the Network flag is sufficient.<br />
|-<br />
| Layer<br />
| VarInt<br />
| The world layer on which the block is updated. In Bedrock, multiple blocks can be put in the same location using layers. The second layer is usually used for liquids, so blocks can be inside a liquid. For most blocks, this is the first layer, as that layer is the default layer to place blocks on, but for blocks inside of each other, this differs. As this system is designed with liquids, there may be bugs when using this to place blocks inside each other. For example, placing an interactable block such as an item frame on the second layer can cause a game crash if the player tries to interact with it.<br />
|}<br />
<br />
{| class="wikitable"<br />
|-<br />
! Field<br />
! Bit<br />
! Notes<br />
|-<br />
| Neighbors<br />
| 0x01<br />
| <br />
|-<br />
| Network<br />
| 0x02<br />
|<br />
|-<br />
| No Graphic<br />
| 0x04<br />
|<br />
|-<br />
| Priority<br />
| 0x08<br />
|<br />
|}<br />
<br />
<br />
<br />
==== Add Painting ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x16<br />
|rowspan="5"| Client<br />
| Unique Entity Id<br />
| SignedVarLong<br />
| The unique ID of the entity. The unique ID is a value that remains consistent across different sessions of the same world, but most unofficial servers simply fill the runtime ID of the entity out for this field.<br />
|-<br />
| Runtime Entity Id<br />
| VarLong<br />
| The runtime ID of the entity. The runtime ID is unique for each world session, and entities are generally identified in packets using this runtime ID.<br />
|-<br />
| Position<br />
| Vector3<br />
| The position to spawn the entity at. If the entity is at a distance that the player cannot see, the entity will still show up if the player moves closer.<br />
|-<br />
| Direction<br />
| SignedVarInt<br />
| The facing direction of the painting. See below.<br />
|-<br />
| Name<br />
| String<br />
| This is the name of the painting (e.g. BurningSkull). See below.<br />
|}<br />
<br />
Valid facing values:<br />
* 0 - Facing towards positive Z (south)<br />
* 1 - Facing towards negative X (west)<br />
* 2 - Facing towards negative Z (north)<br />
* 3 - Facing towards positive X (east)<br />
<br />
Valid name values:<br />
* Kebab<br />
* Aztec<br />
* Alban<br />
* Aztec<br />
* Aztec2<br />
* Bomb<br />
* Plant<br />
* Wasteland<br />
* Wanderer<br />
* Graham<br />
* Pool<br />
* Courbet<br />
* Sunset<br />
* Sea<br />
* Creebet<br />
* Match<br />
* Bust<br />
* Stage<br />
* Void<br />
* SkullAndRoses<br />
* Wither<br />
* Fighters<br />
* Skeleton<br />
* DonkeyKong<br />
* PoInter<br />
* Pigscene<br />
* BurningSkull<br />
<br />
<br />
<br />
==== Tick Sync ====<br />
<br />
Sent by the client and the server to maintain a synchronized, server-authoritative tick between the client and the server. The client sends this packet first, and the server should reply with another one of these packets, including the response time.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x17<br />
|rowspan="2"| Server & Client<br />
| Request Timestamp<br />
| Long<br />
| <br />
|-<br />
| Response Timestamp<br />
| Long<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Level Sound Event (1) ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="6"| 0x18<br />
|rowspan="6"| Server & Client<br />
| Sound ID<br />
| Byte<br />
| <br />
|-<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| Block Id<br />
| SignedVarInt<br />
| <br />
|-<br />
| Entity Type<br />
| SignedVarInt<br />
| <br />
|-<br />
| Is baby mob<br />
| Boolean<br />
| <br />
|-<br />
| Is global<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Level Event ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x19<br />
|rowspan="3"| Client<br />
| Event ID<br />
| SignedVarInt<br />
| <br />
|-<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| Data<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Block Event ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x1A<br />
|rowspan="3"| Client<br />
| Block Position<br />
| BlockCoordinates<br />
| <br />
|-<br />
| Event Type<br />
| SignedVarInt<br />
| <br />
|-<br />
| Event Data<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Entity Event ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x1B<br />
|rowspan="3"| Server & Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Event ID<br />
| Byte<br />
| See [[/Entity Events|Bedrock Protocol/Entity Events]]<br />
|-<br />
| Data<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Mob Effect ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="6"| 0x1C<br />
|rowspan="6"| Client<br />
| Runtime entity id<br />
| VarLong<br />
| <br />
|-<br />
| Event<br />
| Byte<br />
| <br />
|-<br />
| Effect id<br />
| SignedVarInt<br />
| See the Bedrock Edition section of {{Minecraft Wiki|Status effect#Effect_IDs}}<br />
|-<br />
| Amplifier<br />
| SignedVarInt<br />
| <br />
|-<br />
| Particles<br />
| Boolean<br />
| If true, effect particles are not shown<br />
|-<br />
| Duration<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
Events:<br />
* 0: None<br />
* 1: Add<br />
* 2: Modify<br />
* 3: Remove<br />
<br />
==== Update Attributes ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x1D<br />
|rowspan="2"| Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Attributes<br />
| PlayerAttributes<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Inventory Transaction ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x1E<br />
|rowspan="1"| Server & Client<br />
| Transaction<br />
| Transaction<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Mob Equipment ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x1F<br />
|rowspan="5"| Server & Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Item<br />
| Item<br />
| <br />
|-<br />
| Slot<br />
| Byte<br />
| <br />
|-<br />
| Selected Slot<br />
| Byte<br />
| <br />
|-<br />
| Windows Id<br />
| Byte<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Mob Armor Equipment ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x20<br />
|rowspan="5"| Server & Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Helmet<br />
| Item<br />
| <br />
|-<br />
| Chestplate<br />
| Item<br />
| <br />
|-<br />
| Leggings<br />
| Item<br />
| <br />
|-<br />
| Boots<br />
| Item<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Interact ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x21<br />
|rowspan="2"| Server & Client<br />
| Action ID<br />
| Byte<br />
| <br />
|-<br />
| Target Runtime Entity ID<br />
| VarLong<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Block Pick Request ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x22<br />
|rowspan="5"| Server<br />
| Block Position X<br />
| SignedVarInt<br />
| <br />
|-<br />
| Block Position Y<br />
| SignedVarInt<br />
| <br />
|-<br />
| Block Position Z<br />
| SignedVarInt<br />
| <br />
|-<br />
| Add User Data<br />
| bool<br />
| Whether there should be NBT data in the picked block (activated by pressing Ctrl on default keyboard controls)<br />
|-<br />
| Hotbar Slot<br />
| Byte<br />
| <br />
|}<br />
<br />
The Bedrock client sends the position of the block. It expects the server to decide the block to pick and add it to the inventory or switch the hotbar slot if needed.<br />
<br />
<br />
<br />
==== Entity Pick Request ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x23<br />
|rowspan="2"| Server<br />
| Runtime Entity ID<br />
| Unsigned Long<br />
| <br />
|-<br />
| Hotbar Slot<br />
| Byte<br />
| The held hotbar slot of the player at the time of trying to pick the entity. If empty, the resulting spawn egg will be put into this slot.<br />
|}<br />
<br />
<br />
<br />
==== Player Action ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x24<br />
|rowspan="4"| Server<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Action ID<br />
| SignedVarInt<br />
| <br />
|-<br />
| Coordinates<br />
| BlockCoordinates<br />
| <br />
|-<br />
| Face<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Entity Fall ====<br />
<br />
Sent by the client when it falls from a distance onto a block that would damage the player.<br />
<br />
This packet should not be used at all by the server, as it can easily be spoofed using a proxy or custom client. Servers should implement fall damage using their own calculations.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x25<br />
|rowspan="3"| Server<br />
| Runtime Entity Id<br />
| VarLong<br />
| <br />
|-<br />
| Fall Distance<br />
| Float<br />
| The distance that the entity fell until it hit the ground. The damage would otherwise be calculated using this field.<br />
|-<br />
| In Void<br />
| Boolean<br />
| Specifies if the fall was in the void. The player can't fall below roughly Y=-40.<br />
|}<br />
<br />
<br />
<br />
==== Hurt Armor ====<br />
<br />
Sent by the server to damage the player's armor after being hit. <br />
<br />
The packet should never be used by servers as it hands the responsibility over to the player completely, while the server can easily and reliably update the armor damage of players itself.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x26<br />
|rowspan="1"| Client<br />
| Health<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Entity Data ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x27<br />
|rowspan="2"| Server & Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Metadata<br />
| MetadataDictionary<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Entity Motion ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x28<br />
|rowspan="4"| Server & Client<br />
| Runtime Entity Id<br />
| VarLong<br />
| <br />
|-<br />
| Motion X<br />
| Vector3<br />
| <br />
|-<br />
| Motion Y<br />
| Float<br />
| <br />
|-<br />
| Motion Z<br />
| Float<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Entity Link ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x29<br />
|rowspan="4"| Client<br />
| Ridden ID<br />
| SignedVarLong<br />
| <br />
|-<br />
| Rider ID<br />
| SignedVarLong<br />
| <br />
|-<br />
| Link Type<br />
| Byte<br />
| <br />
|-<br />
| Unknown<br />
| Byte<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Health ====<br />
<br />
Sent by the server to set the health of the player it is sent to.<br />
<br />
This packet should no longer be used. Instead, the health attribute should be used so that the health and maximum health may be changed directly.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x2A<br />
|rowspan="1"| Client<br />
| Health<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Spawn Position ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x2B<br />
|rowspan="5"| Client<br />
| Spawn Type<br />
| SignedVarInt<br />
| <br />
|-<br />
| Block Position<br />
| BlockCoordinates<br />
| the new position of the spawn that was set. If spawnType is WORLD_SPAWN, compasses will point to this position. As of 1.16, blockPosition is always the position of the player.<br />
|-<br />
| Dimension ID<br />
| Int<br />
|<br />
|-<br />
| Spawn Position<br />
| Vector3<br />
| Default -2147483648, -2147483648, -2147483648<br />
|-<br />
| Forced<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Animate ====<br />
<br />
Sent by the server to send a player animation from one player to all viewers of that player. <br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x2C<br />
|rowspan="2"| Server & Client<br />
| Action ID<br />
| SignedVarInt<br />
| <br />
|-<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Respawn ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x2D<br />
|rowspan="3"| Server & Client<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| State<br />
| Byte<br />
| <br />
|-<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|}<br />
<br />
States:<br />
{| class="wikitable"<br />
! ID<br />
! Name<br />
|-<br />
| 0<br />
| Server Searching<br />
|-<br />
| 1<br />
| Server Ready<br />
|-<br />
| 2<br />
| Client Ready<br />
|}<br />
<br />
==== Container Open ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x2E<br />
|rowspan="4"| Client<br />
| Window Id<br />
| Byte<br />
| <br />
|-<br />
| Type<br />
| Byte<br />
| <br />
|-<br />
| Block Position<br />
| BlockCoordinates<br />
| <br />
|-<br />
| Unique Entity Id<br />
| SignedVarLong<br />
| <br />
|}<br />
<br />
Bedrock needs either a valid block position, with an actual block at that position, or an entity ID for this to work. The entity must have CONTAINER_BASE_SIZE metadata, or the block must be a container. The entity ID is used for minecart chests etc. but any entity will work. If the entity has NAMETAG metadata this will be used as the container name.<br />
<br />
<br />
<br />
==== Container Close ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x2F<br />
|rowspan="1"| Server & Client<br />
| Window Id<br />
| Byte<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Player Hotbar ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x30<br />
|rowspan="3"| Server & Client<br />
| Selected Hotbar Slot<br />
| VarInt<br />
| <br />
|-<br />
| Container Id<br />
| Byte<br />
| <br />
|-<br />
| Select Hotbar Slot<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Inventory Content ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x31<br />
|rowspan="2"| Server & Client<br />
| Inventory Id<br />
| VarInt<br />
| <br />
|-<br />
| Input<br />
| ItemStacks<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Inventory Slot ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x32<br />
|rowspan="3"| Server & Client<br />
| Inventory Id<br />
| VarInt<br />
| <br />
|-<br />
| Slot<br />
| VarInt<br />
| <br />
|-<br />
| Item<br />
| Item<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Container Set Data ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x33<br />
|rowspan="3"| Client<br />
| Window Id<br />
| Byte<br />
| <br />
|-<br />
| Property<br />
| SignedVarInt<br />
| <br />
|-<br />
| Value<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Crafting Data ====<br />
<br />
Since 1.16.200, each recipe must have a unique network ID. Otherwise, the client will crash.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x34<br />
|rowspan="4"| Client<br />
| Recipes<br />
| Recipes<br />
| <br />
|-<br />
| Potion type recipes<br />
| PotionTypeRecipe[]<br />
| <br />
|-<br />
| potion container recipes<br />
| PotionContainerChangeRecipe[]<br />
| <br />
|-<br />
| Is Clean<br />
| Boolean<br />
| <br />
|}<br />
<br />
==== Crafting Event ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x35<br />
|rowspan="5"| Server & Client<br />
| Window ID<br />
| Byte<br />
| <br />
|-<br />
| Recipe Type<br />
| SignedVarInt<br />
| <br />
|-<br />
| Recipe ID<br />
| UUID<br />
| <br />
|-<br />
| Input<br />
| ItemStacks<br />
| <br />
|-<br />
| Result<br />
| ItemStacks<br />
| <br />
|}<br />
<br />
<br />
<br />
==== GUI Data Pick Item ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x36<br />
|rowspan="4"| Client<br />
|-<br />
| Item name<br />
| String<br />
| The name of the item that shows up in the top part of the popup that shows up when selecting an item. It is shown as if an item was selected by the player itself.<br />
|-<br />
| Item effects<br />
| String<br />
| The line under the Item name, where the effects of the item are usually situated.<br />
|-<br />
| Hotbar Slot<br />
| int<br />
| The hot bar slot to be selected/picked. This does not currently work, so it does not matter what number this is.<br />
|}<br />
<br />
Sent by the server to make the client 'select' a hotbar slot. It currently appears to be broken however, and does not actually set the selected slot to the hotbar slot set in the packet.<br />
<br />
<br />
<br />
==== Adventure Settings ====<br />
<br />
Sent by the server to update gameplay related features, in particular permissions to access these features for the client.<br />
<br />
It includes allowing the player to fly, build, and mine and attack entities. Most of these flags should be checked server-side instead of using this packet only.<br />
<br />
The client my also send this packet to the server when it updates one of these settings through the in-game settings interface. The server should verify if the player actually has permission to update these settings.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="6"| 0x37<br />
|rowspan="6"| Server & Client<br />
| Flags<br />
| VarInt<br />
| <br />
|-<br />
| Command permission<br />
| VarInt<br />
| <br />
|-<br />
| Action permissions<br />
| VarInt<br />
| <br />
|-<br />
| Permission level<br />
| VarInt<br />
| <br />
|-<br />
| Custom stored permissions<br />
| VarInt<br />
| <br />
|-<br />
| User Id<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Block Entity Data ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x38<br />
|rowspan="2"| Server & Client<br />
| Coordinates<br />
| BlockCoordinates<br />
| <br />
|-<br />
| NamedTag<br />
| NBT<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Player Input ====<br />
<br />
Sent by the client when the player is moving but the server does not allow it to update its movement using the [[#Move Player|Move Player]] packet. It includes situations where the player is riding an entity like a boat. If this is the case, the packet is sent roughly every tick.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x39<br />
|rowspan="4"| Server<br />
| Movement<br />
| Vec2<br />
| The movement vector of the input. It should be thought of in Pocket Edition controls, where specific arrows (or a combination of two, resulting in a diagonal arrow) decide the direction of movement. The movement vector typically has a length of 1: Either it has movement on one axis, or it has a combination, resulting in sqrt(2)/2 for both axes.<br />
|-<br />
| Jumping<br />
| Boolean<br />
| Indicates if the player was pressing the jump button or not. It does not define if the player was actually in the air or not.<br />
|-<br />
| Sneaking<br />
| Boolean<br />
| Indicates the player was sneaking during the input. Note that this may also be checked by keeping the sneaking state updated using the [[#Player Action|Player Action]] packet<br />
|}<br />
<br />
<br />
<br />
==== Level Chunk ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x3A<br />
|rowspan="5"| Client<br />
| Chunk X<br />
| SignedVarInt<br />
| <br />
|-<br />
| Chunk Z<br />
| SignedVarInt<br />
| <br />
|-<br />
| Sub Chunk Count<br />
| VarInt<br />
| <br />
|-<br />
| Cache Enabled<br />
| Boolean<br />
| <br />
|-<br />
| Chunk Data<br />
| ByteArray<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Commands Enabled ====<br />
<br />
This packet is sent to the client to enable or disable the ability to execute commands. If disabled, the client itself will stop the execution of commands.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x3B<br />
|rowspan="1"| Client<br />
| Commands enabled<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Difficulty ====<br />
<br />
Sent by the server to update the client-side difficulty pf the client. The actual effect of this packet on the client isn't very significant, as the difficulty is handled server-side.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x3C<br />
|rowspan="1"| Client<br />
| Difficulty<br />
| VarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Change Dimension ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x3D<br />
|rowspan="5"| Client<br />
| Dimension<br />
| SignedVarInt<br />
| <br />
|-<br />
| Position X<br />
| Vector3<br />
| <br />
|-<br />
| Position Y<br />
| Boolean<br />
| <br />
|-<br />
| Position Z<br />
| Float<br />
| <br />
|-<br />
| Respawn<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Player Game Type ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x3E<br />
|rowspan="1"| Server & Client<br />
| Game mode<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Player List ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x3F<br />
|rowspan="1"| Client<br />
| Records<br />
| PlayerRecords<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Simple Event ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x40<br />
|rowspan="1"| Client<br />
| Event Type<br />
| Unsigned Short<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Event ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x41<br />
|rowspan="3"| Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Event data<br />
| SignedVarInt<br />
| <br />
|-<br />
| Event type<br />
| Byte<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Spawn Experience Orb ====<br />
<br />
Sent by the server to spawn an experience orb entity client-side. <br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x42<br />
|rowspan="2"| Client<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| Count<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Map Item Data ====<br />
<br />
Sent by the server to update the data of a map shown to the client. It is sent with a combination of flags that specify what data is updated.<br />
<br />
The packet may be used to update specific parts of the map only. It is not required to send the entire map each time when updating one part.<br />
<br />
TODO<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x43<br />
|rowspan="1"| Client<br />
| Map ID<br />
| VarLong<br />
| The unique identifier that represents the map that is updated over network. It remains consitent across sesions.<br />
|}<br />
<br />
<br />
<br />
==== Map Info Request ====<br />
<br />
Sent by the client to request the server to deliver information of a certain map in the inventory of the player. The serve should respond with a [[#Map Item Data|Map Item Data]] packet.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x44<br />
|rowspan="1"| Server & Client<br />
| Unique Map Id<br />
| SignedVarLong<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Request Chunk Radius ====<br />
<br />
Sent by the client to update the server on the chunk view radius that it has set in the settings. The server may respond with a [[#Chunk Radius Updated|Chunk Radius Updated]] packet with either the radius requested, or a different chunk radius if the server chooses so.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x45<br />
|rowspan="1"| Server & Client<br />
| Chunk radius<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Chunk Radius Updated ====<br />
<br />
Sent by the server in response to a [[#Request Chunk Radius|Request Chunk Radius]] packet. It defines the radius that the server allows the client to have. This may be lower than the chunk radius requested by the client.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x46<br />
|rowspan="1"| Client<br />
| Chunk radius<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== ItemFrame Drop Item ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x47<br />
|rowspan="1"| Server & Client<br />
| Block Position<br />
| BlockCoordinates<br />
|<br />
|}<br />
<br />
==== Game Rules Changed ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x48<br />
|rowspan="1"| Client<br />
| Rules<br />
| GameRules<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Camera ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x49<br />
|rowspan="2"| Client<br />
| Camera Unique Entity Id<br />
| SignedVarLong<br />
| <br />
|-<br />
| Player Unique Entity Id<br />
| SignedVarLong<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Boss Event ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x4A<br />
|rowspan="2"| Client<br />
| Boss Entity ID<br />
| SignedVarLong<br />
| <br />
|-<br />
| Event Type<br />
| VarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Show Credits ====<br />
<br />
Sent by the server to show the Minecraft credits screen to the client. It is typically when the player beats the ender dragon and leaves the End.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x4B<br />
|rowspan="2"| Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Status<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
Statuses:<br />
{| class="wikitable"<br />
! ID<br />
! Name<br />
|-<br />
| 0<br />
| Start Credits<br />
|-<br />
| 1<br />
| End Credits<br />
|}<br />
<br />
<br />
==== Available Commands ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x4C<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== Command Request ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x4D<br />
|rowspan="5"| Server<br />
| Command<br />
| String<br />
| <br />
|-<br />
| Command type<br />
| VarInt<br />
| <br />
|-<br />
| Unknown UUID<br />
| UUID<br />
| <br />
|-<br />
| Request ID<br />
| String<br />
| <br />
|-<br />
| Unknown<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== CommandBlock Update ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x4E<br />
|rowspan="1"| Server<br />
| Is Block<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Command Output ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x4F<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== Update Trade ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="10"| 0x50<br />
|rowspan="10"| Client<br />
| Window ID<br />
| Byte<br />
| <br />
|-<br />
| Window Type<br />
| Byte<br />
| <br />
|-<br />
| Unknown0<br />
| VarInt<br />
| <br />
|-<br />
| Unknown1<br />
| VarInt<br />
| <br />
|-<br />
| Unknown2<br />
| VarInt<br />
| <br />
|-<br />
| Is Willing<br />
| Boolean<br />
| <br />
|-<br />
| Trader Entity ID<br />
| SignedVarLong<br />
| <br />
|-<br />
| Player Entity ID<br />
| SignedVarLong<br />
| <br />
|-<br />
| Display Name<br />
| String<br />
| <br />
|-<br />
| NamedTag<br />
| NBT<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Update Equip ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x51<br />
|rowspan="5"| Client<br />
| Window ID<br />
| Byte<br />
| <br />
|-<br />
| Window Type<br />
| Byte<br />
| <br />
|-<br />
| Unknown<br />
| Byte<br />
| <br />
|-<br />
| Entity ID<br />
| SignedVarLong<br />
| <br />
|-<br />
| NamedTag<br />
| NBT<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Resource Pack Data Info ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="7"| 0x52<br />
|rowspan="7"| Client<br />
| Package ID<br />
| String<br />
| <br />
|-<br />
| Max Chunk Size<br />
| Unsigned Int<br />
| <br />
|-<br />
| Chunk Count<br />
| Unsigned Int<br />
| <br />
|-<br />
| Compressed Package Size<br />
| Unsigned Long<br />
| <br />
|-<br />
| Hash<br />
| ByteArray<br />
| <br />
|-<br />
| Is Premium<br />
| Boolean<br />
| <br />
|-<br />
| Pack Type<br />
| Byte<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Resource Pack Chunk Data ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x53<br />
|rowspan="4"| Client<br />
| Package ID<br />
| String<br />
| <br />
|-<br />
| Chunk Index<br />
| Unsigned Int<br />
| <br />
|-<br />
| Progress<br />
| Unsigned Long<br />
| <br />
|-<br />
| Payload<br />
| ByteArray<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Resource Pack Chunk Request ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x54<br />
|rowspan="2"| Server<br />
| Package ID<br />
| String<br />
| <br />
|-<br />
| Chunk Index<br />
| Unsigned Int<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Transfer ====<br />
<br />
Sent by the server to transfer a player from the current server to another. Doing so will fully disconnect the client, bring it back to the main menu and make it connect to the next server.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x55<br />
|rowspan="2"| Client<br />
| Address<br />
| String<br />
| <br />
|-<br />
| Port<br />
| Unsigned Short<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Play Sound ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x56<br />
|rowspan="4"| Client<br />
| Sound name<br />
| String<br />
| <br />
|-<br />
| Sound position<br />
| Position<br />
| <br />
|-<br />
| Volume<br />
| Float<br />
| <br />
|-<br />
| Pitch<br />
| Float<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Stop Sound ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x57<br />
|rowspan="2"| Client<br />
| Sound Name<br />
| String<br />
| <br />
|-<br />
| Stopping All Sound<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Title ====<br />
<br />
Sent by the server to make a title, subtitle or action bar shown to a player. It has several fields that allow setting the duration of the titles.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x58<br />
|rowspan="5"| Client<br />
| Type<br />
| SignedVarInt<br />
| <br />
|-<br />
| Text<br />
| String<br />
| <br />
|-<br />
| Fade In Time<br />
| SignedVarInt<br />
| <br />
|-<br />
| Stay Time<br />
| SignedVarInt<br />
| <br />
|-<br />
| Fade Out Time<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Add Behavior Tree ====<br />
<br />
Sent by the server. Its usage remains unknown, as behavior packs are typically all sent at the start of the game.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x59<br />
|rowspan="1"| Client<br />
| Behavior Tree JSON<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Structure Block Update ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x5A<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== Show Store Offer ====<br />
<br />
Sent by the server to show a Marketplace store offer to a player. It opens a window client-side that displays the item.<br />
<br />
The packet only works on partnered servers: Servers that are not partnered will not have a store button show up on the in-game pause menu and will, as a result, not be able to open store offers on the client side. Sending the packet does therefore not work when using a proxy that is connected to with the domain of one of the partnered servers.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x5B<br />
|rowspan="2"| Client<br />
| Offer Id<br />
| String<br />
| <br />
|-<br />
| Shown To All<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Purchase Receipt ====<br />
<br />
Sent by the client to notify the server it purchased an item from the marketplace store that was offered by the server.<br />
<br />
The packet is only used for partnered servers.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x5C<br />
|rowspan="1"| Server<br />
<br />
|}<br />
<br />
<br />
<br />
==== Player Skin ====<br />
<br />
Sent by the client when it updates its own skin using the in-game skin picker. It is relayed by the server, or sent if the server changes the skin of a player on its own accord. <br />
<br />
Note that the packet can only be sent for players that are in the player list at the time of sending.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x5D<br />
|rowspan="4"| Server & Client<br />
| UUID<br />
| UUID<br />
| <br />
|-<br />
| Skin<br />
| Skin<br />
| <br />
|-<br />
| Skin Name<br />
| String<br />
| <br />
|-<br />
| Old Skin Name<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Sub Client Login ====<br />
<br />
Sent when an additional player attempts to join from a split screen session. The contents of the chain data and skin data fields use the same format as the [[#Login|Login]] packet, and can be decoded the same way.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x5E<br />
|rowspan="2"| Server<br />
| Chain data<br />
| JSON array of JWT Data<br />
| Contains the display name, UUID and XUID<br />
|-<br />
| Skin data<br />
| JWT Data<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Automation Client Connect ====<br />
<br />
Sent by the server to make the client connect to a websocket server. This websocket server has the ability to execute commands on the behalf of the client and it canlisten for certain events fired by the client.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x5F<br />
|rowspan="1"| Client<br />
| Address<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Last Hurt By ====<br />
<br />
Sent by the server to let the client know what entity type it was last hurt by. At this moment, the packet is useless and should not be used. <br />
There is no behaviour that depends on if this packet is sent or not.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x60<br />
|rowspan="1"| Client<br />
| Entity Type Id<br />
| VarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Book Edit ====<br />
<br />
Sent by the client when it edits a book. It is sent each time a modification was made and the player stops its typing 'session', rather than simply after closing the book.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x61<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== NPC Request ====<br />
<br />
Sent by the client when it interacts with an NPC.<br />
<br />
The packet is specifically for Education Edition, where NPCs are available to use. It has no use in the base game.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x62<br />
|rowspan="4"| Server & Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Unknown0<br />
| Byte<br />
| <br />
|-<br />
| Unknown1<br />
| String<br />
| <br />
|-<br />
| Unknown2<br />
| Byte<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Photo Transfer ====<br />
<br />
Sent by the server to transfer a photo (image) file to the client. It is typically used to transfer photos so that the client can display it in a portfolio in Education Edition.<br />
<br />
While previously usable in the base game, the displaying of photos in books was disabled and the packet has little use anymore.<br />
<br />
The packet is specifically for Education Edition. It has no use in the base game.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x63<br />
|rowspan="3"| Server<br />
| File name<br />
| String<br />
| <br />
|-<br />
| Image data<br />
| String<br />
| <br />
|-<br />
| Unknown2<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Model Form Request ====<br />
<br />
Sent by the server to make the client open a form.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x64<br />
|rowspan="2"| Client<br />
| Form Id<br />
| VarInt<br />
| <br />
|-<br />
| Form Data<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Model Form Response ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x65<br />
|rowspan="2"| Server<br />
| Form Id<br />
| VarInt<br />
| <br />
|-<br />
| Form Data<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Server Settings Request ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x66<br />
|rowspan="1"| Server<br />
<br />
|}<br />
<br />
<br />
<br />
==== Server Settings Response ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x67<br />
|rowspan="2"| Client<br />
| Form Id<br />
| VarLong<br />
| <br />
|-<br />
| Form Data<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Show Profile ====<br />
<br />
Sent by the server to show the Xbox Live profile of one player to another.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x68<br />
|rowspan="1"| Client<br />
| Xuid<br />
| String<br />
| If the XUID is invalid, the client ignores the packet<br />
|}<br />
<br />
<br />
<br />
==== Set Default Game Type ====<br />
<br />
Sent by the client when it toggles the default game type in the settings UI, and is sent by the server when it actually changes the default game type, resulting in the toggle being changed in the settings UI.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x69<br />
|rowspan="1"| Client<br />
| Game mode<br />
| VarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Remove Objective ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x6A<br />
|rowspan="1"| Client<br />
| Objective Id<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Display Objective ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x6B<br />
|rowspan="5"| Client<br />
| Display Slot<br />
| String<br />
| <br />
|-<br />
| Objective Id<br />
| String<br />
| <br />
|-<br />
| Display Name<br />
| String<br />
| <br />
|-<br />
| Criteria<br />
| String<br />
| <br />
|-<br />
| Sort Order<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Score ====<br />
<br />
Sent by the server to send the contents of a scoreboard to the player. It may be used to either add, remove or edit entries on the scoreboard.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x6C<br />
|rowspan="2"| Client<br />
| Action<br />
| byte<br />
| 0 (Add), 1 (Remove)<br />
|-<br />
| Entries<br />
| ScoreEntries<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Lab Table ====<br />
<br />
Sent by the client to let the server know it started a chemical reaction in Education Edition, and is sent by the server to allow other clients to show the effects.<br />
<br />
This packet is only functional if Education features are enabled.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x6D<br />
|rowspan="5"| Server & Client<br />
| Unknown Byte 0<br />
| Byte<br />
| <br />
|-<br />
| Block Entity Position X<br />
| VarInt<br />
| <br />
|-<br />
| Block Entity Position Y<br />
| VarInt<br />
| <br />
|-<br />
| Block Entity Position Z<br />
| VarInt<br />
| <br />
|-<br />
| Reaction Type<br />
| Byte<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Update Block Synced ====<br />
<br />
Sent by the server to synchronize the falling of a falling block entity with the transitioning back and forth from and to a solid block. It is used to prevent the entity from flickering, and is used in places such as the pushing of blocks with pistons.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="6"| 0x6E<br />
|rowspan="6"| Client<br />
| Coordinates<br />
| BlockCoordinates<br />
| <br />
|-<br />
| Block Runtime ID<br />
| VarInt<br />
| <br />
|-<br />
| Block Priority<br />
| VarInt<br />
| <br />
|-<br />
| Data Layer ID<br />
| VarInt<br />
| <br />
|-<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Block Synced Type<br />
| VarLong<br />
| 0 - None, 1 - Create, 2 - Destroy<br />
|}<br />
<br />
==== Move Entity Delta ====<br />
<br />
Sent by the server to move an entity by a given delta. The packet is specifically optimized to save as much space as possible, by only writing non-zero fields.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x6F<br />
|rowspan="2"| Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Flags<br />
| Unsigned Short<br />
| <br />
|}<br />
<br />
Flags<br />
{| class="wikitable"<br />
! Field<br />
! Bit<br />
|-<br />
| HAS_X<br />
| 0x01<br />
|-<br />
| HAS_Y<br />
| 0x02<br />
|-<br />
| HAS_Z<br />
| 0x4<br />
|-<br />
| HAS_PITCH<br />
| 0x8<br />
|-<br />
| HAS_YAW<br />
| 0x10<br />
|-<br />
| HAS_ROLL<br />
| 0x20<br />
|}<br />
<br />
<br />
<br />
==== Set Scoreboard Identity ====<br />
<br />
Sent by the server to change the identity type of one of the entries on a scoreboard. This is used to change, for example, an entry pointing to a player, to a fake player when it leaves the server, and to change it back to a real player when it joins again.<br />
<br />
In non-vanilla situations, this packet is quite useless.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x70<br />
|rowspan="2"| Client<br />
| Action<br />
| byte<br />
| 0 (Add), 1 (Remove)<br />
|-<br />
| Entries<br />
| ScoreboardIdentityEntries<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Local Player As Initialized ====<br />
<br />
Sent by the client in response to a [[#Play Status||Play Status]] with the status Player Spawn (3). The packet marks the moment at which the client is fully initialized and can receive any packet without discarding it.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x71<br />
|rowspan="1"| Server<br />
| Runtime Entity Id<br />
| VarLong<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Update Soft Enum ====<br />
<br />
Sent by the server to update a soft enum, also known as a dynamic enum, previous sent in the [[#Available Commands|Available Commands]] packet. It is sent whenever the enum should get new options or when some of its options should be removed.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x72<br />
|rowspan="3"| Client<br />
|-<br />
| Enum Data<br />
| EnumData<br />
| TODO<br />
|-<br />
| Action<br />
| byte<br />
| 0 (Add), 1 (Remove), 2 (Update)<br />
|}<br />
<br />
<br />
<br />
==== Network Stack Latency ====<br />
<br />
Sent by the server (and the client, on development builds) to measure the latency over the entire Minecraft stack, rather than the RakNet latency. <br />
<br />
It has over usages too, such as the ability to be used as some kind of acknowledgement packet, to know when the client has received a certain other packet.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x73<br />
|rowspan="2"| Server & Client<br />
| Timestamp<br />
| Unsigned Long<br />
| <br />
|-<br />
| Send Back<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Script Custom Event ====<br />
<br />
Sent by both the client and server. It is a way to let scripts communicate with the server, so that the client can let the server know it triggered an event, or the other way around.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x75<br />
|rowspan="2"| Server & Client<br />
| Event Name<br />
| String<br />
| <br />
|-<br />
| Data<br />
| String<br />
| Typically a JSON encoded string that the script is able to encode and decode too<br />
|}<br />
<br />
<br />
<br />
==== Spawn Particle Effect ====<br />
<br />
Sent by the server to spawn a particle effect client-side. Unlike other packets that result in the appearing of particles, this packet can show particles that are not hardcoded in the client. They can be added and changed through behavior packs to implement custom particles.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x76<br />
|rowspan="4"| Client<br />
| Dimension Id<br />
| Byte<br />
| <br />
|-<br />
| Unique Entity Id<br />
| SignedVarLong<br />
| <br />
|-<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| Identifier<br />
| String<br />
| The name of the particle<br />
|}<br />
<br />
<br />
<br />
==== Available Entity Identifiers ====<br />
<br />
Sent by the server at the start of the game to let the client know all entities that are on the server.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x77<br />
|rowspan="1"| Client<br />
| NamedTag<br />
| NBT<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Level Sound Event (2) ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="6"| 0x78<br />
|rowspan="6"| Server & Client<br />
| Sound ID<br />
| Byte<br />
| <br />
|-<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| Block Id<br />
| SignedVarInt<br />
| <br />
|-<br />
| Entity Type<br />
| String<br />
| <br />
|-<br />
| Is baby mob<br />
| Boolean<br />
| <br />
|-<br />
| Is global<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Network Chunk Publisher Update ====<br />
<br />
Sent by the server to change the point around which chunks are and remain loaded. <br />
<br />
This is useful for minigame servers, where only one area is ever loaded, in which case the [[#Network Chunk Publisher|Network Chunk Publisher]] packet can be sent in the middle of it, so that no chunks ever need to be additionally sent during the course of the game.<br />
<br />
In reality, the packet is not extraordinarily useful, and most servers just sent it constantly at the position of the player. <br />
<br />
If the packet is not sent at all, no chunk will be shown to the player, regardless of where they are sent.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x79<br />
|rowspan="2"| Client<br />
| Coordinates<br />
| BlockCoordinates<br />
| <br />
|-<br />
| Radius<br />
| VarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Biome Definition List ====<br />
<br />
Sent by the server to let the client know all biomes that are available and implemented on the server side.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x7A<br />
|rowspan="1"| Client<br />
| NamedTag<br />
| NBT<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Level Sound Event (3) ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="6"| 0x7B<br />
|rowspan="6"| Server & Client<br />
| Sound ID<br />
| VarInt<br />
| <br />
|-<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| Block Id<br />
| SignedVarInt<br />
| <br />
|-<br />
| Entity Type<br />
| String<br />
| <br />
|-<br />
| Is baby mob<br />
| Boolean<br />
| <br />
|-<br />
| Is global<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Level Event Generic ====<br />
<br />
Sent by the server to send a 'generic' level event to the client. This packet sends an NBT serialized object and may for that reason be used for any event holding additional data.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x7C<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== Lectern Update ====<br />
<br />
Sent by the client to update the server on which page was opened in a book on a lectern, or if the book should be removed from it.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x7D<br />
|rowspan="4"| Client<br />
| Page<br />
| Byte<br />
| <br />
|-<br />
| Total Pages<br />
| Byte<br />
| <br />
|-<br />
| Block Position<br />
| Position<br />
| <br />
|-<br />
| Dropping Book<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Video Stream Connect ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x7E<br />
|rowspan="5"| Client<br />
| Server URI<br />
| String<br />
| <br />
|-<br />
| Frame Send Frequency<br />
| Float<br />
| <br />
|-<br />
| Action<br />
| Byte<br />
| <br />
|-<br />
| Resolution X<br />
| Int<br />
| <br />
|-<br />
| Resolution Y<br />
| Int<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Client Cache Status ====<br />
<br />
Sent by the client at the start of the game. It is sent to let the server know if it supports the client-side blob cache. Clients such as Nintendo Switch do not support the cache, and attempting to use it anyway will fail.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x81<br />
|rowspan="1"| Server & Client<br />
| Supported<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== On Screen Texture Animation ====<br />
<br />
Sent by the server to show a certain animation on the screen of the player.<br />
The packet is used, for example, for when a raid is triggered and a raid a defeated.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x82<br />
|rowspan="1"| Client<br />
| Animation Type<br />
| Int<br />
|}<br />
<br />
<br />
<br />
==== Map Create Locked Copy ====<br />
<br />
Sent by the server to create a locked copy of a map into another map. It is used in the cartography table to create a map that is locked and cannot be modified.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x83<br />
|rowspan="2"| Client<br />
| Original Map Id<br />
| VarLong<br />
| <br />
|-<br />
| New Map Id<br />
| VarLong<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Structure Template Data Export Request ====<br />
<br />
Sent by the client to request data of a structure.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x84<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== Structure Template Data Export Response ====<br />
<br />
Sent by the server to send data of a structure to the client in response to a [[#Structure Template Data Export Request|Structure Template Data Export Request]] packet.<br />
<br />
TODO<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x85<br />
|rowspan="1"| Client<br />
| Structure Name<br />
| String<br />
| This is the name used to export the structure to a file<br />
|}<br />
<br />
<br />
<br />
==== Update Block Properties ====<br />
<br />
Sent by the server to update the available block properties.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x86<br />
|rowspan="2"| Client<br />
| NamedTag<br />
| NBT<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Client Cache Blob Status ====<br />
<br />
Sent by the client to let the server know what blobs it already has, in an ACK type system.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x87<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== Client Cache Miss Response ====<br />
<br />
Sent by the server in response to a [[#Client Cache Blob Status|Client Cache Blob Status]] and contains the blob data of all blobs that the client acknowledged not to have yet.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x88<br />
|rowspan="1"| Client<br />
| Blobs<br />
| <br />
|<br />
|}<br />
<br />
<br />
<br />
==== Network Settings ====<br />
<br />
Sent by the server to update a variety of network settings. These settings modify the way packets are sent over the network stack.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x8F<br />
|rowspan="2"| Client<br />
| Compression threshold<br />
| Short<br />
| The maximum size of a packet this is compressed when sent. If the size of the packet is under this value, it is not compressed. When set to 0, all packets will be uncompressed.<br />
|}<br />
<br />
<br />
<br />
==== Player Auth Input ====<br />
<br />
Sent by the client to allow for server authoratative movement. It is used to synchronize the player input with the position server-side.<br />
<br />
The client sends this packet when the 'Server Authoritive Movement' field in the [[#Start Game|Start Game]] packet is set to true, instead of the [[#Move Player|Move Player]] packet. The client will send this packet once every tick.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x90<br />
|rowspan="2"| Client<br />
|}<br />
<br />
<br />
<br />
==== Creative Content ====<br />
<br />
Sent by the server to set the creative inventory's content for a player.<br />
<br />
Introduced in 1.16, this packet replaces the previous method of sending an [[#Inventory Content|Inventory Content]] packet with the creative inventory window ID. <b>This packet must be sent from a server after the StartGamePacket since 1.16.100. Otherwise, the client will crash!</b><br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x91<br />
|rowspan="2"| Client<br />
|}<br />
<br />
==== Player Enchant Options ====<br />
<br />
Sent by the server to update the enchantment options displayed when the user opens the enchantment table and puts an item in.<br />
<br />
This packet was added in 1.16 and allows the server to decide on the enchantment that can be selected by a player. The player should be sent once for every slot update of the enchantment table. The vanilla server sends an empty packet when the player first opens the enchantment table (air is is present in the enchantment table slot) and sends a packet with actual enchantments in it when items are put in that can have enchantments.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x92<br />
|rowspan="2"| Client<br />
|}<br />
<br />
<br />
<br />
==== Item Stack Request ====<br />
<br />
Sent by the client to change item stacks in an inventory. <br />
<br />
Added in 1.16, is essentially a replacement of the [[#Inventory Transaction|Inventory Transaction]] packet for inventory specific actions, such as moving items around or crafting.<br />
<br />
The [[#Inventory Transaction|Inventory Transaction]] packet is still used for actions such as placing blocks and interacting with entities.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x93<br />
|rowspan="2"| Client<br />
|}<br />
<br />
<br />
<br />
==== Item Stack Response ====<br />
<br />
Sent by the server in response to an [[#Item Stack Request|Item Stack Request]] packet from the client.<br />
<br />
This packet is used to either approve or reject ItemStackRequests from the client. If a request is approved, the client will simply continue as normal. If rejected, the client will undo the actions so that the inventory should be in sync with the server again.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x94<br />
|rowspan="2"| Client<br />
|}<br />
<br />
<br />
<br />
==== Player Armor Damage ====<br />
<br />
Sent by the server to damage the armor of a player. It is a very efficient packet, but generally it's much easier to just send a slot update for the damaged armor.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x95<br />
|rowspan="2"| Client<br />
|}<br />
<br />
<br />
<br />
==== Code Builder ====<br />
<br />
Sent by the server to open the URL to a Code Builder (websocket) server.<br />
<br />
This packet is only used by Education Edition and have no affect on the base game.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x96<br />
|rowspan="2"| Client<br />
|}<br />
<br />
<br />
<br />
==== Update Player Game Type ====<br />
<br />
Sent by the server to change the game mode of a player. It is functionally identical to the [[#Set Player Game Type|Set Player Game Type]] packet.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x97<br />
|rowspan="2"| Client<br />
|}<br />
<br />
<br />
<br />
==== Emote List ====<br />
<br />
Sent by the client every time it joins the server and when it equips new emotes. It may be used by the server to find out which emotes the client has available. If the player has no emotes equipped, this packet is not sent.<br />
<br />
Under certain circumstances, this packet is also sent from the server to the client, but more testing is needed for this.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x98<br />
|rowspan="2"| Client<br />
|}<br />
<br />
<br />
<br />
==== Position Tracking DB Server Broadcast ====<br />
<br />
Sent by the server in response to the [[#Position Tracking DB Client Request|Position Tracking DB Client Request]] packet. Thus packet is, as of 1.16, currently only for lodestones. The server maintains a database with tracking IDS and their position and dimension. The client will request these tracking IDs, (NBT tag set on the lodestone compass with the tracking ID?) and the server will respond with the status of those tracking IDs.<br />
<br />
What is actually done with the data sent depends on what the client chooses to do with it. For the lodestone compass, it is used to make the compass point towards lodestones and to make it spin if the lodestone at a position is no longer there.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x99<br />
|rowspan="2"| Client<br />
|}<br />
<br />
<br />
<br />
==== Position Tracking DB Client Request ====<br />
<br />
Sent by the client to request the position and dimension of a 'tracking ID'. These IDs are tracked in a database by the server. In 1.16, this is used for lodestones.<br />
<br />
The client will sent this request to find the position a lodestone compass needs to point to. If found, it will point to the lodestone. If not, it will start spinning around.<br />
<br />
A [[#Position Tracking DB Server Broadcast|Position Tracking DB Server Broadcast]] packet should be sent in response to this packet.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x9a<br />
|rowspan="2"| Client<br />
|}<br />
<br />
<br />
<br />
==== Debug Info ====<br />
<br />
Sent by the server. It does not seem to do anything when sent to the normal client in 1.16;<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x9b<br />
|rowspan="2"| Client<br />
|}<br />
<br />
<br />
<br />
==== Packet Violation Warning ====<br />
<br />
Sent by the client when it receives an invalid packet from the server. It holds some information on the error that occured.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x9c<br />
|rowspan="1"| Client<br />
|}<br />
<br />
==== Item Component ====<br />
<br />
Always sent by a vanilla Bedrock server after the StartGamePacket. Sent not empty for items with data driven information.<br />
<br />
In order for the information in this packet to be used, the experiment data titled <code>data_driven_items</code> must be set to <code>true</code> in the ResourcePackStackPacket (as of 1.16.100), and the item entry in StartGamePacket must have its component toggle set to <code>true</code>.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0xA2<br />
|rowspan="2"| Client<br />
| Items<br />
| ComponentItemData[]<br />
| A list of all item components.<br />
|}<br />
<br />
ComponentItemData takes in a String identifier and an NBT CompoundTag containing item data. Valid, minimal NBT data looks like the following (Any comments are preceded with <code>//</code>):<br />
<br />
<syntaxhighlight lang="json"><br />
{<br />
"components": {<br />
"item_properties": {<br />
"allow_off_hand": 1b,<br />
"hand_equipped": 1b,<br />
"max_stack_size": 1i<br />
},<br />
"minecraft:icon": {<br />
"texture": "example_item" // Required even with a resource pack, or else the client complains about icon texture<br />
}<br />
},<br />
"id": 1020i, // The runtime ID of the item<br />
"name": "wikivg:example_item"<br />
}<br />
</syntaxhighlight><br />
<br />
A list of all known valid item properties (and descriptions, if added):<br />
<br />
{| class="wikitable"<br />
! Property name<br />
! Property type<br />
! Property description<br />
|-<br />
| allow_off_hand<br />
| boolean<br />
| If the item is permitted in the offhand inventory slot.<br />
|-<br />
| animates_in_toolbar<br />
| boolean<br />
|<br />
|-<br />
| can_destroy_in_creative<br />
| boolean<br />
|<br />
|-<br />
| creative_category<br />
| integer<br />
| 1 is the construction, 2 is the nature, 3 is the equipment, 4 is the items, the default value is 1<br />
|-<br />
| creative_group <br />
| string<br />
| TODO<br />
|-<br />
| damage<br />
| integer<br />
| shows the number of damge attacks<br />
|-<br />
| enchantable_slot<br />
| string<br />
|<br />
|-<br />
| enchantable_value<br />
| integer<br />
|<br />
|-<br />
| explodable<br />
| boolean<br />
|<br />
|-<br />
| foil<br />
| boolean<br />
|<br />
|-<br />
| frame_count<br />
| integer<br />
|<br />
|-<br />
| hand_equipped<br />
| boolean<br />
| If the item should be visually held like a tool.<br />
|-<br />
| ignores_permissions<br />
| boolean<br />
|<br />
|-<br />
| liquid_clipped<br />
| boolean<br />
| gives the possibility to click on a liquid<br />
|-<br />
| max_stack_size<br />
| integer<br />
| The maximum amount of this item that can be in an inventory slot.<br />
|-<br />
| mining_speed<br />
| float<br />
|<br />
|-<br />
| mirrored_art<br />
| boolean<br />
|<br />
|-<br />
| requires_interact<br />
| boolean<br />
|<br />
|-<br />
| should_despawn<br />
| boolean<br />
|<br />
|-<br />
| stacked_by_data<br />
| boolean<br />
|<br />
|-<br />
| use_animation<br />
| integer<br />
|<br />
|-<br />
| use_duration<br />
| integer<br />
|<br />
|-<br />
|}<br />
<br />
Other item components can be found here: https://bedrock.dev/docs/stable/Item#Item%20Components (Add these in the same format as <code>minecraft:icon</code> shown above). Also see: https://wiki.bedrock.dev/concepts/items<br />
<br />
[[Category:Bedrock Minecraft]]</div>Orladoghttps://wiki.vg/index.php?title=Bedrock_Protocol&diff=16432Bedrock Protocol2021-02-23T20:44:57Z<p>Orladog: Undo revision 16431 by Orladog (talk)</p>
<hr />
<div>:: '''Remember that this page is a WIP'''. Come back later to see a more complete page.<br />
----<br />
<br />
{{Box<br />
|BORDER = #9999FF<br />
|BACKGROUND = #99CCFF<br />
|WIDTH = 100%<br />
|ICON = <br />
|HEADING = Heads up!<br />
|CONTENT = This article is about the protocol for the release of Minecraft '''Bedrock Edition''' ([[Bedrock Protocol version numbers|1.16.20, protocol 408]]). See [[Protocol]] for the Java Edition Protocol.<br />
}}<br />
<br />
This is the [https://minecraft.gamepedia.com/Bedrock_Edition Bedrock Edition] Protocol Documentation.<br />
The Bedrock Edition Protocol uses [[wikipedia:User Datagram Protocol|UDP]] instead of [[wikipedia:Transmission Control Protocol|TCP]] that is used for the Java Edition.<br />
Bedrock Edition uses [[Raknet Protocol|RakNet]] as its protocol library.<br />
<br />
The default Bedrock Edition port is 19132.<br />
<br />
Information for this page was obtained from the [https://github.com/NukkitX/Protocol NukkitX Protocol library], [https://github.com/NiclasOlofsson/MiNET MiNET] and [https://github.com/Sandertv/gophertunnel gophertunnel].<br />
<br />
== Data types ==<br />
<br />
{| class="wikitable"<br />
|-<br />
!<br />
! Size (Bytes)<br />
! Range<br />
! Notes<br />
|-<br />
! Byte<br />
| 1<br />
| 0 to 255<br />
|<br />
|-<br />
! Boolean<br />
| 1<br />
| 0 or 1<br />
| A Byte treated as boolean, 0 is false but anything greater then that is true<br />
|-<br />
! Short<br />
| 2<br />
| -32768 to 32767<br />
|<br />
|-<br />
! Unsigned Short<br />
| 2<br />
| 0 to 65535<br />
|<br />
|-<br />
! Int<br />
| 4<br />
| -2147483648 to 2147483647<br />
| Signed little-endian 32-bit Integer<br />
|-<br />
! Int (big endian)<br />
| 4<br />
| -2147483648 to 2147483647<br />
| Signed big-endian 32-bit Integer<br />
|-<br />
! Unsigned Int<br />
| 4<br />
| 0 to 4294967295<br />
| Unsigned 32-bit Integer<br />
|-<br />
! Long<br />
| 8<br />
| -2^63 to 2^63-1<br />
| Signed 64-bit Integer<br />
|-<br />
! Unsigned Long<br />
| 8<br />
| 2^64-1<br />
| Unsigned 64-bit Integer<br />
|-<br />
! Float<br />
| 4<br />
| <br />
| A [[wikipedia:Single-precision_Floating-poInt_format|single-precision 32-bit IEEE 754 Floating poInt number]]<br />
|-<br />
! Double<br />
| 8<br />
| <br />
| A [[wikipedia:Double-precision_Floating-poInt_format|Double-precision 64-bit IEEE 754 Floating poInt number]]<br />
|-<br />
! VarInt<br />
| &ge; 1<br>&le; 5<br />
| 0 to 4294967295<br />
| <br />
|-<br />
! SignedVarInt<br />
| &ge; 1<br>&le; 5<br />
| -2147483648 and 2147483647<br />
| <br />
|-<br />
! VarLong<br />
| &ge; 1<br>&le; 10<br />
| <br />
|<br />
|-<br />
! SignedVarLong<br />
| &ge; 1<br>&le; 10<br />
| -2^63 and 2^63-1<br />
|<br />
|-<br />
! String<br />
| <br />
| <br />
| [[wikipedia:UTF-8|UTF-8]] String prefixed with its size in Bytes as a VarInt. This has the same data structure as a ByteArray but it contains textual data.<br />
|-<br />
! Vector3<br />
| 12<br />
| <br />
| Three Float values (X, Y and Z respectively)<br />
|-<br />
! Vector2<br />
| 8<br />
| <br />
| Two Float values (X and Y respectively)<br />
|-<br />
! NBT<br />
| <br />
| <br />
| <br />
|-<br />
! ByteArray<br />
| <br />
| <br />
| An arbitrary array of Bytes prefixed with its size in Bytes as a VarInt.<br />
|-<br />
! BlockCoordinates<br />
| &ge; 3<br>&le; 15<br />
| <br />
| A SignedVarInt, a normal VarInt and another SignedVarInt (X, Y and Z respectively)<br />
|-<br />
! PlayerLocation<br />
| 15<br />
| <br />
| Three Float values (X, Y and Z respectively), followed by three Bytes (pitch, head yaw and yaw respectively). To convert the Bytes to normal pitch and yaw values divide them by 0.71<br />
|-<br />
! UUID<br />
| 16<br />
| A [[wikipedia:Universally_unique_identifier|UUID]]<br />
| Encoded as two unsigned 64-bit Integers: the most significant 64 bits and the least significant 64 bits<br />
|}<br />
<br />
== Packet Format ==<br />
<br />
Bedrock Edition uses [[Raknet Protocol|RakNet]] as its protocol library, so the packets are sent that way. The UDP protocol specifies packet length, so unlike Java Edition and TCP which deal with raw data streams packets are not length-prefixed. Packets seem to always use compression and can also use encryption. Multiple packets can also be batched into a single packet.<br />
Packet compression uses [https://zlib.net/ zlib], and it seems that packet data can be fed directly into zlib (after being decrypted if encryption is enabled).<br />
<br><br><br />
Refer to [https://github.com/Sandertv/gophertunnel/blob/19c96251a36a39d9ffb938053410852e811755e3/minecraft/protocol/packet/decoder.go#L58 gophertunnel] for more information.<br />
<br />
== Login process ==<br />
The login process is as follows:<br />
# C→S: [[#Login|Login]]<br />
# S→C: [[#Server To Client Handshake|Server To Client Handshake]]<br />
# C→S: [[#Client To Server Handshake|Client To Server Handshake]]<br />
# S→C: [[#Play Status|Play Status]] (Login success)<br />
<br />
To spawn, the following packets should be sent, in order, after the ones above:<br />
# S→C: [[#Resource Packs Info|Resource Packs Info]]<br />
# C→S: [[#Resource Pack Client Response|Resource Pack Client Response]]<br />
# S→C: [[#Resource Pack Stack|Resource Pack Stack]]<br />
# C→S: [[#Resource Pack Client Response|Resource Pack Client Response]]<br />
# S→C: [[#Start Game|Start Game]]<br />
# S→C: [[#Creative Content|Creative Content]]<br />
# S→C: [[#Biome Definition List|Biome Definition List]]<br />
# S→C: Chunks<br />
# S→C: [[#Play Status|Play Status]] (Player spawn)<br />
<br />
If there are no resource packs being sent, a [[#Resource Pack Stack|Resource Pack Stack]] can be sent directly after [[#Resource Packs Info|Resource Packs Info]] to avoid the client responses.<br />
<br />
== Packets ==<br />
Please note that some packet ids are missing, so they don't line up.<br />
The following packet ids are missing:<br />
0x10, 0x74, 0x7F, 0x80<br />
(16, 116, 127, 128)<br />
<br />
<br />
==== Login ====<br />
<br />
Sent when the client initially tries to join the server. It is the first packet sent and contains information specific to the player.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x01<br />
|rowspan="3"| Server<br />
| Protocol version<br />
| Int (big-endian)<br />
| <br />
|-<br />
| Chain data<br />
| JSON array of JWT Data<br />
| Contains the display name, UUID and XUID<br />
|-<br />
| Skin data<br />
| JWT Data<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Play Status ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x02<br />
|rowspan="1"| Client<br />
| Status<br />
| Int (big-endian)<br />
| The current status of the connection.<br />
|}<br />
<br />
The values for each status are as follows:<br />
{| class="wikitable"<br />
! Status<br />
! Name<br />
! Notes<br />
|-<br />
| 0<br />
| Login success<br />
| Sent after [[#Login|Login]] has been successfully decoded and the player has logged in<br />
|-<br />
| 1<br />
| Failed client<br />
| Displays "Could not connect: Outdated client!"<br />
|-<br />
| 2<br />
| Failed server<br />
| Displays "Could not connect: Outdated server!"<br />
|-<br />
| 3<br />
| Player spawn<br />
| Sent after world data to spawn the player<br />
|-<br />
| 4<br />
| Failed invalid Tenant<br />
| Displays "Unable to connect to world. Your school does not have access to this server."<br />
|-<br />
| 5<br />
| Failed Vanilla Edu.<br />
| Displays "The server is not running Minecraft: Education Edition. Failed to connect."<br />
|-<br />
| 6<br />
| Failed Edu. Vanilla<br />
| Displays "The server is running an incompatible edition of Minecraft. Failed to connect."<br />
|-<br />
| 7<br />
| Failed server full<br />
| Displays "Wow this server is popular! Check back later to see if space opens up. Server Full"<br />
|}<br />
<br />
==== Server To Client Handshake ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x03<br />
|rowspan="1"| Client<br />
| JWT data<br />
| JWT String<br />
| Contains the salt to complete the Diffie-Hellman key exchange<br />
|}<br />
<br />
<br />
<br />
==== Client To Server Handshake ====<br />
<br />
Sent by the client in response to a [[#Server To Client Handshake|Server To Client Handshake]] packet sent by the server. It is the first encrypted packet in the login handshake and serves as a confirmation that encryption is correctly initialized client side. It has no fields.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x04<br />
|rowspan="1"| Server<br />
<br />
|}<br />
<br />
<br />
<br />
==== Disconnect ====<br />
<br />
Sent by the server to disconnect a client.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x05<br />
|rowspan="2"| Client<br />
| Hide disconnect screen<br />
| Boolean<br />
| Specifies if the disconnection screen should be hidden when the client is disconnected, meaning it will be sent directly to the main menu.<br />
|-<br />
| Kick message<br />
| String<br />
| An optional message to show when disconnected.<br />
|}<br />
<br />
<br />
<br />
==== Resource Packs info ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x06<br />
|rowspan="4"| Client<br />
| Forced to Accept<br />
| Boolean<br />
| If the resource pack requires the client accept it.<br />
|-<br />
| Scripting Enabled<br />
| Boolean<br />
| If scripting is enabled.<br />
|-<br />
| BehahaviorPackInfos<br />
| ResourcePackInfo[]<br />
| A list of behaviour packs that the client needs to download before joining the server. All of these behaviour packs will be applied together.<br />
|-<br />
| ResourcePackInfos<br />
| ResourcePackInfo[]<br />
| A list of resource packs that the client needs to download before joining the server. The order of these resource packs is not relevant in this packet. It is however important in the Resource Pack Stack packet.<br />
|}<br />
<br />
<br />
<br />
==== Resource Pack Stack ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! colspan="2" | Field Name<br />
! colspan="2" | Field Type<br />
! Notes<br />
|-<br />
| rowspan="11" | 0x07<br />
| rowspan="11" | Client<br />
| colspan="2" | Forced to Accept<br />
| colspan="2" | Boolean<br />
| If the resource pack must be accepted for the player to join the server.<br />
|-<br />
! Resource Pack Entry<br />
! Field Name<br />
! colspan="2" | <br />
! <br />
|-<br />
| rowspan="3" | Array<br />
| Pack ID<br />
| colspan="2" | String<br />
| The ID of the resource pack.<br />
|-<br />
| Pack Version<br />
| colspan="2" | String<br />
| The version of the resource pack.<br />
|-<br />
| Subpack Name<br />
| colspan="2" | String<br />
| The subpack name of the resource pack.<br />
|-<br />
! Behavior Pack Entry<br />
! Field Name<br />
! colspan="2" | <br />
! <br />
|-<br />
| rowspan="3" | Array<br />
| Pack ID<br />
| colspan="2" | String<br />
| The ID of the resource pack.<br />
|-<br />
| Pack Version<br />
| colspan="2" | String<br />
| The version of the resource pack.<br />
|-<br />
| Subpack Name<br />
| colspan="2" | String<br />
| The subpack name of the resource pack.<br />
|-<br />
| colspan="2" | Experimental<br />
| colspan="2" | Boolean<br />
| If the sent resource and behavior packs are experimental.<br />
|-<br />
| colspan="2" | Game Version<br />
| colspan="2" | String<br />
| The version of the game the sent resource and behavior packs were made for.<br />
|}<br />
<br />
<br />
<br />
==== Resource Pack Response ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x08<br />
|rowspan="2"| Server<br />
| Status<br />
| Byte<br />
| See below<br />
|-<br />
| Pack IDs<br />
| ResourcePackIds<br />
| All of the pack IDs.<br />
|}<br />
<br />
The values for each status are as follows:<br />
{| class="wikitable"<br />
! Status<br />
! Name<br />
! Notes<br />
|-<br />
| 0<br />
| None<br />
| <br />
|-<br />
| 1<br />
| Refused<br />
| <br />
|-<br />
| 2<br />
| Send packs<br />
|<br />
|-<br />
| 3<br />
| Have all packs<br />
| <br />
|-<br />
| 4<br />
| Completed<br />
|<br />
|}<br />
<br />
<br />
<br />
==== Text ====<br />
<br />
Sent by the client to the server to send chat messages, and by the server to the client to forward or send messages, which may be chat, popups, tips etc.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! colspan="2" | Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| rowspan="9" | 0x09<br />
| rowspan="9" | Server &amp; Client<br />
| colspan="2" | Type<br />
| Byte<br />
| The type of chat message sent.<br />
|-<br />
| colspan="2" | Needs Translation<br />
| Boolean<br />
| If the message sent is a translation key and needs to be translated.<br />
|-<br />
! Chat Type ID<br />
! Text<br />
! <br />
! Derived from above; values sent here change depending on that.<br />
|-<br />
| rowspan="1" | 0, 1, or 2<br />
| rowspan="1" | Source Name<br />
| rowspan="1" | String<br />
| rowspan="1" | The name of the source.<br />
|-<br />
|-<br />
|-<br />
| rowspan="1" | 3, 4, or 5<br />
| rowspan="1" | Message<br />
| rowspan="1" | String<br />
| rowspan="1" | The message sent with the packet.<br />
|-<br />
|-<br />
|-<br />
|-<br />
| rowspan="2" | 6, 7, or 8<br />
| Message<br />
| String<br />
| The message sent with the packet<br />
|-<br />
| Parameters<br />
| Array<br />
| The parameters sent with the packet. This usually includes translation parameters or similar types depending on what kind of chat type was sent.<br />
|-<br />
| colspan="2" | XUID<br />
| Optional String<br />
| The XUID of the player who sent this message.<br />
|-<br />
| colspan="2" | Platform Chat ID<br />
| Optional String<br />
| The platform chat ID of the sent message.<br />
|}<br />
<br />
{| class="wikitable"<br />
! ID<br />
! Chat Type<br />
|-<br />
| 0<br />
| Raw<br />
|-<br />
| 1<br />
| Chat<br />
|-<br />
| 2<br />
| Translation<br />
|-<br />
| 3<br />
| Popup<br />
|-<br />
| 4<br />
| Jukebox Popup<br />
|-<br />
| 5<br />
| Tip<br />
|-<br />
| 6<br />
| System<br />
|-<br />
| 7<br />
| Whisper<br />
|-<br />
| 8<br />
| Announcement<br />
|-<br />
| 9<br />
| Object<br />
|-<br />
| 10<br />
| Object Whisper<br />
|}<br />
<br />
For additional information and examples of all the chat types above, see here: https://imgur.com/a/KhcFscg<br />
<br />
<br />
<br />
==== Set Time ====<br />
<br />
Sent by the server to update the current time client-side. The client actually advances time client-side by itself, so this packet does not need to be sent each tick. It is merely a means of synchronizing time between server and client.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x0A<br />
|rowspan="1"| Client<br />
| Time<br />
| SignedVarInt<br />
| Time is the current time. The time is not limited to 24000 (time of day), but continues progressing after that.<br />
|}<br />
<br />
<br />
<br />
==== Start Game ====<br />
<br />
Sent by the server to send information about the world the player will be spawned in.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="54"| 0x0B<br />
|rowspan="54"| Client<br />
| Entity ID Self<br />
| SignedVarLong<br />
| The unique ID of the player. The unique ID is a value that remains consistent across different sessions of the same world, but most unofficial servers simply fill the runtime ID of the entity out for this field.<br />
|-<br />
| Runtime Entity ID<br />
| VarLong<br />
| The runtime ID of the player. The runtime ID is unique for each world session, and entities are generally identified in packets using this runtime ID.<br />
|-<br />
| Player Gamemode<br />
| SignedVarInt<br />
|-<br />
| Spawn<br />
| Vector3<br />
| The spawn position of the player in the world. In servers this is often the same as the world's spawn position found below.<br />
|-<br />
| Rotation<br />
| Vector2<br />
| The pitch and yaw of the player<br />
|-<br />
| Seed<br />
| SignedVarInt<br />
| The seed used to generate the world. Unlike in Java edition, the seed is a 32bit Integer here.<br />
|-<br />
| Spawn Biome Type<br />
| Short<br />
| <br />
|-<br />
| Custom Biome Name<br />
| String<br />
| <br />
|-<br />
| Dimension<br />
| SignedVarInt<br />
| Dimension is the ID of the dimension that the player spawns in. It is a value from 0-2, with 0 being the overworld, 1 being the nether and 2 being the end.<br />
|-<br />
| Generator<br />
| SignedVarInt<br />
| Generator is the generator used for the world. It is a value from 0-4, with 0 being old limited worlds, 1 being infinite worlds, 2 being flat worlds, 3 being nether worlds and 4 being end worlds. A value of 0 will actually make the client stop rendering chunks you send beyond the world limit.<br />
|-<br />
| World Gamemode<br />
| SignedVarInt<br />
| The game mode that a player gets when it first spawns in the world. It is shown in the settings and is used if the Player Gamemode is set to 5.<br />
|-<br />
| Difficulty<br />
| SignedVarInt<br />
| Difficulty is the difficulty of the world. It is a value from 0-3, with 0 being peaceful, 1 being easy, 2 being normal and 3 being hard.<br />
|-<br />
| World Spawn<br />
| BlockCoordinates <br />
| The block on which the world spawn of the world. This coordinate has no effect on the place that the client spawns, but it does have an effect on the direction that a compass poInts.<br />
|-<br />
| Has achievements disabled<br />
| Boolean<br />
| Defines if achievements are disabled in the world. The client crashes if this value is set to true while the player's or the world's game mode is creative, and it's recommended to simply always set this to false as a server.<br />
|-<br />
| Day cycle stop time<br />
| SignedVarInt<br />
| The time at which the day cycle was locked if the day cycle is disabled using the respective game rule. The client will maIntain this time as Boolean as the day cycle is disabled.<br />
|-<br />
| EDU offer<br />
| SignedVarInt<br />
| Some Minecraft: Education Edition field that specifies what 'region' the world was from, with 0 being None, 1 being RestOfWorld, and 2 being China. The actual use of this field is unknown.<br />
|-<br />
| Has Education Edition features enabled<br />
| Boolean<br />
| Specifies if the world has education edition features enabled, such as the blocks or entities specific to education edition.<br />
|-<br />
| Education Production ID<br />
| String<br />
|<br />
|-<br />
| Rain level<br />
| Float<br />
| The level specifying the Intensity of the rain falling. When set to 0, no rain falls at all.<br />
|-<br />
| Lightning level<br />
| Float<br />
| The level specifying the Intensity of the thunder. This may actually be set independently from the rain level, meaning dark clouds can be produced without rain.<br />
|-<br />
| Has Confirmed Platform Locked Content<br />
| Boolean<br />
| <br />
|-<br />
| Is Multiplayer<br />
| Boolean<br />
| Specifies if the world is a multi-player game. This should always be set to true for servers.<br />
|-<br />
| Broadcast To LAN<br />
| Boolean<br />
| Specifies if LAN broadcast was Intended to be enabled for the world.<br />
|-<br />
| Xbox Live Broadcast Mode<br />
| VarInt<br />
| The mode used to broadcast the joined game across XBOX Live.<br />
|-<br />
| Platform Broadcast Mode<br />
| VarInt<br />
| The mode used to broadcast the joined game across the platform.<br />
|-<br />
| Enable commands<br />
| Boolean<br />
| If commands are enabled for the player. It is recommended to always set this to true on the server, as setting it to false means the player cannot, under any circumstance, use a command.<br />
|-<br />
| Are texture packs required<br />
| Boolean<br />
| Specifies if the texture pack the world might hold is required, meaning the client was forced to download it before joining.<br />
|-<br />
| GameRules<br />
| GameRules<br />
| Defines game rules currently active with their respective values. The value of these game rules may be either 'bool', 'Int32' or 'Float32'. Some game rules are server side only, and don't necessarily need to be sent to the client.<br />
|-<br />
| Bonus Chest<br />
| Boolean<br />
| Specifies if the world had the bonus map setting enabled when generating it. It does not have any effect client-side.<br />
|-<br />
| Map Enabled<br />
| Boolean<br />
| Specifies if the world has the start with map setting enabled, meaning each joining player obtains a map. This should always be set to false, because the client obtains a map all on its own accord if this is set to true.<br />
|-<br />
| Permission Level<br />
| SignedVarInt<br />
| The permission level of the player. It is a value from 0-3, with 0 being visitor, 1 being member, 2 being operator and 3 being custom.<br />
|-<br />
| Server Chunk Tick Range<br />
| Int<br />
| The radius around the player in which chunks are ticked. Most servers set this value to a fixed number, as it does not necessarily affect anything client-side.<br />
|-<br />
| Has Locked Behavior Pack<br />
| Boolean<br />
| Specifies if the texture pack of the world is locked, meaning it cannot be disabled from the world. This is typically set for worlds on the marketplace that have a dedicated texture pack.<br />
|-<br />
| Has Locked Resource Pack<br />
| Boolean<br />
| Specifies if the texture pack of the world is locked, meaning it cannot be disabled from the world. This is typically set for worlds on the marketplace that have a dedicated texture pack.<br />
|-<br />
| Is From Locked World Template<br />
| Boolean<br />
| Specifies if the world from the server was from a locked world template. For servers this should always be set to false.<br />
|-<br />
| Use MSA Gamertags Only<br />
| Boolean<br />
| <br />
|-<br />
| Is From World Template<br />
| Boolean<br />
| Specifies if the world from the server was from a locked world template. For servers this should always be set to false.<br />
|-<br />
| Is World Template Option Locked<br />
| Boolean<br />
| Specifies if the world was a template that locks all settings that change properties above in the settings GUI. It is recommended to set this to true for servers that do not allow things such as setting game rules through the GUI.<br />
|-<br />
| Only Spawn V1 Villagers<br />
| Boolean<br />
| A hack that Mojang put in place to preserve backwards compatibility with old villagers. The his never actually read though, so it has no functionality.<br />
|-<br />
| Game Version<br />
| String<br />
| The version of the game from which Vanilla features will be used. The exact function of this field isn't clear.<br />
|-<br />
| Limited World Width<br />
| Int<br />
|<br />
|-<br />
| Limited World Height<br />
| Int<br />
|<br />
|-<br />
| Is Nether Type<br />
| Boolean<br />
|<br />
|-<br />
| Is Force Experimental Gameplay<br />
| Boolean<br />
|<br />
|-<br />
| Level ID<br />
| String<br />
| A base64 encoded world ID that is used to identify the world.<br />
|-<br />
| World name<br />
| String<br />
| The name of the world that the player is joining. Note that this field shows up above the player list for the rest of the game session, and cannot be changed. Setting the server name to this field is recommended.<br />
|-<br />
| Premium World Template Id<br />
| String<br />
| A UUID specific to the premium world template that might have been used to generate the world. Servers should always fill out an empty String for this.<br />
|-<br />
| Is Trial<br />
| Boolean<br />
| Specifies if the world was a trial world, meaning features are limited and there is a time limit on the world.<br />
|-<br />
| Is Server Side movement enabled<br />
| Boolean<br />
| Specifies if the server is authoritative over the movement of the player, meaning it controls the movement of it.<br />
|-<br />
| Current Tick<br />
| Boolean<br />
| The total time in ticks that has elapsed since the start of the world.<br />
|-<br />
| Enchantment Seed<br />
| SignedVarInt<br />
| The seed used to seed the random used to produce enchantments in the enchantment table. Note that the exact correct random implementation must be used to produce the correct results both client- and server-side.<br />
|-<br />
| Block Palette<br />
| BlockPalette<br />
| A list of all blocks registered on the server.<br />
|-<br />
| Itemstates<br />
| Itemstates<br />
| A list of all items with their legacy IDs which are available in the game. Failing to send any of the items that are in the game will crash mobile clients.<br />
|-<br />
| Multiplayer Correlation ID<br />
| String<br />
| A unique ID specifying the multi-player session of the player. A random UUID should be filled out for this field.<br />
|}<br />
<br />
<br />
<br />
==== Add Player ====<br />
<br />
Sent by the server to make a player entity show up client-side. It is one of the few entities that cannot be sent using the [[#Add Entity|Add Entity]] packet.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="19"| 0x0C<br />
|rowspan="19"| Client<br />
| UUID<br />
| UUID<br />
| UUID is the UUID of the player. It is the same UUID that the client sent in the Login packet at the start of the session. A player with this UUID must exist in the player list (built up using the Player List packet) for it to show up in-game.<br />
|-<br />
| Username<br />
| String<br />
| Username is the name of the player. This username is the username that will be set as the initial name tag of the player.<br />
|-<br />
| Entity ID Self<br />
| SignedVarLong<br />
| The unique ID of the player. The unique ID is a value that remains consistent across different sessions of the same world, but most unoffical servers simply fill the runtime ID of the player out for this field.<br />
|-<br />
| Runtime Entity ID<br />
| VarLong<br />
| The runtime ID of the player. The runtime ID is unique for each world session, and entities are generally identified in packets using this runtime ID.<br />
|-<br />
| Platform Chat ID<br />
| String<br />
| An identifier only set for particular platforms when chatting (presumably only for Nintendo Switch). It is otherwise an empty string, and is used to decide which players are able to chat with each other.<br />
|-<br />
| Position<br />
| Vector3<br />
| The position to spawn the player at. If the player is at a distance that the viewer cannot see, the player will still show up if the viewer moves closer.<br />
|-<br />
| Velocity<br />
| Vector3<br />
| The initial velocity the player spawns with. This velocity will initiate client side movement of the player.<br />
|-<br />
| Rotation<br />
| Float<br />
| Pitch, yaw and head yaw<br />
|-<br />
| Held Item<br />
| Item<br />
| The item that the player is holding. The item is shown to the viewer as soon as the player itself shows up. Needless to say that this field is rather pointless, as additional packets still must be sent for armour to show up.<br />
|-<br />
| Metadata<br />
| MetadataDictionary<br />
| A map of entity metadata, which includes flags and data properties that alter in particular the way the player looks. Flags include ones such as 'on fire' and 'sprinting'. The metadata values are indexed by their property key.<br />
|-<br />
| Flags<br />
| VarInt<br />
| Flags is a set of flags that specify certain properties of the player, such as whether or not it can fly and/or move through blocks.<br />
|-<br />
| Command permission<br />
| VarInt<br />
| A set of permissions that specify what commands a player is allowed to execute.<br />
|-<br />
| Action Permissions<br />
| VarInt<br />
| Action Permissions is, much like Flags, a set of flags that specify actions that the player is allowed to undertake, such as whether it is allowed to edit blocks, open doors etc.<br />
|-<br />
| Permission Level<br />
| VarInt<br />
| The permission level of the player as it shows up in the player list built up using the PlayerList packet.<br />
|-<br />
| Custom stored permissions<br />
| VarInt<br />
| <br />
|-<br />
| User Id<br />
| Long<br />
| A unique identifier of the player. It appears it is not required to fill this field out with a correct value. Simply writing 0 seems to work.<br />
|-<br />
| Links<br />
| Links<br />
| A list of entity links that are currently active on the player. These links alter the way the player shows up when first spawned in terms of it shown as riding an entity. Setting these links is important for new viewers to see the player is riding another entity.<br />
|-<br />
| Device ID<br />
| String<br />
| The device ID set in one of the files found in the storage of the device of the player. It may be changed freely, so it should not be relied on for anything.<br />
|-<br />
| Device OS<br />
| Int<br />
| The build platform/device OS of the player that is about to be added, as it sent in the Login packet when joining.<br />
|}<br />
<br />
<br />
<br />
==== Add Entity ====<br />
<br />
Sent by the server to spawn an entity to the player. It is used for every entity except other players, paintings and items, for which the [[#Add Player|Add Player]], [[#Add Painting|Add Painting]] and [[#Add Item Entity|Add Item Entity]] packets are used.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="9"| 0x0D<br />
|rowspan="9"| Client<br />
| Entity ID Self<br />
| SignedVarLong<br />
| The unique ID of the entity. The unique ID is a value that remains consistent across different sessions of the same world, but most unofficial servers simply fill the runtime ID of the entity out for this field.<br />
|-<br />
| Runtime Entity ID<br />
| VarLong<br />
| The runtime ID of the entity. The runtime ID is unique for each world session, and entities are generally identified in packets using this runtime ID.<br />
|-<br />
| Entity Type<br />
| String<br />
| The string entity type of the entity, for example 'minecraft:skeleton'.<br />
|-<br />
| Position<br />
| Vector3<br />
| The position to spawn the entity at. If the entity is at a distance that the player cannot see, the entity will still show up if the player moves closer.<br />
|-<br />
| Velocity<br />
| Vector3<br />
| The initial velocity the entity spawns with. This velocity will initiate client side movement of the entity.<br />
|-<br />
| Rotation<br />
| Vector3<br />
| Pitch, yaw and head yaw<br />
|-<br />
| Attributes<br />
| EntityAttributes<br />
| A slice of attributes that the entity has. It includes attributes such as its health, movement speed, etc.<br />
|-<br />
| Metadata<br />
| MetadataDictionary<br />
| A map of entity metadata, which includes flags and data properties that alter in particular the way the entity looks. Flags include ones such as 'on fire' and 'sprinting'. The metadata values are indexed by their property key.<br />
|-<br />
| Links<br />
| Links<br />
| A list of entity links that are currently active on the entity. These links alter the way the entity shows up when first spawned in terms of it shown as riding an entity. Setting these links is important for new viewers to see the entity is riding another entity.<br />
|}<br />
<br />
<br />
<br />
==== Remove Entity ====<br />
<br />
Sent by the server to remove an entity that currently exists in the world from the client-side. Sending this packet if the client cannot already see this entity will have no effect.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x0E<br />
|rowspan="1"| Client<br />
| Unique Entity Id<br />
| SignedVarLong<br />
| The unique ID of the entity to be removed. The unique ID is a value that remains consistent across different sessions of the same world, but most unofficial servers simply fill the runtime ID of the entity out for this field.<br />
|}<br />
<br />
<br />
<br />
==== Add Item Entity ====<br />
<br />
Sent by the server to make an item entity show up. It is one of the few entities that cannot be sent using the [[#Add Entity|Add Entity]] packet.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="7"| 0x0F<br />
|rowspan="7"| Client<br />
| Entity ID Self<br />
| SignedVarLong<br />
| The unique ID of the entity. The unique ID is a value that remains consistent across different sessions of the same world, but most unofficial servers simply fill the runtime ID of the entity out for this field.<br />
|-<br />
| Runtime Entity ID<br />
| VarLong<br />
| The runtime ID of the entity. The runtime ID is unique for each world session, and entities are generally identified in packets using this runtime ID.<br />
|-<br />
| Item<br />
| Item<br />
| The item that is spawned. It must have a valid ID for it to show up client-side. If it is not a valid item, the client will crash when coming near.<br />
|-<br />
| Position<br />
| Vector3<br />
| The position to spawn the entity on. If the entity is at a distance that the player cannot see, the entity will still show up if the player moves closer.<br />
|-<br />
| Velocity<br />
| Vector3<br />
| The initial velocity the entity spawns with. This velocity will initiate client side movement of the entity.<br />
|-<br />
| Metadata<br />
| MetadataDictionary<br />
| A map of entity metadata, which includes flags and data properties that alter in particular the way the entity looks. Flags include ones such as 'on fire' and 'sprinting'. The metadata values are indexed by their property key.<br />
|-<br />
| Is From Fishing<br />
| Boolean<br />
| Specifies if the item was obtained by fishing it up using a fishing rod. It is not clear why the client needs to know this.<br />
|}<br />
<br />
<br />
<br />
==== Take Item Entity ====<br />
<br />
Sent by the server when a player picks up an item entity. It makes the item entity disappear to viewers and shows the pick-up animation.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x11<br />
|rowspan="2"| Client<br />
| Item Runtime Entity Id<br />
| VarLong<br />
| the entity runtime ID of the item that is being taken by another entity. It will disappear to viewers after showing the pick-up animation.<br />
|-<br />
| Runtime Entity Id<br />
| VarLong<br />
| The runtime ID of the entity that took the item, which is usually a player, but could be another entity like a zombie too.<br />
|}<br />
<br />
<br />
<br />
==== Move Entity Absolute ====<br />
<br />
Sent by the server to move an entity to an absolute position. It is typically used for movements where high accuracy isn't needed, such as for long range teleporting.<br />
This packet is also sent by the client when riding a horse/donkey.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x12<br />
|rowspan="4"| Server & Client<br />
| Runtime entity id<br />
| VarLong<br />
| The runtime ID of the entity. The runtime ID is unique for each world session, and entities are generally identified in packets using this runtime ID.<br />
|-<br />
| Flags<br />
| byte<br />
| A combination of flags that specify details of the movement. See below for more info.<br />
|-<br />
| Position<br />
| PlayerLocation<br />
| <br />
|}<br />
<br />
{| class="wikitable"<br />
|-<br />
! Field<br />
! Bit<br />
! Notes<br />
|-<br />
| On ground<br />
| 0x01<br />
| If the entity is touching the ground<br />
|-<br />
| Telported<br />
| 0x02<br />
|<br />
|}<br />
<br />
<br />
<br />
==== Move Player ====<br />
<br />
Sent by players to send their movement to the server, and by the server to update the movement of player entities to other players.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="8"| 0x13<br />
|rowspan="8"| Server & Client<br />
| Runtime entity id<br />
| VarLong<br />
| The runtime ID of the player. The runtime ID is unique for each world session, and entities are generally identified in packets using this runtime ID.<br />
|-<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| Rotation<br />
| Vector3<br />
| Pitch, yaw and head yaw<br />
|-<br />
| Mode<br />
| Byte<br />
| <br />
|-<br />
| On ground<br />
| Boolean<br />
| Specifies if the player is considered on the ground. Note that proxies or hacked clients could fake this to always be true, so it should not be taken for granted.<br />
|-<br />
| Riding runtime entity id<br />
| Float<br />
| The runtime ID of the entity that the player might currently be riding. If not riding, this should be left 0.<br />
|-<br />
| Teleportation cause<br />
| VarLong<br />
| See below. Only needs to exist if Mode cause is 2 (teleport).<br />
|-<br />
| Entity type<br />
| Byte<br />
| Only needs to exist if Mode cause is 2 (teleport).<br />
|}<br />
<br />
Modes:<br />
{| class="wikitable"<br />
! ID<br />
! Mode<br />
|-<br />
| 0<br />
| Normal<br />
|-<br />
| 1<br />
| Reset<br />
|-<br />
| 2<br />
| Teleport<br />
|-<br />
| 3<br />
| Rotation<br />
|}<br />
<br />
Teleportation causes:<br />
{| class="wikitable"<br />
! ID<br />
! Cause<br />
|-<br />
| 0<br />
| Unknown<br />
|-<br />
| 1<br />
| Projectile<br />
|-<br />
| 2<br />
| Chorus fruit<br />
|-<br />
| 3<br />
| Command<br />
|-<br />
| 4<br />
| Behavior<br />
|}<br />
<br />
<br />
<br />
==== Rider Jump ====<br />
<br />
Sent by the client when it jumps while riding an entity that has the WASDControlled entity flag set, for example when riding a horse. According to MiNET this can also be sent from the server to the client, but details on this are unknown.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x14<br />
|rowspan="1"| Server & Client<br />
| Jump Strength<br />
| SignedVarInt<br />
| The strength of the jump, depending on how long the rider has held the jump button.<br />
|}<br />
<br />
<br />
<br />
==== Update Block ====<br />
<br />
Sent by the server to update a block client-side, without resending the entire chunk that the block is located in. It is particularly useful for small modifications like block breaking/placing.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x15<br />
|rowspan="4"| Client<br />
| Coordinates<br />
| BlockCoordinates<br />
| The block position at which a block is updated.<br />
|-<br />
| Block Runtime ID<br />
| VarInt<br />
| The runtime ID of the block that is placed at Position after sending the packet to the client. The runtime ID must point to a block sent in the list in the Start Game packet.<br />
|-<br />
| Flags<br />
| VarInt<br />
| See below. Flags is a combination of flags that specify the way the block is updated client-side. It is a combination of the flags below, but typically sending only the Network flag is sufficient.<br />
|-<br />
| Layer<br />
| VarInt<br />
| The world layer on which the block is updated. In Bedrock, multiple blocks can be put in the same location using layers. The second layer is usually used for liquids, so blocks can be inside a liquid. For most blocks, this is the first layer, as that layer is the default layer to place blocks on, but for blocks inside of each other, this differs. As this system is designed with liquids, there may be bugs when using this to place blocks inside each other. For example, placing an interactable block such as an item frame on the second layer can cause a game crash if the player tries to interact with it.<br />
|}<br />
<br />
{| class="wikitable"<br />
|-<br />
! Field<br />
! Bit<br />
! Notes<br />
|-<br />
| Neighbors<br />
| 0x01<br />
| <br />
|-<br />
| Network<br />
| 0x02<br />
|<br />
|-<br />
| No Graphic<br />
| 0x04<br />
|<br />
|-<br />
| Priority<br />
| 0x08<br />
|<br />
|}<br />
<br />
<br />
<br />
==== Add Painting ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x16<br />
|rowspan="5"| Client<br />
| Unique Entity Id<br />
| SignedVarLong<br />
| The unique ID of the entity. The unique ID is a value that remains consistent across different sessions of the same world, but most unofficial servers simply fill the runtime ID of the entity out for this field.<br />
|-<br />
| Runtime Entity Id<br />
| VarLong<br />
| The runtime ID of the entity. The runtime ID is unique for each world session, and entities are generally identified in packets using this runtime ID.<br />
|-<br />
| Position<br />
| Vector3<br />
| The position to spawn the entity at. If the entity is at a distance that the player cannot see, the entity will still show up if the player moves closer.<br />
|-<br />
| Direction<br />
| SignedVarInt<br />
| The facing direction of the painting. See below.<br />
|-<br />
| Name<br />
| String<br />
| This is the name of the painting (e.g. BurningSkull). See below.<br />
|}<br />
<br />
Valid facing values:<br />
* 0 - Facing towards positive Z (south)<br />
* 1 - Facing towards negative X (west)<br />
* 2 - Facing towards negative Z (north)<br />
* 3 - Facing towards positive X (east)<br />
<br />
Valid name values:<br />
* Kebab<br />
* Aztec<br />
* Alban<br />
* Aztec<br />
* Aztec2<br />
* Bomb<br />
* Plant<br />
* Wasteland<br />
* Wanderer<br />
* Graham<br />
* Pool<br />
* Courbet<br />
* Sunset<br />
* Sea<br />
* Creebet<br />
* Match<br />
* Bust<br />
* Stage<br />
* Void<br />
* SkullAndRoses<br />
* Wither<br />
* Fighters<br />
* Skeleton<br />
* DonkeyKong<br />
* PoInter<br />
* Pigscene<br />
* BurningSkull<br />
<br />
<br />
<br />
==== Tick Sync ====<br />
<br />
Sent by the client and the server to maintain a synchronized, server-authoritative tick between the client and the server. The client sends this packet first, and the server should reply with another one of these packets, including the response time.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x17<br />
|rowspan="2"| Server & Client<br />
| Request Timestamp<br />
| Long<br />
| <br />
|-<br />
| Response Timestamp<br />
| Long<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Level Sound Event (1) ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="6"| 0x18<br />
|rowspan="6"| Server & Client<br />
| Sound ID<br />
| Byte<br />
| <br />
|-<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| Block Id<br />
| SignedVarInt<br />
| <br />
|-<br />
| Entity Type<br />
| SignedVarInt<br />
| <br />
|-<br />
| Is baby mob<br />
| Boolean<br />
| <br />
|-<br />
| Is global<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Level Event ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x19<br />
|rowspan="3"| Client<br />
| Event ID<br />
| SignedVarInt<br />
| <br />
|-<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| Data<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Block Event ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x1A<br />
|rowspan="3"| Client<br />
| Block Position<br />
| BlockCoordinates<br />
| <br />
|-<br />
| Event Type<br />
| SignedVarInt<br />
| <br />
|-<br />
| Event Data<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Entity Event ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x1B<br />
|rowspan="3"| Server & Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Event ID<br />
| Byte<br />
| See [[/Entity Events|Bedrock Protocol/Entity Events]]<br />
|-<br />
| Data<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Mob Effect ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="6"| 0x1C<br />
|rowspan="6"| Client<br />
| Runtime entity id<br />
| VarLong<br />
| <br />
|-<br />
| Event<br />
| Byte<br />
| <br />
|-<br />
| Effect id<br />
| SignedVarInt<br />
| See the Bedrock Edition section of {{Minecraft Wiki|Status effect#Effect_IDs}}<br />
|-<br />
| Amplifier<br />
| SignedVarInt<br />
| <br />
|-<br />
| Particles<br />
| Boolean<br />
| If true, effect particles are not shown<br />
|-<br />
| Duration<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
Events:<br />
* 0: None<br />
* 1: Add<br />
* 2: Modify<br />
* 3: Remove<br />
<br />
==== Update Attributes ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x1D<br />
|rowspan="2"| Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Attributes<br />
| PlayerAttributes<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Inventory Transaction ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x1E<br />
|rowspan="1"| Server & Client<br />
| Transaction<br />
| Transaction<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Mob Equipment ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x1F<br />
|rowspan="5"| Server & Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Item<br />
| Item<br />
| <br />
|-<br />
| Slot<br />
| Byte<br />
| <br />
|-<br />
| Selected Slot<br />
| Byte<br />
| <br />
|-<br />
| Windows Id<br />
| Byte<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Mob Armor Equipment ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x20<br />
|rowspan="5"| Server & Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Helmet<br />
| Item<br />
| <br />
|-<br />
| Chestplate<br />
| Item<br />
| <br />
|-<br />
| Leggings<br />
| Item<br />
| <br />
|-<br />
| Boots<br />
| Item<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Interact ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x21<br />
|rowspan="2"| Server & Client<br />
| Action ID<br />
| Byte<br />
| <br />
|-<br />
| Target Runtime Entity ID<br />
| VarLong<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Block Pick Request ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x22<br />
|rowspan="5"| Server<br />
| Block Position X<br />
| SignedVarInt<br />
| <br />
|-<br />
| Block Position Y<br />
| SignedVarInt<br />
| <br />
|-<br />
| Block Position Z<br />
| SignedVarInt<br />
| <br />
|-<br />
| Add User Data<br />
| bool<br />
| Whether there should be NBT data in the picked block (activated by pressing Ctrl on default keyboard controls)<br />
|-<br />
| Hotbar Slot<br />
| Byte<br />
| <br />
|}<br />
<br />
The Bedrock client sends the position of the block. It expects the server to decide the block to pick and add it to the inventory or switch the hotbar slot if needed.<br />
<br />
<br />
<br />
==== Entity Pick Request ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x23<br />
|rowspan="2"| Server<br />
| Runtime Entity ID<br />
| Unsigned Long<br />
| <br />
|-<br />
| Hotbar Slot<br />
| Byte<br />
| The held hotbar slot of the player at the time of trying to pick the entity. If empty, the resulting spawn egg will be put into this slot.<br />
|}<br />
<br />
<br />
<br />
==== Player Action ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x24<br />
|rowspan="4"| Server<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Action ID<br />
| SignedVarInt<br />
| <br />
|-<br />
| Coordinates<br />
| BlockCoordinates<br />
| <br />
|-<br />
| Face<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Entity Fall ====<br />
<br />
Sent by the client when it falls from a distance onto a block that would damage the player.<br />
<br />
This packet should not be used at all by the server, as it can easily be spoofed using a proxy or custom client. Servers should implement fall damage using their own calculations.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x25<br />
|rowspan="3"| Server<br />
| Runtime Entity Id<br />
| VarLong<br />
| <br />
|-<br />
| Fall Distance<br />
| Float<br />
| The distance that the entity fell until it hit the ground. The damage would otherwise be calculated using this field.<br />
|-<br />
| In Void<br />
| Boolean<br />
| Specifies if the fall was in the void. The player can't fall below roughly Y=-40.<br />
|}<br />
<br />
<br />
<br />
==== Hurt Armor ====<br />
<br />
Sent by the server to damage the player's armor after being hit. <br />
<br />
The packet should never be used by servers as it hands the responsibility over to the player completely, while the server can easily and reliably update the armor damage of players itself.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x26<br />
|rowspan="1"| Client<br />
| Health<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Entity Data ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x27<br />
|rowspan="2"| Server & Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Metadata<br />
| MetadataDictionary<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Entity Motion ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x28<br />
|rowspan="4"| Server & Client<br />
| Runtime Entity Id<br />
| VarLong<br />
| <br />
|-<br />
| Motion X<br />
| Vector3<br />
| <br />
|-<br />
| Motion Y<br />
| Float<br />
| <br />
|-<br />
| Motion Z<br />
| Float<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Entity Link ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x29<br />
|rowspan="4"| Client<br />
| Ridden ID<br />
| SignedVarLong<br />
| <br />
|-<br />
| Rider ID<br />
| SignedVarLong<br />
| <br />
|-<br />
| Link Type<br />
| Byte<br />
| <br />
|-<br />
| Unknown<br />
| Byte<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Health ====<br />
<br />
Sent by the server to set the health of the player it is sent to.<br />
<br />
This packet should no longer be used. Instead, the health attribute should be used so that the health and maximum health may be changed directly.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x2A<br />
|rowspan="1"| Client<br />
| Health<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Spawn Position ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x2B<br />
|rowspan="5"| Client<br />
| Spawn Type<br />
| SignedVarInt<br />
| <br />
|-<br />
| Block Position<br />
| BlockCoordinates<br />
| the new position of the spawn that was set. If spawnType is WORLD_SPAWN, compasses will point to this position. As of 1.16, blockPosition is always the position of the player.<br />
|-<br />
| Dimension ID<br />
| Int<br />
|<br />
|-<br />
| Spawn Position<br />
| Vector3<br />
| Default -2147483648, -2147483648, -2147483648<br />
|-<br />
| Forced<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Animate ====<br />
<br />
Sent by the server to send a player animation from one player to all viewers of that player. <br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x2C<br />
|rowspan="2"| Server & Client<br />
| Action ID<br />
| SignedVarInt<br />
| <br />
|-<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Respawn ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x2D<br />
|rowspan="3"| Server & Client<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| State<br />
| Byte<br />
| <br />
|-<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|}<br />
<br />
States:<br />
{| class="wikitable"<br />
! ID<br />
! Name<br />
|-<br />
| 0<br />
| Server Searching<br />
|-<br />
| 1<br />
| Server Ready<br />
|-<br />
| 2<br />
| Client Ready<br />
|}<br />
<br />
==== Container Open ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x2E<br />
|rowspan="4"| Client<br />
| Window Id<br />
| Byte<br />
| <br />
|-<br />
| Type<br />
| Byte<br />
| <br />
|-<br />
| Block Position<br />
| BlockCoordinates<br />
| <br />
|-<br />
| Unique Entity Id<br />
| SignedVarLong<br />
| <br />
|}<br />
<br />
Bedrock needs either a valid block position, with an actual block at that position, or an entity ID for this to work. The entity must have CONTAINER_BASE_SIZE metadata, or the block must be a container. The entity ID is used for minecart chests etc. but any entity will work. If the entity has NAMETAG metadata this will be used as the container name.<br />
<br />
<br />
<br />
==== Container Close ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x2F<br />
|rowspan="1"| Server & Client<br />
| Window Id<br />
| Byte<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Player Hotbar ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x30<br />
|rowspan="3"| Server & Client<br />
| Selected Hotbar Slot<br />
| VarInt<br />
| <br />
|-<br />
| Container Id<br />
| Byte<br />
| <br />
|-<br />
| Select Hotbar Slot<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Inventory Content ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x31<br />
|rowspan="2"| Server & Client<br />
| Inventory Id<br />
| VarInt<br />
| <br />
|-<br />
| Input<br />
| ItemStacks<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Inventory Slot ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x32<br />
|rowspan="3"| Server & Client<br />
| Inventory Id<br />
| VarInt<br />
| <br />
|-<br />
| Slot<br />
| VarInt<br />
| <br />
|-<br />
| Item<br />
| Item<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Container Set Data ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x33<br />
|rowspan="3"| Client<br />
| Window Id<br />
| Byte<br />
| <br />
|-<br />
| Property<br />
| SignedVarInt<br />
| <br />
|-<br />
| Value<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Crafting Data ====<br />
<br />
Since 1.16.200, each recipe must have a unique network ID. Otherwise, the client will crash.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x34<br />
|rowspan="4"| Client<br />
| Recipes<br />
| Recipes<br />
| <br />
|-<br />
| Potion type recipes<br />
| PotionTypeRecipe[]<br />
| <br />
|-<br />
| potion container recipes<br />
| PotionContainerChangeRecipe[]<br />
| <br />
|-<br />
| Is Clean<br />
| Boolean<br />
| <br />
|}<br />
<br />
==== Crafting Event ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x35<br />
|rowspan="5"| Server & Client<br />
| Window ID<br />
| Byte<br />
| <br />
|-<br />
| Recipe Type<br />
| SignedVarInt<br />
| <br />
|-<br />
| Recipe ID<br />
| UUID<br />
| <br />
|-<br />
| Input<br />
| ItemStacks<br />
| <br />
|-<br />
| Result<br />
| ItemStacks<br />
| <br />
|}<br />
<br />
<br />
<br />
==== GUI Data Pick Item ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x36<br />
|rowspan="4"| Client<br />
|-<br />
| Item name<br />
| String<br />
| The name of the item that shows up in the top part of the popup that shows up when selecting an item. It is shown as if an item was selected by the player itself.<br />
|-<br />
| Item effects<br />
| String<br />
| The line under the Item name, where the effects of the item are usually situated.<br />
|-<br />
| Hotbar Slot<br />
| int<br />
| The hot bar slot to be selected/picked. This does not currently work, so it does not matter what number this is.<br />
|}<br />
<br />
Sent by the server to make the client 'select' a hotbar slot. It currently appears to be broken however, and does not actually set the selected slot to the hotbar slot set in the packet.<br />
<br />
<br />
<br />
==== Adventure Settings ====<br />
<br />
Sent by the server to update gameplay related features, in particular permissions to access these features for the client.<br />
<br />
It includes allowing the player to fly, build, and mine and attack entities. Most of these flags should be checked server-side instead of using this packet only.<br />
<br />
The client my also send this packet to the server when it updates one of these settings through the in-game settings interface. The server should verify if the player actually has permission to update these settings.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="6"| 0x37<br />
|rowspan="6"| Server & Client<br />
| Flags<br />
| VarInt<br />
| <br />
|-<br />
| Command permission<br />
| VarInt<br />
| <br />
|-<br />
| Action permissions<br />
| VarInt<br />
| <br />
|-<br />
| Permission level<br />
| VarInt<br />
| <br />
|-<br />
| Custom stored permissions<br />
| VarInt<br />
| <br />
|-<br />
| User Id<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Block Entity Data ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x38<br />
|rowspan="2"| Server & Client<br />
| Coordinates<br />
| BlockCoordinates<br />
| <br />
|-<br />
| NamedTag<br />
| NBT<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Player Input ====<br />
<br />
Sent by the client when the player is moving but the server does not allow it to update its movement using the [[#Move Player|Move Player]] packet. It includes situations where the player is riding an entity like a boat. If this is the case, the packet is sent roughly every tick.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x39<br />
|rowspan="4"| Server<br />
| Movement<br />
| Vec2<br />
| The movement vector of the input. It should be thought of in Pocket Edition controls, where specific arrows (or a combination of two, resulting in a diagonal arrow) decide the direction of movement. The movement vector typically has a length of 1: Either it has movement on one axis, or it has a combination, resulting in sqrt(2)/2 for both axes.<br />
|-<br />
| Jumping<br />
| Boolean<br />
| Indicates if the player was pressing the jump button or not. It does not define if the player was actually in the air or not.<br />
|-<br />
| Sneaking<br />
| Boolean<br />
| Indicates the player was sneaking during the input. Note that this may also be checked by keeping the sneaking state updated using the [[#Player Action|Player Action]] packet<br />
|}<br />
<br />
<br />
<br />
==== Level Chunk ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x3A<br />
|rowspan="5"| Client<br />
| Chunk X<br />
| SignedVarInt<br />
| <br />
|-<br />
| Chunk Z<br />
| SignedVarInt<br />
| <br />
|-<br />
| Sub Chunk Count<br />
| VarInt<br />
| <br />
|-<br />
| Cache Enabled<br />
| Boolean<br />
| <br />
|-<br />
| Chunk Data<br />
| ByteArray<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Commands Enabled ====<br />
<br />
This packet is sent to the client to enable or disable the ability to execute commands. If disabled, the client itself will stop the execution of commands.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x3B<br />
|rowspan="1"| Client<br />
| Commands enabled<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Difficulty ====<br />
<br />
Sent by the server to update the client-side difficulty pf the client. The actual effect of this packet on the client isn't very significant, as the difficulty is handled server-side.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x3C<br />
|rowspan="1"| Client<br />
| Difficulty<br />
| VarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Change Dimension ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x3D<br />
|rowspan="5"| Client<br />
| Dimension<br />
| SignedVarInt<br />
| <br />
|-<br />
| Position X<br />
| Vector3<br />
| <br />
|-<br />
| Position Y<br />
| Boolean<br />
| <br />
|-<br />
| Position Z<br />
| Float<br />
| <br />
|-<br />
| Respawn<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Player Game Type ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x3E<br />
|rowspan="1"| Server & Client<br />
| Game mode<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Player List ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x3F<br />
|rowspan="1"| Client<br />
| Records<br />
| PlayerRecords<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Simple Event ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x40<br />
|rowspan="1"| Client<br />
| Event Type<br />
| Unsigned Short<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Event ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x41<br />
|rowspan="3"| Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Event data<br />
| SignedVarInt<br />
| <br />
|-<br />
| Event type<br />
| Byte<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Spawn Experience Orb ====<br />
<br />
Sent by the server to spawn an experience orb entity client-side. <br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x42<br />
|rowspan="2"| Client<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| Count<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Map Item Data ====<br />
<br />
Sent by the server to update the data of a map shown to the client. It is sent with a combination of flags that specify what data is updated.<br />
<br />
The packet may be used to update specific parts of the map only. It is not required to send the entire map each time when updating one part.<br />
<br />
TODO<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x43<br />
|rowspan="1"| Client<br />
| Map ID<br />
| VarLong<br />
| The unique identifier that represents the map that is updated over network. It remains consitent across sesions.<br />
|}<br />
<br />
<br />
<br />
==== Map Info Request ====<br />
<br />
Sent by the client to request the server to deliver information of a certain map in the inventory of the player. The serve should respond with a [[#Map Item Data|Map Item Data]] packet.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x44<br />
|rowspan="1"| Server & Client<br />
| Unique Map Id<br />
| SignedVarLong<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Request Chunk Radius ====<br />
<br />
Sent by the client to update the server on the chunk view radius that it has set in the settings. The server may respond with a [[#Chunk Radius Updated|Chunk Radius Updated]] packet with either the radius requested, or a different chunk radius if the server chooses so.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x45<br />
|rowspan="1"| Server & Client<br />
| Chunk radius<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Chunk Radius Updated ====<br />
<br />
Sent by the server in response to a [[#Request Chunk Radius|Request Chunk Radius]] packet. It defines the radius that the server allows the client to have. This may be lower than the chunk radius requested by the client.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x46<br />
|rowspan="1"| Client<br />
| Chunk radius<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== ItemFrame Drop Item ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x47<br />
|rowspan="1"| Server & Client<br />
| Block Position<br />
| BlockCoordinates<br />
|<br />
|}<br />
<br />
==== Game Rules Changed ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x48<br />
|rowspan="1"| Client<br />
| Rules<br />
| GameRules<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Camera ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x49<br />
|rowspan="2"| Client<br />
| Camera Unique Entity Id<br />
| SignedVarLong<br />
| <br />
|-<br />
| Player Unique Entity Id<br />
| SignedVarLong<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Boss Event ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x4A<br />
|rowspan="2"| Client<br />
| Boss Entity ID<br />
| SignedVarLong<br />
| <br />
|-<br />
| Event Type<br />
| VarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Show Credits ====<br />
<br />
Sent by the server to show the Minecraft credits screen to the client. It is typically when the player beats the ender dragon and leaves the End.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x4B<br />
|rowspan="2"| Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Status<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
Statuses:<br />
{| class="wikitable"<br />
! ID<br />
! Name<br />
|-<br />
| 0<br />
| Start Credits<br />
|-<br />
| 1<br />
| End Credits<br />
|}<br />
<br />
<br />
==== Available Commands ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x4C<br />
|rowspan="1"| Client<br />
|colspan="3" | This packet has no data.<br />
|}<br />
<br />
==== Command Request ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x4D<br />
|rowspan="5"| Server<br />
| Command<br />
| String<br />
| <br />
|-<br />
| Command type<br />
| VarInt<br />
| <br />
|-<br />
| Unknown UUID<br />
| UUID<br />
| <br />
|-<br />
| Request ID<br />
| String<br />
| <br />
|-<br />
| Unknown<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== CommandBlock Update ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x4E<br />
|rowspan="1"| Server<br />
| Is Block<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Command Output ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x4F<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== Update Trade ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="10"| 0x50<br />
|rowspan="10"| Client<br />
| Window ID<br />
| Byte<br />
| <br />
|-<br />
| Window Type<br />
| Byte<br />
| <br />
|-<br />
| Unknown0<br />
| VarInt<br />
| <br />
|-<br />
| Unknown1<br />
| VarInt<br />
| <br />
|-<br />
| Unknown2<br />
| VarInt<br />
| <br />
|-<br />
| Is Willing<br />
| Boolean<br />
| <br />
|-<br />
| Trader Entity ID<br />
| SignedVarLong<br />
| <br />
|-<br />
| Player Entity ID<br />
| SignedVarLong<br />
| <br />
|-<br />
| Display Name<br />
| String<br />
| <br />
|-<br />
| NamedTag<br />
| NBT<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Update Equip ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x51<br />
|rowspan="5"| Client<br />
| Window ID<br />
| Byte<br />
| <br />
|-<br />
| Window Type<br />
| Byte<br />
| <br />
|-<br />
| Unknown<br />
| Byte<br />
| <br />
|-<br />
| Entity ID<br />
| SignedVarLong<br />
| <br />
|-<br />
| NamedTag<br />
| NBT<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Resource Pack Data Info ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="7"| 0x52<br />
|rowspan="7"| Client<br />
| Package ID<br />
| String<br />
| <br />
|-<br />
| Max Chunk Size<br />
| Unsigned Int<br />
| <br />
|-<br />
| Chunk Count<br />
| Unsigned Int<br />
| <br />
|-<br />
| Compressed Package Size<br />
| Unsigned Long<br />
| <br />
|-<br />
| Hash<br />
| ByteArray<br />
| <br />
|-<br />
| Is Premium<br />
| Boolean<br />
| <br />
|-<br />
| Pack Type<br />
| Byte<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Resource Pack Chunk Data ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x53<br />
|rowspan="4"| Client<br />
| Package ID<br />
| String<br />
| <br />
|-<br />
| Chunk Index<br />
| Unsigned Int<br />
| <br />
|-<br />
| Progress<br />
| Unsigned Long<br />
| <br />
|-<br />
| Payload<br />
| ByteArray<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Resource Pack Chunk Request ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x54<br />
|rowspan="2"| Server<br />
| Package ID<br />
| String<br />
| <br />
|-<br />
| Chunk Index<br />
| Unsigned Int<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Transfer ====<br />
<br />
Sent by the server to transfer a player from the current server to another. Doing so will fully disconnect the client, bring it back to the main menu and make it connect to the next server.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x55<br />
|rowspan="2"| Client<br />
| Address<br />
| String<br />
| <br />
|-<br />
| Port<br />
| Unsigned Short<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Play Sound ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x56<br />
|rowspan="4"| Client<br />
| Sound name<br />
| String<br />
| <br />
|-<br />
| Sound position<br />
| Position<br />
| <br />
|-<br />
| Volume<br />
| Float<br />
| <br />
|-<br />
| Pitch<br />
| Float<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Stop Sound ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x57<br />
|rowspan="2"| Client<br />
| Sound Name<br />
| String<br />
| <br />
|-<br />
| Stopping All Sound<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Title ====<br />
<br />
Sent by the server to make a title, subtitle or action bar shown to a player. It has several fields that allow setting the duration of the titles.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x58<br />
|rowspan="5"| Client<br />
| Type<br />
| SignedVarInt<br />
| <br />
|-<br />
| Text<br />
| String<br />
| <br />
|-<br />
| Fade In Time<br />
| SignedVarInt<br />
| <br />
|-<br />
| Stay Time<br />
| SignedVarInt<br />
| <br />
|-<br />
| Fade Out Time<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Add Behavior Tree ====<br />
<br />
Sent by the server. Its usage remains unknown, as behavior packs are typically all sent at the start of the game.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x59<br />
|rowspan="1"| Client<br />
| Behavior Tree JSON<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Structure Block Update ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x5A<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== Show Store Offer ====<br />
<br />
Sent by the server to show a Marketplace store offer to a player. It opens a window client-side that displays the item.<br />
<br />
The packet only works on partnered servers: Servers that are not partnered will not have a store button show up on the in-game pause menu and will, as a result, not be able to open store offers on the client side. Sending the packet does therefore not work when using a proxy that is connected to with the domain of one of the partnered servers.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x5B<br />
|rowspan="2"| Client<br />
| Offer Id<br />
| String<br />
| <br />
|-<br />
| Shown To All<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Purchase Receipt ====<br />
<br />
Sent by the client to notify the server it purchased an item from the marketplace store that was offered by the server.<br />
<br />
The packet is only used for partnered servers.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x5C<br />
|rowspan="1"| Server<br />
<br />
|}<br />
<br />
<br />
<br />
==== Player Skin ====<br />
<br />
Sent by the client when it updates its own skin using the in-game skin picker. It is relayed by the server, or sent if the server changes the skin of a player on its own accord. <br />
<br />
Note that the packet can only be sent for players that are in the player list at the time of sending.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x5D<br />
|rowspan="4"| Server & Client<br />
| UUID<br />
| UUID<br />
| <br />
|-<br />
| Skin<br />
| Skin<br />
| <br />
|-<br />
| Skin Name<br />
| String<br />
| <br />
|-<br />
| Old Skin Name<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Sub Client Login ====<br />
<br />
Sent when an additional player attempts to join from a split screen session. The contents of the chain data and skin data fields use the same format as the [[#Login|Login]] packet, and can be decoded the same way.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x5E<br />
|rowspan="2"| Server<br />
| Chain data<br />
| JSON array of JWT Data<br />
| Contains the display name, UUID and XUID<br />
|-<br />
| Skin data<br />
| JWT Data<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Automation Client Connect ====<br />
<br />
Sent by the server to make the client connect to a websocket server. This websocket server has the ability to execute commands on the behalf of the client and it canlisten for certain events fired by the client.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x5F<br />
|rowspan="1"| Client<br />
| Address<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Last Hurt By ====<br />
<br />
Sent by the server to let the client know what entity type it was last hurt by. At this moment, the packet is useless and should not be used. <br />
There is no behaviour that depends on if this packet is sent or not.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x60<br />
|rowspan="1"| Client<br />
| Entity Type Id<br />
| VarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Book Edit ====<br />
<br />
Sent by the client when it edits a book. It is sent each time a modification was made and the player stops its typing 'session', rather than simply after closing the book.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x61<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== NPC Request ====<br />
<br />
Sent by the client when it interacts with an NPC.<br />
<br />
The packet is specifically for Education Edition, where NPCs are available to use. It has no use in the base game.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x62<br />
|rowspan="4"| Server & Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Unknown0<br />
| Byte<br />
| <br />
|-<br />
| Unknown1<br />
| String<br />
| <br />
|-<br />
| Unknown2<br />
| Byte<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Photo Transfer ====<br />
<br />
Sent by the server to transfer a photo (image) file to the client. It is typically used to transfer photos so that the client can display it in a portfolio in Education Edition.<br />
<br />
While previously usable in the base game, the displaying of photos in books was disabled and the packet has little use anymore.<br />
<br />
The packet is specifically for Education Edition. It has no use in the base game.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x63<br />
|rowspan="3"| Server<br />
| File name<br />
| String<br />
| <br />
|-<br />
| Image data<br />
| String<br />
| <br />
|-<br />
| Unknown2<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Model Form Request ====<br />
<br />
Sent by the server to make the client open a form.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x64<br />
|rowspan="2"| Client<br />
| Form Id<br />
| VarInt<br />
| <br />
|-<br />
| Form Data<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Model Form Response ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x65<br />
|rowspan="2"| Server<br />
| Form Id<br />
| VarInt<br />
| <br />
|-<br />
| Form Data<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Server Settings Request ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x66<br />
|rowspan="1"| Server<br />
<br />
|}<br />
<br />
<br />
<br />
==== Server Settings Response ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x67<br />
|rowspan="2"| Client<br />
| Form Id<br />
| VarLong<br />
| <br />
|-<br />
| Form Data<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Show Profile ====<br />
<br />
Sent by the server to show the Xbox Live profile of one player to another.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x68<br />
|rowspan="1"| Client<br />
| Xuid<br />
| String<br />
| If the XUID is invalid, the client ignores the packet<br />
|}<br />
<br />
<br />
<br />
==== Set Default Game Type ====<br />
<br />
Sent by the client when it toggles the default game type in the settings UI, and is sent by the server when it actually changes the default game type, resulting in the toggle being changed in the settings UI.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x69<br />
|rowspan="1"| Client<br />
| Game mode<br />
| VarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Remove Objective ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x6A<br />
|rowspan="1"| Client<br />
| Objective Id<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Display Objective ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x6B<br />
|rowspan="5"| Client<br />
| Display Slot<br />
| String<br />
| <br />
|-<br />
| Objective Id<br />
| String<br />
| <br />
|-<br />
| Display Name<br />
| String<br />
| <br />
|-<br />
| Criteria<br />
| String<br />
| <br />
|-<br />
| Sort Order<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Score ====<br />
<br />
Sent by the server to send the contents of a scoreboard to the player. It may be used to either add, remove or edit entries on the scoreboard.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x6C<br />
|rowspan="2"| Client<br />
| Action<br />
| byte<br />
| 0 (Add), 1 (Remove)<br />
|-<br />
| Entries<br />
| ScoreEntries<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Lab Table ====<br />
<br />
Sent by the client to let the server know it started a chemical reaction in Education Edition, and is sent by the server to allow other clients to show the effects.<br />
<br />
This packet is only functional if Education features are enabled.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x6D<br />
|rowspan="5"| Server & Client<br />
| Unknown Byte 0<br />
| Byte<br />
| <br />
|-<br />
| Block Entity Position X<br />
| VarInt<br />
| <br />
|-<br />
| Block Entity Position Y<br />
| VarInt<br />
| <br />
|-<br />
| Block Entity Position Z<br />
| VarInt<br />
| <br />
|-<br />
| Reaction Type<br />
| Byte<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Update Block Synced ====<br />
<br />
Sent by the server to synchronize the falling of a falling block entity with the transitioning back and forth from and to a solid block. It is used to prevent the entity from flickering, and is used in places such as the pushing of blocks with pistons.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="6"| 0x6E<br />
|rowspan="6"| Client<br />
| Coordinates<br />
| BlockCoordinates<br />
| <br />
|-<br />
| Block Runtime ID<br />
| VarInt<br />
| <br />
|-<br />
| Block Priority<br />
| VarInt<br />
| <br />
|-<br />
| Data Layer ID<br />
| VarInt<br />
| <br />
|-<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Block Synced Type<br />
| VarLong<br />
| 0 - None, 1 - Create, 2 - Destroy<br />
|}<br />
<br />
==== Move Entity Delta ====<br />
<br />
Sent by the server to move an entity by a given delta. The packet is specifically optimized to save as much space as possible, by only writing non-zero fields.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x6F<br />
|rowspan="2"| Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Flags<br />
| Unsigned Short<br />
| <br />
|}<br />
<br />
Flags<br />
{| class="wikitable"<br />
! Field<br />
! Bit<br />
|-<br />
| HAS_X<br />
| 0x01<br />
|-<br />
| HAS_Y<br />
| 0x02<br />
|-<br />
| HAS_Z<br />
| 0x4<br />
|-<br />
| HAS_PITCH<br />
| 0x8<br />
|-<br />
| HAS_YAW<br />
| 0x10<br />
|-<br />
| HAS_ROLL<br />
| 0x20<br />
|}<br />
<br />
<br />
<br />
==== Set Scoreboard Identity ====<br />
<br />
Sent by the server to change the identity type of one of the entries on a scoreboard. This is used to change, for example, an entry pointing to a player, to a fake player when it leaves the server, and to change it back to a real player when it joins again.<br />
<br />
In non-vanilla situations, this packet is quite useless.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x70<br />
|rowspan="2"| Client<br />
| Action<br />
| byte<br />
| 0 (Add), 1 (Remove)<br />
|-<br />
| Entries<br />
| ScoreboardIdentityEntries<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Local Player As Initialized ====<br />
<br />
Sent by the client in response to a [[#Play Status||Play Status]] with the status Player Spawn (3). The packet marks the moment at which the client is fully initialized and can receive any packet without discarding it.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x71<br />
|rowspan="1"| Server<br />
| Runtime Entity Id<br />
| VarLong<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Update Soft Enum ====<br />
<br />
Sent by the server to update a soft enum, also known as a dynamic enum, previous sent in the [[#Available Commands|Available Commands]] packet. It is sent whenever the enum should get new options or when some of its options should be removed.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x72<br />
|rowspan="3"| Client<br />
|-<br />
| Enum Data<br />
| EnumData<br />
| TODO<br />
|-<br />
| Action<br />
| byte<br />
| 0 (Add), 1 (Remove), 2 (Update)<br />
|}<br />
<br />
<br />
<br />
==== Network Stack Latency ====<br />
<br />
Sent by the server (and the client, on development builds) to measure the latency over the entire Minecraft stack, rather than the RakNet latency. <br />
<br />
It has over usages too, such as the ability to be used as some kind of acknowledgement packet, to know when the client has received a certain other packet.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x73<br />
|rowspan="2"| Server & Client<br />
| Timestamp<br />
| Unsigned Long<br />
| <br />
|-<br />
| Send Back<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Script Custom Event ====<br />
<br />
Sent by both the client and server. It is a way to let scripts communicate with the server, so that the client can let the server know it triggered an event, or the other way around.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x75<br />
|rowspan="2"| Server & Client<br />
| Event Name<br />
| String<br />
| <br />
|-<br />
| Data<br />
| String<br />
| Typically a JSON encoded string that the script is able to encode and decode too<br />
|}<br />
<br />
<br />
<br />
==== Spawn Particle Effect ====<br />
<br />
Sent by the server to spawn a particle effect client-side. Unlike other packets that result in the appearing of particles, this packet can show particles that are not hardcoded in the client. They can be added and changed through behavior packs to implement custom particles.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x76<br />
|rowspan="4"| Client<br />
| Dimension Id<br />
| Byte<br />
| <br />
|-<br />
| Unique Entity Id<br />
| SignedVarLong<br />
| <br />
|-<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| Identifier<br />
| String<br />
| The name of the particle<br />
|}<br />
<br />
<br />
<br />
==== Available Entity Identifiers ====<br />
<br />
Sent by the server at the start of the game to let the client know all entities that are on the server.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x77<br />
|rowspan="1"| Client<br />
| NamedTag<br />
| NBT<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Level Sound Event (2) ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="6"| 0x78<br />
|rowspan="6"| Server & Client<br />
| Sound ID<br />
| Byte<br />
| <br />
|-<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| Block Id<br />
| SignedVarInt<br />
| <br />
|-<br />
| Entity Type<br />
| String<br />
| <br />
|-<br />
| Is baby mob<br />
| Boolean<br />
| <br />
|-<br />
| Is global<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Network Chunk Publisher Update ====<br />
<br />
Sent by the server to change the point around which chunks are and remain loaded. <br />
<br />
This is useful for minigame servers, where only one area is ever loaded, in which case the [[#Network Chunk Publisher|Network Chunk Publisher]] packet can be sent in the middle of it, so that no chunks ever need to be additionally sent during the course of the game.<br />
<br />
In reality, the packet is not extraordinarily useful, and most servers just sent it constantly at the position of the player. <br />
<br />
If the packet is not sent at all, no chunk will be shown to the player, regardless of where they are sent.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x79<br />
|rowspan="2"| Client<br />
| Coordinates<br />
| BlockCoordinates<br />
| <br />
|-<br />
| Radius<br />
| VarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Biome Definition List ====<br />
<br />
Sent by the server to let the client know all biomes that are available and implemented on the server side.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x7A<br />
|rowspan="1"| Client<br />
| NamedTag<br />
| NBT<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Level Sound Event (3) ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="6"| 0x7B<br />
|rowspan="6"| Server & Client<br />
| Sound ID<br />
| VarInt<br />
| <br />
|-<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| Block Id<br />
| SignedVarInt<br />
| <br />
|-<br />
| Entity Type<br />
| String<br />
| <br />
|-<br />
| Is baby mob<br />
| Boolean<br />
| <br />
|-<br />
| Is global<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Level Event Generic ====<br />
<br />
Sent by the server to send a 'generic' level event to the client. This packet sends an NBT serialized object and may for that reason be used for any event holding additional data.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x7C<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== Lectern Update ====<br />
<br />
Sent by the client to update the server on which page was opened in a book on a lectern, or if the book should be removed from it.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x7D<br />
|rowspan="4"| Client<br />
| Page<br />
| Byte<br />
| <br />
|-<br />
| Total Pages<br />
| Byte<br />
| <br />
|-<br />
| Block Position<br />
| Position<br />
| <br />
|-<br />
| Dropping Book<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Video Stream Connect ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x7E<br />
|rowspan="5"| Client<br />
| Server URI<br />
| String<br />
| <br />
|-<br />
| Frame Send Frequency<br />
| Float<br />
| <br />
|-<br />
| Action<br />
| Byte<br />
| <br />
|-<br />
| Resolution X<br />
| Int<br />
| <br />
|-<br />
| Resolution Y<br />
| Int<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Client Cache Status ====<br />
<br />
Sent by the client at the start of the game. It is sent to let the server know if it supports the client-side blob cache. Clients such as Nintendo Switch do not support the cache, and attempting to use it anyway will fail.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x81<br />
|rowspan="1"| Server & Client<br />
| Supported<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== On Screen Texture Animation ====<br />
<br />
Sent by the server to show a certain animation on the screen of the player.<br />
The packet is used, for example, for when a raid is triggered and a raid a defeated.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x82<br />
|rowspan="1"| Client<br />
| Animation Type<br />
| Int<br />
|}<br />
<br />
<br />
<br />
==== Map Create Locked Copy ====<br />
<br />
Sent by the server to create a locked copy of a map into another map. It is used in the cartography table to create a map that is locked and cannot be modified.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x83<br />
|rowspan="2"| Client<br />
| Original Map Id<br />
| VarLong<br />
| <br />
|-<br />
| New Map Id<br />
| VarLong<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Structure Template Data Export Request ====<br />
<br />
Sent by the client to request data of a structure.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x84<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== Structure Template Data Export Response ====<br />
<br />
Sent by the server to send data of a structure to the client in response to a [[#Structure Template Data Export Request|Structure Template Data Export Request]] packet.<br />
<br />
TODO<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x85<br />
|rowspan="1"| Client<br />
| Structure Name<br />
| String<br />
| This is the name used to export the structure to a file<br />
|}<br />
<br />
<br />
<br />
==== Update Block Properties ====<br />
<br />
Sent by the server to update the available block properties.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x86<br />
|rowspan="2"| Client<br />
| NamedTag<br />
| NBT<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Client Cache Blob Status ====<br />
<br />
Sent by the client to let the server know what blobs it already has, in an ACK type system.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x87<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== Client Cache Miss Response ====<br />
<br />
Sent by the server in response to a [[#Client Cache Blob Status|Client Cache Blob Status]] and contains the blob data of all blobs that the client acknowledged not to have yet.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x88<br />
|rowspan="1"| Client<br />
| Blobs<br />
| <br />
|<br />
|}<br />
<br />
<br />
<br />
==== Network Settings ====<br />
<br />
Sent by the server to update a variety of network settings. These settings modify the way packets are sent over the network stack.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x8F<br />
|rowspan="2"| Client<br />
| Compression threshold<br />
| Short<br />
| The maximum size of a packet this is compressed when sent. If the size of the packet is under this value, it is not compressed. When set to 0, all packets will be uncompressed.<br />
|}<br />
<br />
<br />
<br />
==== Player Auth Input ====<br />
<br />
Sent by the client to allow for server authoratative movement. It is used to synchronize the player input with the position server-side.<br />
<br />
The client sends this packet when the 'Server Authoritive Movement' field in the [[#Start Game|Start Game]] packet is set to true, instead of the [[#Move Player|Move Player]] packet. The client will send this packet once every tick.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x90<br />
|rowspan="2"| Client<br />
|}<br />
<br />
<br />
<br />
==== Creative Content ====<br />
<br />
Sent by the server to set the creative inventory's content for a player.<br />
<br />
Introduced in 1.16, this packet replaces the previous method of sending an [[#Inventory Content|Inventory Content]] packet with the creative inventory window ID. <b>This packet must be sent from a server after the StartGamePacket since 1.16.100. Otherwise, the client will crash!</b><br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x91<br />
|rowspan="2"| Client<br />
|}<br />
<br />
==== Player Enchant Options ====<br />
<br />
Sent by the server to update the enchantment options displayed when the user opens the enchantment table and puts an item in.<br />
<br />
This packet was added in 1.16 and allows the server to decide on the enchantment that can be selected by a player. The player should be sent once for every slot update of the enchantment table. The vanilla server sends an empty packet when the player first opens the enchantment table (air is is present in the enchantment table slot) and sends a packet with actual enchantments in it when items are put in that can have enchantments.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x92<br />
|rowspan="2"| Client<br />
|}<br />
<br />
<br />
<br />
==== Item Stack Request ====<br />
<br />
Sent by the client to change item stacks in an inventory. <br />
<br />
Added in 1.16, is essentially a replacement of the [[#Inventory Transaction|Inventory Transaction]] packet for inventory specific actions, such as moving items around or crafting.<br />
<br />
The [[#Inventory Transaction|Inventory Transaction]] packet is still used for actions such as placing blocks and interacting with entities.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x93<br />
|rowspan="2"| Client<br />
|}<br />
<br />
<br />
<br />
==== Item Stack Response ====<br />
<br />
Sent by the server in response to an [[#Item Stack Request|Item Stack Request]] packet from the client.<br />
<br />
This packet is used to either approve or reject ItemStackRequests from the client. If a request is approved, the client will simply continue as normal. If rejected, the client will undo the actions so that the inventory should be in sync with the server again.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x94<br />
|rowspan="2"| Client<br />
|}<br />
<br />
<br />
<br />
==== Player Armor Damage ====<br />
<br />
Sent by the server to damage the armor of a player. It is a very efficient packet, but generally it's much easier to just send a slot update for the damaged armor.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x95<br />
|rowspan="2"| Client<br />
|}<br />
<br />
<br />
<br />
==== Code Builder ====<br />
<br />
Sent by the server to open the URL to a Code Builder (websocket) server.<br />
<br />
This packet is only used by Education Edition and have no affect on the base game.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x96<br />
|rowspan="2"| Client<br />
|}<br />
<br />
<br />
<br />
==== Update Player Game Type ====<br />
<br />
Sent by the server to change the game mode of a player. It is functionally identical to the [[#Set Player Game Type|Set Player Game Type]] packet.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x97<br />
|rowspan="2"| Client<br />
|}<br />
<br />
<br />
<br />
==== Emote List ====<br />
<br />
Sent by the client every time it joins the server and when it equips new emotes. It may be used by the server to find out which emotes the client has available. If the player has no emotes equipped, this packet is not sent.<br />
<br />
Under certain circumstances, this packet is also sent from the server to the client, but more testing is needed for this.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x98<br />
|rowspan="2"| Client<br />
|}<br />
<br />
<br />
<br />
==== Position Tracking DB Server Broadcast ====<br />
<br />
Sent by the server in response to the [[#Position Tracking DB Client Request|Position Tracking DB Client Request]] packet. Thus packet is, as of 1.16, currently only for lodestones. The server maintains a database with tracking IDS and their position and dimension. The client will request these tracking IDs, (NBT tag set on the lodestone compass with the tracking ID?) and the server will respond with the status of those tracking IDs.<br />
<br />
What is actually done with the data sent depends on what the client chooses to do with it. For the lodestone compass, it is used to make the compass point towards lodestones and to make it spin if the lodestone at a position is no longer there.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x99<br />
|rowspan="2"| Client<br />
|}<br />
<br />
<br />
<br />
==== Position Tracking DB Client Request ====<br />
<br />
Sent by the client to request the position and dimension of a 'tracking ID'. These IDs are tracked in a database by the server. In 1.16, this is used for lodestones.<br />
<br />
The client will sent this request to find the position a lodestone compass needs to point to. If found, it will point to the lodestone. If not, it will start spinning around.<br />
<br />
A [[#Position Tracking DB Server Broadcast|Position Tracking DB Server Broadcast]] packet should be sent in response to this packet.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x9a<br />
|rowspan="2"| Client<br />
|}<br />
<br />
<br />
<br />
==== Debug Info ====<br />
<br />
Sent by the server. It does not seem to do anything when sent to the normal client in 1.16;<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x9b<br />
|rowspan="2"| Client<br />
|}<br />
<br />
<br />
<br />
==== Packet Violation Warning ====<br />
<br />
Sent by the client when it receives an invalid packet from the server. It holds some information on the error that occured.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x9c<br />
|rowspan="1"| Client<br />
|}<br />
<br />
==== Item Component ====<br />
<br />
Always sent by a vanilla Bedrock server after the StartGamePacket. Sent not empty for items with data driven information.<br />
<br />
In order for the information in this packet to be used, the experiment data titled <code>data_driven_items</code> must be set to <code>true</code> in the ResourcePackStackPacket (as of 1.16.100), and the item entry in StartGamePacket must have its component toggle set to <code>true</code>.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0xA2<br />
|rowspan="2"| Client<br />
| Items<br />
| ComponentItemData[]<br />
| A list of all item components.<br />
|}<br />
<br />
ComponentItemData takes in a String identifier and an NBT CompoundTag containing item data. Valid, minimal NBT data looks like the following (Any comments are preceded with <code>//</code>):<br />
<br />
<syntaxhighlight lang="json"><br />
{<br />
"components": {<br />
"item_properties": {<br />
"allow_off_hand": 1b,<br />
"hand_equipped": 1b,<br />
"max_stack_size": 1i<br />
},<br />
"minecraft:icon": {<br />
"texture": "example_item" // Required even with a resource pack, or else the client complains about icon texture<br />
}<br />
},<br />
"id": 1020i, // The runtime ID of the item<br />
"name": "wikivg:example_item"<br />
}<br />
</syntaxhighlight><br />
<br />
A list of all known valid item properties (and descriptions, if added):<br />
<br />
{| class="wikitable"<br />
! Property name<br />
! Property type<br />
! Property description<br />
|-<br />
| allow_off_hand<br />
| boolean<br />
| If the item is permitted in the offhand inventory slot.<br />
|-<br />
| animates_in_toolbar<br />
| boolean<br />
|<br />
|-<br />
| can_destroy_in_creative<br />
| boolean<br />
|<br />
|-<br />
| creative_category<br />
| integer<br />
| 1 is the construction, 2 is the nature, 3 is the equipment, 4 is the items, the default value is 1<br />
|-<br />
| creative_group <br />
| string<br />
| TODO<br />
|-<br />
| damage<br />
| integer<br />
| shows the number of damge attacks<br />
|-<br />
| enchantable_slot<br />
| string<br />
|<br />
|-<br />
| enchantable_value<br />
| integer<br />
|<br />
|-<br />
| explodable<br />
| boolean<br />
|<br />
|-<br />
| foil<br />
| boolean<br />
|<br />
|-<br />
| frame_count<br />
| integer<br />
|<br />
|-<br />
| hand_equipped<br />
| boolean<br />
| If the item should be visually held like a tool.<br />
|-<br />
| ignores_permissions<br />
| boolean<br />
|<br />
|-<br />
| liquid_clipped<br />
| boolean<br />
| gives the possibility to click on a liquid<br />
|-<br />
| max_stack_size<br />
| integer<br />
| The maximum amount of this item that can be in an inventory slot.<br />
|-<br />
| mining_speed<br />
| float<br />
|<br />
|-<br />
| mirrored_art<br />
| boolean<br />
|<br />
|-<br />
| requires_interact<br />
| boolean<br />
|<br />
|-<br />
| should_despawn<br />
| boolean<br />
|<br />
|-<br />
| stacked_by_data<br />
| boolean<br />
|<br />
|-<br />
| use_animation<br />
| integer<br />
|<br />
|-<br />
| use_duration<br />
| integer<br />
|<br />
|-<br />
|}<br />
<br />
Other item components can be found here: https://bedrock.dev/docs/stable/Item#Item%20Components (Add these in the same format as <code>minecraft:icon</code> shown above). Also see: https://wiki.bedrock.dev/concepts/items<br />
<br />
[[Category:Bedrock Minecraft]]</div>Orladoghttps://wiki.vg/index.php?title=Bedrock_Protocol&diff=16431Bedrock Protocol2021-02-23T20:44:34Z<p>Orladog: /* Command Output */</p>
<hr />
<div>:: '''Remember that this page is a WIP'''. Come back later to see a more complete page.<br />
----<br />
<br />
{{Box<br />
|BORDER = #9999FF<br />
|BACKGROUND = #99CCFF<br />
|WIDTH = 100%<br />
|ICON = <br />
|HEADING = Heads up!<br />
|CONTENT = This article is about the protocol for the release of Minecraft '''Bedrock Edition''' ([[Bedrock Protocol version numbers|1.16.20, protocol 408]]). See [[Protocol]] for the Java Edition Protocol.<br />
}}<br />
<br />
This is the [https://minecraft.gamepedia.com/Bedrock_Edition Bedrock Edition] Protocol Documentation.<br />
The Bedrock Edition Protocol uses [[wikipedia:User Datagram Protocol|UDP]] instead of [[wikipedia:Transmission Control Protocol|TCP]] that is used for the Java Edition.<br />
Bedrock Edition uses [[Raknet Protocol|RakNet]] as its protocol library.<br />
<br />
The default Bedrock Edition port is 19132.<br />
<br />
Information for this page was obtained from the [https://github.com/NukkitX/Protocol NukkitX Protocol library], [https://github.com/NiclasOlofsson/MiNET MiNET] and [https://github.com/Sandertv/gophertunnel gophertunnel].<br />
<br />
== Data types ==<br />
<br />
{| class="wikitable"<br />
|-<br />
!<br />
! Size (Bytes)<br />
! Range<br />
! Notes<br />
|-<br />
! Byte<br />
| 1<br />
| 0 to 255<br />
|<br />
|-<br />
! Boolean<br />
| 1<br />
| 0 or 1<br />
| A Byte treated as boolean, 0 is false but anything greater then that is true<br />
|-<br />
! Short<br />
| 2<br />
| -32768 to 32767<br />
|<br />
|-<br />
! Unsigned Short<br />
| 2<br />
| 0 to 65535<br />
|<br />
|-<br />
! Int<br />
| 4<br />
| -2147483648 to 2147483647<br />
| Signed little-endian 32-bit Integer<br />
|-<br />
! Int (big endian)<br />
| 4<br />
| -2147483648 to 2147483647<br />
| Signed big-endian 32-bit Integer<br />
|-<br />
! Unsigned Int<br />
| 4<br />
| 0 to 4294967295<br />
| Unsigned 32-bit Integer<br />
|-<br />
! Long<br />
| 8<br />
| -2^63 to 2^63-1<br />
| Signed 64-bit Integer<br />
|-<br />
! Unsigned Long<br />
| 8<br />
| 2^64-1<br />
| Unsigned 64-bit Integer<br />
|-<br />
! Float<br />
| 4<br />
| <br />
| A [[wikipedia:Single-precision_Floating-poInt_format|single-precision 32-bit IEEE 754 Floating poInt number]]<br />
|-<br />
! Double<br />
| 8<br />
| <br />
| A [[wikipedia:Double-precision_Floating-poInt_format|Double-precision 64-bit IEEE 754 Floating poInt number]]<br />
|-<br />
! VarInt<br />
| &ge; 1<br>&le; 5<br />
| 0 to 4294967295<br />
| <br />
|-<br />
! SignedVarInt<br />
| &ge; 1<br>&le; 5<br />
| -2147483648 and 2147483647<br />
| <br />
|-<br />
! VarLong<br />
| &ge; 1<br>&le; 10<br />
| <br />
|<br />
|-<br />
! SignedVarLong<br />
| &ge; 1<br>&le; 10<br />
| -2^63 and 2^63-1<br />
|<br />
|-<br />
! String<br />
| <br />
| <br />
| [[wikipedia:UTF-8|UTF-8]] String prefixed with its size in Bytes as a VarInt. This has the same data structure as a ByteArray but it contains textual data.<br />
|-<br />
! Vector3<br />
| 12<br />
| <br />
| Three Float values (X, Y and Z respectively)<br />
|-<br />
! Vector2<br />
| 8<br />
| <br />
| Two Float values (X and Y respectively)<br />
|-<br />
! NBT<br />
| <br />
| <br />
| <br />
|-<br />
! ByteArray<br />
| <br />
| <br />
| An arbitrary array of Bytes prefixed with its size in Bytes as a VarInt.<br />
|-<br />
! BlockCoordinates<br />
| &ge; 3<br>&le; 15<br />
| <br />
| A SignedVarInt, a normal VarInt and another SignedVarInt (X, Y and Z respectively)<br />
|-<br />
! PlayerLocation<br />
| 15<br />
| <br />
| Three Float values (X, Y and Z respectively), followed by three Bytes (pitch, head yaw and yaw respectively). To convert the Bytes to normal pitch and yaw values divide them by 0.71<br />
|-<br />
! UUID<br />
| 16<br />
| A [[wikipedia:Universally_unique_identifier|UUID]]<br />
| Encoded as two unsigned 64-bit Integers: the most significant 64 bits and the least significant 64 bits<br />
|}<br />
<br />
== Packet Format ==<br />
<br />
Bedrock Edition uses [[Raknet Protocol|RakNet]] as its protocol library, so the packets are sent that way. The UDP protocol specifies packet length, so unlike Java Edition and TCP which deal with raw data streams packets are not length-prefixed. Packets seem to always use compression and can also use encryption. Multiple packets can also be batched into a single packet.<br />
Packet compression uses [https://zlib.net/ zlib], and it seems that packet data can be fed directly into zlib (after being decrypted if encryption is enabled).<br />
<br><br><br />
Refer to [https://github.com/Sandertv/gophertunnel/blob/19c96251a36a39d9ffb938053410852e811755e3/minecraft/protocol/packet/decoder.go#L58 gophertunnel] for more information.<br />
<br />
== Login process ==<br />
The login process is as follows:<br />
# C→S: [[#Login|Login]]<br />
# S→C: [[#Server To Client Handshake|Server To Client Handshake]]<br />
# C→S: [[#Client To Server Handshake|Client To Server Handshake]]<br />
# S→C: [[#Play Status|Play Status]] (Login success)<br />
<br />
To spawn, the following packets should be sent, in order, after the ones above:<br />
# S→C: [[#Resource Packs Info|Resource Packs Info]]<br />
# C→S: [[#Resource Pack Client Response|Resource Pack Client Response]]<br />
# S→C: [[#Resource Pack Stack|Resource Pack Stack]]<br />
# C→S: [[#Resource Pack Client Response|Resource Pack Client Response]]<br />
# S→C: [[#Start Game|Start Game]]<br />
# S→C: [[#Creative Content|Creative Content]]<br />
# S→C: [[#Biome Definition List|Biome Definition List]]<br />
# S→C: Chunks<br />
# S→C: [[#Play Status|Play Status]] (Player spawn)<br />
<br />
If there are no resource packs being sent, a [[#Resource Pack Stack|Resource Pack Stack]] can be sent directly after [[#Resource Packs Info|Resource Packs Info]] to avoid the client responses.<br />
<br />
== Packets ==<br />
Please note that some packet ids are missing, so they don't line up.<br />
The following packet ids are missing:<br />
0x10, 0x74, 0x7F, 0x80<br />
(16, 116, 127, 128)<br />
<br />
<br />
==== Login ====<br />
<br />
Sent when the client initially tries to join the server. It is the first packet sent and contains information specific to the player.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x01<br />
|rowspan="3"| Server<br />
| Protocol version<br />
| Int (big-endian)<br />
| <br />
|-<br />
| Chain data<br />
| JSON array of JWT Data<br />
| Contains the display name, UUID and XUID<br />
|-<br />
| Skin data<br />
| JWT Data<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Play Status ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x02<br />
|rowspan="1"| Client<br />
| Status<br />
| Int (big-endian)<br />
| The current status of the connection.<br />
|}<br />
<br />
The values for each status are as follows:<br />
{| class="wikitable"<br />
! Status<br />
! Name<br />
! Notes<br />
|-<br />
| 0<br />
| Login success<br />
| Sent after [[#Login|Login]] has been successfully decoded and the player has logged in<br />
|-<br />
| 1<br />
| Failed client<br />
| Displays "Could not connect: Outdated client!"<br />
|-<br />
| 2<br />
| Failed server<br />
| Displays "Could not connect: Outdated server!"<br />
|-<br />
| 3<br />
| Player spawn<br />
| Sent after world data to spawn the player<br />
|-<br />
| 4<br />
| Failed invalid Tenant<br />
| Displays "Unable to connect to world. Your school does not have access to this server."<br />
|-<br />
| 5<br />
| Failed Vanilla Edu.<br />
| Displays "The server is not running Minecraft: Education Edition. Failed to connect."<br />
|-<br />
| 6<br />
| Failed Edu. Vanilla<br />
| Displays "The server is running an incompatible edition of Minecraft. Failed to connect."<br />
|-<br />
| 7<br />
| Failed server full<br />
| Displays "Wow this server is popular! Check back later to see if space opens up. Server Full"<br />
|}<br />
<br />
==== Server To Client Handshake ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x03<br />
|rowspan="1"| Client<br />
| JWT data<br />
| JWT String<br />
| Contains the salt to complete the Diffie-Hellman key exchange<br />
|}<br />
<br />
<br />
<br />
==== Client To Server Handshake ====<br />
<br />
Sent by the client in response to a [[#Server To Client Handshake|Server To Client Handshake]] packet sent by the server. It is the first encrypted packet in the login handshake and serves as a confirmation that encryption is correctly initialized client side. It has no fields.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x04<br />
|rowspan="1"| Server<br />
<br />
|}<br />
<br />
<br />
<br />
==== Disconnect ====<br />
<br />
Sent by the server to disconnect a client.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x05<br />
|rowspan="2"| Client<br />
| Hide disconnect screen<br />
| Boolean<br />
| Specifies if the disconnection screen should be hidden when the client is disconnected, meaning it will be sent directly to the main menu.<br />
|-<br />
| Kick message<br />
| String<br />
| An optional message to show when disconnected.<br />
|}<br />
<br />
<br />
<br />
==== Resource Packs info ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x06<br />
|rowspan="4"| Client<br />
| Forced to Accept<br />
| Boolean<br />
| If the resource pack requires the client accept it.<br />
|-<br />
| Scripting Enabled<br />
| Boolean<br />
| If scripting is enabled.<br />
|-<br />
| BehahaviorPackInfos<br />
| ResourcePackInfo[]<br />
| A list of behaviour packs that the client needs to download before joining the server. All of these behaviour packs will be applied together.<br />
|-<br />
| ResourcePackInfos<br />
| ResourcePackInfo[]<br />
| A list of resource packs that the client needs to download before joining the server. The order of these resource packs is not relevant in this packet. It is however important in the Resource Pack Stack packet.<br />
|}<br />
<br />
<br />
<br />
==== Resource Pack Stack ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! colspan="2" | Field Name<br />
! colspan="2" | Field Type<br />
! Notes<br />
|-<br />
| rowspan="11" | 0x07<br />
| rowspan="11" | Client<br />
| colspan="2" | Forced to Accept<br />
| colspan="2" | Boolean<br />
| If the resource pack must be accepted for the player to join the server.<br />
|-<br />
! Resource Pack Entry<br />
! Field Name<br />
! colspan="2" | <br />
! <br />
|-<br />
| rowspan="3" | Array<br />
| Pack ID<br />
| colspan="2" | String<br />
| The ID of the resource pack.<br />
|-<br />
| Pack Version<br />
| colspan="2" | String<br />
| The version of the resource pack.<br />
|-<br />
| Subpack Name<br />
| colspan="2" | String<br />
| The subpack name of the resource pack.<br />
|-<br />
! Behavior Pack Entry<br />
! Field Name<br />
! colspan="2" | <br />
! <br />
|-<br />
| rowspan="3" | Array<br />
| Pack ID<br />
| colspan="2" | String<br />
| The ID of the resource pack.<br />
|-<br />
| Pack Version<br />
| colspan="2" | String<br />
| The version of the resource pack.<br />
|-<br />
| Subpack Name<br />
| colspan="2" | String<br />
| The subpack name of the resource pack.<br />
|-<br />
| colspan="2" | Experimental<br />
| colspan="2" | Boolean<br />
| If the sent resource and behavior packs are experimental.<br />
|-<br />
| colspan="2" | Game Version<br />
| colspan="2" | String<br />
| The version of the game the sent resource and behavior packs were made for.<br />
|}<br />
<br />
<br />
<br />
==== Resource Pack Response ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x08<br />
|rowspan="2"| Server<br />
| Status<br />
| Byte<br />
| See below<br />
|-<br />
| Pack IDs<br />
| ResourcePackIds<br />
| All of the pack IDs.<br />
|}<br />
<br />
The values for each status are as follows:<br />
{| class="wikitable"<br />
! Status<br />
! Name<br />
! Notes<br />
|-<br />
| 0<br />
| None<br />
| <br />
|-<br />
| 1<br />
| Refused<br />
| <br />
|-<br />
| 2<br />
| Send packs<br />
|<br />
|-<br />
| 3<br />
| Have all packs<br />
| <br />
|-<br />
| 4<br />
| Completed<br />
|<br />
|}<br />
<br />
<br />
<br />
==== Text ====<br />
<br />
Sent by the client to the server to send chat messages, and by the server to the client to forward or send messages, which may be chat, popups, tips etc.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! colspan="2" | Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| rowspan="9" | 0x09<br />
| rowspan="9" | Server &amp; Client<br />
| colspan="2" | Type<br />
| Byte<br />
| The type of chat message sent.<br />
|-<br />
| colspan="2" | Needs Translation<br />
| Boolean<br />
| If the message sent is a translation key and needs to be translated.<br />
|-<br />
! Chat Type ID<br />
! Text<br />
! <br />
! Derived from above; values sent here change depending on that.<br />
|-<br />
| rowspan="1" | 0, 1, or 2<br />
| rowspan="1" | Source Name<br />
| rowspan="1" | String<br />
| rowspan="1" | The name of the source.<br />
|-<br />
|-<br />
|-<br />
| rowspan="1" | 3, 4, or 5<br />
| rowspan="1" | Message<br />
| rowspan="1" | String<br />
| rowspan="1" | The message sent with the packet.<br />
|-<br />
|-<br />
|-<br />
|-<br />
| rowspan="2" | 6, 7, or 8<br />
| Message<br />
| String<br />
| The message sent with the packet<br />
|-<br />
| Parameters<br />
| Array<br />
| The parameters sent with the packet. This usually includes translation parameters or similar types depending on what kind of chat type was sent.<br />
|-<br />
| colspan="2" | XUID<br />
| Optional String<br />
| The XUID of the player who sent this message.<br />
|-<br />
| colspan="2" | Platform Chat ID<br />
| Optional String<br />
| The platform chat ID of the sent message.<br />
|}<br />
<br />
{| class="wikitable"<br />
! ID<br />
! Chat Type<br />
|-<br />
| 0<br />
| Raw<br />
|-<br />
| 1<br />
| Chat<br />
|-<br />
| 2<br />
| Translation<br />
|-<br />
| 3<br />
| Popup<br />
|-<br />
| 4<br />
| Jukebox Popup<br />
|-<br />
| 5<br />
| Tip<br />
|-<br />
| 6<br />
| System<br />
|-<br />
| 7<br />
| Whisper<br />
|-<br />
| 8<br />
| Announcement<br />
|-<br />
| 9<br />
| Object<br />
|-<br />
| 10<br />
| Object Whisper<br />
|}<br />
<br />
For additional information and examples of all the chat types above, see here: https://imgur.com/a/KhcFscg<br />
<br />
<br />
<br />
==== Set Time ====<br />
<br />
Sent by the server to update the current time client-side. The client actually advances time client-side by itself, so this packet does not need to be sent each tick. It is merely a means of synchronizing time between server and client.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x0A<br />
|rowspan="1"| Client<br />
| Time<br />
| SignedVarInt<br />
| Time is the current time. The time is not limited to 24000 (time of day), but continues progressing after that.<br />
|}<br />
<br />
<br />
<br />
==== Start Game ====<br />
<br />
Sent by the server to send information about the world the player will be spawned in.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="54"| 0x0B<br />
|rowspan="54"| Client<br />
| Entity ID Self<br />
| SignedVarLong<br />
| The unique ID of the player. The unique ID is a value that remains consistent across different sessions of the same world, but most unofficial servers simply fill the runtime ID of the entity out for this field.<br />
|-<br />
| Runtime Entity ID<br />
| VarLong<br />
| The runtime ID of the player. The runtime ID is unique for each world session, and entities are generally identified in packets using this runtime ID.<br />
|-<br />
| Player Gamemode<br />
| SignedVarInt<br />
|-<br />
| Spawn<br />
| Vector3<br />
| The spawn position of the player in the world. In servers this is often the same as the world's spawn position found below.<br />
|-<br />
| Rotation<br />
| Vector2<br />
| The pitch and yaw of the player<br />
|-<br />
| Seed<br />
| SignedVarInt<br />
| The seed used to generate the world. Unlike in Java edition, the seed is a 32bit Integer here.<br />
|-<br />
| Spawn Biome Type<br />
| Short<br />
| <br />
|-<br />
| Custom Biome Name<br />
| String<br />
| <br />
|-<br />
| Dimension<br />
| SignedVarInt<br />
| Dimension is the ID of the dimension that the player spawns in. It is a value from 0-2, with 0 being the overworld, 1 being the nether and 2 being the end.<br />
|-<br />
| Generator<br />
| SignedVarInt<br />
| Generator is the generator used for the world. It is a value from 0-4, with 0 being old limited worlds, 1 being infinite worlds, 2 being flat worlds, 3 being nether worlds and 4 being end worlds. A value of 0 will actually make the client stop rendering chunks you send beyond the world limit.<br />
|-<br />
| World Gamemode<br />
| SignedVarInt<br />
| The game mode that a player gets when it first spawns in the world. It is shown in the settings and is used if the Player Gamemode is set to 5.<br />
|-<br />
| Difficulty<br />
| SignedVarInt<br />
| Difficulty is the difficulty of the world. It is a value from 0-3, with 0 being peaceful, 1 being easy, 2 being normal and 3 being hard.<br />
|-<br />
| World Spawn<br />
| BlockCoordinates <br />
| The block on which the world spawn of the world. This coordinate has no effect on the place that the client spawns, but it does have an effect on the direction that a compass poInts.<br />
|-<br />
| Has achievements disabled<br />
| Boolean<br />
| Defines if achievements are disabled in the world. The client crashes if this value is set to true while the player's or the world's game mode is creative, and it's recommended to simply always set this to false as a server.<br />
|-<br />
| Day cycle stop time<br />
| SignedVarInt<br />
| The time at which the day cycle was locked if the day cycle is disabled using the respective game rule. The client will maIntain this time as Boolean as the day cycle is disabled.<br />
|-<br />
| EDU offer<br />
| SignedVarInt<br />
| Some Minecraft: Education Edition field that specifies what 'region' the world was from, with 0 being None, 1 being RestOfWorld, and 2 being China. The actual use of this field is unknown.<br />
|-<br />
| Has Education Edition features enabled<br />
| Boolean<br />
| Specifies if the world has education edition features enabled, such as the blocks or entities specific to education edition.<br />
|-<br />
| Education Production ID<br />
| String<br />
|<br />
|-<br />
| Rain level<br />
| Float<br />
| The level specifying the Intensity of the rain falling. When set to 0, no rain falls at all.<br />
|-<br />
| Lightning level<br />
| Float<br />
| The level specifying the Intensity of the thunder. This may actually be set independently from the rain level, meaning dark clouds can be produced without rain.<br />
|-<br />
| Has Confirmed Platform Locked Content<br />
| Boolean<br />
| <br />
|-<br />
| Is Multiplayer<br />
| Boolean<br />
| Specifies if the world is a multi-player game. This should always be set to true for servers.<br />
|-<br />
| Broadcast To LAN<br />
| Boolean<br />
| Specifies if LAN broadcast was Intended to be enabled for the world.<br />
|-<br />
| Xbox Live Broadcast Mode<br />
| VarInt<br />
| The mode used to broadcast the joined game across XBOX Live.<br />
|-<br />
| Platform Broadcast Mode<br />
| VarInt<br />
| The mode used to broadcast the joined game across the platform.<br />
|-<br />
| Enable commands<br />
| Boolean<br />
| If commands are enabled for the player. It is recommended to always set this to true on the server, as setting it to false means the player cannot, under any circumstance, use a command.<br />
|-<br />
| Are texture packs required<br />
| Boolean<br />
| Specifies if the texture pack the world might hold is required, meaning the client was forced to download it before joining.<br />
|-<br />
| GameRules<br />
| GameRules<br />
| Defines game rules currently active with their respective values. The value of these game rules may be either 'bool', 'Int32' or 'Float32'. Some game rules are server side only, and don't necessarily need to be sent to the client.<br />
|-<br />
| Bonus Chest<br />
| Boolean<br />
| Specifies if the world had the bonus map setting enabled when generating it. It does not have any effect client-side.<br />
|-<br />
| Map Enabled<br />
| Boolean<br />
| Specifies if the world has the start with map setting enabled, meaning each joining player obtains a map. This should always be set to false, because the client obtains a map all on its own accord if this is set to true.<br />
|-<br />
| Permission Level<br />
| SignedVarInt<br />
| The permission level of the player. It is a value from 0-3, with 0 being visitor, 1 being member, 2 being operator and 3 being custom.<br />
|-<br />
| Server Chunk Tick Range<br />
| Int<br />
| The radius around the player in which chunks are ticked. Most servers set this value to a fixed number, as it does not necessarily affect anything client-side.<br />
|-<br />
| Has Locked Behavior Pack<br />
| Boolean<br />
| Specifies if the texture pack of the world is locked, meaning it cannot be disabled from the world. This is typically set for worlds on the marketplace that have a dedicated texture pack.<br />
|-<br />
| Has Locked Resource Pack<br />
| Boolean<br />
| Specifies if the texture pack of the world is locked, meaning it cannot be disabled from the world. This is typically set for worlds on the marketplace that have a dedicated texture pack.<br />
|-<br />
| Is From Locked World Template<br />
| Boolean<br />
| Specifies if the world from the server was from a locked world template. For servers this should always be set to false.<br />
|-<br />
| Use MSA Gamertags Only<br />
| Boolean<br />
| <br />
|-<br />
| Is From World Template<br />
| Boolean<br />
| Specifies if the world from the server was from a locked world template. For servers this should always be set to false.<br />
|-<br />
| Is World Template Option Locked<br />
| Boolean<br />
| Specifies if the world was a template that locks all settings that change properties above in the settings GUI. It is recommended to set this to true for servers that do not allow things such as setting game rules through the GUI.<br />
|-<br />
| Only Spawn V1 Villagers<br />
| Boolean<br />
| A hack that Mojang put in place to preserve backwards compatibility with old villagers. The his never actually read though, so it has no functionality.<br />
|-<br />
| Game Version<br />
| String<br />
| The version of the game from which Vanilla features will be used. The exact function of this field isn't clear.<br />
|-<br />
| Limited World Width<br />
| Int<br />
|<br />
|-<br />
| Limited World Height<br />
| Int<br />
|<br />
|-<br />
| Is Nether Type<br />
| Boolean<br />
|<br />
|-<br />
| Is Force Experimental Gameplay<br />
| Boolean<br />
|<br />
|-<br />
| Level ID<br />
| String<br />
| A base64 encoded world ID that is used to identify the world.<br />
|-<br />
| World name<br />
| String<br />
| The name of the world that the player is joining. Note that this field shows up above the player list for the rest of the game session, and cannot be changed. Setting the server name to this field is recommended.<br />
|-<br />
| Premium World Template Id<br />
| String<br />
| A UUID specific to the premium world template that might have been used to generate the world. Servers should always fill out an empty String for this.<br />
|-<br />
| Is Trial<br />
| Boolean<br />
| Specifies if the world was a trial world, meaning features are limited and there is a time limit on the world.<br />
|-<br />
| Is Server Side movement enabled<br />
| Boolean<br />
| Specifies if the server is authoritative over the movement of the player, meaning it controls the movement of it.<br />
|-<br />
| Current Tick<br />
| Boolean<br />
| The total time in ticks that has elapsed since the start of the world.<br />
|-<br />
| Enchantment Seed<br />
| SignedVarInt<br />
| The seed used to seed the random used to produce enchantments in the enchantment table. Note that the exact correct random implementation must be used to produce the correct results both client- and server-side.<br />
|-<br />
| Block Palette<br />
| BlockPalette<br />
| A list of all blocks registered on the server.<br />
|-<br />
| Itemstates<br />
| Itemstates<br />
| A list of all items with their legacy IDs which are available in the game. Failing to send any of the items that are in the game will crash mobile clients.<br />
|-<br />
| Multiplayer Correlation ID<br />
| String<br />
| A unique ID specifying the multi-player session of the player. A random UUID should be filled out for this field.<br />
|}<br />
<br />
<br />
<br />
==== Add Player ====<br />
<br />
Sent by the server to make a player entity show up client-side. It is one of the few entities that cannot be sent using the [[#Add Entity|Add Entity]] packet.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="19"| 0x0C<br />
|rowspan="19"| Client<br />
| UUID<br />
| UUID<br />
| UUID is the UUID of the player. It is the same UUID that the client sent in the Login packet at the start of the session. A player with this UUID must exist in the player list (built up using the Player List packet) for it to show up in-game.<br />
|-<br />
| Username<br />
| String<br />
| Username is the name of the player. This username is the username that will be set as the initial name tag of the player.<br />
|-<br />
| Entity ID Self<br />
| SignedVarLong<br />
| The unique ID of the player. The unique ID is a value that remains consistent across different sessions of the same world, but most unoffical servers simply fill the runtime ID of the player out for this field.<br />
|-<br />
| Runtime Entity ID<br />
| VarLong<br />
| The runtime ID of the player. The runtime ID is unique for each world session, and entities are generally identified in packets using this runtime ID.<br />
|-<br />
| Platform Chat ID<br />
| String<br />
| An identifier only set for particular platforms when chatting (presumably only for Nintendo Switch). It is otherwise an empty string, and is used to decide which players are able to chat with each other.<br />
|-<br />
| Position<br />
| Vector3<br />
| The position to spawn the player at. If the player is at a distance that the viewer cannot see, the player will still show up if the viewer moves closer.<br />
|-<br />
| Velocity<br />
| Vector3<br />
| The initial velocity the player spawns with. This velocity will initiate client side movement of the player.<br />
|-<br />
| Rotation<br />
| Float<br />
| Pitch, yaw and head yaw<br />
|-<br />
| Held Item<br />
| Item<br />
| The item that the player is holding. The item is shown to the viewer as soon as the player itself shows up. Needless to say that this field is rather pointless, as additional packets still must be sent for armour to show up.<br />
|-<br />
| Metadata<br />
| MetadataDictionary<br />
| A map of entity metadata, which includes flags and data properties that alter in particular the way the player looks. Flags include ones such as 'on fire' and 'sprinting'. The metadata values are indexed by their property key.<br />
|-<br />
| Flags<br />
| VarInt<br />
| Flags is a set of flags that specify certain properties of the player, such as whether or not it can fly and/or move through blocks.<br />
|-<br />
| Command permission<br />
| VarInt<br />
| A set of permissions that specify what commands a player is allowed to execute.<br />
|-<br />
| Action Permissions<br />
| VarInt<br />
| Action Permissions is, much like Flags, a set of flags that specify actions that the player is allowed to undertake, such as whether it is allowed to edit blocks, open doors etc.<br />
|-<br />
| Permission Level<br />
| VarInt<br />
| The permission level of the player as it shows up in the player list built up using the PlayerList packet.<br />
|-<br />
| Custom stored permissions<br />
| VarInt<br />
| <br />
|-<br />
| User Id<br />
| Long<br />
| A unique identifier of the player. It appears it is not required to fill this field out with a correct value. Simply writing 0 seems to work.<br />
|-<br />
| Links<br />
| Links<br />
| A list of entity links that are currently active on the player. These links alter the way the player shows up when first spawned in terms of it shown as riding an entity. Setting these links is important for new viewers to see the player is riding another entity.<br />
|-<br />
| Device ID<br />
| String<br />
| The device ID set in one of the files found in the storage of the device of the player. It may be changed freely, so it should not be relied on for anything.<br />
|-<br />
| Device OS<br />
| Int<br />
| The build platform/device OS of the player that is about to be added, as it sent in the Login packet when joining.<br />
|}<br />
<br />
<br />
<br />
==== Add Entity ====<br />
<br />
Sent by the server to spawn an entity to the player. It is used for every entity except other players, paintings and items, for which the [[#Add Player|Add Player]], [[#Add Painting|Add Painting]] and [[#Add Item Entity|Add Item Entity]] packets are used.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="9"| 0x0D<br />
|rowspan="9"| Client<br />
| Entity ID Self<br />
| SignedVarLong<br />
| The unique ID of the entity. The unique ID is a value that remains consistent across different sessions of the same world, but most unofficial servers simply fill the runtime ID of the entity out for this field.<br />
|-<br />
| Runtime Entity ID<br />
| VarLong<br />
| The runtime ID of the entity. The runtime ID is unique for each world session, and entities are generally identified in packets using this runtime ID.<br />
|-<br />
| Entity Type<br />
| String<br />
| The string entity type of the entity, for example 'minecraft:skeleton'.<br />
|-<br />
| Position<br />
| Vector3<br />
| The position to spawn the entity at. If the entity is at a distance that the player cannot see, the entity will still show up if the player moves closer.<br />
|-<br />
| Velocity<br />
| Vector3<br />
| The initial velocity the entity spawns with. This velocity will initiate client side movement of the entity.<br />
|-<br />
| Rotation<br />
| Vector3<br />
| Pitch, yaw and head yaw<br />
|-<br />
| Attributes<br />
| EntityAttributes<br />
| A slice of attributes that the entity has. It includes attributes such as its health, movement speed, etc.<br />
|-<br />
| Metadata<br />
| MetadataDictionary<br />
| A map of entity metadata, which includes flags and data properties that alter in particular the way the entity looks. Flags include ones such as 'on fire' and 'sprinting'. The metadata values are indexed by their property key.<br />
|-<br />
| Links<br />
| Links<br />
| A list of entity links that are currently active on the entity. These links alter the way the entity shows up when first spawned in terms of it shown as riding an entity. Setting these links is important for new viewers to see the entity is riding another entity.<br />
|}<br />
<br />
<br />
<br />
==== Remove Entity ====<br />
<br />
Sent by the server to remove an entity that currently exists in the world from the client-side. Sending this packet if the client cannot already see this entity will have no effect.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x0E<br />
|rowspan="1"| Client<br />
| Unique Entity Id<br />
| SignedVarLong<br />
| The unique ID of the entity to be removed. The unique ID is a value that remains consistent across different sessions of the same world, but most unofficial servers simply fill the runtime ID of the entity out for this field.<br />
|}<br />
<br />
<br />
<br />
==== Add Item Entity ====<br />
<br />
Sent by the server to make an item entity show up. It is one of the few entities that cannot be sent using the [[#Add Entity|Add Entity]] packet.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="7"| 0x0F<br />
|rowspan="7"| Client<br />
| Entity ID Self<br />
| SignedVarLong<br />
| The unique ID of the entity. The unique ID is a value that remains consistent across different sessions of the same world, but most unofficial servers simply fill the runtime ID of the entity out for this field.<br />
|-<br />
| Runtime Entity ID<br />
| VarLong<br />
| The runtime ID of the entity. The runtime ID is unique for each world session, and entities are generally identified in packets using this runtime ID.<br />
|-<br />
| Item<br />
| Item<br />
| The item that is spawned. It must have a valid ID for it to show up client-side. If it is not a valid item, the client will crash when coming near.<br />
|-<br />
| Position<br />
| Vector3<br />
| The position to spawn the entity on. If the entity is at a distance that the player cannot see, the entity will still show up if the player moves closer.<br />
|-<br />
| Velocity<br />
| Vector3<br />
| The initial velocity the entity spawns with. This velocity will initiate client side movement of the entity.<br />
|-<br />
| Metadata<br />
| MetadataDictionary<br />
| A map of entity metadata, which includes flags and data properties that alter in particular the way the entity looks. Flags include ones such as 'on fire' and 'sprinting'. The metadata values are indexed by their property key.<br />
|-<br />
| Is From Fishing<br />
| Boolean<br />
| Specifies if the item was obtained by fishing it up using a fishing rod. It is not clear why the client needs to know this.<br />
|}<br />
<br />
<br />
<br />
==== Take Item Entity ====<br />
<br />
Sent by the server when a player picks up an item entity. It makes the item entity disappear to viewers and shows the pick-up animation.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x11<br />
|rowspan="2"| Client<br />
| Item Runtime Entity Id<br />
| VarLong<br />
| the entity runtime ID of the item that is being taken by another entity. It will disappear to viewers after showing the pick-up animation.<br />
|-<br />
| Runtime Entity Id<br />
| VarLong<br />
| The runtime ID of the entity that took the item, which is usually a player, but could be another entity like a zombie too.<br />
|}<br />
<br />
<br />
<br />
==== Move Entity Absolute ====<br />
<br />
Sent by the server to move an entity to an absolute position. It is typically used for movements where high accuracy isn't needed, such as for long range teleporting.<br />
This packet is also sent by the client when riding a horse/donkey.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x12<br />
|rowspan="4"| Server & Client<br />
| Runtime entity id<br />
| VarLong<br />
| The runtime ID of the entity. The runtime ID is unique for each world session, and entities are generally identified in packets using this runtime ID.<br />
|-<br />
| Flags<br />
| byte<br />
| A combination of flags that specify details of the movement. See below for more info.<br />
|-<br />
| Position<br />
| PlayerLocation<br />
| <br />
|}<br />
<br />
{| class="wikitable"<br />
|-<br />
! Field<br />
! Bit<br />
! Notes<br />
|-<br />
| On ground<br />
| 0x01<br />
| If the entity is touching the ground<br />
|-<br />
| Telported<br />
| 0x02<br />
|<br />
|}<br />
<br />
<br />
<br />
==== Move Player ====<br />
<br />
Sent by players to send their movement to the server, and by the server to update the movement of player entities to other players.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="8"| 0x13<br />
|rowspan="8"| Server & Client<br />
| Runtime entity id<br />
| VarLong<br />
| The runtime ID of the player. The runtime ID is unique for each world session, and entities are generally identified in packets using this runtime ID.<br />
|-<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| Rotation<br />
| Vector3<br />
| Pitch, yaw and head yaw<br />
|-<br />
| Mode<br />
| Byte<br />
| <br />
|-<br />
| On ground<br />
| Boolean<br />
| Specifies if the player is considered on the ground. Note that proxies or hacked clients could fake this to always be true, so it should not be taken for granted.<br />
|-<br />
| Riding runtime entity id<br />
| Float<br />
| The runtime ID of the entity that the player might currently be riding. If not riding, this should be left 0.<br />
|-<br />
| Teleportation cause<br />
| VarLong<br />
| See below. Only needs to exist if Mode cause is 2 (teleport).<br />
|-<br />
| Entity type<br />
| Byte<br />
| Only needs to exist if Mode cause is 2 (teleport).<br />
|}<br />
<br />
Modes:<br />
{| class="wikitable"<br />
! ID<br />
! Mode<br />
|-<br />
| 0<br />
| Normal<br />
|-<br />
| 1<br />
| Reset<br />
|-<br />
| 2<br />
| Teleport<br />
|-<br />
| 3<br />
| Rotation<br />
|}<br />
<br />
Teleportation causes:<br />
{| class="wikitable"<br />
! ID<br />
! Cause<br />
|-<br />
| 0<br />
| Unknown<br />
|-<br />
| 1<br />
| Projectile<br />
|-<br />
| 2<br />
| Chorus fruit<br />
|-<br />
| 3<br />
| Command<br />
|-<br />
| 4<br />
| Behavior<br />
|}<br />
<br />
<br />
<br />
==== Rider Jump ====<br />
<br />
Sent by the client when it jumps while riding an entity that has the WASDControlled entity flag set, for example when riding a horse. According to MiNET this can also be sent from the server to the client, but details on this are unknown.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x14<br />
|rowspan="1"| Server & Client<br />
| Jump Strength<br />
| SignedVarInt<br />
| The strength of the jump, depending on how long the rider has held the jump button.<br />
|}<br />
<br />
<br />
<br />
==== Update Block ====<br />
<br />
Sent by the server to update a block client-side, without resending the entire chunk that the block is located in. It is particularly useful for small modifications like block breaking/placing.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x15<br />
|rowspan="4"| Client<br />
| Coordinates<br />
| BlockCoordinates<br />
| The block position at which a block is updated.<br />
|-<br />
| Block Runtime ID<br />
| VarInt<br />
| The runtime ID of the block that is placed at Position after sending the packet to the client. The runtime ID must point to a block sent in the list in the Start Game packet.<br />
|-<br />
| Flags<br />
| VarInt<br />
| See below. Flags is a combination of flags that specify the way the block is updated client-side. It is a combination of the flags below, but typically sending only the Network flag is sufficient.<br />
|-<br />
| Layer<br />
| VarInt<br />
| The world layer on which the block is updated. In Bedrock, multiple blocks can be put in the same location using layers. The second layer is usually used for liquids, so blocks can be inside a liquid. For most blocks, this is the first layer, as that layer is the default layer to place blocks on, but for blocks inside of each other, this differs. As this system is designed with liquids, there may be bugs when using this to place blocks inside each other. For example, placing an interactable block such as an item frame on the second layer can cause a game crash if the player tries to interact with it.<br />
|}<br />
<br />
{| class="wikitable"<br />
|-<br />
! Field<br />
! Bit<br />
! Notes<br />
|-<br />
| Neighbors<br />
| 0x01<br />
| <br />
|-<br />
| Network<br />
| 0x02<br />
|<br />
|-<br />
| No Graphic<br />
| 0x04<br />
|<br />
|-<br />
| Priority<br />
| 0x08<br />
|<br />
|}<br />
<br />
<br />
<br />
==== Add Painting ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x16<br />
|rowspan="5"| Client<br />
| Unique Entity Id<br />
| SignedVarLong<br />
| The unique ID of the entity. The unique ID is a value that remains consistent across different sessions of the same world, but most unofficial servers simply fill the runtime ID of the entity out for this field.<br />
|-<br />
| Runtime Entity Id<br />
| VarLong<br />
| The runtime ID of the entity. The runtime ID is unique for each world session, and entities are generally identified in packets using this runtime ID.<br />
|-<br />
| Position<br />
| Vector3<br />
| The position to spawn the entity at. If the entity is at a distance that the player cannot see, the entity will still show up if the player moves closer.<br />
|-<br />
| Direction<br />
| SignedVarInt<br />
| The facing direction of the painting. See below.<br />
|-<br />
| Name<br />
| String<br />
| This is the name of the painting (e.g. BurningSkull). See below.<br />
|}<br />
<br />
Valid facing values:<br />
* 0 - Facing towards positive Z (south)<br />
* 1 - Facing towards negative X (west)<br />
* 2 - Facing towards negative Z (north)<br />
* 3 - Facing towards positive X (east)<br />
<br />
Valid name values:<br />
* Kebab<br />
* Aztec<br />
* Alban<br />
* Aztec<br />
* Aztec2<br />
* Bomb<br />
* Plant<br />
* Wasteland<br />
* Wanderer<br />
* Graham<br />
* Pool<br />
* Courbet<br />
* Sunset<br />
* Sea<br />
* Creebet<br />
* Match<br />
* Bust<br />
* Stage<br />
* Void<br />
* SkullAndRoses<br />
* Wither<br />
* Fighters<br />
* Skeleton<br />
* DonkeyKong<br />
* PoInter<br />
* Pigscene<br />
* BurningSkull<br />
<br />
<br />
<br />
==== Tick Sync ====<br />
<br />
Sent by the client and the server to maintain a synchronized, server-authoritative tick between the client and the server. The client sends this packet first, and the server should reply with another one of these packets, including the response time.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x17<br />
|rowspan="2"| Server & Client<br />
| Request Timestamp<br />
| Long<br />
| <br />
|-<br />
| Response Timestamp<br />
| Long<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Level Sound Event (1) ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="6"| 0x18<br />
|rowspan="6"| Server & Client<br />
| Sound ID<br />
| Byte<br />
| <br />
|-<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| Block Id<br />
| SignedVarInt<br />
| <br />
|-<br />
| Entity Type<br />
| SignedVarInt<br />
| <br />
|-<br />
| Is baby mob<br />
| Boolean<br />
| <br />
|-<br />
| Is global<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Level Event ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x19<br />
|rowspan="3"| Client<br />
| Event ID<br />
| SignedVarInt<br />
| <br />
|-<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| Data<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Block Event ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x1A<br />
|rowspan="3"| Client<br />
| Block Position<br />
| BlockCoordinates<br />
| <br />
|-<br />
| Event Type<br />
| SignedVarInt<br />
| <br />
|-<br />
| Event Data<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Entity Event ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x1B<br />
|rowspan="3"| Server & Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Event ID<br />
| Byte<br />
| See [[/Entity Events|Bedrock Protocol/Entity Events]]<br />
|-<br />
| Data<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Mob Effect ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="6"| 0x1C<br />
|rowspan="6"| Client<br />
| Runtime entity id<br />
| VarLong<br />
| <br />
|-<br />
| Event<br />
| Byte<br />
| <br />
|-<br />
| Effect id<br />
| SignedVarInt<br />
| See the Bedrock Edition section of {{Minecraft Wiki|Status effect#Effect_IDs}}<br />
|-<br />
| Amplifier<br />
| SignedVarInt<br />
| <br />
|-<br />
| Particles<br />
| Boolean<br />
| If true, effect particles are not shown<br />
|-<br />
| Duration<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
Events:<br />
* 0: None<br />
* 1: Add<br />
* 2: Modify<br />
* 3: Remove<br />
<br />
==== Update Attributes ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x1D<br />
|rowspan="2"| Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Attributes<br />
| PlayerAttributes<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Inventory Transaction ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x1E<br />
|rowspan="1"| Server & Client<br />
| Transaction<br />
| Transaction<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Mob Equipment ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x1F<br />
|rowspan="5"| Server & Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Item<br />
| Item<br />
| <br />
|-<br />
| Slot<br />
| Byte<br />
| <br />
|-<br />
| Selected Slot<br />
| Byte<br />
| <br />
|-<br />
| Windows Id<br />
| Byte<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Mob Armor Equipment ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x20<br />
|rowspan="5"| Server & Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Helmet<br />
| Item<br />
| <br />
|-<br />
| Chestplate<br />
| Item<br />
| <br />
|-<br />
| Leggings<br />
| Item<br />
| <br />
|-<br />
| Boots<br />
| Item<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Interact ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x21<br />
|rowspan="2"| Server & Client<br />
| Action ID<br />
| Byte<br />
| <br />
|-<br />
| Target Runtime Entity ID<br />
| VarLong<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Block Pick Request ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x22<br />
|rowspan="5"| Server<br />
| Block Position X<br />
| SignedVarInt<br />
| <br />
|-<br />
| Block Position Y<br />
| SignedVarInt<br />
| <br />
|-<br />
| Block Position Z<br />
| SignedVarInt<br />
| <br />
|-<br />
| Add User Data<br />
| bool<br />
| Whether there should be NBT data in the picked block (activated by pressing Ctrl on default keyboard controls)<br />
|-<br />
| Hotbar Slot<br />
| Byte<br />
| <br />
|}<br />
<br />
The Bedrock client sends the position of the block. It expects the server to decide the block to pick and add it to the inventory or switch the hotbar slot if needed.<br />
<br />
<br />
<br />
==== Entity Pick Request ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x23<br />
|rowspan="2"| Server<br />
| Runtime Entity ID<br />
| Unsigned Long<br />
| <br />
|-<br />
| Hotbar Slot<br />
| Byte<br />
| The held hotbar slot of the player at the time of trying to pick the entity. If empty, the resulting spawn egg will be put into this slot.<br />
|}<br />
<br />
<br />
<br />
==== Player Action ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x24<br />
|rowspan="4"| Server<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Action ID<br />
| SignedVarInt<br />
| <br />
|-<br />
| Coordinates<br />
| BlockCoordinates<br />
| <br />
|-<br />
| Face<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Entity Fall ====<br />
<br />
Sent by the client when it falls from a distance onto a block that would damage the player.<br />
<br />
This packet should not be used at all by the server, as it can easily be spoofed using a proxy or custom client. Servers should implement fall damage using their own calculations.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x25<br />
|rowspan="3"| Server<br />
| Runtime Entity Id<br />
| VarLong<br />
| <br />
|-<br />
| Fall Distance<br />
| Float<br />
| The distance that the entity fell until it hit the ground. The damage would otherwise be calculated using this field.<br />
|-<br />
| In Void<br />
| Boolean<br />
| Specifies if the fall was in the void. The player can't fall below roughly Y=-40.<br />
|}<br />
<br />
<br />
<br />
==== Hurt Armor ====<br />
<br />
Sent by the server to damage the player's armor after being hit. <br />
<br />
The packet should never be used by servers as it hands the responsibility over to the player completely, while the server can easily and reliably update the armor damage of players itself.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x26<br />
|rowspan="1"| Client<br />
| Health<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Entity Data ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x27<br />
|rowspan="2"| Server & Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Metadata<br />
| MetadataDictionary<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Entity Motion ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x28<br />
|rowspan="4"| Server & Client<br />
| Runtime Entity Id<br />
| VarLong<br />
| <br />
|-<br />
| Motion X<br />
| Vector3<br />
| <br />
|-<br />
| Motion Y<br />
| Float<br />
| <br />
|-<br />
| Motion Z<br />
| Float<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Entity Link ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x29<br />
|rowspan="4"| Client<br />
| Ridden ID<br />
| SignedVarLong<br />
| <br />
|-<br />
| Rider ID<br />
| SignedVarLong<br />
| <br />
|-<br />
| Link Type<br />
| Byte<br />
| <br />
|-<br />
| Unknown<br />
| Byte<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Health ====<br />
<br />
Sent by the server to set the health of the player it is sent to.<br />
<br />
This packet should no longer be used. Instead, the health attribute should be used so that the health and maximum health may be changed directly.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x2A<br />
|rowspan="1"| Client<br />
| Health<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Spawn Position ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x2B<br />
|rowspan="5"| Client<br />
| Spawn Type<br />
| SignedVarInt<br />
| <br />
|-<br />
| Block Position<br />
| BlockCoordinates<br />
| the new position of the spawn that was set. If spawnType is WORLD_SPAWN, compasses will point to this position. As of 1.16, blockPosition is always the position of the player.<br />
|-<br />
| Dimension ID<br />
| Int<br />
|<br />
|-<br />
| Spawn Position<br />
| Vector3<br />
| Default -2147483648, -2147483648, -2147483648<br />
|-<br />
| Forced<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Animate ====<br />
<br />
Sent by the server to send a player animation from one player to all viewers of that player. <br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x2C<br />
|rowspan="2"| Server & Client<br />
| Action ID<br />
| SignedVarInt<br />
| <br />
|-<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Respawn ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x2D<br />
|rowspan="3"| Server & Client<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| State<br />
| Byte<br />
| <br />
|-<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|}<br />
<br />
States:<br />
{| class="wikitable"<br />
! ID<br />
! Name<br />
|-<br />
| 0<br />
| Server Searching<br />
|-<br />
| 1<br />
| Server Ready<br />
|-<br />
| 2<br />
| Client Ready<br />
|}<br />
<br />
==== Container Open ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x2E<br />
|rowspan="4"| Client<br />
| Window Id<br />
| Byte<br />
| <br />
|-<br />
| Type<br />
| Byte<br />
| <br />
|-<br />
| Block Position<br />
| BlockCoordinates<br />
| <br />
|-<br />
| Unique Entity Id<br />
| SignedVarLong<br />
| <br />
|}<br />
<br />
Bedrock needs either a valid block position, with an actual block at that position, or an entity ID for this to work. The entity must have CONTAINER_BASE_SIZE metadata, or the block must be a container. The entity ID is used for minecart chests etc. but any entity will work. If the entity has NAMETAG metadata this will be used as the container name.<br />
<br />
<br />
<br />
==== Container Close ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x2F<br />
|rowspan="1"| Server & Client<br />
| Window Id<br />
| Byte<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Player Hotbar ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x30<br />
|rowspan="3"| Server & Client<br />
| Selected Hotbar Slot<br />
| VarInt<br />
| <br />
|-<br />
| Container Id<br />
| Byte<br />
| <br />
|-<br />
| Select Hotbar Slot<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Inventory Content ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x31<br />
|rowspan="2"| Server & Client<br />
| Inventory Id<br />
| VarInt<br />
| <br />
|-<br />
| Input<br />
| ItemStacks<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Inventory Slot ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x32<br />
|rowspan="3"| Server & Client<br />
| Inventory Id<br />
| VarInt<br />
| <br />
|-<br />
| Slot<br />
| VarInt<br />
| <br />
|-<br />
| Item<br />
| Item<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Container Set Data ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x33<br />
|rowspan="3"| Client<br />
| Window Id<br />
| Byte<br />
| <br />
|-<br />
| Property<br />
| SignedVarInt<br />
| <br />
|-<br />
| Value<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Crafting Data ====<br />
<br />
Since 1.16.200, each recipe must have a unique network ID. Otherwise, the client will crash.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x34<br />
|rowspan="4"| Client<br />
| Recipes<br />
| Recipes<br />
| <br />
|-<br />
| Potion type recipes<br />
| PotionTypeRecipe[]<br />
| <br />
|-<br />
| potion container recipes<br />
| PotionContainerChangeRecipe[]<br />
| <br />
|-<br />
| Is Clean<br />
| Boolean<br />
| <br />
|}<br />
<br />
==== Crafting Event ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x35<br />
|rowspan="5"| Server & Client<br />
| Window ID<br />
| Byte<br />
| <br />
|-<br />
| Recipe Type<br />
| SignedVarInt<br />
| <br />
|-<br />
| Recipe ID<br />
| UUID<br />
| <br />
|-<br />
| Input<br />
| ItemStacks<br />
| <br />
|-<br />
| Result<br />
| ItemStacks<br />
| <br />
|}<br />
<br />
<br />
<br />
==== GUI Data Pick Item ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x36<br />
|rowspan="4"| Client<br />
|-<br />
| Item name<br />
| String<br />
| The name of the item that shows up in the top part of the popup that shows up when selecting an item. It is shown as if an item was selected by the player itself.<br />
|-<br />
| Item effects<br />
| String<br />
| The line under the Item name, where the effects of the item are usually situated.<br />
|-<br />
| Hotbar Slot<br />
| int<br />
| The hot bar slot to be selected/picked. This does not currently work, so it does not matter what number this is.<br />
|}<br />
<br />
Sent by the server to make the client 'select' a hotbar slot. It currently appears to be broken however, and does not actually set the selected slot to the hotbar slot set in the packet.<br />
<br />
<br />
<br />
==== Adventure Settings ====<br />
<br />
Sent by the server to update gameplay related features, in particular permissions to access these features for the client.<br />
<br />
It includes allowing the player to fly, build, and mine and attack entities. Most of these flags should be checked server-side instead of using this packet only.<br />
<br />
The client my also send this packet to the server when it updates one of these settings through the in-game settings interface. The server should verify if the player actually has permission to update these settings.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="6"| 0x37<br />
|rowspan="6"| Server & Client<br />
| Flags<br />
| VarInt<br />
| <br />
|-<br />
| Command permission<br />
| VarInt<br />
| <br />
|-<br />
| Action permissions<br />
| VarInt<br />
| <br />
|-<br />
| Permission level<br />
| VarInt<br />
| <br />
|-<br />
| Custom stored permissions<br />
| VarInt<br />
| <br />
|-<br />
| User Id<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Block Entity Data ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x38<br />
|rowspan="2"| Server & Client<br />
| Coordinates<br />
| BlockCoordinates<br />
| <br />
|-<br />
| NamedTag<br />
| NBT<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Player Input ====<br />
<br />
Sent by the client when the player is moving but the server does not allow it to update its movement using the [[#Move Player|Move Player]] packet. It includes situations where the player is riding an entity like a boat. If this is the case, the packet is sent roughly every tick.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x39<br />
|rowspan="4"| Server<br />
| Movement<br />
| Vec2<br />
| The movement vector of the input. It should be thought of in Pocket Edition controls, where specific arrows (or a combination of two, resulting in a diagonal arrow) decide the direction of movement. The movement vector typically has a length of 1: Either it has movement on one axis, or it has a combination, resulting in sqrt(2)/2 for both axes.<br />
|-<br />
| Jumping<br />
| Boolean<br />
| Indicates if the player was pressing the jump button or not. It does not define if the player was actually in the air or not.<br />
|-<br />
| Sneaking<br />
| Boolean<br />
| Indicates the player was sneaking during the input. Note that this may also be checked by keeping the sneaking state updated using the [[#Player Action|Player Action]] packet<br />
|}<br />
<br />
<br />
<br />
==== Level Chunk ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x3A<br />
|rowspan="5"| Client<br />
| Chunk X<br />
| SignedVarInt<br />
| <br />
|-<br />
| Chunk Z<br />
| SignedVarInt<br />
| <br />
|-<br />
| Sub Chunk Count<br />
| VarInt<br />
| <br />
|-<br />
| Cache Enabled<br />
| Boolean<br />
| <br />
|-<br />
| Chunk Data<br />
| ByteArray<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Commands Enabled ====<br />
<br />
This packet is sent to the client to enable or disable the ability to execute commands. If disabled, the client itself will stop the execution of commands.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x3B<br />
|rowspan="1"| Client<br />
| Commands enabled<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Difficulty ====<br />
<br />
Sent by the server to update the client-side difficulty pf the client. The actual effect of this packet on the client isn't very significant, as the difficulty is handled server-side.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x3C<br />
|rowspan="1"| Client<br />
| Difficulty<br />
| VarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Change Dimension ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x3D<br />
|rowspan="5"| Client<br />
| Dimension<br />
| SignedVarInt<br />
| <br />
|-<br />
| Position X<br />
| Vector3<br />
| <br />
|-<br />
| Position Y<br />
| Boolean<br />
| <br />
|-<br />
| Position Z<br />
| Float<br />
| <br />
|-<br />
| Respawn<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Player Game Type ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x3E<br />
|rowspan="1"| Server & Client<br />
| Game mode<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Player List ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x3F<br />
|rowspan="1"| Client<br />
| Records<br />
| PlayerRecords<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Simple Event ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x40<br />
|rowspan="1"| Client<br />
| Event Type<br />
| Unsigned Short<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Event ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x41<br />
|rowspan="3"| Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Event data<br />
| SignedVarInt<br />
| <br />
|-<br />
| Event type<br />
| Byte<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Spawn Experience Orb ====<br />
<br />
Sent by the server to spawn an experience orb entity client-side. <br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x42<br />
|rowspan="2"| Client<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| Count<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Map Item Data ====<br />
<br />
Sent by the server to update the data of a map shown to the client. It is sent with a combination of flags that specify what data is updated.<br />
<br />
The packet may be used to update specific parts of the map only. It is not required to send the entire map each time when updating one part.<br />
<br />
TODO<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x43<br />
|rowspan="1"| Client<br />
| Map ID<br />
| VarLong<br />
| The unique identifier that represents the map that is updated over network. It remains consitent across sesions.<br />
|}<br />
<br />
<br />
<br />
==== Map Info Request ====<br />
<br />
Sent by the client to request the server to deliver information of a certain map in the inventory of the player. The serve should respond with a [[#Map Item Data|Map Item Data]] packet.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x44<br />
|rowspan="1"| Server & Client<br />
| Unique Map Id<br />
| SignedVarLong<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Request Chunk Radius ====<br />
<br />
Sent by the client to update the server on the chunk view radius that it has set in the settings. The server may respond with a [[#Chunk Radius Updated|Chunk Radius Updated]] packet with either the radius requested, or a different chunk radius if the server chooses so.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x45<br />
|rowspan="1"| Server & Client<br />
| Chunk radius<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Chunk Radius Updated ====<br />
<br />
Sent by the server in response to a [[#Request Chunk Radius|Request Chunk Radius]] packet. It defines the radius that the server allows the client to have. This may be lower than the chunk radius requested by the client.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x46<br />
|rowspan="1"| Client<br />
| Chunk radius<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== ItemFrame Drop Item ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x47<br />
|rowspan="1"| Server & Client<br />
| Block Position<br />
| BlockCoordinates<br />
|<br />
|}<br />
<br />
==== Game Rules Changed ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x48<br />
|rowspan="1"| Client<br />
| Rules<br />
| GameRules<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Camera ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x49<br />
|rowspan="2"| Client<br />
| Camera Unique Entity Id<br />
| SignedVarLong<br />
| <br />
|-<br />
| Player Unique Entity Id<br />
| SignedVarLong<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Boss Event ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x4A<br />
|rowspan="2"| Client<br />
| Boss Entity ID<br />
| SignedVarLong<br />
| <br />
|-<br />
| Event Type<br />
| VarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Show Credits ====<br />
<br />
Sent by the server to show the Minecraft credits screen to the client. It is typically when the player beats the ender dragon and leaves the End.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x4B<br />
|rowspan="2"| Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Status<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
Statuses:<br />
{| class="wikitable"<br />
! ID<br />
! Name<br />
|-<br />
| 0<br />
| Start Credits<br />
|-<br />
| 1<br />
| End Credits<br />
|}<br />
<br />
<br />
==== Available Commands ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x4C<br />
|rowspan="1"| Client<br />
|colspan="3" | This packet has no data.<br />
|}<br />
<br />
==== Command Request ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x4D<br />
|rowspan="5"| Server<br />
| Command<br />
| String<br />
| <br />
|-<br />
| Command type<br />
| VarInt<br />
| <br />
|-<br />
| Unknown UUID<br />
| UUID<br />
| <br />
|-<br />
| Request ID<br />
| String<br />
| <br />
|-<br />
| Unknown<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== CommandBlock Update ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x4E<br />
|rowspan="1"| Server<br />
| Is Block<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Command Output ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x4F<br />
|rowspan="1"| Client<br />
|colspan="3" | This packet has no data.<br />
|}<br />
<br />
==== Update Trade ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="10"| 0x50<br />
|rowspan="10"| Client<br />
| Window ID<br />
| Byte<br />
| <br />
|-<br />
| Window Type<br />
| Byte<br />
| <br />
|-<br />
| Unknown0<br />
| VarInt<br />
| <br />
|-<br />
| Unknown1<br />
| VarInt<br />
| <br />
|-<br />
| Unknown2<br />
| VarInt<br />
| <br />
|-<br />
| Is Willing<br />
| Boolean<br />
| <br />
|-<br />
| Trader Entity ID<br />
| SignedVarLong<br />
| <br />
|-<br />
| Player Entity ID<br />
| SignedVarLong<br />
| <br />
|-<br />
| Display Name<br />
| String<br />
| <br />
|-<br />
| NamedTag<br />
| NBT<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Update Equip ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x51<br />
|rowspan="5"| Client<br />
| Window ID<br />
| Byte<br />
| <br />
|-<br />
| Window Type<br />
| Byte<br />
| <br />
|-<br />
| Unknown<br />
| Byte<br />
| <br />
|-<br />
| Entity ID<br />
| SignedVarLong<br />
| <br />
|-<br />
| NamedTag<br />
| NBT<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Resource Pack Data Info ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="7"| 0x52<br />
|rowspan="7"| Client<br />
| Package ID<br />
| String<br />
| <br />
|-<br />
| Max Chunk Size<br />
| Unsigned Int<br />
| <br />
|-<br />
| Chunk Count<br />
| Unsigned Int<br />
| <br />
|-<br />
| Compressed Package Size<br />
| Unsigned Long<br />
| <br />
|-<br />
| Hash<br />
| ByteArray<br />
| <br />
|-<br />
| Is Premium<br />
| Boolean<br />
| <br />
|-<br />
| Pack Type<br />
| Byte<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Resource Pack Chunk Data ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x53<br />
|rowspan="4"| Client<br />
| Package ID<br />
| String<br />
| <br />
|-<br />
| Chunk Index<br />
| Unsigned Int<br />
| <br />
|-<br />
| Progress<br />
| Unsigned Long<br />
| <br />
|-<br />
| Payload<br />
| ByteArray<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Resource Pack Chunk Request ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x54<br />
|rowspan="2"| Server<br />
| Package ID<br />
| String<br />
| <br />
|-<br />
| Chunk Index<br />
| Unsigned Int<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Transfer ====<br />
<br />
Sent by the server to transfer a player from the current server to another. Doing so will fully disconnect the client, bring it back to the main menu and make it connect to the next server.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x55<br />
|rowspan="2"| Client<br />
| Address<br />
| String<br />
| <br />
|-<br />
| Port<br />
| Unsigned Short<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Play Sound ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x56<br />
|rowspan="4"| Client<br />
| Sound name<br />
| String<br />
| <br />
|-<br />
| Sound position<br />
| Position<br />
| <br />
|-<br />
| Volume<br />
| Float<br />
| <br />
|-<br />
| Pitch<br />
| Float<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Stop Sound ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x57<br />
|rowspan="2"| Client<br />
| Sound Name<br />
| String<br />
| <br />
|-<br />
| Stopping All Sound<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Title ====<br />
<br />
Sent by the server to make a title, subtitle or action bar shown to a player. It has several fields that allow setting the duration of the titles.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x58<br />
|rowspan="5"| Client<br />
| Type<br />
| SignedVarInt<br />
| <br />
|-<br />
| Text<br />
| String<br />
| <br />
|-<br />
| Fade In Time<br />
| SignedVarInt<br />
| <br />
|-<br />
| Stay Time<br />
| SignedVarInt<br />
| <br />
|-<br />
| Fade Out Time<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Add Behavior Tree ====<br />
<br />
Sent by the server. Its usage remains unknown, as behavior packs are typically all sent at the start of the game.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x59<br />
|rowspan="1"| Client<br />
| Behavior Tree JSON<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Structure Block Update ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x5A<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== Show Store Offer ====<br />
<br />
Sent by the server to show a Marketplace store offer to a player. It opens a window client-side that displays the item.<br />
<br />
The packet only works on partnered servers: Servers that are not partnered will not have a store button show up on the in-game pause menu and will, as a result, not be able to open store offers on the client side. Sending the packet does therefore not work when using a proxy that is connected to with the domain of one of the partnered servers.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x5B<br />
|rowspan="2"| Client<br />
| Offer Id<br />
| String<br />
| <br />
|-<br />
| Shown To All<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Purchase Receipt ====<br />
<br />
Sent by the client to notify the server it purchased an item from the marketplace store that was offered by the server.<br />
<br />
The packet is only used for partnered servers.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x5C<br />
|rowspan="1"| Server<br />
<br />
|}<br />
<br />
<br />
<br />
==== Player Skin ====<br />
<br />
Sent by the client when it updates its own skin using the in-game skin picker. It is relayed by the server, or sent if the server changes the skin of a player on its own accord. <br />
<br />
Note that the packet can only be sent for players that are in the player list at the time of sending.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x5D<br />
|rowspan="4"| Server & Client<br />
| UUID<br />
| UUID<br />
| <br />
|-<br />
| Skin<br />
| Skin<br />
| <br />
|-<br />
| Skin Name<br />
| String<br />
| <br />
|-<br />
| Old Skin Name<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Sub Client Login ====<br />
<br />
Sent when an additional player attempts to join from a split screen session. The contents of the chain data and skin data fields use the same format as the [[#Login|Login]] packet, and can be decoded the same way.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x5E<br />
|rowspan="2"| Server<br />
| Chain data<br />
| JSON array of JWT Data<br />
| Contains the display name, UUID and XUID<br />
|-<br />
| Skin data<br />
| JWT Data<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Automation Client Connect ====<br />
<br />
Sent by the server to make the client connect to a websocket server. This websocket server has the ability to execute commands on the behalf of the client and it canlisten for certain events fired by the client.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x5F<br />
|rowspan="1"| Client<br />
| Address<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Last Hurt By ====<br />
<br />
Sent by the server to let the client know what entity type it was last hurt by. At this moment, the packet is useless and should not be used. <br />
There is no behaviour that depends on if this packet is sent or not.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x60<br />
|rowspan="1"| Client<br />
| Entity Type Id<br />
| VarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Book Edit ====<br />
<br />
Sent by the client when it edits a book. It is sent each time a modification was made and the player stops its typing 'session', rather than simply after closing the book.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x61<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== NPC Request ====<br />
<br />
Sent by the client when it interacts with an NPC.<br />
<br />
The packet is specifically for Education Edition, where NPCs are available to use. It has no use in the base game.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x62<br />
|rowspan="4"| Server & Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Unknown0<br />
| Byte<br />
| <br />
|-<br />
| Unknown1<br />
| String<br />
| <br />
|-<br />
| Unknown2<br />
| Byte<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Photo Transfer ====<br />
<br />
Sent by the server to transfer a photo (image) file to the client. It is typically used to transfer photos so that the client can display it in a portfolio in Education Edition.<br />
<br />
While previously usable in the base game, the displaying of photos in books was disabled and the packet has little use anymore.<br />
<br />
The packet is specifically for Education Edition. It has no use in the base game.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x63<br />
|rowspan="3"| Server<br />
| File name<br />
| String<br />
| <br />
|-<br />
| Image data<br />
| String<br />
| <br />
|-<br />
| Unknown2<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Model Form Request ====<br />
<br />
Sent by the server to make the client open a form.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x64<br />
|rowspan="2"| Client<br />
| Form Id<br />
| VarInt<br />
| <br />
|-<br />
| Form Data<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Model Form Response ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x65<br />
|rowspan="2"| Server<br />
| Form Id<br />
| VarInt<br />
| <br />
|-<br />
| Form Data<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Server Settings Request ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x66<br />
|rowspan="1"| Server<br />
<br />
|}<br />
<br />
<br />
<br />
==== Server Settings Response ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x67<br />
|rowspan="2"| Client<br />
| Form Id<br />
| VarLong<br />
| <br />
|-<br />
| Form Data<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Show Profile ====<br />
<br />
Sent by the server to show the Xbox Live profile of one player to another.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x68<br />
|rowspan="1"| Client<br />
| Xuid<br />
| String<br />
| If the XUID is invalid, the client ignores the packet<br />
|}<br />
<br />
<br />
<br />
==== Set Default Game Type ====<br />
<br />
Sent by the client when it toggles the default game type in the settings UI, and is sent by the server when it actually changes the default game type, resulting in the toggle being changed in the settings UI.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x69<br />
|rowspan="1"| Client<br />
| Game mode<br />
| VarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Remove Objective ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x6A<br />
|rowspan="1"| Client<br />
| Objective Id<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Display Objective ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x6B<br />
|rowspan="5"| Client<br />
| Display Slot<br />
| String<br />
| <br />
|-<br />
| Objective Id<br />
| String<br />
| <br />
|-<br />
| Display Name<br />
| String<br />
| <br />
|-<br />
| Criteria<br />
| String<br />
| <br />
|-<br />
| Sort Order<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Score ====<br />
<br />
Sent by the server to send the contents of a scoreboard to the player. It may be used to either add, remove or edit entries on the scoreboard.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x6C<br />
|rowspan="2"| Client<br />
| Action<br />
| byte<br />
| 0 (Add), 1 (Remove)<br />
|-<br />
| Entries<br />
| ScoreEntries<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Lab Table ====<br />
<br />
Sent by the client to let the server know it started a chemical reaction in Education Edition, and is sent by the server to allow other clients to show the effects.<br />
<br />
This packet is only functional if Education features are enabled.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x6D<br />
|rowspan="5"| Server & Client<br />
| Unknown Byte 0<br />
| Byte<br />
| <br />
|-<br />
| Block Entity Position X<br />
| VarInt<br />
| <br />
|-<br />
| Block Entity Position Y<br />
| VarInt<br />
| <br />
|-<br />
| Block Entity Position Z<br />
| VarInt<br />
| <br />
|-<br />
| Reaction Type<br />
| Byte<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Update Block Synced ====<br />
<br />
Sent by the server to synchronize the falling of a falling block entity with the transitioning back and forth from and to a solid block. It is used to prevent the entity from flickering, and is used in places such as the pushing of blocks with pistons.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="6"| 0x6E<br />
|rowspan="6"| Client<br />
| Coordinates<br />
| BlockCoordinates<br />
| <br />
|-<br />
| Block Runtime ID<br />
| VarInt<br />
| <br />
|-<br />
| Block Priority<br />
| VarInt<br />
| <br />
|-<br />
| Data Layer ID<br />
| VarInt<br />
| <br />
|-<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Block Synced Type<br />
| VarLong<br />
| 0 - None, 1 - Create, 2 - Destroy<br />
|}<br />
<br />
==== Move Entity Delta ====<br />
<br />
Sent by the server to move an entity by a given delta. The packet is specifically optimized to save as much space as possible, by only writing non-zero fields.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x6F<br />
|rowspan="2"| Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Flags<br />
| Unsigned Short<br />
| <br />
|}<br />
<br />
Flags<br />
{| class="wikitable"<br />
! Field<br />
! Bit<br />
|-<br />
| HAS_X<br />
| 0x01<br />
|-<br />
| HAS_Y<br />
| 0x02<br />
|-<br />
| HAS_Z<br />
| 0x4<br />
|-<br />
| HAS_PITCH<br />
| 0x8<br />
|-<br />
| HAS_YAW<br />
| 0x10<br />
|-<br />
| HAS_ROLL<br />
| 0x20<br />
|}<br />
<br />
<br />
<br />
==== Set Scoreboard Identity ====<br />
<br />
Sent by the server to change the identity type of one of the entries on a scoreboard. This is used to change, for example, an entry pointing to a player, to a fake player when it leaves the server, and to change it back to a real player when it joins again.<br />
<br />
In non-vanilla situations, this packet is quite useless.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x70<br />
|rowspan="2"| Client<br />
| Action<br />
| byte<br />
| 0 (Add), 1 (Remove)<br />
|-<br />
| Entries<br />
| ScoreboardIdentityEntries<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Local Player As Initialized ====<br />
<br />
Sent by the client in response to a [[#Play Status||Play Status]] with the status Player Spawn (3). The packet marks the moment at which the client is fully initialized and can receive any packet without discarding it.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x71<br />
|rowspan="1"| Server<br />
| Runtime Entity Id<br />
| VarLong<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Update Soft Enum ====<br />
<br />
Sent by the server to update a soft enum, also known as a dynamic enum, previous sent in the [[#Available Commands|Available Commands]] packet. It is sent whenever the enum should get new options or when some of its options should be removed.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x72<br />
|rowspan="3"| Client<br />
|-<br />
| Enum Data<br />
| EnumData<br />
| TODO<br />
|-<br />
| Action<br />
| byte<br />
| 0 (Add), 1 (Remove), 2 (Update)<br />
|}<br />
<br />
<br />
<br />
==== Network Stack Latency ====<br />
<br />
Sent by the server (and the client, on development builds) to measure the latency over the entire Minecraft stack, rather than the RakNet latency. <br />
<br />
It has over usages too, such as the ability to be used as some kind of acknowledgement packet, to know when the client has received a certain other packet.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x73<br />
|rowspan="2"| Server & Client<br />
| Timestamp<br />
| Unsigned Long<br />
| <br />
|-<br />
| Send Back<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Script Custom Event ====<br />
<br />
Sent by both the client and server. It is a way to let scripts communicate with the server, so that the client can let the server know it triggered an event, or the other way around.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x75<br />
|rowspan="2"| Server & Client<br />
| Event Name<br />
| String<br />
| <br />
|-<br />
| Data<br />
| String<br />
| Typically a JSON encoded string that the script is able to encode and decode too<br />
|}<br />
<br />
<br />
<br />
==== Spawn Particle Effect ====<br />
<br />
Sent by the server to spawn a particle effect client-side. Unlike other packets that result in the appearing of particles, this packet can show particles that are not hardcoded in the client. They can be added and changed through behavior packs to implement custom particles.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x76<br />
|rowspan="4"| Client<br />
| Dimension Id<br />
| Byte<br />
| <br />
|-<br />
| Unique Entity Id<br />
| SignedVarLong<br />
| <br />
|-<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| Identifier<br />
| String<br />
| The name of the particle<br />
|}<br />
<br />
<br />
<br />
==== Available Entity Identifiers ====<br />
<br />
Sent by the server at the start of the game to let the client know all entities that are on the server.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x77<br />
|rowspan="1"| Client<br />
| NamedTag<br />
| NBT<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Level Sound Event (2) ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="6"| 0x78<br />
|rowspan="6"| Server & Client<br />
| Sound ID<br />
| Byte<br />
| <br />
|-<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| Block Id<br />
| SignedVarInt<br />
| <br />
|-<br />
| Entity Type<br />
| String<br />
| <br />
|-<br />
| Is baby mob<br />
| Boolean<br />
| <br />
|-<br />
| Is global<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Network Chunk Publisher Update ====<br />
<br />
Sent by the server to change the point around which chunks are and remain loaded. <br />
<br />
This is useful for minigame servers, where only one area is ever loaded, in which case the [[#Network Chunk Publisher|Network Chunk Publisher]] packet can be sent in the middle of it, so that no chunks ever need to be additionally sent during the course of the game.<br />
<br />
In reality, the packet is not extraordinarily useful, and most servers just sent it constantly at the position of the player. <br />
<br />
If the packet is not sent at all, no chunk will be shown to the player, regardless of where they are sent.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x79<br />
|rowspan="2"| Client<br />
| Coordinates<br />
| BlockCoordinates<br />
| <br />
|-<br />
| Radius<br />
| VarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Biome Definition List ====<br />
<br />
Sent by the server to let the client know all biomes that are available and implemented on the server side.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x7A<br />
|rowspan="1"| Client<br />
| NamedTag<br />
| NBT<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Level Sound Event (3) ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="6"| 0x7B<br />
|rowspan="6"| Server & Client<br />
| Sound ID<br />
| VarInt<br />
| <br />
|-<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| Block Id<br />
| SignedVarInt<br />
| <br />
|-<br />
| Entity Type<br />
| String<br />
| <br />
|-<br />
| Is baby mob<br />
| Boolean<br />
| <br />
|-<br />
| Is global<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Level Event Generic ====<br />
<br />
Sent by the server to send a 'generic' level event to the client. This packet sends an NBT serialized object and may for that reason be used for any event holding additional data.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x7C<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== Lectern Update ====<br />
<br />
Sent by the client to update the server on which page was opened in a book on a lectern, or if the book should be removed from it.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x7D<br />
|rowspan="4"| Client<br />
| Page<br />
| Byte<br />
| <br />
|-<br />
| Total Pages<br />
| Byte<br />
| <br />
|-<br />
| Block Position<br />
| Position<br />
| <br />
|-<br />
| Dropping Book<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Video Stream Connect ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x7E<br />
|rowspan="5"| Client<br />
| Server URI<br />
| String<br />
| <br />
|-<br />
| Frame Send Frequency<br />
| Float<br />
| <br />
|-<br />
| Action<br />
| Byte<br />
| <br />
|-<br />
| Resolution X<br />
| Int<br />
| <br />
|-<br />
| Resolution Y<br />
| Int<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Client Cache Status ====<br />
<br />
Sent by the client at the start of the game. It is sent to let the server know if it supports the client-side blob cache. Clients such as Nintendo Switch do not support the cache, and attempting to use it anyway will fail.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x81<br />
|rowspan="1"| Server & Client<br />
| Supported<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== On Screen Texture Animation ====<br />
<br />
Sent by the server to show a certain animation on the screen of the player.<br />
The packet is used, for example, for when a raid is triggered and a raid a defeated.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x82<br />
|rowspan="1"| Client<br />
| Animation Type<br />
| Int<br />
|}<br />
<br />
<br />
<br />
==== Map Create Locked Copy ====<br />
<br />
Sent by the server to create a locked copy of a map into another map. It is used in the cartography table to create a map that is locked and cannot be modified.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x83<br />
|rowspan="2"| Client<br />
| Original Map Id<br />
| VarLong<br />
| <br />
|-<br />
| New Map Id<br />
| VarLong<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Structure Template Data Export Request ====<br />
<br />
Sent by the client to request data of a structure.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x84<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== Structure Template Data Export Response ====<br />
<br />
Sent by the server to send data of a structure to the client in response to a [[#Structure Template Data Export Request|Structure Template Data Export Request]] packet.<br />
<br />
TODO<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x85<br />
|rowspan="1"| Client<br />
| Structure Name<br />
| String<br />
| This is the name used to export the structure to a file<br />
|}<br />
<br />
<br />
<br />
==== Update Block Properties ====<br />
<br />
Sent by the server to update the available block properties.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x86<br />
|rowspan="2"| Client<br />
| NamedTag<br />
| NBT<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Client Cache Blob Status ====<br />
<br />
Sent by the client to let the server know what blobs it already has, in an ACK type system.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x87<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== Client Cache Miss Response ====<br />
<br />
Sent by the server in response to a [[#Client Cache Blob Status|Client Cache Blob Status]] and contains the blob data of all blobs that the client acknowledged not to have yet.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x88<br />
|rowspan="1"| Client<br />
| Blobs<br />
| <br />
|<br />
|}<br />
<br />
<br />
<br />
==== Network Settings ====<br />
<br />
Sent by the server to update a variety of network settings. These settings modify the way packets are sent over the network stack.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x8F<br />
|rowspan="2"| Client<br />
| Compression threshold<br />
| Short<br />
| The maximum size of a packet this is compressed when sent. If the size of the packet is under this value, it is not compressed. When set to 0, all packets will be uncompressed.<br />
|}<br />
<br />
<br />
<br />
==== Player Auth Input ====<br />
<br />
Sent by the client to allow for server authoratative movement. It is used to synchronize the player input with the position server-side.<br />
<br />
The client sends this packet when the 'Server Authoritive Movement' field in the [[#Start Game|Start Game]] packet is set to true, instead of the [[#Move Player|Move Player]] packet. The client will send this packet once every tick.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x90<br />
|rowspan="2"| Client<br />
|}<br />
<br />
<br />
<br />
==== Creative Content ====<br />
<br />
Sent by the server to set the creative inventory's content for a player.<br />
<br />
Introduced in 1.16, this packet replaces the previous method of sending an [[#Inventory Content|Inventory Content]] packet with the creative inventory window ID. <b>This packet must be sent from a server after the StartGamePacket since 1.16.100. Otherwise, the client will crash!</b><br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x91<br />
|rowspan="2"| Client<br />
|}<br />
<br />
==== Player Enchant Options ====<br />
<br />
Sent by the server to update the enchantment options displayed when the user opens the enchantment table and puts an item in.<br />
<br />
This packet was added in 1.16 and allows the server to decide on the enchantment that can be selected by a player. The player should be sent once for every slot update of the enchantment table. The vanilla server sends an empty packet when the player first opens the enchantment table (air is is present in the enchantment table slot) and sends a packet with actual enchantments in it when items are put in that can have enchantments.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x92<br />
|rowspan="2"| Client<br />
|}<br />
<br />
<br />
<br />
==== Item Stack Request ====<br />
<br />
Sent by the client to change item stacks in an inventory. <br />
<br />
Added in 1.16, is essentially a replacement of the [[#Inventory Transaction|Inventory Transaction]] packet for inventory specific actions, such as moving items around or crafting.<br />
<br />
The [[#Inventory Transaction|Inventory Transaction]] packet is still used for actions such as placing blocks and interacting with entities.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x93<br />
|rowspan="2"| Client<br />
|}<br />
<br />
<br />
<br />
==== Item Stack Response ====<br />
<br />
Sent by the server in response to an [[#Item Stack Request|Item Stack Request]] packet from the client.<br />
<br />
This packet is used to either approve or reject ItemStackRequests from the client. If a request is approved, the client will simply continue as normal. If rejected, the client will undo the actions so that the inventory should be in sync with the server again.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x94<br />
|rowspan="2"| Client<br />
|}<br />
<br />
<br />
<br />
==== Player Armor Damage ====<br />
<br />
Sent by the server to damage the armor of a player. It is a very efficient packet, but generally it's much easier to just send a slot update for the damaged armor.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x95<br />
|rowspan="2"| Client<br />
|}<br />
<br />
<br />
<br />
==== Code Builder ====<br />
<br />
Sent by the server to open the URL to a Code Builder (websocket) server.<br />
<br />
This packet is only used by Education Edition and have no affect on the base game.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x96<br />
|rowspan="2"| Client<br />
|}<br />
<br />
<br />
<br />
==== Update Player Game Type ====<br />
<br />
Sent by the server to change the game mode of a player. It is functionally identical to the [[#Set Player Game Type|Set Player Game Type]] packet.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x97<br />
|rowspan="2"| Client<br />
|}<br />
<br />
<br />
<br />
==== Emote List ====<br />
<br />
Sent by the client every time it joins the server and when it equips new emotes. It may be used by the server to find out which emotes the client has available. If the player has no emotes equipped, this packet is not sent.<br />
<br />
Under certain circumstances, this packet is also sent from the server to the client, but more testing is needed for this.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x98<br />
|rowspan="2"| Client<br />
|}<br />
<br />
<br />
<br />
==== Position Tracking DB Server Broadcast ====<br />
<br />
Sent by the server in response to the [[#Position Tracking DB Client Request|Position Tracking DB Client Request]] packet. Thus packet is, as of 1.16, currently only for lodestones. The server maintains a database with tracking IDS and their position and dimension. The client will request these tracking IDs, (NBT tag set on the lodestone compass with the tracking ID?) and the server will respond with the status of those tracking IDs.<br />
<br />
What is actually done with the data sent depends on what the client chooses to do with it. For the lodestone compass, it is used to make the compass point towards lodestones and to make it spin if the lodestone at a position is no longer there.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x99<br />
|rowspan="2"| Client<br />
|}<br />
<br />
<br />
<br />
==== Position Tracking DB Client Request ====<br />
<br />
Sent by the client to request the position and dimension of a 'tracking ID'. These IDs are tracked in a database by the server. In 1.16, this is used for lodestones.<br />
<br />
The client will sent this request to find the position a lodestone compass needs to point to. If found, it will point to the lodestone. If not, it will start spinning around.<br />
<br />
A [[#Position Tracking DB Server Broadcast|Position Tracking DB Server Broadcast]] packet should be sent in response to this packet.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x9a<br />
|rowspan="2"| Client<br />
|}<br />
<br />
<br />
<br />
==== Debug Info ====<br />
<br />
Sent by the server. It does not seem to do anything when sent to the normal client in 1.16;<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x9b<br />
|rowspan="2"| Client<br />
|}<br />
<br />
<br />
<br />
==== Packet Violation Warning ====<br />
<br />
Sent by the client when it receives an invalid packet from the server. It holds some information on the error that occured.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x9c<br />
|rowspan="1"| Client<br />
|}<br />
<br />
==== Item Component ====<br />
<br />
Always sent by a vanilla Bedrock server after the StartGamePacket. Sent not empty for items with data driven information.<br />
<br />
In order for the information in this packet to be used, the experiment data titled <code>data_driven_items</code> must be set to <code>true</code> in the ResourcePackStackPacket (as of 1.16.100), and the item entry in StartGamePacket must have its component toggle set to <code>true</code>.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0xA2<br />
|rowspan="2"| Client<br />
| Items<br />
| ComponentItemData[]<br />
| A list of all item components.<br />
|}<br />
<br />
ComponentItemData takes in a String identifier and an NBT CompoundTag containing item data. Valid, minimal NBT data looks like the following (Any comments are preceded with <code>//</code>):<br />
<br />
<syntaxhighlight lang="json"><br />
{<br />
"components": {<br />
"item_properties": {<br />
"allow_off_hand": 1b,<br />
"hand_equipped": 1b,<br />
"max_stack_size": 1i<br />
},<br />
"minecraft:icon": {<br />
"texture": "example_item" // Required even with a resource pack, or else the client complains about icon texture<br />
}<br />
},<br />
"id": 1020i, // The runtime ID of the item<br />
"name": "wikivg:example_item"<br />
}<br />
</syntaxhighlight><br />
<br />
A list of all known valid item properties (and descriptions, if added):<br />
<br />
{| class="wikitable"<br />
! Property name<br />
! Property type<br />
! Property description<br />
|-<br />
| allow_off_hand<br />
| boolean<br />
| If the item is permitted in the offhand inventory slot.<br />
|-<br />
| animates_in_toolbar<br />
| boolean<br />
|<br />
|-<br />
| can_destroy_in_creative<br />
| boolean<br />
|<br />
|-<br />
| creative_category<br />
| integer<br />
| 1 is the construction, 2 is the nature, 3 is the equipment, 4 is the items, the default value is 1<br />
|-<br />
| creative_group <br />
| string<br />
| TODO<br />
|-<br />
| damage<br />
| integer<br />
| shows the number of damge attacks<br />
|-<br />
| enchantable_slot<br />
| string<br />
|<br />
|-<br />
| enchantable_value<br />
| integer<br />
|<br />
|-<br />
| explodable<br />
| boolean<br />
|<br />
|-<br />
| foil<br />
| boolean<br />
|<br />
|-<br />
| frame_count<br />
| integer<br />
|<br />
|-<br />
| hand_equipped<br />
| boolean<br />
| If the item should be visually held like a tool.<br />
|-<br />
| ignores_permissions<br />
| boolean<br />
|<br />
|-<br />
| liquid_clipped<br />
| boolean<br />
| gives the possibility to click on a liquid<br />
|-<br />
| max_stack_size<br />
| integer<br />
| The maximum amount of this item that can be in an inventory slot.<br />
|-<br />
| mining_speed<br />
| float<br />
|<br />
|-<br />
| mirrored_art<br />
| boolean<br />
|<br />
|-<br />
| requires_interact<br />
| boolean<br />
|<br />
|-<br />
| should_despawn<br />
| boolean<br />
|<br />
|-<br />
| stacked_by_data<br />
| boolean<br />
|<br />
|-<br />
| use_animation<br />
| integer<br />
|<br />
|-<br />
| use_duration<br />
| integer<br />
|<br />
|-<br />
|}<br />
<br />
Other item components can be found here: https://bedrock.dev/docs/stable/Item#Item%20Components (Add these in the same format as <code>minecraft:icon</code> shown above). Also see: https://wiki.bedrock.dev/concepts/items<br />
<br />
[[Category:Bedrock Minecraft]]</div>Orladoghttps://wiki.vg/index.php?title=Bedrock_Protocol&diff=16430Bedrock Protocol2021-02-23T20:44:25Z<p>Orladog: /* Available Commands */</p>
<hr />
<div>:: '''Remember that this page is a WIP'''. Come back later to see a more complete page.<br />
----<br />
<br />
{{Box<br />
|BORDER = #9999FF<br />
|BACKGROUND = #99CCFF<br />
|WIDTH = 100%<br />
|ICON = <br />
|HEADING = Heads up!<br />
|CONTENT = This article is about the protocol for the release of Minecraft '''Bedrock Edition''' ([[Bedrock Protocol version numbers|1.16.20, protocol 408]]). See [[Protocol]] for the Java Edition Protocol.<br />
}}<br />
<br />
This is the [https://minecraft.gamepedia.com/Bedrock_Edition Bedrock Edition] Protocol Documentation.<br />
The Bedrock Edition Protocol uses [[wikipedia:User Datagram Protocol|UDP]] instead of [[wikipedia:Transmission Control Protocol|TCP]] that is used for the Java Edition.<br />
Bedrock Edition uses [[Raknet Protocol|RakNet]] as its protocol library.<br />
<br />
The default Bedrock Edition port is 19132.<br />
<br />
Information for this page was obtained from the [https://github.com/NukkitX/Protocol NukkitX Protocol library], [https://github.com/NiclasOlofsson/MiNET MiNET] and [https://github.com/Sandertv/gophertunnel gophertunnel].<br />
<br />
== Data types ==<br />
<br />
{| class="wikitable"<br />
|-<br />
!<br />
! Size (Bytes)<br />
! Range<br />
! Notes<br />
|-<br />
! Byte<br />
| 1<br />
| 0 to 255<br />
|<br />
|-<br />
! Boolean<br />
| 1<br />
| 0 or 1<br />
| A Byte treated as boolean, 0 is false but anything greater then that is true<br />
|-<br />
! Short<br />
| 2<br />
| -32768 to 32767<br />
|<br />
|-<br />
! Unsigned Short<br />
| 2<br />
| 0 to 65535<br />
|<br />
|-<br />
! Int<br />
| 4<br />
| -2147483648 to 2147483647<br />
| Signed little-endian 32-bit Integer<br />
|-<br />
! Int (big endian)<br />
| 4<br />
| -2147483648 to 2147483647<br />
| Signed big-endian 32-bit Integer<br />
|-<br />
! Unsigned Int<br />
| 4<br />
| 0 to 4294967295<br />
| Unsigned 32-bit Integer<br />
|-<br />
! Long<br />
| 8<br />
| -2^63 to 2^63-1<br />
| Signed 64-bit Integer<br />
|-<br />
! Unsigned Long<br />
| 8<br />
| 2^64-1<br />
| Unsigned 64-bit Integer<br />
|-<br />
! Float<br />
| 4<br />
| <br />
| A [[wikipedia:Single-precision_Floating-poInt_format|single-precision 32-bit IEEE 754 Floating poInt number]]<br />
|-<br />
! Double<br />
| 8<br />
| <br />
| A [[wikipedia:Double-precision_Floating-poInt_format|Double-precision 64-bit IEEE 754 Floating poInt number]]<br />
|-<br />
! VarInt<br />
| &ge; 1<br>&le; 5<br />
| 0 to 4294967295<br />
| <br />
|-<br />
! SignedVarInt<br />
| &ge; 1<br>&le; 5<br />
| -2147483648 and 2147483647<br />
| <br />
|-<br />
! VarLong<br />
| &ge; 1<br>&le; 10<br />
| <br />
|<br />
|-<br />
! SignedVarLong<br />
| &ge; 1<br>&le; 10<br />
| -2^63 and 2^63-1<br />
|<br />
|-<br />
! String<br />
| <br />
| <br />
| [[wikipedia:UTF-8|UTF-8]] String prefixed with its size in Bytes as a VarInt. This has the same data structure as a ByteArray but it contains textual data.<br />
|-<br />
! Vector3<br />
| 12<br />
| <br />
| Three Float values (X, Y and Z respectively)<br />
|-<br />
! Vector2<br />
| 8<br />
| <br />
| Two Float values (X and Y respectively)<br />
|-<br />
! NBT<br />
| <br />
| <br />
| <br />
|-<br />
! ByteArray<br />
| <br />
| <br />
| An arbitrary array of Bytes prefixed with its size in Bytes as a VarInt.<br />
|-<br />
! BlockCoordinates<br />
| &ge; 3<br>&le; 15<br />
| <br />
| A SignedVarInt, a normal VarInt and another SignedVarInt (X, Y and Z respectively)<br />
|-<br />
! PlayerLocation<br />
| 15<br />
| <br />
| Three Float values (X, Y and Z respectively), followed by three Bytes (pitch, head yaw and yaw respectively). To convert the Bytes to normal pitch and yaw values divide them by 0.71<br />
|-<br />
! UUID<br />
| 16<br />
| A [[wikipedia:Universally_unique_identifier|UUID]]<br />
| Encoded as two unsigned 64-bit Integers: the most significant 64 bits and the least significant 64 bits<br />
|}<br />
<br />
== Packet Format ==<br />
<br />
Bedrock Edition uses [[Raknet Protocol|RakNet]] as its protocol library, so the packets are sent that way. The UDP protocol specifies packet length, so unlike Java Edition and TCP which deal with raw data streams packets are not length-prefixed. Packets seem to always use compression and can also use encryption. Multiple packets can also be batched into a single packet.<br />
Packet compression uses [https://zlib.net/ zlib], and it seems that packet data can be fed directly into zlib (after being decrypted if encryption is enabled).<br />
<br><br><br />
Refer to [https://github.com/Sandertv/gophertunnel/blob/19c96251a36a39d9ffb938053410852e811755e3/minecraft/protocol/packet/decoder.go#L58 gophertunnel] for more information.<br />
<br />
== Login process ==<br />
The login process is as follows:<br />
# C→S: [[#Login|Login]]<br />
# S→C: [[#Server To Client Handshake|Server To Client Handshake]]<br />
# C→S: [[#Client To Server Handshake|Client To Server Handshake]]<br />
# S→C: [[#Play Status|Play Status]] (Login success)<br />
<br />
To spawn, the following packets should be sent, in order, after the ones above:<br />
# S→C: [[#Resource Packs Info|Resource Packs Info]]<br />
# C→S: [[#Resource Pack Client Response|Resource Pack Client Response]]<br />
# S→C: [[#Resource Pack Stack|Resource Pack Stack]]<br />
# C→S: [[#Resource Pack Client Response|Resource Pack Client Response]]<br />
# S→C: [[#Start Game|Start Game]]<br />
# S→C: [[#Creative Content|Creative Content]]<br />
# S→C: [[#Biome Definition List|Biome Definition List]]<br />
# S→C: Chunks<br />
# S→C: [[#Play Status|Play Status]] (Player spawn)<br />
<br />
If there are no resource packs being sent, a [[#Resource Pack Stack|Resource Pack Stack]] can be sent directly after [[#Resource Packs Info|Resource Packs Info]] to avoid the client responses.<br />
<br />
== Packets ==<br />
Please note that some packet ids are missing, so they don't line up.<br />
The following packet ids are missing:<br />
0x10, 0x74, 0x7F, 0x80<br />
(16, 116, 127, 128)<br />
<br />
<br />
==== Login ====<br />
<br />
Sent when the client initially tries to join the server. It is the first packet sent and contains information specific to the player.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x01<br />
|rowspan="3"| Server<br />
| Protocol version<br />
| Int (big-endian)<br />
| <br />
|-<br />
| Chain data<br />
| JSON array of JWT Data<br />
| Contains the display name, UUID and XUID<br />
|-<br />
| Skin data<br />
| JWT Data<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Play Status ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x02<br />
|rowspan="1"| Client<br />
| Status<br />
| Int (big-endian)<br />
| The current status of the connection.<br />
|}<br />
<br />
The values for each status are as follows:<br />
{| class="wikitable"<br />
! Status<br />
! Name<br />
! Notes<br />
|-<br />
| 0<br />
| Login success<br />
| Sent after [[#Login|Login]] has been successfully decoded and the player has logged in<br />
|-<br />
| 1<br />
| Failed client<br />
| Displays "Could not connect: Outdated client!"<br />
|-<br />
| 2<br />
| Failed server<br />
| Displays "Could not connect: Outdated server!"<br />
|-<br />
| 3<br />
| Player spawn<br />
| Sent after world data to spawn the player<br />
|-<br />
| 4<br />
| Failed invalid Tenant<br />
| Displays "Unable to connect to world. Your school does not have access to this server."<br />
|-<br />
| 5<br />
| Failed Vanilla Edu.<br />
| Displays "The server is not running Minecraft: Education Edition. Failed to connect."<br />
|-<br />
| 6<br />
| Failed Edu. Vanilla<br />
| Displays "The server is running an incompatible edition of Minecraft. Failed to connect."<br />
|-<br />
| 7<br />
| Failed server full<br />
| Displays "Wow this server is popular! Check back later to see if space opens up. Server Full"<br />
|}<br />
<br />
==== Server To Client Handshake ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x03<br />
|rowspan="1"| Client<br />
| JWT data<br />
| JWT String<br />
| Contains the salt to complete the Diffie-Hellman key exchange<br />
|}<br />
<br />
<br />
<br />
==== Client To Server Handshake ====<br />
<br />
Sent by the client in response to a [[#Server To Client Handshake|Server To Client Handshake]] packet sent by the server. It is the first encrypted packet in the login handshake and serves as a confirmation that encryption is correctly initialized client side. It has no fields.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x04<br />
|rowspan="1"| Server<br />
<br />
|}<br />
<br />
<br />
<br />
==== Disconnect ====<br />
<br />
Sent by the server to disconnect a client.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x05<br />
|rowspan="2"| Client<br />
| Hide disconnect screen<br />
| Boolean<br />
| Specifies if the disconnection screen should be hidden when the client is disconnected, meaning it will be sent directly to the main menu.<br />
|-<br />
| Kick message<br />
| String<br />
| An optional message to show when disconnected.<br />
|}<br />
<br />
<br />
<br />
==== Resource Packs info ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x06<br />
|rowspan="4"| Client<br />
| Forced to Accept<br />
| Boolean<br />
| If the resource pack requires the client accept it.<br />
|-<br />
| Scripting Enabled<br />
| Boolean<br />
| If scripting is enabled.<br />
|-<br />
| BehahaviorPackInfos<br />
| ResourcePackInfo[]<br />
| A list of behaviour packs that the client needs to download before joining the server. All of these behaviour packs will be applied together.<br />
|-<br />
| ResourcePackInfos<br />
| ResourcePackInfo[]<br />
| A list of resource packs that the client needs to download before joining the server. The order of these resource packs is not relevant in this packet. It is however important in the Resource Pack Stack packet.<br />
|}<br />
<br />
<br />
<br />
==== Resource Pack Stack ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! colspan="2" | Field Name<br />
! colspan="2" | Field Type<br />
! Notes<br />
|-<br />
| rowspan="11" | 0x07<br />
| rowspan="11" | Client<br />
| colspan="2" | Forced to Accept<br />
| colspan="2" | Boolean<br />
| If the resource pack must be accepted for the player to join the server.<br />
|-<br />
! Resource Pack Entry<br />
! Field Name<br />
! colspan="2" | <br />
! <br />
|-<br />
| rowspan="3" | Array<br />
| Pack ID<br />
| colspan="2" | String<br />
| The ID of the resource pack.<br />
|-<br />
| Pack Version<br />
| colspan="2" | String<br />
| The version of the resource pack.<br />
|-<br />
| Subpack Name<br />
| colspan="2" | String<br />
| The subpack name of the resource pack.<br />
|-<br />
! Behavior Pack Entry<br />
! Field Name<br />
! colspan="2" | <br />
! <br />
|-<br />
| rowspan="3" | Array<br />
| Pack ID<br />
| colspan="2" | String<br />
| The ID of the resource pack.<br />
|-<br />
| Pack Version<br />
| colspan="2" | String<br />
| The version of the resource pack.<br />
|-<br />
| Subpack Name<br />
| colspan="2" | String<br />
| The subpack name of the resource pack.<br />
|-<br />
| colspan="2" | Experimental<br />
| colspan="2" | Boolean<br />
| If the sent resource and behavior packs are experimental.<br />
|-<br />
| colspan="2" | Game Version<br />
| colspan="2" | String<br />
| The version of the game the sent resource and behavior packs were made for.<br />
|}<br />
<br />
<br />
<br />
==== Resource Pack Response ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x08<br />
|rowspan="2"| Server<br />
| Status<br />
| Byte<br />
| See below<br />
|-<br />
| Pack IDs<br />
| ResourcePackIds<br />
| All of the pack IDs.<br />
|}<br />
<br />
The values for each status are as follows:<br />
{| class="wikitable"<br />
! Status<br />
! Name<br />
! Notes<br />
|-<br />
| 0<br />
| None<br />
| <br />
|-<br />
| 1<br />
| Refused<br />
| <br />
|-<br />
| 2<br />
| Send packs<br />
|<br />
|-<br />
| 3<br />
| Have all packs<br />
| <br />
|-<br />
| 4<br />
| Completed<br />
|<br />
|}<br />
<br />
<br />
<br />
==== Text ====<br />
<br />
Sent by the client to the server to send chat messages, and by the server to the client to forward or send messages, which may be chat, popups, tips etc.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! colspan="2" | Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| rowspan="9" | 0x09<br />
| rowspan="9" | Server &amp; Client<br />
| colspan="2" | Type<br />
| Byte<br />
| The type of chat message sent.<br />
|-<br />
| colspan="2" | Needs Translation<br />
| Boolean<br />
| If the message sent is a translation key and needs to be translated.<br />
|-<br />
! Chat Type ID<br />
! Text<br />
! <br />
! Derived from above; values sent here change depending on that.<br />
|-<br />
| rowspan="1" | 0, 1, or 2<br />
| rowspan="1" | Source Name<br />
| rowspan="1" | String<br />
| rowspan="1" | The name of the source.<br />
|-<br />
|-<br />
|-<br />
| rowspan="1" | 3, 4, or 5<br />
| rowspan="1" | Message<br />
| rowspan="1" | String<br />
| rowspan="1" | The message sent with the packet.<br />
|-<br />
|-<br />
|-<br />
|-<br />
| rowspan="2" | 6, 7, or 8<br />
| Message<br />
| String<br />
| The message sent with the packet<br />
|-<br />
| Parameters<br />
| Array<br />
| The parameters sent with the packet. This usually includes translation parameters or similar types depending on what kind of chat type was sent.<br />
|-<br />
| colspan="2" | XUID<br />
| Optional String<br />
| The XUID of the player who sent this message.<br />
|-<br />
| colspan="2" | Platform Chat ID<br />
| Optional String<br />
| The platform chat ID of the sent message.<br />
|}<br />
<br />
{| class="wikitable"<br />
! ID<br />
! Chat Type<br />
|-<br />
| 0<br />
| Raw<br />
|-<br />
| 1<br />
| Chat<br />
|-<br />
| 2<br />
| Translation<br />
|-<br />
| 3<br />
| Popup<br />
|-<br />
| 4<br />
| Jukebox Popup<br />
|-<br />
| 5<br />
| Tip<br />
|-<br />
| 6<br />
| System<br />
|-<br />
| 7<br />
| Whisper<br />
|-<br />
| 8<br />
| Announcement<br />
|-<br />
| 9<br />
| Object<br />
|-<br />
| 10<br />
| Object Whisper<br />
|}<br />
<br />
For additional information and examples of all the chat types above, see here: https://imgur.com/a/KhcFscg<br />
<br />
<br />
<br />
==== Set Time ====<br />
<br />
Sent by the server to update the current time client-side. The client actually advances time client-side by itself, so this packet does not need to be sent each tick. It is merely a means of synchronizing time between server and client.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x0A<br />
|rowspan="1"| Client<br />
| Time<br />
| SignedVarInt<br />
| Time is the current time. The time is not limited to 24000 (time of day), but continues progressing after that.<br />
|}<br />
<br />
<br />
<br />
==== Start Game ====<br />
<br />
Sent by the server to send information about the world the player will be spawned in.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="54"| 0x0B<br />
|rowspan="54"| Client<br />
| Entity ID Self<br />
| SignedVarLong<br />
| The unique ID of the player. The unique ID is a value that remains consistent across different sessions of the same world, but most unofficial servers simply fill the runtime ID of the entity out for this field.<br />
|-<br />
| Runtime Entity ID<br />
| VarLong<br />
| The runtime ID of the player. The runtime ID is unique for each world session, and entities are generally identified in packets using this runtime ID.<br />
|-<br />
| Player Gamemode<br />
| SignedVarInt<br />
|-<br />
| Spawn<br />
| Vector3<br />
| The spawn position of the player in the world. In servers this is often the same as the world's spawn position found below.<br />
|-<br />
| Rotation<br />
| Vector2<br />
| The pitch and yaw of the player<br />
|-<br />
| Seed<br />
| SignedVarInt<br />
| The seed used to generate the world. Unlike in Java edition, the seed is a 32bit Integer here.<br />
|-<br />
| Spawn Biome Type<br />
| Short<br />
| <br />
|-<br />
| Custom Biome Name<br />
| String<br />
| <br />
|-<br />
| Dimension<br />
| SignedVarInt<br />
| Dimension is the ID of the dimension that the player spawns in. It is a value from 0-2, with 0 being the overworld, 1 being the nether and 2 being the end.<br />
|-<br />
| Generator<br />
| SignedVarInt<br />
| Generator is the generator used for the world. It is a value from 0-4, with 0 being old limited worlds, 1 being infinite worlds, 2 being flat worlds, 3 being nether worlds and 4 being end worlds. A value of 0 will actually make the client stop rendering chunks you send beyond the world limit.<br />
|-<br />
| World Gamemode<br />
| SignedVarInt<br />
| The game mode that a player gets when it first spawns in the world. It is shown in the settings and is used if the Player Gamemode is set to 5.<br />
|-<br />
| Difficulty<br />
| SignedVarInt<br />
| Difficulty is the difficulty of the world. It is a value from 0-3, with 0 being peaceful, 1 being easy, 2 being normal and 3 being hard.<br />
|-<br />
| World Spawn<br />
| BlockCoordinates <br />
| The block on which the world spawn of the world. This coordinate has no effect on the place that the client spawns, but it does have an effect on the direction that a compass poInts.<br />
|-<br />
| Has achievements disabled<br />
| Boolean<br />
| Defines if achievements are disabled in the world. The client crashes if this value is set to true while the player's or the world's game mode is creative, and it's recommended to simply always set this to false as a server.<br />
|-<br />
| Day cycle stop time<br />
| SignedVarInt<br />
| The time at which the day cycle was locked if the day cycle is disabled using the respective game rule. The client will maIntain this time as Boolean as the day cycle is disabled.<br />
|-<br />
| EDU offer<br />
| SignedVarInt<br />
| Some Minecraft: Education Edition field that specifies what 'region' the world was from, with 0 being None, 1 being RestOfWorld, and 2 being China. The actual use of this field is unknown.<br />
|-<br />
| Has Education Edition features enabled<br />
| Boolean<br />
| Specifies if the world has education edition features enabled, such as the blocks or entities specific to education edition.<br />
|-<br />
| Education Production ID<br />
| String<br />
|<br />
|-<br />
| Rain level<br />
| Float<br />
| The level specifying the Intensity of the rain falling. When set to 0, no rain falls at all.<br />
|-<br />
| Lightning level<br />
| Float<br />
| The level specifying the Intensity of the thunder. This may actually be set independently from the rain level, meaning dark clouds can be produced without rain.<br />
|-<br />
| Has Confirmed Platform Locked Content<br />
| Boolean<br />
| <br />
|-<br />
| Is Multiplayer<br />
| Boolean<br />
| Specifies if the world is a multi-player game. This should always be set to true for servers.<br />
|-<br />
| Broadcast To LAN<br />
| Boolean<br />
| Specifies if LAN broadcast was Intended to be enabled for the world.<br />
|-<br />
| Xbox Live Broadcast Mode<br />
| VarInt<br />
| The mode used to broadcast the joined game across XBOX Live.<br />
|-<br />
| Platform Broadcast Mode<br />
| VarInt<br />
| The mode used to broadcast the joined game across the platform.<br />
|-<br />
| Enable commands<br />
| Boolean<br />
| If commands are enabled for the player. It is recommended to always set this to true on the server, as setting it to false means the player cannot, under any circumstance, use a command.<br />
|-<br />
| Are texture packs required<br />
| Boolean<br />
| Specifies if the texture pack the world might hold is required, meaning the client was forced to download it before joining.<br />
|-<br />
| GameRules<br />
| GameRules<br />
| Defines game rules currently active with their respective values. The value of these game rules may be either 'bool', 'Int32' or 'Float32'. Some game rules are server side only, and don't necessarily need to be sent to the client.<br />
|-<br />
| Bonus Chest<br />
| Boolean<br />
| Specifies if the world had the bonus map setting enabled when generating it. It does not have any effect client-side.<br />
|-<br />
| Map Enabled<br />
| Boolean<br />
| Specifies if the world has the start with map setting enabled, meaning each joining player obtains a map. This should always be set to false, because the client obtains a map all on its own accord if this is set to true.<br />
|-<br />
| Permission Level<br />
| SignedVarInt<br />
| The permission level of the player. It is a value from 0-3, with 0 being visitor, 1 being member, 2 being operator and 3 being custom.<br />
|-<br />
| Server Chunk Tick Range<br />
| Int<br />
| The radius around the player in which chunks are ticked. Most servers set this value to a fixed number, as it does not necessarily affect anything client-side.<br />
|-<br />
| Has Locked Behavior Pack<br />
| Boolean<br />
| Specifies if the texture pack of the world is locked, meaning it cannot be disabled from the world. This is typically set for worlds on the marketplace that have a dedicated texture pack.<br />
|-<br />
| Has Locked Resource Pack<br />
| Boolean<br />
| Specifies if the texture pack of the world is locked, meaning it cannot be disabled from the world. This is typically set for worlds on the marketplace that have a dedicated texture pack.<br />
|-<br />
| Is From Locked World Template<br />
| Boolean<br />
| Specifies if the world from the server was from a locked world template. For servers this should always be set to false.<br />
|-<br />
| Use MSA Gamertags Only<br />
| Boolean<br />
| <br />
|-<br />
| Is From World Template<br />
| Boolean<br />
| Specifies if the world from the server was from a locked world template. For servers this should always be set to false.<br />
|-<br />
| Is World Template Option Locked<br />
| Boolean<br />
| Specifies if the world was a template that locks all settings that change properties above in the settings GUI. It is recommended to set this to true for servers that do not allow things such as setting game rules through the GUI.<br />
|-<br />
| Only Spawn V1 Villagers<br />
| Boolean<br />
| A hack that Mojang put in place to preserve backwards compatibility with old villagers. The his never actually read though, so it has no functionality.<br />
|-<br />
| Game Version<br />
| String<br />
| The version of the game from which Vanilla features will be used. The exact function of this field isn't clear.<br />
|-<br />
| Limited World Width<br />
| Int<br />
|<br />
|-<br />
| Limited World Height<br />
| Int<br />
|<br />
|-<br />
| Is Nether Type<br />
| Boolean<br />
|<br />
|-<br />
| Is Force Experimental Gameplay<br />
| Boolean<br />
|<br />
|-<br />
| Level ID<br />
| String<br />
| A base64 encoded world ID that is used to identify the world.<br />
|-<br />
| World name<br />
| String<br />
| The name of the world that the player is joining. Note that this field shows up above the player list for the rest of the game session, and cannot be changed. Setting the server name to this field is recommended.<br />
|-<br />
| Premium World Template Id<br />
| String<br />
| A UUID specific to the premium world template that might have been used to generate the world. Servers should always fill out an empty String for this.<br />
|-<br />
| Is Trial<br />
| Boolean<br />
| Specifies if the world was a trial world, meaning features are limited and there is a time limit on the world.<br />
|-<br />
| Is Server Side movement enabled<br />
| Boolean<br />
| Specifies if the server is authoritative over the movement of the player, meaning it controls the movement of it.<br />
|-<br />
| Current Tick<br />
| Boolean<br />
| The total time in ticks that has elapsed since the start of the world.<br />
|-<br />
| Enchantment Seed<br />
| SignedVarInt<br />
| The seed used to seed the random used to produce enchantments in the enchantment table. Note that the exact correct random implementation must be used to produce the correct results both client- and server-side.<br />
|-<br />
| Block Palette<br />
| BlockPalette<br />
| A list of all blocks registered on the server.<br />
|-<br />
| Itemstates<br />
| Itemstates<br />
| A list of all items with their legacy IDs which are available in the game. Failing to send any of the items that are in the game will crash mobile clients.<br />
|-<br />
| Multiplayer Correlation ID<br />
| String<br />
| A unique ID specifying the multi-player session of the player. A random UUID should be filled out for this field.<br />
|}<br />
<br />
<br />
<br />
==== Add Player ====<br />
<br />
Sent by the server to make a player entity show up client-side. It is one of the few entities that cannot be sent using the [[#Add Entity|Add Entity]] packet.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="19"| 0x0C<br />
|rowspan="19"| Client<br />
| UUID<br />
| UUID<br />
| UUID is the UUID of the player. It is the same UUID that the client sent in the Login packet at the start of the session. A player with this UUID must exist in the player list (built up using the Player List packet) for it to show up in-game.<br />
|-<br />
| Username<br />
| String<br />
| Username is the name of the player. This username is the username that will be set as the initial name tag of the player.<br />
|-<br />
| Entity ID Self<br />
| SignedVarLong<br />
| The unique ID of the player. The unique ID is a value that remains consistent across different sessions of the same world, but most unoffical servers simply fill the runtime ID of the player out for this field.<br />
|-<br />
| Runtime Entity ID<br />
| VarLong<br />
| The runtime ID of the player. The runtime ID is unique for each world session, and entities are generally identified in packets using this runtime ID.<br />
|-<br />
| Platform Chat ID<br />
| String<br />
| An identifier only set for particular platforms when chatting (presumably only for Nintendo Switch). It is otherwise an empty string, and is used to decide which players are able to chat with each other.<br />
|-<br />
| Position<br />
| Vector3<br />
| The position to spawn the player at. If the player is at a distance that the viewer cannot see, the player will still show up if the viewer moves closer.<br />
|-<br />
| Velocity<br />
| Vector3<br />
| The initial velocity the player spawns with. This velocity will initiate client side movement of the player.<br />
|-<br />
| Rotation<br />
| Float<br />
| Pitch, yaw and head yaw<br />
|-<br />
| Held Item<br />
| Item<br />
| The item that the player is holding. The item is shown to the viewer as soon as the player itself shows up. Needless to say that this field is rather pointless, as additional packets still must be sent for armour to show up.<br />
|-<br />
| Metadata<br />
| MetadataDictionary<br />
| A map of entity metadata, which includes flags and data properties that alter in particular the way the player looks. Flags include ones such as 'on fire' and 'sprinting'. The metadata values are indexed by their property key.<br />
|-<br />
| Flags<br />
| VarInt<br />
| Flags is a set of flags that specify certain properties of the player, such as whether or not it can fly and/or move through blocks.<br />
|-<br />
| Command permission<br />
| VarInt<br />
| A set of permissions that specify what commands a player is allowed to execute.<br />
|-<br />
| Action Permissions<br />
| VarInt<br />
| Action Permissions is, much like Flags, a set of flags that specify actions that the player is allowed to undertake, such as whether it is allowed to edit blocks, open doors etc.<br />
|-<br />
| Permission Level<br />
| VarInt<br />
| The permission level of the player as it shows up in the player list built up using the PlayerList packet.<br />
|-<br />
| Custom stored permissions<br />
| VarInt<br />
| <br />
|-<br />
| User Id<br />
| Long<br />
| A unique identifier of the player. It appears it is not required to fill this field out with a correct value. Simply writing 0 seems to work.<br />
|-<br />
| Links<br />
| Links<br />
| A list of entity links that are currently active on the player. These links alter the way the player shows up when first spawned in terms of it shown as riding an entity. Setting these links is important for new viewers to see the player is riding another entity.<br />
|-<br />
| Device ID<br />
| String<br />
| The device ID set in one of the files found in the storage of the device of the player. It may be changed freely, so it should not be relied on for anything.<br />
|-<br />
| Device OS<br />
| Int<br />
| The build platform/device OS of the player that is about to be added, as it sent in the Login packet when joining.<br />
|}<br />
<br />
<br />
<br />
==== Add Entity ====<br />
<br />
Sent by the server to spawn an entity to the player. It is used for every entity except other players, paintings and items, for which the [[#Add Player|Add Player]], [[#Add Painting|Add Painting]] and [[#Add Item Entity|Add Item Entity]] packets are used.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="9"| 0x0D<br />
|rowspan="9"| Client<br />
| Entity ID Self<br />
| SignedVarLong<br />
| The unique ID of the entity. The unique ID is a value that remains consistent across different sessions of the same world, but most unofficial servers simply fill the runtime ID of the entity out for this field.<br />
|-<br />
| Runtime Entity ID<br />
| VarLong<br />
| The runtime ID of the entity. The runtime ID is unique for each world session, and entities are generally identified in packets using this runtime ID.<br />
|-<br />
| Entity Type<br />
| String<br />
| The string entity type of the entity, for example 'minecraft:skeleton'.<br />
|-<br />
| Position<br />
| Vector3<br />
| The position to spawn the entity at. If the entity is at a distance that the player cannot see, the entity will still show up if the player moves closer.<br />
|-<br />
| Velocity<br />
| Vector3<br />
| The initial velocity the entity spawns with. This velocity will initiate client side movement of the entity.<br />
|-<br />
| Rotation<br />
| Vector3<br />
| Pitch, yaw and head yaw<br />
|-<br />
| Attributes<br />
| EntityAttributes<br />
| A slice of attributes that the entity has. It includes attributes such as its health, movement speed, etc.<br />
|-<br />
| Metadata<br />
| MetadataDictionary<br />
| A map of entity metadata, which includes flags and data properties that alter in particular the way the entity looks. Flags include ones such as 'on fire' and 'sprinting'. The metadata values are indexed by their property key.<br />
|-<br />
| Links<br />
| Links<br />
| A list of entity links that are currently active on the entity. These links alter the way the entity shows up when first spawned in terms of it shown as riding an entity. Setting these links is important for new viewers to see the entity is riding another entity.<br />
|}<br />
<br />
<br />
<br />
==== Remove Entity ====<br />
<br />
Sent by the server to remove an entity that currently exists in the world from the client-side. Sending this packet if the client cannot already see this entity will have no effect.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x0E<br />
|rowspan="1"| Client<br />
| Unique Entity Id<br />
| SignedVarLong<br />
| The unique ID of the entity to be removed. The unique ID is a value that remains consistent across different sessions of the same world, but most unofficial servers simply fill the runtime ID of the entity out for this field.<br />
|}<br />
<br />
<br />
<br />
==== Add Item Entity ====<br />
<br />
Sent by the server to make an item entity show up. It is one of the few entities that cannot be sent using the [[#Add Entity|Add Entity]] packet.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="7"| 0x0F<br />
|rowspan="7"| Client<br />
| Entity ID Self<br />
| SignedVarLong<br />
| The unique ID of the entity. The unique ID is a value that remains consistent across different sessions of the same world, but most unofficial servers simply fill the runtime ID of the entity out for this field.<br />
|-<br />
| Runtime Entity ID<br />
| VarLong<br />
| The runtime ID of the entity. The runtime ID is unique for each world session, and entities are generally identified in packets using this runtime ID.<br />
|-<br />
| Item<br />
| Item<br />
| The item that is spawned. It must have a valid ID for it to show up client-side. If it is not a valid item, the client will crash when coming near.<br />
|-<br />
| Position<br />
| Vector3<br />
| The position to spawn the entity on. If the entity is at a distance that the player cannot see, the entity will still show up if the player moves closer.<br />
|-<br />
| Velocity<br />
| Vector3<br />
| The initial velocity the entity spawns with. This velocity will initiate client side movement of the entity.<br />
|-<br />
| Metadata<br />
| MetadataDictionary<br />
| A map of entity metadata, which includes flags and data properties that alter in particular the way the entity looks. Flags include ones such as 'on fire' and 'sprinting'. The metadata values are indexed by their property key.<br />
|-<br />
| Is From Fishing<br />
| Boolean<br />
| Specifies if the item was obtained by fishing it up using a fishing rod. It is not clear why the client needs to know this.<br />
|}<br />
<br />
<br />
<br />
==== Take Item Entity ====<br />
<br />
Sent by the server when a player picks up an item entity. It makes the item entity disappear to viewers and shows the pick-up animation.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x11<br />
|rowspan="2"| Client<br />
| Item Runtime Entity Id<br />
| VarLong<br />
| the entity runtime ID of the item that is being taken by another entity. It will disappear to viewers after showing the pick-up animation.<br />
|-<br />
| Runtime Entity Id<br />
| VarLong<br />
| The runtime ID of the entity that took the item, which is usually a player, but could be another entity like a zombie too.<br />
|}<br />
<br />
<br />
<br />
==== Move Entity Absolute ====<br />
<br />
Sent by the server to move an entity to an absolute position. It is typically used for movements where high accuracy isn't needed, such as for long range teleporting.<br />
This packet is also sent by the client when riding a horse/donkey.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x12<br />
|rowspan="4"| Server & Client<br />
| Runtime entity id<br />
| VarLong<br />
| The runtime ID of the entity. The runtime ID is unique for each world session, and entities are generally identified in packets using this runtime ID.<br />
|-<br />
| Flags<br />
| byte<br />
| A combination of flags that specify details of the movement. See below for more info.<br />
|-<br />
| Position<br />
| PlayerLocation<br />
| <br />
|}<br />
<br />
{| class="wikitable"<br />
|-<br />
! Field<br />
! Bit<br />
! Notes<br />
|-<br />
| On ground<br />
| 0x01<br />
| If the entity is touching the ground<br />
|-<br />
| Telported<br />
| 0x02<br />
|<br />
|}<br />
<br />
<br />
<br />
==== Move Player ====<br />
<br />
Sent by players to send their movement to the server, and by the server to update the movement of player entities to other players.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="8"| 0x13<br />
|rowspan="8"| Server & Client<br />
| Runtime entity id<br />
| VarLong<br />
| The runtime ID of the player. The runtime ID is unique for each world session, and entities are generally identified in packets using this runtime ID.<br />
|-<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| Rotation<br />
| Vector3<br />
| Pitch, yaw and head yaw<br />
|-<br />
| Mode<br />
| Byte<br />
| <br />
|-<br />
| On ground<br />
| Boolean<br />
| Specifies if the player is considered on the ground. Note that proxies or hacked clients could fake this to always be true, so it should not be taken for granted.<br />
|-<br />
| Riding runtime entity id<br />
| Float<br />
| The runtime ID of the entity that the player might currently be riding. If not riding, this should be left 0.<br />
|-<br />
| Teleportation cause<br />
| VarLong<br />
| See below. Only needs to exist if Mode cause is 2 (teleport).<br />
|-<br />
| Entity type<br />
| Byte<br />
| Only needs to exist if Mode cause is 2 (teleport).<br />
|}<br />
<br />
Modes:<br />
{| class="wikitable"<br />
! ID<br />
! Mode<br />
|-<br />
| 0<br />
| Normal<br />
|-<br />
| 1<br />
| Reset<br />
|-<br />
| 2<br />
| Teleport<br />
|-<br />
| 3<br />
| Rotation<br />
|}<br />
<br />
Teleportation causes:<br />
{| class="wikitable"<br />
! ID<br />
! Cause<br />
|-<br />
| 0<br />
| Unknown<br />
|-<br />
| 1<br />
| Projectile<br />
|-<br />
| 2<br />
| Chorus fruit<br />
|-<br />
| 3<br />
| Command<br />
|-<br />
| 4<br />
| Behavior<br />
|}<br />
<br />
<br />
<br />
==== Rider Jump ====<br />
<br />
Sent by the client when it jumps while riding an entity that has the WASDControlled entity flag set, for example when riding a horse. According to MiNET this can also be sent from the server to the client, but details on this are unknown.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x14<br />
|rowspan="1"| Server & Client<br />
| Jump Strength<br />
| SignedVarInt<br />
| The strength of the jump, depending on how long the rider has held the jump button.<br />
|}<br />
<br />
<br />
<br />
==== Update Block ====<br />
<br />
Sent by the server to update a block client-side, without resending the entire chunk that the block is located in. It is particularly useful for small modifications like block breaking/placing.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x15<br />
|rowspan="4"| Client<br />
| Coordinates<br />
| BlockCoordinates<br />
| The block position at which a block is updated.<br />
|-<br />
| Block Runtime ID<br />
| VarInt<br />
| The runtime ID of the block that is placed at Position after sending the packet to the client. The runtime ID must point to a block sent in the list in the Start Game packet.<br />
|-<br />
| Flags<br />
| VarInt<br />
| See below. Flags is a combination of flags that specify the way the block is updated client-side. It is a combination of the flags below, but typically sending only the Network flag is sufficient.<br />
|-<br />
| Layer<br />
| VarInt<br />
| The world layer on which the block is updated. In Bedrock, multiple blocks can be put in the same location using layers. The second layer is usually used for liquids, so blocks can be inside a liquid. For most blocks, this is the first layer, as that layer is the default layer to place blocks on, but for blocks inside of each other, this differs. As this system is designed with liquids, there may be bugs when using this to place blocks inside each other. For example, placing an interactable block such as an item frame on the second layer can cause a game crash if the player tries to interact with it.<br />
|}<br />
<br />
{| class="wikitable"<br />
|-<br />
! Field<br />
! Bit<br />
! Notes<br />
|-<br />
| Neighbors<br />
| 0x01<br />
| <br />
|-<br />
| Network<br />
| 0x02<br />
|<br />
|-<br />
| No Graphic<br />
| 0x04<br />
|<br />
|-<br />
| Priority<br />
| 0x08<br />
|<br />
|}<br />
<br />
<br />
<br />
==== Add Painting ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x16<br />
|rowspan="5"| Client<br />
| Unique Entity Id<br />
| SignedVarLong<br />
| The unique ID of the entity. The unique ID is a value that remains consistent across different sessions of the same world, but most unofficial servers simply fill the runtime ID of the entity out for this field.<br />
|-<br />
| Runtime Entity Id<br />
| VarLong<br />
| The runtime ID of the entity. The runtime ID is unique for each world session, and entities are generally identified in packets using this runtime ID.<br />
|-<br />
| Position<br />
| Vector3<br />
| The position to spawn the entity at. If the entity is at a distance that the player cannot see, the entity will still show up if the player moves closer.<br />
|-<br />
| Direction<br />
| SignedVarInt<br />
| The facing direction of the painting. See below.<br />
|-<br />
| Name<br />
| String<br />
| This is the name of the painting (e.g. BurningSkull). See below.<br />
|}<br />
<br />
Valid facing values:<br />
* 0 - Facing towards positive Z (south)<br />
* 1 - Facing towards negative X (west)<br />
* 2 - Facing towards negative Z (north)<br />
* 3 - Facing towards positive X (east)<br />
<br />
Valid name values:<br />
* Kebab<br />
* Aztec<br />
* Alban<br />
* Aztec<br />
* Aztec2<br />
* Bomb<br />
* Plant<br />
* Wasteland<br />
* Wanderer<br />
* Graham<br />
* Pool<br />
* Courbet<br />
* Sunset<br />
* Sea<br />
* Creebet<br />
* Match<br />
* Bust<br />
* Stage<br />
* Void<br />
* SkullAndRoses<br />
* Wither<br />
* Fighters<br />
* Skeleton<br />
* DonkeyKong<br />
* PoInter<br />
* Pigscene<br />
* BurningSkull<br />
<br />
<br />
<br />
==== Tick Sync ====<br />
<br />
Sent by the client and the server to maintain a synchronized, server-authoritative tick between the client and the server. The client sends this packet first, and the server should reply with another one of these packets, including the response time.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x17<br />
|rowspan="2"| Server & Client<br />
| Request Timestamp<br />
| Long<br />
| <br />
|-<br />
| Response Timestamp<br />
| Long<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Level Sound Event (1) ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="6"| 0x18<br />
|rowspan="6"| Server & Client<br />
| Sound ID<br />
| Byte<br />
| <br />
|-<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| Block Id<br />
| SignedVarInt<br />
| <br />
|-<br />
| Entity Type<br />
| SignedVarInt<br />
| <br />
|-<br />
| Is baby mob<br />
| Boolean<br />
| <br />
|-<br />
| Is global<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Level Event ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x19<br />
|rowspan="3"| Client<br />
| Event ID<br />
| SignedVarInt<br />
| <br />
|-<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| Data<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Block Event ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x1A<br />
|rowspan="3"| Client<br />
| Block Position<br />
| BlockCoordinates<br />
| <br />
|-<br />
| Event Type<br />
| SignedVarInt<br />
| <br />
|-<br />
| Event Data<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Entity Event ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x1B<br />
|rowspan="3"| Server & Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Event ID<br />
| Byte<br />
| See [[/Entity Events|Bedrock Protocol/Entity Events]]<br />
|-<br />
| Data<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Mob Effect ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="6"| 0x1C<br />
|rowspan="6"| Client<br />
| Runtime entity id<br />
| VarLong<br />
| <br />
|-<br />
| Event<br />
| Byte<br />
| <br />
|-<br />
| Effect id<br />
| SignedVarInt<br />
| See the Bedrock Edition section of {{Minecraft Wiki|Status effect#Effect_IDs}}<br />
|-<br />
| Amplifier<br />
| SignedVarInt<br />
| <br />
|-<br />
| Particles<br />
| Boolean<br />
| If true, effect particles are not shown<br />
|-<br />
| Duration<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
Events:<br />
* 0: None<br />
* 1: Add<br />
* 2: Modify<br />
* 3: Remove<br />
<br />
==== Update Attributes ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x1D<br />
|rowspan="2"| Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Attributes<br />
| PlayerAttributes<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Inventory Transaction ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x1E<br />
|rowspan="1"| Server & Client<br />
| Transaction<br />
| Transaction<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Mob Equipment ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x1F<br />
|rowspan="5"| Server & Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Item<br />
| Item<br />
| <br />
|-<br />
| Slot<br />
| Byte<br />
| <br />
|-<br />
| Selected Slot<br />
| Byte<br />
| <br />
|-<br />
| Windows Id<br />
| Byte<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Mob Armor Equipment ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x20<br />
|rowspan="5"| Server & Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Helmet<br />
| Item<br />
| <br />
|-<br />
| Chestplate<br />
| Item<br />
| <br />
|-<br />
| Leggings<br />
| Item<br />
| <br />
|-<br />
| Boots<br />
| Item<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Interact ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x21<br />
|rowspan="2"| Server & Client<br />
| Action ID<br />
| Byte<br />
| <br />
|-<br />
| Target Runtime Entity ID<br />
| VarLong<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Block Pick Request ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x22<br />
|rowspan="5"| Server<br />
| Block Position X<br />
| SignedVarInt<br />
| <br />
|-<br />
| Block Position Y<br />
| SignedVarInt<br />
| <br />
|-<br />
| Block Position Z<br />
| SignedVarInt<br />
| <br />
|-<br />
| Add User Data<br />
| bool<br />
| Whether there should be NBT data in the picked block (activated by pressing Ctrl on default keyboard controls)<br />
|-<br />
| Hotbar Slot<br />
| Byte<br />
| <br />
|}<br />
<br />
The Bedrock client sends the position of the block. It expects the server to decide the block to pick and add it to the inventory or switch the hotbar slot if needed.<br />
<br />
<br />
<br />
==== Entity Pick Request ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x23<br />
|rowspan="2"| Server<br />
| Runtime Entity ID<br />
| Unsigned Long<br />
| <br />
|-<br />
| Hotbar Slot<br />
| Byte<br />
| The held hotbar slot of the player at the time of trying to pick the entity. If empty, the resulting spawn egg will be put into this slot.<br />
|}<br />
<br />
<br />
<br />
==== Player Action ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x24<br />
|rowspan="4"| Server<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Action ID<br />
| SignedVarInt<br />
| <br />
|-<br />
| Coordinates<br />
| BlockCoordinates<br />
| <br />
|-<br />
| Face<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Entity Fall ====<br />
<br />
Sent by the client when it falls from a distance onto a block that would damage the player.<br />
<br />
This packet should not be used at all by the server, as it can easily be spoofed using a proxy or custom client. Servers should implement fall damage using their own calculations.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x25<br />
|rowspan="3"| Server<br />
| Runtime Entity Id<br />
| VarLong<br />
| <br />
|-<br />
| Fall Distance<br />
| Float<br />
| The distance that the entity fell until it hit the ground. The damage would otherwise be calculated using this field.<br />
|-<br />
| In Void<br />
| Boolean<br />
| Specifies if the fall was in the void. The player can't fall below roughly Y=-40.<br />
|}<br />
<br />
<br />
<br />
==== Hurt Armor ====<br />
<br />
Sent by the server to damage the player's armor after being hit. <br />
<br />
The packet should never be used by servers as it hands the responsibility over to the player completely, while the server can easily and reliably update the armor damage of players itself.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x26<br />
|rowspan="1"| Client<br />
| Health<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Entity Data ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x27<br />
|rowspan="2"| Server & Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Metadata<br />
| MetadataDictionary<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Entity Motion ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x28<br />
|rowspan="4"| Server & Client<br />
| Runtime Entity Id<br />
| VarLong<br />
| <br />
|-<br />
| Motion X<br />
| Vector3<br />
| <br />
|-<br />
| Motion Y<br />
| Float<br />
| <br />
|-<br />
| Motion Z<br />
| Float<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Entity Link ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x29<br />
|rowspan="4"| Client<br />
| Ridden ID<br />
| SignedVarLong<br />
| <br />
|-<br />
| Rider ID<br />
| SignedVarLong<br />
| <br />
|-<br />
| Link Type<br />
| Byte<br />
| <br />
|-<br />
| Unknown<br />
| Byte<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Health ====<br />
<br />
Sent by the server to set the health of the player it is sent to.<br />
<br />
This packet should no longer be used. Instead, the health attribute should be used so that the health and maximum health may be changed directly.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x2A<br />
|rowspan="1"| Client<br />
| Health<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Spawn Position ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x2B<br />
|rowspan="5"| Client<br />
| Spawn Type<br />
| SignedVarInt<br />
| <br />
|-<br />
| Block Position<br />
| BlockCoordinates<br />
| the new position of the spawn that was set. If spawnType is WORLD_SPAWN, compasses will point to this position. As of 1.16, blockPosition is always the position of the player.<br />
|-<br />
| Dimension ID<br />
| Int<br />
|<br />
|-<br />
| Spawn Position<br />
| Vector3<br />
| Default -2147483648, -2147483648, -2147483648<br />
|-<br />
| Forced<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Animate ====<br />
<br />
Sent by the server to send a player animation from one player to all viewers of that player. <br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x2C<br />
|rowspan="2"| Server & Client<br />
| Action ID<br />
| SignedVarInt<br />
| <br />
|-<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Respawn ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x2D<br />
|rowspan="3"| Server & Client<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| State<br />
| Byte<br />
| <br />
|-<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|}<br />
<br />
States:<br />
{| class="wikitable"<br />
! ID<br />
! Name<br />
|-<br />
| 0<br />
| Server Searching<br />
|-<br />
| 1<br />
| Server Ready<br />
|-<br />
| 2<br />
| Client Ready<br />
|}<br />
<br />
==== Container Open ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x2E<br />
|rowspan="4"| Client<br />
| Window Id<br />
| Byte<br />
| <br />
|-<br />
| Type<br />
| Byte<br />
| <br />
|-<br />
| Block Position<br />
| BlockCoordinates<br />
| <br />
|-<br />
| Unique Entity Id<br />
| SignedVarLong<br />
| <br />
|}<br />
<br />
Bedrock needs either a valid block position, with an actual block at that position, or an entity ID for this to work. The entity must have CONTAINER_BASE_SIZE metadata, or the block must be a container. The entity ID is used for minecart chests etc. but any entity will work. If the entity has NAMETAG metadata this will be used as the container name.<br />
<br />
<br />
<br />
==== Container Close ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x2F<br />
|rowspan="1"| Server & Client<br />
| Window Id<br />
| Byte<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Player Hotbar ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x30<br />
|rowspan="3"| Server & Client<br />
| Selected Hotbar Slot<br />
| VarInt<br />
| <br />
|-<br />
| Container Id<br />
| Byte<br />
| <br />
|-<br />
| Select Hotbar Slot<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Inventory Content ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x31<br />
|rowspan="2"| Server & Client<br />
| Inventory Id<br />
| VarInt<br />
| <br />
|-<br />
| Input<br />
| ItemStacks<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Inventory Slot ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x32<br />
|rowspan="3"| Server & Client<br />
| Inventory Id<br />
| VarInt<br />
| <br />
|-<br />
| Slot<br />
| VarInt<br />
| <br />
|-<br />
| Item<br />
| Item<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Container Set Data ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x33<br />
|rowspan="3"| Client<br />
| Window Id<br />
| Byte<br />
| <br />
|-<br />
| Property<br />
| SignedVarInt<br />
| <br />
|-<br />
| Value<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Crafting Data ====<br />
<br />
Since 1.16.200, each recipe must have a unique network ID. Otherwise, the client will crash.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x34<br />
|rowspan="4"| Client<br />
| Recipes<br />
| Recipes<br />
| <br />
|-<br />
| Potion type recipes<br />
| PotionTypeRecipe[]<br />
| <br />
|-<br />
| potion container recipes<br />
| PotionContainerChangeRecipe[]<br />
| <br />
|-<br />
| Is Clean<br />
| Boolean<br />
| <br />
|}<br />
<br />
==== Crafting Event ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x35<br />
|rowspan="5"| Server & Client<br />
| Window ID<br />
| Byte<br />
| <br />
|-<br />
| Recipe Type<br />
| SignedVarInt<br />
| <br />
|-<br />
| Recipe ID<br />
| UUID<br />
| <br />
|-<br />
| Input<br />
| ItemStacks<br />
| <br />
|-<br />
| Result<br />
| ItemStacks<br />
| <br />
|}<br />
<br />
<br />
<br />
==== GUI Data Pick Item ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x36<br />
|rowspan="4"| Client<br />
|-<br />
| Item name<br />
| String<br />
| The name of the item that shows up in the top part of the popup that shows up when selecting an item. It is shown as if an item was selected by the player itself.<br />
|-<br />
| Item effects<br />
| String<br />
| The line under the Item name, where the effects of the item are usually situated.<br />
|-<br />
| Hotbar Slot<br />
| int<br />
| The hot bar slot to be selected/picked. This does not currently work, so it does not matter what number this is.<br />
|}<br />
<br />
Sent by the server to make the client 'select' a hotbar slot. It currently appears to be broken however, and does not actually set the selected slot to the hotbar slot set in the packet.<br />
<br />
<br />
<br />
==== Adventure Settings ====<br />
<br />
Sent by the server to update gameplay related features, in particular permissions to access these features for the client.<br />
<br />
It includes allowing the player to fly, build, and mine and attack entities. Most of these flags should be checked server-side instead of using this packet only.<br />
<br />
The client my also send this packet to the server when it updates one of these settings through the in-game settings interface. The server should verify if the player actually has permission to update these settings.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="6"| 0x37<br />
|rowspan="6"| Server & Client<br />
| Flags<br />
| VarInt<br />
| <br />
|-<br />
| Command permission<br />
| VarInt<br />
| <br />
|-<br />
| Action permissions<br />
| VarInt<br />
| <br />
|-<br />
| Permission level<br />
| VarInt<br />
| <br />
|-<br />
| Custom stored permissions<br />
| VarInt<br />
| <br />
|-<br />
| User Id<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Block Entity Data ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x38<br />
|rowspan="2"| Server & Client<br />
| Coordinates<br />
| BlockCoordinates<br />
| <br />
|-<br />
| NamedTag<br />
| NBT<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Player Input ====<br />
<br />
Sent by the client when the player is moving but the server does not allow it to update its movement using the [[#Move Player|Move Player]] packet. It includes situations where the player is riding an entity like a boat. If this is the case, the packet is sent roughly every tick.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x39<br />
|rowspan="4"| Server<br />
| Movement<br />
| Vec2<br />
| The movement vector of the input. It should be thought of in Pocket Edition controls, where specific arrows (or a combination of two, resulting in a diagonal arrow) decide the direction of movement. The movement vector typically has a length of 1: Either it has movement on one axis, or it has a combination, resulting in sqrt(2)/2 for both axes.<br />
|-<br />
| Jumping<br />
| Boolean<br />
| Indicates if the player was pressing the jump button or not. It does not define if the player was actually in the air or not.<br />
|-<br />
| Sneaking<br />
| Boolean<br />
| Indicates the player was sneaking during the input. Note that this may also be checked by keeping the sneaking state updated using the [[#Player Action|Player Action]] packet<br />
|}<br />
<br />
<br />
<br />
==== Level Chunk ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x3A<br />
|rowspan="5"| Client<br />
| Chunk X<br />
| SignedVarInt<br />
| <br />
|-<br />
| Chunk Z<br />
| SignedVarInt<br />
| <br />
|-<br />
| Sub Chunk Count<br />
| VarInt<br />
| <br />
|-<br />
| Cache Enabled<br />
| Boolean<br />
| <br />
|-<br />
| Chunk Data<br />
| ByteArray<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Commands Enabled ====<br />
<br />
This packet is sent to the client to enable or disable the ability to execute commands. If disabled, the client itself will stop the execution of commands.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x3B<br />
|rowspan="1"| Client<br />
| Commands enabled<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Difficulty ====<br />
<br />
Sent by the server to update the client-side difficulty pf the client. The actual effect of this packet on the client isn't very significant, as the difficulty is handled server-side.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x3C<br />
|rowspan="1"| Client<br />
| Difficulty<br />
| VarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Change Dimension ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x3D<br />
|rowspan="5"| Client<br />
| Dimension<br />
| SignedVarInt<br />
| <br />
|-<br />
| Position X<br />
| Vector3<br />
| <br />
|-<br />
| Position Y<br />
| Boolean<br />
| <br />
|-<br />
| Position Z<br />
| Float<br />
| <br />
|-<br />
| Respawn<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Player Game Type ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x3E<br />
|rowspan="1"| Server & Client<br />
| Game mode<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Player List ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x3F<br />
|rowspan="1"| Client<br />
| Records<br />
| PlayerRecords<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Simple Event ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x40<br />
|rowspan="1"| Client<br />
| Event Type<br />
| Unsigned Short<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Event ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x41<br />
|rowspan="3"| Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Event data<br />
| SignedVarInt<br />
| <br />
|-<br />
| Event type<br />
| Byte<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Spawn Experience Orb ====<br />
<br />
Sent by the server to spawn an experience orb entity client-side. <br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x42<br />
|rowspan="2"| Client<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| Count<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Map Item Data ====<br />
<br />
Sent by the server to update the data of a map shown to the client. It is sent with a combination of flags that specify what data is updated.<br />
<br />
The packet may be used to update specific parts of the map only. It is not required to send the entire map each time when updating one part.<br />
<br />
TODO<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x43<br />
|rowspan="1"| Client<br />
| Map ID<br />
| VarLong<br />
| The unique identifier that represents the map that is updated over network. It remains consitent across sesions.<br />
|}<br />
<br />
<br />
<br />
==== Map Info Request ====<br />
<br />
Sent by the client to request the server to deliver information of a certain map in the inventory of the player. The serve should respond with a [[#Map Item Data|Map Item Data]] packet.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x44<br />
|rowspan="1"| Server & Client<br />
| Unique Map Id<br />
| SignedVarLong<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Request Chunk Radius ====<br />
<br />
Sent by the client to update the server on the chunk view radius that it has set in the settings. The server may respond with a [[#Chunk Radius Updated|Chunk Radius Updated]] packet with either the radius requested, or a different chunk radius if the server chooses so.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x45<br />
|rowspan="1"| Server & Client<br />
| Chunk radius<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Chunk Radius Updated ====<br />
<br />
Sent by the server in response to a [[#Request Chunk Radius|Request Chunk Radius]] packet. It defines the radius that the server allows the client to have. This may be lower than the chunk radius requested by the client.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x46<br />
|rowspan="1"| Client<br />
| Chunk radius<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== ItemFrame Drop Item ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x47<br />
|rowspan="1"| Server & Client<br />
| Block Position<br />
| BlockCoordinates<br />
|<br />
|}<br />
<br />
==== Game Rules Changed ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x48<br />
|rowspan="1"| Client<br />
| Rules<br />
| GameRules<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Camera ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x49<br />
|rowspan="2"| Client<br />
| Camera Unique Entity Id<br />
| SignedVarLong<br />
| <br />
|-<br />
| Player Unique Entity Id<br />
| SignedVarLong<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Boss Event ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x4A<br />
|rowspan="2"| Client<br />
| Boss Entity ID<br />
| SignedVarLong<br />
| <br />
|-<br />
| Event Type<br />
| VarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Show Credits ====<br />
<br />
Sent by the server to show the Minecraft credits screen to the client. It is typically when the player beats the ender dragon and leaves the End.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x4B<br />
|rowspan="2"| Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Status<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
Statuses:<br />
{| class="wikitable"<br />
! ID<br />
! Name<br />
|-<br />
| 0<br />
| Start Credits<br />
|-<br />
| 1<br />
| End Credits<br />
|}<br />
<br />
<br />
==== Available Commands ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x4C<br />
|rowspan="1"| Client<br />
|colspan="3" | This packet has no data.<br />
|}<br />
<br />
==== Command Request ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x4D<br />
|rowspan="5"| Server<br />
| Command<br />
| String<br />
| <br />
|-<br />
| Command type<br />
| VarInt<br />
| <br />
|-<br />
| Unknown UUID<br />
| UUID<br />
| <br />
|-<br />
| Request ID<br />
| String<br />
| <br />
|-<br />
| Unknown<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== CommandBlock Update ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x4E<br />
|rowspan="1"| Server<br />
| Is Block<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Command Output ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x4F<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== Update Trade ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="10"| 0x50<br />
|rowspan="10"| Client<br />
| Window ID<br />
| Byte<br />
| <br />
|-<br />
| Window Type<br />
| Byte<br />
| <br />
|-<br />
| Unknown0<br />
| VarInt<br />
| <br />
|-<br />
| Unknown1<br />
| VarInt<br />
| <br />
|-<br />
| Unknown2<br />
| VarInt<br />
| <br />
|-<br />
| Is Willing<br />
| Boolean<br />
| <br />
|-<br />
| Trader Entity ID<br />
| SignedVarLong<br />
| <br />
|-<br />
| Player Entity ID<br />
| SignedVarLong<br />
| <br />
|-<br />
| Display Name<br />
| String<br />
| <br />
|-<br />
| NamedTag<br />
| NBT<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Update Equip ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x51<br />
|rowspan="5"| Client<br />
| Window ID<br />
| Byte<br />
| <br />
|-<br />
| Window Type<br />
| Byte<br />
| <br />
|-<br />
| Unknown<br />
| Byte<br />
| <br />
|-<br />
| Entity ID<br />
| SignedVarLong<br />
| <br />
|-<br />
| NamedTag<br />
| NBT<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Resource Pack Data Info ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="7"| 0x52<br />
|rowspan="7"| Client<br />
| Package ID<br />
| String<br />
| <br />
|-<br />
| Max Chunk Size<br />
| Unsigned Int<br />
| <br />
|-<br />
| Chunk Count<br />
| Unsigned Int<br />
| <br />
|-<br />
| Compressed Package Size<br />
| Unsigned Long<br />
| <br />
|-<br />
| Hash<br />
| ByteArray<br />
| <br />
|-<br />
| Is Premium<br />
| Boolean<br />
| <br />
|-<br />
| Pack Type<br />
| Byte<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Resource Pack Chunk Data ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x53<br />
|rowspan="4"| Client<br />
| Package ID<br />
| String<br />
| <br />
|-<br />
| Chunk Index<br />
| Unsigned Int<br />
| <br />
|-<br />
| Progress<br />
| Unsigned Long<br />
| <br />
|-<br />
| Payload<br />
| ByteArray<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Resource Pack Chunk Request ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x54<br />
|rowspan="2"| Server<br />
| Package ID<br />
| String<br />
| <br />
|-<br />
| Chunk Index<br />
| Unsigned Int<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Transfer ====<br />
<br />
Sent by the server to transfer a player from the current server to another. Doing so will fully disconnect the client, bring it back to the main menu and make it connect to the next server.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x55<br />
|rowspan="2"| Client<br />
| Address<br />
| String<br />
| <br />
|-<br />
| Port<br />
| Unsigned Short<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Play Sound ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x56<br />
|rowspan="4"| Client<br />
| Sound name<br />
| String<br />
| <br />
|-<br />
| Sound position<br />
| Position<br />
| <br />
|-<br />
| Volume<br />
| Float<br />
| <br />
|-<br />
| Pitch<br />
| Float<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Stop Sound ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x57<br />
|rowspan="2"| Client<br />
| Sound Name<br />
| String<br />
| <br />
|-<br />
| Stopping All Sound<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Title ====<br />
<br />
Sent by the server to make a title, subtitle or action bar shown to a player. It has several fields that allow setting the duration of the titles.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x58<br />
|rowspan="5"| Client<br />
| Type<br />
| SignedVarInt<br />
| <br />
|-<br />
| Text<br />
| String<br />
| <br />
|-<br />
| Fade In Time<br />
| SignedVarInt<br />
| <br />
|-<br />
| Stay Time<br />
| SignedVarInt<br />
| <br />
|-<br />
| Fade Out Time<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Add Behavior Tree ====<br />
<br />
Sent by the server. Its usage remains unknown, as behavior packs are typically all sent at the start of the game.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x59<br />
|rowspan="1"| Client<br />
| Behavior Tree JSON<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Structure Block Update ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x5A<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== Show Store Offer ====<br />
<br />
Sent by the server to show a Marketplace store offer to a player. It opens a window client-side that displays the item.<br />
<br />
The packet only works on partnered servers: Servers that are not partnered will not have a store button show up on the in-game pause menu and will, as a result, not be able to open store offers on the client side. Sending the packet does therefore not work when using a proxy that is connected to with the domain of one of the partnered servers.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x5B<br />
|rowspan="2"| Client<br />
| Offer Id<br />
| String<br />
| <br />
|-<br />
| Shown To All<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Purchase Receipt ====<br />
<br />
Sent by the client to notify the server it purchased an item from the marketplace store that was offered by the server.<br />
<br />
The packet is only used for partnered servers.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x5C<br />
|rowspan="1"| Server<br />
<br />
|}<br />
<br />
<br />
<br />
==== Player Skin ====<br />
<br />
Sent by the client when it updates its own skin using the in-game skin picker. It is relayed by the server, or sent if the server changes the skin of a player on its own accord. <br />
<br />
Note that the packet can only be sent for players that are in the player list at the time of sending.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x5D<br />
|rowspan="4"| Server & Client<br />
| UUID<br />
| UUID<br />
| <br />
|-<br />
| Skin<br />
| Skin<br />
| <br />
|-<br />
| Skin Name<br />
| String<br />
| <br />
|-<br />
| Old Skin Name<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Sub Client Login ====<br />
<br />
Sent when an additional player attempts to join from a split screen session. The contents of the chain data and skin data fields use the same format as the [[#Login|Login]] packet, and can be decoded the same way.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x5E<br />
|rowspan="2"| Server<br />
| Chain data<br />
| JSON array of JWT Data<br />
| Contains the display name, UUID and XUID<br />
|-<br />
| Skin data<br />
| JWT Data<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Automation Client Connect ====<br />
<br />
Sent by the server to make the client connect to a websocket server. This websocket server has the ability to execute commands on the behalf of the client and it canlisten for certain events fired by the client.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x5F<br />
|rowspan="1"| Client<br />
| Address<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Last Hurt By ====<br />
<br />
Sent by the server to let the client know what entity type it was last hurt by. At this moment, the packet is useless and should not be used. <br />
There is no behaviour that depends on if this packet is sent or not.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x60<br />
|rowspan="1"| Client<br />
| Entity Type Id<br />
| VarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Book Edit ====<br />
<br />
Sent by the client when it edits a book. It is sent each time a modification was made and the player stops its typing 'session', rather than simply after closing the book.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x61<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== NPC Request ====<br />
<br />
Sent by the client when it interacts with an NPC.<br />
<br />
The packet is specifically for Education Edition, where NPCs are available to use. It has no use in the base game.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x62<br />
|rowspan="4"| Server & Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Unknown0<br />
| Byte<br />
| <br />
|-<br />
| Unknown1<br />
| String<br />
| <br />
|-<br />
| Unknown2<br />
| Byte<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Photo Transfer ====<br />
<br />
Sent by the server to transfer a photo (image) file to the client. It is typically used to transfer photos so that the client can display it in a portfolio in Education Edition.<br />
<br />
While previously usable in the base game, the displaying of photos in books was disabled and the packet has little use anymore.<br />
<br />
The packet is specifically for Education Edition. It has no use in the base game.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x63<br />
|rowspan="3"| Server<br />
| File name<br />
| String<br />
| <br />
|-<br />
| Image data<br />
| String<br />
| <br />
|-<br />
| Unknown2<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Model Form Request ====<br />
<br />
Sent by the server to make the client open a form.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x64<br />
|rowspan="2"| Client<br />
| Form Id<br />
| VarInt<br />
| <br />
|-<br />
| Form Data<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Model Form Response ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x65<br />
|rowspan="2"| Server<br />
| Form Id<br />
| VarInt<br />
| <br />
|-<br />
| Form Data<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Server Settings Request ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x66<br />
|rowspan="1"| Server<br />
<br />
|}<br />
<br />
<br />
<br />
==== Server Settings Response ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x67<br />
|rowspan="2"| Client<br />
| Form Id<br />
| VarLong<br />
| <br />
|-<br />
| Form Data<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Show Profile ====<br />
<br />
Sent by the server to show the Xbox Live profile of one player to another.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x68<br />
|rowspan="1"| Client<br />
| Xuid<br />
| String<br />
| If the XUID is invalid, the client ignores the packet<br />
|}<br />
<br />
<br />
<br />
==== Set Default Game Type ====<br />
<br />
Sent by the client when it toggles the default game type in the settings UI, and is sent by the server when it actually changes the default game type, resulting in the toggle being changed in the settings UI.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x69<br />
|rowspan="1"| Client<br />
| Game mode<br />
| VarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Remove Objective ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x6A<br />
|rowspan="1"| Client<br />
| Objective Id<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Display Objective ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x6B<br />
|rowspan="5"| Client<br />
| Display Slot<br />
| String<br />
| <br />
|-<br />
| Objective Id<br />
| String<br />
| <br />
|-<br />
| Display Name<br />
| String<br />
| <br />
|-<br />
| Criteria<br />
| String<br />
| <br />
|-<br />
| Sort Order<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Score ====<br />
<br />
Sent by the server to send the contents of a scoreboard to the player. It may be used to either add, remove or edit entries on the scoreboard.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x6C<br />
|rowspan="2"| Client<br />
| Action<br />
| byte<br />
| 0 (Add), 1 (Remove)<br />
|-<br />
| Entries<br />
| ScoreEntries<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Lab Table ====<br />
<br />
Sent by the client to let the server know it started a chemical reaction in Education Edition, and is sent by the server to allow other clients to show the effects.<br />
<br />
This packet is only functional if Education features are enabled.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x6D<br />
|rowspan="5"| Server & Client<br />
| Unknown Byte 0<br />
| Byte<br />
| <br />
|-<br />
| Block Entity Position X<br />
| VarInt<br />
| <br />
|-<br />
| Block Entity Position Y<br />
| VarInt<br />
| <br />
|-<br />
| Block Entity Position Z<br />
| VarInt<br />
| <br />
|-<br />
| Reaction Type<br />
| Byte<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Update Block Synced ====<br />
<br />
Sent by the server to synchronize the falling of a falling block entity with the transitioning back and forth from and to a solid block. It is used to prevent the entity from flickering, and is used in places such as the pushing of blocks with pistons.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="6"| 0x6E<br />
|rowspan="6"| Client<br />
| Coordinates<br />
| BlockCoordinates<br />
| <br />
|-<br />
| Block Runtime ID<br />
| VarInt<br />
| <br />
|-<br />
| Block Priority<br />
| VarInt<br />
| <br />
|-<br />
| Data Layer ID<br />
| VarInt<br />
| <br />
|-<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Block Synced Type<br />
| VarLong<br />
| 0 - None, 1 - Create, 2 - Destroy<br />
|}<br />
<br />
==== Move Entity Delta ====<br />
<br />
Sent by the server to move an entity by a given delta. The packet is specifically optimized to save as much space as possible, by only writing non-zero fields.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x6F<br />
|rowspan="2"| Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Flags<br />
| Unsigned Short<br />
| <br />
|}<br />
<br />
Flags<br />
{| class="wikitable"<br />
! Field<br />
! Bit<br />
|-<br />
| HAS_X<br />
| 0x01<br />
|-<br />
| HAS_Y<br />
| 0x02<br />
|-<br />
| HAS_Z<br />
| 0x4<br />
|-<br />
| HAS_PITCH<br />
| 0x8<br />
|-<br />
| HAS_YAW<br />
| 0x10<br />
|-<br />
| HAS_ROLL<br />
| 0x20<br />
|}<br />
<br />
<br />
<br />
==== Set Scoreboard Identity ====<br />
<br />
Sent by the server to change the identity type of one of the entries on a scoreboard. This is used to change, for example, an entry pointing to a player, to a fake player when it leaves the server, and to change it back to a real player when it joins again.<br />
<br />
In non-vanilla situations, this packet is quite useless.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x70<br />
|rowspan="2"| Client<br />
| Action<br />
| byte<br />
| 0 (Add), 1 (Remove)<br />
|-<br />
| Entries<br />
| ScoreboardIdentityEntries<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Local Player As Initialized ====<br />
<br />
Sent by the client in response to a [[#Play Status||Play Status]] with the status Player Spawn (3). The packet marks the moment at which the client is fully initialized and can receive any packet without discarding it.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x71<br />
|rowspan="1"| Server<br />
| Runtime Entity Id<br />
| VarLong<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Update Soft Enum ====<br />
<br />
Sent by the server to update a soft enum, also known as a dynamic enum, previous sent in the [[#Available Commands|Available Commands]] packet. It is sent whenever the enum should get new options or when some of its options should be removed.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x72<br />
|rowspan="3"| Client<br />
|-<br />
| Enum Data<br />
| EnumData<br />
| TODO<br />
|-<br />
| Action<br />
| byte<br />
| 0 (Add), 1 (Remove), 2 (Update)<br />
|}<br />
<br />
<br />
<br />
==== Network Stack Latency ====<br />
<br />
Sent by the server (and the client, on development builds) to measure the latency over the entire Minecraft stack, rather than the RakNet latency. <br />
<br />
It has over usages too, such as the ability to be used as some kind of acknowledgement packet, to know when the client has received a certain other packet.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x73<br />
|rowspan="2"| Server & Client<br />
| Timestamp<br />
| Unsigned Long<br />
| <br />
|-<br />
| Send Back<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Script Custom Event ====<br />
<br />
Sent by both the client and server. It is a way to let scripts communicate with the server, so that the client can let the server know it triggered an event, or the other way around.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x75<br />
|rowspan="2"| Server & Client<br />
| Event Name<br />
| String<br />
| <br />
|-<br />
| Data<br />
| String<br />
| Typically a JSON encoded string that the script is able to encode and decode too<br />
|}<br />
<br />
<br />
<br />
==== Spawn Particle Effect ====<br />
<br />
Sent by the server to spawn a particle effect client-side. Unlike other packets that result in the appearing of particles, this packet can show particles that are not hardcoded in the client. They can be added and changed through behavior packs to implement custom particles.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x76<br />
|rowspan="4"| Client<br />
| Dimension Id<br />
| Byte<br />
| <br />
|-<br />
| Unique Entity Id<br />
| SignedVarLong<br />
| <br />
|-<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| Identifier<br />
| String<br />
| The name of the particle<br />
|}<br />
<br />
<br />
<br />
==== Available Entity Identifiers ====<br />
<br />
Sent by the server at the start of the game to let the client know all entities that are on the server.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x77<br />
|rowspan="1"| Client<br />
| NamedTag<br />
| NBT<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Level Sound Event (2) ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="6"| 0x78<br />
|rowspan="6"| Server & Client<br />
| Sound ID<br />
| Byte<br />
| <br />
|-<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| Block Id<br />
| SignedVarInt<br />
| <br />
|-<br />
| Entity Type<br />
| String<br />
| <br />
|-<br />
| Is baby mob<br />
| Boolean<br />
| <br />
|-<br />
| Is global<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Network Chunk Publisher Update ====<br />
<br />
Sent by the server to change the point around which chunks are and remain loaded. <br />
<br />
This is useful for minigame servers, where only one area is ever loaded, in which case the [[#Network Chunk Publisher|Network Chunk Publisher]] packet can be sent in the middle of it, so that no chunks ever need to be additionally sent during the course of the game.<br />
<br />
In reality, the packet is not extraordinarily useful, and most servers just sent it constantly at the position of the player. <br />
<br />
If the packet is not sent at all, no chunk will be shown to the player, regardless of where they are sent.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x79<br />
|rowspan="2"| Client<br />
| Coordinates<br />
| BlockCoordinates<br />
| <br />
|-<br />
| Radius<br />
| VarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Biome Definition List ====<br />
<br />
Sent by the server to let the client know all biomes that are available and implemented on the server side.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x7A<br />
|rowspan="1"| Client<br />
| NamedTag<br />
| NBT<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Level Sound Event (3) ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="6"| 0x7B<br />
|rowspan="6"| Server & Client<br />
| Sound ID<br />
| VarInt<br />
| <br />
|-<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| Block Id<br />
| SignedVarInt<br />
| <br />
|-<br />
| Entity Type<br />
| String<br />
| <br />
|-<br />
| Is baby mob<br />
| Boolean<br />
| <br />
|-<br />
| Is global<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Level Event Generic ====<br />
<br />
Sent by the server to send a 'generic' level event to the client. This packet sends an NBT serialized object and may for that reason be used for any event holding additional data.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x7C<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== Lectern Update ====<br />
<br />
Sent by the client to update the server on which page was opened in a book on a lectern, or if the book should be removed from it.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x7D<br />
|rowspan="4"| Client<br />
| Page<br />
| Byte<br />
| <br />
|-<br />
| Total Pages<br />
| Byte<br />
| <br />
|-<br />
| Block Position<br />
| Position<br />
| <br />
|-<br />
| Dropping Book<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Video Stream Connect ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x7E<br />
|rowspan="5"| Client<br />
| Server URI<br />
| String<br />
| <br />
|-<br />
| Frame Send Frequency<br />
| Float<br />
| <br />
|-<br />
| Action<br />
| Byte<br />
| <br />
|-<br />
| Resolution X<br />
| Int<br />
| <br />
|-<br />
| Resolution Y<br />
| Int<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Client Cache Status ====<br />
<br />
Sent by the client at the start of the game. It is sent to let the server know if it supports the client-side blob cache. Clients such as Nintendo Switch do not support the cache, and attempting to use it anyway will fail.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x81<br />
|rowspan="1"| Server & Client<br />
| Supported<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== On Screen Texture Animation ====<br />
<br />
Sent by the server to show a certain animation on the screen of the player.<br />
The packet is used, for example, for when a raid is triggered and a raid a defeated.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x82<br />
|rowspan="1"| Client<br />
| Animation Type<br />
| Int<br />
|}<br />
<br />
<br />
<br />
==== Map Create Locked Copy ====<br />
<br />
Sent by the server to create a locked copy of a map into another map. It is used in the cartography table to create a map that is locked and cannot be modified.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x83<br />
|rowspan="2"| Client<br />
| Original Map Id<br />
| VarLong<br />
| <br />
|-<br />
| New Map Id<br />
| VarLong<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Structure Template Data Export Request ====<br />
<br />
Sent by the client to request data of a structure.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x84<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== Structure Template Data Export Response ====<br />
<br />
Sent by the server to send data of a structure to the client in response to a [[#Structure Template Data Export Request|Structure Template Data Export Request]] packet.<br />
<br />
TODO<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x85<br />
|rowspan="1"| Client<br />
| Structure Name<br />
| String<br />
| This is the name used to export the structure to a file<br />
|}<br />
<br />
<br />
<br />
==== Update Block Properties ====<br />
<br />
Sent by the server to update the available block properties.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x86<br />
|rowspan="2"| Client<br />
| NamedTag<br />
| NBT<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Client Cache Blob Status ====<br />
<br />
Sent by the client to let the server know what blobs it already has, in an ACK type system.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x87<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== Client Cache Miss Response ====<br />
<br />
Sent by the server in response to a [[#Client Cache Blob Status|Client Cache Blob Status]] and contains the blob data of all blobs that the client acknowledged not to have yet.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x88<br />
|rowspan="1"| Client<br />
| Blobs<br />
| <br />
|<br />
|}<br />
<br />
<br />
<br />
==== Network Settings ====<br />
<br />
Sent by the server to update a variety of network settings. These settings modify the way packets are sent over the network stack.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x8F<br />
|rowspan="2"| Client<br />
| Compression threshold<br />
| Short<br />
| The maximum size of a packet this is compressed when sent. If the size of the packet is under this value, it is not compressed. When set to 0, all packets will be uncompressed.<br />
|}<br />
<br />
<br />
<br />
==== Player Auth Input ====<br />
<br />
Sent by the client to allow for server authoratative movement. It is used to synchronize the player input with the position server-side.<br />
<br />
The client sends this packet when the 'Server Authoritive Movement' field in the [[#Start Game|Start Game]] packet is set to true, instead of the [[#Move Player|Move Player]] packet. The client will send this packet once every tick.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x90<br />
|rowspan="2"| Client<br />
|}<br />
<br />
<br />
<br />
==== Creative Content ====<br />
<br />
Sent by the server to set the creative inventory's content for a player.<br />
<br />
Introduced in 1.16, this packet replaces the previous method of sending an [[#Inventory Content|Inventory Content]] packet with the creative inventory window ID. <b>This packet must be sent from a server after the StartGamePacket since 1.16.100. Otherwise, the client will crash!</b><br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x91<br />
|rowspan="2"| Client<br />
|}<br />
<br />
==== Player Enchant Options ====<br />
<br />
Sent by the server to update the enchantment options displayed when the user opens the enchantment table and puts an item in.<br />
<br />
This packet was added in 1.16 and allows the server to decide on the enchantment that can be selected by a player. The player should be sent once for every slot update of the enchantment table. The vanilla server sends an empty packet when the player first opens the enchantment table (air is is present in the enchantment table slot) and sends a packet with actual enchantments in it when items are put in that can have enchantments.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x92<br />
|rowspan="2"| Client<br />
|}<br />
<br />
<br />
<br />
==== Item Stack Request ====<br />
<br />
Sent by the client to change item stacks in an inventory. <br />
<br />
Added in 1.16, is essentially a replacement of the [[#Inventory Transaction|Inventory Transaction]] packet for inventory specific actions, such as moving items around or crafting.<br />
<br />
The [[#Inventory Transaction|Inventory Transaction]] packet is still used for actions such as placing blocks and interacting with entities.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x93<br />
|rowspan="2"| Client<br />
|}<br />
<br />
<br />
<br />
==== Item Stack Response ====<br />
<br />
Sent by the server in response to an [[#Item Stack Request|Item Stack Request]] packet from the client.<br />
<br />
This packet is used to either approve or reject ItemStackRequests from the client. If a request is approved, the client will simply continue as normal. If rejected, the client will undo the actions so that the inventory should be in sync with the server again.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x94<br />
|rowspan="2"| Client<br />
|}<br />
<br />
<br />
<br />
==== Player Armor Damage ====<br />
<br />
Sent by the server to damage the armor of a player. It is a very efficient packet, but generally it's much easier to just send a slot update for the damaged armor.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x95<br />
|rowspan="2"| Client<br />
|}<br />
<br />
<br />
<br />
==== Code Builder ====<br />
<br />
Sent by the server to open the URL to a Code Builder (websocket) server.<br />
<br />
This packet is only used by Education Edition and have no affect on the base game.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x96<br />
|rowspan="2"| Client<br />
|}<br />
<br />
<br />
<br />
==== Update Player Game Type ====<br />
<br />
Sent by the server to change the game mode of a player. It is functionally identical to the [[#Set Player Game Type|Set Player Game Type]] packet.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x97<br />
|rowspan="2"| Client<br />
|}<br />
<br />
<br />
<br />
==== Emote List ====<br />
<br />
Sent by the client every time it joins the server and when it equips new emotes. It may be used by the server to find out which emotes the client has available. If the player has no emotes equipped, this packet is not sent.<br />
<br />
Under certain circumstances, this packet is also sent from the server to the client, but more testing is needed for this.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x98<br />
|rowspan="2"| Client<br />
|}<br />
<br />
<br />
<br />
==== Position Tracking DB Server Broadcast ====<br />
<br />
Sent by the server in response to the [[#Position Tracking DB Client Request|Position Tracking DB Client Request]] packet. Thus packet is, as of 1.16, currently only for lodestones. The server maintains a database with tracking IDS and their position and dimension. The client will request these tracking IDs, (NBT tag set on the lodestone compass with the tracking ID?) and the server will respond with the status of those tracking IDs.<br />
<br />
What is actually done with the data sent depends on what the client chooses to do with it. For the lodestone compass, it is used to make the compass point towards lodestones and to make it spin if the lodestone at a position is no longer there.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x99<br />
|rowspan="2"| Client<br />
|}<br />
<br />
<br />
<br />
==== Position Tracking DB Client Request ====<br />
<br />
Sent by the client to request the position and dimension of a 'tracking ID'. These IDs are tracked in a database by the server. In 1.16, this is used for lodestones.<br />
<br />
The client will sent this request to find the position a lodestone compass needs to point to. If found, it will point to the lodestone. If not, it will start spinning around.<br />
<br />
A [[#Position Tracking DB Server Broadcast|Position Tracking DB Server Broadcast]] packet should be sent in response to this packet.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x9a<br />
|rowspan="2"| Client<br />
|}<br />
<br />
<br />
<br />
==== Debug Info ====<br />
<br />
Sent by the server. It does not seem to do anything when sent to the normal client in 1.16;<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x9b<br />
|rowspan="2"| Client<br />
|}<br />
<br />
<br />
<br />
==== Packet Violation Warning ====<br />
<br />
Sent by the client when it receives an invalid packet from the server. It holds some information on the error that occured.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x9c<br />
|rowspan="1"| Client<br />
|}<br />
<br />
==== Item Component ====<br />
<br />
Always sent by a vanilla Bedrock server after the StartGamePacket. Sent not empty for items with data driven information.<br />
<br />
In order for the information in this packet to be used, the experiment data titled <code>data_driven_items</code> must be set to <code>true</code> in the ResourcePackStackPacket (as of 1.16.100), and the item entry in StartGamePacket must have its component toggle set to <code>true</code>.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0xA2<br />
|rowspan="2"| Client<br />
| Items<br />
| ComponentItemData[]<br />
| A list of all item components.<br />
|}<br />
<br />
ComponentItemData takes in a String identifier and an NBT CompoundTag containing item data. Valid, minimal NBT data looks like the following (Any comments are preceded with <code>//</code>):<br />
<br />
<syntaxhighlight lang="json"><br />
{<br />
"components": {<br />
"item_properties": {<br />
"allow_off_hand": 1b,<br />
"hand_equipped": 1b,<br />
"max_stack_size": 1i<br />
},<br />
"minecraft:icon": {<br />
"texture": "example_item" // Required even with a resource pack, or else the client complains about icon texture<br />
}<br />
},<br />
"id": 1020i, // The runtime ID of the item<br />
"name": "wikivg:example_item"<br />
}<br />
</syntaxhighlight><br />
<br />
A list of all known valid item properties (and descriptions, if added):<br />
<br />
{| class="wikitable"<br />
! Property name<br />
! Property type<br />
! Property description<br />
|-<br />
| allow_off_hand<br />
| boolean<br />
| If the item is permitted in the offhand inventory slot.<br />
|-<br />
| animates_in_toolbar<br />
| boolean<br />
|<br />
|-<br />
| can_destroy_in_creative<br />
| boolean<br />
|<br />
|-<br />
| creative_category<br />
| integer<br />
| 1 is the construction, 2 is the nature, 3 is the equipment, 4 is the items, the default value is 1<br />
|-<br />
| creative_group <br />
| string<br />
| TODO<br />
|-<br />
| damage<br />
| integer<br />
| shows the number of damge attacks<br />
|-<br />
| enchantable_slot<br />
| string<br />
|<br />
|-<br />
| enchantable_value<br />
| integer<br />
|<br />
|-<br />
| explodable<br />
| boolean<br />
|<br />
|-<br />
| foil<br />
| boolean<br />
|<br />
|-<br />
| frame_count<br />
| integer<br />
|<br />
|-<br />
| hand_equipped<br />
| boolean<br />
| If the item should be visually held like a tool.<br />
|-<br />
| ignores_permissions<br />
| boolean<br />
|<br />
|-<br />
| liquid_clipped<br />
| boolean<br />
| gives the possibility to click on a liquid<br />
|-<br />
| max_stack_size<br />
| integer<br />
| The maximum amount of this item that can be in an inventory slot.<br />
|-<br />
| mining_speed<br />
| float<br />
|<br />
|-<br />
| mirrored_art<br />
| boolean<br />
|<br />
|-<br />
| requires_interact<br />
| boolean<br />
|<br />
|-<br />
| should_despawn<br />
| boolean<br />
|<br />
|-<br />
| stacked_by_data<br />
| boolean<br />
|<br />
|-<br />
| use_animation<br />
| integer<br />
|<br />
|-<br />
| use_duration<br />
| integer<br />
|<br />
|-<br />
|}<br />
<br />
Other item components can be found here: https://bedrock.dev/docs/stable/Item#Item%20Components (Add these in the same format as <code>minecraft:icon</code> shown above). Also see: https://wiki.bedrock.dev/concepts/items<br />
<br />
[[Category:Bedrock Minecraft]]</div>Orladoghttps://wiki.vg/index.php?title=Bedrock_Protocol&diff=16272Bedrock Protocol2021-01-05T18:33:22Z<p>Orladog: Fix rowspan of Packet Violation Warning</p>
<hr />
<div>:: '''Remember that this page is a WIP'''. Come back later to see a more complete page.<br />
----<br />
<br />
{{Box<br />
|BORDER = #9999FF<br />
|BACKGROUND = #99CCFF<br />
|WIDTH = 100%<br />
|ICON = <br />
|HEADING = Heads up!<br />
|CONTENT = This article is about the protocol for the release of Minecraft '''Bedrock Edition''' ([[Bedrock Protocol version numbers|1.16.20, protocol 408]]). See [[Protocol]] for the Java Edition Protocol.<br />
}}<br />
<br />
This is the [https://minecraft.gamepedia.com/Bedrock_Edition Bedrock Edition] Protocol Documentation.<br />
The Bedrock Edition Protocol uses [[wikipedia:User Datagram Protocol|UDP]] instead of [[wikipedia:Transmission Control Protocol|TCP]] that is used for the Java Edition.<br />
Bedrock Edition uses [[Raknet Protocol|RakNet]] as its protocol library.<br />
<br />
The default Bedrock Edition port is 19132.<br />
<br />
Information for this page was obtained from the [https://github.com/NukkitX/Protocol NukkitX Protocol library], [https://github.com/NiclasOlofsson/MiNET MiNET] and [https://github.com/Sandertv/gophertunnel gophertunnel].<br />
<br />
== Data types ==<br />
<br />
{| class="wikitable"<br />
|-<br />
!<br />
! Size (Bytes)<br />
! Range<br />
! Notes<br />
|-<br />
! Byte<br />
| 1<br />
| 0 to 255<br />
|<br />
|-<br />
! Boolean<br />
| 1<br />
| 0 or 1<br />
| A Byte treated as boolean, 0 is false but anything greater then that is true<br />
|-<br />
! Short<br />
| 2<br />
| -32768 to 32767<br />
|<br />
|-<br />
! Unsigned Short<br />
| 2<br />
| 0 to 65535<br />
|<br />
|-<br />
! Int<br />
| 4<br />
| -2147483648 to 2147483647<br />
| Signed little-endian 32-bit Integer<br />
|-<br />
! Int (big endian)<br />
| 4<br />
| -2147483648 to 2147483647<br />
| Signed big-endian 32-bit Integer<br />
|-<br />
! Unsigned Int<br />
| 4<br />
| 0 to 4294967295<br />
| Unsigned 32-bit Integer<br />
|-<br />
! Long<br />
| 8<br />
| -2^63 to 2^63-1<br />
| Signed 64-bit Integer<br />
|-<br />
! Unsigned Long<br />
| 8<br />
| 2^64-1<br />
| Unsigned 64-bit Integer<br />
|-<br />
! Float<br />
| 4<br />
| <br />
| A [[wikipedia:Single-precision_Floating-poInt_format|single-precision 32-bit IEEE 754 Floating poInt number]]<br />
|-<br />
! Double<br />
| 8<br />
| <br />
| A [[wikipedia:Double-precision_Floating-poInt_format|Double-precision 64-bit IEEE 754 Floating poInt number]]<br />
|-<br />
! VarInt<br />
| &ge; 1<br>&le; 5<br />
| 0 to 4294967295<br />
| <br />
|-<br />
! SignedVarInt<br />
| &ge; 1<br>&le; 5<br />
| -2147483648 and 2147483647<br />
| <br />
|-<br />
! VarLong<br />
| &ge; 1<br>&le; 10<br />
| <br />
|<br />
|-<br />
! SignedVarLong<br />
| &ge; 1<br>&le; 10<br />
| -2^63 and 2^63-1<br />
|<br />
|-<br />
! String<br />
| <br />
| <br />
| [[wikipedia:UTF-8|UTF-8]] String prefixed with its size in Bytes as a VarInt. This has the same data structure as a ByteArray but it contains textual data.<br />
|-<br />
! Vector3<br />
| 12<br />
| <br />
| Three Float values (X, Y and Z respectively)<br />
|-<br />
! Vector2<br />
| 8<br />
| <br />
| Two Float values (X and Y respectively)<br />
|-<br />
! NBT<br />
| <br />
| <br />
| <br />
|-<br />
! ByteArray<br />
| <br />
| <br />
| An arbitrary array of Bytes prefixed with its size in Bytes as a VarInt.<br />
|-<br />
! BlockCoordinates<br />
| &ge; 3<br>&le; 15<br />
| <br />
| A SignedVarInt, a normal VarInt and another SignedVarInt (X, Y and Z respectively)<br />
|-<br />
! PlayerLocation<br />
| 15<br />
| <br />
| Three Float values (X, Y and Z respectively), followed by three Bytes (pitch, head yaw and yaw respectively). To convert the Bytes to normal pitch and yaw values divide them by 0.71<br />
|-<br />
! UUID<br />
| 16<br />
| A [[wikipedia:Universally_unique_identifier|UUID]]<br />
| Encoded as two unsigned 64-bit Integers: the most significant 64 bits and the least significant 64 bits<br />
|}<br />
<br />
== Packet Format ==<br />
<br />
Bedrock Edition uses [[Raknet Protocol|RakNet]] as its protocol library, so the packets are sent that way. The UDP protocol specifies packet length, so unlike Java Edition and TCP which deal with raw data streams packets are not length-prefixed. Packets seem to always use compression and can also use encryption. Multiple packets can also be batched into a single packet.<br />
Packet compression uses [https://zlib.net/ zlib], and it seems that packet data can be fed directly into zlib (after being decrypted if encryption is enabled).<br />
<br><br><br />
Refer to [https://github.com/Sandertv/gophertunnel/blob/19c96251a36a39d9ffb938053410852e811755e3/minecraft/protocol/packet/decoder.go#L58 gophertunnel] for more information.<br />
<br />
== Login process ==<br />
The login process is as follows:<br />
# C→S: [[#Login|Login]]<br />
# S→C: [[#Server To Client Handshake|Server To Client Handshake]]<br />
# C→S: [[#Client To Server Handshake|Client To Server Handshake]]<br />
# S→C: [[#Play Status|Play Status]] (Login success)<br />
<br />
To spawn, the following packets should be sent, in order, after the ones above:<br />
# S→C: [[#Resource Packs Info|Resource Packs Info]]<br />
# C→S: [[#Resource Pack Client Response|Resource Pack Client Response]]<br />
# S→C: [[#Resource Pack Stack|Resource Pack Stack]]<br />
# C→S: [[#Resource Pack Client Response|Resource Pack Client Response]]<br />
# S→C: [[#Start Game|Start Game]]<br />
# S→C: [[#Creative Content|Creative Content]]<br />
# S→C: [[#Biome Definition List|Biome Definition List]]<br />
# S→C: Chunks<br />
# S→C: [[#Play Status|Play Status]] (Player spawn)<br />
<br />
If there are no resource packs being sent, a [[#Resource Pack Stack|Resource Pack Stack]] can be sent directly after [[#Resource Packs Info|Resource Packs Info]] to avoid the client responses.<br />
<br />
== Packets ==<br />
Please note that some packet ids are missing, so they don't line up.<br />
The following packet ids are missing:<br />
0x10, 0x74, 0x7F, 0x80<br />
(16, 116, 127, 128)<br />
<br />
<br />
==== Login ====<br />
<br />
Sent when the client initially tries to join the server. It is the first packet sent and contains information specific to the player.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x01<br />
|rowspan="3"| Server<br />
| Protocol version<br />
| Int (big-endian)<br />
| <br />
|-<br />
| Chain data<br />
| JSON array of JWT Data<br />
| Contains the display name, UUID and XUID<br />
|-<br />
| Skin data<br />
| JWT Data<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Play Status ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x02<br />
|rowspan="1"| Client<br />
| Status<br />
| Int (big-endian)<br />
| The current status of the connection.<br />
|}<br />
<br />
The values for each status are as follows:<br />
{| class="wikitable"<br />
! Status<br />
! Name<br />
! Notes<br />
|-<br />
| 0<br />
| Login success<br />
| Sent after [[#Login|Login]] has been successfully decoded and the player has logged in<br />
|-<br />
| 1<br />
| Failed client<br />
| Displays "Could not connect: Outdated client!"<br />
|-<br />
| 2<br />
| Failed server<br />
| Displays "Could not connect: Outdated server!"<br />
|-<br />
| 3<br />
| Player spawn<br />
| Sent after world data to spawn the player<br />
|-<br />
| 4<br />
| Failed invalid Tenant<br />
| Displays "Unable to connect to world. Your school does not have access to this server."<br />
|-<br />
| 5<br />
| Failed Vanilla Edu.<br />
| Displays "The server is not running Minecraft: Education Edition. Failed to connect."<br />
|-<br />
| 6<br />
| Failed Edu. Vanilla<br />
| Displays "The server is running an incompatible edition of Minecraft. Failed to connect."<br />
|-<br />
| 7<br />
| Failed server full<br />
| Displays "Wow this server is popular! Check back later to see if space opens up. Server Full"<br />
|}<br />
<br />
==== Server To Client Handshake ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x03<br />
|rowspan="1"| Client<br />
| JWT data<br />
| JWT String<br />
| Contains the salt to complete the Diffie-Hellman key exchange<br />
|}<br />
<br />
<br />
<br />
==== Client To Server Handshake ====<br />
<br />
Sent by the client in response to a [[#Server To Client Handshake|Server To Client Handshake]] packet sent by the server. It is the first encrypted packet in the login handshake and serves as a confirmation that encryption is correctly initialized client side. It has no fields.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x04<br />
|rowspan="1"| Server<br />
<br />
|}<br />
<br />
<br />
<br />
==== Disconnect ====<br />
<br />
Sent by the server to disconnect a client.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x05<br />
|rowspan="2"| Client<br />
| Hide disconnect screen<br />
| Boolean<br />
| Specifies if the disconnection screen should be hidden when the client is disconnected, meaning it will be sent directly to the main menu.<br />
|-<br />
| Kick message<br />
| String<br />
| An optional message to show when disconnected.<br />
|}<br />
<br />
<br />
<br />
==== Resource Packs info ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x06<br />
|rowspan="4"| Client<br />
| Forced to Accept<br />
| Boolean<br />
| If the resource pack requires the client accept it.<br />
|-<br />
| Scripting Enabled<br />
| Boolean<br />
| If scripting is enabled.<br />
|-<br />
| BehahaviorPackInfos<br />
| ResourcePackInfo[]<br />
| A list of behaviour packs that the client needs to download before joining the server. All of these behaviour packs will be applied together.<br />
|-<br />
| ResourcePackInfos<br />
| ResourcePackInfo[]<br />
| A list of resource packs that the client needs to download before joining the server. The order of these resource packs is not relevant in this packet. It is however important in the Resource Pack Stack packet.<br />
|}<br />
<br />
<br />
<br />
==== Resource Pack Stack ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! colspan="2" | Field Name<br />
! colspan="2" | Field Type<br />
! Notes<br />
|-<br />
| rowspan="11" | 0x07<br />
| rowspan="11" | Client<br />
| colspan="2" | Forced to Accept<br />
| colspan="2" | Boolean<br />
| If the resource pack must be accepted for the player to join the server.<br />
|-<br />
! Resource Pack Entry<br />
! Field Name<br />
! colspan="2" | <br />
! <br />
|-<br />
| rowspan="3" | Array<br />
| Pack ID<br />
| colspan="2" | String<br />
| The ID of the resource pack.<br />
|-<br />
| Pack Version<br />
| colspan="2" | String<br />
| The version of the resource pack.<br />
|-<br />
| Subpack Name<br />
| colspan="2" | String<br />
| The subpack name of the resource pack.<br />
|-<br />
! Behavior Pack Entry<br />
! Field Name<br />
! colspan="2" | <br />
! <br />
|-<br />
| rowspan="3" | Array<br />
| Pack ID<br />
| colspan="2" | String<br />
| The ID of the resource pack.<br />
|-<br />
| Pack Version<br />
| colspan="2" | String<br />
| The version of the resource pack.<br />
|-<br />
| Subpack Name<br />
| colspan="2" | String<br />
| The subpack name of the resource pack.<br />
|-<br />
| colspan="2" | Experimental<br />
| colspan="2" | Boolean<br />
| If the sent resource and behavior packs are experimental.<br />
|-<br />
| colspan="2" | Game Version<br />
| colspan="2" | String<br />
| The version of the game the sent resource and behavior packs were made for.<br />
|}<br />
<br />
<br />
<br />
==== Resource Pack Response ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x08<br />
|rowspan="2"| Server<br />
| Status<br />
| Byte<br />
| See below<br />
|-<br />
| Pack IDs<br />
| ResourcePackIds<br />
| All of the pack IDs.<br />
|}<br />
<br />
The values for each status are as follows:<br />
{| class="wikitable"<br />
! Status<br />
! Name<br />
! Notes<br />
|-<br />
| 0<br />
| None<br />
| <br />
|-<br />
| 1<br />
| Refused<br />
| <br />
|-<br />
| 2<br />
| Send packs<br />
|<br />
|-<br />
| 3<br />
| Have all packs<br />
| <br />
|-<br />
| 4<br />
| Completed<br />
|<br />
|}<br />
<br />
<br />
<br />
==== Text ====<br />
<br />
Sent by the client to the server to send chat messages, and by the server to the client to forward or send messages, which may be chat, popups, tips etc.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! colspan="2" | Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| rowspan="9" | 0x09<br />
| rowspan="9" | Server &amp; Client<br />
| colspan="2" | Type<br />
| Byte<br />
| The type of chat message sent.<br />
|-<br />
| colspan="2" | Needs Translation<br />
| Boolean<br />
| If the message sent is a translation key and needs to be translated.<br />
|-<br />
! Chat Type ID<br />
! Text<br />
! <br />
! Derived from above; values sent here change depending on that.<br />
|-<br />
| rowspan="1" | 0, 1, or 2<br />
| rowspan="1" | Source Name<br />
| rowspan="1" | String<br />
| rowspan="1" | The name of the source.<br />
|-<br />
|-<br />
|-<br />
| rowspan="1" | 3, 4, or 5<br />
| rowspan="1" | Message<br />
| rowspan="1" | String<br />
| rowspan="1" | The message sent with the packet.<br />
|-<br />
|-<br />
|-<br />
|-<br />
| rowspan="2" | 6, 7, or 8<br />
| Message<br />
| String<br />
| The message sent with the packet<br />
|-<br />
| Parameters<br />
| Array<br />
| The parameters sent with the packet. This usually includes translation parameters or similar types depending on what kind of chat type was sent.<br />
|-<br />
| colspan="2" | XUID<br />
| Optional String<br />
| The XUID of the player who sent this message.<br />
|-<br />
| colspan="2" | Platform Chat ID<br />
| Optional String<br />
| The platform chat ID of the sent message.<br />
|}<br />
<br />
{| class="wikitable"<br />
! ID<br />
! Chat Type<br />
|-<br />
| 0<br />
| Raw<br />
|-<br />
| 1<br />
| Chat<br />
|-<br />
| 2<br />
| Translation<br />
|-<br />
| 3<br />
| Popup<br />
|-<br />
| 4<br />
| Jukebox Popup<br />
|-<br />
| 5<br />
| Tip<br />
|-<br />
| 6<br />
| System<br />
|-<br />
| 7<br />
| Whisper<br />
|-<br />
| 8<br />
| Announcement<br />
|-<br />
| 9<br />
| Object<br />
|-<br />
| 10<br />
| Object Whisper<br />
|}<br />
<br />
For additional information and examples of all the chat types above, see here: https://imgur.com/a/KhcFscg<br />
<br />
<br />
<br />
==== Set Time ====<br />
<br />
Sent by the server to update the current time client-side. The client actually advances time client-side by itself, so this packet does not need to be sent each tick. It is merely a means of synchronizing time between server and client.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x0A<br />
|rowspan="1"| Client<br />
| Time<br />
| SignedVarInt<br />
| Time is the current time. The time is not limited to 24000 (time of day), but continues progressing after that.<br />
|}<br />
<br />
<br />
<br />
==== Start Game ====<br />
<br />
Sent by the server to send information about the world the player will be spawned in.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="47"| 0x0B<br />
|rowspan="47"| Client<br />
| Entity ID Self<br />
| SignedVarLong<br />
| The unique ID of the player. The unique ID is a value that remains consistent across different sessions of the same world, but most unofficial servers simply fill the runtime ID of the entity out for this field.<br />
|-<br />
| Runtime Entity ID<br />
| VarLong<br />
| The runtime ID of the player. The runtime ID is unique for each world session, and entities are generally identified in packets using this runtime ID.<br />
|-<br />
| Player Gamemode<br />
| SignedVarInt<br />
|-<br />
| Spawn<br />
| Vector3<br />
| The spawn position of the player in the world. In servers this is often the same as the world's spawn position found below.<br />
|-<br />
| Rotation<br />
| Vector2<br />
| The pitch and yaw of the player<br />
|-<br />
| Seed<br />
| SignedVarInt<br />
| The seed used to generate the world. Unlike in Java edition, the seed is a 32bit Integer here.<br />
|-<br />
| Spawn Biome Type<br />
| Short<br />
| <br />
|-<br />
| Custom Biome Name<br />
| String<br />
| <br />
|-<br />
| Dimension<br />
| SignedVarInt<br />
| Dimension is the ID of the dimension that the player spawns in. It is a value from 0-2, with 0 being the overworld, 1 being the nether and 2 being the end.<br />
|-<br />
| Generator<br />
| SignedVarInt<br />
| Generator is the generator used for the world. It is a value from 0-4, with 0 being old limited worlds, 1 being infinite worlds, 2 being flat worlds, 3 being nether worlds and 4 being end worlds. A value of 0 will actually make the client stop rendering chunks you send beyond the world limit.<br />
|-<br />
| World Gamemode<br />
| SignedVarInt<br />
| The game mode that a player gets when it first spawns in the world. It is shown in the settings and is used if the Player Gamemode is set to 5.<br />
|-<br />
| Difficulty<br />
| SignedVarInt<br />
| Difficulty is the difficulty of the world. It is a value from 0-3, with 0 being peaceful, 1 being easy, 2 being normal and 3 being hard.<br />
|-<br />
| World Spawn<br />
| BlockCoordinates <br />
| The block on which the world spawn of the world. This coordinate has no effect on the place that the client spawns, but it does have an effect on the direction that a compass poInts.<br />
|-<br />
| Has achievements disabled<br />
| Boolean<br />
| Defines if achievements are disabled in the world. The client crashes if this value is set to true while the player's or the world's game mode is creative, and it's recommended to simply always set this to false as a server.<br />
|-<br />
| Day cycle stop time<br />
| SignedVarInt<br />
| The time at which the day cycle was locked if the day cycle is disabled using the respective game rule. The client will maIntain this time as Boolean as the day cycle is disabled.<br />
|-<br />
| EDU offer<br />
| SignedVarInt<br />
| Some Minecraft: Education Edition field that specifies what 'region' the world was from, with 0 being None, 1 being RestOfWorld, and 2 being China. The actual use of this field is unknown.<br />
|-<br />
| Has Education Edition features enabled<br />
| Boolean<br />
| Specifies if the world has education edition features enabled, such as the blocks or entities specific to education edition.<br />
|-<br />
| Education Production ID<br />
| String<br />
|<br />
|-<br />
| Rain level<br />
| Float<br />
| The level specifying the Intensity of the rain falling. When set to 0, no rain falls at all.<br />
|-<br />
| Lightning level<br />
| Float<br />
| The level specifying the Intensity of the thunder. This may actually be set independently from the rain level, meaning dark clouds can be produced without rain.<br />
|-<br />
| Has Confirmed Platform Locked Content<br />
| Boolean<br />
| <br />
|-<br />
| Is Multiplayer<br />
| Boolean<br />
| Specifies if the world is a multi-player game. This should always be set to true for servers.<br />
|-<br />
| Broadcast To LAN<br />
| Boolean<br />
| Specifies if LAN broadcast was Intended to be enabled for the world.<br />
|-<br />
| Xbox Live Broadcast Mode<br />
| VarInt<br />
| The mode used to broadcast the joined game across XBOX Live.<br />
|-<br />
| Platform Broadcast Mode<br />
| VarInt<br />
| The mode used to broadcast the joined game across the platform.<br />
|-<br />
| Enable commands<br />
| Boolean<br />
| If commands are enabled for the player. It is recommended to always set this to true on the server, as setting it to false means the player cannot, under any circumstance, use a command.<br />
|-<br />
| Are texture packs required<br />
| Boolean<br />
| Specifies if the texture pack the world might hold is required, meaning the client was forced to download it before joining.<br />
|-<br />
| GameRules<br />
| GameRules<br />
| Defines game rules currently active with their respective values. The value of these game rules may be either 'bool', 'Int32' or 'Float32'. Some game rules are server side only, and don't necessarily need to be sent to the client.<br />
|-<br />
| Bonus Chest<br />
| Boolean<br />
| Specifies if the world had the bonus map setting enabled when generating it. It does not have any effect client-side.<br />
|-<br />
| Map Enabled<br />
| Boolean<br />
| Specifies if the world has the start with map setting enabled, meaning each joining player obtains a map. This should always be set to false, because the client obtains a map all on its own accord if this is set to true.<br />
|-<br />
| Permission Level<br />
| SignedVarInt<br />
| The permission level of the player. It is a value from 0-3, with 0 being visitor, 1 being member, 2 being operator and 3 being custom.<br />
|-<br />
| Server Chunk Tick Range<br />
| Int<br />
| The radius around the player in which chunks are ticked. Most servers set this value to a fixed number, as it does not necessarily affect anything client-side.<br />
|-<br />
| Has Locked Behavior Pack<br />
| Boolean<br />
| Specifies if the texture pack of the world is locked, meaning it cannot be disabled from the world. This is typically set for worlds on the marketplace that have a dedicated texture pack.<br />
|-<br />
| Has Locked Resource Pack<br />
| Boolean<br />
| Specifies if the texture pack of the world is locked, meaning it cannot be disabled from the world. This is typically set for worlds on the marketplace that have a dedicated texture pack.<br />
|-<br />
| Is From Locked World Template<br />
| Boolean<br />
| Specifies if the world from the server was from a locked world template. For servers this should always be set to false.<br />
|-<br />
| Use MSA Gamertags Only<br />
| Boolean<br />
| <br />
|-<br />
| Is From World Template<br />
| Boolean<br />
| Specifies if the world from the server was from a locked world template. For servers this should always be set to false.<br />
|-<br />
| Is World Template Option Locked<br />
| Boolean<br />
| Specifies if the world was a template that locks all settings that change properties above in the settings GUI. It is recommended to set this to true for servers that do not allow things such as setting game rules through the GUI.<br />
|-<br />
| Only Spawn V1 Villagers<br />
| Boolean<br />
| A hack that Mojang put in place to preserve backwards compatibility with old villagers. The his never actually read though, so it has no functionality.<br />
|-<br />
| Game Version<br />
| String<br />
| The version of the game from which Vanilla features will be used. The exact function of this field isn't clear.<br />
|-<br />
| Limited World Width<br />
| Int<br />
|<br />
|-<br />
| Limited World Height<br />
| Int<br />
|<br />
|-<br />
| Is Nether Type<br />
| Boolean<br />
|<br />
|-<br />
| Is Force Experimental Gameplay<br />
| Boolean<br />
|<br />
|-<br />
| Level ID<br />
| String<br />
| A base64 encoded world ID that is used to identify the world.<br />
|-<br />
| World name<br />
| String<br />
| The name of the world that the player is joining. Note that this field shows up above the player list for the rest of the game session, and cannot be changed. Setting the server name to this field is recommended.<br />
|-<br />
| Premium World Template Id<br />
| String<br />
| A UUID specific to the premium world template that might have been used to generate the world. Servers should always fill out an empty String for this.<br />
|-<br />
| Is Trial<br />
| Boolean<br />
| Specifies if the world was a trial world, meaning features are limited and there is a time limit on the world.<br />
|-<br />
| Is Server Side movement enabled<br />
| Boolean<br />
| Specifies if the server is authoritative over the movement of the player, meaning it controls the movement of it.<br />
|-<br />
| Current Tick<br />
| Boolean<br />
| The total time in ticks that has elapsed since the start of the world.<br />
|-<br />
| Enchantment Seed<br />
| SignedVarInt<br />
| The seed used to seed the random used to produce enchantments in the enchantment table. Note that the exact correct random implementation must be used to produce the correct results both client- and server-side.<br />
|-<br />
| Block Palette<br />
| BlockPalette<br />
| A list of all blocks registered on the server.<br />
|-<br />
| Itemstates<br />
| Itemstates<br />
| A list of all items with their legacy IDs which are available in the game. Failing to send any of the items that are in the game will crash mobile clients.<br />
|-<br />
| Multiplayer Correlation ID<br />
| String<br />
| A unique ID specifying the multi-player session of the player. A random UUID should be filled out for this field.<br />
|}<br />
<br />
<br />
<br />
==== Add Player ====<br />
<br />
Sent by the server to make a player entity show up client-side. It is one of the few entities that cannot be sent using the [[#Add Entity|Add Entity]] packet.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="19"| 0x0C<br />
|rowspan="19"| Client<br />
| UUID<br />
| UUID<br />
| UUID is the UUID of the player. It is the same UUID that the client sent in the Login packet at the start of the session. A player with this UUID must exist in the player list (built up using the Player List packet) for it to show up in-game.<br />
|-<br />
| Username<br />
| String<br />
| Username is the name of the player. This username is the username that will be set as the initial name tag of the player.<br />
|-<br />
| Entity ID Self<br />
| SignedVarLong<br />
| The unique ID of the player. The unique ID is a value that remains consistent across different sessions of the same world, but most unoffical servers simply fill the runtime ID of the player out for this field.<br />
|-<br />
| Runtime Entity ID<br />
| VarLong<br />
| The runtime ID of the player. The runtime ID is unique for each world session, and entities are generally identified in packets using this runtime ID.<br />
|-<br />
| Platform Chat ID<br />
| String<br />
| An identifier only set for particular platforms when chatting (presumably only for Nintendo Switch). It is otherwise an empty string, and is used to decide which players are able to chat with each other.<br />
|-<br />
| Position<br />
| Vector3<br />
| The position to spawn the player at. If the player is at a distance that the viewer cannot see, the player will still show up if the viewer moves closer.<br />
|-<br />
| Velocity<br />
| Vector3<br />
| The initial velocity the player spawns with. This velocity will initiate client side movement of the player.<br />
|-<br />
| Rotation<br />
| Float<br />
| Pitch, yaw and head yaw<br />
|-<br />
| Held Item<br />
| Item<br />
| The item that the player is holding. The item is shown to the viewer as soon as the player itself shows up. Needless to say that this field is rather pointless, as additional packets still must be sent for armour to show up.<br />
|-<br />
| Metadata<br />
| MetadataDictionary<br />
| A map of entity metadata, which includes flags and data properties that alter in particular the way the player looks. Flags include ones such as 'on fire' and 'sprinting'. The metadata values are indexed by their property key.<br />
|-<br />
| Flags<br />
| VarInt<br />
| Flags is a set of flags that specify certain properties of the player, such as whether or not it can fly and/or move through blocks.<br />
|-<br />
| Command permission<br />
| VarInt<br />
| A set of permissions that specify what commands a player is allowed to execute.<br />
|-<br />
| Action Permissions<br />
| VarInt<br />
| Action Permissions is, much like Flags, a set of flags that specify actions that the player is allowed to undertake, such as whether it is allowed to edit blocks, open doors etc.<br />
|-<br />
| Permission Level<br />
| VarInt<br />
| The permission level of the player as it shows up in the player list built up using the PlayerList packet.<br />
|-<br />
| Custom stored permissions<br />
| VarInt<br />
| <br />
|-<br />
| User Id<br />
| Long<br />
| A unique identifier of the player. It appears it is not required to fill this field out with a correct value. Simply writing 0 seems to work.<br />
|-<br />
| Links<br />
| Links<br />
| A list of entity links that are currently active on the player. These links alter the way the player shows up when first spawned in terms of it shown as riding an entity. Setting these links is important for new viewers to see the player is riding another entity.<br />
|-<br />
| Device ID<br />
| String<br />
| The device ID set in one of the files found in the storage of the device of the player. It may be changed freely, so it should not be relied on for anything.<br />
|-<br />
| Device OS<br />
| Int<br />
| The build platform/device OS of the player that is about to be added, as it sent in the Login packet when joining.<br />
|}<br />
<br />
<br />
<br />
==== Add Entity ====<br />
<br />
Sent by the server to spawn an entity to the player. It is used for every entity except other players, paintings and items, for which the [[#Add Player|Add Player]], [[#Add Painting|Add Painting]] and [[#Add Item Entity|Add Item Entity]] packets are used.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="9"| 0x0D<br />
|rowspan="9"| Client<br />
| Entity ID Self<br />
| SignedVarLong<br />
| The unique ID of the entity. The unique ID is a value that remains consistent across different sessions of the same world, but most unofficial servers simply fill the runtime ID of the entity out for this field.<br />
|-<br />
| Runtime Entity ID<br />
| VarLong<br />
| The runtime ID of the entity. The runtime ID is unique for each world session, and entities are generally identified in packets using this runtime ID.<br />
|-<br />
| Entity Type<br />
| String<br />
| The string entity type of the entity, for example 'minecraft:skeleton'.<br />
|-<br />
| Position<br />
| Vector3<br />
| The position to spawn the entity at. If the entity is at a distance that the player cannot see, the entity will still show up if the player moves closer.<br />
|-<br />
| Velocity<br />
| Vector3<br />
| The initial velocity the entity spawns with. This velocity will initiate client side movement of the entity.<br />
|-<br />
| Rotation<br />
| Vector3<br />
| Pitch, yaw and head yaw<br />
|-<br />
| Attributes<br />
| EntityAttributes<br />
| A slice of attributes that the entity has. It includes attributes such as its health, movement speed, etc.<br />
|-<br />
| Metadata<br />
| MetadataDictionary<br />
| A map of entity metadata, which includes flags and data properties that alter in particular the way the entity looks. Flags include ones such as 'on fire' and 'sprinting'. The metadata values are indexed by their property key.<br />
|-<br />
| Links<br />
| Links<br />
| A list of entity links that are currently active on the entity. These links alter the way the entity shows up when first spawned in terms of it shown as riding an entity. Setting these links is important for new viewers to see the entity is riding another entity.<br />
|}<br />
<br />
<br />
<br />
==== Remove Entity ====<br />
<br />
Sent by the server to remove an entity that currently exists in the world from the client-side. Sending this packet if the client cannot already see this entity will have no effect.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x0E<br />
|rowspan="1"| Client<br />
| Unique Entity Id<br />
| SignedVarLong<br />
| The unique ID of the entity to be removed. The unique ID is a value that remains consistent across different sessions of the same world, but most unofficial servers simply fill the runtime ID of the entity out for this field.<br />
|}<br />
<br />
<br />
<br />
==== Add Item Entity ====<br />
<br />
Sent by the server to make an item entity show up. It is one of the few entities that cannot be sent using the [[#Add Entity|Add Entity]] packet.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="7"| 0x0F<br />
|rowspan="7"| Client<br />
| Entity ID Self<br />
| SignedVarLong<br />
| The unique ID of the entity. The unique ID is a value that remains consistent across different sessions of the same world, but most unofficial servers simply fill the runtime ID of the entity out for this field.<br />
|-<br />
| Runtime Entity ID<br />
| VarLong<br />
| The runtime ID of the entity. The runtime ID is unique for each world session, and entities are generally identified in packets using this runtime ID.<br />
|-<br />
| Item<br />
| Item<br />
| The item that is spawned. It must have a valid ID for it to show up client-side. If it is not a valid item, the client will crash when coming near.<br />
|-<br />
| Position<br />
| Vector3<br />
| The position to spawn the entity on. If the entity is at a distance that the player cannot see, the entity will still show up if the player moves closer.<br />
|-<br />
| Velocity<br />
| Vector3<br />
| The initial velocity the entity spawns with. This velocity will initiate client side movement of the entity.<br />
|-<br />
| Metadata<br />
| MetadataDictionary<br />
| A map of entity metadata, which includes flags and data properties that alter in particular the way the entity looks. Flags include ones such as 'on fire' and 'sprinting'. The metadata values are indexed by their property key.<br />
|-<br />
| Is From Fishing<br />
| Boolean<br />
| Specifies if the item was obtained by fishing it up using a fishing rod. It is not clear why the client needs to know this.<br />
|}<br />
<br />
<br />
<br />
==== Take Item Entity ====<br />
<br />
Sent by the server when a player picks up an item entity. It makes the item entity disappear to viewers and shows the pick-up animation.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x11<br />
|rowspan="2"| Client<br />
| Item Runtime Entity Id<br />
| VarLong<br />
| the entity runtime ID of the item that is being taken by another entity. It will disappear to viewers after showing the pick-up animation.<br />
|-<br />
| Runtime Entity Id<br />
| VarLong<br />
| The runtime ID of the entity that took the item, which is usually a player, but could be another entity like a zombie too.<br />
|}<br />
<br />
<br />
<br />
==== Move Entity Absolute ====<br />
<br />
Sent by the server to move an entity to an absolute position. It is typically used for movements where high accuracy isn't needed, such as for long range teleporting.<br />
This packet is also sent by the client when riding a horse/donkey.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x12<br />
|rowspan="4"| Server & Client<br />
| Runtime entity id<br />
| VarLong<br />
| The runtime ID of the entity. The runtime ID is unique for each world session, and entities are generally identified in packets using this runtime ID.<br />
|-<br />
| Flags<br />
| byte<br />
| A combination of flags that specify details of the movement. See below for more info.<br />
|-<br />
| Position<br />
| PlayerLocation<br />
| <br />
|}<br />
<br />
{| class="wikitable"<br />
|-<br />
! Field<br />
! Bit<br />
! Notes<br />
|-<br />
| On ground<br />
| 0x01<br />
| If the entity is touching the ground<br />
|-<br />
| Telported<br />
| 0x02<br />
|<br />
|}<br />
<br />
<br />
<br />
==== Move Player ====<br />
<br />
Sent by players to send their movement to the server, and by the server to update the movement of player entities to other players.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="8"| 0x13<br />
|rowspan="8"| Server & Client<br />
| Runtime entity id<br />
| VarLong<br />
| The runtime ID of the player. The runtime ID is unique for each world session, and entities are generally identified in packets using this runtime ID.<br />
|-<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| Rotation<br />
| Vector3<br />
| Pitch, yaw and head yaw<br />
|-<br />
| Mode<br />
| Byte<br />
| <br />
|-<br />
| On ground<br />
| Boolean<br />
| Specifies if the player is considered on the ground. Note that proxies or hacked clients could fake this to always be true, so it should not be taken for granted.<br />
|-<br />
| Riding runtime entity id<br />
| Float<br />
| The runtime ID of the entity that the player might currently be riding. If not riding, this should be left 0.<br />
|-<br />
| Teleportation cause<br />
| VarLong<br />
| See below. Only needs to exist if Mode cause is 2 (teleport).<br />
|-<br />
| Entity type<br />
| Byte<br />
| Only needs to exist if Mode cause is 2 (teleport).<br />
|}<br />
<br />
Modes:<br />
{| class="wikitable"<br />
! ID<br />
! Mode<br />
|-<br />
| 0<br />
| Normal<br />
|-<br />
| 1<br />
| Reset<br />
|-<br />
| 2<br />
| Teleport<br />
|-<br />
| 3<br />
| Rotation<br />
|}<br />
<br />
Teleportation causes:<br />
{| class="wikitable"<br />
! ID<br />
! Cause<br />
|-<br />
| 0<br />
| Unknown<br />
|-<br />
| 1<br />
| Projectile<br />
|-<br />
| 2<br />
| Chorus fruit<br />
|-<br />
| 3<br />
| Command<br />
|-<br />
| 4<br />
| Behavior<br />
|}<br />
<br />
<br />
<br />
==== Rider Jump ====<br />
<br />
Sent by the client when it jumps while riding an entity that has the WASDControlled entity flag set, for example when riding a horse. According to MiNET this can also be sent from the server to the client, but details on this are unknown.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x14<br />
|rowspan="1"| Server & Client<br />
| Jump Strength<br />
| SignedVarInt<br />
| The strength of the jump, depending on how long the rider has held the jump button.<br />
|}<br />
<br />
<br />
<br />
==== Update Block ====<br />
<br />
Sent by the server to update a block client-side, without resending the entire chunk that the block is located in. It is particularly useful for small modifications like block breaking/placing.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x15<br />
|rowspan="4"| Client<br />
| Coordinates<br />
| BlockCoordinates<br />
| The block position at which a block is updated.<br />
|-<br />
| Block Runtime ID<br />
| VarInt<br />
| The runtime ID of the block that is placed at Position after sending the packet to the client. The runtime ID must point to a block sent in the list in the Start Game packet.<br />
|-<br />
| Flags<br />
| VarInt<br />
| See below. Flags is a combination of flags that specify the way the block is updated client-side. It is a combination of the flags below, but typically sending only the Network flag is sufficient.<br />
|-<br />
| Layer<br />
| VarInt<br />
| The world layer on which the block is updated. In Bedrock, multiple blocks can be put in the same location using layers. The second layer is usually used for liquids, so blocks can be inside a liquid. For most blocks, this is the first layer, as that layer is the default layer to place blocks on, but for blocks inside of each other, this differs. As this system is designed with liquids, there may be bugs when using this to place blocks inside each other. For example, placing an interactable block such as an item frame on the second layer can cause a game crash if the player tries to interact with it.<br />
|}<br />
<br />
{| class="wikitable"<br />
|-<br />
! Field<br />
! Bit<br />
! Notes<br />
|-<br />
| Neighbors<br />
| 0x01<br />
| <br />
|-<br />
| Network<br />
| 0x02<br />
|<br />
|-<br />
| No Graphic<br />
| 0x04<br />
|<br />
|-<br />
| Priority<br />
| 0x08<br />
|<br />
|}<br />
<br />
<br />
<br />
==== Add Painting ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x16<br />
|rowspan="5"| Client<br />
| Unique Entity Id<br />
| SignedVarLong<br />
| The unique ID of the entity. The unique ID is a value that remains consistent across different sessions of the same world, but most unofficial servers simply fill the runtime ID of the entity out for this field.<br />
|-<br />
| Runtime Entity Id<br />
| VarLong<br />
| The runtime ID of the entity. The runtime ID is unique for each world session, and entities are generally identified in packets using this runtime ID.<br />
|-<br />
| Position<br />
| Vector3<br />
| The position to spawn the entity at. If the entity is at a distance that the player cannot see, the entity will still show up if the player moves closer.<br />
|-<br />
| Direction<br />
| SignedVarInt<br />
| The facing direction of the painting. See below.<br />
|-<br />
| Name<br />
| String<br />
| This is the name of the painting (e.g. BurningSkull). See below.<br />
|}<br />
<br />
Valid facing values:<br />
* 0 - Facing towards positive Z (south)<br />
* 1 - Facing towards negative X (west)<br />
* 2 - Facing towards negative Z (north)<br />
* 3 - Facing towards positive X (east)<br />
<br />
Valid name values:<br />
* Kebab<br />
* Aztec<br />
* Alban<br />
* Aztec<br />
* Aztec2<br />
* Bomb<br />
* Plant<br />
* Wasteland<br />
* Wanderer<br />
* Graham<br />
* Pool<br />
* Courbet<br />
* Sunset<br />
* Sea<br />
* Creebet<br />
* Match<br />
* Bust<br />
* Stage<br />
* Void<br />
* SkullAndRoses<br />
* Wither<br />
* Fighters<br />
* Skeleton<br />
* DonkeyKong<br />
* PoInter<br />
* Pigscene<br />
* BurningSkull<br />
<br />
<br />
<br />
==== Tick Sync ====<br />
<br />
Sent by the client and the server to maintain a synchronized, server-authoritative tick between the client and the server. The client sends this packet first, and the server should reply with another one of these packets, including the response time.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x17<br />
|rowspan="2"| Server & Client<br />
| Request Timestamp<br />
| Long<br />
| <br />
|-<br />
| Response Timestamp<br />
| Long<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Level Sound Event (1) ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="6"| 0x18<br />
|rowspan="6"| Server & Client<br />
| Sound ID<br />
| Byte<br />
| <br />
|-<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| Block Id<br />
| SignedVarInt<br />
| <br />
|-<br />
| Entity Type<br />
| SignedVarInt<br />
| <br />
|-<br />
| Is baby mob<br />
| Boolean<br />
| <br />
|-<br />
| Is global<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Level Event ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x19<br />
|rowspan="3"| Client<br />
| Event ID<br />
| SignedVarInt<br />
| <br />
|-<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| Data<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Block Event ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x1A<br />
|rowspan="3"| Client<br />
| Block Position<br />
| BlockCoordinates<br />
| <br />
|-<br />
| Event Type<br />
| SignedVarInt<br />
| <br />
|-<br />
| Event Data<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Entity Event ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x1B<br />
|rowspan="3"| Server & Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Event ID<br />
| Byte<br />
| See [[/Entity Events|Bedrock Protocol/Entity Events]]<br />
|-<br />
| Data<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Mob Effect ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="6"| 0x1C<br />
|rowspan="6"| Client<br />
| Runtime entity id<br />
| VarLong<br />
| <br />
|-<br />
| Event<br />
| Byte<br />
| <br />
|-<br />
| Effect id<br />
| SignedVarInt<br />
| See the Bedrock Edition section of {{Minecraft Wiki|Status effect#Effect_IDs}}<br />
|-<br />
| Amplifier<br />
| SignedVarInt<br />
| <br />
|-<br />
| Particles<br />
| Boolean<br />
| If true, effect particles are not shown<br />
|-<br />
| Duration<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
Events:<br />
* 0: None<br />
* 1: Add<br />
* 2: Modify<br />
* 3: Remove<br />
<br />
==== Update Attributes ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x1D<br />
|rowspan="2"| Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Attributes<br />
| PlayerAttributes<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Inventory Transaction ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x1E<br />
|rowspan="1"| Server & Client<br />
| Transaction<br />
| Transaction<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Mob Equipment ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x1F<br />
|rowspan="5"| Server & Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Item<br />
| Item<br />
| <br />
|-<br />
| Slot<br />
| Byte<br />
| <br />
|-<br />
| Selected Slot<br />
| Byte<br />
| <br />
|-<br />
| Windows Id<br />
| Byte<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Mob Armor Equipment ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x20<br />
|rowspan="5"| Server & Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Helmet<br />
| Item<br />
| <br />
|-<br />
| Chestplate<br />
| Item<br />
| <br />
|-<br />
| Leggings<br />
| Item<br />
| <br />
|-<br />
| Boots<br />
| Item<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Interact ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x21<br />
|rowspan="2"| Server & Client<br />
| Action ID<br />
| Byte<br />
| <br />
|-<br />
| Target Runtime Entity ID<br />
| VarLong<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Block Pick Request ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x22<br />
|rowspan="5"| Server<br />
| Block Position X<br />
| SignedVarInt<br />
| <br />
|-<br />
| Block Position Y<br />
| SignedVarInt<br />
| <br />
|-<br />
| Block Position Z<br />
| SignedVarInt<br />
| <br />
|-<br />
| Add User Data<br />
| bool<br />
| Whether there should be NBT data in the picked block (activated by pressing Ctrl on default keyboard controls)<br />
|-<br />
| Hotbar Slot<br />
| Byte<br />
| <br />
|}<br />
<br />
The Bedrock client sends the position of the block. It expects the server to decide the block to pick and add it to the inventory or switch the hotbar slot if needed.<br />
<br />
<br />
<br />
==== Entity Pick Request ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x23<br />
|rowspan="2"| Server<br />
| Runtime Entity ID<br />
| Unsigned Long<br />
| <br />
|-<br />
| Hotbar Slot<br />
| Byte<br />
| The held hotbar slot of the player at the time of trying to pick the entity. If empty, the resulting spawn egg will be put into this slot.<br />
|}<br />
<br />
<br />
<br />
==== Player Action ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x24<br />
|rowspan="4"| Server<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Action ID<br />
| SignedVarInt<br />
| <br />
|-<br />
| Coordinates<br />
| BlockCoordinates<br />
| <br />
|-<br />
| Face<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Entity Fall ====<br />
<br />
Sent by the client when it falls from a distance onto a block that would damage the player.<br />
<br />
This packet should not be used at all by the server, as it can easily be spoofed using a proxy or custom client. Servers should implement fall damage using their own calculations.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x25<br />
|rowspan="3"| Server<br />
| Runtime Entity Id<br />
| VarLong<br />
| <br />
|-<br />
| Fall Distance<br />
| Float<br />
| The distance that the entity fell until it hit the ground. The damage would otherwise be calculated using this field.<br />
|-<br />
| In Void<br />
| Boolean<br />
| Specifies if the fall was in the void. The player can't fall below roughly Y=-40.<br />
|}<br />
<br />
<br />
<br />
==== Hurt Armor ====<br />
<br />
Sent by the server to damage the player's armor after being hit. <br />
<br />
The packet should never be used by servers as it hands the responsibility over to the player completely, while the server can easily and reliably update the armor damage of players itself.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x26<br />
|rowspan="1"| Client<br />
| Health<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Entity Data ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x27<br />
|rowspan="2"| Server & Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Metadata<br />
| MetadataDictionary<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Entity Motion ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x28<br />
|rowspan="4"| Server & Client<br />
| Runtime Entity Id<br />
| VarLong<br />
| <br />
|-<br />
| Motion X<br />
| Vector3<br />
| <br />
|-<br />
| Motion Y<br />
| Float<br />
| <br />
|-<br />
| Motion Z<br />
| Float<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Entity Link ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x29<br />
|rowspan="4"| Client<br />
| Ridden ID<br />
| SignedVarLong<br />
| <br />
|-<br />
| Rider ID<br />
| SignedVarLong<br />
| <br />
|-<br />
| Link Type<br />
| Byte<br />
| <br />
|-<br />
| Unknown<br />
| Byte<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Health ====<br />
<br />
Sent by the server to set the health of the player it is sent to.<br />
<br />
This packet should no longer be used. Instead, the health attribute should be used so that the health and maximum health may be changed directly.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x2A<br />
|rowspan="1"| Client<br />
| Health<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Spawn Position ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x2B<br />
|rowspan="3"| Client<br />
| Spawn Type<br />
| SignedVarInt<br />
| <br />
|-<br />
| Block Position<br />
| BlockCoordinates<br />
| the new position of the spawn that was set. If spawnType is WORLD_SPAWN, compasses will point to this position. As of 1.16, blockPosition is always the position of the player.<br />
|-<br />
| Dimension ID<br />
| Int<br />
|<br />
|-<br />
| Spawn Position<br />
| Vector3<br />
| Default -2147483648, -2147483648, -2147483648<br />
|-<br />
| Forced<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Animate ====<br />
<br />
Sent by the server to send a player animation from one player to all viewers of that player. <br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x2C<br />
|rowspan="2"| Server & Client<br />
| Action ID<br />
| SignedVarInt<br />
| <br />
|-<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Respawn ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x2D<br />
|rowspan="3"| Server & Client<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| State<br />
| Byte<br />
| <br />
|-<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|}<br />
<br />
States:<br />
{| class="wikitable"<br />
! ID<br />
! Name<br />
|-<br />
| 0<br />
| Server Searching<br />
|-<br />
| 1<br />
| Server Ready<br />
|-<br />
| 2<br />
| Client Ready<br />
|}<br />
<br />
==== Container Open ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x2E<br />
|rowspan="4"| Client<br />
| Window Id<br />
| Byte<br />
| <br />
|-<br />
| Type<br />
| Byte<br />
| <br />
|-<br />
| Block Position<br />
| BlockCoordinates<br />
| <br />
|-<br />
| Unique Entity Id<br />
| SignedVarLong<br />
| <br />
|}<br />
<br />
Bedrock needs either a valid block position, with an actual block at that position, or an entity ID for this to work. The entity must have CONTAINER_BASE_SIZE metadata, or the block must be a container. The entity ID is used for minecart chests etc. but any entity will work. If the entity has NAMETAG metadata this will be used as the container name.<br />
<br />
<br />
<br />
==== Container Close ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x2F<br />
|rowspan="1"| Server & Client<br />
| Window Id<br />
| Byte<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Player Hotbar ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x30<br />
|rowspan="3"| Server & Client<br />
| Selected Hotbar Slot<br />
| VarInt<br />
| <br />
|-<br />
| Container Id<br />
| Byte<br />
| <br />
|-<br />
| Select Hotbar Slot<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Inventory Content ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x31<br />
|rowspan="2"| Server & Client<br />
| Inventory Id<br />
| VarInt<br />
| <br />
|-<br />
| Input<br />
| ItemStacks<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Inventory Slot ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x32<br />
|rowspan="3"| Server & Client<br />
| Inventory Id<br />
| VarInt<br />
| <br />
|-<br />
| Slot<br />
| VarInt<br />
| <br />
|-<br />
| Item<br />
| Item<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Container Set Data ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x33<br />
|rowspan="3"| Client<br />
| Window Id<br />
| Byte<br />
| <br />
|-<br />
| Property<br />
| SignedVarInt<br />
| <br />
|-<br />
| Value<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Crafting Data ====<br />
<br />
Since 1.16.200, each recipe must have a unique network ID. Otherwise, the client will crash.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x34<br />
|rowspan="4"| Client<br />
| Recipes<br />
| Recipes<br />
| <br />
|-<br />
| Potion type recipes<br />
| PotionTypeRecipe[]<br />
| <br />
|-<br />
| potion container recipes<br />
| PotionContainerChangeRecipe[]<br />
| <br />
|-<br />
| Is Clean<br />
| Boolean<br />
| <br />
|}<br />
<br />
==== Crafting Event ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x35<br />
|rowspan="5"| Server & Client<br />
| Window ID<br />
| Byte<br />
| <br />
|-<br />
| Recipe Type<br />
| SignedVarInt<br />
| <br />
|-<br />
| Recipe ID<br />
| UUID<br />
| <br />
|-<br />
| Input<br />
| ItemStacks<br />
| <br />
|-<br />
| Result<br />
| ItemStacks<br />
| <br />
|}<br />
<br />
<br />
<br />
==== GUI Data Pick Item ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x36<br />
|rowspan="1"| Client<br />
|-<br />
| Item name<br />
| String<br />
| The name of the item that shows up in the top part of the popup that shows up when selecting an item. It is shown as if an item was selected by the player itself.<br />
|-<br />
| Item effects<br />
| String<br />
| The line under the Item name, where the effects of the item are usually situated.<br />
|-<br />
| Hotbar Slot<br />
| int<br />
| The hot bar slot to be selected/picked. This does not currently work, so it does not matter what number this is.<br />
|}<br />
<br />
Sent by the server to make the client 'select' a hotbar slot. It currently appears to be broken however, and does not actually set the selected slot to the hotbar slot set in the packet.<br />
<br />
<br />
<br />
==== Adventure Settings ====<br />
<br />
Sent by the server to update gameplay related features, in particular permissions to access these features for the client.<br />
<br />
It includes allowing the player to fly, build, and mine and attack entities. Most of these flags should be checked server-side instead of using this packet only.<br />
<br />
The client my also send this packet to the server when it updates one of these settings through the in-game settings interface. The server should verify if the player actually has permission to update these settings.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="6"| 0x37<br />
|rowspan="6"| Server & Client<br />
| Flags<br />
| VarInt<br />
| <br />
|-<br />
| Command permission<br />
| VarInt<br />
| <br />
|-<br />
| Action permissions<br />
| VarInt<br />
| <br />
|-<br />
| Permission level<br />
| VarInt<br />
| <br />
|-<br />
| Custom stored permissions<br />
| VarInt<br />
| <br />
|-<br />
| User Id<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Block Entity Data ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x38<br />
|rowspan="2"| Server & Client<br />
| Coordinates<br />
| BlockCoordinates<br />
| <br />
|-<br />
| NamedTag<br />
| NBT<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Player Input ====<br />
<br />
Sent by the client when the player is moving but the server does not allow it to update its movement using the [[#Move Player|Move Player]] packet. It includes situations where the player is riding an entity like a boat. If this is the case, the packet is sent roughly every tick.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x39<br />
|rowspan="4"| Server<br />
| Movement<br />
| Vec2<br />
| The movement vector of the input. It should be thought of in Pocket Edition controls, where specific arrows (or a combination of two, resulting in a diagonal arrow) decide the direction of movement. The movement vector typically has a length of 1: Either it has movement on one axis, or it has a combination, resulting in sqrt(2)/2 for both axes.<br />
|-<br />
| Jumping<br />
| Boolean<br />
| Indicates if the player was pressing the jump button or not. It does not define if the player was actually in the air or not.<br />
|-<br />
| Sneaking<br />
| Boolean<br />
| Indicates the player was sneaking during the input. Note that this may also be checked by keeping the sneaking state updated using the [[#Player Action|Player Action]] packet<br />
|}<br />
<br />
<br />
<br />
==== Level Chunk ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x3A<br />
|rowspan="5"| Client<br />
| Chunk X<br />
| SignedVarInt<br />
| <br />
|-<br />
| Chunk Z<br />
| SignedVarInt<br />
| <br />
|-<br />
| Sub Chunk Count<br />
| VarInt<br />
| <br />
|-<br />
| Cache Enabled<br />
| Boolean<br />
| <br />
|-<br />
| Chunk Data<br />
| ByteArray<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Commands Enabled ====<br />
<br />
This packet is sent to the client to enable or disable the ability to execute commands. If disabled, the client itself will stop the execution of commands.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x3B<br />
|rowspan="1"| Client<br />
| Commands enabled<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Difficulty ====<br />
<br />
Sent by the server to update the client-side difficulty pf the client. The actual effect of this packet on the client isn't very significant, as the difficulty is handled server-side.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x3C<br />
|rowspan="1"| Client<br />
| Difficulty<br />
| VarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Change Dimension ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x3D<br />
|rowspan="5"| Client<br />
| Dimension<br />
| SignedVarInt<br />
| <br />
|-<br />
| Position X<br />
| Vector3<br />
| <br />
|-<br />
| Position Y<br />
| Boolean<br />
| <br />
|-<br />
| Position Z<br />
| Float<br />
| <br />
|-<br />
| Respawn<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Player Game Type ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x3E<br />
|rowspan="1"| Server & Client<br />
| Game mode<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Player List ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x3F<br />
|rowspan="1"| Client<br />
| Records<br />
| PlayerRecords<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Simple Event ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x40<br />
|rowspan="1"| Client<br />
| Event Type<br />
| Unsigned Short<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Event ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x41<br />
|rowspan="3"| Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Event data<br />
| SignedVarInt<br />
| <br />
|-<br />
| Event type<br />
| Byte<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Spawn Experience Orb ====<br />
<br />
Sent by the server to spawn an experience orb entity client-side. <br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x42<br />
|rowspan="2"| Client<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| Count<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Map Item Data ====<br />
<br />
Sent by the server to update the data of a map shown to the client. It is sent with a combination of flags that specify what data is updated.<br />
<br />
The packet may be used to update specific parts of the map only. It is not required to send the entire map each time when updating one part.<br />
<br />
TODO<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x43<br />
|rowspan="1"| Client<br />
| Map ID<br />
| VarLong<br />
| The unique identifier that represents the map that is updated over network. It remains consitent across sesions.<br />
|}<br />
<br />
<br />
<br />
==== Map Info Request ====<br />
<br />
Sent by the client to request the server to deliver information of a certain map in the inventory of the player. The serve should respond with a [[#Map Item Data|Map Item Data]] packet.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x44<br />
|rowspan="1"| Server & Client<br />
| Unique Map Id<br />
| SignedVarLong<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Request Chunk Radius ====<br />
<br />
Sent by the client to update the server on the chunk view radius that it has set in the settings. The server may respond with a [[#Chunk Radius Updated|Chunk Radius Updated]] packet with either the radius requested, or a different chunk radius if the server chooses so.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x45<br />
|rowspan="1"| Server & Client<br />
| Chunk radius<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Chunk Radius Updated ====<br />
<br />
Sent by the server in response to a [[#Request Chunk Radius|Request Chunk Radius]] packet. It defines the radius that the server allows the client to have. This may be lower than the chunk radius requested by the client.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x46<br />
|rowspan="1"| Client<br />
| Chunk radius<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== ItemFrame Drop Item ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x47<br />
|rowspan="1"| Server & Client<br />
| Block Position<br />
| BlockCoordinates<br />
|<br />
|}<br />
<br />
==== Game Rules Changed ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x48<br />
|rowspan="1"| Client<br />
| Rules<br />
| GameRules<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Camera ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x49<br />
|rowspan="2"| Client<br />
| Camera Unique Entity Id<br />
| SignedVarLong<br />
| <br />
|-<br />
| Player Unique Entity Id<br />
| SignedVarLong<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Boss Event ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x4A<br />
|rowspan="2"| Client<br />
| Boss Entity ID<br />
| SignedVarLong<br />
| <br />
|-<br />
| Event Type<br />
| VarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Show Credits ====<br />
<br />
Sent by the server to show the Minecraft credits screen to the client. It is typically when the player beats the ender dragon and leaves the End.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x4B<br />
|rowspan="2"| Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Status<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
Statuses:<br />
{| class="wikitable"<br />
! ID<br />
! Name<br />
|-<br />
| 0<br />
| Start Credits<br />
|-<br />
| 1<br />
| End Credits<br />
|}<br />
<br />
<br />
==== Available Commands ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x4C<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== Command Request ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x4D<br />
|rowspan="5"| Server<br />
| Command<br />
| String<br />
| <br />
|-<br />
| Command type<br />
| VarInt<br />
| <br />
|-<br />
| Unknown UUID<br />
| UUID<br />
| <br />
|-<br />
| Request ID<br />
| String<br />
| <br />
|-<br />
| Unknown<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== CommandBlock Update ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x4E<br />
|rowspan="1"| Server<br />
| Is Block<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Command Output ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x4F<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== Update Trade ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="10"| 0x50<br />
|rowspan="10"| Client<br />
| Window ID<br />
| Byte<br />
| <br />
|-<br />
| Window Type<br />
| Byte<br />
| <br />
|-<br />
| Unknown0<br />
| VarInt<br />
| <br />
|-<br />
| Unknown1<br />
| VarInt<br />
| <br />
|-<br />
| Unknown2<br />
| VarInt<br />
| <br />
|-<br />
| Is Willing<br />
| Boolean<br />
| <br />
|-<br />
| Trader Entity ID<br />
| SignedVarLong<br />
| <br />
|-<br />
| Player Entity ID<br />
| SignedVarLong<br />
| <br />
|-<br />
| Display Name<br />
| String<br />
| <br />
|-<br />
| NamedTag<br />
| NBT<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Update Equip ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x51<br />
|rowspan="5"| Client<br />
| Window ID<br />
| Byte<br />
| <br />
|-<br />
| Window Type<br />
| Byte<br />
| <br />
|-<br />
| Unknown<br />
| Byte<br />
| <br />
|-<br />
| Entity ID<br />
| SignedVarLong<br />
| <br />
|-<br />
| NamedTag<br />
| NBT<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Resource Pack Data Info ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="7"| 0x52<br />
|rowspan="7"| Client<br />
| Package ID<br />
| String<br />
| <br />
|-<br />
| Max Chunk Size<br />
| Unsigned Int<br />
| <br />
|-<br />
| Chunk Count<br />
| Unsigned Int<br />
| <br />
|-<br />
| Compressed Package Size<br />
| Unsigned Long<br />
| <br />
|-<br />
| Hash<br />
| ByteArray<br />
| <br />
|-<br />
| Is Premium<br />
| Boolean<br />
| <br />
|-<br />
| Pack Type<br />
| Byte<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Resource Pack Chunk Data ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x53<br />
|rowspan="4"| Client<br />
| Package ID<br />
| String<br />
| <br />
|-<br />
| Chunk Index<br />
| Unsigned Int<br />
| <br />
|-<br />
| Progress<br />
| Unsigned Long<br />
| <br />
|-<br />
| Payload<br />
| ByteArray<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Resource Pack Chunk Request ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x54<br />
|rowspan="2"| Server<br />
| Package ID<br />
| String<br />
| <br />
|-<br />
| Chunk Index<br />
| Unsigned Int<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Transfer ====<br />
<br />
Sent by the server to transfer a player from the current server to another. Doing so will fully disconnect the client, bring it back to the main menu and make it connect to the next server.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x55<br />
|rowspan="2"| Client<br />
| Address<br />
| String<br />
| <br />
|-<br />
| Port<br />
| Unsigned Short<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Play Sound ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x56<br />
|rowspan="4"| Client<br />
| Sound name<br />
| String<br />
| <br />
|-<br />
| Sound position<br />
| Position<br />
| <br />
|-<br />
| Volume<br />
| Float<br />
| <br />
|-<br />
| Pitch<br />
| Float<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Stop Sound ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x57<br />
|rowspan="2"| Client<br />
| Sound Name<br />
| String<br />
| <br />
|-<br />
| Stopping All Sound<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Title ====<br />
<br />
Sent by the server to make a title, subtitle or action bar shown to a player. It has several fields that allow setting the duration of the titles.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x58<br />
|rowspan="5"| Client<br />
| Type<br />
| SignedVarInt<br />
| <br />
|-<br />
| Text<br />
| String<br />
| <br />
|-<br />
| Fade In Time<br />
| SignedVarInt<br />
| <br />
|-<br />
| Stay Time<br />
| SignedVarInt<br />
| <br />
|-<br />
| Fade Out Time<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Add Behavior Tree ====<br />
<br />
Sent by the server. Its usage remains unknown, as behavior packs are typically all sent at the start of the game.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x59<br />
|rowspan="1"| Client<br />
| Behavior Tree JSON<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Structure Block Update ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x5A<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== Show Store Offer ====<br />
<br />
Sent by the server to show a Marketplace store offer to a player. It opens a window client-side that displays the item.<br />
<br />
The packet only works on partnered servers: Servers that are not partnered will not have a store button show up on the in-game pause menu and will, as a result, not be able to open store offers on the client side. Sending the packet does therefore not work when using a proxy that is connected to with the domain of one of the partnered servers.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x5B<br />
|rowspan="2"| Client<br />
| Offer Id<br />
| String<br />
| <br />
|-<br />
| Shown To All<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Purchase Receipt ====<br />
<br />
Sent by the client to notify the server it purchased an item from the marketplace store that was offered by the server.<br />
<br />
The packet is only used for partnered servers.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x5C<br />
|rowspan="1"| Server<br />
<br />
|}<br />
<br />
<br />
<br />
==== Player Skin ====<br />
<br />
Sent by the client when it updates its own skin using the in-game skin picker. It is relayed by the server, or sent if the server changes the skin of a player on its own accord. <br />
<br />
Note that the packet can only be sent for players that are in the player list at the time of sending.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x5D<br />
|rowspan="4"| Server & Client<br />
| UUID<br />
| UUID<br />
| <br />
|-<br />
| Skin<br />
| Skin<br />
| <br />
|-<br />
| Skin Name<br />
| String<br />
| <br />
|-<br />
| Old Skin Name<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Sub Client Login ====<br />
<br />
Sent when an additional player attempts to join from a split screen session. The contents of the chain data and skin data fields use the same format as the [[#Login|Login]] packet, and can be decoded the same way.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x5E<br />
|rowspan="2"| Server<br />
| Chain data<br />
| JSON array of JWT Data<br />
| Contains the display name, UUID and XUID<br />
|-<br />
| Skin data<br />
| JWT Data<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Automation Client Connect ====<br />
<br />
Sent by the server to make the client connect to a websocket server. This websocket server has the ability to execute commands on the behalf of the client and it canlisten for certain events fired by the client.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x5F<br />
|rowspan="1"| Client<br />
| Address<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Last Hurt By ====<br />
<br />
Sent by the server to let the client know what entity type it was last hurt by. At this moment, the packet is useless and should not be used. <br />
There is no behaviour that depends on if this packet is sent or not.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x60<br />
|rowspan="1"| Client<br />
| Entity Type Id<br />
| VarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Book Edit ====<br />
<br />
Sent by the client when it edits a book. It is sent each time a modification was made and the player stops its typing 'session', rather than simply after closing the book.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x61<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== NPC Request ====<br />
<br />
Sent by the client when it interacts with an NPC.<br />
<br />
The packet is specifically for Education Edition, where NPCs are available to use. It has no use in the base game.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x62<br />
|rowspan="4"| Server & Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Unknown0<br />
| Byte<br />
| <br />
|-<br />
| Unknown1<br />
| String<br />
| <br />
|-<br />
| Unknown2<br />
| Byte<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Photo Transfer ====<br />
<br />
Sent by the server to transfer a photo (image) file to the client. It is typically used to transfer photos so that the client can display it in a portfolio in Education Edition.<br />
<br />
While previously usable in the base game, the displaying of photos in books was disabled and the packet has little use anymore.<br />
<br />
The packet is specifically for Education Edition. It has no use in the base game.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x63<br />
|rowspan="3"| Server<br />
| File name<br />
| String<br />
| <br />
|-<br />
| Image data<br />
| String<br />
| <br />
|-<br />
| Unknown2<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Model Form Request ====<br />
<br />
Sent by the server to make the client open a form.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x64<br />
|rowspan="2"| Client<br />
| Form Id<br />
| VarInt<br />
| <br />
|-<br />
| Form Data<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Model Form Response ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x65<br />
|rowspan="2"| Server<br />
| Form Id<br />
| VarInt<br />
| <br />
|-<br />
| Form Data<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Server Settings Request ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x66<br />
|rowspan="1"| Server<br />
<br />
|}<br />
<br />
<br />
<br />
==== Server Settings Response ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x67<br />
|rowspan="2"| Client<br />
| Form Id<br />
| VarLong<br />
| <br />
|-<br />
| Form Data<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Show Profile ====<br />
<br />
Sent by the server to show the Xbox Live profile of one player to another.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x68<br />
|rowspan="1"| Client<br />
| Xuid<br />
| String<br />
| If the XUID is invalid, the client ignores the packet<br />
|}<br />
<br />
<br />
<br />
==== Set Default Game Type ====<br />
<br />
Sent by the client when it toggles the default game type in the settings UI, and is sent by the server when it actually changes the default game type, resulting in the toggle being changed in the settings UI.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x69<br />
|rowspan="1"| Client<br />
| Game mode<br />
| VarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Remove Objective ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x6A<br />
|rowspan="1"| Client<br />
| Objective Id<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Display Objective ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x6B<br />
|rowspan="5"| Client<br />
| Display Slot<br />
| String<br />
| <br />
|-<br />
| Objective Id<br />
| String<br />
| <br />
|-<br />
| Display Name<br />
| String<br />
| <br />
|-<br />
| Criteria<br />
| String<br />
| <br />
|-<br />
| Sort Order<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Score ====<br />
<br />
Sent by the server to send the contents of a scoreboard to the player. It may be used to either add, remove or edit entries on the scoreboard.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x6C<br />
|rowspan="1"| Client<br />
| Action<br />
| byte<br />
| 0 (Add), 1 (Remove)<br />
|-<br />
| Entries<br />
| ScoreEntries<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Lab Table ====<br />
<br />
Sent by the client to let the server know it started a chemical reaction in Education Edition, and is sent by the server to allow other clients to show the effects.<br />
<br />
This packet is only functional if Education features are enabled.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x6D<br />
|rowspan="5"| Server & Client<br />
| Unknown Byte 0<br />
| Byte<br />
| <br />
|-<br />
| Block Entity Position X<br />
| VarInt<br />
| <br />
|-<br />
| Block Entity Position Y<br />
| VarInt<br />
| <br />
|-<br />
| Block Entity Position Z<br />
| VarInt<br />
| <br />
|-<br />
| Reaction Type<br />
| Byte<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Update Block Synced ====<br />
<br />
Sent by the server to synchronize the falling of a falling block entity with the transitioning back and forth from and to a solid block. It is used to prevent the entity from flickering, and is used in places such as the pushing of blocks with pistons.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="6"| 0x6E<br />
|rowspan="6"| Client<br />
| Coordinates<br />
| BlockCoordinates<br />
| <br />
|-<br />
| Block Runtime ID<br />
| VarInt<br />
| <br />
|-<br />
| Block Priority<br />
| VarInt<br />
| <br />
|-<br />
| Data Layer ID<br />
| VarInt<br />
| <br />
|-<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Block Synced Type<br />
| VarLong<br />
| 0 - None, 1 - Create, 2 - Destroy<br />
|}<br />
<br />
==== Move Entity Delta ====<br />
<br />
Sent by the server to move an entity by a given delta. The packet is specifically optimized to save as much space as possible, by only writing non-zero fields.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x6F<br />
|rowspan="2"| Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Flags<br />
| Unsigned Short<br />
| <br />
|}<br />
<br />
Flags<br />
{| class="wikitable"<br />
! Field<br />
! Bit<br />
|-<br />
| HAS_X<br />
| 0x01<br />
|-<br />
| HAS_Y<br />
| 0x02<br />
|-<br />
| HAS_Z<br />
| 0x4<br />
|-<br />
| HAS_PITCH<br />
| 0x8<br />
|-<br />
| HAS_YAW<br />
| 0x10<br />
|-<br />
| HAS_ROLL<br />
| 0x20<br />
|}<br />
<br />
<br />
<br />
==== Set Scoreboard Identity ====<br />
<br />
Sent by the server to change the identity type of one of the entries on a scoreboard. This is used to change, for example, an entry pointing to a player, to a fake player when it leaves the server, and to change it back to a real player when it joins again.<br />
<br />
In non-vanilla situations, this packet is quite useless.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x70<br />
|rowspan="1"| Client<br />
| Action<br />
| byte<br />
| 0 (Add), 1 (Remove)<br />
|-<br />
| Entries<br />
| ScoreboardIdentityEntries<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Local Player As Initialized ====<br />
<br />
Sent by the client in response to a [[#Play Status||Play Status]] with the status Player Spawn (3). The packet marks the moment at which the client is fully initialized and can receive any packet without discarding it.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x71<br />
|rowspan="1"| Server<br />
| Runtime Entity Id<br />
| VarLong<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Update Soft Enum ====<br />
<br />
Sent by the server to update a soft enum, also known as a dynamic enum, previous sent in the [[#Available Commands|Available Commands]] packet. It is sent whenever the enum should get new options or when some of its options should be removed.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x72<br />
|rowspan="1"| Client<br />
| Enum Data<br />
| EnumData<br />
| TODO<br />
|-<br />
| Action<br />
| byte<br />
| 0 (Add), 1 (Remove), 2 (Update)<br />
|}<br />
<br />
<br />
<br />
==== Network Stack Latency ====<br />
<br />
Sent by the server (and the client, on development builds) to measure the latency over the entire Minecraft stack, rather than the RakNet latency. <br />
<br />
It has over usages too, such as the ability to be used as some kind of acknowledgement packet, to know when the client has received a certain other packet.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x73<br />
|rowspan="2"| Server & Client<br />
| Timestamp<br />
| Unsigned Long<br />
| <br />
|-<br />
| Send Back<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Script Custom Event ====<br />
<br />
Sent by both the client and server. It is a way to let scripts communicate with the server, so that the client can let the server know it triggered an event, or the other way around.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x75<br />
|rowspan="2"| Server & Client<br />
| Event Name<br />
| String<br />
| <br />
|-<br />
| Data<br />
| String<br />
| Typically a JSON encoded string that the script is able to encode and decode too<br />
|}<br />
<br />
<br />
<br />
==== Spawn Particle Effect ====<br />
<br />
Sent by the server to spawn a particle effect client-side. Unlike other packets that result in the appearing of particles, this packet can show particles that are not hardcoded in the client. They can be added and changed through behavior packs to implement custom particles.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x76<br />
|rowspan="4"| Client<br />
| Dimension Id<br />
| Byte<br />
| <br />
|-<br />
| Unique Entity Id<br />
| SignedVarLong<br />
| <br />
|-<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| Identifier<br />
| String<br />
| The name of the particle<br />
|}<br />
<br />
<br />
<br />
==== Available Entity Identifiers ====<br />
<br />
Sent by the server at the start of the game to let the client know all entities that are on the server.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x77<br />
|rowspan="1"| Client<br />
| NamedTag<br />
| NBT<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Level Sound Event (2) ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="6"| 0x78<br />
|rowspan="6"| Server & Client<br />
| Sound ID<br />
| Byte<br />
| <br />
|-<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| Block Id<br />
| SignedVarInt<br />
| <br />
|-<br />
| Entity Type<br />
| String<br />
| <br />
|-<br />
| Is baby mob<br />
| Boolean<br />
| <br />
|-<br />
| Is global<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Network Chunk Publisher Update ====<br />
<br />
Sent by the server to change the point around which chunks are and remain loaded. <br />
<br />
This is useful for minigame servers, where only one area is ever loaded, in which case the [[#Network Chunk Publisher|Network Chunk Publisher]] packet can be sent in the middle of it, so that no chunks ever need to be additionally sent during the course of the game.<br />
<br />
In reality, the packet is not extraordinarily useful, and most servers just sent it constantly at the position of the player. <br />
<br />
If the packet is not sent at all, no chunk will be shown to the player, regardless of where they are sent.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x79<br />
|rowspan="2"| Client<br />
| Coordinates<br />
| BlockCoordinates<br />
| <br />
|-<br />
| Radius<br />
| VarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Biome Definition List ====<br />
<br />
Sent by the server to let the client know all biomes that are available and implemented on the server side.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x7A<br />
|rowspan="1"| Client<br />
| NamedTag<br />
| NBT<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Level Sound Event (3) ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="6"| 0x7B<br />
|rowspan="6"| Server & Client<br />
| Sound ID<br />
| VarInt<br />
| <br />
|-<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| Block Id<br />
| SignedVarInt<br />
| <br />
|-<br />
| Entity Type<br />
| String<br />
| <br />
|-<br />
| Is baby mob<br />
| Boolean<br />
| <br />
|-<br />
| Is global<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Level Event Generic ====<br />
<br />
Sent by the server to send a 'generic' level event to the client. This packet sends an NBT serialized object and may for that reason be used for any event holding additional data.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x7C<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== Lectern Update ====<br />
<br />
Sent by the client to update the server on which page was opened in a book on a lectern, or if the book should be removed from it.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x7D<br />
|rowspan="4"| Client<br />
| Page<br />
| Byte<br />
| <br />
|-<br />
| Total Pages<br />
| Byte<br />
| <br />
|-<br />
| Block Position<br />
| Position<br />
| <br />
|-<br />
| Dropping Book<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Video Stream Connect ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x7E<br />
|rowspan="5"| Client<br />
| Server URI<br />
| String<br />
| <br />
|-<br />
| Frame Send Frequency<br />
| Float<br />
| <br />
|-<br />
| Action<br />
| Byte<br />
| <br />
|-<br />
| Resolution X<br />
| Int<br />
| <br />
|-<br />
| Resolution Y<br />
| Int<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Client Cache Status ====<br />
<br />
Sent by the client at the start of the game. It is sent to let the server know if it supports the client-side blob cache. Clients such as Nintendo Switch do not support the cache, and attempting to use it anyway will fail.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x81<br />
|rowspan="1"| Server & Client<br />
| Supported<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== On Screen Texture Animation ====<br />
<br />
Sent by the server to show a certain animation on the screen of the player.<br />
The packet is used, for example, for when a raid is triggered and a raid a defeated.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x82<br />
|rowspan="1"| Client<br />
| Animation Type<br />
| Int<br />
|}<br />
<br />
<br />
<br />
==== Map Create Locked Copy ====<br />
<br />
Sent by the server to create a locked copy of a map into another map. It is used in the cartography table to create a map that is locked and cannot be modified.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x83<br />
|rowspan="2"| Client<br />
| Original Map Id<br />
| VarLong<br />
| <br />
|-<br />
| New Map Id<br />
| VarLong<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Structure Template Data Export Request ====<br />
<br />
Sent by the client to request data of a structure.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x84<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== Structure Template Data Export Response ====<br />
<br />
Sent by the server to send data of a structure to the client in response to a [[#Structure Template Data Export Request|Structure Template Data Export Request]] packet.<br />
<br />
TODO<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x85<br />
|rowspan="1"| Client<br />
| Structure Name<br />
| String<br />
| This is the name used to export the structure to a file<br />
|}<br />
<br />
<br />
<br />
==== Update Block Properties ====<br />
<br />
Sent by the server to update the available block properties.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x86<br />
|rowspan="2"| Client<br />
| NamedTag<br />
| NBT<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Client Cache Blob Status ====<br />
<br />
Sent by the client to let the server know what blobs it already has, in an ACK type system.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x87<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== Client Cache Miss Response ====<br />
<br />
Sent by the server in response to a [[#Client Cache Blob Status|Client Cache Blob Status]] and contains the blob data of all blobs that the client acknowledged not to have yet.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x88<br />
|rowspan="1"| Client<br />
| Blobs<br />
| <br />
|<br />
|}<br />
<br />
<br />
<br />
==== Network Settings ====<br />
<br />
Sent by the server to update a variety of network settings. These settings modify the way packets are sent over the network stack.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x8F<br />
|rowspan="2"| Client<br />
| Compression threshold<br />
| Short<br />
| The maximum size of a packet this is compressed when sent. If the size of the packet is under this value, it is not compressed. When set to 0, all packets will be uncompressed.<br />
|}<br />
<br />
<br />
<br />
==== Player Auth Input ====<br />
<br />
Sent by the client to allow for server authoratative movement. It is used to synchronize the player input with the position server-side.<br />
<br />
The client sends this packet when the 'Server Authoritive Movement' field in the [[#Start Game|Start Game]] packet is set to true, instead of the [[#Move Player|Move Player]] packet. The client will send this packet once every tick.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x90<br />
|rowspan="2"| Client<br />
|}<br />
<br />
<br />
<br />
==== Creative Content ====<br />
<br />
Sent by the server to set the creative inventory's content for a player.<br />
<br />
Introduced in 1.16, this packet replaces the previous method of sending an [[#Inventory Content|Inventory Content]] packet with the creative inventory window ID. <b>This packet must be sent from a server after the StartGamePacket since 1.16.100. Otherwise, the client will crash!</b><br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x91<br />
|rowspan="2"| Client<br />
|}<br />
<br />
==== Player Enchant Options ====<br />
<br />
Sent by the server to update the enchantment options displayed when the user opens the enchantment table and puts an item in.<br />
<br />
This packet was added in 1.16 and allows the server to decide on the enchantment that can be selected by a player. The player should be sent once for every slot update of the enchantment table. The vanilla server sends an empty packet when the player first opens the enchantment table (air is is present in the enchantment table slot) and sends a packet with actual enchantments in it when items are put in that can have enchantments.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x92<br />
|rowspan="2"| Client<br />
|}<br />
<br />
<br />
<br />
==== Item Stack Request ====<br />
<br />
Sent by the client to change item stacks in an inventory. <br />
<br />
Added in 1.16, is essentially a replacement of the [[#Inventory Transaction|Inventory Transaction]] packet for inventory specific actions, such as moving items around or crafting.<br />
<br />
The [[#Inventory Transaction|Inventory Transaction]] packet is still used for actions such as placing blocks and interacting with entities.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x93<br />
|rowspan="2"| Client<br />
|}<br />
<br />
<br />
<br />
==== Item Stack Response ====<br />
<br />
Sent by the server in response to an [[#Item Stack Request|Item Stack Request]] packet from the client.<br />
<br />
This packet is used to either approve or reject ItemStackRequests from the client. If a request is approved, the client will simply continue as normal. If rejected, the client will undo the actions so that the inventory should be in sync with the server again.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x94<br />
|rowspan="2"| Client<br />
|}<br />
<br />
<br />
<br />
==== Player Armor Damage ====<br />
<br />
Sent by the server to damage the armor of a player. It is a very efficient packet, but generally it's much easier to just send a slot update for the damaged armor.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x95<br />
|rowspan="2"| Client<br />
|}<br />
<br />
<br />
<br />
==== Code Builder ====<br />
<br />
Sent by the server to open the URL to a Code Builder (websocket) server.<br />
<br />
This packet is only used by Education Edition and have no affect on the base game.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x96<br />
|rowspan="2"| Client<br />
|}<br />
<br />
<br />
<br />
==== Update Player Game Type ====<br />
<br />
Sent by the server to change the game mode of a player. It is functionally identical to the [[#Set Player Game Type|Set Player Game Type]] packet.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x97<br />
|rowspan="2"| Client<br />
|}<br />
<br />
<br />
<br />
==== Emote List ====<br />
<br />
Sent by the client every time it joins the server and when it equips new emotes. It may be used by the server to find out which emotes the client has available. If the player has no emotes equipped, this packet is not sent.<br />
<br />
Under certain circumstances, this packet is also sent from the server to the client, but more testing is needed for this.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x98<br />
|rowspan="2"| Client<br />
|}<br />
<br />
<br />
<br />
==== Position Tracking DB Server Broadcast ====<br />
<br />
Sent by the server in response to the [[#Position Tracking DB Client Request|Position Tracking DB Client Request]] packet. Thus packet is, as of 1.16, currently only for lodestones. The server maintains a database with tracking IDS and their position and dimension. The client will request these tracking IDs, (NBT tag set on the lodestone compass with the tracking ID?) and the server will respond with the status of those tracking IDs.<br />
<br />
What is actually done with the data sent depends on what the client chooses to do with it. For the lodestone compass, it is used to make the compass point towards lodestones and to make it spin if the lodestone at a position is no longer there.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x99<br />
|rowspan="2"| Client<br />
|}<br />
<br />
<br />
<br />
==== Position Tracking DB Client Request ====<br />
<br />
Sent by the client to request the position and dimension of a 'tracking ID'. These IDs are tracked in a database by the server. In 1.16, this is used for lodestones.<br />
<br />
The client will sent this request to find the position a lodestone compass needs to point to. If found, it will point to the lodestone. If not, it will start spinning around.<br />
<br />
A [[#Position Tracking DB Server Broadcast|Position Tracking DB Server Broadcast]] packet should be sent in response to this packet.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x9a<br />
|rowspan="2"| Client<br />
|}<br />
<br />
<br />
<br />
==== Debug Info ====<br />
<br />
Sent by the server. It does not seem to do anything when sent to the normal client in 1.16;<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x9b<br />
|rowspan="2"| Client<br />
|}<br />
<br />
<br />
<br />
==== Packet Violation Warning ====<br />
<br />
Sent by the client when it receives an invalid packet from the server. It holds some information on the error that occured.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x9c<br />
|rowspan="1"| Client<br />
|}<br />
<br />
==== Item Component ====<br />
<br />
Always sent by a vanilla Bedrock server after the StartGamePacket. Sent not empty for items with data driven information.<br />
<br />
In order for the information in this packet to be used, the experiment data titled <code>data_driven_items</code> must be set to <code>true</code> in the ResourcePackStackPacket (as of 1.16.100), and the item entry in StartGamePacket must have its component toggle set to <code>true</code>.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0xA2<br />
|rowspan="2"| Client<br />
| Items<br />
| ComponentItemData[]<br />
| A list of all item components.<br />
|}<br />
<br />
ComponentItemData takes in a String identifier and an NBT CompoundTag containing item data. Valid, minimal NBT data looks like the following (Any comments are preceded with <code>//</code>):<br />
<br />
<syntaxhighlight lang="json"><br />
{<br />
"components": {<br />
"item_properties": {<br />
"allow_off_hand": 1b,<br />
"hand_equipped": 1b,<br />
"max_stack_size": 1i<br />
},<br />
"minecraft:icon": {<br />
"texture": "example_item" // Required even with a resource pack, or else the client complains about icon texture<br />
}<br />
},<br />
"id": 1020i, // The runtime ID of the item<br />
"name": "wikivg:example_item"<br />
}<br />
</syntaxhighlight><br />
<br />
A list of all known valid item properties (and descriptions, if added):<br />
<br />
{| class="wikitable"<br />
! Property name<br />
! Property type<br />
! Property description<br />
|-<br />
| allow_off_hand<br />
| boolean<br />
| If the item is permitted in the offhand inventory slot.<br />
|-<br />
| animates_in_toolbar<br />
| boolean<br />
|<br />
|-<br />
| can_destroy_in_creative<br />
| boolean<br />
|<br />
|-<br />
| creative_category<br />
| integer<br />
| 1 is the construction, 2 is the nature, 3 is the equipment, 4 is the items, the default value is 1<br />
|-<br />
| creative_group <br />
| string<br />
| TODO<br />
|-<br />
| damage<br />
| integer<br />
| shows the number of damge attacks<br />
|-<br />
| enchantable_slot<br />
| string<br />
|<br />
|-<br />
| enchantable_value<br />
| integer<br />
|<br />
|-<br />
| explodable<br />
| boolean<br />
|<br />
|-<br />
| foil<br />
| boolean<br />
|<br />
|-<br />
| frame_count<br />
| integer<br />
|<br />
|-<br />
| hand_equipped<br />
| boolean<br />
| If the item should be visually held like a tool.<br />
|-<br />
| ignores_permissions<br />
| boolean<br />
|<br />
|-<br />
| liquid_clipped<br />
| boolean<br />
| gives the possibility to click on a liquid<br />
|-<br />
| max_stack_size<br />
| integer<br />
| The maximum amount of this item that can be in an inventory slot.<br />
|-<br />
| mining_speed<br />
| float<br />
|<br />
|-<br />
| mirrored_art<br />
| boolean<br />
|<br />
|-<br />
| requires_interact<br />
| boolean<br />
|<br />
|-<br />
| should_despawn<br />
| boolean<br />
|<br />
|-<br />
| stacked_by_data<br />
| boolean<br />
|<br />
|-<br />
| use_animation<br />
| integer<br />
|<br />
|-<br />
| use_duration<br />
| integer<br />
|<br />
|-<br />
|}<br />
<br />
Other item components can be found here: https://bedrock.dev/docs/stable/Item#Item%20Components (Add these in the same format as <code>minecraft:icon</code> shown above)<br />
<br />
[[Category:Bedrock Minecraft]]</div>Orladoghttps://wiki.vg/index.php?title=User:Orladog/Protocol&diff=15916User:Orladog/Protocol2020-07-09T08:42:56Z<p>Orladog: Create page to edit</p>
<hr />
<div>{{Box<br />
|BORDER = #9999FF<br />
|BACKGROUND = #99CCFF<br />
|WIDTH = 100%<br />
|ICON = <br />
|HEADING = Heads up!<br />
|CONTENT = This article is about the protocol for the latest '''stable''' release of Minecraft '''Java Edition''' ([[Protocol version numbers|1.15.2, protocol 578]]). For the Java Edition pre-releases, see [[Pre-release protocol]]. For the incomplete Bedrock Edition docs, see [[Bedrock Protocol]]. For the old Pocket Edition, see [[Pocket Edition Protocol Documentation]].<br />
}}<br />
<br />
This page presents a dissection of the current '''[https://minecraft.net/ Minecraft] protocol'''.<br />
<br />
If you're having trouble, check out the [[Protocol FAQ|FAQ]] or ask for help in the IRC channel [ircs://chat.freenode.net:6697/mcdevs #mcdevs on chat.freenode.net] ([http://wiki.vg/MCDevs More Information]).<br />
<br />
'''Note:''' While you may use the contents of this page without restriction to create servers, clients, bots, etc… you still need to provide attribution to #mcdevs if you copy any of the contents of this page for publication elsewhere.<br />
<br />
The changes between versions may be viewed at [[Protocol History]].<br />
<br />
== Definitions ==<br />
<br />
The Minecraft server accepts connections from TCP clients and communicates with them using ''packets''. A packet is a sequence of bytes sent over the TCP connection. The meaning of a packet depends both on its packet ID and the current state of the connection. The initial state of each connection is [[#Handshaking|Handshaking]], and state is switched using the packets [[#Handshake|Handshake]] and [[#Login Success|Login Success]].<br />
<br />
=== Data types ===<br />
<br />
{{:Data types}} <!-- Transcluded contents of Data types article in here — go to that page if you want to edit it --><br />
<br />
=== Other definitions ===<br />
<br />
{| class="wikitable"<br />
|-<br />
! Term<br />
! Definition<br />
|-<br />
| Player<br />
| When used in the singular, Player always refers to the client connected to the server.<br />
|-<br />
| Entity<br />
| Entity refers to any item, player, mob, minecart or boat etc. See {{Minecraft Wiki|Entity|the Minecraft Wiki article}} for a full list.<br />
|-<br />
| EID<br />
| An EID — or Entity ID — is a 4-byte sequence used to identify a specific entity. An entity's EID is unique on the entire server.<br />
|-<br />
| XYZ<br />
| In this document, the axis names are the same as those shown in the debug screen (F3). Y points upwards, X points east, and Z points south.<br />
|-<br />
| Meter<br />
| The meter is Minecraft's base unit of length, equal to the length of a vertex of a solid block. The term “block” may be used to mean “meter” or “cubic meter”.<br />
|-<br />
| Global palette<br />
| A table/dictionary/palette mapping nonnegative integers to block states. Block state IDs are created in a linear fashion based off of order of assignment. One block state ID allocated for each unique block state for a block; if a block has multiple properties then the number of allocated states is the product of the number of values for each property. A current list of properties and state ID ranges is found on [https://pokechu22.github.io/Burger/1.15.2.html burger].<br />
<br />
Alternatively, the vanilla server now includes an option to export the current block state ID mapping, by running <code>java -cp minecraft_server.jar net.minecraft.data.Main --reports</code>. See [[Data Generators]] for more information.<br />
|-<br />
| Notchian<br />
| The official implementation of vanilla Minecraft as developed and released by Mojang.<br />
|}<br />
<br />
== Packet format ==<br />
<br />
=== Without compression ===<br />
<br />
{| class="wikitable"<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| Length<br />
| VarInt<br />
| Length of Packet ID + Data<br />
|-<br />
| Packet ID<br />
| VarInt<br />
| <br />
|-<br />
| Data<br />
| Byte Array<br />
| Depends on the connection state and packet ID, see the sections below<br />
|}<br />
<br />
=== With compression ===<br />
<br />
Once a [[#Set Compression|Set Compression]] packet (with a non-negative threshold) is sent, [[wikipedia:Zlib|zlib]] compression is enabled for all following packets. The format of a packet changes slighty to include the size of the uncompressed packet.<br />
<br />
{| class=wikitable<br />
! Compressed?<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| No<br />
| Packet Length<br />
| VarInt<br />
| Length of Data Length + compressed length of (Packet ID + Data)<br />
|-<br />
| No<br />
| Data Length<br />
| VarInt<br />
| Length of uncompressed (Packet ID + Data) or 0<br />
|-<br />
|rowspan="2"| Yes<br />
| Packet ID<br />
| VarInt<br />
| zlib compressed packet ID (see the sections below)<br />
|-<br />
| Data<br />
| Byte Array<br />
| zlib compressed packet data (see the sections below)<br />
|}<br />
<br />
The length given by the Packet Length field is the number of bytes that remain in that packet, including the Data Length field.<br />
<br />
If Data Length is set to zero, then the packet is uncompressed; otherwise it is the size of the uncompressed packet.<br />
<br />
If compressed, the uncompressed length of (Packet ID + Data) must be equal to or over the threshold set in the packet [[#Set Compression|Set Compression]], otherwise the receiving party will disconnect.<br />
<br />
Compression can be disabled by sending the packet [[#Set Compression|Set Compression]] with a negative Threshold, or not sending the Set Compression packet at all.<br />
<br />
== Handshaking ==<br />
<br />
=== Clientbound ===<br />
<br />
There are no clientbound packets in the Handshaking state, since the protocol immediately switches to a different state after the client sends the first packet.<br />
<br />
=== Serverbound ===<br />
<br />
==== Handshake ====<br />
<br />
This causes the server to switch into the target state.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x00<br />
|rowspan="4"| Handshaking<br />
|rowspan="4"| Server<br />
| Protocol Version<br />
| VarInt<br />
| See [[protocol version numbers]] (currently 578 in Minecraft 1.15.2)<br />
|-<br />
| Server Address<br />
| String (255)<br />
| Hostname or IP, e.g. localhost or 127.0.0.1, that was used to connect. The Notchian server does not use this information. Note that SRV records are a complete redirect, e.g. if _minecraft._tcp.example.com points to mc.example.org, users connecting to example.com will provide mc.example.org as server address in addition to connecting to it.<br />
|- <br />
| Server Port<br />
| Unsigned Short<br />
| Default is 25565. The Notchian server does not use this information.<br />
|-<br />
| Next State<br />
| VarInt Enum<br />
| 1 for [[#Status|status]], 2 for [[#Login|login]]<br />
|}<br />
<br />
==== Legacy Server List Ping ====<br />
<br />
{{Warning|This packet uses a nonstandard format. It is never length-prefixed, and the packet ID is an Unsigned Byte instead of a VarInt.}}<br />
<br />
While not technically part of the current protocol, legacy clients may send this packet to initiate [[Server List Ping]], and modern servers should handle it correctly.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0xFE<br />
| Handshaking<br />
| Server<br />
| Payload<br />
| Unsigned Byte<br />
| always 1 (<code>0x01</code>)<br />
|}<br />
<br />
See [[Server List Ping#1.6]] for the details of the protocol that follows this packet.<br />
<br />
== Status ==<br />
{{Main|Server List Ping}}<br />
<br />
=== Clientbound ===<br />
<br />
==== Response ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x00<br />
|rowspan="2"| Status<br />
|rowspan="2"| Client<br />
|-<br />
| JSON Response<br />
| String (32767)<br />
| See [[Server List Ping#Response]]; as with all strings this is prefixed by its length as a VarInt<br />
|}<br />
<br />
==== Pong ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x01<br />
|rowspan="1"| Status<br />
|rowspan="1"| Client<br />
| Payload<br />
| Long<br />
| Should be the same as sent by the client<br />
|}<br />
<br />
=== Serverbound ===<br />
<br />
==== Request ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x00<br />
| Status<br />
| Server<br />
|colspan="3"| ''no fields''<br />
|}<br />
<br />
==== Ping ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x01<br />
|rowspan="1"| Status<br />
|rowspan="1"| Server<br />
| Payload<br />
| Long<br />
| May be any number. Notchian clients use a system-dependent time value which is counted in milliseconds.<br />
|}<br />
<br />
== Login ==<br />
<br />
The login process is as follows:<br />
<br />
# C→S: [[#Handshake|Handshake]] with Next State set to 2 (login)<br />
# C→S: [[#Login Start|Login Start]]<br />
# S→C: [[#Encryption Request|Encryption Request]]<br />
# Client auth<br />
# C→S: [[#Encryption Response|Encryption Response]]<br />
# Server auth, both enable encryption<br />
# S→C: [[#Set Compression|Set Compression]] (optional)<br />
# S→C: [[#Login Success|Login Success]]<br />
<br />
Set Compression, if present, must be sent before Login Success. Note that anything sent after Set Compression must use the [[#With_compression|Post Compression packet format]].<br />
<br />
For unauthenticated ("cracked"/offline-mode) and localhost connections (either of the two conditions is enough for an unencrypted connection) there is no encryption. In that case [[#Login Start|Login Start]] is directly followed by [[#Login Success|Login Success]].<br />
<br />
See [[Protocol Encryption]] for details.<br />
<br />
=== Clientbound ===<br />
<br />
==== Disconnect (login) ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x00<br />
|rowspan="1"| Login<br />
|rowspan="1"| Client<br />
| Reason<br />
| [[Chat]]<br />
| <br />
|}<br />
<br />
==== Encryption Request ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x01<br />
|rowspan="5"| Login<br />
|rowspan="5"| Client<br />
| Server ID<br />
| String (20)<br />
| Appears to be empty<br />
|-<br />
| Public Key Length<br />
| VarInt<br />
| Length of Public Key<br />
|-<br />
| Public Key<br />
| Byte Array<br />
| <br />
|-<br />
| Verify Token Length<br />
| VarInt<br />
| Length of Verify Token. Always 4 for Notchian servers.<br />
|-<br />
| Verify Token<br />
| Byte Array<br />
| A sequence of random bytes generated by the server<br />
|}<br />
<br />
See [[Protocol Encryption]] for details.<br />
<br />
==== Login Success ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x02<br />
|rowspan="2"| Login<br />
|rowspan="2"| Client<br />
| UUID<br />
| String (36)<br />
| Unlike in other packets, this field contains the UUID as a string with hyphens.<br />
|-<br />
| Username<br />
| String (16)<br />
| <br />
|}<br />
<br />
This packet switches the connection state to [[#Play|play]].<br />
<br />
{{Warning2|The (notchian) server might take a bit to fully transition to the Play state, so it's recommended to wait before sendings Play packets, either by setting a timeout, or waiting for Play packets from the server (usually [[#Player Info|Player Info]]).<br />
<br />
The notchian client doesn't send any (non-[[#Keep Alive|keep alive]]) packets until the next tick/[[#Time Update|time update]] packet.<br />
}}<br />
<br />
==== Set Compression ====<br />
<br />
Enables compression. If compression is enabled, all following packets are encoded in the [[#With compression|compressed packet format]]. Negative or zero values will disable compression, meaning the packet format should remain in the [[#Without compression|uncompressed packet format]]. However, this packet is entirely optional, and if not sent, compression will also not be enabled (the notchian server does not send the packet when compression is disabled).<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x03<br />
|rowspan="1"| Login<br />
|rowspan="1"| Client<br />
| Threshold<br />
| VarInt<br />
| Maximum size of a packet before it is compressed<br />
|}<br />
<br />
==== Login Plugin Request ====<br />
<br />
Used to implement a custom handshaking flow together with [[#Login_Plugin_Response | Login Plugin Response]].<br />
<br />
Unlike plugin messages in "play" mode, these messages follow a lock-step request/response scheme, where the client is expected to respond to a request indicating whether it understood. The notchian client always responds that it hasn't understood, and sends an empty payload.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x04<br />
|rowspan="3"| Login<br />
|rowspan="3"| Client<br />
| Message ID<br />
| VarInt<br />
| Generated by the server - should be unique to the connection.<br />
|-<br />
| Channel<br />
| Identifier<br />
| Name of the [[plugin channel]] used to send the data<br />
|-<br />
| Data<br />
| Byte Array<br />
| Any data, depending on the channel. The length of this array must be inferred from the packet length.<br />
|}<br />
<br />
=== Serverbound ===<br />
<br />
==== Login Start ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x00<br />
|rowspan="1"| Login<br />
|rowspan="1"| Server<br />
| Name<br />
| String (16)<br />
| Player's Username<br />
|}<br />
<br />
==== Encryption Response ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x01<br />
|rowspan="4"| Login<br />
|rowspan="4"| Server<br />
| Shared Secret Length<br />
| VarInt<br />
| Length of Shared Secret<br />
|-<br />
| Shared Secret<br />
| Byte Array<br />
| <br />
|-<br />
| Verify Token Length<br />
| VarInt<br />
| Length of Verify Token<br />
|-<br />
| Verify Token<br />
| Byte Array<br />
| <br />
|}<br />
<br />
See [[Protocol Encryption]] for details.<br />
<br />
==== Login Plugin Response ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x02<br />
|rowspan="3"| Login<br />
|rowspan="3"| Server<br />
| Message ID<br />
| VarInt<br />
| Should match ID from server.<br />
|-<br />
| Successful<br />
| Boolean<br />
| <code>true</code> if the client understands the request, <code>false</code> otherwise. When <code>false</code>, no payload follows.<br />
|-<br />
| Data<br />
| Optional Byte Array<br />
| Any data, depending on the channel. The length of this array must be inferred from the packet length.<br />
|}<br />
<br />
== Play ==<br />
<br />
=== Clientbound ===<br />
<br />
==== Spawn Entity ====<br />
<br />
Sent by the server when a vehicle or other non-living entity is created.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="12"| 0x00<br />
|rowspan="12"| Play<br />
|rowspan="12"| Client<br />
| Entity ID<br />
| VarInt<br />
| EID of the entity<br />
|-<br />
| Object UUID<br />
| UUID<br />
| <br />
|-<br />
| Type<br />
| VarInt<br />
| The type of entity (same as in [[#Spawn Living Entity|Spawn Living Entity]])<br />
|-<br />
| X<br />
| Double<br />
| <br />
|-<br />
| Y<br />
| Double<br />
| <br />
|-<br />
| Z<br />
| Double<br />
| <br />
|-<br />
| Pitch<br />
| Angle<br />
| <br />
|-<br />
| Yaw<br />
| Angle<br />
| <br />
|-<br />
| Data<br />
| Int<br />
| Meaning dependent on the value of the Type field, see [[Object Data]] for details.<br />
|-<br />
| Velocity X<br />
| Short<br />
|rowspan="3"| Same units as [[#Entity Velocity|Entity Velocity]]. Always sent, but only used when Data is greater than 0 (except for some entities which always ignore it; see [[Object Data]] for details).<br />
|-<br />
| Velocity Y<br />
| Short<br />
|-<br />
| Velocity Z<br />
| Short<br />
|}<br />
<br />
==== Spawn Experience Orb ====<br />
<br />
Spawns one or more experience orbs.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x01<br />
|rowspan="5"| Play<br />
|rowspan="5"| Client<br />
| Entity ID<br />
| VarInt<br />
| <br />
|-<br />
| X<br />
| Double<br />
| <br />
|-<br />
| Y<br />
| Double<br />
| <br />
|-<br />
| Z<br />
| Double<br />
| <br />
|-<br />
| Count<br />
| Short<br />
| The amount of experience this orb will reward once collected<br />
|}<br />
<br />
==== Spawn Weather Entity ====<br />
<br />
With this packet, the server notifies the client of thunderbolts striking within a 512 block radius around the player. The coordinates specify where exactly the thunderbolt strikes.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x02<br />
|rowspan="5"| Play<br />
|rowspan="5"| Client<br />
| Entity ID<br />
| VarInt<br />
| The EID of the thunderbolt<br />
|-<br />
| Type<br />
| Byte Enum<br />
| The global entity type, currently always 1 for thunderbolt<br />
|-<br />
| X<br />
| Double<br />
| <br />
|-<br />
| Y<br />
| Double<br />
| <br />
|-<br />
| Z<br />
| Double<br />
| <br />
|}<br />
<br />
==== Spawn Living Entity ====<br />
<br />
Sent by the server when a living entity is spawned.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="12"| 0x03<br />
|rowspan="12"| Play<br />
|rowspan="12"| Client<br />
| Entity ID<br />
| VarInt<br />
| <br />
|-<br />
| Entity UUID<br />
| UUID<br />
| <br />
|-<br />
| Type<br />
| VarInt<br />
| The type of mob. See [[Entities#Mobs]]<br />
|-<br />
| X<br />
| Double<br />
| <br />
|-<br />
| Y<br />
| Double<br />
| <br />
|-<br />
| Z<br />
| Double<br />
| <br />
|-<br />
| Yaw<br />
| Angle<br />
| <br />
|-<br />
| Pitch<br />
| Angle<br />
| <br />
|-<br />
| Head Pitch<br />
| Angle<br />
| <br />
|-<br />
| Velocity X<br />
| Short<br />
| Same units as [[#Entity Velocity|Entity Velocity]]<br />
|-<br />
| Velocity Y<br />
| Short<br />
| Same units as [[#Entity Velocity|Entity Velocity]]<br />
|-<br />
| Velocity Z<br />
| Short<br />
| Same units as [[#Entity Velocity|Entity Velocity]]<br />
|}<br />
<br />
==== Spawn Painting ====<br />
<br />
This packet shows location, name, and type of painting.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x04<br />
|rowspan="5"| Play<br />
|rowspan="5"| Client<br />
| Entity ID<br />
| VarInt<br />
| <br />
|-<br />
| Entity UUID<br />
| UUID<br />
| <br />
|-<br />
| Motive<br />
| VarInt<br />
| Panting's ID, see below<br />
|-<br />
| Location<br />
| Position<br />
| Center coordinates (see below)<br />
|-<br />
| Direction<br />
| Byte Enum<br />
| Direction the painting faces (North = 2, South = 0, West = 1, East = 3)<br />
|}<br />
<br />
Calculating the center of an image: given a (width × height) grid of cells, with <code>(0, 0)</code> being the top left corner, the center is <code>(max(0, width / 2 - 1), height / 2)</code>. E.g. <code>(1, 0)</code> for a 2×1 painting, or <code>(1, 2)</code> for a 4×4 painting.<br />
<br />
List of paintings by coordinates in <code>paintings_kristoffer_zetterstrand.png</code> (where x and y are in pixels from the top left and width and height are in pixels or 16ths of a block):<br />
<br />
{| class="wikitable"<br />
! Name<br />
! ID<br />
! x<br />
! y<br />
! width<br />
! height<br />
|-<br />
| <code>minecraft:kebab</code><br />
| 0<br />
| 0<br />
| 0<br />
| 16<br />
| 16<br />
|-<br />
| <code>minecraft:aztec</code><br />
| 1<br />
| 16<br />
| 0<br />
| 16<br />
| 16<br />
|-<br />
| <code>minecraft:alban</code><br />
| 2<br />
| 32<br />
| 0<br />
| 16<br />
| 16<br />
|-<br />
| <code>minecraft:aztec2</code><br />
| 3<br />
| 48<br />
| 0<br />
| 16<br />
| 16<br />
|-<br />
| <code>minecraft:bomb</code><br />
| 4<br />
| 64<br />
| 0<br />
| 16<br />
| 16<br />
|-<br />
| <code>minecraft:plant</code><br />
| 5<br />
| 80<br />
| 0<br />
| 16<br />
| 16<br />
|-<br />
| <code>minecraft:wasteland</code><br />
| 6<br />
| 96<br />
| 0<br />
| 16<br />
| 16<br />
|-<br />
| <code>minecraft:pool</code><br />
| 7<br />
| 0<br />
| 32<br />
| 32<br />
| 16<br />
|-<br />
| <code>minecraft:courbet</code><br />
| 8<br />
| 32<br />
| 32<br />
| 32<br />
| 16<br />
|-<br />
| <code>minecraft:sea</code><br />
| 9<br />
| 64<br />
| 32<br />
| 32<br />
| 16<br />
|-<br />
| <code>minecraft:sunset</code><br />
| 10<br />
| 96<br />
| 32<br />
| 32<br />
| 16<br />
|-<br />
| <code>minecraft:creebet</code><br />
| 11<br />
| 128<br />
| 32<br />
| 32<br />
| 16<br />
|-<br />
| <code>minecraft:wanderer</code><br />
| 12<br />
| 0<br />
| 64<br />
| 16<br />
| 32<br />
|-<br />
| <code>minecraft:graham</code><br />
| 13<br />
| 16<br />
| 64<br />
| 16<br />
| 32<br />
|-<br />
| <code>minecraft:match</code><br />
| 14<br />
| 0<br />
| 128<br />
| 32<br />
| 32<br />
|-<br />
| <code>minecraft:bust</code><br />
| 15<br />
| 32<br />
| 128<br />
| 32<br />
| 32<br />
|-<br />
| <code>minecraft:stage</code><br />
| 16<br />
| 64<br />
| 128<br />
| 32<br />
| 32<br />
|-<br />
| <code>minecraft:void</code><br />
| 17<br />
| 96<br />
| 128<br />
| 32<br />
| 32<br />
|-<br />
| <code>skull_and_roses</code><br />
| 18<br />
| 128<br />
| 128<br />
| 32<br />
| 32<br />
|-<br />
| <code>minecraft:wither</code><br />
| 19<br />
| 160<br />
| 128<br />
| 32<br />
| 32<br />
|-<br />
| <code>minecraft:fighters</code><br />
| 20<br />
| 0<br />
| 96<br />
| 64<br />
| 32<br />
|-<br />
| <code>minecraft:pointer</code><br />
| 21<br />
| 0<br />
| 192<br />
| 64<br />
| 64<br />
|-<br />
| <code>minecraft:pigscene</code><br />
| 22<br />
| 64<br />
| 192<br />
| 64<br />
| 64<br />
|-<br />
| <code>minecraft:burning_skull</code><br />
| 23<br />
| 128<br />
| 192<br />
| 64<br />
| 64<br />
|-<br />
| <code>minecraft:skeleton</code><br />
| 24<br />
| 192<br />
| 64<br />
| 64<br />
| 48<br />
|-<br />
| <code>minecraft:donkey_kong</code><br />
| 25<br />
| 192<br />
| 112<br />
| 64<br />
| 48<br />
|}<br />
<br />
The {{Minecraft Wiki|Painting#Canvases|Minecraft Wiki article on paintings}} also provides a list of painting names to the actual images.<br />
<br />
==== Spawn Player ====<br />
<br />
This packet is sent by the server when a player comes into visible range, ''not'' when a player joins.<br />
<br />
This packet must be sent after the [[#Player Info|Player Info]] packet that adds the player data for the client to use when spawning a player. If the Player Info for the player spawned by this packet is not present when this packet arrives, Notchian clients will not spawn the player entity. The Player Info packet includes skin/cape data.<br />
<br />
Servers can, however, safely spawn player entities for players not in visible range. The client appears to handle it correctly.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="7"| 0x05<br />
|rowspan="7"| Play<br />
|rowspan="7"| Client<br />
| Entity ID<br />
| VarInt<br />
| Player's EID<br />
|-<br />
| Player UUID<br />
| UUID<br />
| See below for notes on {{Minecraft Wiki|Server.properties#online-mode|offline mode}} and NPCs<br />
|-<br />
| X<br />
| Double<br />
| <br />
|-<br />
| Y<br />
| Double<br />
| <br />
|-<br />
| Z<br />
| Double<br />
| <br />
|-<br />
| Yaw<br />
| Angle<br />
| <br />
|-<br />
| Pitch<br />
| Angle<br />
| <br />
|}<br />
<br />
When in {{Minecraft Wiki|Server.properties#online-mode|online mode}}, the UUIDs must be valid and have valid skin blobs.<br />
<br />
In offline mode, [[Wikipedia:Universally unique identifier#Versions 3 and 5 (namespace name-based)|UUID v3]] is used with the String <code>OfflinePlayer:&lt;player name&gt;</code>, encoded in UTF-8 (and case-sensitive).<br />
<br />
For NPCs UUID v2 should be used. Note:<br />
<br />
<+Grum> i will never confirm this as a feature you know that :)<br />
<br />
In an example UUID, <code>xxxxxxxx-xxxx-Yxxx-xxxx-xxxxxxxxxxxx</code>, the UUID version is specified by <code>Y</code>. So, for UUID v3, <code>Y</code> will always be <code>3</code>, and for UUID v2, <code>Y</code> will always be <code>2</code>.<br />
<br />
==== Entity Animation (clientbound) ====<br />
<br />
Sent whenever an entity should change animation.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x06<br />
|rowspan="2"| Play<br />
|rowspan="2"| Client<br />
| Entity ID<br />
| VarInt<br />
| Player ID<br />
|-<br />
| Animation<br />
| Unsigned Byte<br />
| Animation ID (see below)<br />
|}<br />
<br />
Animation can be one of the following values:<br />
<br />
{| class="wikitable"<br />
! ID<br />
! Animation<br />
|-<br />
| 0<br />
| Swing main arm<br />
|-<br />
| 1<br />
| Take damage<br />
|-<br />
| 2<br />
| Leave bed<br />
|-<br />
| 3<br />
| Swing offhand<br />
|-<br />
| 4<br />
| Critical effect<br />
|-<br />
| 5<br />
| Magic critical effect<br />
|}<br />
<br />
==== Statistics ====<br />
<br />
Sent as a response to [[#Client_Status|Client Status 0x04]] (id 1).<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To <br />
!colspan="2"| Field Name<br />
!colspan="2"| Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x07<br />
|rowspan="4"| Play<br />
|rowspan="4"| Client<br />
|colspan="2"| Count<br />
|colspan="2"| VarInt<br />
| Number of elements in the following array<br />
|-<br />
|rowspan="2"| Statistic<br />
| Category ID<br />
|rowspan="2"| Array<br />
| VarInt<br />
| See below<br />
|-<br />
| Statistic ID<br />
| VarInt<br />
| See below<br />
|-<br />
|colspan="2"| Value<br />
|colspan="2"| VarInt<br />
| The amount to set it to<br />
|}<br />
<br />
Categories (these are namespaced, but with <code>:</code> replaced with <code>.</code>):<br />
<br />
{| class="wikitable"<br />
! Name<br />
! ID<br />
! Registry<br />
|-<br />
| <code>minecraft.mined</code><br />
| 0<br />
| Blocks<br />
|-<br />
| <code>minecraft.crafted</code><br />
| 1<br />
| Items<br />
|-<br />
| <code>minecraft.used</code><br />
| 2<br />
| Items<br />
|-<br />
| <code>minecraft.broken</code><br />
| 3<br />
| Items<br />
|-<br />
| <code>minecraft.picked_up</code><br />
| 4<br />
| Items<br />
|-<br />
| <code>minecraft.dropped</code><br />
| 5<br />
| Items<br />
|-<br />
| <code>minecraft.killed</code><br />
| 6<br />
| Entities<br />
|-<br />
| <code>minecraft.killed_by</code><br />
| 7<br />
| Entities<br />
|-<br />
| <code>minecraft.custom</code><br />
| 8<br />
| Custom<br />
|}<br />
<br />
Blocks, Items, and Entities use block (not block state), item, and entity ids.<br />
<br />
Custom has the following (unit only matters for clients):<br />
<br />
{| class="wikitable"<br />
! Name<br />
! ID<br />
! Unit<br />
|-<br />
| <code>minecraft.leave_game</code><br />
| 0<br />
| None<br />
|-<br />
| <code>minecraft.play_one_minute</code><br />
| 1<br />
| Time<br />
|-<br />
| <code>minecraft.time_since_death</code><br />
| 2<br />
| Time<br />
|-<br />
| <code>minecraft.sneak_Time</code><br />
| 3<br />
| Time<br />
|-<br />
| <code>minecraft.walk_one_cm</code><br />
| 4<br />
| Distance<br />
|-<br />
| <code>minecraft.crouch_one_cm</code><br />
| 5<br />
| Distance<br />
|-<br />
| <code>minecraft.sprint_one_cm</code><br />
| 6<br />
| Distance<br />
|-<br />
| <code>minecraft.swim_one_cm</code><br />
| 7<br />
| Distance<br />
|-<br />
| <code>minecraft.fall_one_cm</code><br />
| 8<br />
| Distance<br />
|-<br />
| <code>minecraft.climb_one_cm</code><br />
| 9<br />
| Distance<br />
|-<br />
| <code>minecraft.fly_one_cm</code><br />
| 10<br />
| Distance<br />
|-<br />
| <code>minecraft.dive_one_cm</code><br />
| 11<br />
| Distance<br />
|-<br />
| <code>minecraft.minecart_one_cm</code><br />
| 12<br />
| Distance<br />
|-<br />
| <code>minecraft.boat_one_cm</code><br />
| 13<br />
| Distance<br />
|-<br />
| <code>minecraft.pig_one_cm</code><br />
| 14<br />
| Distance<br />
|-<br />
| <code>minecraft.horse_one_cm</code><br />
| 15<br />
| Distance<br />
|-<br />
| <code>minecraft.aviate_one_cm</code><br />
| 16<br />
| Distance<br />
|-<br />
| <code>minecraft.jump</code><br />
| 17<br />
| None<br />
|-<br />
| <code>minecraft.drop</code><br />
| 18<br />
| None<br />
|-<br />
| <code>minecraft.damage_dealt</code><br />
| 19<br />
| Damage<br />
|-<br />
| <code>minecraft.damage_taken</code><br />
| 20<br />
| Damage<br />
|-<br />
| <code>minecraft.deaths</code><br />
| 21<br />
| None<br />
|-<br />
| <code>minecraft.mob_kills</code><br />
| 22<br />
| None<br />
|-<br />
| <code>minecraft.animals_bred</code><br />
| 23<br />
| None<br />
|-<br />
| <code>minecraft.player_kills</code><br />
| 24<br />
| None<br />
|-<br />
| <code>minecraft.fish_caught</code><br />
| 25<br />
| None<br />
|-<br />
| <code>minecraft.talked_to_villager</code><br />
| 26<br />
| None<br />
|-<br />
| <code>minecraft.traded_with_villager</code><br />
| 27<br />
| None<br />
|-<br />
| <code>minecraft.eat_cake_slice</code><br />
| 28<br />
| None<br />
|-<br />
| <code>minecraft.fill_cauldron</code><br />
| 29<br />
| None<br />
|-<br />
| <code>minecraft.use_cauldron</code><br />
| 30<br />
| None<br />
|-<br />
| <code>minecraft.clean_armor</code><br />
| 31<br />
| None<br />
|-<br />
| <code>minecraft.clean_banner</code><br />
| 32<br />
| None<br />
|-<br />
| <code>minecraft.interact_with_brewingstand</code><br />
| 33<br />
| None<br />
|-<br />
| <code>minecraft.interact_with_beacon</code><br />
| 34<br />
| None<br />
|-<br />
| <code>minecraft.inspect_dropper</code><br />
| 35<br />
| None<br />
|-<br />
| <code>minecraft.inspect_hopper</code><br />
| 36<br />
| None<br />
|-<br />
| <code>minecraft.inspect_dispenser</code><br />
| 37<br />
| None<br />
|-<br />
| <code>minecraft.play_noteblock</code><br />
| 38<br />
| None<br />
|-<br />
| <code>minecraft.tune_noteblock</code><br />
| 39<br />
| None<br />
|-<br />
| <code>minecraft.pot_flower</code><br />
| 40<br />
| None<br />
|-<br />
| <code>minecraft.trigger_trapped_chest</code><br />
| 41<br />
| None<br />
|-<br />
| <code>minecraft.open_enderchest</code><br />
| 42<br />
| None<br />
|-<br />
| <code>minecraft.enchant_item</code><br />
| 43<br />
| None<br />
|-<br />
| <code>minecraft.play_record</code><br />
| 44<br />
| None<br />
|-<br />
| <code>minecraft.interact_with_furnace</code><br />
| 45<br />
| None<br />
|-<br />
| <code>minecraft.interact_with_crafting_table</code><br />
| 46<br />
| None<br />
|-<br />
| <code>minecraft.open_chest</code><br />
| 47<br />
| None<br />
|-<br />
| <code>minecraft.sleep_in_bed</code><br />
| 48<br />
| None<br />
|-<br />
| <code>minecraft.open_shulker_box</code><br />
| 49<br />
| None<br />
|}<br />
<br />
Units:<br />
<br />
* None: just a normal number (formatted with 0 decimal places)<br />
* Damage: value is 10 times the normal amount<br />
* Distance: a distance in centimeters (hundredths of blocks)<br />
* Time: a time span in ticks<br />
<br />
==== Acknowledge Player Digging ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x08<br />
|rowspan="4"| Play<br />
|rowspan="4"| Client<br />
| Location<br />
| Position<br />
| Position where the digging was happening<br />
|-<br />
| Block<br />
| VarInt<br />
| Block state ID of the block that should be at that position now.<br />
|-<br />
| Status<br />
| VarInt enum<br />
| Same as Player Digging. Only Started digging (0), Cancelled digging (1), and Finished digging (2) are used.<br />
|-<br />
| Successful<br />
| Boolean<br />
| True if the digging succeeded; false if the client should undo any changes it made locally. (How does this work?)<br />
|}<br />
<br />
==== Block Break Animation ====<br />
<br />
0–9 are the displayable destroy stages and each other number means that there is no animation on this coordinate.<br />
<br />
Block break animations can still be applied on air; the animation will remain visible although there is no block being broken. However, if this is applied to a transparent block, odd graphical effects may happen, including water losing its transparency. (An effect similar to this can be seen in normal gameplay when breaking ice blocks)<br />
<br />
If you need to display several break animations at the same time you have to give each of them a unique Entity ID. The entity ID does not need to correspond to an actual entity on the client. It is valid to use a randomly generated number.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x09<br />
|rowspan="3"| Play<br />
|rowspan="3"| Client<br />
| Entity ID<br />
| VarInt<br />
| Entity ID of the entity breaking the block<br />
|-<br />
| Location<br />
| Position<br />
| Block Position<br />
|-<br />
| Destroy Stage<br />
| Byte<br />
| 0–9 to set it, any other value to remove it<br />
|}<br />
<br />
==== Block Entity Data ====<br />
<br />
Sets the block entity associated with the block at the given location.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x0A<br />
|rowspan="3"| Play<br />
|rowspan="3"| Client<br />
| Location<br />
| Position<br />
| <br />
|-<br />
| Action<br />
| Unsigned Byte<br />
| The type of update to perform, see below<br />
|-<br />
| NBT Data<br />
| [[NBT|NBT Tag]]<br />
| Data to set. May be a TAG_END (0), in which case the block entity at the given location is removed (though this is not required since the client will remove the block entity automatically on chunk unload or block removal)<br />
|}<br />
<br />
''Action'' field:<br />
<br />
* '''1''': Set data of a mob spawner (everything except for SpawnPotentials: current delay, min/max delay, mob to be spawned, spawn count, spawn range, etc.)<br />
* '''2''': Set command block text (command and last execution status)<br />
* '''3''': Set the level, primary, and secondary powers of a beacon<br />
* '''4''': Set rotation and skin of mob head<br />
* '''5''': Declare a conduit<br />
* '''6''': Set base color and patterns on a banner<br />
* '''7''': Set the data for a Structure tile entity<br />
* '''8''': Set the destination for a end gateway<br />
* '''9''': Set the text on a sign<br />
* '''10''': Unused<br />
* '''11''': Declare a bed<br />
* '''12''': Set data of a jigsaw block<br />
* '''13''': Set items in a campfire<br />
* '''14''': Behive information<br />
<br />
==== Block Action ====<br />
<br />
This packet is used for a number of actions and animations performed by blocks, usually non-persistent.<br />
<br />
See [[Block Actions]] for a list of values.<br />
<br />
{{Warning2|This packet uses a block ID, not a block state. Unfortunately, block IDs are not directly included in the output from [[Data Generators]], but can manually be calculated.}}<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x0B<br />
|rowspan="4"| Play<br />
|rowspan="4"| Client<br />
| Location<br />
| Position<br />
| Block coordinates<br />
|-<br />
| Action ID (Byte 1)<br />
| Unsigned Byte<br />
| Varies depending on block — see [[Block Actions]]<br />
|-<br />
| Action Param (Byte 2)<br />
| Unsigned Byte<br />
| Varies depending on block — see [[Block Actions]]<br />
|-<br />
| Block Type<br />
| VarInt<br />
| The block type ID for the block. This must match the block at the given coordinates.<br />
|}<br />
<br />
==== Block Change ====<br />
<br />
Fired whenever a block is changed within the render distance.<br />
<br />
{{Warning2|Changing a block in a chunk that is not loaded is not a stable action. The Notchian client currently uses a ''shared'' empty chunk which is modified for all block changes in unloaded chunks; while in 1.9 this chunk never renders in older versions the changed block will appear in all copies of the empty chunk. Servers should avoid sending block changes in unloaded chunks and clients should ignore such packets.}}<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x0C<br />
|rowspan="2"| Play<br />
|rowspan="2"| Client<br />
| Location<br />
| Position<br />
| Block Coordinates<br />
|-<br />
| Block ID<br />
| VarInt<br />
| The new block state ID for the block as given in the {{Minecraft Wiki|Data values#Block IDs|global palette}}. See that section for more information.<br />
|}<br />
<br />
==== Boss Bar ==== <br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
!colspan="2"| Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="14"| 0x0D<br />
|rowspan="14"| Play<br />
|rowspan="14"| Client<br />
|colspan="2"| UUID<br />
| UUID<br />
| Unique ID for this bar<br />
|-<br />
|colspan="2"| Action<br />
| VarInt Enum<br />
| Determines the layout of the remaining packet<br />
|-<br />
! Action<br />
! Field Name<br />
! <br />
! <br />
|-<br />
|rowspan="5"| 0: add<br />
| Title<br />
| [[Chat]]<br />
| <br />
|-<br />
| Health<br />
| Float<br />
| From 0 to 1. Values greater than 1 do not crash a Notchian client, and start [https://i.johni0702.de/nA.png rendering part of a second health bar] at around 1.5.<br />
|-<br />
| Color<br />
| VarInt Enum<br />
| Color ID (see below)<br />
|-<br />
| Division<br />
| VarInt Enum<br />
| Type of division (see below)<br />
|-<br />
| Flags<br />
| Unsigned Byte<br />
| Bit mask. 0x1: should darken sky, 0x2: is dragon bar (used to play end music), 0x04: create fog (previously was also controlled by 0x02)<br />
|-<br />
| 1: remove<br />
| ''no fields''<br />
| ''no fields''<br />
| Removes this boss bar<br />
|-<br />
| 2: update health<br />
| Health<br />
| Float<br />
| as above<br />
|-<br />
| 3: update title<br />
| Title<br />
| [[Chat]]<br />
| <br />
|-<br />
|rowspan="2"| 4: update style<br />
| Color<br />
| VarInt Enum<br />
| Color ID (see below)<br />
|-<br />
| Dividers<br />
| VarInt Enum<br />
| as above<br />
|-<br />
| 5: update flags<br />
| Flags<br />
| Unsigned Byte<br />
| as above<br />
|-<br />
|}<br />
<br />
{| class="wikitable"<br />
! ID<br />
! Color<br />
|-<br />
| 0<br />
| Pink<br />
|-<br />
| 1<br />
| Blue<br />
|-<br />
| 2<br />
| Red<br />
|-<br />
| 3<br />
| Green<br />
|-<br />
| 4<br />
| Yellow<br />
|-<br />
| 5<br />
| Purple<br />
|-<br />
| 6<br />
| White<br />
|}<br />
<br />
{| class="wikitable"<br />
! ID<br />
! Type of division<br />
|-<br />
| 0<br />
| No division<br />
|-<br />
| 1<br />
| 6 notches<br />
|-<br />
| 2<br />
| 10 notches<br />
|-<br />
| 3<br />
| 12 notches<br />
|-<br />
| 4<br />
| 20 notches<br />
|}<br />
<br />
==== Server Difficulty ====<br />
<br />
Changes the difficulty setting in the client's option menu<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x0E<br />
|rowspan="2"| Play<br />
|rowspan="2"| Client<br />
| Difficulty<br />
| Unsigned Byte<br />
| 0: peaceful, 1: easy, 2: normal, 3: hard<br />
|-<br />
| Difficulty locked?<br />
| Boolean<br />
|<br />
|}<br />
<br />
==== Chat Message (clientbound) ==== <br />
<br />
Identifying the difference between Chat/System Message is important as it helps respect the user's chat visibility options. See [[Chat#Processing chat|processing chat]] for more info about these positions.<br />
<br />
{{warning2|Game info accepts json formatting but does not display it, although the deprecated §-based formatting works. This is not an issue when using the [[#Title|Title]] packet, so prefer that packet for displaying information in that slot. See [https://bugs.mojang.com/browse/MC-119145 MC-119145] for more information.}}<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x0F<br />
|rowspan="2"| Play<br />
|rowspan="2"| Client<br />
| JSON Data<br />
| [[Chat]]<br />
| Limited to 32767 bytes<br />
|-<br />
| Position<br />
| Byte<br />
| 0: chat (chat box), 1: system message (chat box), 2: game info (above hotbar).<br />
|}<br />
<br />
==== Multi Block Change ====<br />
<br />
Fired whenever 2 or more blocks are changed within the same chunk on the same tick.<br />
<br />
{{Warning|Changing blocks in chunks not loaded by the client is unsafe (see note on [[#Block Change|Block Change]]).}}<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
!colspan="2"| Field Name<br />
!colspan="2"| Field Type<br />
! Notes<br />
|-<br />
|rowspan="6"| 0x10<br />
|rowspan="6"| Play<br />
|rowspan="6"| Client<br />
|colspan="2"| Chunk X<br />
|colspan="2"| Int<br />
| Chunk X coordinate<br />
|-<br />
|colspan="2"| Chunk Z<br />
|colspan="2"| Int<br />
| Chunk Z coordinate<br />
|-<br />
|colspan="2"| Record Count<br />
|colspan="2"| VarInt<br />
| Number of elements in the following array, i.e. the number of blocks affected<br />
|-<br />
|rowspan="3"| Record<br />
| Horizontal Position<br />
|rowspan="3"| Array<br />
| Unsigned Byte<br />
| The 4 most significant bits (<code>0xF0</code>) encode the X coordinate, relative to the chunk. The 4 least significant bits (<code>0x0F</code>) encode the Z coordinate, relative to the chunk.<br />
|-<br />
| Y Coordinate<br />
| Unsigned Byte<br />
| Y coordinate of the block<br />
|-<br />
| Block ID<br />
| VarInt<br />
| The new block state ID for the block as given in the {{Minecraft Wiki|Data values#Block IDs|global palette}}. See that section for more information.<br />
|}<br />
<br />
To decode the position into a world position:<br />
<br />
<syntaxhighlight lang="java"><br />
worldX = (horizPos >> 4 & 15) + (chunkX * 16);<br />
worldY = vertPos;<br />
worldZ = (horizPos & 15) + (chunkZ * 16);<br />
</syntaxhighlight><br />
<br />
==== Tab-Complete (clientbound) ====<br />
<br />
The server responds with a list of auto-completions of the last word sent to it. In the case of regular chat, this is a player username. Command names and parameters are also supported. The client sorts these alphabetically before listing them.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
!colspan="2"| Field Name<br />
!colspan="2"| Field Type<br />
! Notes<br />
|-<br />
|rowspan="8"| 0x11<br />
|rowspan="8"| Play<br />
|rowspan="8"| Client<br />
|-<br />
|colspan="2"| ID<br />
|colspan="2"| VarInt<br />
| Transaction ID<br />
|-<br />
|colspan="2"| Start<br />
|colspan="2"| VarInt<br />
| Start of the text to replace<br />
|-<br />
|colspan="2"| Length<br />
|colspan="2"| VarInt<br />
| Length of the text to replace<br />
|-<br />
|colspan="2"| Count<br />
|colspan="2"| VarInt<br />
| Number of elements in the following array<br />
|-<br />
|rowspan="3"| Matches<br />
| Match<br />
|rowspan="3"| Array<br />
| String (32767)<br />
| One eligible value to insert, note that each command is sent separately instead of in a single string, hence the need for Count. Note that for instance this doesn't include a leading <code>/</code> on commands.<br />
|-<br />
| Has tooltip<br />
| Boolean<br />
| True if the following is present<br />
|-<br />
| Tooltip<br />
| Optional [[Chat]]<br />
| Tooltip to display; only present if previous boolean is true<br />
|}<br />
<br />
==== Declare Commands ====<br />
<br />
Lists all of the commands on the server, and how they are parsed.<br />
<br />
This is a directed graph, with one root node. Each redirect or child node must refer only to nodes that have already been declared.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x12<br />
|rowspan="3"| Play<br />
|rowspan="3"| Client<br />
| Count<br />
| VarInt<br />
| Number of elements in the following array<br />
|-<br />
| Nodes<br />
| Array of [[Command Data|Node]]<br />
| An array of nodes<br />
|-<br />
| Root index<br />
| VarInt<br />
| Index of the <code>root</code> node in the previous array<br />
|}<br />
<br />
For more information on this packet, see the [[Command Data]] article.<br />
<br />
==== Window Confirmation (clientbound) ====<br />
<br />
A packet from the server indicating whether a request from the client was accepted, or whether there was a conflict (due to lag). If the packet was not accepted, the client must respond with a [[#Window Confirmation (serverbound)|serverbound window confirmation]] packet.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x13<br />
|rowspan="3"| Play<br />
|rowspan="3"| Client<br />
| Window ID<br />
| Byte<br />
| The ID of the window that the action occurred in<br />
|-<br />
| Action Number<br />
| Short<br />
| Every action that is to be accepted has a unique number. This number is an incrementing integer (starting at 0) with separate counts for each window ID.<br />
|-<br />
| Accepted<br />
| Boolean<br />
| Whether the action was accepted<br />
|}<br />
<br />
==== Close Window (clientbound) ====<br />
<br />
This packet is sent from the server to the client when a window is forcibly closed, such as when a chest is destroyed while it's open.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x14<br />
| Play<br />
| Client<br />
| Window ID<br />
| Unsigned Byte<br />
| This is the ID of the window that was closed. 0 for inventory.<br />
|}<br />
<br />
==== Window Items ====<br />
[[File:Inventory-slots.png|thumb|The inventory slots]]<br />
<br />
Sent by the server when items in multiple slots (in a window) are added/removed. This includes the main inventory, equipped armour and crafting slots.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x15<br />
|rowspan="3"| Play<br />
|rowspan="3"| Client<br />
| Window ID<br />
| Unsigned Byte<br />
| The ID of window which items are being sent for. 0 for player inventory.<br />
|-<br />
| Count<br />
| Short<br />
| Number of elements in the following array<br />
|-<br />
| Slot Data<br />
| Array of [[Slot Data|Slot]]<br />
| <br />
|}<br />
<br />
See [[Inventory#Windows|inventory windows]] for further information about how slots are indexed.<br />
<br />
==== Window Property ====<br />
<br />
This packet is used to inform the client that part of a GUI window should be updated.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x16<br />
|rowspan="3"| Play<br />
|rowspan="3"| Client<br />
| Window ID<br />
| Unsigned Byte<br />
| <br />
|-<br />
| Property<br />
| Short<br />
| The property to be updated, see below<br />
|-<br />
| Value<br />
| Short<br />
| The new value for the property, see below<br />
|}<br />
<br />
The meaning of the Property field depends on the type of the window. The following table shows the known combinations of window type and property, and how the value is to be interpreted.<br />
<br />
{| class="wikitable"<br />
|-<br />
! Window type<br />
! Property<br />
! Value<br />
|-<br />
|rowspan="4"| Furnace<br />
| 0: Fire icon (fuel left)<br />
| counting from fuel burn time down to 0 (in-game ticks)<br />
|-<br />
| 1: Maximum fuel burn time<br />
| fuel burn time or 0 (in-game ticks)<br />
|-<br />
| 2: Progress arrow<br />
| counting from 0 to maximum progress (in-game ticks)<br />
|-<br />
| 3: Maximum progress<br />
| always 200 on the notchian server<br />
|-<br />
|rowspan="10"| Enchantment Table<br />
| 0: Level requirement for top enchantment slot<br />
|rowspan="3"| The enchantment's xp level requirement<br />
|-<br />
| 1: Level requirement for middle enchantment slot<br />
|-<br />
| 2: Level requirement for bottom enchantment slot<br />
|-<br />
| 3: The enchantment seed<br />
| Used for drawing the enchantment names (in [[Wikipedia:Standard Galactic Alphabet|SGA]]) clientside. The same seed ''is'' used to calculate enchantments, but some of the data isn't sent to the client to prevent easily guessing the entire list (the seed value here is the regular seed bitwise and <code>0xFFFFFFF0</code>).<br />
|-<br />
| 4: Enchantment ID shown on mouse hover over top enchantment slot<br />
|rowspan="3"| The enchantment id (set to -1 to hide it), see below for values<br />
|-<br />
| 5: Enchantment ID shown on mouse hover over middle enchantment slot<br />
|-<br />
| 6: Enchantment ID shown on mouse hover over bottom enchantment slot<br />
|-<br />
| 7: Enchantment level shown on mouse hover over the top slot<br />
|rowspan="3"| The enchantment level (1 = I, 2 = II, 6 = VI, etc.), or -1 if no enchant<br />
|-<br />
| 8: Enchantment level shown on mouse hover over the middle slot<br />
|-<br />
| 9: Enchantment level shown on mouse hover over the bottom slot<br />
|-<br />
|rowspan="3"| Beacon<br />
| 0: Power level<br />
| 0-4, controls what effect buttons are enabled<br />
|-<br />
| 1: First potion effect<br />
| {{Minecraft Wiki|Data values#Status effects|Potion effect ID}} for the first effect, or -1 if no effect<br />
|-<br />
| 2: Second potion effect<br />
| {{Minecraft Wiki|Data values#Status effects|Potion effect ID}} for the second effect, or -1 if no effect<br />
|-<br />
| Anvil<br />
| 0: Repair cost<br />
| The repair's cost in xp levels<br />
|-<br />
|rowspan="2"| Brewing Stand<br />
| 0: Brew time<br />
| 0 – 400, with 400 making the arrow empty, and 0 making the arrow full<br />
|-<br />
| 1: Fuel time<br />
| 0 - 20, with 0 making the arrow empty, and 20 making the arrow full<br />
|}<br />
<br />
For an enchanting table, the following numerical IDs are used:<br />
<br />
{| class="wikitable"<br />
! Numerical ID<br />
! Enchantment ID<br />
! Enchantment Name<br />
|-<br />
| 0<br />
| minecraft:protection<br />
| Protection<br />
|-<br />
| 1<br />
| minecraft:fire_protection<br />
| Fire Protection<br />
|-<br />
| 2<br />
| minecraft:feather_falling<br />
| Feather Falling<br />
|-<br />
| 3<br />
| minecraft:blast_protection<br />
| Blast Protection<br />
|-<br />
| 4<br />
| minecraft:projectile_protection<br />
| Projectile Protection<br />
|-<br />
| 5<br />
| minecraft:respiration<br />
| Respiration<br />
|-<br />
| 6<br />
| minecraft:aqua_affinity<br />
| Aqua Affinity<br />
|-<br />
| 7<br />
| minecraft:thorns<br />
| Thorns<br />
|-<br />
| 8<br />
| minecraft:depth_strider<br />
| Depth Strider<br />
|-<br />
| 9<br />
| minecraft:frost_walker<br />
| Frost Walker<br />
|-<br />
| 10<br />
| minecraft:binding_curse<br />
| Curse of Binding<br />
|-<br />
| 11<br />
| minecraft:sharpness<br />
| Sharpness<br />
|-<br />
| 12<br />
| minecraft:smite<br />
| Smite<br />
|-<br />
| 13<br />
| minecraft:bane_of_arthropods<br />
| Bane of Arthropods<br />
|-<br />
| 14<br />
| minecraft:knockback<br />
| Knockback<br />
|-<br />
| 15<br />
| minecraft:fire_aspect<br />
| Fire Aspect<br />
|-<br />
| 16<br />
| minecraft:looting<br />
| Looting<br />
|-<br />
| 17<br />
| minecraft:sweeping<br />
| Sweeping Edge<br />
|-<br />
| 18<br />
| minecraft:efficiency<br />
| Efficiency<br />
|-<br />
| 19<br />
| minecraft:silk_touch<br />
| Silk Touch<br />
|-<br />
| 20<br />
| minecraft:unbreaking<br />
| Unbreaking<br />
|-<br />
| 21<br />
| minecraft:fortune<br />
| Fortune<br />
|-<br />
| 22<br />
| minecraft:power<br />
| Power<br />
|-<br />
| 23<br />
| minecraft:punch<br />
| Punch<br />
|-<br />
| 24<br />
| minecraft:flame<br />
| Flame<br />
|-<br />
| 25<br />
| minecraft:infinity<br />
| Infinity<br />
|-<br />
| 26<br />
| minecraft:luck_of_the_sea<br />
| Luck of the Sea<br />
|-<br />
| 27<br />
| minecraft:lure<br />
| Lure<br />
|-<br />
| 28<br />
| minecraft:loyalty<br />
| Loyalty<br />
|-<br />
| 29<br />
| minecraft:impaling<br />
| Impaling<br />
|-<br />
| 30<br />
| minecraft:riptide<br />
| Riptide<br />
|-<br />
| 31<br />
| minecraft:channeling<br />
| Channeling<br />
|-<br />
| 32<br />
| minecraft:mending<br />
| Mending<br />
|-<br />
| 33<br />
| minecraft:vanishing_curse<br />
| Curse of Vanishing<br />
|}<br />
<br />
==== Set Slot ====<br />
<br />
Sent by the server when an item in a slot (in a window) is added/removed.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x17<br />
|rowspan="3"| Play<br />
|rowspan="3"| Client<br />
| Window ID<br />
| Byte<br />
| The window which is being updated. 0 for player inventory. Note that all known window types include the player inventory. This packet will only be sent for the currently opened window while the player is performing actions, even if it affects the player inventory. After the window is closed, a number of these packets are sent to update the player's inventory window (0).<br />
|-<br />
| Slot<br />
| Short<br />
| The slot that should be updated<br />
|-<br />
| Slot Data<br />
| [[Slot Data|Slot]]<br />
| <br />
|}<br />
<br />
To set the cursor (the item currently dragged with the mouse), use -1 as Window ID and as Slot.<br />
<br />
This packet can only be used to edit the hotbar of the player's inventory if window ID is set to 0 (slots 36 through 44). If the window ID is set to -2, then any slot in the inventory can be used but no add item animation will be played.<br />
<br />
==== Set Cooldown ====<br />
<br />
Applies a cooldown period to all items with the given type. Used by the Notchian server with enderpearls. This packet should be sent when the cooldown starts and also when the cooldown ends (to compensate for lag), although the client will end the cooldown automatically. Can be applied to any item, note that interactions still get sent to the server with the item but the client does not play the animation nor attempt to predict results (i.e block placing).<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x18<br />
|rowspan="2"| Play<br />
|rowspan="2"| Client<br />
| Item ID<br />
| VarInt<br />
| Numeric ID of the item to apply a cooldown to.<br />
|-<br />
| Cooldown Ticks<br />
| VarInt<br />
| Number of ticks to apply a cooldown for, or 0 to clear the cooldown.<br />
|}<br />
<br />
==== Plugin Message (clientbound) ====<br />
<br />
{{Main|Plugin channels}}<br />
<br />
Mods and plugins can use this to send their data. Minecraft itself uses several [[plugin channel]]s. These internal channels are in the <code>minecraft</code> namespace.<br />
<br />
More documentation on this: [http://dinnerbone.com/blog/2012/01/13/minecraft-plugin-channels-messaging/ http://dinnerbone.com/blog/2012/01/13/minecraft-plugin-channels-messaging/]<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x19<br />
|rowspan="2"| Play<br />
|rowspan="2"| Client<br />
| Channel<br />
| Identifier<br />
| Name of the [[plugin channel]] used to send the data<br />
|-<br />
| Data<br />
| Byte Array<br />
| Any data, depending on the channel. <code>minecraft:</code> channels are documented [[plugin channel|here]]. The length of this array must be inferred from the packet length.<br />
|}<br />
<br />
==== Named Sound Effect ====<br />
{{See also|#Sound Effect}}<br />
<br />
Used to play a sound effect on the client. Custom sounds may be added by resource packs.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="7"| 0x1A<br />
|rowspan="7"| Play<br />
|rowspan="7"| Client<br />
| Sound Name<br />
| Identifier<br />
| All sound effect names as of 1.15.2 can be seen [https://pokechu22.github.io/Burger/1.15.2.html#sounds here].<br />
|-<br />
| Sound Category<br />
| VarInt Enum<br />
| The category that this sound will be played from ([https://gist.github.com/konwboj/7c0c380d3923443e9d55 current categories])<br />
|-<br />
| Effect Position X<br />
| Int<br />
| Effect X multiplied by 8 ([[Data types#Fixed-point numbers|fixed-point number]] with only 3 bits dedicated to the fractional part)<br />
|-<br />
| Effect Position Y<br />
| Int<br />
| Effect Y multiplied by 8 ([[Data types#Fixed-point numbers|fixed-point number]] with only 3 bits dedicated to the fractional part)<br />
|-<br />
| Effect Position Z<br />
| Int<br />
| Effect Z multiplied by 8 ([[Data types#Fixed-point numbers|fixed-point number]] with only 3 bits dedicated to the fractional part)<br />
|-<br />
| Volume<br />
| Float<br />
| 1 is 100%, can be more<br />
|-<br />
| Pitch<br />
| Float<br />
| Float between 0.5 and 2.0 by Notchian clients<br />
|}<br />
<br />
==== Disconnect (play) ====<br />
<br />
Sent by the server before it disconnects a client. The client assumes that the server has already closed the connection by the time the packet arrives.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x1B<br />
| Play<br />
| Client<br />
| Reason<br />
| [[Chat]]<br />
| Displayed to the client when the connection terminates.<br />
|}<br />
<br />
==== Entity Status ====<br />
<br />
Entity statuses generally trigger an animation for an entity. The available statuses vary by the entity's type (and are available to subclasses of that type as well).<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x1C<br />
|rowspan="2"| Play<br />
|rowspan="2"| Client<br />
| Entity ID<br />
| Int<br />
| <br />
|-<br />
| Entity Status<br />
| Byte Enum<br />
| See below<br />
|}<br />
<br />
See [[Entity statuses]] for a list of which statuses are valid for each type of entity.<br />
<br />
==== Explosion ====<br />
<br />
Sent when an explosion occurs (creepers, TNT, and ghast fireballs).<br />
<br />
Each block in Records is set to air. Coordinates for each axis in record is int(X) + record.x<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="9"| 0x1D<br />
|rowspan="9"| Play<br />
|rowspan="9"| Client<br />
| X<br />
| Float<br />
| <br />
|-<br />
| Y<br />
| Float<br />
| <br />
|-<br />
| Z<br />
| Float<br />
| <br />
|-<br />
| Strength<br />
| Float<br />
| A strength greater than or equal to 2.0 spawns a <code>minecraft:explosion_emitter</code> particle, while a lesser strength spawns a <code>minecraft:explosion</code> particle.<br />
|-<br />
| Record Count<br />
| Int<br />
| Number of elements in the following array<br />
|-<br />
| Records<br />
| Array of (Byte, Byte, Byte)<br />
| Each record is 3 signed bytes long; the 3 bytes are the XYZ (respectively) signed offsets of affected blocks.<br />
|-<br />
| Player Motion X<br />
| Float<br />
| X velocity of the player being pushed by the explosion<br />
|-<br />
| Player Motion Y<br />
| Float<br />
| Y velocity of the player being pushed by the explosion<br />
|-<br />
| Player Motion Z<br />
| Float<br />
| Z velocity of the player being pushed by the explosion<br />
|}<br />
<br />
==== Unload Chunk ====<br />
<br />
Tells the client to unload a chunk column.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x1E<br />
|rowspan="2"| Play<br />
|rowspan="2"| Client<br />
| Chunk X<br />
| Int<br />
| Block coordinate divided by 16, rounded down<br />
|-<br />
| Chunk Z<br />
| Int<br />
| Block coordinate divided by 16, rounded down<br />
|}<br />
<br />
It is legal to send this packet even if the given chunk is not currently loaded.<br />
<br />
==== Change Game State ====<br />
<br />
Used for a wide variety of game state things, from whether to bed use to gamemode to demo messages.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x1F<br />
|rowspan="2"| Play<br />
|rowspan="2"| Client<br />
| Reason<br />
| Unsigned Byte<br />
| See below<br />
|-<br />
| Value<br />
| Float<br />
| Depends on Reason<br />
|}<br />
<br />
''Reason codes'':<br />
<br />
{| class="wikitable"<br />
! Reason<br />
! Effect<br />
! Value<br />
|-<br />
| 0<br />
| Invalid Bed<br />
| Would be used to switch between messages, but the only used message is 0 for invalid bed<br />
|-<br />
| 1<br />
| End raining<br />
| <br />
|-<br />
| 2<br />
| Begin raining<br />
| <br />
|-<br />
| 3<br />
| Change gamemode<br />
| 0: Survival, 1: Creative, 2: Adventure, 3: Spectator<br />
|-<br />
| 4<br />
| Exit end<br />
| 0: Immediately send Client Status of respawn without showing end credits; 1: Show end credits and respawn at the when they finish showing (or when esc is pressed). 1 is sent if the player has not yet received the "The end?" advancement, while if they do have it 0 is used.<br />
|-<br />
| 5<br />
| Demo message<br />
| 0: Show welcome to demo screen, 101: Tell movement controls, 102: Tell jump control, 103: Tell inventory control, 104: Tell that the demo is over and print a message about how to take a screenshot<br />
|- <br />
| 6<br />
| Arrow hitting player<br />
| Appears to be played when an arrow strikes another player in Multiplayer<br />
|-<br />
| 7<br />
| Fade value<br />
| The current darkness value. 1 = Dark, 0 = Bright, Setting the value higher causes the game to change color and freeze<br />
|-<br />
| 8<br />
| Fade time<br />
| Time in ticks for the sky to fade<br />
|-<br />
| 9<br />
| Play pufferfish sting sound<br />
|-<br />
| 10<br />
| Play elder guardian mob appearance (effect and sound)<br />
| <br />
|-<br />
| 11<br />
| Enable respawn screen<br />
| 0: Enable respawn screen, 1: Immediately respawn (sent when the doImmediateRespawn gamerule changes) <br />
|}<br />
<br />
==== Open Horse Window ====<br />
<br />
This packet is used exclusively for opening the horse GUI. [[#Open Window|Open Window]] is used for all other GUIs.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x20<br />
|rowspan="3"| Play<br />
|rowspan="3"| Client<br />
| Window ID?<br />
| Byte<br />
|<br />
|-<br />
| Number of slots?<br />
| VarInt<br />
|<br />
|-<br />
| Entity ID?<br />
| Integer<br />
|<br />
|}<br />
<br />
==== Keep Alive (clientbound) ====<br />
<br />
The server will frequently send out a keep-alive, each containing a random ID. The client must respond with the same packet. If the client does not respond to them for over 30 seconds, the server kicks the client. Vice versa, if the server does not send any keep-alives for 20 seconds, the client will disconnect and yields a "Timed out" exception.<br />
<br />
The Notchian server uses a system-dependent time in milliseconds to generate the keep alive ID value.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x21<br />
|rowspan="1"| Play<br />
|rowspan="1"| Client<br />
| Keep Alive ID<br />
| Long<br />
| <br />
|}<br />
<br />
==== Chunk Data ====<br />
{{Main|Chunk Format}}<br />
{{See also|#Unload Chunk}}<br />
<br />
{{Need Info|How do biomes work now? The biome change happened at the same time as the seed change, but it's not clear how/if biomes could be computed given that it's not the actual seed... ([https://www.reddit.com/r/Mojira/comments/e5at6i/a_discussion_for_the_changes_to_how_biomes_are/ /r/mojira discussion] which notes that it seems to be some kind of interpolation, and 3D biomes are only used in the nether)}}<br />
<br />
The server only sends skylight information for chunk pillars in the {{Minecraft Wiki|Overworld}}, it's up to the client to know in which dimenison the player is currently located. You can also infer this information from the primary bitmask and the amount of uncompressed bytes sent. This packet also sends all block entities in the chunk (though sending them is not required; it is still legal to send them with [[#Update Block Entity|Update Block Entity]] later).<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="10"| 0x22<br />
|rowspan="10"| Play<br />
|rowspan="10"| Client<br />
| Chunk X<br />
| Int<br />
| Chunk coordinate (block coordinate divided by 16, rounded down)<br />
|-<br />
| Chunk Z<br />
| Int<br />
| Chunk coordinate (block coordinate divided by 16, rounded down)<br />
|-<br />
| Full chunk<br />
| Boolean<br />
| See [[Chunk Format#Full chunk|Chunk Format]]<br />
|-<br />
| Primary Bit Mask<br />
| VarInt<br />
| Bitmask with bits set to 1 for every 16×16×16 chunk section whose data is included in Data. The least significant bit represents the chunk section at the bottom of the chunk column (from y=0 to y=15).<br />
|-<br />
| Heightmaps<br />
| [[NBT]]<br />
| Compound containing one long array named <code>MOTION_BLOCKING</code>, which is a heightmap for the highest solid block at each position in the chunk (as a compacted long array with 256 entries at 9 bits per entry totaling 36 longs). The Notchian server also adds a <code>WORLD_SURFACE</code> long array, the purpose of which is unknown, but it's not required for the chunk to be accepted.<br />
|-<br />
| Biomes<br />
| Optional array of Integer<br />
| 1024 biome IDs, ordered by x then z then y, in 4&times;4&times;4 blocks. Not present if full chunk is false.<br />
|- <br />
| Size<br />
| VarInt<br />
| Size of Data in bytes<br />
|-<br />
| Data<br />
| Byte array<br />
| See [[Chunk Format#Data structure|data structure]] in Chunk Format<br />
|-<br />
| Number of block entities<br />
| VarInt<br />
| Number of elements in the following array<br />
|-<br />
| Block entities<br />
| Array of [[NBT|NBT Tag]]<br />
| All block entities in the chunk. Use the x, y, and z tags in the NBT to determine their positions.<br />
|}<br />
<br />
Note that the Notchian client requires an [[#Update View Position|Update View Position]] packet when it crosses a chunk border, otherwise it'll only display render distance + 2 chunks around the chunk it spawned in.<br />
<br />
==== Effect ====<br />
Sent when a client is to play a sound or particle effect.<br />
<br />
By default, the Minecraft client adjusts the volume of sound effects based on distance. The final boolean field is used to disable this, and instead the effect is played from 2 blocks away in the correct direction. Currently this is only used for effect 1023 (wither spawn), effect 1028 (enderdragon death), and effect 1038 (end portal opening); it is ignored on other effects.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x23<br />
|rowspan="4"| Play<br />
|rowspan="4"| Client<br />
| Effect ID<br />
| Int<br />
| The ID of the effect, see below<br />
|-<br />
| Location<br />
| Position<br />
| The location of the effect<br />
|-<br />
| Data<br />
| Int<br />
| Extra data for certain effects, see below<br />
|-<br />
| Disable Relative Volume<br />
| Boolean<br />
| See above<br />
|}<br />
<br />
Effect IDs:<br />
<br />
{| class="wikitable"<br />
! ID<br />
! Name<br />
! Data<br />
|-<br />
!colspan="3"| Sound<br />
|-<br />
| 1000<br />
| Dispenser dispenses<br />
| <br />
|-<br />
| 1001<br />
| Dispenser fails to dispense<br />
| <br />
|-<br />
| 1002<br />
| Dispenser shoots<br />
| <br />
|-<br />
| 1003<br />
| Ender eye launched<br />
| <br />
|-<br />
| 1004<br />
| Firework shot<br />
| <br />
|-<br />
| 1005<br />
| Iron door opened<br />
| <br />
|-<br />
| 1006<br />
| Wooden door opened<br />
| <br />
|-<br />
| 1007<br />
| Wooden trapdoor opened<br />
| <br />
|-<br />
| 1008<br />
| Fence gate opened<br />
| <br />
|-<br />
| 1009<br />
| Fire extinguished<br />
| <br />
|-<br />
| 1010<br />
| Play record<br />
| Special case, see below for more info<br />
|-<br />
| 1011<br />
| Iron door closed<br />
| <br />
|-<br />
| 1012<br />
| Wooden door closed<br />
| <br />
|-<br />
| 1013<br />
| Wooden trapdoor closed<br />
| <br />
|-<br />
| 1014<br />
| Fence gate closed<br />
| <br />
|-<br />
| 1015<br />
| Ghast warns<br />
| <br />
|-<br />
| 1016<br />
| Ghast shoots<br />
| <br />
|-<br />
| 1017<br />
| Enderdragon shoots<br />
| <br />
|-<br />
| 1018<br />
| Blaze shoots<br />
| <br />
|-<br />
| 1019<br />
| Zombie attacks wood door<br />
| <br />
|-<br />
| 1020<br />
| Zombie attacks iron door<br />
| <br />
|-<br />
| 1021<br />
| Zombie breaks wood door<br />
|<br />
|-<br />
| 1022<br />
| Wither breaks block<br />
|<br />
|-<br />
| 1023<br />
| Wither spawned<br />
| <br />
|-<br />
| 1024<br />
| Wither shoots<br />
|<br />
|-<br />
| 1025<br />
| Bat takes off<br />
|<br />
|-<br />
| 1026<br />
| Zombie infects<br />
|<br />
|-<br />
| 1027<br />
| Zombie villager converted<br />
|<br />
|-<br />
| 1028<br />
| Ender dragon death<br />
|<br />
|-<br />
| 1029<br />
| Anvil destroyed<br />
| <br />
|-<br />
| 1030<br />
| Anvil used<br />
| <br />
|-<br />
| 1031<br />
| Anvil landed<br />
|<br />
|-<br />
| 1032<br />
| Portal travel<br />
| <br />
|-<br />
| 1033<br />
| Chorus flower grown<br />
|<br />
|-<br />
| 1034<br />
| Chorus flower died<br />
| <br />
|-<br />
| 1035<br />
| Brewing stand brewed<br />
|<br />
|-<br />
| 1036<br />
| Iron trapdoor opened<br />
| <br />
|-<br />
| 1037<br />
| Iron trapdoor closed<br />
|<br />
|-<br />
| 1038<br />
| End portal created in overworld<br />
|<br />
|-<br />
| 1039<br />
| Phantom bites<br />
|<br />
|-<br />
| 1040<br />
| Zombie converts to drowned<br />
|<br />
|-<br />
| 1041<br />
| Husk converts to zombie by drowning<br />
|<br />
|-<br />
| 1042<br />
| Grindstone used<br />
|<br />
|-<br />
| 1043<br />
| Book page turned<br />
|<br />
|-<br />
|-<br />
!colspan="3"| Particle<br />
|-<br />
| 1500<br />
| Composter composts<br />
|<br />
|-<br />
| 1501<br />
| Lava converts block (either water to stone, or removes existing blocks such as torches)<br />
|<br />
|-<br />
| 1502<br />
| Redstone torch burns out<br />
|<br />
|- <br />
| 1503<br />
| Ender eye placed<br />
|<br />
|-<br />
| 2000<br />
| Spawns 10 smoke particles, e.g. from a fire<br />
| Direction, see below<br />
|-<br />
| 2001<br />
| Block break + block break sound<br />
| Block state, as an index into the global palette<br />
|-<br />
| 2002<br />
| Splash potion. Particle effect + glass break sound.<br />
| [http://minecraft.gamepedia.com/Data_values#Potions Potion ID]<br />
|-<br />
| 2003<br />
| Eye of Ender entity break animation — particles and sound<br />
| <br />
|-<br />
| 2004<br />
| Mob spawn particle effect: smoke + flames<br />
| <br />
|-<br />
| 2005<br />
| Bonemeal particles<br />
| How many particles to spawn (if set to 0, 15 are spawned)<br />
|-<br />
| 2006<br />
| Dragon breath<br />
|<br />
|-<br />
| 2007<br />
| Instant splash potion<br />
| [http://minecraft.gamepedia.com/Data_values#Potions Potion ID]<br />
|-<br />
| 2008<br />
| Ender dragon destroys block<br />
|<br />
|-<br />
| 2009<br />
| Wet sponge vaporizes in nether<br />
|<br />
|-<br />
| 3000<br />
| End gateway spawn<br />
| <br />
|-<br />
| 3001<br />
| Enderdragon growl<br />
|<br />
|}<br />
<br />
Smoke directions:<br />
<br />
{| class="wikitable"<br />
! ID<br />
! Direction<br />
|-<br />
| 0<br />
| South-East<br />
|-<br />
| 1<br />
| South<br />
|-<br />
| 2<br />
| South-West<br />
|-<br />
| 3<br />
| East<br />
|-<br />
| 4<br />
| (Up or middle ?)<br />
|-<br />
| 5<br />
| West<br />
|-<br />
| 6<br />
| North-East<br />
|-<br />
| 7<br />
| North<br />
|-<br />
| 8<br />
| North-West<br />
|}<br />
<br />
Play record: This is actually a special case within this packet. You can start/stop a record at a specific location. Use a valid {{Minecraft Wiki|Music Discs|Record ID}} to start a record (or overwrite a currently playing one), any other value will stop the record. See [[Data Generators]] for information on item IDs.<br />
<br />
==== Particle ====<br />
<br />
Displays the named particle<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="11"| 0x24<br />
|rowspan="11"| Play<br />
|rowspan="11"| Client<br />
| Particle ID<br />
| Int<br />
| The particle ID listed in [[#Particle|the particle data type]].<br />
|-<br />
| Long Distance<br />
| Boolean<br />
| If true, particle distance increases from 256 to 65536<br />
|-<br />
| X<br />
| Double<br />
| X position of the particle<br />
|-<br />
| Y<br />
| Double<br />
| Y position of the particle<br />
|-<br />
| Z<br />
| Double<br />
| Z position of the particle<br />
|-<br />
| Offset X<br />
| Float<br />
| This is added to the X position after being multiplied by random.nextGaussian()<br />
|-<br />
| Offset Y<br />
| Float<br />
| This is added to the Y position after being multiplied by random.nextGaussian()<br />
|-<br />
| Offset Z<br />
| Float<br />
| This is added to the Z position after being multiplied by random.nextGaussian()<br />
|-<br />
| Particle Data<br />
| Float<br />
| The data of each particle<br />
|-<br />
| Particle Count<br />
| Int<br />
| The number of particles to create<br />
|-<br />
| Data<br />
| Varies<br />
| The variable data listed in [[#Particle|the particle data type]].<br />
|}<br />
<br />
==== Update Light ====<br />
<br />
Updates light levels for a chunk.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
!colspan="2"| Field Name<br />
!colspan="2"| Field Type<br />
! Notes<br />
|-<br />
|rowspan="10"| 0x25<br />
|rowspan="10"| Play<br />
|rowspan="10"| Client<br />
|colspan="2"| Chunk X<br />
|colspan="2"| VarInt<br />
| Chunk coordinate (block coordinate divided by 16, rounded down) <br />
|-<br />
|colspan="2"| Chunk Z<br />
|colspan="2"| VarInt<br />
| Chunk coordinate (block coordinate divided by 16, rounded down) <br />
|-<br />
|colspan="2"| Sky Light Mask<br />
|colspan="2"| VarInt<br />
| Mask containing 18 bits, with the lowest bit corresponding to chunk section -1 (in the void, y=-16 to y=-1) and the highest bit for chunk section 16 (above the world, y=256 to y=271)<br />
|-<br />
|colspan="2"| Block Light Mask<br />
|colspan="2"| VarInt<br />
| Mask containing 18 bits, with the same order as sky light<br />
|-<br />
|colspan="2"| Empty Sky Light Mask<br />
|colspan="2"| VarInt<br />
| Mask containing 18 bits, which indicates sections that have 0 for all their sky light values. If a section is set in both this mask and the main sky light mask, it is ignored for this mask and it is included in the sky light arrays (the notchian server does not create such masks). If it is only set in this mask, it is not included in the sky light arrays.<br />
|-<br />
|colspan="2"| Empty Block Light Mask<br />
|colspan="2"| VarInt<br />
| Mask containing 18 bits, which indicates sections that have 0 for all their block light values. If a section is set in both this mask and the main block light mask, it is ignored for this mask and it is included in the block light arrays (the notchian server does not create such masks). If it is only set in this mask, it is not included in the block light arrays.<br />
|-<br />
|rowspan="2"| Sky Light arrays<br />
| Length<br />
|rowspan="2"| Array<br />
| VarInt<br />
| Length of the following array in bytes (always 2048)<br />
|-<br />
| Sky Light array<br />
| Array of 2048 bytes<br />
| There is 1 array for each bit set to true in the sky light mask, starting with the lowest value. Half a byte per light value.<br />
|-<br />
|rowspan="2"| Block Light arrays<br />
| Length<br />
|rowspan="2"| Array<br />
| VarInt<br />
| Length of the following array in bytes (always 2048)<br />
|-<br />
| Block Light array<br />
| Array of 2048 bytes<br />
| There is 1 array for each bit set to true in the block light mask, starting with the lowest value. Half a byte per light value.<br />
|}<br />
<br />
Individual block or sky light arrays are is given for each block with increasing x coordinates, within rows of increasing z coordinates, within layers of increasing y coordinates. Even-indexed items (those with an even x coordinate, starting at 0) are packed into the low bits, odd-indexed into the high bits.<br />
<br />
==== Join Game ====<br />
<br />
See [[Protocol Encryption]] for information on logging in.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="9"| 0x26<br />
|rowspan="9"| Play<br />
|rowspan="9"| Client<br />
| Entity ID<br />
| Int<br />
| The player's Entity ID (EID)<br />
|-<br />
| Gamemode<br />
| Unsigned Byte<br />
| 0: Survival, 1: Creative, 2: Adventure, 3: Spectator. Bit 3 (0x8) is the hardcore flag.<br />
|-<br />
| Dimension<br />
| Int Enum<br />
| -1: Nether, 0: Overworld, 1: End; also, note that this is not a VarInt but instead a regular int.<br />
|-<br />
| Hashed seed<br />
| Long<br />
| First 8 bytes of the SHA-256 hash of the world's seed.<br />
|-<br />
| Max Players<br />
| Unsigned Byte<br />
| Was once used by the client to draw the player list, but now is ignored<br />
|-<br />
| Level Type<br />
| String Enum (16)<br />
| default, flat, largeBiomes, amplified, customized, buffet, default_1_1<br />
|-<br />
| View Distance<br />
| VarInt<br />
| Render distance (2-32)<br />
|-<br />
| Reduced Debug Info<br />
| Boolean<br />
| If true, a Notchian client shows reduced information on the {{Minecraft Wiki|debug screen}}. For servers in development, this should almost always be false.<br />
|-<br />
| Enable respawn screen<br />
| Boolean<br />
| Set to false when the doImmediateRespawn gamerule is true<br />
|}<br />
<br />
==== Map Data ====<br />
<br />
Updates a rectangular area on a {{Minecraft Wiki|map}} item.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
!colspan="2"| Field Name<br />
!colspan="2"| Field Type<br />
! Notes<br />
|-<br />
|rowspan="17"| 0x27<br />
|rowspan="17"| Play<br />
|rowspan="17"| Client<br />
|colspan="2"| Map ID<br />
|colspan="2"| VarInt<br />
| Map ID of the map being modified<br />
|-<br />
|colspan="2"| Scale<br />
|colspan="2"| Byte<br />
| From 0 for a fully zoomed-in map (1 block per pixel) to 4 for a fully zoomed-out map (16 blocks per pixel)<br />
|- <br />
|colspan="2"| Tracking Position<br />
|colspan="2"| Boolean<br />
| Specifies whether player and item frame icons are shown<br />
|-<br />
|colspan="2"| Locked<br />
|colspan="2"| Boolean<br />
| True if the map has been locked in a cartography table<br />
|- <br />
|colspan="2"| Icon Count<br />
|colspan="2"| VarInt<br />
| Number of elements in the following array<br />
|-<br />
|rowspan="6"| Icon<br />
| Type<br />
|rowspan="6"| Array<br />
| VarInt enum<br />
| See below<br />
|-<br />
| X<br />
| Byte<br />
| Map coordinates: -128 for furthest left, +127 for furthest right<br />
|-<br />
| Z<br />
| Byte<br />
| Map coordinates: -128 for highest, +127 for lowest<br />
|-<br />
| Direction<br />
| Byte<br />
| 0-15<br />
|-<br />
| Has Display Name<br />
| Boolean<br />
|<br />
|-<br />
| Display Name<br />
| Optional [[Chat]]<br />
| Only present if previous Boolean is true<br />
|- <br />
|colspan="2"| Columns<br />
|colspan="2"| Unsigned Byte<br />
| Number of columns updated<br />
|-<br />
|colspan="2"| Rows<br />
|colspan="2"| Optional Byte<br />
| Only if Columns is more than 0; number of rows updated<br />
|-<br />
|colspan="2"| X<br />
|colspan="2"| Optional Byte<br />
| Only if Columns is more than 0; x offset of the westernmost column<br />
|-<br />
|colspan="2"| Z<br />
|colspan="2"| Optional Byte<br />
| Only if Columns is more than 0; z offset of the northernmost row<br />
|-<br />
|colspan="2"| Length<br />
|colspan="2"| Optional VarInt<br />
| Only if Columns is more than 0; length of the following array<br />
|-<br />
|colspan="2"| Data<br />
|colspan="2"| Optional Array of Unsigned Byte<br />
| Only if Columns is more than 0; see {{Minecraft Wiki|Map item format}}<br />
|}<br />
<br />
For icons, a direction of 0 is a vertical icon and increments by 22.5&deg; (360/16).<br />
<br />
Types are based off of rows and columns in <code>map_icons.png</code>:<br />
<br />
{| class="wikitable"<br />
|-<br />
! Icon type<br />
! Result<br />
|-<br />
| 0<br />
| White arrow (players)<br />
|-<br />
| 1<br />
| Green arrow (item frames)<br />
|-<br />
| 2<br />
| Red arrow<br />
|-<br />
| 3<br />
| Blue arrow<br />
|-<br />
| 4<br />
| White cross<br />
|-<br />
| 5<br />
| Red pointer<br />
|-<br />
| 6<br />
| White circle (off-map players)<br />
|-<br />
| 7<br />
| Small white circle (far-off-map players)<br />
|-<br />
| 8<br />
| Mansion<br />
|-<br />
| 9<br />
| Temple<br />
|-<br />
| 10<br />
| White Banner<br />
|-<br />
| 11<br />
| Orange Banner<br />
|-<br />
| 12<br />
| Magenta Banner<br />
|-<br />
| 13<br />
| Light Blue Banner<br />
|-<br />
| 14<br />
| Yellow Banner<br />
|-<br />
| 15<br />
| Lime Banner<br />
|-<br />
| 16<br />
| Pink Banner<br />
|-<br />
| 17<br />
| Gray Banner<br />
|-<br />
| 18<br />
| Light Gray Banner<br />
|-<br />
| 19<br />
| Cyan Banner<br />
|-<br />
| 20<br />
| Purple Banner<br />
|-<br />
| 21<br />
| Blue Banner<br />
|-<br />
| 22<br />
| Brown Banner<br />
|-<br />
| 23<br />
| Green Banner<br />
|-<br />
| 24<br />
| Red Banner<br />
|-<br />
| 25<br />
| Black Banner<br />
|-<br />
| 26<br />
| Treasure marker<br />
|}<br />
<br />
==== Trade List ====<br />
<br />
The list of trades a villager NPC is offering.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
!colspan="2"| Field Name<br />
!colspan="2"| Field Type<br />
! Notes<br />
|-<br />
|rowspan="18"| 0x28<br />
|rowspan="18"| Play<br />
|rowspan="18"| Client<br />
|-<br />
| colspan="2" | Window ID<br />
| colspan="2" | VarInt<br />
| The ID of the window that is open; this is an int rather than a byte.<br />
|-<br />
| colspan="2" | Size<br />
| colspan="2" | Byte<br />
| The number of trades in the following array<br />
|-<br />
| rowspan="11" | Trades<br />
| Input item 1<br />
| rowspan="11" | Array<br />
| [[Slot]]<br />
| The first item the villager is buying<br />
|-<br />
| Output item<br />
| [[Slot]]<br />
| The item the villager is selling<br />
|-<br />
| Has second item<br />
| Boolean<br />
| Whether there is a second item<br />
|-<br />
| Input item 2<br />
| Optional [[Slot]]<br />
| The second item the villager is buying; only present if they have a second item.<br />
|-<br />
| Trade disabled<br />
| Boolean<br />
| True if the trade is disabled; false if the trade is enabled.<br />
|-<br />
| Number of trade uses<br />
| Integer<br />
| Number of times the trade has been used so far<br />
|-<br />
| Maximum number of trade uses<br />
| Integer<br />
| Number of times this trade can be used<br />
|-<br />
| XP<br />
| Integer<br />
|<br />
|-<br />
| Special Price<br />
| Integer<br />
|<br />
|-<br />
| Price Multiplier<br />
| Float<br />
|<br />
|-<br />
| Demand<br />
| Integer<br />
|<br />
|-<br />
|colspan="2"| Villager level<br />
|colspan="2"| VarInt<br />
| Appears on the trade GUI; meaning comes from the translation key <code>merchant.level.</code> + level.<br />
1: Novice, 2: Apprentice, 3: Journeyman, 4: Expert, 5: Master<br />
|-<br />
|colspan="2"| Experience<br />
|colspan="2"| VarInt<br />
| Total experience for this villager (always 0 for the wandering trader)<br />
|-<br />
|colspan="2"| Is regular villager<br />
|colspan="2"| Boolean<br />
| True if this is a regular villager; false for the wandering trader. When false, hides the villager level and some other GUI elements.<br />
|-<br />
|colspan="2"| Can restock<br />
|colspan="2"| Boolean<br />
| True for regular villagers and false for the wandering trader. If true, the "Villagers restock up to two times per day." message is displayed when hovering over disabled trades.<br />
|}<br />
<br />
[[File:1.14-merchant-slots.png|thumb|The merchant UI, for reference]]<br />
{{-}}<br />
<br />
==== Entity Position ====<br />
<br />
This packet is sent by the server when an entity moves less then 8 blocks; if an entity moves more than 8 blocks [[#Entity Teleport|Entity Teleport]] should be sent instead.<br />
<br />
This packet allows at most 8 blocks movement in any direction, because short range is from -32768 to 32767. And <code>32768 / (128 * 32)</code> = 8.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x29<br />
|rowspan="5"| Play<br />
|rowspan="5"| Client<br />
| Entity ID<br />
| VarInt<br />
| <br />
|-<br />
| Delta X<br />
| Short<br />
| Change in X position as <code>(currentX * 32 - prevX * 32) * 128</code><br />
|-<br />
| Delta Y<br />
| Short<br />
| Change in Y position as <code>(currentY * 32 - prevY * 32) * 128</code><br />
|-<br />
| Delta Z<br />
| Short<br />
| Change in Z position as <code>(currentZ * 32 - prevZ * 32) * 128</code><br />
|-<br />
| On Ground<br />
| Boolean<br />
| <br />
|}<br />
<br />
==== Entity Position and Rotation ====<br />
<br />
This packet is sent by the server when an entity rotates and moves. Since a short range is limited from -32768 to 32767, and movement is offset of fixed-point numbers, this packet allows at most 8 blocks movement in any direction. (<code>-32768 / (32 * 128) == -8</code>)<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="7"| 0x2A<br />
|rowspan="7"| Play<br />
|rowspan="7"| Client<br />
| Entity ID<br />
| VarInt<br />
| <br />
|-<br />
| Delta X<br />
| Short<br />
| Change in X position as <code>(currentX * 32 - prevX * 32) * 128</code><br />
|-<br />
| Delta Y<br />
| Short<br />
| Change in Y position as <code>(currentY * 32 - prevY * 32) * 128</code><br />
|-<br />
| Delta Z<br />
| Short<br />
| Change in Z position as <code>(currentZ * 32 - prevZ * 32) * 128</code><br />
|-<br />
| Yaw<br />
| Angle<br />
| New angle, not a delta<br />
|-<br />
| Pitch<br />
| Angle<br />
| New angle, not a delta<br />
|-<br />
| On Ground<br />
| Boolean<br />
| <br />
|}<br />
<br />
==== Entity Rotation ====<br />
<br />
This packet is sent by the server when an entity rotates.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x2B<br />
|rowspan="4"| Play<br />
|rowspan="4"| Client<br />
| Entity ID<br />
| VarInt<br />
| <br />
|-<br />
| Yaw<br />
| Angle<br />
| New angle, not a delta<br />
|-<br />
| Pitch<br />
| Angle<br />
| New angle, not a delta<br />
|-<br />
| On Ground<br />
| Boolean<br />
| <br />
|}<br />
<br />
==== Entity Movement ====<br />
<br />
This packet may be used to initialize an entity.<br />
<br />
For player entities, either this packet or any move/look packet is sent every game tick. So the meaning of this packet is basically that the entity did not move/look since the last such packet.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x2C<br />
|rowspan="1"| Play<br />
|rowspan="1"| Client<br />
| Entity ID<br />
| VarInt<br />
| <br />
|}<br />
<br />
==== Vehicle Move (clientbound) ====<br />
<br />
Note that all fields use absolute positioning and do not allow for relative positioning.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x2D<br />
|rowspan="5"| Play<br />
|rowspan="5"| Client<br />
| X<br />
| Double<br />
| Absolute position (X coordinate)<br />
|-<br />
| Y<br />
| Double<br />
| Absolute position (Y coordinate)<br />
|-<br />
| Z<br />
| Double<br />
| Absolute position (Z coordinate)<br />
|-<br />
| Yaw<br />
| Float<br />
| Absolute rotation on the vertical axis, in degrees<br />
|-<br />
| Pitch<br />
| Float<br />
| Absolute rotation on the horizontal axis, in degrees<br />
|}<br />
<br />
==== Open Book ====<br />
<br />
Sent when a player right clicks with a signed book. This tells the client to open the book GUI.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x2E<br />
|rowspan="1"| Play<br />
|rowspan="1"| Client<br />
| Hand<br />
| VarInt enum<br />
| 0: Main hand, 1: Off hand <br />
|}<br />
<br />
==== Open Window ====<br />
<br />
This is sent to the client when it should open an inventory, such as a chest, workbench, or furnace. This message is not sent anywhere for clients opening their own inventory. For horses, use [[#Open Horse Window|Open Horse Window]].<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x2F<br />
|rowspan="3"| Play<br />
|rowspan="3"| Client<br />
| Window ID<br />
| VarInt<br />
| A unique id number for the window to be displayed. Notchian server implementation is a counter, starting at 1.<br />
|-<br />
| Window Type<br />
| VarInt<br />
| The window type to use for display. Contained in the <code>minecraft:menu</code> regisry; see [[Inventory]] for the different values.<br />
|-<br />
| Window Title<br />
| [[Chat]]<br />
| The title of the window<br />
|}<br />
<br />
==== Open Sign Editor ====<br />
<br />
Sent when the client has placed a sign and is allowed to send [[#Update Sign|Update Sign]]. There must already be a sign at the given location (which the client does not do automatically) - send a [[#Block Change|Block Change]] first.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x30<br />
|rowspan="1"| Play<br />
|rowspan="1"| Client<br />
| Location<br />
| Position<br />
| <br />
|}<br />
<br />
==== Craft Recipe Response ====<br />
<br />
Response to the serverbound packet ([[#Craft Recipe Request|Craft Recipe Request]]), with the same recipe ID. Appears to be used to notify the UI.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x31<br />
|rowspan="2"| Play<br />
|rowspan="2"| Client<br />
| Window ID<br />
| Byte<br />
|<br />
|-<br />
| Recipe<br />
| Identifier<br />
| A recipe ID<br />
|}<br />
<br />
==== Player Abilities (clientbound) ====<br />
<br />
The latter 2 floats are used to indicate the field of view and flying speed respectively, while the first byte is used to determine the value of 4 booleans.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x32<br />
|rowspan="3"| Play<br />
|rowspan="3"| Client<br />
| Flags<br />
| Byte<br />
| Bit field, see below<br />
|-<br />
| Flying Speed<br />
| Float<br />
| 0.05 by default<br />
|-<br />
| Field of View Modifier<br />
| Float<br />
| Modifies the field of view, like a speed potion. A Notchian server will use the same value as the movement speed sent in the [[Protocol#Entity_Properties|Entity Properties]] packet, which defaults to 0.1 for players.<br />
|}<br />
<br />
About the flags:<br />
<br />
{| class="wikitable"<br />
|-<br />
! Field<br />
! Bit<br />
|-<br />
| Invulnerable<br />
| 0x01<br />
|-<br />
| Flying<br />
| 0x02<br />
|-<br />
| Allow Flying<br />
| 0x04<br />
|-<br />
| Creative Mode (Instant Break)<br />
| 0x08<br />
|}<br />
<br />
==== Combat Event ====<br />
<br />
Originally used for metadata for twitch streaming circa 1.8. Now only used to display the game over screen (with enter combat and end combat completely ignored by the Notchain client)<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
!colspan="2"| Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="8"| 0x33<br />
|rowspan="8"| Play<br />
|rowspan="8"| Client<br />
|colspan="2"| Event<br />
| VarInt Enum<br />
| Determines the layout of the remaining packet<br />
|-<br />
! Event<br />
! Field Name<br />
! <br />
! <br />
|-<br />
| 0: enter combat<br />
| ''no fields''<br />
| ''no fields''<br />
| <br />
|-<br />
|rowspan="2"| 1: end combat<br />
| Duration<br />
| VarInt<br />
| Length of the combat in ticks.<br />
|-<br />
| Entity ID<br />
| Int<br />
| ID of the primary opponent of the ended combat, or -1 if there is no obvious primary opponent.<br />
|-<br />
|rowspan="3"| 2: entity dead<br />
| Player ID<br />
| VarInt<br />
| Entity ID of the player that died (should match the client's entity ID).<br />
|-<br />
| Entity ID<br />
| Int<br />
| The killing entity's ID, or -1 if there is no obvious killer.<br />
|-<br />
| Message<br />
| [[Chat]]<br />
| The death message<br />
|}<br />
<br />
==== Player Info ====<br />
<br />
Sent by the server to update the user list (<tab> in the client).<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
!colspan="4"| Field Name<br />
!colspan="3"| Field Type<br />
! Notes<br />
|-<br />
|rowspan="19"| 0x34<br />
|rowspan="19"| Play<br />
|rowspan="19"| Client<br />
|colspan="4"| Action<br />
|colspan="3"| VarInt<br />
| Determines the rest of the Player format after the UUID<br />
|-<br />
|colspan="4"| Number Of Players<br />
|colspan="3"| VarInt<br />
| Number of elements in the following array<br />
|-<br />
|rowspan="17"| Player<br />
|colspan="3"| UUID<br />
|rowspan="17"| Array<br />
|colspan="2"| UUID<br />
| <br />
|-<br />
! Action<br />
!colspan="2"| Field Name<br />
!colspan="2"| <br />
! <br />
|-<br />
|rowspan="10"| 0: add player<br />
|colspan="2"| Name<br />
|colspan="2"| String (16)<br />
| <br />
|-<br />
|colspan="2"| Number Of Properties<br />
|colspan="2"| VarInt<br />
| Number of elements in the following array<br />
|-<br />
|rowspan="4"| Property<br />
| Name<br />
|rowspan="4"| Array<br />
| String (32767)<br />
| <br />
|-<br />
| Value<br />
| String (32767)<br />
| <br />
|- <br />
| Is Signed<br />
| Boolean<br />
| <br />
|-<br />
| Signature<br />
| Optional String (32767)<br />
| Only if Is Signed is true<br />
|-<br />
|colspan="2"| Gamemode<br />
|colspan="2"| VarInt<br />
| <br />
|-<br />
|colspan="2"| Ping<br />
|colspan="2"| VarInt<br />
| Measured in milliseconds<br />
|-<br />
|colspan="2"| Has Display Name<br />
|colspan="2"| Boolean<br />
| <br />
|-<br />
|colspan="2"| Display Name<br />
|colspan="2"| Optional [[Chat]]<br />
| Only if Has Display Name is true<br />
|-<br />
| 1: update gamemode<br />
|colspan="2"| Gamemode<br />
|colspan="2"| VarInt<br />
| <br />
|- <br />
| 2: update latency<br />
|colspan="2"| Ping<br />
|colspan="2"| VarInt<br />
| Measured in milliseconds<br />
|-<br />
|rowspan="2"| 3: update display name<br />
|colspan="2"| Has Display Name<br />
|colspan="2"| Boolean<br />
| <br />
|-<br />
|colspan="2"| Display Name<br />
|colspan="2"| Optional [[Chat]]<br />
| Only send if Has Display Name is true<br />
|-<br />
| 4: remove player<br />
|colspan="2"| ''no fields''<br />
|colspan="2"| ''no fields''<br />
| <br />
|}<br />
<br />
The Property field looks as in the response of [[Mojang API#UUID -> Profile + Skin/Cape]], except of course using the protocol format instead of JSON. That is, each player will usually have one property with Name “textures” and Value being a base64-encoded JSON string as documented at [[Mojang API#UUID -> Profile + Skin/Cape]]. An empty properties array is also acceptable, and will cause clients to display the player with one of the two default skins depending on UUID.<br />
<br />
Ping values correspond with icons in the following way:<br />
* A ping that negative (i.e. not known to the server yet) will result in the no connection icon.<br />
* A ping under 150 milliseconds will result in 5 bars<br />
* A ping under 300 milliseconds will result in 4 bars<br />
* A ping under 600 milliseconds will result in 3 bars<br />
* A ping under 1000 milliseconds (1 second) will result in 2 bars<br />
* A ping greater than or equal to 1 second will result in 1 bar.<br />
<br />
==== Face Player ====<br />
<br />
Used to rotate the client player to face the given location or entity (for <code>/teleport [<targets>] <x> <y> <z> facing</code>).<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="8"| 0x35<br />
|rowspan="8"| Play<br />
|rowspan="8"| Client<br />
|-<br />
| Feet/eyes<br />
| VarInt enum<br />
| Values are feet=0, eyes=1. If set to eyes, aims using the head position; otherwise aims using the feet position.<br />
|-<br />
| Target x<br />
| Double<br />
| x coordinate of the point to face towards<br />
|-<br />
| Target y<br />
| Double<br />
| y coordinate of the point to face towards<br />
|-<br />
| Target z<br />
| Double<br />
| z coordinate of the point to face towards<br />
|-<br />
| Is entity<br />
| Boolean<br />
| If true, additional information about an entity is provided.<br />
|-<br />
| Entity ID<br />
| Optional VarInt<br />
| Only if is entity is true &mdash; the entity to face towards<br />
|-<br />
| Entity feet/eyes<br />
| Optional VarInt enum<br />
| Whether to look at the entity's eyes or feet. Same values and meanings as before, just for the entity's head/feet.<br />
|}<br />
<br />
If the entity given by entity ID cannot be found, this packet should be treated as if is entity was false.<br />
<br />
==== Player Position And Look (clientbound) ==== <br />
<br />
Updates the player's position on the server. This packet will also close the “Downloading Terrain” screen when joining/respawning.<br />
<br />
If the distance between the last known position of the player on the server and the new position set by this packet is greater than 100 meters, the client will be kicked for “You moved too quickly :( (Hacking?)”.<br />
<br />
Also if the fixed-point number of X or Z is set greater than <code>3.2E7D</code> the client will be kicked for “Illegal position”.<br />
<br />
Yaw is measured in degrees, and does not follow classical trigonometry rules. The unit circle of yaw on the XZ-plane starts at (0, 1) and turns counterclockwise, with 90 at (-1, 0), 180 at (0, -1) and 270 at (1, 0). Additionally, yaw is not clamped to between 0 and 360 degrees; any number is valid, including negative numbers and numbers greater than 360.<br />
<br />
Pitch is measured in degrees, where 0 is looking straight ahead, -90 is looking straight up, and 90 is looking straight down.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="7"| 0x36<br />
|rowspan="7"| Play<br />
|rowspan="7"| Client<br />
| X<br />
| Double<br />
| Absolute or relative position, depending on Flags<br />
|-<br />
| Y<br />
| Double<br />
| Absolute or relative position, depending on Flags<br />
|-<br />
| Z<br />
| Double<br />
| Absolute or relative position, depending on Flags<br />
|-<br />
| Yaw<br />
| Float<br />
| Absolute or relative rotation on the X axis, in degrees<br />
|-<br />
| Pitch<br />
| Float<br />
| Absolute or relative rotation on the Y axis, in degrees<br />
|-<br />
| Flags<br />
| Byte<br />
| Bit field, see below<br />
|-<br />
| Teleport ID<br />
| VarInt<br />
| Client should confirm this packet with [[#Teleport Confirm|Teleport Confirm]] containing the same Teleport ID<br />
|}<br />
<br />
About the Flags field:<br />
<br />
<Dinnerbone> It's a bitfield, X/Y/Z/Y_ROT/X_ROT. If X is set, the x value is relative and not absolute.<br />
<br />
{| class="wikitable"<br />
|-<br />
! Field<br />
! Bit<br />
|-<br />
| X<br />
| 0x01<br />
|-<br />
| Y<br />
| 0x02<br />
|-<br />
| Z<br />
| 0x04<br />
|-<br />
| Y_ROT<br />
| 0x08<br />
|-<br />
| X_ROT<br />
| 0x10<br />
|}<br />
<br />
==== Unlock Recipes ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="10"| 0x37<br />
|rowspan="10"| Play<br />
|rowspan="10"| Client<br />
|-<br />
| Action<br />
| VarInt<br />
| 0: init, 1: add, 2: remove<br />
|-<br />
| Crafting Recipe Book Open<br />
| Boolean<br />
| If true, then the crafting recipe book will be open when the player opens its inventory.<br />
|-<br />
| Crafting Recipe Book Filter Active<br />
| Boolean<br />
| If true, then the filtering option is active when the players opens its inventory.<br />
|-<br />
| Smelting Recipe Book Open<br />
| Boolean<br />
| If true, then the smelting recipe book will be open when the player opens its inventory.<br />
|-<br />
| Smelting Recipe Book Filter Active<br />
| Boolean<br />
| If true, then the filtering option is active when the players opens its inventory.<br />
|-<br />
| Array size 1<br />
| VarInt<br />
| Number of elements in the following array<br />
|-<br />
| Recipe IDs<br />
| Array of Identifier<br />
|<br />
|-<br />
| Array size 2<br />
| Optional VarInt<br />
| Number of elements in the following array, only present if mode is 0 (init)<br />
|-<br />
| Recipe IDs<br />
| Optional Array of Identifier, only present if mode is 0 (init)<br />
|<br />
|}<br />
Action:<br />
* 0 (init) = All the recipes in the list 2 will added to the recipe book. All the recipes in list 1 will be tagged as displayed, recipes that aren't tagged will be shown in the notification. VERIFY LIST ORDER?<br />
* 1 (add) = All the recipes in the list are added and their icon will be shown in the notification.<br />
* 2 (remove) = Remove all the recipes in the list. This allows them to re-displayed when they are readded.<br />
<br />
==== Destroy Entities ====<br />
<br />
Sent by the server when a list of entities is to be destroyed on the client.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x38<br />
|rowspan="2"| Play<br />
|rowspan="2"| Client<br />
| Count<br />
| VarInt<br />
| Number of elements in the following array<br />
|-<br />
| Entity IDs<br />
| Array of VarInt<br />
| The list of entities of destroy<br />
|}<br />
<br />
==== Remove Entity Effect ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x39<br />
|rowspan="2"| Play<br />
|rowspan="2"| Client<br />
| Entity ID<br />
| VarInt<br />
| <br />
|-<br />
| Effect ID<br />
| Byte<br />
| See {{Minecraft Wiki|Status effect#List of effects|this table}}<br />
|}<br />
<br />
==== Resource Pack Send ==== <br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x3A<br />
|rowspan="2"| Play<br />
|rowspan="2"| Client<br />
| URL<br />
| String (32767)<br />
| The URL to the resource pack.<br />
|-<br />
| Hash<br />
| String (40)<br />
| A 40 character hexadecimal and lowercase [[wikipedia:SHA-1|SHA-1]] hash of the resource pack file. (must be lower case in order to work)<br />If it's not a 40 character hexadecimal string, the client will not use it for hash verification and likely waste bandwidth — but it will still treat it as a unique id<br />
|}<br />
<br />
==== Respawn ====<br />
<br />
To change the player's dimension (overworld/nether/end), send them a respawn packet with the appropriate dimension, followed by prechunks/chunks for the new dimension, and finally a position and look packet. You do not need to unload chunks, the client will do it automatically.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x3B<br />
|rowspan="4"| Play<br />
|rowspan="4"| Client<br />
| Dimension<br />
| Int Enum<br />
| -1: The Nether, 0: The Overworld, 1: The End<br />
|-<br />
| Hashed seed<br />
| Long<br />
| First 8 bytes of the SHA-256 hash of the world's seed.<br />
|-<br />
| Gamemode<br />
| Unsigned Byte<br />
| 0: survival, 1: creative, 2: adventure, 3: spectator. The hardcore flag is not included<br />
|-<br />
| Level Type<br />
| String (16)<br />
| Same as [[#Join Game|Join Game]]<br />
|}<br />
<br />
{{Warning2|Avoid changing player's dimension to same dimension they were already in unless they are dead. If you change the dimension to one they are already in, weird bugs can occur, such as the player being unable to attack other players in new world (until they die and respawn).<br />
<br />
If you must respawn a player in the same dimension without killing them, send two respawn packets, one to a different world and then another to the world you want. You do not need to complete the first respawn; it only matters that you send two packets.}}<br />
<br />
==== Entity Head Look ====<br />
<br />
Changes the direction an entity's head is facing.<br />
<br />
While sending the Entity Look packet changes the vertical rotation of the head, sending this packet appears to be necessary to rotate the head horizontally.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x3C<br />
|rowspan="2"| Play<br />
|rowspan="2"| Client<br />
| Entity ID<br />
| VarInt<br />
| <br />
|-<br />
| Head Yaw<br />
| Angle<br />
| New angle, not a delta<br />
|}<br />
<br />
==== Select Advancement Tab ====<br />
<br />
Sent by the server to indicate that the client should switch advancement tab. Sent either when the client switches tab in the GUI or when an advancement in another tab is made.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x3D<br />
|rowspan="2"| Play<br />
|rowspan="2"| Client<br />
| Has id<br />
| Boolean<br />
| Indicates if the next field is present<br />
|-<br />
| Optional Identifier<br />
| String (32767)<br />
| See below<br />
|}<br />
<br />
The Identifier can be one of the following:<br />
<br />
{| class="wikitable"<br />
! Optional Identifier<br />
|-<br />
| minecraft:story/root<br />
|-<br />
| minecraft:nether/root<br />
|-<br />
| minecraft:end/root<br />
|-<br />
| minecraft:adventure/root<br />
|-<br />
| minecraft:husbandry/root<br />
|}<br />
<br />
If no or an invalid identifier is sent, the client will switch to the first tab in the GUI.<br />
<br />
==== World Border ==== <br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
!colspan="2"| Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="18"| 0x3E<br />
|rowspan="18"| Play<br />
|rowspan="18"| Client<br />
|colspan="2"| Action<br />
| VarInt Enum<br />
| Determines the format of the rest of the packet<br />
|-<br />
! Action<br />
! Field Name<br />
! <br />
! <br />
|-<br />
| 0: set size<br />
| Diameter<br />
| Double<br />
| Length of a single side of the world border, in meters<br />
|-<br />
|rowspan="3"| 1: lerp size<br />
| Old Diameter<br />
| Double<br />
| Current length of a single side of the world border, in meters<br />
|-<br />
| New Diameter<br />
| Double<br />
| Target length of a single side of the world border, in meters<br />
|-<br />
| Speed<br />
| VarLong<br />
| Number of real-time ''milli''seconds until New Diameter is reached. It appears that Notchian server does not sync world border speed to game ticks, so it gets out of sync with server lag. If the world border is not moving, this is set to 0.<br />
|-<br />
|rowspan="2"| 2: set center<br />
| X<br />
| Double<br />
| <br />
|-<br />
| Z<br />
| Double<br />
| <br />
|-<br />
|rowspan="8"| 3: initialize<br />
| X<br />
| Double<br />
| <br />
|-<br />
| Z<br />
| Double<br />
| <br />
|-<br />
| Old Diameter<br />
| Double<br />
| Current length of a single side of the world border, in meters<br />
|-<br />
| New Diameter<br />
| Double<br />
| Target length of a single side of the world border, in meters<br />
|-<br />
| Speed<br />
| VarLong<br />
| Number of real-time ''milli''seconds until New Diameter is reached. It appears that Notchian server does not sync world border speed to game ticks, so it gets out of sync with server lag. If the world border is not moving, this is set to 0.<br />
|-<br />
| Portal Teleport Boundary<br />
| VarInt<br />
| Resulting coordinates from a portal teleport are limited to ±value. Usually 29999984.<br />
|-<br />
| Warning Time<br />
| VarInt<br />
| In seconds as set by <code>/worldborder warning time</code><br />
|-<br />
| Warning Blocks<br />
| VarInt<br />
| In meters<br />
|-<br />
|rowspan="1"| 4: set warning time<br />
| Warning Time<br />
| VarInt<br />
| In seconds as set by <code>/worldborder warning time</code><br />
|-<br />
|rowspan="1"| 5: set warning blocks<br />
| Warning Blocks<br />
| VarInt<br />
| In meters<br />
|}<br />
<br />
The Notchian client determines how solid to display the warning by comparing to whichever is higher, the warning distance or whichever is lower, the distance from the current diameter to the target diameter or the place the border will be after warningTime seconds. In pseudocode:<br />
<br />
<syntaxhighlight lang="java"><br />
distance = max(min(resizeSpeed * 1000 * warningTime, abs(targetDiameter - currentDiameter)), warningDistance);<br />
if (playerDistance < distance) {<br />
warning = 1.0 - playerDistance / distance;<br />
} else {<br />
warning = 0.0;<br />
}<br />
</syntaxhighlight><br />
<br />
==== Camera ====<br />
<br />
Sets the entity that the player renders from. This is normally used when the player left-clicks an entity while in spectator mode.<br />
<br />
The player's camera will move with the entity and look where it is looking. The entity is often another player, but can be any type of entity. The player is unable to move this entity (move packets will act as if they are coming from the other entity).<br />
<br />
If the given entity is not loaded by the player, this packet is ignored. To return control to the player, send this packet with their entity ID.<br />
<br />
The Notchian server resets this (sends it back to the default entity) whenever the spectated entity is killed or the player sneaks, but only if they were spectating an entity. It also sends this packet whenever the player switches out of spectator mode (even if they weren't spectating an entity).<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x3F<br />
|rowspan="1"| Play<br />
|rowspan="1"| Client<br />
| Camera ID<br />
| VarInt<br />
| ID of the entity to set the client's camera to<br />
|}<br />
<br />
The notchian also loads certain shaders for given entities:<br />
<br />
* Creeper &rarr; <code>shaders/post/creeper.json</code><br />
* Spider (and cave spider) &rarr; <code>shaders/post/spider.json</code><br />
* Enderman &rarr; <code>shaders/post/invert.json</code><br />
* Anything else &rarr; the current shader is unloaded<br />
<br />
==== Held Item Change (clientbound) ====<br />
<br />
Sent to change the player's slot selection.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x40<br />
|rowspan="1"| Play<br />
|rowspan="1"| Client<br />
| Slot<br />
| Byte<br />
| The slot which the player has selected (0–8)<br />
|}<br />
<br />
==== Update View Position ====<br />
<br />
{{Need Info|Why is this even needed? Is there a better name for it? My guess is that it's something to do with logical behavior with latency, but it still seems weird.}}<br />
<br />
Updates the client's location. This is used to determine what chunks should remain loaded and if a chunk load should be ignored; chunks outside of the view distance may be unloaded.<br />
<br />
Sent whenever the player moves across a chunk border horizontally, and also (according to testing) for any integer change in the vertical axis, even if it doesn't go across a chunk section border.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x41<br />
|rowspan="2"| Play<br />
|rowspan="2"| Client<br />
| Chunk X<br />
| VarInt<br />
| Chunk X coordinate of the player's position<br />
|-<br />
| Chunk Z<br />
| VarInt<br />
| Chunk Z coordinate of the player's position<br />
|}<br />
<br />
==== Update View Distance ====<br />
<br />
Sent by the integrated singleplayer server when changing render distance. Does not appear to be used by the dedicated server, as <code>view-distance</code> in server.properties cannot be changed at runtime.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x42<br />
|rowspan="1"| Play<br />
|rowspan="1"| Client<br />
| View Distance<br />
| VarInt<br />
| Render distance (2-32) <br />
|}<br />
<br />
==== Display Scoreboard ====<br />
<br />
This is sent to the client when it should display a scoreboard.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x43<br />
|rowspan="2"| Play<br />
|rowspan="2"| Client<br />
| Position<br />
| Byte<br />
| The position of the scoreboard. 0: list, 1: sidebar, 2: below name, 3 - 18: team specific sidebar, indexed as 3 + team color.<br />
|-<br />
| Score Name<br />
| String (16)<br />
| The unique name for the scoreboard to be displayed.<br />
|}<br />
<br />
==== Entity Metadata ====<br />
<br />
Updates one or more [[Entities#Entity Metadata Format|metadata]] properties for an existing entity. Any properties not included in the Metadata field are left unchanged.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x44<br />
|rowspan="2"| Play<br />
|rowspan="2"| Client<br />
| Entity ID<br />
| VarInt<br />
| <br />
|-<br />
| Metadata<br />
| [[Entities#Entity Metadata Format|Entity Metadata]]<br />
| <br />
|}<br />
<br />
==== Attach Entity ====<br />
<br />
This packet is sent when an entity has been {{Minecraft Wiki|Lead|leashed}} to another entity.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x45<br />
|rowspan="2"| Play<br />
|rowspan="2"| Client<br />
| Attached Entity ID<br />
| Int<br />
| Attached entity's EID<br />
|-<br />
| Holding Entity ID<br />
| Int<br />
| ID of the entity holding the lead. Set to -1 to detach.<br />
|}<br />
<br />
==== Entity Velocity ====<br />
<br />
Velocity is believed to be in units of 1/8000 of a block per server tick (50ms); for example, -1343 would move (-1343 / 8000) = −0.167875 blocks per tick (or −3,3575 blocks per second).<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x46<br />
|rowspan="4"| Play<br />
|rowspan="4"| Client<br />
| Entity ID<br />
| VarInt<br />
| <br />
|-<br />
| Velocity X<br />
| Short<br />
| Velocity on the X axis<br />
|-<br />
| Velocity Y<br />
| Short<br />
| Velocity on the Y axis<br />
|-<br />
| Velocity Z<br />
| Short<br />
| Velocity on the Z axis<br />
|}<br />
<br />
==== Entity Equipment ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x47<br />
|rowspan="3"| Play<br />
|rowspan="3"| Client<br />
| Entity ID<br />
| VarInt<br />
| Entity's EID<br />
|-<br />
| Slot<br />
| VarInt Enum<br />
| Equipment slot. 0: main hand, 1: off hand, 2–5: armor slot (2: boots, 3: leggings, 4: chestplate, 5: helmet)<br />
|-<br />
| Item<br />
| [[Slot Data|Slot]]<br />
| <br />
|}<br />
<br />
==== Set Experience ====<br />
<br />
Sent by the server when the client should change experience levels.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x48<br />
|rowspan="3"| Play<br />
|rowspan="3"| Client<br />
| Experience bar<br />
| Float<br />
| Between 0 and 1<br />
|-<br />
| Level<br />
| VarInt<br />
| <br />
|-<br />
| Total Experience<br />
| VarInt<br />
| See {{Minecraft Wiki|Experience#Leveling up}} on the Minecraft Wiki for Total Experience to Level conversion<br />
|}<br />
<br />
==== Update Health ====<br />
<br />
Sent by the server to update/set the health of the player it is sent to.<br />
<br />
Food {{Minecraft Wiki|Food#Hunger vs. Saturation|saturation}} acts as a food “overcharge”. Food values will not decrease while the saturation is over zero. Players logging in automatically get a saturation of 5.0. Eating food increases the saturation as well as the food bar.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x49<br />
|rowspan="3"| Play<br />
|rowspan="3"| Client<br />
| Health<br />
| Float<br />
| 0 or less = dead, 20 = full HP<br />
|-<br />
| Food<br />
| VarInt<br />
| 0–20<br />
|- <br />
| Food Saturation<br />
| Float<br />
| Seems to vary from 0.0 to 5.0 in integer increments<br />
|}<br />
<br />
==== Scoreboard Objective ====<br />
<br />
This is sent to the client when it should create a new {{Minecraft Wiki|scoreboard}} objective or remove one.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x4A<br />
|rowspan="4"| Play<br />
|rowspan="4"| Client<br />
| Objective Name<br />
| String (16)<br />
| An unique name for the objective<br />
|-<br />
| Mode<br />
| Byte<br />
| 0 to create the scoreboard. 1 to remove the scoreboard. 2 to update the display text. <br />
|-<br />
| Objective Value<br />
| Optional Chat<br />
| Only if mode is 0 or 2. The text to be displayed for the score<br />
|-<br />
| Type<br />
| Optional VarInt enum<br />
| Only if mode is 0 or 2. 0 = "integer", 1 = "hearts".<br />
|}<br />
<br />
==== Set Passengers ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x4B<br />
|rowspan="3"| Play<br />
|rowspan="3"| Client<br />
| Entity ID<br />
| VarInt<br />
| Vehicle's EID<br />
|-<br />
| Passenger Count<br />
| VarInt<br />
| Number of elements in the following array<br />
|-<br />
| Passengers<br />
| Array of VarInt<br />
| EIDs of entity's passengers<br />
|}<br />
<br />
==== Teams ====<br />
<br />
Creates and updates teams.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
!colspan="2"| Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="23"| 0x4C<br />
|rowspan="23"| Play<br />
|rowspan="23"| Client<br />
|colspan="2"| Team Name<br />
| String (16)<br />
| A unique name for the team. (Shared with scoreboard).<br />
|-<br />
|colspan="2"| Mode<br />
| Byte<br />
| Determines the layout of the remaining packet<br />
|-<br />
|rowspan="9"| 0: create team<br />
| Team Display Name<br />
| Chat<br />
| <br />
|-<br />
| Friendly Flags<br />
| Byte<br />
| Bit mask. 0x01: Allow friendly fire, 0x02: can see invisible players on same team<br />
|-<br />
| Name Tag Visibility<br />
| String Enum (32)<br />
| <code>always</code>, <code>hideForOtherTeams</code>, <code>hideForOwnTeam</code>, <code>never</code><br />
|-<br />
| Collision Rule<br />
| String Enum (32)<br />
| <code>always</code>, <code>pushOtherTeams</code>, <code>pushOwnTeam</code>, <code>never</code><br />
|-<br />
| Team Color<br />
| VarInt enum<br />
| Used to color the name of players on the team; see below<br />
|-<br />
| Team Prefix<br />
| Chat<br />
| Displayed before the names of players that are part of this team<br />
|-<br />
| Team Suffix<br />
| Chat<br />
| Displayed after the names of players that are part of this team<br />
|-<br />
| Entity Count<br />
| VarInt<br />
| Number of elements in the following array<br />
|-<br />
| Entities<br />
| Array of String (40)<br />
| Identifiers for the entities in this team. For players, this is their username; for other entities, it is their UUID.<br />
|-<br />
| 1: remove team<br />
| ''no fields''<br />
| ''no fields''<br />
| <br />
|-<br />
|rowspan="7"| 2: update team info<br />
| Team Display Name<br />
| Chat<br />
| <br />
|-<br />
| Friendly Flags<br />
| Byte<br />
| Bit mask. 0x01: Allow friendly fire, 0x02: can see invisible entities on same team<br />
|-<br />
| Name Tag Visibility<br />
| String Enum (32)<br />
| <code>always</code>, <code>hideForOtherTeams</code>, <code>hideForOwnTeam</code>, <code>never</code><br />
|-<br />
| Collision Rule<br />
| String Enum (32)<br />
| <code>always</code>, <code>pushOtherTeams</code>, <code>pushOwnTeam</code>, <code>never</code><br />
|-<br />
| Team Color<br />
| VarInt enum<br />
| Used to color the name of players on the team; see below<br />
|-<br />
| Team Prefix<br />
| Chat<br />
| Displayed before the names of players that are part of this team<br />
|-<br />
| Team Suffix<br />
| Chat<br />
| Displayed after the names of players that are part of this team<br />
|-<br />
|rowspan="2"| 3: add players to team<br />
| Entity Count<br />
| VarInt<br />
| Number of elements in the following array<br />
|-<br />
| Entities<br />
| Array of String (40)<br />
| Identifiers for the entities added. For players, this is their username; for other entities, it is their UUID.<br />
|-<br />
|rowspan="2"| 4: remove players from team<br />
| Entity Count<br />
| VarInt<br />
| Number of elements in the following array<br />
|-<br />
| Entities<br />
| Array of String (40)<br />
| Identifiers for the entities removed. For players, this is their username; for other entities, it is their UUID.<br />
|}<br />
<br />
Team Color: The color of a team defines how the names of the team members are visualized; any formatting code can be used. The following table lists all the possible values.<br />
<br />
{| class="wikitable"<br />
! ID<br />
! Formatting<br />
|-<br />
| 0-15<br />
| Color formatting, same values as [[Chat]] colors.<br />
|-<br />
| 16<br />
| Obfuscated<br />
|-<br />
| 17<br />
| Bold<br />
|-<br />
| 18<br />
| Strikethrough<br />
|-<br />
| 19<br />
| Underlined<br />
|-<br />
| 20<br />
| Italic<br />
|-<br />
| 21<br />
| Reset<br />
|}<br />
<br />
==== Update Score ====<br />
<br />
This is sent to the client when it should update a scoreboard item. <br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x4D<br />
|rowspan="4"| Play<br />
|rowspan="4"| Client<br />
| Entity Name<br />
| String (40)<br />
| The entity whose score this is. For players, this is their username; for other entities, it is their UUID.<br />
|-<br />
| Action<br />
| Byte<br />
| 0 to create/update an item. 1 to remove an item.<br />
|-<br />
| Objective Name<br />
| String (16)<br />
| The name of the objective the score belongs to<br />
|-<br />
| Value<br />
| Optional VarInt<br />
| The score to be displayed next to the entry. Only sent when Action does not equal 1.<br />
|}<br />
<br />
==== Spawn Position ====<br />
<br />
Sent by the server after login to specify the coordinates of the spawn point (the point at which players spawn at, and which the compass points to). It can be sent at any time to update the point compasses point at.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x4E<br />
|rowspan="1"| Play<br />
|rowspan="1"| Client<br />
| Location<br />
| Position<br />
| Spawn location<br />
|}<br />
<br />
==== Time Update ====<br />
<br />
Time is based on ticks, where 20 ticks happen every second. There are 24000 ticks in a day, making Minecraft days exactly 20 minutes long.<br />
<br />
The time of day is based on the timestamp modulo 24000. 0 is sunrise, 6000 is noon, 12000 is sunset, and 18000 is midnight.<br />
<br />
The default SMP server increments the time by <code>20</code> every second.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x4F<br />
|rowspan="2"| Play<br />
|rowspan="2"| Client<br />
| World Age<br />
| Long<br />
| In ticks; not changed by server commands<br />
|-<br />
| Time of day<br />
| Long<br />
| The world (or region) time, in ticks. If negative the sun will stop moving at the Math.abs of the time<br />
|}<br />
<br />
==== Title ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
!colspan="2"| Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="10"| 0x50<br />
|rowspan="10"| Play<br />
|rowspan="10"| Client<br />
|colspan="2"| Action<br />
| VarInt Enum<br />
| <br />
|-<br />
! Action<br />
! Field Name<br />
! <br />
! <br />
|-<br />
| 0: set title<br />
| Title Text<br />
| [[Chat]]<br />
| <br />
|-<br />
| 1: set subtitle<br />
| Subtitle Text<br />
| [[Chat]]<br />
| <br />
|- <br />
| 2: set action bar<br />
| Action bar text<br />
| [[Chat]]<br />
| Displays a message above the hotbar (the same as position 2 in [[#Chat Message (clientbound)|Chat Message (clientbound)]], except that it correctly renders formatted chat. See [https://bugs.mojang.com/browse/MC-119145 MC-119145] for more information.)<br />
|-<br />
|rowspan="3"| 3: set times and display<br />
| Fade In<br />
| Int<br />
| Ticks to spend fading in<br />
|-<br />
| Stay<br />
| Int<br />
| Ticks to keep the title displayed<br />
|-<br />
| Fade Out<br />
| Int<br />
| Ticks to spend out, not when to start fading out<br />
|-<br />
| 4: hide<br />
| ''no fields''<br />
| ''no fields''<br />
| <br />
|-<br />
| 5: reset<br />
| ''no fields''<br />
| ''no fields''<br />
| <br />
|}<br />
<br />
“Hide” makes the title disappear, but if you run times again the same title will appear. “Reset” erases the text.<br />
<br />
The title is visible on screen for Fade In + Stay + Fade Out ticks.<br />
<br />
==== Entity Sound Effect ====<br />
<br />
Plays a sound effect from an entity.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x51<br />
|rowspan="5"| Play<br />
|rowspan="5"| Client<br />
| Sound ID<br />
| VarInt<br />
| ID of hardcoded sound event ([https://pokechu22.github.io/Burger/1.15.2.html#sounds events] as of 1.15.2)<br />
|-<br />
| Sound Category<br />
| VarInt Enum<br />
| The category that this sound will be played from ([https://gist.github.com/konwboj/7c0c380d3923443e9d55 current categories])<br />
|-<br />
| Entity ID<br />
| VarInt<br />
|<br />
|-<br />
| Volume<br />
| Float<br />
| 1.0 is 100%, capped between 0.0 and 1.0 by Notchian clients<br />
|-<br />
| Pitch<br />
| Float<br />
| Float between 0.5 and 2.0 by Notchian clients<br />
|}<br />
<br />
==== Sound Effect ====<br />
<br />
This packet is used to play a number of hardcoded sound events. For custom sounds, use [[#Named Sound Effect|Named Sound Effect]].<br />
<br />
{{Warning|Numeric sound effect IDs are liable to change between versions}}<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="7"| 0x52<br />
|rowspan="7"| Play<br />
|rowspan="7"| Client<br />
| Sound ID<br />
| VarInt<br />
| ID of hardcoded sound event ([https://pokechu22.github.io/Burger/1.15.2.html#sounds events] as of 1.15.2)<br />
|-<br />
| Sound Category<br />
| VarInt Enum<br />
| The category that this sound will be played from ([https://gist.github.com/konwboj/7c0c380d3923443e9d55 current categories])<br />
|-<br />
| Effect Position X<br />
| Int<br />
| Effect X multiplied by 8 ([[Data types#Fixed-point numbers|fixed-point number]] with only 3 bits dedicated to the fractional part)<br />
|-<br />
| Effect Position Y<br />
| Int<br />
| Effect Y multiplied by 8 ([[Data types#Fixed-point numbers|fixed-point number]] with only 3 bits dedicated to the fractional part)<br />
|-<br />
| Effect Position Z<br />
| Int<br />
| Effect Z multiplied by 8 ([[Data types#Fixed-point numbers|fixed-point number]] with only 3 bits dedicated to the fractional part)<br />
|-<br />
| Volume<br />
| Float<br />
| 1.0 is 100%, capped between 0.0 and 1.0 by Notchian clients<br />
|-<br />
| Pitch<br />
| Float<br />
| Float between 0.5 and 2.0 by Notchian clients<br />
|}<br />
<br />
==== Stop Sound ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x53<br />
|rowspan="3"| Play<br />
|rowspan="3"| Client<br />
| Flags<br />
| Byte<br />
| Controls which fields are present.<br />
|-<br />
| Source<br />
| Optional VarInt enum<br />
| Only if flags is 3 or 1 (bit mask 0x1). See below. If not present, then sounds from all sources are cleared.<br />
|-<br />
| Sound<br />
| Optional Identifier<br />
| Only if flags is 2 or 3 (bit mask 0x2). A sound effect name, see [[#Named Sound Effect|Named Sound Effect]]. If not present, then all sounds are cleared.<br />
|}<br />
<br />
Categories:<br />
<br />
{| class="wikitable"<br />
! Name !! Value<br />
|-<br />
| master || 0<br />
|-<br />
| music || 1<br />
|-<br />
| record || 2<br />
|-<br />
| weather || 3<br />
|-<br />
| block || 4<br />
|-<br />
| hostile || 5<br />
|-<br />
| neutral || 6<br />
|-<br />
| player || 7<br />
|-<br />
| ambient || 8<br />
|-<br />
| voice || 9<br />
|}<br />
<br />
==== Player List Header And Footer ====<br />
<br />
This packet may be used by custom servers to display additional information above/below the player list. It is never sent by the Notchian server.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x54<br />
|rowspan="2"| Play<br />
|rowspan="2"| Client<br />
| Header<br />
| [[Chat]]<br />
| To remove the header, send a empty translatable component: {"translate":""}<br />
|-<br />
| Footer<br />
| [[Chat]]<br />
| To remove the footer, send a empty translatable component: {"translate":""}<br />
|}<br />
<br />
==== NBT Query Response ====<br />
<br />
Sent in response to [[#Query Block NBT|Query Block NBT]] or [[#Query Entity NBT|Query Entity NBT]].<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x55<br />
|rowspan="2"| Play<br />
|rowspan="2"| Client<br />
| Transaction ID<br />
| VarInt<br />
| Can be compared to the one sent in the original query packet.<br />
|-<br />
| NBT<br />
| [[NBT|NBT Tag]]<br />
| The NBT of the block or entity. May be a TAG_END (0) in which case no NBT is present.<br />
|}<br />
<br />
==== Collect Item ====<br />
<br />
Sent by the server when someone picks up an item lying on the ground — its sole purpose appears to be the animation of the item flying towards you. It doesn't destroy the entity in the client memory, and it doesn't add it to your inventory. The server only checks for items to be picked up after each [[#Player Position|Player Position]] (and [[#Player Position And Look|Player Position And Look]]) packet sent by the client. The collector entity can be any entity; it does not have to be a player. The collected entity also can be any entity, but the Notchian server only uses this for items, experience orbs, and the different varieties of arrows.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x56<br />
|rowspan="3"| Play<br />
|rowspan="3"| Client<br />
| Collected Entity ID<br />
| VarInt<br />
| <br />
|- <br />
| Collector Entity ID<br />
| VarInt<br />
| <br />
|- <br />
| Pickup Item Count<br />
| VarInt<br />
| Seems to be 1 for XP orbs, otherwise the number of items in the stack.<br />
|}<br />
<br />
==== Entity Teleport ====<br />
<br />
This packet is sent by the server when an entity moves more than 8 blocks.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="7"| 0x57<br />
|rowspan="7"| Play<br />
|rowspan="7"| Client<br />
| Entity ID<br />
| VarInt<br />
| <br />
|-<br />
| X<br />
| Double<br />
| <br />
|-<br />
| Y<br />
| Double<br />
| <br />
|-<br />
| Z<br />
| Double<br />
| <br />
|-<br />
| Yaw<br />
| Angle<br />
| New angle, not a delta<br />
|-<br />
| Pitch<br />
| Angle<br />
| New angle, not a delta<br />
|-<br />
| On Ground<br />
| Boolean<br />
| <br />
|}<br />
<br />
==== Advancements ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
!colspan="2"| Field Name<br />
!colspan="2"| Field Type<br />
! Notes<br />
|-<br />
|rowspan="9"| 0x58<br />
|rowspan="9"| Play<br />
|rowspan="9"| Client<br />
|colspan="2"| Reset/Clear<br />
|colspan="2"| Boolean<br />
| Whether to reset/clear the current advancements<br />
|-<br />
|colspan="2"| Mapping size<br />
|colspan="2"| VarInt<br />
| Size of the following array<br />
|-<br />
|rowspan="2"| Advancement mapping<br />
| Key<br />
|rowspan="2"| Array<br />
| Identifier<br />
| The identifier of the advancement<br />
|-<br />
| Value<br />
| Advancement<br />
| See below<br />
|-<br />
|colspan="2"| List size<br />
|colspan="2"| VarInt<br />
| Size of the following array<br />
|-<br />
|colspan="2"| Identifiers<br />
|colspan="2"| Array of Identifier<br />
| The identifiers of the advancements that should be removed<br />
|-<br />
|colspan="2"| Progress size<br />
|colspan="2"| VarInt<br />
| Size of the following array<br />
|-<br />
|rowspan="2"| Progress mapping<br />
| Key<br />
|rowspan="2"| Array<br />
| Identifier<br />
| The identifier of the advancement<br />
|-<br />
| Value<br />
| Advancement progress<br />
| See below<br />
|}<br />
<br />
Advancement structure:<br />
<br />
{| class="wikitable"<br />
!colspan="2"| Field Name<br />
!colspan="2"| Field Type<br />
! Notes<br />
|-<br />
|colspan="2"| Has parent<br />
|colspan="2"| Boolean<br />
| Indicates whether the next field exists.<br />
|-<br />
|colspan="2"| Parent id<br />
|colspan="2"| Optional Identifier<br />
| The identifier of the parent advancement.<br />
|-<br />
|colspan="2"| Has display<br />
|colspan="2"| Boolean<br />
| Indicates whether the next field exists<br />
|-<br />
|colspan="2"| Display data<br />
|colspan="2"| Optional advancement display<br />
| See below.<br />
|-<br />
|colspan="2"| Number of criteria<br />
|colspan="2"| VarInt<br />
| Size of the following array<br />
|-<br />
|rowspan="2"| Criteria<br />
| Key<br />
|rowspan="2"| Array<br />
| Identifier<br />
| The identifier of the criterion<br />
|-<br />
| Value<br />
| '''Void'''<br />
| There is ''no'' content written here. Perhaps this will be expanded in the future?<br />
|-<br />
|colspan="2"| Array length<br />
|colspan="2"| VarInt<br />
| Number of arrays in the following array<br />
|-<br />
|rowspan="2"| Requirements<br />
| Array length 2<br />
|rowspan="2"| Array<br />
| VarInt<br />
| Number of elements in the following array<br />
|-<br />
| Requirement<br />
| Array of String<br />
| Array of required criteria<br />
|}<br />
<br />
Advancement display:<br />
<br />
{| class="wikitable"<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| Title<br />
| Chat<br />
|<br />
|-<br />
| Description<br />
| Chat<br />
|<br />
|-<br />
| Icon<br />
| [[Slot]]<br />
|<br />
|-<br />
| Frame type<br />
| VarInt enum<br />
| 0 = <code>task</code>, 1 = <code>challenge</code>, 2 = <code>goal</code><br />
|-<br />
| Flags<br />
| Integer<br />
| 0x1: has background texture; 0x2: <code>show_toast</code>; 0x4: <code>hidden</code><br />
|-<br />
| Background texture<br />
| Optional Identifier<br />
| Background texture location. Only if flags indicates it.<br />
|-<br />
| X coord<br />
| Float<br />
| <br />
|-<br />
| Y coord<br />
| Float<br />
| <br />
|}<br />
<br />
Advancement progress:<br />
<br />
{| class="wikitable"<br />
!colspan="2"| Field Name<br />
!colspan="2"| Field Type<br />
! Notes<br />
|-<br />
|colspan="2"| Size<br />
|colspan="2"| VarInt<br />
| Size of the following array<br />
|-<br />
|rowspan="2"| Criteria<br />
| Criterion identifier<br />
|rowspan="2"| Array<br />
| Identifier<br />
| The identifier of the criterion.<br />
|-<br />
| Criterion progress<br />
| Criterion progress<br />
|<br />
|}<br />
<br />
Criterion progress:<br />
<br />
{| class="wikitable"<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| Achieved<br />
| Boolean<br />
| If true, next field is present<br />
|-<br />
| Date of achieving<br />
| Optional Long<br />
| As returned by [https://docs.oracle.com/javase/6/docs/api/java/util/Date.html#getTime() <code>Date.getTime</code>]<br />
|}<br />
<br />
==== Entity Properties ====<br />
<br />
Sets {{Minecraft Wiki|Attribute|attributes}} on the given entity.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
!colspan="2"| Field Name<br />
!colspan="2"| Field Type<br />
! Notes<br />
|-<br />
|rowspan="6"| 0x59<br />
|rowspan="6"| Play<br />
|rowspan="6"| Client<br />
|colspan="2"| Entity ID<br />
|colspan="2"| VarInt<br />
| <br />
|-<br />
|colspan="2"| Number Of Properties<br />
|colspan="2"| Int<br />
| Number of elements in the following array<br />
|-<br />
|rowspan="4"| Property<br />
| Key<br />
|rowspan="4"| Array<br />
| String (64)<br />
| See below<br />
|-<br />
| Value<br />
| Double<br />
| See below<br />
|-<br />
| Number Of Modifiers<br />
| VarInt<br />
| Number of elements in the following array<br />
|-<br />
| Modifiers<br />
| Array of Modifier Data<br />
| See {{Minecraft Wiki|Attribute#Modifiers}}. Modifier Data defined below.<br />
|}<br />
<br />
Known Key values (see also {{Minecraft Wiki|Attribute#Modifiers}}):<br />
<br />
{| class="wikitable"<br />
|-<br />
! Key<br />
! Default<br />
! Min<br />
! Max<br />
! Label<br />
|-<br />
| generic.maxHealth<br />
| 20.0<br />
| 0.0<br />
| 1024.0<br />
| Max Health<br />
|-<br />
| generic.followRange<br />
| 32.0<br />
| 0.0<br />
| 2048.0<br />
| Follow Range<br />
|-<br />
| generic.knockbackResistance<br />
| 0.0 <br />
| 0.0<br />
| 1.0<br />
| Knockback Resistance<br />
|-<br />
| generic.movementSpeed<br />
| 0.7<br />
| 0.0<br />
| 1024.0<br />
| Movement Speed<br />
|-<br />
| generic.attackDamage<br />
| 2.0<br />
| 0.0<br />
| 2048.0<br />
| Attack Damage<br />
|-<br />
| generic.attackSpeed<br />
| 4.0<br />
| 0.0<br />
| 1024.0<br />
| Attack Speed<br />
|-<br />
| generic.flyingSpeed<br />
| 0.4<br />
| 0.0<br />
| 1024.0<br />
| Flying Speed<br />
|-<br />
| generic.armor<br />
| 0.0<br />
| 0.0<br />
| 30.0<br />
| Armor<br />
|-<br />
| generic.armorToughness<br />
| 0.0<br />
| 0.0<br />
| 20.0<br />
| Armor Toughness<br />
|-<br />
| generic.attackKnockback<br />
| 0.0<br />
| 0.0<br />
| 5.0<br />
| &mdash;<br />
|-<br />
| generic.luck<br />
| 0.0<br />
| -1024.0<br />
| 1024.0<br />
| Luck<br />
|-<br />
| horse.jumpStrength<br />
| 0.7<br />
| 0.0<br />
| 2.0<br />
| Jump Strength<br />
|-<br />
| zombie.spawnReinforcements<br />
| 0.0<br />
| 0.0<br />
| 1.0<br />
| Spawn Reinforcements Chance<br />
|-<br />
| generic.reachDistance<br />
| 5.0<br />
| 0.0<br />
| 1024.0<br />
| Player Reach Distance (Forge only)<br />
|-<br />
| forge.swimSpeed<br />
| 1.0<br />
| 0.0<br />
| 1024.0<br />
| Swimming Speed (Forge only)<br />
|}<br />
<br />
Unknown attributes will cause a game crash ([https://bugs.mojang.com/browse/MC-150405 MC-150405]) due to the default minimum being larger than the default value.<br />
<br />
''Modifier Data'' structure:<br />
<br />
{| class="wikitable"<br />
|-<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| UUID<br />
| UUID<br />
| <br />
|-<br />
| Amount<br />
| Double<br />
| May be positive or negative<br />
|-<br />
| Operation<br />
| Byte<br />
| See below<br />
|}<br />
<br />
The operation controls how the base value of the modifier is changed.<br />
<br />
* 0: Add/subtract amount<br />
* 1: Add/subtract amount percent of the current value<br />
* 2: Multiply by amount percent<br />
<br />
All of the 0's are applied first, and then the 1's, and then the 2's.<br />
<br />
==== Entity Effect ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x5A<br />
|rowspan="5"| Play<br />
|rowspan="5"| Client<br />
| Entity ID<br />
| VarInt<br />
| <br />
|-<br />
| Effect ID<br />
| Byte<br />
| See {{Minecraft Wiki|Status effect#List of effects|this table}}<br />
|-<br />
| Amplifier<br />
| Byte<br />
| Notchian client displays effect level as Amplifier + 1<br />
|-<br />
| Duration<br />
| VarInt<br />
| Duration in ticks.<br />
|-<br />
| Flags<br />
| Byte<br />
| Bit field, see below.<br />
|}<br />
<br />
Within flags:<br />
<br />
* 0x01: Is ambient - was the effect spawned from a beacon? All beacon-generated effects are ambient. Ambient effects use a different icon in the HUD (blue border rather than gray). If all effects on an entity are ambient, the [[Entities#Living|"Is potion effect ambient" living metadata field]] should be set to true. Usually should not be enabled.<br />
* 0x02: Show particles - should all particles from this effect be hidden? Effects with particles hidden are not included in the calculation of the effect color, and are not rendered on the HUD (but are still rendered within the inventory). Usually should be enabled.<br />
* 0x04: Show icon - should the icon be displayed on the client? Usually should be enabled.<br />
<br />
==== Declare Recipes ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
!colspan="2"| Field Name<br />
!colspan="2"| Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x5B<br />
|rowspan="4"| Play<br />
|rowspan="4"| Client<br />
|colspan="2"| Num Recipes<br />
|colspan="2"| VarInt<br />
| Number of elements in the following array<br />
|-<br />
|rowspan="3"| Recipe<br />
| Recipe ID<br />
|rowspan="3"| Array<br />
| Identifier<br />
|<br />
|-<br />
| Type<br />
| String<br />
| The recipe type, see below<br />
|-<br />
| Data<br />
| Optional, varies<br />
| Additional data for the recipe. For some types, there will be no data.<br />
|}<br />
<br />
Recipe types:<br />
<br />
{| class="wikitable"<br />
! Type<br />
! Description<br />
! Data<br />
|-<br />
| <code>crafting_shapeless</code><br />
| Shapeless crafting recipe. All items in the ingredient list must be present, but in any order/slot.<br />
| As follows:<br />
{| class="wikitable"<br />
! Name<br />
! Type<br />
! Description<br />
|-<br />
| Group<br />
| String<br />
| Used to group similar recipes together in the recipe book. Tag is present in recipe JSON.<br />
|-<br />
| Ingredient count<br />
| VarInt<br />
| Number of elements in the following array<br />
|-<br />
| Ingredients<br />
| Array of Ingredient<br />
|<br />
|-<br />
| Result<br />
| [[Slot]]<br />
|<br />
|}<br />
|-<br />
| <code>crafting_shaped</code><br />
| Shaped crafting recipe. All items must be present in the same pattern (which may be flipped horizontally or translated)<br />
| As follows:<br />
{| class="wikitable"<br />
! Name<br />
! Type<br />
! Description<br />
|-<br />
| Width<br />
| VarInt<br />
|<br />
|-<br />
| Height<br />
| VarInt<br />
|<br />
|-<br />
| Group<br />
| String<br />
| Used to group similar recipes together in the recipe book. Tag is present in recipe JSON.<br />
|-<br />
| Ingredients<br />
| Array of Ingredient<br />
| Length is width * height. Indexed by x + (y * width).<br />
|-<br />
| Result<br />
| [[Slot]]<br />
|<br />
|}<br />
|-<br />
| <code>crafting_special_armordye</code><br />
| Recipe for dying leather armor<br />
|rowspan="13"| None<br />
|-<br />
| <code>crafting_special_bookcloning</code><br />
| Recipe for copying contents of written books<br />
|-<br />
| <code>crafting_special_mapcloning</code><br />
| Recipe for copying maps<br />
|-<br />
| <code>crafting_special_mapextending</code><br />
| Recipe for adding paper to maps<br />
|-<br />
| <code>crafting_special_firework_rocket</code><br />
| Recipe for making firework rockets<br />
|-<br />
| <code>crafting_special_firework_star</code><br />
| Recipe for making firework stars<br />
|-<br />
| <code>crafting_special_firework_star_fade</code><br />
| Recipe for making firework stars fade between multiple colors<br />
|-<br />
| <code>crafting_special_repairitem</code><br />
| Recipe for repairing items via crafting<br />
|-<br />
| <code>crafting_special_tippedarrow</code><br />
| Recipe for crafting tipped arrows<br />
|-<br />
| <code>crafting_special_bannerduplicate</code><br />
| Recipe for copying banner patterns<br />
|-<br />
| <code>crafting_special_banneraddpattern</code><br />
| Recipe for adding patterns to banners<br />
|-<br />
| <code>crafting_special_shielddecoration</code><br />
| Recipe for applying a banner's pattern to a shield<br />
|-<br />
| <code>crafting_special_shulkerboxcoloring</code><br />
| Recipe for recoloring a shulker box<br />
|-<br />
| <code>smelting</code><br />
| Smelting recipe<br />
|rowspan="4"| As follows:<br />
{| class="wikitable"<br />
! Name<br />
! Type<br />
! Description<br />
|-<br />
| Group<br />
| String<br />
| Used to group similar recipes together in the recipe book.<br />
|-<br />
| Ingredient<br />
| Ingredient<br />
|<br />
|-<br />
| Result<br />
| [[Slot]]<br />
|<br />
|-<br />
| Experience<br />
| Float<br />
|<br />
|-<br />
| Cooking time<br />
| VarInt<br />
|<br />
|}<br />
|-<br />
| <code>blasting</code><br />
| Blast furnace recipe<br />
|-<br />
| <code>smoking</code><br />
| Smoker recipe<br />
|-<br />
| <code>campfire_cooking</code><br />
| Campfire recipe<br />
|-<br />
| <code>stonecutting</code><br />
| Stonecutter recipe<br />
| As follows:<br />
{| class="wikitable"<br />
! Name<br />
! Type<br />
! Description<br />
|-<br />
| Group<br />
| String<br />
| Used to group similar recipes together in the recipe book. Tag is present in recipe JSON.<br />
|-<br />
| Ingredient<br />
| Ingredient<br />
|<br />
|-<br />
| Result<br />
| [[Slot]]<br />
|<br />
|}<br />
|}<br />
<br />
Ingredient is defined as:<br />
<br />
{| class="wikitable"<br />
! Name<br />
! Type<br />
! Description<br />
|-<br />
| Count<br />
| VarInt<br />
| Number of elements in the following array<br />
|-<br />
| Items<br />
| Array of [[Slot]]<br />
| Any item in this array may be used for the recipe. The count of each item should be 1.<br />
|}<br />
<br />
==== Tags ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x5C<br />
|rowspan="4"| Play<br />
|rowspan="4"| Client<br />
| Block Tags<br />
| (See below)<br />
| IDs are block IDs<br />
|-<br />
| Item Tags<br />
| (See below)<br />
| IDs are item IDs<br />
|-<br />
| Fluid Tags<br />
| (See below)<br />
| IDs are fluid IDs<br />
|-<br />
| Entity Tags<br />
| (See below)<br />
| IDs are entity IDs<br />
|}<br />
<br />
Tags look like:<br />
<br />
{| class="wikitable"<br />
!colspan="2"| Field Name<br />
!colspan="2"| Field Type<br />
! Notes<br />
|-<br />
|colspan="2"| Length<br />
|colspan="2"| VarInt<br />
| Number of elements in the following array<br />
|-<br />
|rowspan="3"| Tags<br />
| Tag name<br />
|rowspan="3"| Array<br />
| Identifier<br />
|<br />
|-<br />
| Count<br />
| VarInt<br />
| Number of elements in the following array<br />
|-<br />
| Entries<br />
| Array of VarInt<br />
| Numeric ID of the block/item.<br />
|}<br />
<br />
=== Serverbound ===<br />
<br />
==== Teleport Confirm ====<br />
<br />
Sent by client as confirmation of [[#Player Position And Look (clientbound)|Player Position And Look]].<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x00<br />
| Play<br />
| Server<br />
| Teleport ID<br />
| VarInt<br />
| The ID given by the [[#Player Position And Look (clientbound)|Player Position And Look]] packet<br />
|}<br />
<br />
==== Query Block NBT ====<br />
<br />
Used when <kbd>Shift</kbd>+<kbd>F3</kbd>+<kbd>I</kbd> is pressed while looking at a block.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x01<br />
|rowspan="2"| Play<br />
|rowspan="2"| Server<br />
| Transaction ID<br />
| VarInt<br />
| An incremental ID so that the client can verify that the response matches.<br />
|-<br />
| Location<br />
| Position<br />
| The location of the block to check.<br />
|}<br />
<br />
==== Set Difficulty ====<br />
<br />
Must have at least op level 2 to use. Appears to only be used on singleplayer; the difficulty buttons are still disabled in multiplayer.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x02<br />
|rowspan="1"| Play<br />
|rowspan="1"| Server<br />
| New difficulty<br />
| Byte<br />
| 0: peaceful, 1: easy, 2: normal, 3: hard <br />
|}<br />
<br />
==== Chat Message (serverbound) ====<br />
<br />
Used to send a chat message to the server. The message may not be longer than 256 characters or else the server will kick the client.<br />
<br />
If the message starts with a <code>/</code>, the server will attempt to interpret it as a command. Otherwise, the server will broadcast the same chat message to all players on the server (including the player that sent the message), prepended with player's name. Specifically, it will respond with a translate [[chat]] component, "<code>chat.type.text</code>" with the first parameter set to the display name of the player (including some chat component logic to support clicking the name to send a PM) and the second parameter set to the message. See [[Chat#Processing chat|processing chat]] for more information.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x03<br />
|rowspan="1"| Play<br />
|rowspan="1"| Server<br />
| Message<br />
| String (256)<br />
| The client sends the raw input, not a [[Chat]] component<br />
|}<br />
<br />
==== Client Status ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x04<br />
|rowspan="1"| Play<br />
|rowspan="1"| Server<br />
| Action ID<br />
| VarInt Enum<br />
| See below<br />
|}<br />
<br />
''Action ID'' values:<br />
<br />
{| class="wikitable"<br />
|-<br />
! Action ID<br />
! Action<br />
! Notes<br />
|-<br />
| 0<br />
| Perform respawn<br />
| Sent when the client is ready to complete login and when the client is ready to respawn after death.<br />
|-<br />
| 1<br />
| Request stats<br />
| Sent when the client opens the Statistics menu<br />
|}<br />
<br />
==== Client Settings ====<br />
<br />
Sent when the player connects, or when settings are changed.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="6"| 0x05<br />
|rowspan="6"| Play<br />
|rowspan="6"| Server<br />
| Locale<br />
| String (16)<br />
| e.g. en_GB<br />
|-<br />
| View Distance<br />
| Byte<br />
| Client-side render distance, in chunks<br />
|-<br />
| Chat Mode<br />
| VarInt Enum<br />
| 0: enabled, 1: commands only, 2: hidden. See [[Chat#Processing chat|processing chat]] for more information.<br />
|-<br />
| Chat Colors<br />
| Boolean<br />
| “Colors” multiplayer setting<br />
|-<br />
| Displayed Skin Parts<br />
| Unsigned Byte<br />
| Bit mask, see below<br />
|-<br />
| Main Hand<br />
| VarInt Enum<br />
| 0: Left, 1: Right<br />
|}<br />
<br />
''Displayed Skin Parts'' flags:<br />
<br />
* Bit 0 (0x01): Cape enabled<br />
* Bit 1 (0x02): Jacket enabled<br />
* Bit 2 (0x04): Left Sleeve enabled<br />
* Bit 3 (0x08): Right Sleeve enabled<br />
* Bit 4 (0x10): Left Pants Leg enabled<br />
* Bit 5 (0x20): Right Pants Leg enabled<br />
* Bit 6 (0x40): Hat enabled<br />
<br />
The most significant bit (bit 7, 0x80) appears to be unused.<br />
<br />
==== Tab-Complete (serverbound) ====<br />
<br />
Sent when the client needs to tab-complete a <code>minecraft:ask_server</code> suggestion type.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x06<br />
|rowspan="2"| Play<br />
|rowspan="2"| Server<br />
| Transaction Id<br />
| VarInt<br />
| The id received in the tab completion request packet, must match or the client will ignore this packet. Client generates this and increments it each time it sends another tab completion that doesn't get a response.<br />
|-<br />
| Text<br />
| String (32500)<br />
| All text behind the cursor without the <code>/</code> (e.g. to the left of the cursor in left-to-right languages like English)<br />
|}<br />
<br />
==== Window Confirmation (serverbound) ====<br />
<br />
If a confirmation sent by the client was not accepted, the server will reply with a [[#Window Confirmation (clientbound)|Window Confirmation (clientbound)]] packet with the Accepted field set to false. When this happens, the client must send this packet to apologize (as with movement), otherwise the server ignores any successive confirmations.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x07<br />
|rowspan="3"| Play<br />
|rowspan="3"| Server<br />
| Window ID<br />
| Byte<br />
| The ID of the window that the action occurred in<br />
|-<br />
| Action Number<br />
| Short<br />
| Every action that is to be accepted has a unique number. This number is an incrementing integer (starting at 1) with separate counts for each window ID.<br />
|-<br />
| Accepted<br />
| Boolean<br />
| Whether the action was accepted<br />
|}<br />
<br />
==== Click Window Button ====<br />
<br />
Used when clicking on window buttons. Until 1.14, this was only used by enchantment tables.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x08<br />
|rowspan="2"| Play<br />
|rowspan="2"| Server<br />
| Window ID<br />
| Byte<br />
| The ID of the window sent by [[#Open Window|Open Window]]<br />
|-<br />
| Button ID<br />
| Byte<br />
| Meaning depends on window type; see below<br />
|}<br />
<br />
{| class="wikitable"<br />
! Window type<br />
! ID<br />
! Meaning<br />
|-<br />
|rowspan="3"| Enchantment Table<br />
| 0 || Topmost enchantment<br />
|-<br />
| 1 || Middle enchantment<br />
|-<br />
| 2 || Bottom enchantment<br />
|-<br />
|rowspan="4"| Lectern<br />
| 1 || Previous page (which does give a redstone output)<br />
|-<br />
| 2 || Next page<br />
|-<br />
| 3 || Take Book<br />
|-<br />
| 100+page || Opened page number - 100 + number<br />
|-<br />
| Stonecutter<br />
|colspan="2"| Recipe button number - 4*row + col. Depends on the item.<br />
|-<br />
| Loom<br />
|colspan="2"| Recipe button number - 4*row + col. Depends on the item.<br />
|}<br />
<br />
==== Click Window ====<br />
<br />
This packet is sent by the player when it clicks on a slot in a window.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="6"| 0x09<br />
|rowspan="6"| Play<br />
|rowspan="6"| Server<br />
| Window ID<br />
| Unsigned Byte<br />
| The ID of the window which was clicked. 0 for player inventory.<br />
|-<br />
| Slot<br />
| Short<br />
| The clicked slot number, see below<br />
|-<br />
| Button<br />
| Byte<br />
| The button used in the click, see below<br />
|-<br />
| Action Number<br />
| Short<br />
| A unique number for the action, implemented by Notchian as a counter, starting at 1 (different counter for every window ID). Used by the server to send back a [[#Confirm Transaction (clientbound)|Confirm Transaction (clientbound)]].<br />
|-<br />
| Mode<br />
| VarInt Enum<br />
| Inventory operation mode, see below<br />
|-<br />
| Clicked item<br />
| [[Slot Data|Slot]]<br />
| The clicked slot. Has to be empty (item ID = -1) for drop mode.<br />
|}<br />
<br />
See [[Inventory]] for further information about how slots are indexed.<br />
<br />
When right-clicking on a stack of items, half the stack will be picked up and half left in the slot. If the stack is an odd number, the half left in the slot will be smaller of the amounts.<br />
<br />
The distinct type of click performed by the client is determined by the combination of the Mode and Button fields.<br />
<br />
{| class="wikitable"<br />
! Mode<br />
! Button<br />
! Slot<br />
! Trigger<br />
|-<br />
!rowspan="2"| 0<br />
| 0<br />
| Normal<br />
| Left mouse click<br />
|-<br />
| 1<br />
| Normal<br />
| Right mouse click<br />
|-<br />
!rowspan="2"| 1<br />
| 0<br />
| Normal<br />
| Shift + left mouse click<br />
|-<br />
| 1<br />
| Normal<br />
| Shift + right mouse click ''(identical behavior)''<br />
|-<br />
!rowspan="5"| 2<br />
| 0<br />
| Normal<br />
| Number key 1<br />
|-<br />
| 1<br />
| Normal<br />
| Number key 2<br />
|-<br />
| 2<br />
| Normal<br />
| Number key 3<br />
|-<br />
| ⋮<br />
| ⋮<br />
| ⋮<br />
|-<br />
| 8<br />
| Normal<br />
| Number key 9<br />
|-<br />
!rowspan="1"| 3<br />
| 2<br />
| Normal<br />
| Middle click, only defined for creative players in non-player inventories.<br />
|-<br />
!rowspan="4"| 4<br />
| 0<br />
| Normal*<br />
| Drop key (Q) (* Clicked item is different, see above)<br />
|-<br />
| 1<br />
| Normal*<br />
| Ctrl + Drop key (Ctrl-Q) ''(drops full stack)''<br />
|-<br />
| 0<br />
| -999<br />
| Left click outside inventory holding nothing ''(no-op)''<br />
|-<br />
| 1<br />
| -999<br />
| Right click outside inventory holding nothing ''(no-op)''<br />
|-<br />
!rowspan="9"| 5<br />
| 0<br />
| -999<br />
| Starting left mouse drag<br />
|-<br />
| 4<br />
| -999<br />
| Starting right mouse drag<br />
|-<br />
| 8<br />
| -999<br />
| Starting middle mouse drag, only defined for creative players in non-player inventories. (Note: the vanilla client will still incorrectly send this for non-creative players - see [https://bugs.mojang.com/browse/MC-46584 MC-46584])<br />
|-<br />
| 1<br />
| Normal<br />
| Add slot for left-mouse drag<br />
|-<br />
| 5<br />
| Normal<br />
| Add slot for right-mouse drag<br />
|-<br />
| 9<br />
| Normal<br />
| Add slot for middle-mouse drag, only defined for creative players in non-player inventories. (Note: the vanilla client will still incorrectly send this for non-creative players - see [https://bugs.mojang.com/browse/MC-46584 MC-46584])<br />
|-<br />
| 2<br />
| -999<br />
| Ending left mouse drag<br />
|-<br />
| 6<br />
| -999<br />
| Ending right mouse drag<br />
|-<br />
| 10<br />
| -999<br />
| Ending middle mouse drag, only defined for creative players in non-player inventories. (Note: the vanilla client will still incorrectly send this for non-creative players - see [https://bugs.mojang.com/browse/MC-46584 MC-46584])<br />
|-<br />
! 6<br />
| 0<br />
| Normal<br />
| Double click<br />
|}<br />
<br />
Starting from version 1.5, “painting mode” is available for use in inventory windows. It is done by picking up stack of something (more than 1 item), then holding mouse button (left, right or middle) and dragging held stack over empty (or same type in case of right button) slots. In that case client sends the following to server after mouse button release (omitting first pickup packet which is sent as usual):<br />
<br />
# packet with mode 5, slot -999, button (0 for left | 4 for right);<br />
# packet for every slot painted on, mode is still 5, button (1 | 5);<br />
# packet with mode 5, slot -999, button (2 | 6);<br />
<br />
If any of the painting packets other than the “progress” ones are sent out of order (for example, a start, some slots, then another start; or a left-click in the middle) the painting status will be reset.<br />
<br />
The server will send back a [[#Confirm Transaction (clientbound)|Confirm Transaction]] packet. If the click was not accepted, the client must send a matching [[#Confirm Transaction (serverbound)|serverbound confirm transaction]] packet before sending more [[#Click Window|Click Window]] packets, otherwise the server will reject them silently. The Notchian server also sends a [[#Window Items|Window Items]] packet for the open window and [[#Set Slot|Set Slot]] packets for the clicked and cursor slot, but only when the click was not accepted, probably to resynchronize client and server.<br />
<br />
==== Close Window (serverbound) ====<br />
<br />
This packet is sent by the client when closing a window.<br />
<br />
Notchian clients send a Close Window packet with Window ID 0 to close their inventory even though there is never an [[#Open Window|Open Window]] packet for the inventory.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x0A<br />
| Play<br />
| Server<br />
| Window ID<br />
| Unsigned Byte<br />
| This is the ID of the window that was closed. 0 for player inventory.<br />
|}<br />
<br />
==== Plugin Message (serverbound) ====<br />
<br />
{{Main|Plugin channels}}<br />
<br />
Mods and plugins can use this to send their data. Minecraft itself uses some [[plugin channel]]s. These internal channels are in the <code>minecraft</code> namespace.<br />
<br />
More documentation on this: [http://dinnerbone.com/blog/2012/01/13/minecraft-plugin-channels-messaging/ http://dinnerbone.com/blog/2012/01/13/minecraft-plugin-channels-messaging/]<br />
<br />
Note that the length of Data is known only from the packet length, since the packet has no length field of any kind.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x0B<br />
|rowspan="2"| Play<br />
|rowspan="2"| Server<br />
| Channel<br />
| Identifier<br />
| Name of the [[plugin channel]] used to send the data<br />
|-<br />
| Data<br />
| Byte Array<br />
| Any data, depending on the channel. <code>minecraft:</code> channels are documented [[plugin channel|here]]. The length of this array must be inferred from the packet length.<br />
|}<br />
<br />
==== Edit Book ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x0C<br />
|rowspan="3"| Play<br />
|rowspan="3"| Server<br />
| New book<br />
| [[Slot]]<br />
|<br />
|-<br />
| Is signing<br />
| Boolean<br />
| True if the player is signing the book; false if the player is saving a draft.<br />
|-<br />
| Hand<br />
| VarInt enum<br />
| 0: Main hand, 1: Off hand<br />
|}<br />
<br />
When editing a draft, the [[NBT]] section of the Slot contains this:<br />
<br />
<pre><br />
TAG_Compound(<nowiki>''</nowiki>): 1 entry<br />
{<br />
TAG_List('pages'): 2 entries<br />
{<br />
TAG_String(0): 'Something on Page 1'<br />
TAG_String(1): 'Something on Page 2'<br />
}<br />
}<br />
</pre><br />
<br />
When signing the book, it instead looks like this:<br />
<br />
<pre><br />
TAG_Compound(<nowiki>''</nowiki>): 3 entires<br />
{<br />
TAG_String('author'): 'Steve'<br />
TAG_String('title'): 'A Wonderful Book'<br />
TAG_List('pages'): 2 entries<br />
{<br />
TAG_String(0): 'Something on Page 1'<br />
TAG_String(1): 'Something on Page 2'<br />
}<br />
}<br />
</pre><br />
<br />
==== Entity NBT Request ====<br />
<br />
Used when <kbd>Shift</kbd>+<kbd>F3</kbd>+<kbd>I</kbd> is pressed while looking at an entity.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x0D<br />
|rowspan="2"| Play<br />
|rowspan="2"| Server<br />
| Transaction ID<br />
| VarInt<br />
| An incremental ID so that the client can verify that the response matches.<br />
|-<br />
| Entity ID<br />
| VarInt<br />
| The ID of the entity to query.<br />
|}<br />
<br />
==== Interact Entity ====<br />
<br />
This packet is sent from the client to the server when the client attacks or right-clicks another entity (a player, minecart, etc).<br />
<br />
A Notchian server only accepts this packet if the entity being attacked/used is visible without obstruction and within a 4-unit radius of the player's position.<br />
<br />
Note that middle-click in creative mode is interpreted by the client and sent as a [[#Creative Inventory Action|Creative Inventory Action]] packet instead.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="6"| 0x0E<br />
|rowspan="6"| Play<br />
|rowspan="6"| Server<br />
| Entity ID<br />
| VarInt<br />
| The ID of the entity to interact<br />
|-<br />
| Type<br />
| VarInt Enum<br />
| 0: interact, 1: attack, 2: interact at<br />
|-<br />
| Target X<br />
| Optional Float<br />
| Only if Type is interact at<br />
|-<br />
| Target Y<br />
| Optional Float<br />
| Only if Type is interact at<br />
|-<br />
| Target Z<br />
| Optional Float<br />
| Only if Type is interact at<br />
|-<br />
| Hand<br />
| Optional VarInt Enum<br />
| Only if Type is interact or interact at; 0: main hand, 1: off hand<br />
|}<br />
<br />
==== Keep Alive (serverbound) ====<br />
<br />
The server will frequently send out a keep-alive, each containing a random ID. The client must respond with the same packet.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x0F<br />
| Play<br />
| Server<br />
| Keep Alive ID<br />
| Long<br />
| <br />
|}<br />
<br />
==== Lock Difficulty ====<br />
<br />
Must have at least op level 2 to use. Appears to only be used on singleplayer; the difficulty buttons are still disabled in multiplayer.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x10<br />
|rowspan="1"| Play<br />
|rowspan="1"| Server<br />
| Locked<br />
| Boolean<br />
|<br />
|}<br />
<br />
==== Player Position ====<br />
<br />
Updates the player's XYZ position on the server.<br />
<br />
Checking for moving too fast is achieved like this:<br />
<br />
* Each server tick, the player's current position is stored<br />
* When a player moves, the changes in x, y, and z coordinates are compared with the positions from the previous tick (&Delta;x, &Delta;y, &Delta;z)<br />
* Total movement distance squared is computed as &Delta;x&sup2; + &Delta;y&sup2; + &Delta;z&sup2;<br />
* The expected movement distance squared is computed as velocityX&sup2; + veloctyY&sup2; + velocityZ&sup2;<br />
* If the total movement distance squared value minus the expected movement distance squared value is more than 100 (300 if the player is using an elytra), they are moving too fast.<br />
<br />
If the player is moving too fast, it will be logged that "<player> moved too quickly! " followed by the change in x, y, and z, and the player will be teleported back to their current (before this packet) serverside position.<br />
<br />
Also, if the absolute value of X or the absolute value of Z is a value greater than 3.2×10<sup>7</sup>, or X, Y, or Z are not finite (either positive infinity, negative infinity, or NaN), the client will be kicked for “Invalid move player packet received”.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x11<br />
|rowspan="4"| Play<br />
|rowspan="4"| Server<br />
| X<br />
| Double<br />
| Absolute position<br />
|-<br />
| Feet Y<br />
| Double<br />
| Absolute feet position, normally Head Y - 1.62 <br />
|-<br />
| Z<br />
| Double<br />
| Absolute position<br />
|-<br />
| On Ground<br />
| Boolean<br />
| True if the client is on the ground, false otherwise<br />
|}<br />
<br />
==== Player Position And Rotation (serverbound) ====<br />
<br />
A combination of [[#Player Rotation|Player Rotation]] and [[#Player Position|Player Position]].<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="6"| 0x12<br />
|rowspan="6"| Play<br />
|rowspan="6"| Server<br />
| X<br />
| Double<br />
| Absolute position<br />
|-<br />
| Feet Y<br />
| Double<br />
| Absolute feet position, normally Head Y - 1.62<br />
|-<br />
| Z<br />
| Double<br />
| Absolute position<br />
|-<br />
| Yaw<br />
| Float<br />
| Absolute rotation on the X Axis, in degrees<br />
|-<br />
| Pitch<br />
| Float<br />
| Absolute rotation on the Y Axis, in degrees<br />
|-<br />
| On Ground<br />
| Boolean<br />
| True if the client is on the ground, false otherwise<br />
|}<br />
<br />
==== Player Rotation ====<br />
[[File:Minecraft-trig-yaw.png|thumb|The unit circle for yaw]]<br />
[[File:Yaw.png|thumb|The unit circle of yaw, redrawn]]<br />
<br />
Updates the direction the player is looking in.<br />
<br />
Yaw is measured in degrees, and does not follow classical trigonometry rules. The unit circle of yaw on the XZ-plane starts at (0, 1) and turns counterclockwise, with 90 at (-1, 0), 180 at (0,-1) and 270 at (1, 0). Additionally, yaw is not clamped to between 0 and 360 degrees; any number is valid, including negative numbers and numbers greater than 360.<br />
<br />
Pitch is measured in degrees, where 0 is looking straight ahead, -90 is looking straight up, and 90 is looking straight down.<br />
<br />
The yaw and pitch of player (in degrees), standing at point (x0, y0, z0) and looking towards point (x, y, z) can be calculated with:<br />
<br />
dx = x-x0<br />
dy = y-y0<br />
dz = z-z0<br />
r = sqrt( dx*dx + dy*dy + dz*dz )<br />
yaw = -atan2(dx,dz)/PI*180<br />
if yaw < 0 then<br />
yaw = 360 + yaw<br />
pitch = -arcsin(dy/r)/PI*180<br />
<br />
You can get a unit vector from a given yaw/pitch via:<br />
<br />
x = -cos(pitch) * sin(yaw)<br />
y = -sin(pitch)<br />
z = cos(pitch) * cos(yaw)<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x13<br />
|rowspan="3"| Play<br />
|rowspan="3"| Server<br />
| Yaw<br />
| Float<br />
| Absolute rotation on the X Axis, in degrees<br />
|-<br />
| Pitch<br />
| Float<br />
| Absolute rotation on the Y Axis, in degrees<br />
|-<br />
| On Ground<br />
| Boolean<br />
| True if the client is on the ground, False otherwise<br />
|}<br />
<br />
==== Player Movement ====<br />
<br />
This packet as well as [[#Player Position|Player Position]], [[#Player Look|Player Look]], and [[#Player Position And Look 2|Player Position And Look]] are called the “serverbound movement packets”. Vanilla clients will send Player Position once every 20 ticks even for a stationary player.<br />
<br />
This packet is used to indicate whether the player is on ground (walking/swimming), or airborne (jumping/falling).<br />
<br />
When dropping from sufficient height, fall damage is applied when this state goes from false to true. The amount of damage applied is based on the point where it last changed from true to false. Note that there are several movement related packets containing this state.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x14<br />
|rowspan="1"| Play<br />
|rowspan="1"| Server<br />
| On Ground<br />
| Boolean<br />
| True if the client is on the ground, false otherwise<br />
|}<br />
<br />
==== Vehicle Move (serverbound) ====<br />
<br />
Sent when a player moves in a vehicle. Fields are the same as in [[#Player Position And Look (serverbound)|Player Position And Look]]. Note that all fields use absolute positioning and do not allow for relative positioning.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x15<br />
|rowspan="5"| Play<br />
|rowspan="5"| Server<br />
| X<br />
| Double<br />
| Absolute position (X coordinate)<br />
|-<br />
| Y<br />
| Double<br />
| Absolute position (Y coordinate)<br />
|-<br />
| Z<br />
| Double<br />
| Absolute position (Z coordinate)<br />
|-<br />
| Yaw<br />
| Float<br />
| Absolute rotation on the vertical axis, in degrees<br />
|-<br />
| Pitch<br />
| Float<br />
| Absolute rotation on the horizontal axis, in degrees<br />
|}<br />
<br />
==== Steer Boat ====<br />
<br />
Used to ''visually'' update whether boat paddles are turning. The server will update the [[Entities#Boat|Boat entity metadata]] to match the values here.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x16<br />
|rowspan="2"| Play<br />
|rowspan="2"| Server<br />
| Left paddle turning<br />
| Boolean<br />
|<br />
|-<br />
| Right paddle turning<br />
| Boolean<br />
|<br />
|}<br />
<br />
Right paddle turning is set to true when the left button or forward button is held; left paddle turning is set to true when the right button or forward button is set to true.<br />
<br />
==== Pick Item ====<br />
<br />
Used to swap out an empty space on the hotbar with the item in the given inventory slot. The Notchain client uses this for pick block functionality (middle click) to retrieve items from the inventory.<br />
<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x17<br />
|rowspan="1"| Play<br />
|rowspan="1"| Server<br />
| Slot to use<br />
| VarInt<br />
| See [[Inventory]]<br />
|}<br />
<br />
The server will first search the player's hotbar for an empty slot, starting from the current slot and looping around to the slot before it. If there are no empty slots, it will start a second search from the current slot and find the first slot that does not contain an enchanted item. If there still are no slots that meet that criteria, then the server will use the currently selected slot.<br />
<br />
After finding the appropriate slot, the server swaps the items and then send 3 packets:<br />
<br />
* [[Protocol#Set slot|Set Slot]], with window ID set to -2 and slot set to the newly chosen slot and the item set to the item that is now in that slot (which was previously at the slot the client requested)<br />
* Set Slot, with window ID set to -2 and slot set to the slot the player requested, with the item that is now in that slot and was previously on the hotbar slot<br />
* [[Protocol#Held_Item_Change_.28clientbound.29|Held Item Change]], with the slot set to the newly chosen slot.<br />
<br />
==== Craft Recipe Request ====<br />
<br />
This packet is sent when a player clicks a recipe in the crafting book that is craftable (white border).<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x18<br />
|rowspan="3"| Play<br />
|rowspan="3"| Server<br />
| Window ID<br />
| Byte<br />
|<br />
|-<br />
| Recipe<br />
| Identifier<br />
| A recipe ID<br />
|-<br />
| Make all<br />
| Boolean<br />
| Affects the amount of items processed; true if shift is down when clicked<br />
|}<br />
<br />
==== Player Abilities (serverbound) ====<br />
<br />
The latter 2 fields are used to indicate the walking and flying speeds respectively, while the first field is used to determine the value of 4 booleans.<br />
<br />
The vanilla client sends this packet when the player starts/stops flying with the Flags parameter changed accordingly. All other parameters are ignored by the vanilla server.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x19<br />
|rowspan="3"| Play<br />
|rowspan="3"| Server<br />
| Flags<br />
| Byte<br />
| Bit mask. 0x08: damage disabled (god mode), 0x04: can fly, 0x02: is flying, 0x01: is Creative<br />
|-<br />
| Flying Speed<br />
| Float<br />
| <br />
|-<br />
| Walking Speed<br />
| Float<br />
| <br />
|}<br />
<br />
==== Player Digging ====<br />
<br />
Sent when the player mines a block. A Notchian server only accepts digging packets with coordinates within a 6-unit radius between the center of the block and 1.5 units from the player's feet (''not'' their eyes).<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x1A<br />
|rowspan="3"| Play<br />
|rowspan="3"| Server<br />
| Status<br />
| VarInt Enum<br />
| The action the player is taking against the block (see below)<br />
|-<br />
| Location<br />
| Position<br />
| Block position<br />
|-<br />
| Face<br />
| Byte Enum<br />
| The face being hit (see below)<br />
|}<br />
<br />
Status can be one of seven values:<br />
<br />
{| class="wikitable"<br />
! Value<br />
! Meaning<br />
! Notes<br />
|-<br />
| 0<br />
| Started digging<br />
| <br />
|-<br />
| 1<br />
| Cancelled digging<br />
| Sent when the player lets go of the Mine Block key (default: left click)<br />
|-<br />
| 2<br />
| Finished digging<br />
| Sent when the client thinks it is finished<br />
|-<br />
| 3<br />
| Drop item stack<br />
| Triggered by using the Drop Item key (default: Q) with the modifier to drop the entire selected stack (default: depends on OS). Location is always set to 0/0/0, Face is always set to -Y.<br />
|-<br />
| 4<br />
| Drop item<br />
| Triggered by using the Drop Item key (default: Q). Location is always set to 0/0/0, Face is always set to -Y.<br />
|-<br />
| 5<br />
| Shoot arrow / finish eating<br />
| Indicates that the currently held item should have its state updated such as eating food, pulling back bows, using buckets, etc. Location is always set to 0/0/0, Face is always set to -Y.<br />
|-<br />
| 6<br />
| Swap item in hand<br />
| Used to swap or assign an item to the second hand. Location is always set to 0/0/0, Face is always set to -Y.<br />
|}<br />
<br />
The Face field can be one of the following values, representing the face being hit:<br />
<br />
{| class="wikitable"<br />
|-<br />
! Value<br />
! Offset<br />
! Face<br />
|-<br />
| 0<br />
| -Y<br />
| Bottom<br />
|-<br />
| 1<br />
| +Y<br />
| Top<br />
|-<br />
| 2<br />
| -Z<br />
| North<br />
|-<br />
| 3<br />
| +Z<br />
| South<br />
|-<br />
| 4<br />
| -X<br />
| West<br />
|-<br />
| 5<br />
| +X<br />
| East<br />
|}<br />
<br />
==== Entity Action ====<br />
<br />
Sent by the client to indicate that it has performed certain actions: sneaking (crouching), sprinting, exiting a bed, jumping with a horse, and opening a horse's inventory while riding it.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x1B<br />
|rowspan="3"| Play<br />
|rowspan="3"| Server<br />
| Entity ID<br />
| VarInt<br />
| Player ID<br />
|-<br />
| Action ID<br />
| VarInt Enum<br />
| The ID of the action, see below<br />
|-<br />
| Jump Boost<br />
| VarInt<br />
| Only used by the “start jump with horse” action, in which case it ranges from 0 to 100. In all other cases it is 0.<br />
|}<br />
<br />
Action ID can be one of the following values:<br />
<br />
{| class="wikitable"<br />
! ID<br />
! Action<br />
|-<br />
| 0<br />
| Start sneaking<br />
|-<br />
| 1<br />
| Stop sneaking<br />
|-<br />
| 2<br />
| Leave bed<br />
|-<br />
| 3<br />
| Start sprinting<br />
|-<br />
| 4<br />
| Stop sprinting<br />
|-<br />
| 5<br />
| Start jump with horse<br />
|-<br />
| 6<br />
| Stop jump with horse<br />
|-<br />
| 7<br />
| Open horse inventory<br />
|-<br />
| 8<br />
| Start flying with elytra<br />
|}<br />
<br />
Leave bed is only sent when the “Leave Bed” button is clicked on the sleep GUI, not when waking up due today time.<br />
<br />
Open horse inventory is only sent when pressing the inventory key (default: E) while on a horse — all other methods of opening a horse's inventory (involving right-clicking or shift-right-clicking it) do not use this packet.<br />
<br />
==== Steer Vehicle ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x1C<br />
|rowspan="3"| Play<br />
|rowspan="3"| Server<br />
| Sideways<br />
| Float<br />
| Positive to the left of the player<br />
|-<br />
| Forward<br />
| Float<br />
| Positive forward<br />
|-<br />
| Flags<br />
| Unsigned Byte<br />
| Bit mask. 0x1: jump, 0x2: unmount<br />
|}<br />
<br />
Also known as 'Input' packet.<br />
<br />
==== Recipe Book Data ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
!colspan="2"| Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="11"| 0x1D<br />
|rowspan="11"| Play<br />
|rowspan="11"| Server<br />
|colspan="2"| Type<br />
| VarInt<br />
| Determines the format of the rest of the packet<br />
|-<br />
! Type<br />
! Field Name<br />
! <br />
! <br />
|-<br />
| 0: Displayed Recipe<br />
| Recipe ID<br />
| Identifier<br />
| A recipe ID<br />
|-<br />
|rowspan="8"| 1: Recipe Book States<br />
| Crafting Recipe Book Open<br />
| Boolean<br />
| Whether the player has the crafting recipe book currently opened/active.<br />
|-<br />
| Crafting Recipe Filter Active<br />
| Boolean<br />
| Whether the player has the crafting recipe book filter option currently active.<br />
|-<br />
| Smelting Recipe Book Open<br />
| Boolean<br />
| Whether the player has the smelting recipe book currently opened/active.<br />
|-<br />
| Smelting Recipe Filter Active<br />
| Boolean<br />
| Whether the player has the smelting recipe book filter option currently active.<br />
|-<br />
| Blasting Recipe Book Open<br />
| Boolean<br />
| May be swapped with smoking recipe book. Also, the notchian client appears to use the same value for both of those books currently.<br />
|-<br />
| Blasting Recipe Filter Active<br />
| Boolean<br />
| May be swapped with smoking recipe book. Also, the notchian client appears to use the same value for both of those books currently.<br />
|-<br />
| Smoking Recipe Book Open<br />
| Boolean<br />
|<br />
|-<br />
| Smoking Recipe Filter Active<br />
| Boolean<br />
|<br />
|}<br />
<br />
The Recipe Book Status type is sent when one of the states changes.<br />
<br />
==== Name Item ====<br />
<br />
Sent as a player is renaming an item in an anvil (each keypress in the anvil UI sends a new Name Item packet). If the new name is empty, then the item loses its custom name (this is different from setting the custom name to the normal name of the item). The item name may be no longer than 35 characters long, and if it is longer than that, then the rename is silently ignored.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x1E<br />
|rowspan="1"| Play<br />
|rowspan="1"| Server<br />
| Item name<br />
| String (32767)<br />
| The new name of the item<br />
|}<br />
<br />
==== Resource Pack Status ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x1F<br />
|rowspan="1"| Play<br />
|rowspan="1"| Server<br />
| Result<br />
| VarInt Enum<br />
| 0: successfully loaded, 1: declined, 2: failed download, 3: accepted<br />
|}<br />
<br />
==== Advancement Tab ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x20<br />
|rowspan="2"| Play<br />
|rowspan="2"| Server<br />
| Action<br />
| VarInt enum<br />
| 0: Opened tab, 1: Closed screen<br />
|-<br />
| Tab ID<br />
| Optional identifier<br />
| Only present if action is Opened tab<br />
|}<br />
<br />
==== Select Trade ====<br />
<br />
When a player selects a specific trade offered by a villager NPC.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x21<br />
|rowspan="1"| Play<br />
|rowspan="1"| Server<br />
| Selected slot<br />
| VarInt<br />
| The selected slot int the players current (trading) inventory. (Was a full Integer for the plugin message)<br />
|}<br />
<br />
==== Set Beacon Effect ====<br />
<br />
Changes the effect of the current beacon.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x22<br />
|rowspan="2"| Play<br />
|rowspan="2"| Server<br />
| Primary Effect<br />
| VarInt<br />
| A [http://minecraft.gamepedia.com/Data_values#Potions Potion ID]. (Was a full Integer for the plugin message)<br />
|-<br />
| Secondary Effect<br />
| VarInt<br />
| A [http://minecraft.gamepedia.com/Data_values#Potions Potion ID]. (Was a full Integer for the plugin message)<br />
|}<br />
<br />
==== Held Item Change (serverbound) ====<br />
<br />
Sent when the player changes the slot selection<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x23<br />
|rowspan="1"| Play<br />
|rowspan="1"| Server<br />
| Slot<br />
| Short<br />
| The slot which the player has selected (0–8)<br />
|}<br />
<br />
==== Update Command Block ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x24<br />
|rowspan="5"| Play<br />
|rowspan="5"| Server<br />
|-<br />
| Location<br />
| Position<br />
|<br />
|-<br />
| Command<br />
| String (32767)<br />
|<br />
|-<br />
| Mode || VarInt enum || One of SEQUENCE (0), AUTO (1), or REDSTONE (2) <br />
|-<br />
| Flags<br />
| Byte<br />
| 0x01: Track Output (if false, the output of the previous command will not be stored within the command block); 0x02: Is conditional; 0x04: Automatic<br />
|}<br />
<br />
==== Update Command Block Minecart ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x25<br />
|rowspan="3"| Play<br />
|rowspan="3"| Server<br />
| Entity ID<br />
| VarInt<br />
|<br />
|-<br />
| Command<br />
| String<br />
|<br />
|-<br />
| Track Output<br />
| Boolean<br />
| If false, the output of the previous command will not be stored within the command block.<br />
|}<br />
<br />
==== Creative Inventory Action ====<br />
<br />
While the user is in the standard inventory (i.e., not a crafting bench) in Creative mode, the player will send this packet.<br />
<br />
Clicking in the creative inventory menu is quite different from non-creative inventory management. Picking up an item with the mouse actually deletes the item from the server, and placing an item into a slot or dropping it out of the inventory actually tells the server to create the item from scratch. (This can be verified by clicking an item that you don't mind deleting, then severing the connection to the server; the item will be nowhere to be found when you log back in.) As a result of this implementation strategy, the "Destroy Item" slot is just a client-side implementation detail that means "I don't intend to recreate this item.". Additionally, the long listings of items (by category, etc.) are a client-side interface for choosing which item to create. Picking up an item from such listings sends no packets to the server; only when you put it somewhere does it tell the server to create the item in that location.<br />
<br />
This action can be described as "set inventory slot". Picking up an item sets the slot to item ID -1. Placing an item into an inventory slot sets the slot to the specified item. Dropping an item (by clicking outside the window) effectively sets slot -1 to the specified item, which causes the server to spawn the item entity, etc.. All other inventory slots are numbered the same as the non-creative inventory (including slots for the 2x2 crafting menu, even though they aren't visible in the vanilla client).<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x26<br />
|rowspan="2"| Play<br />
|rowspan="2"| Server<br />
| Slot<br />
| Short<br />
| Inventory slot<br />
|-<br />
| Clicked Item<br />
| [[Slot Data|Slot]]<br />
| <br />
|}<br />
<br />
==== Update Jigsaw Block ====<br />
<br />
Sent when Done is pressed on the {{Minecraft Wiki|Jigsaw Block}} interface.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x27<br />
|rowspan="4"| Play<br />
|rowspan="4"| Server<br />
| Location<br />
| Position<br />
| Block entity location<br />
|-<br />
| Attachment type<br />
| Identifier<br />
| <br />
|- <br />
| Target pool<br />
| Identifier<br />
| <br />
|-<br />
| Final state<br />
| String<br />
| "Turns into" on the GUI, <code>final_state</code> in NBT<br />
|}<br />
<br />
==== Update Structure Block ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="17"| 0x28<br />
|rowspan="17"| Play<br />
|rowspan="17"| Server<br />
|-<br />
| Location<br />
| Position<br />
| Block entity location<br />
|-<br />
| Action<br />
| VarInt enum<br />
| An additional action to perform beyond simply saving the given data; see below<br />
|-<br />
| Mode<br />
| VarInt enum<br />
| One of SAVE (0), LOAD (1), CORNER (2), DATA (3).<br />
|-<br />
| Name<br />
| String<br />
|<br />
|-<br />
| Offset X || Byte<br />
| Between -32 and 32<br />
|-<br />
| Offset Y || Byte<br />
| Between -32 and 32<br />
|-<br />
| Offset Z || Byte<br />
| Between -32 and 32<br />
|-<br />
| Size X || Byte<br />
| Between 0 and 32<br />
|-<br />
| Size Y || Byte<br />
| Between 0 and 32<br />
|-<br />
| Size Z || Byte<br />
| Between 0 and 32<br />
|-<br />
| Mirror<br />
| VarInt enum<br />
| One of NONE (0), LEFT_RIGHT (1), FRONT_BACK (2).<br />
|-<br />
| Rotation<br />
| VarInt enum<br />
| One of NONE (0), CLOCKWISE_90 (1), CLOCKWISE_180 (2), COUNTERCLOCKWISE_90 (3).<br />
|-<br />
| Metadata<br />
| String<br />
| <br />
|-<br />
| Integrity<br />
| Float<br />
| Between 0 and 1<br />
|-<br />
|Seed<br />
|VarLong<br />
|<br />
|-<br />
| Flags<br />
| Byte<br />
| 0x01: Ignore entities; 0x02: Show air; 0x04: Show bounding box<br />
|}<br />
<br />
Possible actions:<br />
<br />
* 0 - Update data<br />
* 1 - Save the structure<br />
* 2 - Load the structure<br />
* 3 - Detect size<br />
<br />
The Notchian client uses update data to indicate no special action should be taken (i.e. the done button).<br />
<br />
==== Update Sign ====<br />
<br />
{{anchor|Update Sign (serverbound)}}This message is sent from the client to the server when the “Done” button is pushed after placing a sign.<br />
<br />
The server only accepts this packet after [[#Open Sign Editor|Open Sign Editor]], otherwise this packet is silently ignored.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x29<br />
|rowspan="5"| Play<br />
|rowspan="5"| Server<br />
| Location<br />
| Position<br />
| Block Coordinates<br />
|-<br />
| Line 1<br />
| String (384)<br />
| First line of text in the sign<br />
|-<br />
| Line 2<br />
| String (384)<br />
| Second line of text in the sign<br />
|-<br />
| Line 3<br />
| String (384)<br />
| Third line of text in the sign<br />
|-<br />
| Line 4<br />
| String (384)<br />
| Fourth line of text in the sign<br />
|}<br />
<br />
==== Animation (serverbound) ====<br />
<br />
Sent when the player's arm swings.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x2A<br />
| Play<br />
| Server<br />
| Hand<br />
| VarInt Enum<br />
| Hand used for the animation. 0: main hand, 1: off hand.<br />
|}<br />
<br />
==== Spectate ====<br />
<br />
Teleports the player to the given entity. The player must be in spectator mode.<br />
<br />
The Notchian client only uses this to teleport to players, but it appears to accept any type of entity. The entity does not need to be in the same dimension as the player; if necessary, the player will be respawned in the right world. If the given entity cannot be found (or isn't loaded), this packet will be ignored. It will also be ignored if the player attempts to teleport to themselves.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x2B<br />
|rowspan="1"| Play<br />
|rowspan="1"| Server<br />
| Target Player<br />
| UUID<br />
| UUID of the player to teleport to (can also be an entity UUID)<br />
|}<br />
<br />
==== Player Block Placement ====<br />
<br />
{| class="wikitable"<br />
|-<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="7"| 0x2C<br />
|rowspan="7"| Play<br />
|rowspan="7"| Server<br />
| Hand<br />
| VarInt Enum<br />
| The hand from which the block is placed; 0: main hand, 1: off hand<br />
|-<br />
| Location<br />
| Position<br />
| Block position<br />
|-<br />
| Face<br />
| VarInt Enum<br />
| The face on which the block is placed (as documented at [[#Player Digging|Player Digging]])<br />
|-<br />
| Cursor Position X<br />
| Float<br />
| The position of the crosshair on the block, from 0 to 1 increasing from west to east<br />
|-<br />
| Cursor Position Y<br />
| Float<br />
| The position of the crosshair on the block, from 0 to 1 increasing from bottom to top<br />
|-<br />
| Cursor Position Z<br />
| Float<br />
| The position of the crosshair on the block, from 0 to 1 increasing from north to south<br />
|-<br />
| Inside block<br />
| Boolean<br />
| True when the player's head is inside of a block.<br />
|}<br />
<br />
Upon placing a block, this packet is sent once.<br />
<br />
The Cursor Position X/Y/Z fields (also known as in-block coordinates) are calculated using raytracing. The unit corresponds to sixteen pixels in the default resource pack. For example, let's say a slab is being placed against the south face of a full block. The Cursor Position X will be higher if the player was pointing near the right (east) edge of the face, lower if pointing near the left. The Cursor Position Y will be used to determine whether it will appear as a bottom slab (values 0.0–0.5) or as a top slab (values 0.5-1.0). The Cursor Position Z should be 1.0 since the player was looking at the southernmost part of the block.<br />
<br />
Inside block is true when a player's head (specifically eyes) are inside of a block's collision. In 1.13 and later versions, collision is rather complicated and individual blocks can have multiple collision boxes. For instance, a ring of vines has a non-colliding hole in the middle. This value is only true when the player is directly in the box. In practice, though, this value is only used by scaffolding to place in front of the player when sneaking inside of it (other blocks will place behind when you intersect with them -- try with glass for instance). <br />
<br />
==== Use Item ====<br />
<br />
Sent when pressing the Use Item key (default: right click) with an item in hand.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x2D<br />
| Play<br />
| Server<br />
| Hand<br />
| VarInt Enum<br />
| Hand used for the animation. 0: main hand, 1: off hand.<br />
|}<br />
<br />
[[Category:Protocol Details]]<br />
[[Category:Minecraft Modern]]</div>Orladoghttps://wiki.vg/index.php?title=Raknet_Protocol&diff=15907Raknet Protocol2020-07-04T10:25:53Z<p>Orladog: Make things more consistent in the existing libraies</p>
<hr />
<div>:: '''Remember that this page is a WIP.''' Come back later to see a more complete page.<br />
----<br />
<br />
[http://www.jenkinssoftware.com/ RakNet] is a networking library used by Minecraft Bedrock Edition. You might want to also look at the documentation for the [[Bedrock Protocol]].<br />
This is based on the old [https://wiki.vg/Pocket_Edition_Protocol_Documentation#RakNet_protocol Pocket Edition Protocol Documentation] and may be incomplete or outdated.<br />
The source code for the RakNet Library can be found [https://github.com/OculusVR/RakNet/ here].<br />
RakNet uses [https://en.wikipedia.org/wiki/User_Datagram_Protocol UDP] as its networking protocol. The key differences from TCP are that not all packets are guaranteed to reach the destination at all or in order (it isn't reliable) and it uses messages with a specified length instead of streams of data. RakNet compensates for the out-of-order delivery and makes it reliable.<br />
<br />
<br />
'''NOTE:'''<br />
You may want to use an existing library if one exists for your language of choice.<br />
Here is an incomplete list. Not all of these are maintained or complete. If these are outdated you may need to change the protocol version to 9 before it can work. The protocol doesn't seem to have had any significant changes since the official implementation was discontinued in 2014, so as long as you bump the protocol version older libraries are likely to still work.<br />
<br />
{| class="wikitable sortable" style="width: auto; text-align: center;"[[Category:Bedrock Minecraft]]<br />
|-style="background:#eee"<br />
! Name<br />
!class="unsortable"| Description<br />
! Language<br />
! License<br />
! Active development<br />
|-<br />
! [https://github.com/NukkitX/Network NukkitX Network]<br />
| Network components used within NukkitX, but with great support for general use as well<br />
| Java<br />
| Apache License<br />
| Yes<br />
|-<br />
! [https://github.com/JRakNet/JRakNet JRakNet]<br />
| JRakNet is a networking library for Java which implements the UDP based protocol RakNet<br />
| Java<br />
| MIT<br />
| Yes<br />
|-<br />
! [https://github.com/HerryYT/JSRakNet JSRakNet]<br />
| JSRakNet is the first up to date and fully working raknet implementation written in Javascript to run a Minecraft PE server, designed mainly for JSPrismarine, but the implementation offers a general use<br />
| Javascript<br />
| MIT<br />
| Yes<br />
|-<br />
! [https://github.com/jython234/JRakLibPlus JRakLibPlus]<br />
| A library for easy creation of RakNet servers, based on RakLib and JRakLib.<br />
| Java<br />
| LGPL<br />
| No<br />
|-<br />
! [https://github.com/pmmp/RakLib RakLib]<br />
| RakNet server implementation written in PHP. This library is very lightweight on actual implementation - it provides the bare minimum to get a Minecraft Pocket Edition server functional. It only currently provides server functionality, and does not support most RakNet features.<br />
| PHP<br />
| GPL<br />
| Yes<br />
|-<br />
! [https://www.npmjs.com/package/raknet/ raknet]<br />
| UDP network library that follows the RakNet protocol for Node.js<br />
| Javascript<br />
| MIT<br />
| No<br />
|-<br />
! [https://pypi.org/project/PyRakLib/ PyRakLib]<br />
| PyRakLib is a networking library that follows the RakNet protocol for MCPE. It is ported from the PHP library RakLib. <br />
| Python<br />
| GPL<br />
| No<br />
|-<br />
! [https://github.com/facebookarchive/RakNet Raknet] (official)<br />
| The official implementation. Outdated and mostly for reference purposes. May not work with the latest Bedrock.<br />
| C++<br />
| BSD<br />
| No<br />
|}<br />
<br />
== Data types ==<br />
<br />
{| class="wikitable"<br />
|-<br />
!<br />
! Size (Bytes)<br />
! Range<br />
! Notes<br />
|-<br />
! byte<br />
| 1<br />
| 0 to 255<br />
|<br />
|-<br />
! Long<br />
| 8<br />
| -2^63 to 2^63-1<br />
| Signed 64-bit Integer<br />
|-<br />
! Magic<br />
| 16<br />
| <code>00ffff00fefefefefdfdfdfd12345678</code><br />
| Always those hex bytes, corresponding to RakNet's default OFFLINE_MESSAGE_DATA_ID<br />
|-<br />
! short<br />
| 2<br />
| -32768 to 32767<br />
| <br />
|-<br />
! unsigned short<br />
| 2<br />
| 0 to 65535<br />
| <br />
|-<br />
! string<br />
| unsigned short + string<br />
| N/A<br />
| class="col3" | Prefixed by a short containing the length of the string in characters. It appears that only the following ASCII characters can be displayed: !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~<br />
|-<br />
! boolean <br />
| 1<br />
| 0 to 1<br />
| True is encoded as <code>0x01</code>, false as <code>0x00</code>. <br />
|-<br />
! address<br />
| 7<br />
| <br />
| 1 byte for the IP version (4 or 6), followed by (for IPv4) 4 bytes for the IP and an unsigned short for the port number<br />
|-<br />
! uint24le<br />
| 3<br />
| <br />
| 3-byte little-endian unsigned integer<br />
|}<br />
<br />
== Handshake sequence ==<br />
<br />
# C→S: [[#Open Connection Request 1|Open Connection Request 1]]<br />
# S→C: [[#Open Connection Reply 1|Open Connection Reply 1]]<br />
# C→S: [[#Open Connection Request 2|Open Connection Request 2]]<br />
# S→C: [[#Open Connection Reply 2|Open Connection Reply 2]]<br />
<br />
From here on, the RakNet connection is established and all RakNet messages are contained in a [[#Frame Set Packet|Frame Set Packet]].<br />
<br />
This is currently incomplete<br />
<br />
== Packets ==<br />
<br />
=== Unconnected Ping ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x01, 0x02<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| MAGIC<br />
| magic<br />
| <br />
|-<br />
| Client GUID<br />
| Long<br />
| <br />
|}<br />
<br />
<code>0x02</code> is only replied to if there are open connections to the server. '''Note:''' as of 0.15.6 it seems that the game refreshes it's LAN world list every 4-5 seconds, however it seems the game will still ping in 1 second intervals.<br><br />
This packet should be responded to with unconnected Pong.<br />
<br />
=== Unconnected Pong ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x1c<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| MAGIC<br />
| magic<br />
| <br />
|-<br />
| Server ID string<br />
| string<br />
| Used for the MOTD. See below for details.<br />
|}<br />
<br />
'''Server ID string format'''<br />
<br />
For Minecraft Bedrock this is separated by semicolons and uses the following format:<br><br />
<code>Edition (MCPE or MCEE for Education Edition);MOTD line 1;Protocol Version;Version Name;Player Count;Max Player Count;Server Unique ID;MOTD line 2;Game mode;Game mode (numeric);Port (IPv4);Port (IPv6);</code><br><br />
Example:<br><br />
<code>MCPE;Dedicated Server;390;1.14.60;0;10;13253860892328930865;Bedrock level;Survival;1;19132;19133;</code><br><br />
Result:<br><br />
[[File:Server_ID_String_Example.png]]<br><br />
The Game mode and Game mode (numeric) values seem to not be used by the client.<br />
<br />
=== Connected Ping ===<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x00<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Connected Pong ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x03<br />
| Ping Time<br />
| Long<br />
| <br />
|-<br />
| Pong Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Open Connection Request 1 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x05<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Protocol version<br />
| byte<br />
| Currently 9<br />
|-<br />
| MTU<br />
| Zero padding<br />
| The MTU sent in the response appears to be somewhere around the size of this padding + 46 (28 udp overhead, 1 packet id, 16 magic, 1 protocol version). This padding seems to be used to discover the maximum packet size the network can handle.<br />
|}<br />
<br />
The client sends these to the target server with ever decreasing MTU until the server responds. This is used to discover the MTU size for the connection. According to the official docs, "The MTU size is the maximum size of a packet RakNet will generate", and "if you set the MTU size larger than your or any router along the network path takes, then the network will split the packet at best, or drop it at worst", so this process of sending decreasingly padded packets (compensating for the size of the packet itself and UDP overhead, which together make 48 bytes) seem to be used to discover the maximum packet size the network can handle. See the [http://www.jenkinssoftware.com/raknet/manual/programmingtips.html official documentation page] for more info about the MTU size. If the RakNet protocol does not match your own, respond with the Incompatible protocol packet.<br><br><br />
You should always respond to the first of these packets that you receive with Open Connection Reply 1, containing an MTU size of the amount of padding you received in bytes plus 46.<br />
<br />
=== Open Connection Reply 1 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x06<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| Use security<br />
| boolean<br />
| Make sure this is false, it is vital for the login sequence to continue!<br />
|-<br />
| MTU<br />
| short<br />
| see Open Connection Request 1<br />
|}<br />
<br />
=== Open Connection Request 2 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x07<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server Address<br />
| address<br />
| <br />
|-<br />
| MTU<br />
| short<br />
| <br />
|-<br />
| Client GUID<br />
| Long<br />
| <br />
|}<br />
<br />
=== Open Connection Reply 2 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x08<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| Client Address<br />
| address<br />
| <br />
|-<br />
| MTU<br />
| short<br />
| <br />
|-<br />
| Encryption enabled?<br />
| boolean<br />
| <br />
|}<br />
<br />
=== Connection Request ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x09<br />
| GUID<br />
| Long<br />
| <br />
|-<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Connection Request Accepted ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x10<br />
| Client address<br />
| address<br />
| <br />
|-<br />
| System index<br />
| short<br />
| Unknown what this does. 0 works as a value.<br />
|-<br />
| Internal IDs<br />
| 10x address<br />
| Unknown what these do. 255.255.255.255:19132 for all of them seems to work, any other address will probably work as well.<br />
|-<br />
| Request time<br />
| Long<br />
| <br />
|-<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Incompatible Protocol ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x19<br />
| Protocol<br />
| byte<br />
| <br />
|-<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
|}<br />
<br />
=== Unconnected Ping ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x01, 0x02<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| GUID<br />
| Long<br />
| <br />
|}<br />
<br />
=== Frame Set Packet ===<br />
{| class="wikitable"<br />
! Packet ID<br />
!colspan="3"| Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="11"| 0x80..0x8d<br />
|colspan="3"| Sequence number<br />
| uint24le<br />
| <br />
|-<br />
|rowspan="10"| Frames<br />
|colspan="2"| Flags<br />
| byte<br />
| Top 3 bits are reliability type, fourth bit is 1 when the frame is fragmented and part of a compound.<br />
|-<br />
|colspan="2"| Length IN BITS<br />
| short<br />
| Length of the body in bits.<br />
|-<br />
|colspan="2"| Reliable frame index<br />
| uint24le<br />
| only if reliable<br />
|-<br />
|colspan="2"| Sequenced frame index<br />
| uint24le<br />
| only if sequenced<br />
|-<br />
|rowspan="2"| Order<br />
| Ordered frame index<br />
| uint24le<br />
|rowspan="2"| only if ordered<br />
|-<br />
| Order channel<br />
| byte<br />
|-<br />
|rowspan="3"| Fragment<br />
| Compound size<br />
| int<br />
|rowspan="3"| only if fragmented<br />
|-<br />
| Compound ID<br />
| short<br />
|-<br />
| Index<br />
| int<br />
|-<br />
| Body<br />
| ceil(length/8) bytes<br />
|}<br />
<br />
The reliability types are as follows:<br />
<br />
{| class="wikitable"<br />
! style="text-align: center; font-weight: bold;" | ID<br />
! style="font-weight: bold;" | Name<br />
! style="text-align: center; font-weight: bold;" | Reliable<br />
! style="text-align: center; font-weight: bold;" | Ordered<br />
! style="text-align: center; font-weight: bold;" | Sequenced<br />
|-<br />
| style="text-align: center;" | 0<br />
| unreliable<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 1<br />
| unreliable sequenced<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
|-<br />
| style="text-align: center;" | 2<br />
| reliable<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 3<br />
| reliable ordered<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 4<br />
| reliable sequenced<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
|-<br />
| style="text-align: center;" | 5<br />
| unreliable (+ ACK receipt)<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 6<br />
| reliable (+ ACK receipt)<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 7<br />
| reliable ordered (+ ACK receipt)<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
|}<br />
<br />
Sequenced implies ordered.<br />
<br />
=== Game Packet ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x8e<br />
| Body<br />
| bytes<br />
| Single packet of the GAME protocol.<br />
|}<br />
<br />
=== NACK ===<br />
{| class="wikitable"<br />
! style="font-weight: bold;" | Packet ID<br />
! colspan="3" style="font-weight: bold;" | Field Name<br />
! style="font-weight: bold;" | Field Type<br />
! style="font-weight: bold;" | Notes<br />
|-<br />
| 0xa0<br />
| colspan="3" | Record count<br />
| short<br />
| <br />
|-<br />
| <br />
| rowspan="4" | Record<br />
| colspan="2" | Is Range?<br />
| byte<br />
| 0 for range, 1 for no range<br />
|-<br />
| <br />
| No Range<br />
| Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| rowspan="2" | Range<br />
| Start Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| End Index<br />
| uint24le<br />
| <br />
|}<br />
<br />
=== ACK ===<br />
{| class="wikitable"<br />
! style="font-weight: bold;" | Packet ID<br />
! colspan="3" style="font-weight: bold;" | Field Name<br />
! style="font-weight: bold;" | Field Type<br />
! style="font-weight: bold;" | Notes<br />
|-<br />
| 0xc0<br />
| colspan="3" | Record count<br />
| short<br />
| <br />
|-<br />
| <br />
| rowspan="4" | Record<br />
| colspan="2" | Is Range?<br />
| byte<br />
| 0 for range, 1 for no range<br />
|-<br />
| <br />
| No Range<br />
| Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| rowspan="2" | Range<br />
| Start Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| End Index<br />
| uint24le<br />
| <br />
|}<br />
<br />
[[Category:Bedrock Minecraft]]</div>Orladoghttps://wiki.vg/index.php?title=User:Orladog/Bedrock_Protocol&diff=15889User:Orladog/Bedrock Protocol2020-06-27T21:54:28Z<p>Orladog: Prepare to update page to 1.16</p>
<hr />
<div>:: '''Remember that this page is a WIP'''. Come back later to see a more complete page.<br />
----<br />
<br />
{{Box<br />
|BORDER = #9999FF<br />
|BACKGROUND = #99CCFF<br />
|WIDTH = 100%<br />
|ICON = <br />
|HEADING = Heads up!<br />
|CONTENT = This article is about the protocol for the latest '''stable''' release of Minecraft '''Bedrock Edition''' ([[Bedrock Protocol version numbers|1.16.0, protocol 407]]). See [[Protocol]] for the Java Edition Protocol.<br />
}}<br />
<br />
This is the [https://minecraft.gamepedia.com/Bedrock_Edition Bedrock Edition] Protocol Documentation.<br />
The Bedrock Edition Protocol uses [[wikipedia:User Datagram Protocol|UDP]] instead of [[wikipedia:Transmission Control Protocol|TCP]] that is used for the Java Edition.<br />
Bedrock Edition uses [[Raknet Protocol|RakNet]] as its protocol library.<br />
<br />
The default Bedrock Edition port is 19132.<br />
<br />
Information for this page was obtained from the [https://github.com/NukkitX/Protocol NukkitX Protocol library], [https://github.com/NiclasOlofsson/MiNET MiNET] and [https://github.com/Sandertv/gophertunnel gophertunnel].<br />
<br />
<br />
== Data types ==<br />
<br />
{| class="wikitable"<br />
|-<br />
!<br />
! Size (Bytes)<br />
! Range<br />
! Notes<br />
|-<br />
! Byte<br />
| 1<br />
| 0 to 255<br />
|<br />
|-<br />
! Boolean<br />
| 1<br />
| 0 or 1<br />
| A Byte treated as boolean, 0 is false but anything greater then that is true<br />
|-<br />
! Short<br />
| 2<br />
| -32768 to 32767<br />
|<br />
|-<br />
! Unsigned Short<br />
| 2<br />
| 0 to 65535<br />
|<br />
|-<br />
! Int<br />
| 4<br />
| -2147483648 to 2147483647<br />
| Signed little-endian 32-bit Integer<br />
|-<br />
! Int (big endian)<br />
| 4<br />
| -2147483648 to 2147483647<br />
| Signed big-endian 32-bit Integer<br />
|-<br />
! Unsigned Int<br />
| 4<br />
| 0 to 4294967295<br />
| Unsigned 32-bit Integer<br />
|-<br />
! Long<br />
| 8<br />
| -2^63 to 2^63-1<br />
| Signed 64-bit Integer<br />
|-<br />
! Unsigned Long<br />
| 8<br />
| 2^64-1<br />
| Unsigned 64-bit Integer<br />
|-<br />
! Float<br />
| 4<br />
| <br />
| A [[wikipedia:Single-precision_Floating-poInt_format|single-precision 32-bit IEEE 754 Floating poInt number]]<br />
|-<br />
! Double<br />
| 8<br />
| <br />
| A [[wikipedia:Double-precision_Floating-poInt_format|Double-precision 64-bit IEEE 754 Floating poInt number]]<br />
|-<br />
! VarInt<br />
| &ge; 1<br>&le; 5<br />
| 0 to 4294967295<br />
| <br />
|-<br />
! SignedVarInt<br />
| &ge; 1<br>&le; 5<br />
| -2147483648 and 2147483647<br />
| <br />
|-<br />
! VarLong<br />
| &ge; 1<br>&le; 10<br />
| <br />
|<br />
|-<br />
! SignedVarLong<br />
| &ge; 1<br>&le; 10<br />
| -2^63 and 2^63-1<br />
|<br />
|-<br />
! String<br />
| <br />
| <br />
| [[wikipedia:UTF-8|UTF-8]] String prefixed with its size in Bytes as a VarInt. This has the same data structure as a ByteArray but it contains textual data.<br />
|-<br />
! Vector3<br />
| 12<br />
| <br />
| Three Float values (X, Y and Z respectively)<br />
|-<br />
! Vector2<br />
| 8<br />
| <br />
| Two Float values (X and Y respectively)<br />
|-<br />
! NBT<br />
| <br />
| <br />
| <br />
|-<br />
! ByteArray<br />
| <br />
| <br />
| An arbitrary array of Bytes prefixed with its size in Bytes as a VarInt.<br />
|-<br />
! BlockCoordinates<br />
| &ge; 3<br>&le; 15<br />
| <br />
| A SignedVarInt, a normal VarInt and another SignedVarInt (X, Y and Z respectively)<br />
|-<br />
! PlayerLocation<br />
| 15<br />
| <br />
| Three Float values (X, Y and Z respectively), followed by three Bytes (pitch, head yaw and yaw respectively). To convert the Bytes to normal pitch and yaw values divide them by 0.71<br />
|-<br />
! UUID<br />
| 16<br />
| A [[wikipedia:Universally_unique_identifier|UUID]]<br />
| Encoded as two unsigned 64-bit Integers: the most significant 64 bits and the least significant 64 bits<br />
|-<br />
! Item<br />
| <br />
| <br />
|<br />
|-<br />
! ItemStacks<br />
| <br />
| <br />
|<br />
|-<br />
! Itemstates<br />
| <br />
| <br />
|<br />
|-<br />
! EntityAttributes<br />
| <br />
| <br />
|<br />
|-<br />
! PlayerAttributes<br />
| <br />
| <br />
|<br />
|-<br />
! Skin<br />
| <br />
| <br />
|<br />
|-<br />
! Recipes<br />
| <br />
| <br />
|<br />
|-<br />
! GameRules<br />
| <br />
| <br />
| <br />
|-<br />
! Transaction<br />
| <br />
| <br />
| <br />
|-<br />
! BlockPalette<br />
| <br />
| <br />
|<br />
|-<br />
! ScoreEntries<br />
| <br />
| <br />
|<br />
|-<br />
! MapInfo<br />
| <br />
| <br />
|<br />
|-<br />
! PlayerRecords<br />
| <br />
| <br />
|<br />
|-<br />
! ScoreboardIdentityEntries<br />
| <br />
| <br />
|<br />
|-<br />
! MetadataDictionary<br />
| <br />
| <br />
| <br />
|-<br />
! PotionTypeRecipe<br />
| <br />
| <br />
| <br />
|-<br />
! PotionContainerChangeRecipe<br />
| <br />
| <br />
| <br />
|-<br />
! ResourcePackInfos<br />
| <br />
| <br />
|<br />
|-<br />
! ResourcePackIdVersions<br />
| <br />
| <br />
|<br />
|-<br />
! ResourcePackIds<br />
| <br />
| <br />
| <br />
|}<br />
<br />
== Packet Format ==<br />
<br />
Bedrock Edition uses [[Raknet Protocol|RakNet]] as its protocol library, so the packets are sent that way. The UDP protocol specifies packet length, so unlike Java Edition and TCP which deal with raw data streams packets are not length-prefixed. Packets seem to always use compression and can also use encryption. Multiple packets can also be batched into a single packet.<br />
Packet compression uses [https://zlib.net/ zlib], and it seems that packet data can be fed directly into zlib (after being decrypted if encryption is enabled). It uses the zlib RAW (also known as DEFLATE) fomrat.<br />
<br><br><br />
Refer to [https://github.com/Sandertv/gophertunnel/blob/228ee8e68e33abf4f4500964bc658b4661ae57a8/minecraft/protocol/packet/decoder.go#L58 gophertunnel] for more information.<br />
<br />
== Login process ==<br />
The login process is as follows:<br />
# C→S: [[#Login|Login]]<br />
# S→C: [[#Server To Client Handshake|Server To Client Handshake]]<br />
# C→S: [[#Client To Server Handshake|Client To Server Handshake]]<br />
# S→C: [[#Play Status|Play Status]] (Login success)<br />
<br />
To spawn, the following packets should be sent, in order, after the ones above:<br />
# S→C: [[#Resource Packs Info|Resource Packs Info]]<br />
# C→S: [[#Resource Pack Client Response|Resource Pack Client Response]]<br />
# S→C: [[#Resource Pack Stack|Resource Pack Stack]]<br />
# C→S: [[#Resource Pack Client Response|Resource Pack Client Response]]<br />
# S→C: [[#Start Game|Start Game]]<br />
# S→C: [[#Biome Definition List|Biome Definition List]]<br />
# S→C: Chunks<br />
# S→C: [[#Play Status|Play Status]] (Player spawn)<br />
<br />
If there are no resource packs being sent, a [[#Resource Pack Stack|Resource Pack Stack]] can be sent directly after [[#Resource Packs Info|Resource Packs Info]] to avoid the client responses.<br />
<br />
== Packets ==<br />
Please note that some packet ids are missing, so they don't line up.<br />
The following packet ids are missing:<br />
0x10, 0x74, 0x7F, 0x80<br />
(16, 116, 127, 128)<br />
<br />
==== Login ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x01<br />
|rowspan="3"| Server<br />
| Protocol version<br />
| Int (big-endian)<br />
| <br />
|-<br />
| Chain data<br />
| JSON array of JWT Data<br />
| Contains the display name, UUID and XUID<br />
|-<br />
| Skin data<br />
| JWT Data<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Play Status ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x02<br />
|rowspan="1"| Client<br />
| Status<br />
| Int (big-endian)<br />
| The current status of the connection.<br />
|}<br />
<br />
The values for each status are as follows:<br />
* 0: Login success<br />
* 1: Failed client<br />
* 2: Failed server<br />
* 3 Player spawn<br />
* 4 Failed invalid Tenant<br />
* 5: Failed Vanilla Edu.<br />
* 6: Failed Edu. Vanilla<br />
* 7: Failed server full<br />
<br />
==== Server To Client Handshake ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x03<br />
|rowspan="1"| Client<br />
| JWT data<br />
| JWT String<br />
| Contains the salt to complete the Diffie-Hellman key exchange<br />
|}<br />
<br />
<br />
<br />
==== Client To Server Handshake ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x04<br />
|rowspan="1"| Server<br />
<br />
|}<br />
<br />
Sent by the client in response to a ServerToClientHandshake packet sent by theserver. It is the first encrypted packet in the login handshake and serves as a confirmation that encryption is correctly initialised client side. It has no fields.<br />
<br />
==== Disconnect ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x05<br />
|rowspan="2"| Client<br />
| Hide disconnect screen<br />
| Boolean<br />
| Specifies if the disconnection screen should be hidden when the client is disconnected, meaning it will be sent directly to the main menu.<br />
|-<br />
| Kick message<br />
| String<br />
| An optional message to show when disconnected.<br />
|}<br />
<br />
==== Resource Packs info ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x06<br />
|rowspan="4"| Client<br />
| Forced to Accept<br />
| Boolean<br />
| If the resource pack requires the client accept it.<br />
|-<br />
| Scripting Enabled<br />
| Boolean<br />
| If scripting is enabled.<br />
|-<br />
| BehahaviorPackInfos<br />
| ResourcePackInfo[]<br />
| A list of behaviour packs that the client needs to download before joining the server. All of these behaviour packs will be applied together.<br />
|-<br />
| ResourcePackInfos<br />
| ResourcePackInfo[]<br />
| A list of resource packs that the client needs to download before joining the server. The order of these resource packs is not relevant in this packet. It is however important in the Resource Pack Stack packet.<br />
|}<br />
<br />
<br />
<br />
==== Resource Pack Stack ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! colspan="2" | Field Name<br />
! colspan="2" | Field Type<br />
! Notes<br />
|-<br />
| rowspan="11" | 0x07<br />
| rowspan="11" | Client<br />
| colspan="2" | Forced to Accept<br />
| colspan="2" | Boolean<br />
| If the resource pack must be accepted for the player to join the server.<br />
|-<br />
! Resource Pack Entry<br />
! Field Name<br />
! colspan="2" | <br />
! <br />
|-<br />
| rowspan="3" | Array<br />
| Pack ID<br />
| colspan="2" | String<br />
| The ID of the resource pack.<br />
|-<br />
| Pack Version<br />
| colspan="2" | String<br />
| The version of the resource pack.<br />
|-<br />
| Subpack Name<br />
| colspan="2" | String<br />
| The subpack name of the resource pack.<br />
|-<br />
! Behavior Pack Entry<br />
! Field Name<br />
! colspan="2" | <br />
! <br />
|-<br />
| rowspan="3" | Array<br />
| Pack ID<br />
| colspan="2" | String<br />
| The ID of the resource pack.<br />
|-<br />
| Pack Version<br />
| colspan="2" | String<br />
| The version of the resource pack.<br />
|-<br />
| Subpack Name<br />
| colspan="2" | String<br />
| The subpack name of the resource pack.<br />
|-<br />
| colspan="2" | Experimental<br />
| colspan="2" | Boolean<br />
| If the sent resource and behavior packs are experimental.<br />
|-<br />
| colspan="2" | Game Version<br />
| colspan="2" | String<br />
| The version of the game the sent resource and behavior packs were made for.<br />
|}<br />
<br />
==== Resource Pack Response ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x08<br />
|rowspan="2"| Server<br />
| Status<br />
| Byte<br />
| See below<br />
|-<br />
| Pack IDs<br />
| ResourcePackIds<br />
| All of the pack IDs.<br />
|}<br />
<br />
The values for each status are as follows:<br />
* 0: None<br />
* 1: Refused<br />
* 2: Send packs<br />
* 3: Have all packs<br />
* 4: Completed<br />
<br />
==== Text ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! colspan="2" | Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| rowspan="9" | 0x09<br />
| rowspan="9" | Server &amp; Client<br />
| colspan="2" | Type<br />
| Byte<br />
| The type of chat message sent.<br />
|-<br />
| colspan="2" | Needs Translation<br />
| Boolean<br />
| If the message sent is a translation key and needs to be translated.<br />
|-<br />
! Chat Type ID<br />
! Text<br />
! <br />
! Derived from above; values sent here change depending on that.<br />
|-<br />
| rowspan="1" | 0, 1, or 2<br />
| rowspan="1" | Source Name<br />
| rowspan="1" | String<br />
| rowspan="1" | The name of the source.<br />
|-<br />
|-<br />
|-<br />
| rowspan="1" | 3, 4, or 5<br />
| rowspan="1" | Message<br />
| rowspan="1" | String<br />
| rowspan="1" | The message sent with the packet.<br />
|-<br />
|-<br />
|-<br />
|-<br />
| rowspan="2" | 6, 7, or 8<br />
| Message<br />
| String<br />
| The message sent with the packet<br />
|-<br />
| Parameters<br />
| Array<br />
| The parameters sent with the packet. This usually includes translation parameters or similar types depending on what kind of chat type was sent.<br />
|-<br />
| colspan="2" | XUID<br />
| Optional String<br />
| The XUID of the player who sent this message.<br />
|-<br />
| colspan="2" | Platform Chat ID<br />
| Optional String<br />
| The platform chat ID of the sent message.<br />
|}<br />
<br />
{| class="wikitable"<br />
! ID<br />
! Chat Type<br />
|-<br />
| 0<br />
| Chat<br />
|-<br />
| 1<br />
| Whisper<br />
|-<br />
| 2<br />
| Announcement<br />
|-<br />
| 3<br />
| Raw<br />
|-<br />
| 4<br />
| Tip<br />
|-<br />
| 5<br />
| System<br />
|-<br />
| 6<br />
| Translation<br />
|-<br />
| 7<br />
| Popup<br />
|-<br />
| 8<br />
| Jukebox Popup<br />
|}<br />
<br />
For additional information and examples of all the chat types above, see here: https://imgur.com/a/KhcFscg<br />
<br />
==== Set Time ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x0A<br />
|rowspan="1"| Client<br />
| Time<br />
| SignedVarInt<br />
| Time is the current time. The time is not limited to 24000 (time of day), but continues progressing after that.<br />
|}<br />
<br />
SetTime is sent by the server to update the current time client-side. The client actually advances time client-side by itself, so this packet does not need to be sent each tick. It is merely a means of synchronising time between server and client.<br />
<br />
==== Start Game ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="47"| 0x0B<br />
|rowspan="47"| Client<br />
| Entity ID Self<br />
| SignedVarLong<br />
| The unique ID of the player. The unique ID is a value that remains consistent across different sessions of the same world, but most unofficial servers simply fill the runtime ID of the entity out for this field.<br />
|-<br />
| Runtime Entity ID<br />
| VarLong<br />
| The runtime ID of the player. The runtime ID is unique for each world session, and entities are generally identified in packets using this runtime ID.<br />
|-<br />
| Player Gamemode<br />
| SignedVarInt<br />
|-<br />
| Spawn<br />
| Vector3<br />
| The spawn position of the player in the world. In servers this is often the same as the world's spawn position found below.<br />
|-<br />
| Rotation<br />
| Vector2<br />
| The pitch and yaw of the player<br />
|-<br />
| Seed<br />
| SignedVarInt<br />
| The seed used to generate the world. Unlike in Java edition, the seed is a 32bit Integer here.<br />
|-<br />
| Dimension<br />
| SignedVarInt<br />
| Dimension is the ID of the dimension that the player spawns in. It is a value from 0-2, with 0 being the overworld, 1 being the nether and 2 being the end.<br />
|-<br />
| Generator<br />
| SignedVarInt<br />
| Generator is the generator used for the world. It is a value from 0-4, with 0 being old limited worlds, 1 being infinite worlds, 2 being flat worlds, 3 being nether worlds and 4 being end worlds. A value of 0 will actually make the client stop rendering chunks you send beyond the world limit.<br />
|-<br />
| World Gamemode<br />
| SignedVarInt<br />
| The game mode that a player gets when it first spawns in the world. It is shown in the settings and is used if the Player Gamemode is set to 5.<br />
|-<br />
| Difficulty<br />
| SignedVarInt<br />
| Difficulty is the difficulty of the world. It is a value from 0-3, with 0 being peaceful, 1 being easy, 2 being normal and 3 being hard.<br />
|-<br />
| World Spawn<br />
| BlockCoordinates <br />
| The block on which the world spawn of the world. This coordinate has no effect on the place that the client spawns, but it does have an effect on the direction that a compass poInts.<br />
|-<br />
| Has achievements disabled<br />
| Boolean<br />
| Defines if achievements are disabled in the world. The client crashes if this value is set to true while the player's or the world's game mode is creative, and it's recommended to simply always set this to false as a server.<br />
|-<br />
| Day cycle stop time<br />
| SignedVarInt<br />
| The time at which the day cycle was locked if the day cycle is disabled using the respective game rule. The client will maIntain this time as Boolean as the day cycle is disabled.<br />
|-<br />
| EDU offer<br />
| SignedVarInt<br />
| Some Minecraft: Education Edition field that specifies what 'region' the world was from, with 0 being None, 1 being RestOfWorld, and 2 being China. The actual use of this field is unknown.<br />
|-<br />
| Has Education Edition features enabled<br />
| Boolean<br />
| Specifies if the world has education edition features enabled, such as the blocks or entities specific to education edition.<br />
|-<br />
| Rain level<br />
| Float<br />
| The level specifying the Intensity of the rain falling. When set to 0, no rain falls at all.<br />
|-<br />
| Lightning level<br />
| Float<br />
| The level specifying the Intensity of the thunder. This may actually be set independently from the rain level, meaning dark clouds can be produced without rain.<br />
|-<br />
| Has Confirmed Platform Locked Content<br />
| Boolean<br />
| <br />
|-<br />
| Is Multiplayer<br />
| Boolean<br />
| Specifies if the world is a multi-player game. This should always be set to true for servers.<br />
|-<br />
| Broadcast To LAN<br />
| Boolean<br />
| Specifies if LAN broadcast was Intended to be enabled for the world.<br />
|-<br />
| Xbox Live Broadcast Mode<br />
| VarInt<br />
| The mode used to broadcast the joined game across XBOX Live.<br />
|-<br />
| Platform Broadcast Mode<br />
| VarInt<br />
| The mode used to broadcast the joined game across the platform.<br />
|-<br />
| Enable commands<br />
| Boolean<br />
| If commands are enabled for the player. It is recommended to always set this to true on the server, as setting it to false means the player cannot, under any circumstance, use a command.<br />
|-<br />
| Are texture packs required<br />
| Boolean<br />
| Specifies if the texture pack the world might hold is required, meaning the client was forced to download it before joining.<br />
|-<br />
| GameRules<br />
| GameRules<br />
| Defines game rules currently active with their respective values. The value of these game rules may be either 'bool', 'Int32' or 'Float32'. Some game rules are server side only, and don't necessarily need to be sent to the client.<br />
|-<br />
| Bonus Chest<br />
| Boolean<br />
| Specifies if the world had the bonus map setting enabled when generating it. It does not have any effect client-side.<br />
|-<br />
| Map Enabled<br />
| Boolean<br />
| Specifies if the world has the start with map setting enabled, meaning each joining player obtains a map. This should always be set to false, because the client obtains a map all on its own accord if this is set to true.<br />
|-<br />
| Permission Level<br />
| SignedVarInt<br />
| The permission level of the player. It is a value from 0-3, with 0 being visitor, 1 being member, 2 being operator and 3 being custom.<br />
|-<br />
| Server Chunk Tick Range<br />
| Int<br />
| The radius around the player in which chunks are ticked. Most servers set this value to a fixed number, as it does not necessarily affect anything client-side.<br />
|-<br />
| Has Locked Behavior Pack<br />
| Boolean<br />
| Specifies if the texture pack of the world is locked, meaning it cannot be disabled from the world. This is typically set for worlds on the marketplace that have a dedicated texture pack.<br />
|-<br />
| Has Locked Resource Pack<br />
| Boolean<br />
| Specifies if the texture pack of the world is locked, meaning it cannot be disabled from the world. This is typically set for worlds on the marketplace that have a dedicated texture pack.<br />
|-<br />
| Is From Locked World Template<br />
| Boolean<br />
| Specifies if the world from the server was from a locked world template. For servers this should always be set to false.<br />
|-<br />
| Use MSA Gamertags Only<br />
| Boolean<br />
| <br />
|-<br />
| Is From World Template<br />
| Boolean<br />
| Specifies if the world from the server was from a locked world template. For servers this should always be set to false.<br />
|-<br />
| Is World Template Option Locked<br />
| Boolean<br />
| Specifies if the world was a template that locks all settings that change properties above in the settings GUI. It is recommended to set this to true for servers that do not allow things such as setting game rules through the GUI.<br />
|-<br />
| Only Spawn V1 Villagers<br />
| Boolean<br />
| A hack that Mojang put in place to preserve backwards compatibility with old villagers. The his never actually read though, so it has no functionality.<br />
|-<br />
| Game Version<br />
| String<br />
| The version of the game from which Vanilla features will be used. The exact function of this field isn't clear.<br />
|-<br />
| Level ID<br />
| String<br />
| A base64 encoded world ID that is used to identify the world.<br />
|-<br />
| World name<br />
| String<br />
| The name of the world that the player is joining. Note that this field shows up above the player list for the rest of the game session, and cannot be changed. Setting the server name to this field is recommended.<br />
|-<br />
| Premium World Template Id<br />
| String<br />
| A UUID specific to the premium world template that might have been used to generate the world. Servers should always fill out an empty String for this.<br />
|-<br />
| Is Trial<br />
| Boolean<br />
| Specifies if the world was a trial world, meaning features are limited and there is a time limit on the world.<br />
|-<br />
| Is Server Side movement enabled<br />
| Boolean<br />
| Specifies if the server is authoritative over the movement of the player, meaning it controls the movement of it.<br />
|-<br />
| Current Tick<br />
| Boolean<br />
| The total time in ticks that has elapsed since the start of the world.<br />
|-<br />
| Enchantment Seed<br />
| SignedVarInt<br />
| The seed used to seed the random used to produce enchantments in the enchantment table. Note that the exact correct random implementation must be used to produce the correct results both client- and server-side.<br />
|-<br />
| Block Palette<br />
| BlockPalette<br />
| A list of all blocks registered on the server.<br />
|-<br />
| Itemstates<br />
| Itemstates<br />
| A list of all items with their legacy IDs which are available in the game. Failing to send any of the items that are in the game will crash mobile clients.<br />
|-<br />
| Multiplayer Correlation ID<br />
| String<br />
| A unique ID specifying the multi-player session of the player. A random UUID should be filled out for this field.<br />
|}<br />
<br />
==== Add Player ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="19"| 0x0C<br />
|rowspan="19"| Client<br />
| UUID<br />
| UUID<br />
| UUID is the UUID of the player. It is the same UUID that the client sent in the Login packet at the start of the session. A player with this UUID must exist in the player list (built up using the Player List packet) for it to show up in-game.<br />
|-<br />
| Username<br />
| String<br />
| Username is the name of the player. This username is the username that will be set as the initial name tag of the player.<br />
|-<br />
| Entity ID Self<br />
| SignedVarLong<br />
| The unique ID of the player. The unique ID is a value that remains consistent across different sessions of the same world, but most unoffical servers simply fill the runtime ID of the player out for this field.<br />
|-<br />
| Runtime Entity ID<br />
| VarLong<br />
| The runtime ID of the player. The runtime ID is unique for each world session, and entities are generally identified in packets using this runtime ID.<br />
|-<br />
| Platform Chat ID<br />
| String<br />
| An identifier only set for particular platforms when chatting (presumably only for Nintendo Switch). It is otherwise an empty string, and is used to decide which players are able to chat with each other.<br />
|-<br />
| Position<br />
| Vector3<br />
| The position to spawn the player at. If the player is at a distance that the viewer cannot see, the player will still show up if the viewer moves closer.<br />
|-<br />
| Velocity<br />
| Vector3<br />
| The initial velocity the player spawns with. This velocity will initiate client side movement of the player.<br />
|-<br />
| Rotation<br />
| Float<br />
| Pitch, yaw and head yaw<br />
|-<br />
| Held Item<br />
| Item<br />
| The item that the player is holding. The item is shown to the viewer as soon as the player itself shows up. Needless to say that this field is rather pointless, as additional packets still must be sent for armour to show up.<br />
|-<br />
| Metadata<br />
| MetadataDictionary<br />
| A map of entity metadata, which includes flags and data properties that alter in particular the way the player looks. Flags include ones such as 'on fire' and 'sprinting'. The metadata values are indexed by their property key.<br />
|-<br />
| Flags<br />
| VarInt<br />
| Flags is a set of flags that specify certain properties of the player, such as whether or not it can fly and/or move through blocks.<br />
|-<br />
| Command permission<br />
| VarInt<br />
| A set of permissions that specify what commands a player is allowed to execute.<br />
|-<br />
| Action Permissions<br />
| VarInt<br />
| Action Permissions is, much like Flags, a set of flags that specify actions that the player is allowed to undertake, such as whether it is allowed to edit blocks, open doors etc.<br />
|-<br />
| Permission Level<br />
| VarInt<br />
| The permission level of the player as it shows up in the player list built up using the PlayerList packet.<br />
|-<br />
| Custom stored permissions<br />
| VarInt<br />
| <br />
|-<br />
| User Id<br />
| Long<br />
| A unique identifier of the player. It appears it is not required to fill this field out with a correct value. Simply writing 0 seems to work.<br />
|-<br />
| Links<br />
| Links<br />
| A list of entity links that are currently active on the player. These links alter the way the player shows up when first spawned in terms of it shown as riding an entity. Setting these links is important for new viewers to see the player is riding another entity.<br />
|-<br />
| Device ID<br />
| String<br />
| The device ID set in one of the files found in the storage of the device of the player. It may be changed freely, so it should not be relied on for anything.<br />
|-<br />
| Device OS<br />
| Int<br />
| The build platform/device OS of the player that is about to be added, as it sent in the Login packet when joining.<br />
|}<br />
<br />
Add Player is sent by the server to the client to make a player entity show up client-side. It is one of the few entities that cannot be sent using the AddActor packet.<br />
<br />
==== Add Entity ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="9"| 0x0D<br />
|rowspan="9"| Client<br />
| Entity ID Self<br />
| SignedVarLong<br />
| The unique ID of the entity. The unique ID is a value that remains consistent across different sessions of the same world, but most unofficial servers simply fill the runtime ID of the entity out for this field.<br />
|-<br />
| Runtime Entity ID<br />
| VarLong<br />
| The runtime ID of the entity. The runtime ID is unique for each world session, and entities are generally identified in packets using this runtime ID.<br />
|-<br />
| Entity Type<br />
| String<br />
| The string entity type of the entity, for example 'minecraft:skeleton'.<br />
|-<br />
| Position<br />
| Vector3<br />
| The position to spawn the entity at. If the entity is at a distance that the player cannot see, the entity will still show up if the player moves closer.<br />
|-<br />
| Velocity<br />
| Vector3<br />
| The initial velocity the entity spawns with. This velocity will initiate client side movement of the entity.<br />
|-<br />
| Rotation<br />
| Vector3<br />
| Pitch, yaw and head yaw<br />
|-<br />
| Attributes<br />
| EntityAttributes<br />
| A slice of attributes that the entity has. It includes attributes such as its health, movement speed, etc.<br />
|-<br />
| Metadata<br />
| MetadataDictionary<br />
| A map of entity metadata, which includes flags and data properties that alter in particular the way the entity looks. Flags include ones such as 'on fire' and 'sprinting'. The metadata values are indexed by their property key.<br />
|-<br />
| Links<br />
| Links<br />
| A list of entity links that are currently active on the entity. These links alter the way the entity shows up when first spawned in terms of it shown as riding an entity. Setting these links is important for new viewers to see the entity is riding another entity.<br />
|}<br />
<br />
Sent by the server to the client to spawn an entity to the player. It is used for every entity except other players, paintings and items, for which the Add Player, Add Painting and Add Item Entity packets are used.<br />
<br />
==== Remove Entity ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x0E<br />
|rowspan="1"| Client<br />
| Unique Entity Id<br />
| SignedVarLong<br />
| The unique ID of the entity to be removed. The unique ID is a value that remains consistent across different sessions of the same world, but most unofficial servers simply fill the runtime ID of the entity out for this field.<br />
|}<br />
<br />
Sent by the server to remove an entity that currently exists in the world from the client-side. Sending this packet if the client cannot already see this entity will have no effect.<br />
<br />
==== Add Item Entity ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="7"| 0x0F<br />
|rowspan="7"| Client<br />
| Entity ID Self<br />
| SignedVarLong<br />
| The unique ID of the entity. The unique ID is a value that remains consistent across different sessions of the same world, but most unofficial servers simply fill the runtime ID of the entity out for this field.<br />
|-<br />
| Runtime Entity ID<br />
| VarLong<br />
| The runtime ID of the entity. The runtime ID is unique for each world session, and entities are generally identified in packets using this runtime ID.<br />
|-<br />
| Item<br />
| Item<br />
| The item that is spawned. It must have a valid ID for it to show up client-side. If it is not a valid item, the client will crash when coming near.<br />
|-<br />
| Position<br />
| Vector3<br />
| The position to spawn the entity on. If the entity is at a distance that the player cannot see, the entity will still show up if the player moves closer.<br />
|-<br />
| Velocity<br />
| Vector3<br />
| The initial velocity the entity spawns with. This velocity will initiate client side movement of the entity.<br />
|-<br />
| Metadata<br />
| MetadataDictionary<br />
| A map of entity metadata, which includes flags and data properties that alter in particular the way the entity looks. Flags include ones such as 'on fire' and 'sprinting'. The metadata values are indexed by their property key.<br />
|-<br />
| Is From Fishing<br />
| Boolean<br />
| Specifies if the item was obtained by fishing it up using a fishing rod. It is not clear why the client needs to know this.<br />
|}<br />
<br />
Sent by the server to the client to make an item entity show up. It is one of the few entities that cannot be sent using the AddActor packet.<br />
<br />
==== Take Item Entity ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x11<br />
|rowspan="2"| Client<br />
| Item Runtime Entity Id<br />
| VarLong<br />
| the entity runtime ID of the item that is being taken by another entity. It will disappear to viewers after showing the pick-up animation.<br />
|-<br />
| Runtime Entity Id<br />
| VarLong<br />
| The runtime ID of the entity that took the item, which is usually a player, but could be another entity like a zombie too.<br />
|}<br />
<br />
Sent by the server when a player picks up an item entity. It makes the item entity disappear to viewers and shows the pick-up animation.<br />
<br />
==== Move Entity Absolute ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x12<br />
|rowspan="4"| Server & Client<br />
| Runtime entity id<br />
| VarLong<br />
| The runtime ID of the entity. The runtime ID is unique for each world session, and entities are generally identified in packets using this runtime ID.<br />
|-<br />
| Flags<br />
| byte<br />
| A combination of flags that specify details of the movement. See below for more info.<br />
|-<br />
| Position<br />
| PlayerLocation<br />
| <br />
|}<br />
<br />
{| class="wikitable"<br />
|-<br />
! Field<br />
! Bit<br />
! Notes<br />
|-<br />
| On ground<br />
| 0x01<br />
| If the entity is touching the ground<br />
|-<br />
| Telported<br />
| 0x02<br />
|<br />
|}<br />
<br />
Sent by the server to move an entity to an absolute position. It is typically used for movements where high accuracy isn't needed, such as for long range teleporting.<br />
This packet is also sent by the client when riding a horse/donkey.<br />
<br />
==== Move Player ====<br />
<br />
Sent by players to send their movement to the server, and by the server to update the movement of player entities to other players.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="8"| 0x13<br />
|rowspan="8"| Server & Client<br />
| Runtime entity id<br />
| VarLong<br />
| The runtime ID of the player. The runtime ID is unique for each world session, and entities are generally identified in packets using this runtime ID.<br />
|-<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| Rotation<br />
| Vector3<br />
| Pitch, yaw and head yaw<br />
|-<br />
| Mode<br />
| Byte<br />
| <br />
|-<br />
| On ground<br />
| Boolean<br />
| Specifies if the player is considered on the ground. Note that proxies or hacked clients could fake this to always be true, so it should not be taken for granted.<br />
|-<br />
| Riding runtime entity id<br />
| Float<br />
| The runtime ID of the entity that the player might currently be riding. If not riding, this should be left 0.<br />
|-<br />
| Teleportation cause<br />
| VarLong<br />
| See below. Only needs to exist if Mode cause is 2 (teleport).<br />
|-<br />
| Entity type<br />
| Byte<br />
| Only needs to exist if Mode cause is 2 (teleport).<br />
|}<br />
<br />
Modes:<br />
* 0: Normal<br />
* 1: Reset<br />
* 2: Teleport<br />
* 3: Rotation<br />
<br />
Teleportation causes:<br />
* 0: Unknown<br />
* 1: Projectile<br />
* 2: Chorus fruit<br />
* 3: Command<br />
* 4: Behavior<br />
<br />
==== Rider Jump ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x14<br />
|rowspan="1"| Server & Client<br />
| Jump Strength<br />
| SignedVarInt<br />
| The strength of the jump, depending on how long the rider has held the jump button.<br />
|}<br />
<br />
Sent by the client to the server when it jumps while riding an entity that has the WASDControlled entity flag set, for example when riding a horse. According to MiNET this can also be sent from the server to the client, but details on this are unknown.<br />
<br />
==== Update Block ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x15<br />
|rowspan="4"| Client<br />
| Coordinates<br />
| BlockCoordinates<br />
| The block position at which a block is updated.<br />
|-<br />
| Block Runtime ID<br />
| VarInt<br />
| The runtime ID of the block that is placed at Position after sending the packet to the client. The runtime ID must point to a block sent in the list in the Start Game packet.<br />
|-<br />
| Flags<br />
| VarInt<br />
| See below. Flags is a combination of flags that specify the way the block is updated client-side. It is a combination of the flags below, but typically sending only the Network flag is sufficient.<br />
|-<br />
| Layer<br />
| VarInt<br />
| The world layer on which the block is updated. In Bedrock, multiple blocks can be put in the same location using layers. The second layer is usually used for liquids, so blocks can be inside a liquid. For most blocks, this is the first layer, as that layer is the default layer to place blocks on, but for blocks inside of each other, this differs. As this system is designed with liquids, there may be bugs when using this to place blocks inside each other. For example, placing an interactable block such as an item frame on the second layer can cause a game crash if the player tries to interact with it.<br />
|}<br />
<br />
{| class="wikitable"<br />
|-<br />
! Field<br />
! Bit<br />
! Notes<br />
|-<br />
| Neighbors<br />
| 0x01<br />
| <br />
|-<br />
| Network<br />
| 0x02<br />
|<br />
|-<br />
| No Graphic<br />
| 0x04<br />
|<br />
|-<br />
| Priority<br />
| 0x08<br />
|<br />
|}<br />
<br />
Sent by the server to update a block client-side, without resending the entire chunk that the block is located in. It is particularly useful for small modifications like block breaking/placing.<br />
<br />
==== Add Painting ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x16<br />
|rowspan="5"| Client<br />
| Unique Entity Id<br />
| SignedVarLong<br />
| The unique ID of the entity. The unique ID is a value that remains consistent across different sessions of the same world, but most unofficial servers simply fill the runtime ID of the entity out for this field.<br />
|-<br />
| Runtime Entity Id<br />
| VarLong<br />
| The runtime ID of the entity. The runtime ID is unique for each world session, and entities are generally identified in packets using this runtime ID.<br />
|-<br />
| Position<br />
| Vector3<br />
| The position to spawn the entity at. If the entity is at a distance that the player cannot see, the entity will still show up if the player moves closer.<br />
|-<br />
| Direction<br />
| SignedVarInt<br />
| The facing direction of the painting. See below.<br />
|-<br />
| Name<br />
| String<br />
| This is the name of the painting (e.g. BurningSkull). See below.<br />
|}<br />
<br />
Valid facing values:<br />
* 0 - Facing towards positive Z (south)<br />
* 1 - Facing towards negative X (west)<br />
* 2 - Facing towards negative Z (north)<br />
* 3 - Facing towards positive X (east)<br />
<br />
Valid name values:<br />
* Kebab<br />
* Aztec<br />
* Alban<br />
* Aztec<br />
* Aztec2<br />
* Bomb<br />
* Plant<br />
* Wasteland<br />
* Wanderer<br />
* Graham<br />
* Pool<br />
* Courbet<br />
* Sunset<br />
* Sea<br />
* Creebet<br />
* Match<br />
* Bust<br />
* Stage<br />
* Void<br />
* SkullAndRoses<br />
* Wither<br />
* Fighters<br />
* Skeleton<br />
* DonkeyKong<br />
* PoInter<br />
* Pigscene<br />
* BurningSkull<br />
<br />
==== Tick Sync ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x17<br />
|rowspan="2"| Server & Client<br />
| Request Timestamp<br />
| Boolean<br />
| <br />
|-<br />
| Response Timestamp<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Level Sound Event (1) ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="6"| 0x18<br />
|rowspan="6"| Server & Client<br />
| Sound ID<br />
| Byte<br />
| <br />
|-<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| Block Id<br />
| SignedVarInt<br />
| <br />
|-<br />
| Entity Type<br />
| SignedVarInt<br />
| <br />
|-<br />
| Is baby mob<br />
| Boolean<br />
| <br />
|-<br />
| Is global<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Level Event ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x19<br />
|rowspan="3"| Client<br />
| Event ID<br />
| SignedVarInt<br />
| <br />
|-<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| Data<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Block Event ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x1A<br />
|rowspan="3"| Client<br />
| Block Position<br />
| BlockCoordinates<br />
| <br />
|-<br />
| Event Type<br />
| SignedVarInt<br />
| <br />
|-<br />
| Event Data<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
==== Entity Event ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x1B<br />
|rowspan="3"| Server & Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Event ID<br />
| Byte<br />
| <br />
|-<br />
| Data<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Mob Effect ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="6"| 0x1C<br />
|rowspan="6"| Client<br />
| Runtime entity id<br />
| VarLong<br />
| <br />
|-<br />
| Event<br />
| Byte<br />
| <br />
|-<br />
| Effect id<br />
| SignedVarInt<br />
| <br />
|-<br />
| Amplifier<br />
| SignedVarInt<br />
| <br />
|-<br />
| Particles<br />
| Boolean<br />
| <br />
|-<br />
| Duration<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
Events:<br />
* 0: None<br />
* 1: Add<br />
* 2: Modify<br />
* 3: Remove<br />
<br />
==== Update Attributes ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x1D<br />
|rowspan="2"| Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Attributes<br />
| PlayerAttributes<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Inventory Transaction ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x1E<br />
|rowspan="1"| Server & Client<br />
| Transaction<br />
| Transaction<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Mob Equipment ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x1F<br />
|rowspan="5"| Server & Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Item<br />
| Item<br />
| <br />
|-<br />
| Slot<br />
| Byte<br />
| <br />
|-<br />
| Selected Slot<br />
| Byte<br />
| <br />
|-<br />
| Windows Id<br />
| Byte<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Mob Armor Equipment ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x20<br />
|rowspan="5"| Server & Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Helmet<br />
| Item<br />
| <br />
|-<br />
| Chestplate<br />
| Item<br />
| <br />
|-<br />
| Leggings<br />
| Item<br />
| <br />
|-<br />
| Boots<br />
| Item<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Interact ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x21<br />
|rowspan="2"| Server & Client<br />
| Action ID<br />
| Byte<br />
| <br />
|-<br />
| Target Runtime Entity ID<br />
| VarLong<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Block Pick Request ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x22<br />
|rowspan="5"| Server<br />
| Block Position X<br />
| SignedVarInt<br />
| <br />
|-<br />
| Block Position Y<br />
| SignedVarInt<br />
| <br />
|-<br />
| Block Position Z<br />
| SignedVarInt<br />
| <br />
|-<br />
| Add User Data<br />
| bool<br />
| Whether there should be NBT data in the picked block (activated by pressing Ctrl on default keyboard controls)<br />
|-<br />
| Hotbar Slot<br />
| Byte<br />
| <br />
|}<br />
<br />
The Bedrock client sends the position of the block. It expects the server to decide the block to pick and add it to the inventory or switch the hotbar slot if needed.<br />
<br />
==== Entity Pick Request ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x23<br />
|rowspan="2"| Server<br />
| Runtime Entity Id<br />
| Unsigned Long<br />
| <br />
|-<br />
| Hotbar Slot<br />
| Byte<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Player Action ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x24<br />
|rowspan="4"| Server<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Action ID<br />
| SignedVarInt<br />
| <br />
|-<br />
| Coordinates<br />
| BlockCoordinates<br />
| <br />
|-<br />
| Face<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Entity Fall ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x25<br />
|rowspan="3"| Server<br />
| Runtime Entity Id<br />
| VarLong<br />
| <br />
|-<br />
| Fall Distance<br />
| Float<br />
| <br />
|-<br />
| In Void<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Hurt Armor ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x26<br />
|rowspan="1"| Client<br />
| Health<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Entity Data ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x27<br />
|rowspan="2"| Server & Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Metadata<br />
| MetadataDictionary<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Entity Motion ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x28<br />
|rowspan="4"| Server & Client<br />
| Runtime Entity Id<br />
| VarLong<br />
| <br />
|-<br />
| Motion X<br />
| Vector3<br />
| <br />
|-<br />
| Motion Y<br />
| Float<br />
| <br />
|-<br />
| Motion Z<br />
| Float<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Entity Link ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x29<br />
|rowspan="4"| Client<br />
| Ridden ID<br />
| SignedVarLong<br />
| <br />
|-<br />
| Rider ID<br />
| SignedVarLong<br />
| <br />
|-<br />
| Link Type<br />
| Byte<br />
| <br />
|-<br />
| Unknown<br />
| Byte<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Health ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x2A<br />
|rowspan="1"| Client<br />
| Health<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Spawn Position ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x2B<br />
|rowspan="3"| Client<br />
| Spawn Type<br />
| SignedVarInt<br />
| <br />
|-<br />
| Coordinates<br />
| BlockCoordinates<br />
| <br />
|-<br />
| Forced<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Animate ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x2C<br />
|rowspan="2"| Server & Client<br />
| Action ID<br />
| SignedVarInt<br />
| <br />
|-<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Respawn ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x2D<br />
|rowspan="3"| Server & Client<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| Runtime Entity Id<br />
| Byte<br />
| <br />
|-<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|}<br />
<br />
==== Container Open ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x2E<br />
|rowspan="4"| Client<br />
| Window Id<br />
| Byte<br />
| <br />
|-<br />
| Type<br />
| Byte<br />
| <br />
|-<br />
| Block Position<br />
| BlockCoordinates<br />
| <br />
|-<br />
| Unique Entity Id<br />
| SignedVarLong<br />
| <br />
|}<br />
<br />
Bedrock needs either a valid block position, with an actual block at that position, or an entity ID for this to work. The entity must have CONTAINER_BASE_SIZE metadata, or the block must be a container. The entity ID is used for minecart chests etc. but any entity will work. If the entity has NAMETAG metadata this will be used as the container name.<br />
<br />
==== Container Close ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x2F<br />
|rowspan="1"| Server & Client<br />
| Window Id<br />
| Byte<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Player Hotbar ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x30<br />
|rowspan="3"| Server & Client<br />
| Selected Hotbar Slot<br />
| VarInt<br />
| <br />
|-<br />
| Container Id<br />
| Byte<br />
| <br />
|-<br />
| Select Hotbar Slot<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Inventory Content ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x31<br />
|rowspan="2"| Server & Client<br />
| Inventory Id<br />
| VarInt<br />
| <br />
|-<br />
| Input<br />
| ItemStacks<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Inventory Slot ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x32<br />
|rowspan="3"| Server & Client<br />
| Inventory Id<br />
| VarInt<br />
| <br />
|-<br />
| Slot<br />
| VarInt<br />
| <br />
|-<br />
| Item<br />
| Item<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Container Set Data ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x33<br />
|rowspan="3"| Client<br />
| Window Id<br />
| Byte<br />
| <br />
|-<br />
| Property<br />
| SignedVarInt<br />
| <br />
|-<br />
| Value<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Crafting Data ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x34<br />
|rowspan="4"| Client<br />
| Recipes<br />
| Recipes<br />
| <br />
|-<br />
| Potion type recipes<br />
| PotionTypeRecipe[]<br />
| <br />
|-<br />
| potion container recipes<br />
| PotionContainerChangeRecipe[]<br />
| <br />
|-<br />
| Is Clean<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Crafting Event ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x35<br />
|rowspan="5"| Server & Client<br />
| Window ID<br />
| Byte<br />
| <br />
|-<br />
| Recipe Type<br />
| SignedVarInt<br />
| <br />
|-<br />
| Recipe ID<br />
| UUID<br />
| <br />
|-<br />
| Input<br />
| ItemStacks<br />
| <br />
|-<br />
| Result<br />
| ItemStacks<br />
| <br />
|}<br />
<br />
<br />
<br />
==== GUI Data Pick Item ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x36<br />
|rowspan="1"| Client<br />
|-<br />
| Item name<br />
| String<br />
| The name of the item that shows up in the top part of the popup that shows up when selecting an item. It is shown as if an item was selected by the player itself.<br />
|-<br />
| Item effects<br />
| String<br />
| The line under the Item name, where the effects of the item are usually situated.<br />
|-<br />
| Hotbar Slot<br />
| int<br />
| The hot bar slot to be selected/picked. This does not currently work, so it does not matter what number this is.<br />
|}<br />
<br />
Sent by the server to make the client 'select' a hotbar slot. It currently appears to be broken however, and does not actually set the selected slot to the hotbar slot set in the packet.<br />
<br />
==== Adventure Settings ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="6"| 0x37<br />
|rowspan="6"| Server & Client<br />
| Flags<br />
| VarInt<br />
| <br />
|-<br />
| Command permission<br />
| VarInt<br />
| <br />
|-<br />
| Action permissions<br />
| VarInt<br />
| <br />
|-<br />
| Permission level<br />
| VarInt<br />
| <br />
|-<br />
| Custom stored permissions<br />
| VarInt<br />
| <br />
|-<br />
| User Id<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Block Entity Data ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x38<br />
|rowspan="2"| Server & Client<br />
| Coordinates<br />
| BlockCoordinates<br />
| <br />
|-<br />
| NamedTag<br />
| NBT<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Player Input ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x39<br />
|rowspan="4"| Server<br />
| Motion X<br />
| Float<br />
| <br />
|-<br />
| Motion Z<br />
| Float<br />
| <br />
|-<br />
| Jumping<br />
| Boolean<br />
| <br />
|-<br />
| Sneaking<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Level Chunk ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x3A<br />
|rowspan="5"| Client<br />
| Chunk X<br />
| SignedVarInt<br />
| <br />
|-<br />
| Chunk Z<br />
| SignedVarInt<br />
| <br />
|-<br />
| Sub Chunk Count<br />
| VarInt<br />
| <br />
|-<br />
| Cache Enabled<br />
| Boolean<br />
| <br />
|-<br />
| Chunk Data<br />
| ByteArray<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Commands Enabled ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x3B<br />
|rowspan="1"| Client<br />
| Commands enabled<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Difficulty ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x3C<br />
|rowspan="1"| Client<br />
| Difficulty<br />
| VarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Change Dimension ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x3D<br />
|rowspan="5"| Client<br />
| Dimension<br />
| SignedVarInt<br />
| <br />
|-<br />
| Position X<br />
| Vector3<br />
| <br />
|-<br />
| Position Y<br />
| Boolean<br />
| <br />
|-<br />
| Position Z<br />
| Float<br />
| <br />
|-<br />
| Respawn<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Player Game Type ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x3E<br />
|rowspan="1"| Server & Client<br />
| Game mode<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Player List ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x3F<br />
|rowspan="1"| Client<br />
| Records<br />
| PlayerRecords<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Simple Event ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x40<br />
|rowspan="1"| Client<br />
| Event Type<br />
| Unsigned Short<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Event ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x41<br />
|rowspan="3"| Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Event data<br />
| SignedVarInt<br />
| <br />
|-<br />
| Event type<br />
| Byte<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Spawn Experience Orb ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x42<br />
|rowspan="2"| Client<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| Count<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Map Item Data ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x43<br />
|rowspan="1"| Client<br />
| MapInfo<br />
| MapInfo<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Map Info Request ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x44<br />
|rowspan="1"| Server & Client<br />
| Unique Map Id<br />
| SignedVarLong<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Request Chunk Radius ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x45<br />
|rowspan="1"| Server & Client<br />
| Chunk radius<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Chunk Radius Updated ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x46<br />
|rowspan="1"| Client<br />
| Chunk radius<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== ItemFrame Drop Item ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x47<br />
|rowspan="1"| Server & Client<br />
| Block Position<br />
| BlockCoordinates<br />
| See note below.<br />
|}<br />
<br />
According to the NukkitX Protocol, the server sends the Y coordinate divided by two, and negative if needs to be subtracted by one. Example:<br />
<br />
Int y;<br />
if (packet.getBlockPosition().getY() &gt; 0) {<br />
y = packet.getBlockPosition().getY() * 2;<br />
} else {<br />
y = (packet.getBlockPosition().getY() * -2) - 1;<br />
}<br />
<br />
==== Game Rules Changed ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x48<br />
|rowspan="1"| Client<br />
| Rules<br />
| GameRules<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Camera ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x49<br />
|rowspan="2"| Client<br />
| Camera Unique Entity Id<br />
| SignedVarLong<br />
| <br />
|-<br />
| Player Unique Entity Id<br />
| SignedVarLong<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Boss Event ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x4A<br />
|rowspan="2"| Client<br />
| Boss Entity ID<br />
| SignedVarLong<br />
| <br />
|-<br />
| Event Type<br />
| VarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Show Credits ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x4B<br />
|rowspan="2"| Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Status<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Available Commands ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x4C<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== Command Request ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x4D<br />
|rowspan="5"| Server<br />
| Command<br />
| String<br />
| <br />
|-<br />
| Command type<br />
| VarInt<br />
| <br />
|-<br />
| Unknown UUID<br />
| UUID<br />
| <br />
|-<br />
| Request ID<br />
| String<br />
| <br />
|-<br />
| Unknown<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== CommandBlock Update ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x4E<br />
|rowspan="1"| Server<br />
| Is Block<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Command Output ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x4F<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== Update Trade ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="10"| 0x50<br />
|rowspan="10"| Client<br />
| Window ID<br />
| Byte<br />
| <br />
|-<br />
| Window Type<br />
| Byte<br />
| <br />
|-<br />
| Unknown0<br />
| VarInt<br />
| <br />
|-<br />
| Unknown1<br />
| VarInt<br />
| <br />
|-<br />
| Unknown2<br />
| VarInt<br />
| <br />
|-<br />
| Is Willing<br />
| Boolean<br />
| <br />
|-<br />
| Trader Entity ID<br />
| SignedVarLong<br />
| <br />
|-<br />
| Player Entity ID<br />
| SignedVarLong<br />
| <br />
|-<br />
| Display Name<br />
| String<br />
| <br />
|-<br />
| NamedTag<br />
| NBT<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Update Equip ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x51<br />
|rowspan="5"| Client<br />
| Window ID<br />
| Byte<br />
| <br />
|-<br />
| Window Type<br />
| Byte<br />
| <br />
|-<br />
| Unknown<br />
| Byte<br />
| <br />
|-<br />
| Entity ID<br />
| SignedVarLong<br />
| <br />
|-<br />
| NamedTag<br />
| NBT<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Resource Pack Data Info ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="7"| 0x52<br />
|rowspan="7"| Client<br />
| Package ID<br />
| String<br />
| <br />
|-<br />
| Max Chunk Size<br />
| Unsigned Int<br />
| <br />
|-<br />
| Chunk Count<br />
| Unsigned Int<br />
| <br />
|-<br />
| Compressed Package Size<br />
| Unsigned Long<br />
| <br />
|-<br />
| Hash<br />
| ByteArray<br />
| <br />
|-<br />
| Is Premium<br />
| Boolean<br />
| <br />
|-<br />
| Pack Type<br />
| Byte<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Resource Pack Chunk Data ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x53<br />
|rowspan="4"| Client<br />
| Package ID<br />
| String<br />
| <br />
|-<br />
| Chunk Index<br />
| Unsigned Int<br />
| <br />
|-<br />
| Progress<br />
| Unsigned Long<br />
| <br />
|-<br />
| Payload<br />
| ByteArray<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Resource Pack Chunk Request ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x54<br />
|rowspan="2"| Server<br />
| Package ID<br />
| String<br />
| <br />
|-<br />
| Chunk Index<br />
| Unsigned Int<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Transfer ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x55<br />
|rowspan="2"| Client<br />
| Address<br />
| String<br />
| <br />
|-<br />
| Port<br />
| Unsigned Short<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Play Sound ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x56<br />
|rowspan="4"| Client<br />
| Sound name<br />
| String<br />
| <br />
|-<br />
| Sound position<br />
| Position<br />
| <br />
|-<br />
| Volume<br />
| Float<br />
| <br />
|-<br />
| Pitch<br />
| Float<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Stop Sound ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x57<br />
|rowspan="2"| Client<br />
| Sound Name<br />
| String<br />
| <br />
|-<br />
| Stopping All Sound<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Title ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x58<br />
|rowspan="5"| Client<br />
| Type<br />
| SignedVarInt<br />
| <br />
|-<br />
| Text<br />
| String<br />
| <br />
|-<br />
| Fade In Time<br />
| SignedVarInt<br />
| <br />
|-<br />
| Stay Time<br />
| SignedVarInt<br />
| <br />
|-<br />
| Fade Out Time<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Add Behavior Tree ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x59<br />
|rowspan="1"| Client<br />
| Behavior Tree Json<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Structure Block Update ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x5A<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== Show Store Offer ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x5B<br />
|rowspan="2"| Client<br />
| Offer Id<br />
| String<br />
| <br />
|-<br />
| Shown To All<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Purchase Receipt ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x5C<br />
|rowspan="1"| Server<br />
<br />
|}<br />
<br />
<br />
<br />
==== Player Skin ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x5D<br />
|rowspan="4"| Server & Client<br />
| UUID<br />
| UUID<br />
| <br />
|-<br />
| Skin<br />
| Skin<br />
| <br />
|-<br />
| Skin Name<br />
| String<br />
| <br />
|-<br />
| Old Skin Name<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Sub Client Login ====<br />
Sent when an additional player attempts to join from a split screen session. The contents of the chain data and skin data fields use the same format as the [[#Login|Login]] packet, and can be decoded the same way.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x5E<br />
|rowspan="2"| Server<br />
| Chain data<br />
| JSON array of JWT Data<br />
| Contains the display name, UUID and XUID<br />
|-<br />
| Skin data<br />
| JWT Data<br />
| <br />
|}<br />
<br />
==== Automation Client Connect ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x5F<br />
|rowspan="1"| Client<br />
| Address<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Last Hurt By ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x60<br />
|rowspan="1"| Client<br />
| Entity Type Id<br />
| VarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Book Edit ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x61<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== NPC Request ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x62<br />
|rowspan="4"| Server & Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Unknown0<br />
| Byte<br />
| <br />
|-<br />
| Unknown1<br />
| String<br />
| <br />
|-<br />
| Unknown2<br />
| Byte<br />
| <br />
|}<br />
<br />
==== Photo Transfer ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x63<br />
|rowspan="3"| Server<br />
| File name<br />
| String<br />
| <br />
|-<br />
| Image data<br />
| String<br />
| <br />
|-<br />
| Unknown2<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Model Form Request ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x64<br />
|rowspan="2"| Client<br />
| Form Id<br />
| VarInt<br />
| <br />
|-<br />
| Form Data<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Model Form Response ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x65<br />
|rowspan="2"| Server<br />
| Form Id<br />
| VarInt<br />
| <br />
|-<br />
| Form Data<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Server Settings Request ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x66<br />
|rowspan="1"| Server<br />
<br />
|}<br />
<br />
<br />
<br />
==== Server Settings Response ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x67<br />
|rowspan="2"| Client<br />
| Form Id<br />
| VarLong<br />
| <br />
|-<br />
| Form Data<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Show Profile ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x68<br />
|rowspan="1"| Client<br />
| Xuid<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Default Game Type ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x69<br />
|rowspan="1"| Client<br />
| Game mode<br />
| VarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Remove Objective ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x6A<br />
|rowspan="1"| Client<br />
| Objective Id<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Display Objective ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x6B<br />
|rowspan="5"| Client<br />
| Display Slot<br />
| String<br />
| <br />
|-<br />
| Objective Id<br />
| String<br />
| <br />
|-<br />
| Display Name<br />
| String<br />
| <br />
|-<br />
| Criteria<br />
| String<br />
| <br />
|-<br />
| Sort Order<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Score ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x6C<br />
|rowspan="1"| Client<br />
| Entries<br />
| ScoreEntries<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Lab Table ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x6D<br />
|rowspan="5"| Server & Client<br />
| Unknown Byte 0<br />
| Byte<br />
| <br />
|-<br />
| Block Entity Position X<br />
| VarInt<br />
| <br />
|-<br />
| Block Entity Position Y<br />
| VarInt<br />
| <br />
|-<br />
| Block Entity Position Z<br />
| VarInt<br />
| <br />
|-<br />
| Reaction Type<br />
| Byte<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Update Block Synced ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="6"| 0x6E<br />
|rowspan="6"| Client<br />
| Coordinates<br />
| BlockCoordinates<br />
| <br />
|-<br />
| Block Runtime ID<br />
| VarInt<br />
| <br />
|-<br />
| Block Priority<br />
| VarInt<br />
| <br />
|-<br />
| Data Layer ID<br />
| VarInt<br />
| <br />
|-<br />
| Unknown0<br />
| VarLong<br />
| <br />
|-<br />
| Unknown1<br />
| VarLong<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Move Entity Delta ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x6F<br />
|rowspan="2"| Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Flags<br />
| Unsigned Short<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Scoreboard Identity ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x70<br />
|rowspan="1"| Client<br />
| Entries<br />
| ScoreboardIdentityEntries<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Local Player As Initialized ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x71<br />
|rowspan="1"| Server<br />
| Runtime Entity Id<br />
| VarLong<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Update Soft Enum ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x72<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== Network Stack Latency ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x73<br />
|rowspan="2"| Server & Client<br />
| Timestamp<br />
| Unsigned Long<br />
| <br />
|-<br />
| Send Back<br />
| Byte<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Script Custom Event ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x75<br />
|rowspan="2"| Server & Client<br />
| Event Name<br />
| String<br />
| <br />
|-<br />
| Data<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Spawn Particle Effect ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x76<br />
|rowspan="4"| Client<br />
| Dimension Id<br />
| Byte<br />
| <br />
|-<br />
| Unique Entity Id<br />
| SignedVarLong<br />
| <br />
|-<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| Identifier<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Available Entity Identifiers ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x77<br />
|rowspan="1"| Client<br />
| NamedTag<br />
| NBT<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Level Sound Event (2) ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="6"| 0x78<br />
|rowspan="6"| Server & Client<br />
| Sound ID<br />
| Byte<br />
| <br />
|-<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| Block Id<br />
| SignedVarInt<br />
| <br />
|-<br />
| Entity Type<br />
| String<br />
| <br />
|-<br />
| Is baby mob<br />
| Boolean<br />
| <br />
|-<br />
| Is global<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Network Chunk Publisher Update ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x79<br />
|rowspan="2"| Client<br />
| Coordinates<br />
| BlockCoordinates<br />
| <br />
|-<br />
| Radius<br />
| VarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Biome Definition List ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x7A<br />
|rowspan="1"| Client<br />
| NamedTag<br />
| NBT<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Level Sound Event (3) ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="6"| 0x7B<br />
|rowspan="6"| Server & Client<br />
| Sound ID<br />
| VarInt<br />
| <br />
|-<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| Block Id<br />
| SignedVarInt<br />
| <br />
|-<br />
| Entity Type<br />
| String<br />
| <br />
|-<br />
| Is baby mob<br />
| Boolean<br />
| <br />
|-<br />
| Is global<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Level Event Generic ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x7C<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== Lectern Update ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x7D<br />
|rowspan="4"| Client<br />
| Page<br />
| Byte<br />
| <br />
|-<br />
| Total Pages<br />
| Byte<br />
| <br />
|-<br />
| Block Position<br />
| Position<br />
| <br />
|-<br />
| Dropping Book<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Video Stream Connect ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x7E<br />
|rowspan="5"| Client<br />
| Server URI<br />
| String<br />
| <br />
|-<br />
| Frame Send Frequency<br />
| Float<br />
| <br />
|-<br />
| Action<br />
| Byte<br />
| <br />
|-<br />
| Resolution X<br />
| Int<br />
| <br />
|-<br />
| Resolution Y<br />
| Int<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Client Cache Status ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x81<br />
|rowspan="1"| Server & Client<br />
| Supported<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== On Screen Texture Animation ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x82<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== Map Create Locked Copy ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x83<br />
|rowspan="2"| Client<br />
| Original Map Id<br />
| Boolean<br />
| <br />
|-<br />
| New Map Id<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Structure Template Data Export Request ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x84<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== Structure Template Data Export Response ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x85<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== Update Block Properties ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x86<br />
|rowspan="2"| Client<br />
| Unknown<br />
| Byte<br />
| <br />
|-<br />
| NamedTag<br />
| NBT<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Client Cache Blob Status ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x87<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== Client Cache Miss Response ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x88<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== Network Settings ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x8F<br />
|rowspan="2"| Client<br />
| Unknown<br />
| Byte<br />
| <br />
|-<br />
| Compression threshold<br />
| Short<br />
| <br />
|}<br />
<br />
[[Category:Bedrock Minecraft]]</div>Orladoghttps://wiki.vg/index.php?title=Protocol&diff=15876Protocol2020-06-23T15:23:51Z<p>Orladog: Fix typo</p>
<hr />
<div>{{Box<br />
|BORDER = #9999FF<br />
|BACKGROUND = #99CCFF<br />
|WIDTH = 100%<br />
|ICON = <br />
|HEADING = Heads up!<br />
|CONTENT = This article is about the protocol for the latest '''stable''' release of Minecraft '''Java Edition''' ([[Protocol version numbers|1.15.2, protocol 578]]). For the Java Edition pre-releases, see [[Pre-release protocol]]. For the incomplete Bedrock Edition docs, see [[Bedrock Protocol]]. For the old Pocket Edition, see [[Pocket Edition Protocol Documentation]].<br />
}}<br />
<br />
This page presents a dissection of the current '''[https://minecraft.net/ Minecraft] protocol'''.<br />
<br />
If you're having trouble, check out the [[Protocol FAQ|FAQ]] or ask for help in the IRC channel [ircs://chat.freenode.net:6697/mcdevs #mcdevs on chat.freenode.net] ([http://wiki.vg/MCDevs More Information]).<br />
<br />
'''Note:''' While you may use the contents of this page without restriction to create servers, clients, bots, etc… you still need to provide attribution to #mcdevs if you copy any of the contents of this page for publication elsewhere.<br />
<br />
The changes between versions may be viewed at [[Protocol History]].<br />
<br />
== Definitions ==<br />
<br />
The Minecraft server accepts connections from TCP clients and communicates with them using ''packets''. A packet is a sequence of bytes sent over the TCP connection. The meaning of a packet depends both on its packet ID and the current state of the connection. The initial state of each connection is [[#Handshaking|Handshaking]], and state is switched using the packets [[#Handshake|Handshake]] and [[#Login Success|Login Success]].<br />
<br />
=== Data types ===<br />
<br />
{{:Data types}} <!-- Transcluded contents of Data types article in here — go to that page if you want to edit it --><br />
<br />
=== Other definitions ===<br />
<br />
{| class="wikitable"<br />
|-<br />
! Term<br />
! Definition<br />
|-<br />
| Player<br />
| When used in the singular, Player always refers to the client connected to the server.<br />
|-<br />
| Entity<br />
| Entity refers to any item, player, mob, minecart or boat etc. See {{Minecraft Wiki|Entity|the Minecraft Wiki article}} for a full list.<br />
|-<br />
| EID<br />
| An EID — or Entity ID — is a 4-byte sequence used to identify a specific entity. An entity's EID is unique on the entire server.<br />
|-<br />
| XYZ<br />
| In this document, the axis names are the same as those shown in the debug screen (F3). Y points upwards, X points east, and Z points south.<br />
|-<br />
| Meter<br />
| The meter is Minecraft's base unit of length, equal to the length of a vertex of a solid block. The term “block” may be used to mean “meter” or “cubic meter”.<br />
|-<br />
| Global palette<br />
| A table/dictionary/palette mapping nonnegative integers to block states. Block state IDs are created in a linear fashion based off of order of assignment. One block state ID allocated for each unique block state for a block; if a block has multiple properties then the number of allocated states is the product of the number of values for each property. A current list of properties and state ID ranges is found on [https://pokechu22.github.io/Burger/1.15.2.html burger].<br />
<br />
Alternatively, the vanilla server now includes an option to export the current block state ID mapping, by running <code>java -cp minecraft_server.jar net.minecraft.data.Main --reports</code>. See [[Data Generators]] for more information.<br />
|-<br />
| Notchian<br />
| The official implementation of vanilla Minecraft as developed and released by Mojang.<br />
|}<br />
<br />
== Packet format ==<br />
<br />
=== Without compression ===<br />
<br />
{| class="wikitable"<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| Length<br />
| VarInt<br />
| Length of Packet ID + Data<br />
|-<br />
| Packet ID<br />
| VarInt<br />
| <br />
|-<br />
| Data<br />
| Byte Array<br />
| Depends on the connection state and packet ID, see the sections below<br />
|}<br />
<br />
=== With compression ===<br />
<br />
Once a [[#Set Compression|Set Compression]] packet (with a non-negative threshold) is sent, [[wikipedia:Zlib|zlib]] compression is enabled for all following packets. The format of a packet changes slighty to include the size of the uncompressed packet.<br />
<br />
{| class=wikitable<br />
! Compressed?<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| No<br />
| Packet Length<br />
| VarInt<br />
| Length of Data Length + compressed length of (Packet ID + Data)<br />
|-<br />
| No<br />
| Data Length<br />
| VarInt<br />
| Length of uncompressed (Packet ID + Data) or 0<br />
|-<br />
|rowspan="2"| Yes<br />
| Packet ID<br />
| VarInt<br />
| zlib compressed packet ID (see the sections below)<br />
|-<br />
| Data<br />
| Byte Array<br />
| zlib compressed packet data (see the sections below)<br />
|}<br />
<br />
The length given by the Packet Length field is the number of bytes that remain in that packet, including the Data Length field.<br />
<br />
If Data Length is set to zero, then the packet is uncompressed; otherwise it is the size of the uncompressed packet.<br />
<br />
If compressed, the uncompressed length of (Packet ID + Data) must be equal to or over the threshold set in the packet [[#Set Compression|Set Compression]], otherwise the receiving party will disconnect.<br />
<br />
Compression can be disabled by sending the packet [[#Set Compression|Set Compression]] with a negative Threshold, or not sending the Set Compression packet at all.<br />
<br />
== Handshaking ==<br />
<br />
=== Clientbound ===<br />
<br />
There are no clientbound packets in the Handshaking state, since the protocol immediately switches to a different state after the client sends the first packet.<br />
<br />
=== Serverbound ===<br />
<br />
==== Handshake ====<br />
<br />
This causes the server to switch into the target state.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x00<br />
|rowspan="4"| Handshaking<br />
|rowspan="4"| Server<br />
| Protocol Version<br />
| VarInt<br />
| See [[protocol version numbers]] (currently 578 in Minecraft 1.15.2)<br />
|-<br />
| Server Address<br />
| String (255)<br />
| Hostname or IP, e.g. localhost or 127.0.0.1, that was used to connect. The Notchian server does not use this information. Note that SRV records are a complete redirect, e.g. if _minecraft._tcp.example.com points to mc.example.org, users connecting to example.com will provide mc.example.org as server address in addition to connecting to it.<br />
|- <br />
| Server Port<br />
| Unsigned Short<br />
| Default is 25565. The Notchian server does not use this information.<br />
|-<br />
| Next State<br />
| VarInt Enum<br />
| 1 for [[#Status|status]], 2 for [[#Login|login]]<br />
|}<br />
<br />
==== Legacy Server List Ping ====<br />
<br />
{{Warning|This packet uses a nonstandard format. It is never length-prefixed, and the packet ID is an Unsigned Byte instead of a VarInt.}}<br />
<br />
While not technically part of the current protocol, legacy clients may send this packet to initiate [[Server List Ping]], and modern servers should handle it correctly.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0xFE<br />
| Handshaking<br />
| Server<br />
| Payload<br />
| Unsigned Byte<br />
| always 1 (<code>0x01</code>)<br />
|}<br />
<br />
See [[Server List Ping#1.6]] for the details of the protocol that follows this packet.<br />
<br />
== Status ==<br />
{{Main|Server List Ping}}<br />
<br />
=== Clientbound ===<br />
<br />
==== Response ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x00<br />
|rowspan="2"| Status<br />
|rowspan="2"| Client<br />
| JSON Length<br />
| VarInt<br />
|-<br />
| JSON Response<br />
| String (32767)<br />
| See [[Server List Ping#Response]]<br />
|}<br />
<br />
==== Pong ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x01<br />
|rowspan="1"| Status<br />
|rowspan="1"| Client<br />
| Payload<br />
| Long<br />
| Should be the same as sent by the client<br />
|}<br />
<br />
=== Serverbound ===<br />
<br />
==== Request ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x00<br />
| Status<br />
| Server<br />
|colspan="3"| ''no fields''<br />
|}<br />
<br />
==== Ping ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x01<br />
|rowspan="1"| Status<br />
|rowspan="1"| Server<br />
| Payload<br />
| Long<br />
| May be any number. Notchian clients use a system-dependent time value which is counted in milliseconds.<br />
|}<br />
<br />
== Login ==<br />
<br />
The login process is as follows:<br />
<br />
# C→S: [[#Handshake|Handshake]] with Next State set to 2 (login)<br />
# C→S: [[#Login Start|Login Start]]<br />
# S→C: [[#Encryption Request|Encryption Request]]<br />
# Client auth<br />
# C→S: [[#Encryption Response|Encryption Response]]<br />
# Server auth, both enable encryption<br />
# S→C: [[#Set Compression|Set Compression]] (optional)<br />
# S→C: [[#Login Success|Login Success]]<br />
<br />
Set Compression, if present, must be sent before Login Success. Note that anything sent after Set Compression must use the [[#With_compression|Post Compression packet format]].<br />
<br />
For unauthenticated ("cracked"/offline-mode) and localhost connections (either of the two conditions is enough for an unencrypted connection) there is no encryption. In that case [[#Login Start|Login Start]] is directly followed by [[#Login Success|Login Success]].<br />
<br />
See [[Protocol Encryption]] for details.<br />
<br />
=== Clientbound ===<br />
<br />
==== Disconnect (login) ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x00<br />
|rowspan="1"| Login<br />
|rowspan="1"| Client<br />
| Reason<br />
| [[Chat]]<br />
| <br />
|}<br />
<br />
==== Encryption Request ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x01<br />
|rowspan="5"| Login<br />
|rowspan="5"| Client<br />
| Server ID<br />
| String (20)<br />
| Appears to be empty<br />
|-<br />
| Public Key Length<br />
| VarInt<br />
| Length of Public Key<br />
|-<br />
| Public Key<br />
| Byte Array<br />
| <br />
|-<br />
| Verify Token Length<br />
| VarInt<br />
| Length of Verify Token. Always 4 for Notchian servers.<br />
|-<br />
| Verify Token<br />
| Byte Array<br />
| A sequence of random bytes generated by the server<br />
|}<br />
<br />
See [[Protocol Encryption]] for details.<br />
<br />
==== Login Success ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x02<br />
|rowspan="2"| Login<br />
|rowspan="2"| Client<br />
| UUID<br />
| String (36)<br />
| Unlike in other packets, this field contains the UUID as a string with hyphens.<br />
|-<br />
| Username<br />
| String (16)<br />
| <br />
|}<br />
<br />
This packet switches the connection state to [[#Play|play]].<br />
<br />
{{Warning2|The (notchian) server might take a bit to fully transition to the Play state, so it's recommended to wait before sendings Play packets, either by setting a timeout, or waiting for Play packets from the server (usually [[#Player Info|Player Info]]).<br />
<br />
The notchian client doesn't send any (non-[[#Keep Alive|keep alive]]) packets until the next tick/[[#Time Update|time update]] packet.<br />
}}<br />
<br />
==== Set Compression ====<br />
<br />
Enables compression. If compression is enabled, all following packets are encoded in the [[#With compression|compressed packet format]]. Negative or zero values will disable compression, meaning the packet format should remain in the [[#Without compression|uncompressed packet format]]. However, this packet is entirely optional, and if not sent, compression will also not be enabled (the notchian server does not send the packet when compression is disabled).<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x03<br />
|rowspan="1"| Login<br />
|rowspan="1"| Client<br />
| Threshold<br />
| VarInt<br />
| Maximum size of a packet before it is compressed<br />
|}<br />
<br />
==== Login Plugin Request ====<br />
<br />
Used to implement a custom handshaking flow together with [[#Login_Plugin_Response | Login Plugin Response]].<br />
<br />
Unlike plugin messages in "play" mode, these messages follow a lock-step request/response scheme, where the client is expected to respond to a request indicating whether it understood. The notchian client always responds that it hasn't understood, and sends an empty payload.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x04<br />
|rowspan="3"| Login<br />
|rowspan="3"| Client<br />
| Message ID<br />
| VarInt<br />
| Generated by the server - should be unique to the connection.<br />
|-<br />
| Channel<br />
| Identifier<br />
| Name of the [[plugin channel]] used to send the data<br />
|-<br />
| Data<br />
| Byte Array<br />
| Any data, depending on the channel. The length of this array must be inferred from the packet length.<br />
|}<br />
<br />
=== Serverbound ===<br />
<br />
==== Login Start ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x00<br />
|rowspan="1"| Login<br />
|rowspan="1"| Server<br />
| Name<br />
| String (16)<br />
| Player's Username<br />
|}<br />
<br />
==== Encryption Response ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x01<br />
|rowspan="4"| Login<br />
|rowspan="4"| Server<br />
| Shared Secret Length<br />
| VarInt<br />
| Length of Shared Secret<br />
|-<br />
| Shared Secret<br />
| Byte Array<br />
| <br />
|-<br />
| Verify Token Length<br />
| VarInt<br />
| Length of Verify Token<br />
|-<br />
| Verify Token<br />
| Byte Array<br />
| <br />
|}<br />
<br />
See [[Protocol Encryption]] for details.<br />
<br />
==== Login Plugin Response ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x02<br />
|rowspan="3"| Login<br />
|rowspan="3"| Server<br />
| Message ID<br />
| VarInt<br />
| Should match ID from server.<br />
|-<br />
| Successful<br />
| Boolean<br />
| <code>true</code> if the client understands the request, <code>false</code> otherwise. When <code>false</code>, no payload follows.<br />
|-<br />
| Data<br />
| Optional Byte Array<br />
| Any data, depending on the channel. The length of this array must be inferred from the packet length.<br />
|}<br />
<br />
== Play ==<br />
<br />
=== Clientbound ===<br />
<br />
==== Spawn Entity ====<br />
<br />
Sent by the server when a vehicle or other non-living entity is created.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="12"| 0x00<br />
|rowspan="12"| Play<br />
|rowspan="12"| Client<br />
| Entity ID<br />
| VarInt<br />
| EID of the entity<br />
|-<br />
| Object UUID<br />
| UUID<br />
| <br />
|-<br />
| Type<br />
| VarInt<br />
| The type of entity (same as in [[#Spawn Living Entity|Spawn Living Entity]])<br />
|-<br />
| X<br />
| Double<br />
| <br />
|-<br />
| Y<br />
| Double<br />
| <br />
|-<br />
| Z<br />
| Double<br />
| <br />
|-<br />
| Pitch<br />
| Angle<br />
| <br />
|-<br />
| Yaw<br />
| Angle<br />
| <br />
|-<br />
| Data<br />
| Int<br />
| Meaning dependent on the value of the Type field, see [[Object Data]] for details.<br />
|-<br />
| Velocity X<br />
| Short<br />
|rowspan="3"| Same units as [[#Entity Velocity|Entity Velocity]]. Always sent, but only used when Data is greater than 0 (except for some entities which always ignore it; see [[Object Data]] for details).<br />
|-<br />
| Velocity Y<br />
| Short<br />
|-<br />
| Velocity Z<br />
| Short<br />
|}<br />
<br />
==== Spawn Experience Orb ====<br />
<br />
Spawns one or more experience orbs.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x01<br />
|rowspan="5"| Play<br />
|rowspan="5"| Client<br />
| Entity ID<br />
| VarInt<br />
| <br />
|-<br />
| X<br />
| Double<br />
| <br />
|-<br />
| Y<br />
| Double<br />
| <br />
|-<br />
| Z<br />
| Double<br />
| <br />
|-<br />
| Count<br />
| Short<br />
| The amount of experience this orb will reward once collected<br />
|}<br />
<br />
==== Spawn Weather Entity ====<br />
<br />
With this packet, the server notifies the client of thunderbolts striking within a 512 block radius around the player. The coordinates specify where exactly the thunderbolt strikes.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x02<br />
|rowspan="5"| Play<br />
|rowspan="5"| Client<br />
| Entity ID<br />
| VarInt<br />
| The EID of the thunderbolt<br />
|-<br />
| Type<br />
| Byte Enum<br />
| The global entity type, currently always 1 for thunderbolt<br />
|-<br />
| X<br />
| Double<br />
| <br />
|-<br />
| Y<br />
| Double<br />
| <br />
|-<br />
| Z<br />
| Double<br />
| <br />
|}<br />
<br />
==== Spawn Living Entity ====<br />
<br />
Sent by the server when a living entity is spawned.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="12"| 0x03<br />
|rowspan="12"| Play<br />
|rowspan="12"| Client<br />
| Entity ID<br />
| VarInt<br />
| <br />
|-<br />
| Entity UUID<br />
| UUID<br />
| <br />
|-<br />
| Type<br />
| VarInt<br />
| The type of mob. See [[Entities#Mobs]]<br />
|-<br />
| X<br />
| Double<br />
| <br />
|-<br />
| Y<br />
| Double<br />
| <br />
|-<br />
| Z<br />
| Double<br />
| <br />
|-<br />
| Yaw<br />
| Angle<br />
| <br />
|-<br />
| Pitch<br />
| Angle<br />
| <br />
|-<br />
| Head Pitch<br />
| Angle<br />
| <br />
|-<br />
| Velocity X<br />
| Short<br />
| Same units as [[#Entity Velocity|Entity Velocity]]<br />
|-<br />
| Velocity Y<br />
| Short<br />
| Same units as [[#Entity Velocity|Entity Velocity]]<br />
|-<br />
| Velocity Z<br />
| Short<br />
| Same units as [[#Entity Velocity|Entity Velocity]]<br />
|}<br />
<br />
==== Spawn Painting ====<br />
<br />
This packet shows location, name, and type of painting.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x04<br />
|rowspan="5"| Play<br />
|rowspan="5"| Client<br />
| Entity ID<br />
| VarInt<br />
| <br />
|-<br />
| Entity UUID<br />
| UUID<br />
| <br />
|-<br />
| Motive<br />
| VarInt<br />
| Panting's ID, see below<br />
|-<br />
| Location<br />
| Position<br />
| Center coordinates (see below)<br />
|-<br />
| Direction<br />
| Byte Enum<br />
| Direction the painting faces (North = 2, South = 0, West = 1, East = 3)<br />
|}<br />
<br />
Calculating the center of an image: given a (width × height) grid of cells, with <code>(0, 0)</code> being the top left corner, the center is <code>(max(0, width / 2 - 1), height / 2)</code>. E.g. <code>(1, 0)</code> for a 2×1 painting, or <code>(1, 2)</code> for a 4×4 painting.<br />
<br />
List of paintings by coordinates in <code>paintings_kristoffer_zetterstrand.png</code> (where x and y are in pixels from the top left and width and height are in pixels or 16ths of a block):<br />
<br />
{| class="wikitable"<br />
! Name<br />
! ID<br />
! x<br />
! y<br />
! width<br />
! height<br />
|-<br />
| <code>minecraft:kebab</code><br />
| 0<br />
| 0<br />
| 0<br />
| 16<br />
| 16<br />
|-<br />
| <code>minecraft:aztec</code><br />
| 1<br />
| 16<br />
| 0<br />
| 16<br />
| 16<br />
|-<br />
| <code>minecraft:alban</code><br />
| 2<br />
| 32<br />
| 0<br />
| 16<br />
| 16<br />
|-<br />
| <code>minecraft:aztec2</code><br />
| 3<br />
| 48<br />
| 0<br />
| 16<br />
| 16<br />
|-<br />
| <code>minecraft:bomb</code><br />
| 4<br />
| 64<br />
| 0<br />
| 16<br />
| 16<br />
|-<br />
| <code>minecraft:plant</code><br />
| 5<br />
| 80<br />
| 0<br />
| 16<br />
| 16<br />
|-<br />
| <code>minecraft:wasteland</code><br />
| 6<br />
| 96<br />
| 0<br />
| 16<br />
| 16<br />
|-<br />
| <code>minecraft:pool</code><br />
| 7<br />
| 0<br />
| 32<br />
| 32<br />
| 16<br />
|-<br />
| <code>minecraft:courbet</code><br />
| 8<br />
| 32<br />
| 32<br />
| 32<br />
| 16<br />
|-<br />
| <code>minecraft:sea</code><br />
| 9<br />
| 64<br />
| 32<br />
| 32<br />
| 16<br />
|-<br />
| <code>minecraft:sunset</code><br />
| 10<br />
| 96<br />
| 32<br />
| 32<br />
| 16<br />
|-<br />
| <code>minecraft:creebet</code><br />
| 11<br />
| 128<br />
| 32<br />
| 32<br />
| 16<br />
|-<br />
| <code>minecraft:wanderer</code><br />
| 12<br />
| 0<br />
| 64<br />
| 16<br />
| 32<br />
|-<br />
| <code>minecraft:graham</code><br />
| 13<br />
| 16<br />
| 64<br />
| 16<br />
| 32<br />
|-<br />
| <code>minecraft:match</code><br />
| 14<br />
| 0<br />
| 128<br />
| 32<br />
| 32<br />
|-<br />
| <code>minecraft:bust</code><br />
| 15<br />
| 32<br />
| 128<br />
| 32<br />
| 32<br />
|-<br />
| <code>minecraft:stage</code><br />
| 16<br />
| 64<br />
| 128<br />
| 32<br />
| 32<br />
|-<br />
| <code>minecraft:void</code><br />
| 17<br />
| 96<br />
| 128<br />
| 32<br />
| 32<br />
|-<br />
| <code>skull_and_roses</code><br />
| 18<br />
| 128<br />
| 128<br />
| 32<br />
| 32<br />
|-<br />
| <code>minecraft:wither</code><br />
| 19<br />
| 160<br />
| 128<br />
| 32<br />
| 32<br />
|-<br />
| <code>minecraft:fighters</code><br />
| 20<br />
| 0<br />
| 96<br />
| 64<br />
| 32<br />
|-<br />
| <code>minecraft:pointer</code><br />
| 21<br />
| 0<br />
| 192<br />
| 64<br />
| 64<br />
|-<br />
| <code>minecraft:pigscene</code><br />
| 22<br />
| 64<br />
| 192<br />
| 64<br />
| 64<br />
|-<br />
| <code>minecraft:burning_skull</code><br />
| 23<br />
| 128<br />
| 192<br />
| 64<br />
| 64<br />
|-<br />
| <code>minecraft:skeleton</code><br />
| 24<br />
| 192<br />
| 64<br />
| 64<br />
| 48<br />
|-<br />
| <code>minecraft:donkey_kong</code><br />
| 25<br />
| 192<br />
| 112<br />
| 64<br />
| 48<br />
|}<br />
<br />
The {{Minecraft Wiki|Painting#Canvases|Minecraft Wiki article on paintings}} also provides a list of painting names to the actual images.<br />
<br />
==== Spawn Player ====<br />
<br />
This packet is sent by the server when a player comes into visible range, ''not'' when a player joins.<br />
<br />
This packet must be sent after the [[#Player Info|Player Info]] packet that adds the player data for the client to use when spawning a player. If the Player Info for the player spawned by this packet is not present when this packet arrives, Notchian clients will not spawn the player entity. The Player Info packet includes skin/cape data.<br />
<br />
Servers can, however, safely spawn player entities for players not in visible range. The client appears to handle it correctly.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="7"| 0x05<br />
|rowspan="7"| Play<br />
|rowspan="7"| Client<br />
| Entity ID<br />
| VarInt<br />
| Player's EID<br />
|-<br />
| Player UUID<br />
| UUID<br />
| See below for notes on {{Minecraft Wiki|Server.properties#online-mode|offline mode}} and NPCs<br />
|-<br />
| X<br />
| Double<br />
| <br />
|-<br />
| Y<br />
| Double<br />
| <br />
|-<br />
| Z<br />
| Double<br />
| <br />
|-<br />
| Yaw<br />
| Angle<br />
| <br />
|-<br />
| Pitch<br />
| Angle<br />
| <br />
|}<br />
<br />
When in {{Minecraft Wiki|Server.properties#online-mode|online mode}}, the UUIDs must be valid and have valid skin blobs.<br />
<br />
In offline mode, [[Wikipedia:Universally unique identifier#Versions 3 and 5 (namespace name-based)|UUID v3]] is used with the String <code>OfflinePlayer:&lt;player name&gt;</code>, encoded in UTF-8 (and case-sensitive).<br />
<br />
For NPCs UUID v2 should be used. Note:<br />
<br />
<+Grum> i will never confirm this as a feature you know that :)<br />
<br />
In an example UUID, <code>xxxxxxxx-xxxx-Yxxx-xxxx-xxxxxxxxxxxx</code>, the UUID version is specified by <code>Y</code>. So, for UUID v3, <code>Y</code> will always be <code>3</code>, and for UUID v2, <code>Y</code> will always be <code>2</code>.<br />
<br />
==== Entity Animation (clientbound) ====<br />
<br />
Sent whenever an entity should change animation.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x06<br />
|rowspan="2"| Play<br />
|rowspan="2"| Client<br />
| Entity ID<br />
| VarInt<br />
| Player ID<br />
|-<br />
| Animation<br />
| Unsigned Byte<br />
| Animation ID (see below)<br />
|}<br />
<br />
Animation can be one of the following values:<br />
<br />
{| class="wikitable"<br />
! ID<br />
! Animation<br />
|-<br />
| 0<br />
| Swing main arm<br />
|-<br />
| 1<br />
| Take damage<br />
|-<br />
| 2<br />
| Leave bed<br />
|-<br />
| 3<br />
| Swing offhand<br />
|-<br />
| 4<br />
| Critical effect<br />
|-<br />
| 5<br />
| Magic critical effect<br />
|}<br />
<br />
==== Statistics ====<br />
<br />
Sent as a response to [[#Client_Status|Client Status 0x04]] (id 1).<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To <br />
!colspan="2"| Field Name<br />
!colspan="2"| Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x07<br />
|rowspan="4"| Play<br />
|rowspan="4"| Client<br />
|colspan="2"| Count<br />
|colspan="2"| VarInt<br />
| Number of elements in the following array<br />
|-<br />
|rowspan="2"| Statistic<br />
| Category ID<br />
|rowspan="2"| Array<br />
| VarInt<br />
| See below<br />
|-<br />
| Statistic ID<br />
| VarInt<br />
| See below<br />
|-<br />
|colspan="2"| Value<br />
|colspan="2"| VarInt<br />
| The amount to set it to<br />
|}<br />
<br />
Categories (these are namespaced, but with <code>:</code> replaced with <code>.</code>):<br />
<br />
{| class="wikitable"<br />
! Name<br />
! ID<br />
! Registry<br />
|-<br />
| <code>minecraft.mined</code><br />
| 0<br />
| Blocks<br />
|-<br />
| <code>minecraft.crafted</code><br />
| 1<br />
| Items<br />
|-<br />
| <code>minecraft.used</code><br />
| 2<br />
| Items<br />
|-<br />
| <code>minecraft.broken</code><br />
| 3<br />
| Items<br />
|-<br />
| <code>minecraft.picked_up</code><br />
| 4<br />
| Items<br />
|-<br />
| <code>minecraft.dropped</code><br />
| 5<br />
| Items<br />
|-<br />
| <code>minecraft.killed</code><br />
| 6<br />
| Entities<br />
|-<br />
| <code>minecraft.killed_by</code><br />
| 7<br />
| Entities<br />
|-<br />
| <code>minecraft.custom</code><br />
| 8<br />
| Custom<br />
|}<br />
<br />
Blocks, Items, and Entities use block (not block state), item, and entity ids.<br />
<br />
Custom has the following (unit only matters for clients):<br />
<br />
{| class="wikitable"<br />
! Name<br />
! ID<br />
! Unit<br />
|-<br />
| <code>minecraft.leave_game</code><br />
| 0<br />
| None<br />
|-<br />
| <code>minecraft.play_one_minute</code><br />
| 1<br />
| Time<br />
|-<br />
| <code>minecraft.time_since_death</code><br />
| 2<br />
| Time<br />
|-<br />
| <code>minecraft.sneak_Time</code><br />
| 3<br />
| Time<br />
|-<br />
| <code>minecraft.walk_one_cm</code><br />
| 4<br />
| Distance<br />
|-<br />
| <code>minecraft.crouch_one_cm</code><br />
| 5<br />
| Distance<br />
|-<br />
| <code>minecraft.sprint_one_cm</code><br />
| 6<br />
| Distance<br />
|-<br />
| <code>minecraft.swim_one_cm</code><br />
| 7<br />
| Distance<br />
|-<br />
| <code>minecraft.fall_one_cm</code><br />
| 8<br />
| Distance<br />
|-<br />
| <code>minecraft.climb_one_cm</code><br />
| 9<br />
| Distance<br />
|-<br />
| <code>minecraft.fly_one_cm</code><br />
| 10<br />
| Distance<br />
|-<br />
| <code>minecraft.dive_one_cm</code><br />
| 11<br />
| Distance<br />
|-<br />
| <code>minecraft.minecart_one_cm</code><br />
| 12<br />
| Distance<br />
|-<br />
| <code>minecraft.boat_one_cm</code><br />
| 13<br />
| Distance<br />
|-<br />
| <code>minecraft.pig_one_cm</code><br />
| 14<br />
| Distance<br />
|-<br />
| <code>minecraft.horse_one_cm</code><br />
| 15<br />
| Distance<br />
|-<br />
| <code>minecraft.aviate_one_cm</code><br />
| 16<br />
| Distance<br />
|-<br />
| <code>minecraft.jump</code><br />
| 17<br />
| None<br />
|-<br />
| <code>minecraft.drop</code><br />
| 18<br />
| None<br />
|-<br />
| <code>minecraft.damage_dealt</code><br />
| 19<br />
| Damage<br />
|-<br />
| <code>minecraft.damage_taken</code><br />
| 20<br />
| Damage<br />
|-<br />
| <code>minecraft.deaths</code><br />
| 21<br />
| None<br />
|-<br />
| <code>minecraft.mob_kills</code><br />
| 22<br />
| None<br />
|-<br />
| <code>minecraft.animals_bred</code><br />
| 23<br />
| None<br />
|-<br />
| <code>minecraft.player_kills</code><br />
| 24<br />
| None<br />
|-<br />
| <code>minecraft.fish_caught</code><br />
| 25<br />
| None<br />
|-<br />
| <code>minecraft.talked_to_villager</code><br />
| 26<br />
| None<br />
|-<br />
| <code>minecraft.traded_with_villager</code><br />
| 27<br />
| None<br />
|-<br />
| <code>minecraft.eat_cake_slice</code><br />
| 28<br />
| None<br />
|-<br />
| <code>minecraft.fill_cauldron</code><br />
| 29<br />
| None<br />
|-<br />
| <code>minecraft.use_cauldron</code><br />
| 30<br />
| None<br />
|-<br />
| <code>minecraft.clean_armor</code><br />
| 31<br />
| None<br />
|-<br />
| <code>minecraft.clean_banner</code><br />
| 32<br />
| None<br />
|-<br />
| <code>minecraft.interact_with_brewingstand</code><br />
| 33<br />
| None<br />
|-<br />
| <code>minecraft.interact_with_beacon</code><br />
| 34<br />
| None<br />
|-<br />
| <code>minecraft.inspect_dropper</code><br />
| 35<br />
| None<br />
|-<br />
| <code>minecraft.inspect_hopper</code><br />
| 36<br />
| None<br />
|-<br />
| <code>minecraft.inspect_dispenser</code><br />
| 37<br />
| None<br />
|-<br />
| <code>minecraft.play_noteblock</code><br />
| 38<br />
| None<br />
|-<br />
| <code>minecraft.tune_noteblock</code><br />
| 39<br />
| None<br />
|-<br />
| <code>minecraft.pot_flower</code><br />
| 40<br />
| None<br />
|-<br />
| <code>minecraft.trigger_trapped_chest</code><br />
| 41<br />
| None<br />
|-<br />
| <code>minecraft.open_enderchest</code><br />
| 42<br />
| None<br />
|-<br />
| <code>minecraft.enchant_item</code><br />
| 43<br />
| None<br />
|-<br />
| <code>minecraft.play_record</code><br />
| 44<br />
| None<br />
|-<br />
| <code>minecraft.interact_with_furnace</code><br />
| 45<br />
| None<br />
|-<br />
| <code>minecraft.interact_with_crafting_table</code><br />
| 46<br />
| None<br />
|-<br />
| <code>minecraft.open_chest</code><br />
| 47<br />
| None<br />
|-<br />
| <code>minecraft.sleep_in_bed</code><br />
| 48<br />
| None<br />
|-<br />
| <code>minecraft.open_shulker_box</code><br />
| 49<br />
| None<br />
|}<br />
<br />
Units:<br />
<br />
* None: just a normal number (formatted with 0 decimal places)<br />
* Damage: value is 10 times the normal amount<br />
* Distance: a distance in centimeters (hundredths of blocks)<br />
* Time: a time span in ticks<br />
<br />
==== Acknowledge Player Digging ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x08<br />
|rowspan="4"| Play<br />
|rowspan="4"| Client<br />
| Location<br />
| Position<br />
| Position where the digging was happening<br />
|-<br />
| Block<br />
| VarInt<br />
| Block state ID of the block that should be at that position now.<br />
|-<br />
| Status<br />
| VarInt enum<br />
| Same as Player Digging. Only Started digging (0), Cancelled digging (1), and Finished digging (2) are used.<br />
|-<br />
| Successful<br />
| Boolean<br />
| True if the digging succeeded; false if the client should undo any changes it made locally. (How does this work?)<br />
|}<br />
<br />
==== Block Break Animation ====<br />
<br />
0–9 are the displayable destroy stages and each other number means that there is no animation on this coordinate.<br />
<br />
Block break animations can still be applied on air; the animation will remain visible although there is no block being broken. However, if this is applied to a transparent block, odd graphical effects may happen, including water losing its transparency. (An effect similar to this can be seen in normal gameplay when breaking ice blocks)<br />
<br />
If you need to display several break animations at the same time you have to give each of them a unique Entity ID. The entity ID does not need to correspond to an actual entity on the client. It is valid to use a randomly generated number.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x09<br />
|rowspan="3"| Play<br />
|rowspan="3"| Client<br />
| Entity ID<br />
| VarInt<br />
| Entity ID of the entity breaking the block<br />
|-<br />
| Location<br />
| Position<br />
| Block Position<br />
|-<br />
| Destroy Stage<br />
| Byte<br />
| 0–9 to set it, any other value to remove it<br />
|}<br />
<br />
==== Block Entity Data ====<br />
<br />
Sets the block entity associated with the block at the given location.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x0A<br />
|rowspan="3"| Play<br />
|rowspan="3"| Client<br />
| Location<br />
| Position<br />
| <br />
|-<br />
| Action<br />
| Unsigned Byte<br />
| The type of update to perform, see below<br />
|-<br />
| NBT Data<br />
| [[NBT|NBT Tag]]<br />
| Data to set. May be a TAG_END (0), in which case the block entity at the given location is removed (though this is not required since the client will remove the block entity automatically on chunk unload or block removal)<br />
|}<br />
<br />
''Action'' field:<br />
<br />
* '''1''': Set data of a mob spawner (everything except for SpawnPotentials: current delay, min/max delay, mob to be spawned, spawn count, spawn range, etc.)<br />
* '''2''': Set command block text (command and last execution status)<br />
* '''3''': Set the level, primary, and secondary powers of a beacon<br />
* '''4''': Set rotation and skin of mob head<br />
* '''5''': Declare a conduit<br />
* '''6''': Set base color and patterns on a banner<br />
* '''7''': Set the data for a Structure tile entity<br />
* '''8''': Set the destination for a end gateway<br />
* '''9''': Set the text on a sign<br />
* '''10''': Unused<br />
* '''11''': Declare a bed<br />
* '''12''': Set data of a jigsaw block<br />
* '''13''': Set items in a campfire<br />
* '''14''': Behive information<br />
<br />
==== Block Action ====<br />
<br />
This packet is used for a number of actions and animations performed by blocks, usually non-persistent.<br />
<br />
See [[Block Actions]] for a list of values.<br />
<br />
{{Warning2|This packet uses a block ID, not a block state. Unfortunately, block IDs are not directly included in the output from [[Data Generators]], but can manually be calculated.}}<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x0B<br />
|rowspan="4"| Play<br />
|rowspan="4"| Client<br />
| Location<br />
| Position<br />
| Block coordinates<br />
|-<br />
| Action ID (Byte 1)<br />
| Unsigned Byte<br />
| Varies depending on block — see [[Block Actions]]<br />
|-<br />
| Action Param (Byte 2)<br />
| Unsigned Byte<br />
| Varies depending on block — see [[Block Actions]]<br />
|-<br />
| Block Type<br />
| VarInt<br />
| The block type ID for the block. This must match the block at the given coordinates.<br />
|}<br />
<br />
==== Block Change ====<br />
<br />
Fired whenever a block is changed within the render distance.<br />
<br />
{{Warning2|Changing a block in a chunk that is not loaded is not a stable action. The Notchian client currently uses a ''shared'' empty chunk which is modified for all block changes in unloaded chunks; while in 1.9 this chunk never renders in older versions the changed block will appear in all copies of the empty chunk. Servers should avoid sending block changes in unloaded chunks and clients should ignore such packets.}}<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x0C<br />
|rowspan="2"| Play<br />
|rowspan="2"| Client<br />
| Location<br />
| Position<br />
| Block Coordinates<br />
|-<br />
| Block ID<br />
| VarInt<br />
| The new block state ID for the block as given in the {{Minecraft Wiki|Data values#Block IDs|global palette}}. See that section for more information.<br />
|}<br />
<br />
==== Boss Bar ==== <br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
!colspan="2"| Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="14"| 0x0D<br />
|rowspan="14"| Play<br />
|rowspan="14"| Client<br />
|colspan="2"| UUID<br />
| UUID<br />
| Unique ID for this bar<br />
|-<br />
|colspan="2"| Action<br />
| VarInt Enum<br />
| Determines the layout of the remaining packet<br />
|-<br />
! Action<br />
! Field Name<br />
! <br />
! <br />
|-<br />
|rowspan="5"| 0: add<br />
| Title<br />
| [[Chat]]<br />
| <br />
|-<br />
| Health<br />
| Float<br />
| From 0 to 1. Values greater than 1 do not crash a Notchian client, and start [https://i.johni0702.de/nA.png rendering part of a second health bar] at around 1.5.<br />
|-<br />
| Color<br />
| VarInt Enum<br />
| Color ID (see below)<br />
|-<br />
| Division<br />
| VarInt Enum<br />
| Type of division (see below)<br />
|-<br />
| Flags<br />
| Unsigned Byte<br />
| Bit mask. 0x1: should darken sky, 0x2: is dragon bar (used to play end music), 0x04: create fog (previously was also controlled by 0x02)<br />
|-<br />
| 1: remove<br />
| ''no fields''<br />
| ''no fields''<br />
| Removes this boss bar<br />
|-<br />
| 2: update health<br />
| Health<br />
| Float<br />
| as above<br />
|-<br />
| 3: update title<br />
| Title<br />
| [[Chat]]<br />
| <br />
|-<br />
|rowspan="2"| 4: update style<br />
| Color<br />
| VarInt Enum<br />
| Color ID (see below)<br />
|-<br />
| Dividers<br />
| VarInt Enum<br />
| as above<br />
|-<br />
| 5: update flags<br />
| Flags<br />
| Unsigned Byte<br />
| as above<br />
|-<br />
|}<br />
<br />
{| class="wikitable"<br />
! ID<br />
! Color<br />
|-<br />
| 0<br />
| Pink<br />
|-<br />
| 1<br />
| Blue<br />
|-<br />
| 2<br />
| Red<br />
|-<br />
| 3<br />
| Green<br />
|-<br />
| 4<br />
| Yellow<br />
|-<br />
| 5<br />
| Purple<br />
|-<br />
| 6<br />
| White<br />
|}<br />
<br />
{| class="wikitable"<br />
! ID<br />
! Type of division<br />
|-<br />
| 0<br />
| No division<br />
|-<br />
| 1<br />
| 6 notches<br />
|-<br />
| 2<br />
| 10 notches<br />
|-<br />
| 3<br />
| 12 notches<br />
|-<br />
| 4<br />
| 20 notches<br />
|}<br />
<br />
==== Server Difficulty ====<br />
<br />
Changes the difficulty setting in the client's option menu<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x0E<br />
|rowspan="2"| Play<br />
|rowspan="2"| Client<br />
| Difficulty<br />
| Unsigned Byte<br />
| 0: peaceful, 1: easy, 2: normal, 3: hard<br />
|-<br />
| Difficulty locked?<br />
| Boolean<br />
|<br />
|}<br />
<br />
==== Chat Message (clientbound) ==== <br />
<br />
Identifying the difference between Chat/System Message is important as it helps respect the user's chat visibility options. See [[Chat#Processing chat|processing chat]] for more info about these positions.<br />
<br />
{{warning2|Game info accepts json formatting but does not display it, although the deprecated §-based formatting works. This is not an issue when using the [[#Title|Title]] packet, so prefer that packet for displaying information in that slot. See [https://bugs.mojang.com/browse/MC-119145 MC-119145] for more information.}}<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x0F<br />
|rowspan="2"| Play<br />
|rowspan="2"| Client<br />
| JSON Data<br />
| [[Chat]]<br />
| Limited to 32767 bytes<br />
|-<br />
| Position<br />
| Byte<br />
| 0: chat (chat box), 1: system message (chat box), 2: game info (above hotbar).<br />
|}<br />
<br />
==== Multi Block Change ====<br />
<br />
Fired whenever 2 or more blocks are changed within the same chunk on the same tick.<br />
<br />
{{Warning|Changing blocks in chunks not loaded by the client is unsafe (see note on [[#Block Change|Block Change]]).}}<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
!colspan="2"| Field Name<br />
!colspan="2"| Field Type<br />
! Notes<br />
|-<br />
|rowspan="6"| 0x10<br />
|rowspan="6"| Play<br />
|rowspan="6"| Client<br />
|colspan="2"| Chunk X<br />
|colspan="2"| Int<br />
| Chunk X coordinate<br />
|-<br />
|colspan="2"| Chunk Z<br />
|colspan="2"| Int<br />
| Chunk Z coordinate<br />
|-<br />
|colspan="2"| Record Count<br />
|colspan="2"| VarInt<br />
| Number of elements in the following array, i.e. the number of blocks affected<br />
|-<br />
|rowspan="3"| Record<br />
| Horizontal Position<br />
|rowspan="3"| Array<br />
| Unsigned Byte<br />
| The 4 most significant bits (<code>0xF0</code>) encode the X coordinate, relative to the chunk. The 4 least significant bits (<code>0x0F</code>) encode the Z coordinate, relative to the chunk.<br />
|-<br />
| Y Coordinate<br />
| Unsigned Byte<br />
| Y coordinate of the block<br />
|-<br />
| Block ID<br />
| VarInt<br />
| The new block state ID for the block as given in the {{Minecraft Wiki|Data values#Block IDs|global palette}}. See that section for more information.<br />
|}<br />
<br />
To decode the position into a world position:<br />
<br />
<syntaxhighlight lang="java"><br />
worldX = (horizPos >> 4 & 15) + (chunkX * 16);<br />
worldY = vertPos;<br />
worldZ = (horizPos & 15) + (chunkZ * 16);<br />
</syntaxhighlight><br />
<br />
==== Tab-Complete (clientbound) ====<br />
<br />
The server responds with a list of auto-completions of the last word sent to it. In the case of regular chat, this is a player username. Command names and parameters are also supported. The client sorts these alphabetically before listing them.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
!colspan="2"| Field Name<br />
!colspan="2"| Field Type<br />
! Notes<br />
|-<br />
|rowspan="8"| 0x11<br />
|rowspan="8"| Play<br />
|rowspan="8"| Client<br />
|-<br />
|colspan="2"| ID<br />
|colspan="2"| VarInt<br />
| Transaction ID<br />
|-<br />
|colspan="2"| Start<br />
|colspan="2"| VarInt<br />
| Start of the text to replace<br />
|-<br />
|colspan="2"| Length<br />
|colspan="2"| VarInt<br />
| Length of the text to replace<br />
|-<br />
|colspan="2"| Count<br />
|colspan="2"| VarInt<br />
| Number of elements in the following array<br />
|-<br />
|rowspan="3"| Matches<br />
| Match<br />
|rowspan="3"| Array<br />
| String (32767)<br />
| One eligible value to insert, note that each command is sent separately instead of in a single string, hence the need for Count. Note that for instance this doesn't include a leading <code>/</code> on commands.<br />
|-<br />
| Has tooltip<br />
| Boolean<br />
| True if the following is present<br />
|-<br />
| Tooltip<br />
| Optional [[Chat]]<br />
| Tooltip to display; only present if previous boolean is true<br />
|}<br />
<br />
==== Declare Commands ====<br />
<br />
Lists all of the commands on the server, and how they are parsed.<br />
<br />
This is a directed graph, with one root node. Each redirect or child node must refer only to nodes that have already been declared.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x12<br />
|rowspan="3"| Play<br />
|rowspan="3"| Client<br />
| Count<br />
| VarInt<br />
| Number of elements in the following array<br />
|-<br />
| Nodes<br />
| Array of [[Command Data|Node]]<br />
| An array of nodes<br />
|-<br />
| Root index<br />
| VarInt<br />
| Index of the <code>root</code> node in the previous array<br />
|}<br />
<br />
For more information on this packet, see the [[Command Data]] article.<br />
<br />
==== Window Confirmation (clientbound) ====<br />
<br />
A packet from the server indicating whether a request from the client was accepted, or whether there was a conflict (due to lag). If the packet was not accepted, the client must respond with a [[#Window Confirmation (serverbound)|serverbound window confirmation]] packet.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x13<br />
|rowspan="3"| Play<br />
|rowspan="3"| Client<br />
| Window ID<br />
| Byte<br />
| The ID of the window that the action occurred in<br />
|-<br />
| Action Number<br />
| Short<br />
| Every action that is to be accepted has a unique number. This number is an incrementing integer (starting at 0) with separate counts for each window ID.<br />
|-<br />
| Accepted<br />
| Boolean<br />
| Whether the action was accepted<br />
|}<br />
<br />
==== Close Window (clientbound) ====<br />
<br />
This packet is sent from the server to the client when a window is forcibly closed, such as when a chest is destroyed while it's open.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x14<br />
| Play<br />
| Client<br />
| Window ID<br />
| Unsigned Byte<br />
| This is the ID of the window that was closed. 0 for inventory.<br />
|}<br />
<br />
==== Window Items ====<br />
[[File:Inventory-slots.png|thumb|The inventory slots]]<br />
<br />
Sent by the server when items in multiple slots (in a window) are added/removed. This includes the main inventory, equipped armour and crafting slots.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x15<br />
|rowspan="3"| Play<br />
|rowspan="3"| Client<br />
| Window ID<br />
| Unsigned Byte<br />
| The ID of window which items are being sent for. 0 for player inventory.<br />
|-<br />
| Count<br />
| Short<br />
| Number of elements in the following array<br />
|-<br />
| Slot Data<br />
| Array of [[Slot Data|Slot]]<br />
| <br />
|}<br />
<br />
See [[Inventory#Windows|inventory windows]] for further information about how slots are indexed.<br />
<br />
==== Window Property ====<br />
<br />
This packet is used to inform the client that part of a GUI window should be updated.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x16<br />
|rowspan="3"| Play<br />
|rowspan="3"| Client<br />
| Window ID<br />
| Unsigned Byte<br />
| <br />
|-<br />
| Property<br />
| Short<br />
| The property to be updated, see below<br />
|-<br />
| Value<br />
| Short<br />
| The new value for the property, see below<br />
|}<br />
<br />
The meaning of the Property field depends on the type of the window. The following table shows the known combinations of window type and property, and how the value is to be interpreted.<br />
<br />
{| class="wikitable"<br />
|-<br />
! Window type<br />
! Property<br />
! Value<br />
|-<br />
|rowspan="4"| Furnace<br />
| 0: Fire icon (fuel left)<br />
| counting from fuel burn time down to 0 (in-game ticks)<br />
|-<br />
| 1: Maximum fuel burn time<br />
| fuel burn time or 0 (in-game ticks)<br />
|-<br />
| 2: Progress arrow<br />
| counting from 0 to maximum progress (in-game ticks)<br />
|-<br />
| 3: Maximum progress<br />
| always 200 on the notchian server<br />
|-<br />
|rowspan="10"| Enchantment Table<br />
| 0: Level requirement for top enchantment slot<br />
|rowspan="3"| The enchantment's xp level requirement<br />
|-<br />
| 1: Level requirement for middle enchantment slot<br />
|-<br />
| 2: Level requirement for bottom enchantment slot<br />
|-<br />
| 3: The enchantment seed<br />
| Used for drawing the enchantment names (in [[Wikipedia:Standard Galactic Alphabet|SGA]]) clientside. The same seed ''is'' used to calculate enchantments, but some of the data isn't sent to the client to prevent easily guessing the entire list (the seed value here is the regular seed bitwise and <code>0xFFFFFFF0</code>).<br />
|-<br />
| 4: Enchantment ID shown on mouse hover over top enchantment slot<br />
|rowspan="3"| The enchantment id (set to -1 to hide it), see below for values<br />
|-<br />
| 5: Enchantment ID shown on mouse hover over middle enchantment slot<br />
|-<br />
| 6: Enchantment ID shown on mouse hover over bottom enchantment slot<br />
|-<br />
| 7: Enchantment level shown on mouse hover over the top slot<br />
|rowspan="3"| The enchantment level (1 = I, 2 = II, 6 = VI, etc.), or -1 if no enchant<br />
|-<br />
| 8: Enchantment level shown on mouse hover over the middle slot<br />
|-<br />
| 9: Enchantment level shown on mouse hover over the bottom slot<br />
|-<br />
|rowspan="3"| Beacon<br />
| 0: Power level<br />
| 0-4, controls what effect buttons are enabled<br />
|-<br />
| 1: First potion effect<br />
| {{Minecraft Wiki|Data values#Status effects|Potion effect ID}} for the first effect, or -1 if no effect<br />
|-<br />
| 2: Second potion effect<br />
| {{Minecraft Wiki|Data values#Status effects|Potion effect ID}} for the second effect, or -1 if no effect<br />
|-<br />
| Anvil<br />
| 0: Repair cost<br />
| The repair's cost in xp levels<br />
|-<br />
|rowspan="2"| Brewing Stand<br />
| 0: Brew time<br />
| 0 – 400, with 400 making the arrow empty, and 0 making the arrow full<br />
|-<br />
| 1: Fuel time<br />
| 0 - 20, with 0 making the arrow empty, and 20 making the arrow full<br />
|}<br />
<br />
For an enchanting table, the following numerical IDs are used:<br />
<br />
{| class="wikitable"<br />
! Numerical ID<br />
! Enchantment ID<br />
! Enchantment Name<br />
|-<br />
| 0<br />
| minecraft:protection<br />
| Protection<br />
|-<br />
| 1<br />
| minecraft:fire_protection<br />
| Fire Protection<br />
|-<br />
| 2<br />
| minecraft:feather_falling<br />
| Feather Falling<br />
|-<br />
| 3<br />
| minecraft:blast_protection<br />
| Blast Protection<br />
|-<br />
| 4<br />
| minecraft:projectile_protection<br />
| Projectile Protection<br />
|-<br />
| 5<br />
| minecraft:respiration<br />
| Respiration<br />
|-<br />
| 6<br />
| minecraft:aqua_affinity<br />
| Aqua Affinity<br />
|-<br />
| 7<br />
| minecraft:thorns<br />
| Thorns<br />
|-<br />
| 8<br />
| minecraft:depth_strider<br />
| Depth Strider<br />
|-<br />
| 9<br />
| minecraft:frost_walker<br />
| Frost Walker<br />
|-<br />
| 10<br />
| minecraft:binding_curse<br />
| Curse of Binding<br />
|-<br />
| 11<br />
| minecraft:sharpness<br />
| Sharpness<br />
|-<br />
| 12<br />
| minecraft:smite<br />
| Smite<br />
|-<br />
| 13<br />
| minecraft:bane_of_arthropods<br />
| Bane of Arthropods<br />
|-<br />
| 14<br />
| minecraft:knockback<br />
| Knockback<br />
|-<br />
| 15<br />
| minecraft:fire_aspect<br />
| Fire Aspect<br />
|-<br />
| 16<br />
| minecraft:looting<br />
| Looting<br />
|-<br />
| 17<br />
| minecraft:sweeping<br />
| Sweeping Edge<br />
|-<br />
| 18<br />
| minecraft:efficiency<br />
| Efficiency<br />
|-<br />
| 19<br />
| minecraft:silk_touch<br />
| Silk Touch<br />
|-<br />
| 20<br />
| minecraft:unbreaking<br />
| Unbreaking<br />
|-<br />
| 21<br />
| minecraft:fortune<br />
| Fortune<br />
|-<br />
| 22<br />
| minecraft:power<br />
| Power<br />
|-<br />
| 23<br />
| minecraft:punch<br />
| Punch<br />
|-<br />
| 24<br />
| minecraft:flame<br />
| Flame<br />
|-<br />
| 25<br />
| minecraft:infinity<br />
| Infinity<br />
|-<br />
| 26<br />
| minecraft:luck_of_the_sea<br />
| Luck of the Sea<br />
|-<br />
| 27<br />
| minecraft:lure<br />
| Lure<br />
|-<br />
| 28<br />
| minecraft:loyalty<br />
| Loyalty<br />
|-<br />
| 29<br />
| minecraft:impaling<br />
| Impaling<br />
|-<br />
| 30<br />
| minecraft:riptide<br />
| Riptide<br />
|-<br />
| 31<br />
| minecraft:channeling<br />
| Channeling<br />
|-<br />
| 32<br />
| minecraft:mending<br />
| Mending<br />
|-<br />
| 33<br />
| minecraft:vanishing_curse<br />
| Curse of Vanishing<br />
|}<br />
<br />
==== Set Slot ====<br />
<br />
Sent by the server when an item in a slot (in a window) is added/removed.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x17<br />
|rowspan="3"| Play<br />
|rowspan="3"| Client<br />
| Window ID<br />
| Byte<br />
| The window which is being updated. 0 for player inventory. Note that all known window types include the player inventory. This packet will only be sent for the currently opened window while the player is performing actions, even if it affects the player inventory. After the window is closed, a number of these packets are sent to update the player's inventory window (0).<br />
|-<br />
| Slot<br />
| Short<br />
| The slot that should be updated<br />
|-<br />
| Slot Data<br />
| [[Slot Data|Slot]]<br />
| <br />
|}<br />
<br />
To set the cursor (the item currently dragged with the mouse), use -1 as Window ID and as Slot.<br />
<br />
This packet can only be used to edit the hotbar of the player's inventory if window ID is set to 0 (slots 36 through 44). If the window ID is set to -2, then any slot in the inventory can be used but no add item animation will be played.<br />
<br />
==== Set Cooldown ====<br />
<br />
Applies a cooldown period to all items with the given type. Used by the Notchian server with enderpearls. This packet should be sent when the cooldown starts and also when the cooldown ends (to compensate for lag), although the client will end the cooldown automatically. Can be applied to any item, note that interactions still get sent to the server with the item but the client does not play the animation nor attempt to predict results (i.e block placing).<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x18<br />
|rowspan="2"| Play<br />
|rowspan="2"| Client<br />
| Item ID<br />
| VarInt<br />
| Numeric ID of the item to apply a cooldown to.<br />
|-<br />
| Cooldown Ticks<br />
| VarInt<br />
| Number of ticks to apply a cooldown for, or 0 to clear the cooldown.<br />
|}<br />
<br />
==== Plugin Message (clientbound) ====<br />
<br />
{{Main|Plugin channels}}<br />
<br />
Mods and plugins can use this to send their data. Minecraft itself uses several [[plugin channel]]s. These internal channels are in the <code>minecraft</code> namespace.<br />
<br />
More documentation on this: [http://dinnerbone.com/blog/2012/01/13/minecraft-plugin-channels-messaging/ http://dinnerbone.com/blog/2012/01/13/minecraft-plugin-channels-messaging/]<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x19<br />
|rowspan="2"| Play<br />
|rowspan="2"| Client<br />
| Channel<br />
| Identifier<br />
| Name of the [[plugin channel]] used to send the data<br />
|-<br />
| Data<br />
| Byte Array<br />
| Any data, depending on the channel. <code>minecraft:</code> channels are documented [[plugin channel|here]]. The length of this array must be inferred from the packet length.<br />
|}<br />
<br />
==== Named Sound Effect ====<br />
{{See also|#Sound Effect}}<br />
<br />
Used to play a sound effect on the client. Custom sounds may be added by resource packs.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="7"| 0x1A<br />
|rowspan="7"| Play<br />
|rowspan="7"| Client<br />
| Sound Name<br />
| Identifier<br />
| All sound effect names as of 1.15.2 can be seen [https://pokechu22.github.io/Burger/1.15.2.html#sounds here].<br />
|-<br />
| Sound Category<br />
| VarInt Enum<br />
| The category that this sound will be played from ([https://gist.github.com/konwboj/7c0c380d3923443e9d55 current categories])<br />
|-<br />
| Effect Position X<br />
| Int<br />
| Effect X multiplied by 8 ([[Data types#Fixed-point numbers|fixed-point number]] with only 3 bits dedicated to the fractional part)<br />
|-<br />
| Effect Position Y<br />
| Int<br />
| Effect Y multiplied by 8 ([[Data types#Fixed-point numbers|fixed-point number]] with only 3 bits dedicated to the fractional part)<br />
|-<br />
| Effect Position Z<br />
| Int<br />
| Effect Z multiplied by 8 ([[Data types#Fixed-point numbers|fixed-point number]] with only 3 bits dedicated to the fractional part)<br />
|-<br />
| Volume<br />
| Float<br />
| 1 is 100%, can be more<br />
|-<br />
| Pitch<br />
| Float<br />
| Float between 0.5 and 2.0 by Notchian clients<br />
|}<br />
<br />
==== Disconnect (play) ====<br />
<br />
Sent by the server before it disconnects a client. The client assumes that the server has already closed the connection by the time the packet arrives.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x1B<br />
| Play<br />
| Client<br />
| Reason<br />
| [[Chat]]<br />
| Displayed to the client when the connection terminates.<br />
|}<br />
<br />
==== Entity Status ====<br />
<br />
Entity statuses generally trigger an animation for an entity. The available statuses vary by the entity's type (and are available to subclasses of that type as well).<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x1C<br />
|rowspan="2"| Play<br />
|rowspan="2"| Client<br />
| Entity ID<br />
| Int<br />
| <br />
|-<br />
| Entity Status<br />
| Byte Enum<br />
| See below<br />
|}<br />
<br />
See [[Entity statuses]] for a list of which statuses are valid for each type of entity.<br />
<br />
==== Explosion ====<br />
<br />
Sent when an explosion occurs (creepers, TNT, and ghast fireballs).<br />
<br />
Each block in Records is set to air. Coordinates for each axis in record is int(X) + record.x<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="9"| 0x1D<br />
|rowspan="9"| Play<br />
|rowspan="9"| Client<br />
| X<br />
| Float<br />
| <br />
|-<br />
| Y<br />
| Float<br />
| <br />
|-<br />
| Z<br />
| Float<br />
| <br />
|-<br />
| Strength<br />
| Float<br />
| A strength greater than or equal to 2.0 spawns a <code>minecraft:explosion_emitter</code> particle, while a lesser strength spawns a <code>minecraft:explosion</code> particle.<br />
|-<br />
| Record Count<br />
| Int<br />
| Number of elements in the following array<br />
|-<br />
| Records<br />
| Array of (Byte, Byte, Byte)<br />
| Each record is 3 signed bytes long; the 3 bytes are the XYZ (respectively) signed offsets of affected blocks.<br />
|-<br />
| Player Motion X<br />
| Float<br />
| X velocity of the player being pushed by the explosion<br />
|-<br />
| Player Motion Y<br />
| Float<br />
| Y velocity of the player being pushed by the explosion<br />
|-<br />
| Player Motion Z<br />
| Float<br />
| Z velocity of the player being pushed by the explosion<br />
|}<br />
<br />
==== Unload Chunk ====<br />
<br />
Tells the client to unload a chunk column.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x1E<br />
|rowspan="2"| Play<br />
|rowspan="2"| Client<br />
| Chunk X<br />
| Int<br />
| Block coordinate divided by 16, rounded down<br />
|-<br />
| Chunk Z<br />
| Int<br />
| Block coordinate divided by 16, rounded down<br />
|}<br />
<br />
It is legal to send this packet even if the given chunk is not currently loaded.<br />
<br />
==== Change Game State ====<br />
<br />
Used for a wide variety of game state things, from whether to bed use to gamemode to demo messages.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x1F<br />
|rowspan="2"| Play<br />
|rowspan="2"| Client<br />
| Reason<br />
| Unsigned Byte<br />
| See below<br />
|-<br />
| Value<br />
| Float<br />
| Depends on Reason<br />
|}<br />
<br />
''Reason codes'':<br />
<br />
{| class="wikitable"<br />
! Reason<br />
! Effect<br />
! Value<br />
|-<br />
| 0<br />
| Invalid Bed<br />
| Would be used to switch between messages, but the only used message is 0 for invalid bed<br />
|-<br />
| 1<br />
| End raining<br />
| <br />
|-<br />
| 2<br />
| Begin raining<br />
| <br />
|-<br />
| 3<br />
| Change gamemode<br />
| 0: Survival, 1: Creative, 2: Adventure, 3: Spectator<br />
|-<br />
| 4<br />
| Exit end<br />
| 0: Immediately send Client Status of respawn without showing end credits; 1: Show end credits and respawn at the when they finish showing (or when esc is pressed). 1 is sent if the player has not yet received the "The end?" advancement, while if they do have it 0 is used.<br />
|-<br />
| 5<br />
| Demo message<br />
| 0: Show welcome to demo screen, 101: Tell movement controls, 102: Tell jump control, 103: Tell inventory control, 104: Tell that the demo is over and print a message about how to take a screenshot<br />
|- <br />
| 6<br />
| Arrow hitting player<br />
| Appears to be played when an arrow strikes another player in Multiplayer<br />
|-<br />
| 7<br />
| Fade value<br />
| The current darkness value. 1 = Dark, 0 = Bright, Setting the value higher causes the game to change color and freeze<br />
|-<br />
| 8<br />
| Fade time<br />
| Time in ticks for the sky to fade<br />
|-<br />
| 9<br />
| Play pufferfish sting sound<br />
|-<br />
| 10<br />
| Play elder guardian mob appearance (effect and sound)<br />
| <br />
|-<br />
| 11<br />
| Enable respawn screen<br />
| 0: Enable respawn screen, 1: Immediately respawn (sent when the doImmediateRespawn gamerule changes) <br />
|}<br />
<br />
==== Open Horse Window ====<br />
<br />
This packet is used exclusively for opening the horse GUI. [[#Open Window|Open Window]] is used for all other GUIs.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x20<br />
|rowspan="3"| Play<br />
|rowspan="3"| Client<br />
| Window ID?<br />
| Byte<br />
|<br />
|-<br />
| Number of slots?<br />
| VarInt<br />
|<br />
|-<br />
| Entity ID?<br />
| Integer<br />
|<br />
|}<br />
<br />
==== Keep Alive (clientbound) ====<br />
<br />
The server will frequently send out a keep-alive, each containing a random ID. The client must respond with the same packet. If the client does not respond to them for over 30 seconds, the server kicks the client. Vice versa, if the server does not send any keep-alives for 20 seconds, the client will disconnect and yields a "Timed out" exception.<br />
<br />
The Notchian server uses a system-dependent time in milliseconds to generate the keep alive ID value.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x21<br />
|rowspan="1"| Play<br />
|rowspan="1"| Client<br />
| Keep Alive ID<br />
| Long<br />
| <br />
|}<br />
<br />
==== Chunk Data ====<br />
{{Main|Chunk Format}}<br />
{{See also|#Unload Chunk}}<br />
<br />
{{Need Info|How do biomes work now? The biome change happened at the same time as the seed change, but it's not clear how/if biomes could be computed given that it's not the actual seed... ([https://www.reddit.com/r/Mojira/comments/e5at6i/a_discussion_for_the_changes_to_how_biomes_are/ /r/mojira discussion] which notes that it seems to be some kind of interpolation, and 3D biomes are only used in the nether)}}<br />
<br />
The server only sends skylight information for chunk pillars in the {{Minecraft Wiki|Overworld}}, it's up to the client to know in which dimenison the player is currently located. You can also infer this information from the primary bitmask and the amount of uncompressed bytes sent. This packet also sends all block entities in the chunk (though sending them is not required; it is still legal to send them with [[#Update Block Entity|Update Block Entity]] later).<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="10"| 0x22<br />
|rowspan="10"| Play<br />
|rowspan="10"| Client<br />
| Chunk X<br />
| Int<br />
| Chunk coordinate (block coordinate divided by 16, rounded down)<br />
|-<br />
| Chunk Z<br />
| Int<br />
| Chunk coordinate (block coordinate divided by 16, rounded down)<br />
|-<br />
| Full chunk<br />
| Boolean<br />
| See [[Chunk Format#Full chunk|Chunk Format]]<br />
|-<br />
| Primary Bit Mask<br />
| VarInt<br />
| Bitmask with bits set to 1 for every 16×16×16 chunk section whose data is included in Data. The least significant bit represents the chunk section at the bottom of the chunk column (from y=0 to y=15).<br />
|-<br />
| Heightmaps<br />
| [[NBT]]<br />
| Compound containing one long array named <code>MOTION_BLOCKING</code>, which is a heightmap for the highest solid block at each position in the chunk (as a compacted long array with 256 entries at 9 bits per entry totaling 36 longs). The Notchian server also adds a <code>WORLD_SURFACE</code> long array, the purpose of which is unknown, but it's not required for the chunk to be accepted.<br />
|-<br />
| Biomes<br />
| Optional array of Integer<br />
| 1024 biome IDs, ordered by x then z then y, in 4&times;4&times;4 blocks. Not present if full chunk is false.<br />
|- <br />
| Size<br />
| VarInt<br />
| Size of Data in bytes<br />
|-<br />
| Data<br />
| Byte array<br />
| See [[Chunk Format#Data structure|data structure]] in Chunk Format<br />
|-<br />
| Number of block entities<br />
| VarInt<br />
| Number of elements in the following array<br />
|-<br />
| Block entities<br />
| Array of [[NBT|NBT Tag]]<br />
| All block entities in the chunk. Use the x, y, and z tags in the NBT to determine their positions.<br />
|}<br />
<br />
Note that the Notchian client requires an [[#Update View Position|Update View Position]] packet when it crosses a chunk border, otherwise it'll only display render distance + 2 chunks around the chunk it spawned in.<br />
<br />
==== Effect ====<br />
Sent when a client is to play a sound or particle effect.<br />
<br />
By default, the Minecraft client adjusts the volume of sound effects based on distance. The final boolean field is used to disable this, and instead the effect is played from 2 blocks away in the correct direction. Currently this is only used for effect 1023 (wither spawn), effect 1028 (enderdragon death), and effect 1038 (end portal opening); it is ignored on other effects.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x23<br />
|rowspan="4"| Play<br />
|rowspan="4"| Client<br />
| Effect ID<br />
| Int<br />
| The ID of the effect, see below<br />
|-<br />
| Location<br />
| Position<br />
| The location of the effect<br />
|-<br />
| Data<br />
| Int<br />
| Extra data for certain effects, see below<br />
|-<br />
| Disable Relative Volume<br />
| Boolean<br />
| See above<br />
|}<br />
<br />
Effect IDs:<br />
<br />
{| class="wikitable"<br />
! ID<br />
! Name<br />
! Data<br />
|-<br />
!colspan="3"| Sound<br />
|-<br />
| 1000<br />
| Dispenser dispenses<br />
| <br />
|-<br />
| 1001<br />
| Dispenser fails to dispense<br />
| <br />
|-<br />
| 1002<br />
| Dispenser shoots<br />
| <br />
|-<br />
| 1003<br />
| Ender eye launched<br />
| <br />
|-<br />
| 1004<br />
| Firework shot<br />
| <br />
|-<br />
| 1005<br />
| Iron door opened<br />
| <br />
|-<br />
| 1006<br />
| Wooden door opened<br />
| <br />
|-<br />
| 1007<br />
| Wooden trapdoor opened<br />
| <br />
|-<br />
| 1008<br />
| Fence gate opened<br />
| <br />
|-<br />
| 1009<br />
| Fire extinguished<br />
| <br />
|-<br />
| 1010<br />
| Play record<br />
| Special case, see below for more info<br />
|-<br />
| 1011<br />
| Iron door closed<br />
| <br />
|-<br />
| 1012<br />
| Wooden door closed<br />
| <br />
|-<br />
| 1013<br />
| Wooden trapdoor closed<br />
| <br />
|-<br />
| 1014<br />
| Fence gate closed<br />
| <br />
|-<br />
| 1015<br />
| Ghast warns<br />
| <br />
|-<br />
| 1016<br />
| Ghast shoots<br />
| <br />
|-<br />
| 1017<br />
| Enderdragon shoots<br />
| <br />
|-<br />
| 1018<br />
| Blaze shoots<br />
| <br />
|-<br />
| 1019<br />
| Zombie attacks wood door<br />
| <br />
|-<br />
| 1020<br />
| Zombie attacks iron door<br />
| <br />
|-<br />
| 1021<br />
| Zombie breaks wood door<br />
|<br />
|-<br />
| 1022<br />
| Wither breaks block<br />
|<br />
|-<br />
| 1023<br />
| Wither spawned<br />
| <br />
|-<br />
| 1024<br />
| Wither shoots<br />
|<br />
|-<br />
| 1025<br />
| Bat takes off<br />
|<br />
|-<br />
| 1026<br />
| Zombie infects<br />
|<br />
|-<br />
| 1027<br />
| Zombie villager converted<br />
|<br />
|-<br />
| 1028<br />
| Ender dragon death<br />
|<br />
|-<br />
| 1029<br />
| Anvil destroyed<br />
| <br />
|-<br />
| 1030<br />
| Anvil used<br />
| <br />
|-<br />
| 1031<br />
| Anvil landed<br />
|<br />
|-<br />
| 1032<br />
| Portal travel<br />
| <br />
|-<br />
| 1033<br />
| Chorus flower grown<br />
|<br />
|-<br />
| 1034<br />
| Chorus flower died<br />
| <br />
|-<br />
| 1035<br />
| Brewing stand brewed<br />
|<br />
|-<br />
| 1036<br />
| Iron trapdoor opened<br />
| <br />
|-<br />
| 1037<br />
| Iron trapdoor closed<br />
|<br />
|-<br />
| 1038<br />
| End portal created in overworld<br />
|<br />
|-<br />
| 1039<br />
| Phantom bites<br />
|<br />
|-<br />
| 1040<br />
| Zombie converts to drowned<br />
|<br />
|-<br />
| 1041<br />
| Husk converts to zombie by drowning<br />
|<br />
|-<br />
| 1042<br />
| Grindstone used<br />
|<br />
|-<br />
| 1043<br />
| Book page turned<br />
|<br />
|-<br />
|-<br />
!colspan="3"| Particle<br />
|-<br />
| 1500<br />
| Composter composts<br />
|<br />
|-<br />
| 1501<br />
| Lava converts block (either water to stone, or removes existing blocks such as torches)<br />
|<br />
|-<br />
| 1502<br />
| Redstone torch burns out<br />
|<br />
|- <br />
| 1503<br />
| Ender eye placed<br />
|<br />
|-<br />
| 2000<br />
| Spawns 10 smoke particles, e.g. from a fire<br />
| Direction, see below<br />
|-<br />
| 2001<br />
| Block break + block break sound<br />
| Block state, as an index into the global palette<br />
|-<br />
| 2002<br />
| Splash potion. Particle effect + glass break sound.<br />
| [http://minecraft.gamepedia.com/Data_values#Potions Potion ID]<br />
|-<br />
| 2003<br />
| Eye of Ender entity break animation — particles and sound<br />
| <br />
|-<br />
| 2004<br />
| Mob spawn particle effect: smoke + flames<br />
| <br />
|-<br />
| 2005<br />
| Bonemeal particles<br />
| How many particles to spawn (if set to 0, 15 are spawned)<br />
|-<br />
| 2006<br />
| Dragon breath<br />
|<br />
|-<br />
| 2007<br />
| Instant splash potion<br />
| [http://minecraft.gamepedia.com/Data_values#Potions Potion ID]<br />
|-<br />
| 2008<br />
| Ender dragon destroys block<br />
|<br />
|-<br />
| 2009<br />
| Wet sponge vaporizes in nether<br />
|<br />
|-<br />
| 3000<br />
| End gateway spawn<br />
| <br />
|-<br />
| 3001<br />
| Enderdragon growl<br />
|<br />
|}<br />
<br />
Smoke directions:<br />
<br />
{| class="wikitable"<br />
! ID<br />
! Direction<br />
|-<br />
| 0<br />
| South-East<br />
|-<br />
| 1<br />
| South<br />
|-<br />
| 2<br />
| South-West<br />
|-<br />
| 3<br />
| East<br />
|-<br />
| 4<br />
| (Up or middle ?)<br />
|-<br />
| 5<br />
| West<br />
|-<br />
| 6<br />
| North-East<br />
|-<br />
| 7<br />
| North<br />
|-<br />
| 8<br />
| North-West<br />
|}<br />
<br />
Play record: This is actually a special case within this packet. You can start/stop a record at a specific location. Use a valid {{Minecraft Wiki|Music Discs|Record ID}} to start a record (or overwrite a currently playing one), any other value will stop the record. See [[Data Generators]] for information on item IDs.<br />
<br />
==== Particle ====<br />
<br />
Displays the named particle<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="11"| 0x24<br />
|rowspan="11"| Play<br />
|rowspan="11"| Client<br />
| Particle ID<br />
| Int<br />
| The particle ID listed in [[#Particle|the particle data type]].<br />
|-<br />
| Long Distance<br />
| Boolean<br />
| If true, particle distance increases from 256 to 65536<br />
|-<br />
| X<br />
| Double<br />
| X position of the particle<br />
|-<br />
| Y<br />
| Double<br />
| Y position of the particle<br />
|-<br />
| Z<br />
| Double<br />
| Z position of the particle<br />
|-<br />
| Offset X<br />
| Float<br />
| This is added to the X position after being multiplied by random.nextGaussian()<br />
|-<br />
| Offset Y<br />
| Float<br />
| This is added to the Y position after being multiplied by random.nextGaussian()<br />
|-<br />
| Offset Z<br />
| Float<br />
| This is added to the Z position after being multiplied by random.nextGaussian()<br />
|-<br />
| Particle Data<br />
| Float<br />
| The data of each particle<br />
|-<br />
| Particle Count<br />
| Int<br />
| The number of particles to create<br />
|-<br />
| Data<br />
| Varies<br />
| The variable data listed in [[#Particle|the particle data type]].<br />
|}<br />
<br />
==== Update Light ====<br />
<br />
Updates light levels for a chunk.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
!colspan="2"| Field Name<br />
!colspan="2"| Field Type<br />
! Notes<br />
|-<br />
|rowspan="10"| 0x25<br />
|rowspan="10"| Play<br />
|rowspan="10"| Client<br />
|colspan="2"| Chunk X<br />
|colspan="2"| VarInt<br />
| Chunk coordinate (block coordinate divided by 16, rounded down) <br />
|-<br />
|colspan="2"| Chunk Z<br />
|colspan="2"| VarInt<br />
| Chunk coordinate (block coordinate divided by 16, rounded down) <br />
|-<br />
|colspan="2"| Sky Light Mask<br />
|colspan="2"| VarInt<br />
| Mask containing 18 bits, with the lowest bit corresponding to chunk section -1 (in the void, y=-16 to y=-1) and the highest bit for chunk section 16 (above the world, y=256 to y=271)<br />
|-<br />
|colspan="2"| Block Light Mask<br />
|colspan="2"| VarInt<br />
| Mask containing 18 bits, with the same order as sky light<br />
|-<br />
|colspan="2"| Empty Sky Light Mask<br />
|colspan="2"| VarInt<br />
| Mask containing 18 bits, which indicates sections that have 0 for all their sky light values. If a section is set in both this mask and the main sky light mask, it is ignored for this mask and it is included in the sky light arrays (the notchian server does not create such masks). If it is only set in this mask, it is not included in the sky light arrays.<br />
|-<br />
|colspan="2"| Empty Block Light Mask<br />
|colspan="2"| VarInt<br />
| Mask containing 18 bits, which indicates sections that have 0 for all their block light values. If a section is set in both this mask and the main block light mask, it is ignored for this mask and it is included in the block light arrays (the notchian server does not create such masks). If it is only set in this mask, it is not included in the block light arrays.<br />
|-<br />
|rowspan="2"| Sky Light arrays<br />
| Length<br />
|rowspan="2"| Array<br />
| VarInt<br />
| Length of the following array in bytes (always 2048)<br />
|-<br />
| Sky Light array<br />
| Array of 2048 bytes<br />
| There is 1 array for each bit set to true in the sky light mask, starting with the lowest value. Half a byte per light value.<br />
|-<br />
|rowspan="2"| Block Light arrays<br />
| Length<br />
|rowspan="2"| Array<br />
| VarInt<br />
| Length of the following array in bytes (always 2048)<br />
|-<br />
| Block Light array<br />
| Array of 2048 bytes<br />
| There is 1 array for each bit set to true in the block light mask, starting with the lowest value. Half a byte per light value.<br />
|}<br />
<br />
Individual block or sky light arrays are is given for each block with increasing x coordinates, within rows of increasing z coordinates, within layers of increasing y coordinates. Even-indexed items (those with an even x coordinate, starting at 0) are packed into the low bits, odd-indexed into the high bits.<br />
<br />
==== Join Game ====<br />
<br />
See [[Protocol Encryption]] for information on logging in.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="9"| 0x26<br />
|rowspan="9"| Play<br />
|rowspan="9"| Client<br />
| Entity ID<br />
| Int<br />
| The player's Entity ID (EID)<br />
|-<br />
| Gamemode<br />
| Unsigned Byte<br />
| 0: Survival, 1: Creative, 2: Adventure, 3: Spectator. Bit 3 (0x8) is the hardcore flag.<br />
|-<br />
| Dimension<br />
| Int Enum<br />
| -1: Nether, 0: Overworld, 1: End; also, note that this is not a VarInt but instead a regular int.<br />
|-<br />
| Hashed seed<br />
| Long<br />
| First 8 bytes of the SHA-256 hash of the world's seed.<br />
|-<br />
| Max Players<br />
| Unsigned Byte<br />
| Was once used by the client to draw the player list, but now is ignored<br />
|-<br />
| Level Type<br />
| String Enum (16)<br />
| default, flat, largeBiomes, amplified, customized, buffet, default_1_1<br />
|-<br />
| View Distance<br />
| VarInt<br />
| Render distance (2-32)<br />
|-<br />
| Reduced Debug Info<br />
| Boolean<br />
| If true, a Notchian client shows reduced information on the {{Minecraft Wiki|debug screen}}. For servers in development, this should almost always be false.<br />
|-<br />
| Enable respawn screen<br />
| Boolean<br />
| Set to false when the doImmediateRespawn gamerule is true<br />
|}<br />
<br />
==== Map Data ====<br />
<br />
Updates a rectangular area on a {{Minecraft Wiki|map}} item.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
!colspan="2"| Field Name<br />
!colspan="2"| Field Type<br />
! Notes<br />
|-<br />
|rowspan="17"| 0x27<br />
|rowspan="17"| Play<br />
|rowspan="17"| Client<br />
|colspan="2"| Map ID<br />
|colspan="2"| VarInt<br />
| Map ID of the map being modified<br />
|-<br />
|colspan="2"| Scale<br />
|colspan="2"| Byte<br />
| From 0 for a fully zoomed-in map (1 block per pixel) to 4 for a fully zoomed-out map (16 blocks per pixel)<br />
|- <br />
|colspan="2"| Tracking Position<br />
|colspan="2"| Boolean<br />
| Specifies whether player and item frame icons are shown<br />
|-<br />
|colspan="2"| Locked<br />
|colspan="2"| Boolean<br />
| True if the map has been locked in a cartography table<br />
|- <br />
|colspan="2"| Icon Count<br />
|colspan="2"| VarInt<br />
| Number of elements in the following array<br />
|-<br />
|rowspan="6"| Icon<br />
| Type<br />
|rowspan="6"| Array<br />
| VarInt enum<br />
| See below<br />
|-<br />
| X<br />
| Byte<br />
| Map coordinates: -128 for furthest left, +127 for furthest right<br />
|-<br />
| Z<br />
| Byte<br />
| Map coordinates: -128 for highest, +127 for lowest<br />
|-<br />
| Direction<br />
| Byte<br />
| 0-15<br />
|-<br />
| Has Display Name<br />
| Boolean<br />
|<br />
|-<br />
| Display Name<br />
| Optional [[Chat]]<br />
| Only present if previous Boolean is true<br />
|- <br />
|colspan="2"| Columns<br />
|colspan="2"| Unsigned Byte<br />
| Number of columns updated<br />
|-<br />
|colspan="2"| Rows<br />
|colspan="2"| Optional Byte<br />
| Only if Columns is more than 0; number of rows updated<br />
|-<br />
|colspan="2"| X<br />
|colspan="2"| Optional Byte<br />
| Only if Columns is more than 0; x offset of the westernmost column<br />
|-<br />
|colspan="2"| Z<br />
|colspan="2"| Optional Byte<br />
| Only if Columns is more than 0; z offset of the northernmost row<br />
|-<br />
|colspan="2"| Length<br />
|colspan="2"| Optional VarInt<br />
| Only if Columns is more than 0; length of the following array<br />
|-<br />
|colspan="2"| Data<br />
|colspan="2"| Optional Array of Unsigned Byte<br />
| Only if Columns is more than 0; see {{Minecraft Wiki|Map item format}}<br />
|}<br />
<br />
For icons, a direction of 0 is a vertical icon and increments by 22.5&deg; (360/16).<br />
<br />
Types are based off of rows and columns in <code>map_icons.png</code>:<br />
<br />
{| class="wikitable"<br />
|-<br />
! Icon type<br />
! Result<br />
|-<br />
| 0<br />
| White arrow (players)<br />
|-<br />
| 1<br />
| Green arrow (item frames)<br />
|-<br />
| 2<br />
| Red arrow<br />
|-<br />
| 3<br />
| Blue arrow<br />
|-<br />
| 4<br />
| White cross<br />
|-<br />
| 5<br />
| Red pointer<br />
|-<br />
| 6<br />
| White circle (off-map players)<br />
|-<br />
| 7<br />
| Small white circle (far-off-map players)<br />
|-<br />
| 8<br />
| Mansion<br />
|-<br />
| 9<br />
| Temple<br />
|-<br />
| 10<br />
| White Banner<br />
|-<br />
| 11<br />
| Orange Banner<br />
|-<br />
| 12<br />
| Magenta Banner<br />
|-<br />
| 13<br />
| Light Blue Banner<br />
|-<br />
| 14<br />
| Yellow Banner<br />
|-<br />
| 15<br />
| Lime Banner<br />
|-<br />
| 16<br />
| Pink Banner<br />
|-<br />
| 17<br />
| Gray Banner<br />
|-<br />
| 18<br />
| Light Gray Banner<br />
|-<br />
| 19<br />
| Cyan Banner<br />
|-<br />
| 20<br />
| Purple Banner<br />
|-<br />
| 21<br />
| Blue Banner<br />
|-<br />
| 22<br />
| Brown Banner<br />
|-<br />
| 23<br />
| Green Banner<br />
|-<br />
| 24<br />
| Red Banner<br />
|-<br />
| 25<br />
| Black Banner<br />
|-<br />
| 26<br />
| Treasure marker<br />
|}<br />
<br />
==== Trade List ====<br />
<br />
The list of trades a villager NPC is offering.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
!colspan="2"| Field Name<br />
!colspan="2"| Field Type<br />
! Notes<br />
|-<br />
|rowspan="18"| 0x28<br />
|rowspan="18"| Play<br />
|rowspan="18"| Client<br />
|-<br />
| colspan="2" | Window ID<br />
| colspan="2" | VarInt<br />
| The ID of the window that is open; this is an int rather than a byte.<br />
|-<br />
| colspan="2" | Size<br />
| colspan="2" | Byte<br />
| The number of trades in the following array<br />
|-<br />
| rowspan="11" | Trades<br />
| Input item 1<br />
| rowspan="11" | Array<br />
| [[Slot]]<br />
| The first item the villager is buying<br />
|-<br />
| Output item<br />
| [[Slot]]<br />
| The item the villager is selling<br />
|-<br />
| Has second item<br />
| Boolean<br />
| Whether there is a second item<br />
|-<br />
| Input item 2<br />
| Optional [[Slot]]<br />
| The second item the villager is buying; only present if they have a second item.<br />
|-<br />
| Trade disabled<br />
| Boolean<br />
| True if the trade is disabled; false if the trade is enabled.<br />
|-<br />
| Number of trade uses<br />
| Integer<br />
| Number of times the trade has been used so far<br />
|-<br />
| Maximum number of trade uses<br />
| Integer<br />
| Number of times this trade can be used<br />
|-<br />
| XP<br />
| Integer<br />
|<br />
|-<br />
| Special Price<br />
| Integer<br />
|<br />
|-<br />
| Price Multiplier<br />
| Float<br />
|<br />
|-<br />
| Demand<br />
| Integer<br />
|<br />
|-<br />
|colspan="2"| Villager level<br />
|colspan="2"| VarInt<br />
| Appears on the trade GUI; meaning comes from the translation key <code>merchant.level.</code> + level.<br />
1: Novice, 2: Apprentice, 3: Journeyman, 4: Expert, 5: Master<br />
|-<br />
|colspan="2"| Experience<br />
|colspan="2"| VarInt<br />
| Total experience for this villager (always 0 for the wandering trader)<br />
|-<br />
|colspan="2"| Is regular villager<br />
|colspan="2"| Boolean<br />
| True if this is a regular villager; false for the wandering trader. When false, hides the villager level and some other GUI elements.<br />
|-<br />
|colspan="2"| Can restock<br />
|colspan="2"| Boolean<br />
| True for regular villagers and false for the wandering trader. If true, the "Villagers restock up to two times per day." message is displayed when hovering over disabled trades.<br />
|}<br />
<br />
[[File:1.14-merchant-slots.png|thumb|The merchant UI, for reference]]<br />
{{-}}<br />
<br />
==== Entity Position ====<br />
<br />
This packet is sent by the server when an entity moves less then 8 blocks; if an entity moves more than 8 blocks [[#Entity Teleport|Entity Teleport]] should be sent instead.<br />
<br />
This packet allows at most 8 blocks movement in any direction, because short range is from -32768 to 32767. And <code>32768 / (128 * 32)</code> = 8.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x29<br />
|rowspan="5"| Play<br />
|rowspan="5"| Client<br />
| Entity ID<br />
| VarInt<br />
| <br />
|-<br />
| Delta X<br />
| Short<br />
| Change in X position as <code>(currentX * 32 - prevX * 32) * 128</code><br />
|-<br />
| Delta Y<br />
| Short<br />
| Change in Y position as <code>(currentY * 32 - prevY * 32) * 128</code><br />
|-<br />
| Delta Z<br />
| Short<br />
| Change in Z position as <code>(currentZ * 32 - prevZ * 32) * 128</code><br />
|-<br />
| On Ground<br />
| Boolean<br />
| <br />
|}<br />
<br />
==== Entity Position and Rotation ====<br />
<br />
This packet is sent by the server when an entity rotates and moves. Since a short range is limited from -32768 to 32767, and movement is offset of fixed-point numbers, this packet allows at most 8 blocks movement in any direction. (<code>-32768 / (32 * 128) == -8</code>)<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="7"| 0x2A<br />
|rowspan="7"| Play<br />
|rowspan="7"| Client<br />
| Entity ID<br />
| VarInt<br />
| <br />
|-<br />
| Delta X<br />
| Short<br />
| Change in X position as <code>(currentX * 32 - prevX * 32) * 128</code><br />
|-<br />
| Delta Y<br />
| Short<br />
| Change in Y position as <code>(currentY * 32 - prevY * 32) * 128</code><br />
|-<br />
| Delta Z<br />
| Short<br />
| Change in Z position as <code>(currentZ * 32 - prevZ * 32) * 128</code><br />
|-<br />
| Yaw<br />
| Angle<br />
| New angle, not a delta<br />
|-<br />
| Pitch<br />
| Angle<br />
| New angle, not a delta<br />
|-<br />
| On Ground<br />
| Boolean<br />
| <br />
|}<br />
<br />
==== Entity Rotation ====<br />
<br />
This packet is sent by the server when an entity rotates.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x2B<br />
|rowspan="4"| Play<br />
|rowspan="4"| Client<br />
| Entity ID<br />
| VarInt<br />
| <br />
|-<br />
| Yaw<br />
| Angle<br />
| New angle, not a delta<br />
|-<br />
| Pitch<br />
| Angle<br />
| New angle, not a delta<br />
|-<br />
| On Ground<br />
| Boolean<br />
| <br />
|}<br />
<br />
==== Entity Movement ====<br />
<br />
This packet may be used to initialize an entity.<br />
<br />
For player entities, either this packet or any move/look packet is sent every game tick. So the meaning of this packet is basically that the entity did not move/look since the last such packet.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x2C<br />
|rowspan="1"| Play<br />
|rowspan="1"| Client<br />
| Entity ID<br />
| VarInt<br />
| <br />
|}<br />
<br />
==== Vehicle Move (clientbound) ====<br />
<br />
Note that all fields use absolute positioning and do not allow for relative positioning.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x2D<br />
|rowspan="5"| Play<br />
|rowspan="5"| Client<br />
| X<br />
| Double<br />
| Absolute position (X coordinate)<br />
|-<br />
| Y<br />
| Double<br />
| Absolute position (Y coordinate)<br />
|-<br />
| Z<br />
| Double<br />
| Absolute position (Z coordinate)<br />
|-<br />
| Yaw<br />
| Float<br />
| Absolute rotation on the vertical axis, in degrees<br />
|-<br />
| Pitch<br />
| Float<br />
| Absolute rotation on the horizontal axis, in degrees<br />
|}<br />
<br />
==== Open Book ====<br />
<br />
Sent when a player right clicks with a signed book. This tells the client to open the book GUI.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x2E<br />
|rowspan="1"| Play<br />
|rowspan="1"| Client<br />
| Hand<br />
| VarInt enum<br />
| 0: Main hand, 1: Off hand <br />
|}<br />
<br />
==== Open Window ====<br />
<br />
This is sent to the client when it should open an inventory, such as a chest, workbench, or furnace. This message is not sent anywhere for clients opening their own inventory. For horses, use [[#Open Horse Window|Open Horse Window]].<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x2F<br />
|rowspan="3"| Play<br />
|rowspan="3"| Client<br />
| Window ID<br />
| VarInt<br />
| A unique id number for the window to be displayed. Notchian server implementation is a counter, starting at 1.<br />
|-<br />
| Window Type<br />
| VarInt<br />
| The window type to use for display. Contained in the <code>minecraft:menu</code> regisry; see [[Inventory]] for the different values.<br />
|-<br />
| Window Title<br />
| [[Chat]]<br />
| The title of the window<br />
|}<br />
<br />
==== Open Sign Editor ====<br />
<br />
Sent when the client has placed a sign and is allowed to send [[#Update Sign|Update Sign]]. There must already be a sign at the given location (which the client does not do automatically) - send a [[#Block Change|Block Change]] first.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x30<br />
|rowspan="1"| Play<br />
|rowspan="1"| Client<br />
| Location<br />
| Position<br />
| <br />
|}<br />
<br />
==== Craft Recipe Response ====<br />
<br />
Response to the serverbound packet ([[#Craft Recipe Request|Craft Recipe Request]]), with the same recipe ID. Appears to be used to notify the UI.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x31<br />
|rowspan="2"| Play<br />
|rowspan="2"| Client<br />
| Window ID<br />
| Byte<br />
|<br />
|-<br />
| Recipe<br />
| Identifier<br />
| A recipe ID<br />
|}<br />
<br />
==== Player Abilities (clientbound) ====<br />
<br />
The latter 2 floats are used to indicate the field of view and flying speed respectively, while the first byte is used to determine the value of 4 booleans.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x32<br />
|rowspan="3"| Play<br />
|rowspan="3"| Client<br />
| Flags<br />
| Byte<br />
| Bit field, see below<br />
|-<br />
| Flying Speed<br />
| Float<br />
| 0.05 by default<br />
|-<br />
| Field of View Modifier<br />
| Float<br />
| Modifies the field of view, like a speed potion. A Notchian server will use the same value as the movement speed sent in the [[Protocol#Entity_Properties|Entity Properties]] packet, which defaults to 0.1 for players.<br />
|}<br />
<br />
About the flags:<br />
<br />
{| class="wikitable"<br />
|-<br />
! Field<br />
! Bit<br />
|-<br />
| Invulnerable<br />
| 0x01<br />
|-<br />
| Flying<br />
| 0x02<br />
|-<br />
| Allow Flying<br />
| 0x04<br />
|-<br />
| Creative Mode (Instant Break)<br />
| 0x08<br />
|}<br />
<br />
==== Combat Event ====<br />
<br />
Originally used for metadata for twitch streaming circa 1.8. Now only used to display the game over screen (with enter combat and end combat completely ignored by the Notchain client)<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
!colspan="2"| Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="8"| 0x33<br />
|rowspan="8"| Play<br />
|rowspan="8"| Client<br />
|colspan="2"| Event<br />
| VarInt Enum<br />
| Determines the layout of the remaining packet<br />
|-<br />
! Event<br />
! Field Name<br />
! <br />
! <br />
|-<br />
| 0: enter combat<br />
| ''no fields''<br />
| ''no fields''<br />
| <br />
|-<br />
|rowspan="2"| 1: end combat<br />
| Duration<br />
| VarInt<br />
| Length of the combat in ticks.<br />
|-<br />
| Entity ID<br />
| Int<br />
| ID of the primary opponent of the ended combat, or -1 if there is no obvious primary opponent.<br />
|-<br />
|rowspan="3"| 2: entity dead<br />
| Player ID<br />
| VarInt<br />
| Entity ID of the player that died (should match the client's entity ID).<br />
|-<br />
| Entity ID<br />
| Int<br />
| The killing entity's ID, or -1 if there is no obvious killer.<br />
|-<br />
| Message<br />
| [[Chat]]<br />
| The death message<br />
|}<br />
<br />
==== Player Info ====<br />
<br />
Sent by the server to update the user list (<tab> in the client).<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
!colspan="4"| Field Name<br />
!colspan="3"| Field Type<br />
! Notes<br />
|-<br />
|rowspan="19"| 0x34<br />
|rowspan="19"| Play<br />
|rowspan="19"| Client<br />
|colspan="4"| Action<br />
|colspan="3"| VarInt<br />
| Determines the rest of the Player format after the UUID<br />
|-<br />
|colspan="4"| Number Of Players<br />
|colspan="3"| VarInt<br />
| Number of elements in the following array<br />
|-<br />
|rowspan="17"| Player<br />
|colspan="3"| UUID<br />
|rowspan="17"| Array<br />
|colspan="2"| UUID<br />
| <br />
|-<br />
! Action<br />
!colspan="2"| Field Name<br />
!colspan="2"| <br />
! <br />
|-<br />
|rowspan="10"| 0: add player<br />
|colspan="2"| Name<br />
|colspan="2"| String (16)<br />
| <br />
|-<br />
|colspan="2"| Number Of Properties<br />
|colspan="2"| VarInt<br />
| Number of elements in the following array<br />
|-<br />
|rowspan="4"| Property<br />
| Name<br />
|rowspan="4"| Array<br />
| String (32767)<br />
| <br />
|-<br />
| Value<br />
| String (32767)<br />
| <br />
|- <br />
| Is Signed<br />
| Boolean<br />
| <br />
|-<br />
| Signature<br />
| Optional String (32767)<br />
| Only if Is Signed is true<br />
|-<br />
|colspan="2"| Gamemode<br />
|colspan="2"| VarInt<br />
| <br />
|-<br />
|colspan="2"| Ping<br />
|colspan="2"| VarInt<br />
| Measured in milliseconds<br />
|-<br />
|colspan="2"| Has Display Name<br />
|colspan="2"| Boolean<br />
| <br />
|-<br />
|colspan="2"| Display Name<br />
|colspan="2"| Optional [[Chat]]<br />
| Only if Has Display Name is true<br />
|-<br />
| 1: update gamemode<br />
|colspan="2"| Gamemode<br />
|colspan="2"| VarInt<br />
| <br />
|- <br />
| 2: update latency<br />
|colspan="2"| Ping<br />
|colspan="2"| VarInt<br />
| Measured in milliseconds<br />
|-<br />
|rowspan="2"| 3: update display name<br />
|colspan="2"| Has Display Name<br />
|colspan="2"| Boolean<br />
| <br />
|-<br />
|colspan="2"| Display Name<br />
|colspan="2"| Optional [[Chat]]<br />
| Only send if Has Display Name is true<br />
|-<br />
| 4: remove player<br />
|colspan="2"| ''no fields''<br />
|colspan="2"| ''no fields''<br />
| <br />
|}<br />
<br />
The Property field looks as in the response of [[Mojang API#UUID -> Profile + Skin/Cape]], except of course using the protocol format instead of JSON. That is, each player will usually have one property with Name “textures” and Value being a base64-encoded JSON string as documented at [[Mojang API#UUID -> Profile + Skin/Cape]]. An empty properties array is also acceptable, and will cause clients to display the player with one of the two default skins depending on UUID.<br />
<br />
Ping values correspond with icons in the following way:<br />
* A ping that negative (i.e. not known to the server yet) will result in the no connection icon.<br />
* A ping under 150 milliseconds will result in 5 bars<br />
* A ping under 300 milliseconds will result in 4 bars<br />
* A ping under 600 milliseconds will result in 3 bars<br />
* A ping under 1000 milliseconds (1 second) will result in 2 bars<br />
* A ping greater than or equal to 1 second will result in 1 bar.<br />
<br />
==== Face Player ====<br />
<br />
Used to rotate the client player to face the given location or entity (for <code>/teleport [<targets>] <x> <y> <z> facing</code>).<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="8"| 0x35<br />
|rowspan="8"| Play<br />
|rowspan="8"| Client<br />
|-<br />
| Feet/eyes<br />
| VarInt enum<br />
| Values are feet=0, eyes=1. If set to eyes, aims using the head position; otherwise aims using the feet position.<br />
|-<br />
| Target x<br />
| Double<br />
| x coordinate of the point to face towards<br />
|-<br />
| Target y<br />
| Double<br />
| y coordinate of the point to face towards<br />
|-<br />
| Target z<br />
| Double<br />
| z coordinate of the point to face towards<br />
|-<br />
| Is entity<br />
| Boolean<br />
| If true, additional information about an entity is provided.<br />
|-<br />
| Entity ID<br />
| Optional VarInt<br />
| Only if is entity is true &mdash; the entity to face towards<br />
|-<br />
| Entity feet/eyes<br />
| Optional VarInt enum<br />
| Whether to look at the entity's eyes or feet. Same values and meanings as before, just for the entity's head/feet.<br />
|}<br />
<br />
If the entity given by entity ID cannot be found, this packet should be treated as if is entity was false.<br />
<br />
==== Player Position And Look (clientbound) ==== <br />
<br />
Updates the player's position on the server. This packet will also close the “Downloading Terrain” screen when joining/respawning.<br />
<br />
If the distance between the last known position of the player on the server and the new position set by this packet is greater than 100 meters, the client will be kicked for “You moved too quickly :( (Hacking?)”.<br />
<br />
Also if the fixed-point number of X or Z is set greater than <code>3.2E7D</code> the client will be kicked for “Illegal position”.<br />
<br />
Yaw is measured in degrees, and does not follow classical trigonometry rules. The unit circle of yaw on the XZ-plane starts at (0, 1) and turns counterclockwise, with 90 at (-1, 0), 180 at (0, -1) and 270 at (1, 0). Additionally, yaw is not clamped to between 0 and 360 degrees; any number is valid, including negative numbers and numbers greater than 360.<br />
<br />
Pitch is measured in degrees, where 0 is looking straight ahead, -90 is looking straight up, and 90 is looking straight down.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="7"| 0x36<br />
|rowspan="7"| Play<br />
|rowspan="7"| Client<br />
| X<br />
| Double<br />
| Absolute or relative position, depending on Flags<br />
|-<br />
| Y<br />
| Double<br />
| Absolute or relative position, depending on Flags<br />
|-<br />
| Z<br />
| Double<br />
| Absolute or relative position, depending on Flags<br />
|-<br />
| Yaw<br />
| Float<br />
| Absolute or relative rotation on the X axis, in degrees<br />
|-<br />
| Pitch<br />
| Float<br />
| Absolute or relative rotation on the Y axis, in degrees<br />
|-<br />
| Flags<br />
| Byte<br />
| Bit field, see below<br />
|-<br />
| Teleport ID<br />
| VarInt<br />
| Client should confirm this packet with [[#Teleport Confirm|Teleport Confirm]] containing the same Teleport ID<br />
|}<br />
<br />
About the Flags field:<br />
<br />
<Dinnerbone> It's a bitfield, X/Y/Z/Y_ROT/X_ROT. If X is set, the x value is relative and not absolute.<br />
<br />
{| class="wikitable"<br />
|-<br />
! Field<br />
! Bit<br />
|-<br />
| X<br />
| 0x01<br />
|-<br />
| Y<br />
| 0x02<br />
|-<br />
| Z<br />
| 0x04<br />
|-<br />
| Y_ROT<br />
| 0x08<br />
|-<br />
| X_ROT<br />
| 0x10<br />
|}<br />
<br />
==== Unlock Recipes ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="10"| 0x37<br />
|rowspan="10"| Play<br />
|rowspan="10"| Client<br />
|-<br />
| Action<br />
| VarInt<br />
| 0: init, 1: add, 2: remove<br />
|-<br />
| Crafting Recipe Book Open<br />
| Boolean<br />
| If true, then the crafting recipe book will be open when the player opens its inventory.<br />
|-<br />
| Crafting Recipe Book Filter Active<br />
| Boolean<br />
| If true, then the filtering option is active when the players opens its inventory.<br />
|-<br />
| Smelting Recipe Book Open<br />
| Boolean<br />
| If true, then the smelting recipe book will be open when the player opens its inventory.<br />
|-<br />
| Smelting Recipe Book Filter Active<br />
| Boolean<br />
| If true, then the filtering option is active when the players opens its inventory.<br />
|-<br />
| Array size 1<br />
| VarInt<br />
| Number of elements in the following array<br />
|-<br />
| Recipe IDs<br />
| Array of Identifier<br />
|<br />
|-<br />
| Array size 2<br />
| Optional VarInt<br />
| Number of elements in the following array, only present if mode is 0 (init)<br />
|-<br />
| Recipe IDs<br />
| Optional Array of Identifier, only present if mode is 0 (init)<br />
|<br />
|}<br />
Action:<br />
* 0 (init) = All the recipes in the list 2 will added to the recipe book. All the recipes in list 1 will be tagged as displayed, recipes that aren't tagged will be shown in the notification. VERIFY LIST ORDER?<br />
* 1 (add) = All the recipes in the list are added and their icon will be shown in the notification.<br />
* 2 (remove) = Remove all the recipes in the list. This allows them to re-displayed when they are readded.<br />
<br />
==== Destroy Entities ====<br />
<br />
Sent by the server when a list of entities is to be destroyed on the client.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x38<br />
|rowspan="2"| Play<br />
|rowspan="2"| Client<br />
| Count<br />
| VarInt<br />
| Number of elements in the following array<br />
|-<br />
| Entity IDs<br />
| Array of VarInt<br />
| The list of entities of destroy<br />
|}<br />
<br />
==== Remove Entity Effect ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x39<br />
|rowspan="2"| Play<br />
|rowspan="2"| Client<br />
| Entity ID<br />
| VarInt<br />
| <br />
|-<br />
| Effect ID<br />
| Byte<br />
| See {{Minecraft Wiki|Status effect#List of effects|this table}}<br />
|}<br />
<br />
==== Resource Pack Send ==== <br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x3A<br />
|rowspan="2"| Play<br />
|rowspan="2"| Client<br />
| URL<br />
| String (32767)<br />
| The URL to the resource pack.<br />
|-<br />
| Hash<br />
| String (40)<br />
| A 40 character hexadecimal and lowercase [[wikipedia:SHA-1|SHA-1]] hash of the resource pack file. (must be lower case in order to work)<br />If it's not a 40 character hexadecimal string, the client will not use it for hash verification and likely waste bandwidth — but it will still treat it as a unique id<br />
|}<br />
<br />
==== Respawn ====<br />
<br />
To change the player's dimension (overworld/nether/end), send them a respawn packet with the appropriate dimension, followed by prechunks/chunks for the new dimension, and finally a position and look packet. You do not need to unload chunks, the client will do it automatically.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x3B<br />
|rowspan="4"| Play<br />
|rowspan="4"| Client<br />
| Dimension<br />
| Int Enum<br />
| -1: The Nether, 0: The Overworld, 1: The End<br />
|-<br />
| Hashed seed<br />
| Long<br />
| First 8 bytes of the SHA-256 hash of the world's seed.<br />
|-<br />
| Gamemode<br />
| Unsigned Byte<br />
| 0: survival, 1: creative, 2: adventure, 3: spectator. The hardcore flag is not included<br />
|-<br />
| Level Type<br />
| String (16)<br />
| Same as [[#Join Game|Join Game]]<br />
|}<br />
<br />
{{Warning2|Avoid changing player's dimension to same dimension they were already in unless they are dead. If you change the dimension to one they are already in, weird bugs can occur, such as the player being unable to attack other players in new world (until they die and respawn).<br />
<br />
If you must respawn a player in the same dimension without killing them, send two respawn packets, one to a different world and then another to the world you want. You do not need to complete the first respawn; it only matters that you send two packets.}}<br />
<br />
==== Entity Head Look ====<br />
<br />
Changes the direction an entity's head is facing.<br />
<br />
While sending the Entity Look packet changes the vertical rotation of the head, sending this packet appears to be necessary to rotate the head horizontally.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x3C<br />
|rowspan="2"| Play<br />
|rowspan="2"| Client<br />
| Entity ID<br />
| VarInt<br />
| <br />
|-<br />
| Head Yaw<br />
| Angle<br />
| New angle, not a delta<br />
|}<br />
<br />
==== Select Advancement Tab ====<br />
<br />
Sent by the server to indicate that the client should switch advancement tab. Sent either when the client switches tab in the GUI or when an advancement in another tab is made.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x3D<br />
|rowspan="2"| Play<br />
|rowspan="2"| Client<br />
| Has id<br />
| Boolean<br />
| Indicates if the next field is present<br />
|-<br />
| Optional Identifier<br />
| String (32767)<br />
| See below<br />
|}<br />
<br />
The Identifier can be one of the following:<br />
<br />
{| class="wikitable"<br />
! Optional Identifier<br />
|-<br />
| minecraft:story/root<br />
|-<br />
| minecraft:nether/root<br />
|-<br />
| minecraft:end/root<br />
|-<br />
| minecraft:adventure/root<br />
|-<br />
| minecraft:husbandry/root<br />
|}<br />
<br />
If no or an invalid identifier is sent, the client will switch to the first tab in the GUI.<br />
<br />
==== World Border ==== <br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
!colspan="2"| Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="18"| 0x3E<br />
|rowspan="18"| Play<br />
|rowspan="18"| Client<br />
|colspan="2"| Action<br />
| VarInt Enum<br />
| Determines the format of the rest of the packet<br />
|-<br />
! Action<br />
! Field Name<br />
! <br />
! <br />
|-<br />
| 0: set size<br />
| Diameter<br />
| Double<br />
| Length of a single side of the world border, in meters<br />
|-<br />
|rowspan="3"| 1: lerp size<br />
| Old Diameter<br />
| Double<br />
| Current length of a single side of the world border, in meters<br />
|-<br />
| New Diameter<br />
| Double<br />
| Target length of a single side of the world border, in meters<br />
|-<br />
| Speed<br />
| VarLong<br />
| Number of real-time ''milli''seconds until New Diameter is reached. It appears that Notchian server does not sync world border speed to game ticks, so it gets out of sync with server lag. If the world border is not moving, this is set to 0.<br />
|-<br />
|rowspan="2"| 2: set center<br />
| X<br />
| Double<br />
| <br />
|-<br />
| Z<br />
| Double<br />
| <br />
|-<br />
|rowspan="8"| 3: initialize<br />
| X<br />
| Double<br />
| <br />
|-<br />
| Z<br />
| Double<br />
| <br />
|-<br />
| Old Diameter<br />
| Double<br />
| Current length of a single side of the world border, in meters<br />
|-<br />
| New Diameter<br />
| Double<br />
| Target length of a single side of the world border, in meters<br />
|-<br />
| Speed<br />
| VarLong<br />
| Number of real-time ''milli''seconds until New Diameter is reached. It appears that Notchian server does not sync world border speed to game ticks, so it gets out of sync with server lag. If the world border is not moving, this is set to 0.<br />
|-<br />
| Portal Teleport Boundary<br />
| VarInt<br />
| Resulting coordinates from a portal teleport are limited to ±value. Usually 29999984.<br />
|-<br />
| Warning Time<br />
| VarInt<br />
| In seconds as set by <code>/worldborder warning time</code><br />
|-<br />
| Warning Blocks<br />
| VarInt<br />
| In meters<br />
|-<br />
|rowspan="1"| 4: set warning time<br />
| Warning Time<br />
| VarInt<br />
| In seconds as set by <code>/worldborder warning time</code><br />
|-<br />
|rowspan="1"| 5: set warning blocks<br />
| Warning Blocks<br />
| VarInt<br />
| In meters<br />
|}<br />
<br />
The Notchian client determines how solid to display the warning by comparing to whichever is higher, the warning distance or whichever is lower, the distance from the current diameter to the target diameter or the place the border will be after warningTime seconds. In pseudocode:<br />
<br />
<syntaxhighlight lang="java"><br />
distance = max(min(resizeSpeed * 1000 * warningTime, abs(targetDiameter - currentDiameter)), warningDistance);<br />
if (playerDistance < distance) {<br />
warning = 1.0 - playerDistance / distance;<br />
} else {<br />
warning = 0.0;<br />
}<br />
</syntaxhighlight><br />
<br />
==== Camera ====<br />
<br />
Sets the entity that the player renders from. This is normally used when the player left-clicks an entity while in spectator mode.<br />
<br />
The player's camera will move with the entity and look where it is looking. The entity is often another player, but can be any type of entity. The player is unable to move this entity (move packets will act as if they are coming from the other entity).<br />
<br />
If the given entity is not loaded by the player, this packet is ignored. To return control to the player, send this packet with their entity ID.<br />
<br />
The Notchian server resets this (sends it back to the default entity) whenever the spectated entity is killed or the player sneaks, but only if they were spectating an entity. It also sends this packet whenever the player switches out of spectator mode (even if they weren't spectating an entity).<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x3F<br />
|rowspan="1"| Play<br />
|rowspan="1"| Client<br />
| Camera ID<br />
| VarInt<br />
| ID of the entity to set the client's camera to<br />
|}<br />
<br />
The notchian also loads certain shaders for given entities:<br />
<br />
* Creeper &rarr; <code>shaders/post/creeper.json</code><br />
* Spider (and cave spider) &rarr; <code>shaders/post/spider.json</code><br />
* Enderman &rarr; <code>shaders/post/invert.json</code><br />
* Anything else &rarr; the current shader is unloaded<br />
<br />
==== Held Item Change (clientbound) ====<br />
<br />
Sent to change the player's slot selection.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x40<br />
|rowspan="1"| Play<br />
|rowspan="1"| Client<br />
| Slot<br />
| Byte<br />
| The slot which the player has selected (0–8)<br />
|}<br />
<br />
==== Update View Position ====<br />
<br />
{{Need Info|Why is this even needed? Is there a better name for it? My guess is that it's something to do with logical behavior with latency, but it still seems weird.}}<br />
<br />
Updates the client's location. This is used to determine what chunks should remain loaded and if a chunk load should be ignored; chunks outside of the view distance may be unloaded.<br />
<br />
Sent whenever the player moves across a chunk border horizontally, and also (according to testing) for any integer change in the vertical axis, even if it doesn't go across a chunk section border.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x41<br />
|rowspan="2"| Play<br />
|rowspan="2"| Client<br />
| Chunk X<br />
| VarInt<br />
| Chunk X coordinate of the player's position<br />
|-<br />
| Chunk Z<br />
| VarInt<br />
| Chunk Z coordinate of the player's position<br />
|}<br />
<br />
==== Update View Distance ====<br />
<br />
Sent by the integrated singleplayer server when changing render distance. Does not appear to be used by the dedicated server, as <code>view-distance</code> in server.properties cannot be changed at runtime.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x42<br />
|rowspan="1"| Play<br />
|rowspan="1"| Client<br />
| View Distance<br />
| VarInt<br />
| Render distance (2-32) <br />
|}<br />
<br />
==== Display Scoreboard ====<br />
<br />
This is sent to the client when it should display a scoreboard.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x43<br />
|rowspan="2"| Play<br />
|rowspan="2"| Client<br />
| Position<br />
| Byte<br />
| The position of the scoreboard. 0: list, 1: sidebar, 2: below name, 3 - 18: team specific sidebar, indexed as 3 + team color.<br />
|-<br />
| Score Name<br />
| String (16)<br />
| The unique name for the scoreboard to be displayed.<br />
|}<br />
<br />
==== Entity Metadata ====<br />
<br />
Updates one or more [[Entities#Entity Metadata Format|metadata]] properties for an existing entity. Any properties not included in the Metadata field are left unchanged.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x44<br />
|rowspan="2"| Play<br />
|rowspan="2"| Client<br />
| Entity ID<br />
| VarInt<br />
| <br />
|-<br />
| Metadata<br />
| [[Entities#Entity Metadata Format|Entity Metadata]]<br />
| <br />
|}<br />
<br />
==== Attach Entity ====<br />
<br />
This packet is sent when an entity has been {{Minecraft Wiki|Lead|leashed}} to another entity.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x45<br />
|rowspan="2"| Play<br />
|rowspan="2"| Client<br />
| Attached Entity ID<br />
| Int<br />
| Attached entity's EID<br />
|-<br />
| Holding Entity ID<br />
| Int<br />
| ID of the entity holding the lead. Set to -1 to detach.<br />
|}<br />
<br />
==== Entity Velocity ====<br />
<br />
Velocity is believed to be in units of 1/8000 of a block per server tick (50ms); for example, -1343 would move (-1343 / 8000) = −0.167875 blocks per tick (or −3,3575 blocks per second).<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x46<br />
|rowspan="4"| Play<br />
|rowspan="4"| Client<br />
| Entity ID<br />
| VarInt<br />
| <br />
|-<br />
| Velocity X<br />
| Short<br />
| Velocity on the X axis<br />
|-<br />
| Velocity Y<br />
| Short<br />
| Velocity on the Y axis<br />
|-<br />
| Velocity Z<br />
| Short<br />
| Velocity on the Z axis<br />
|}<br />
<br />
==== Entity Equipment ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x47<br />
|rowspan="3"| Play<br />
|rowspan="3"| Client<br />
| Entity ID<br />
| VarInt<br />
| Entity's EID<br />
|-<br />
| Slot<br />
| VarInt Enum<br />
| Equipment slot. 0: main hand, 1: off hand, 2–5: armor slot (2: boots, 3: leggings, 4: chestplate, 5: helmet)<br />
|-<br />
| Item<br />
| [[Slot Data|Slot]]<br />
| <br />
|}<br />
<br />
==== Set Experience ====<br />
<br />
Sent by the server when the client should change experience levels.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x48<br />
|rowspan="3"| Play<br />
|rowspan="3"| Client<br />
| Experience bar<br />
| Float<br />
| Between 0 and 1<br />
|-<br />
| Level<br />
| VarInt<br />
| <br />
|-<br />
| Total Experience<br />
| VarInt<br />
| See {{Minecraft Wiki|Experience#Leveling up}} on the Minecraft Wiki for Total Experience to Level conversion<br />
|}<br />
<br />
==== Update Health ====<br />
<br />
Sent by the server to update/set the health of the player it is sent to.<br />
<br />
Food {{Minecraft Wiki|Food#Hunger vs. Saturation|saturation}} acts as a food “overcharge”. Food values will not decrease while the saturation is over zero. Players logging in automatically get a saturation of 5.0. Eating food increases the saturation as well as the food bar.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x49<br />
|rowspan="3"| Play<br />
|rowspan="3"| Client<br />
| Health<br />
| Float<br />
| 0 or less = dead, 20 = full HP<br />
|-<br />
| Food<br />
| VarInt<br />
| 0–20<br />
|- <br />
| Food Saturation<br />
| Float<br />
| Seems to vary from 0.0 to 5.0 in integer increments<br />
|}<br />
<br />
==== Scoreboard Objective ====<br />
<br />
This is sent to the client when it should create a new {{Minecraft Wiki|scoreboard}} objective or remove one.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x4A<br />
|rowspan="4"| Play<br />
|rowspan="4"| Client<br />
| Objective Name<br />
| String (16)<br />
| An unique name for the objective<br />
|-<br />
| Mode<br />
| Byte<br />
| 0 to create the scoreboard. 1 to remove the scoreboard. 2 to update the display text. <br />
|-<br />
| Objective Value<br />
| Optional Chat<br />
| Only if mode is 0 or 2. The text to be displayed for the score<br />
|-<br />
| Type<br />
| Optional VarInt enum<br />
| Only if mode is 0 or 2. 0 = "integer", 1 = "hearts".<br />
|}<br />
<br />
==== Set Passengers ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x4B<br />
|rowspan="3"| Play<br />
|rowspan="3"| Client<br />
| Entity ID<br />
| VarInt<br />
| Vehicle's EID<br />
|-<br />
| Passenger Count<br />
| VarInt<br />
| Number of elements in the following array<br />
|-<br />
| Passengers<br />
| Array of VarInt<br />
| EIDs of entity's passengers<br />
|}<br />
<br />
==== Teams ====<br />
<br />
Creates and updates teams.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
!colspan="2"| Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="23"| 0x4C<br />
|rowspan="23"| Play<br />
|rowspan="23"| Client<br />
|colspan="2"| Team Name<br />
| String (16)<br />
| A unique name for the team. (Shared with scoreboard).<br />
|-<br />
|colspan="2"| Mode<br />
| Byte<br />
| Determines the layout of the remaining packet<br />
|-<br />
|rowspan="9"| 0: create team<br />
| Team Display Name<br />
| Chat<br />
| <br />
|-<br />
| Friendly Flags<br />
| Byte<br />
| Bit mask. 0x01: Allow friendly fire, 0x02: can see invisible players on same team<br />
|-<br />
| Name Tag Visibility<br />
| String Enum (32)<br />
| <code>always</code>, <code>hideForOtherTeams</code>, <code>hideForOwnTeam</code>, <code>never</code><br />
|-<br />
| Collision Rule<br />
| String Enum (32)<br />
| <code>always</code>, <code>pushOtherTeams</code>, <code>pushOwnTeam</code>, <code>never</code><br />
|-<br />
| Team Color<br />
| VarInt enum<br />
| Used to color the name of players on the team; see below<br />
|-<br />
| Team Prefix<br />
| Chat<br />
| Displayed before the names of players that are part of this team<br />
|-<br />
| Team Suffix<br />
| Chat<br />
| Displayed after the names of players that are part of this team<br />
|-<br />
| Entity Count<br />
| VarInt<br />
| Number of elements in the following array<br />
|-<br />
| Entities<br />
| Array of String (40)<br />
| Identifiers for the entities in this team. For players, this is their username; for other entities, it is their UUID.<br />
|-<br />
| 1: remove team<br />
| ''no fields''<br />
| ''no fields''<br />
| <br />
|-<br />
|rowspan="7"| 2: update team info<br />
| Team Display Name<br />
| Chat<br />
| <br />
|-<br />
| Friendly Flags<br />
| Byte<br />
| Bit mask. 0x01: Allow friendly fire, 0x02: can see invisible entities on same team<br />
|-<br />
| Name Tag Visibility<br />
| String Enum (32)<br />
| <code>always</code>, <code>hideForOtherTeams</code>, <code>hideForOwnTeam</code>, <code>never</code><br />
|-<br />
| Collision Rule<br />
| String Enum (32)<br />
| <code>always</code>, <code>pushOtherTeams</code>, <code>pushOwnTeam</code>, <code>never</code><br />
|-<br />
| Team Color<br />
| VarInt enum<br />
| Used to color the name of players on the team; see below<br />
|-<br />
| Team Prefix<br />
| Chat<br />
| Displayed before the names of players that are part of this team<br />
|-<br />
| Team Suffix<br />
| Chat<br />
| Displayed after the names of players that are part of this team<br />
|-<br />
|rowspan="2"| 3: add players to team<br />
| Entity Count<br />
| VarInt<br />
| Number of elements in the following array<br />
|-<br />
| Entities<br />
| Array of String (40)<br />
| Identifiers for the entities added. For players, this is their username; for other entities, it is their UUID.<br />
|-<br />
|rowspan="2"| 4: remove players from team<br />
| Entity Count<br />
| VarInt<br />
| Number of elements in the following array<br />
|-<br />
| Entities<br />
| Array of String (40)<br />
| Identifiers for the entities removed. For players, this is their username; for other entities, it is their UUID.<br />
|}<br />
<br />
Team Color: The color of a team defines how the names of the team members are visualized; any formatting code can be used. The following table lists all the possible values.<br />
<br />
{| class="wikitable"<br />
! ID<br />
! Formatting<br />
|-<br />
| 0-15<br />
| Color formatting, same values as [[Chat]] colors.<br />
|-<br />
| 16<br />
| Obfuscated<br />
|-<br />
| 17<br />
| Bold<br />
|-<br />
| 18<br />
| Strikethrough<br />
|-<br />
| 19<br />
| Underlined<br />
|-<br />
| 20<br />
| Italic<br />
|-<br />
| 21<br />
| Reset<br />
|}<br />
<br />
==== Update Score ====<br />
<br />
This is sent to the client when it should update a scoreboard item. <br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x4D<br />
|rowspan="4"| Play<br />
|rowspan="4"| Client<br />
| Entity Name<br />
| String (40)<br />
| The entity whose score this is. For players, this is their username; for other entities, it is their UUID.<br />
|-<br />
| Action<br />
| Byte<br />
| 0 to create/update an item. 1 to remove an item.<br />
|-<br />
| Objective Name<br />
| String (16)<br />
| The name of the objective the score belongs to<br />
|-<br />
| Value<br />
| Optional VarInt<br />
| The score to be displayed next to the entry. Only sent when Action does not equal 1.<br />
|}<br />
<br />
==== Spawn Position ====<br />
<br />
Sent by the server after login to specify the coordinates of the spawn point (the point at which players spawn at, and which the compass points to). It can be sent at any time to update the point compasses point at.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x4E<br />
|rowspan="1"| Play<br />
|rowspan="1"| Client<br />
| Location<br />
| Position<br />
| Spawn location<br />
|}<br />
<br />
==== Time Update ====<br />
<br />
Time is based on ticks, where 20 ticks happen every second. There are 24000 ticks in a day, making Minecraft days exactly 20 minutes long.<br />
<br />
The time of day is based on the timestamp modulo 24000. 0 is sunrise, 6000 is noon, 12000 is sunset, and 18000 is midnight.<br />
<br />
The default SMP server increments the time by <code>20</code> every second.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x4F<br />
|rowspan="2"| Play<br />
|rowspan="2"| Client<br />
| World Age<br />
| Long<br />
| In ticks; not changed by server commands<br />
|-<br />
| Time of day<br />
| Long<br />
| The world (or region) time, in ticks. If negative the sun will stop moving at the Math.abs of the time<br />
|}<br />
<br />
==== Title ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
!colspan="2"| Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="10"| 0x50<br />
|rowspan="10"| Play<br />
|rowspan="10"| Client<br />
|colspan="2"| Action<br />
| VarInt Enum<br />
| <br />
|-<br />
! Action<br />
! Field Name<br />
! <br />
! <br />
|-<br />
| 0: set title<br />
| Title Text<br />
| [[Chat]]<br />
| <br />
|-<br />
| 1: set subtitle<br />
| Subtitle Text<br />
| [[Chat]]<br />
| <br />
|- <br />
| 2: set action bar<br />
| Action bar text<br />
| [[Chat]]<br />
| Displays a message above the hotbar (the same as position 2 in [[#Chat Message (clientbound)|Chat Message (clientbound)]], except that it correctly renders formatted chat. See [https://bugs.mojang.com/browse/MC-119145 MC-119145] for more information.)<br />
|-<br />
|rowspan="3"| 3: set times and display<br />
| Fade In<br />
| Int<br />
| Ticks to spend fading in<br />
|-<br />
| Stay<br />
| Int<br />
| Ticks to keep the title displayed<br />
|-<br />
| Fade Out<br />
| Int<br />
| Ticks to spend out, not when to start fading out<br />
|-<br />
| 4: hide<br />
| ''no fields''<br />
| ''no fields''<br />
| <br />
|-<br />
| 5: reset<br />
| ''no fields''<br />
| ''no fields''<br />
| <br />
|}<br />
<br />
“Hide” makes the title disappear, but if you run times again the same title will appear. “Reset” erases the text.<br />
<br />
The title is visible on screen for Fade In + Stay + Fade Out ticks.<br />
<br />
==== Entity Sound Effect ====<br />
<br />
Plays a sound effect from an entity.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x51<br />
|rowspan="5"| Play<br />
|rowspan="5"| Client<br />
| Sound ID<br />
| VarInt<br />
| ID of hardcoded sound event ([https://pokechu22.github.io/Burger/1.15.2.html#sounds events] as of 1.15.2)<br />
|-<br />
| Sound Category<br />
| VarInt Enum<br />
| The category that this sound will be played from ([https://gist.github.com/konwboj/7c0c380d3923443e9d55 current categories])<br />
|-<br />
| Entity ID<br />
| VarInt<br />
|<br />
|-<br />
| Volume<br />
| Float<br />
| 1.0 is 100%, capped between 0.0 and 1.0 by Notchian clients<br />
|-<br />
| Pitch<br />
| Float<br />
| Float between 0.5 and 2.0 by Notchian clients<br />
|}<br />
<br />
==== Sound Effect ====<br />
<br />
This packet is used to play a number of hardcoded sound events. For custom sounds, use [[#Named Sound Effect|Named Sound Effect]].<br />
<br />
{{Warning|Numeric sound effect IDs are liable to change between versions}}<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="7"| 0x52<br />
|rowspan="7"| Play<br />
|rowspan="7"| Client<br />
| Sound ID<br />
| VarInt<br />
| ID of hardcoded sound event ([https://pokechu22.github.io/Burger/1.15.2.html#sounds events] as of 1.15.2)<br />
|-<br />
| Sound Category<br />
| VarInt Enum<br />
| The category that this sound will be played from ([https://gist.github.com/konwboj/7c0c380d3923443e9d55 current categories])<br />
|-<br />
| Effect Position X<br />
| Int<br />
| Effect X multiplied by 8 ([[Data types#Fixed-point numbers|fixed-point number]] with only 3 bits dedicated to the fractional part)<br />
|-<br />
| Effect Position Y<br />
| Int<br />
| Effect Y multiplied by 8 ([[Data types#Fixed-point numbers|fixed-point number]] with only 3 bits dedicated to the fractional part)<br />
|-<br />
| Effect Position Z<br />
| Int<br />
| Effect Z multiplied by 8 ([[Data types#Fixed-point numbers|fixed-point number]] with only 3 bits dedicated to the fractional part)<br />
|-<br />
| Volume<br />
| Float<br />
| 1.0 is 100%, capped between 0.0 and 1.0 by Notchian clients<br />
|-<br />
| Pitch<br />
| Float<br />
| Float between 0.5 and 2.0 by Notchian clients<br />
|}<br />
<br />
==== Stop Sound ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x53<br />
|rowspan="3"| Play<br />
|rowspan="3"| Client<br />
| Flags<br />
| Byte<br />
| Controls which fields are present.<br />
|-<br />
| Source<br />
| Optional VarInt enum<br />
| Only if flags is 3 or 1 (bit mask 0x1). See below. If not present, then sounds from all sources are cleared.<br />
|-<br />
| Sound<br />
| Optional Identifier<br />
| Only if flags is 2 or 3 (bit mask 0x2). A sound effect name, see [[#Named Sound Effect|Named Sound Effect]]. If not present, then all sounds are cleared.<br />
|}<br />
<br />
Categories:<br />
<br />
{| class="wikitable"<br />
! Name !! Value<br />
|-<br />
| master || 0<br />
|-<br />
| music || 1<br />
|-<br />
| record || 2<br />
|-<br />
| weather || 3<br />
|-<br />
| block || 4<br />
|-<br />
| hostile || 5<br />
|-<br />
| neutral || 6<br />
|-<br />
| player || 7<br />
|-<br />
| ambient || 8<br />
|-<br />
| voice || 9<br />
|}<br />
<br />
==== Player List Header And Footer ====<br />
<br />
This packet may be used by custom servers to display additional information above/below the player list. It is never sent by the Notchian server.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x54<br />
|rowspan="2"| Play<br />
|rowspan="2"| Client<br />
| Header<br />
| [[Chat]]<br />
| To remove the header, send a empty translatable component: {"translate":""}<br />
|-<br />
| Footer<br />
| [[Chat]]<br />
| To remove the footer, send a empty translatable component: {"translate":""}<br />
|}<br />
<br />
==== NBT Query Response ====<br />
<br />
Sent in response to [[#Query Block NBT|Query Block NBT]] or [[#Query Entity NBT|Query Entity NBT]].<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x55<br />
|rowspan="2"| Play<br />
|rowspan="2"| Client<br />
| Transaction ID<br />
| VarInt<br />
| Can be compared to the one sent in the original query packet.<br />
|-<br />
| NBT<br />
| [[NBT|NBT Tag]]<br />
| The NBT of the block or entity. May be a TAG_END (0) in which case no NBT is present.<br />
|}<br />
<br />
==== Collect Item ====<br />
<br />
Sent by the server when someone picks up an item lying on the ground — its sole purpose appears to be the animation of the item flying towards you. It doesn't destroy the entity in the client memory, and it doesn't add it to your inventory. The server only checks for items to be picked up after each [[#Player Position|Player Position]] (and [[#Player Position And Look|Player Position And Look]]) packet sent by the client. The collector entity can be any entity; it does not have to be a player. The collected entity also can be any entity, but the Notchian server only uses this for items, experience orbs, and the different varieties of arrows.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x56<br />
|rowspan="3"| Play<br />
|rowspan="3"| Client<br />
| Collected Entity ID<br />
| VarInt<br />
| <br />
|- <br />
| Collector Entity ID<br />
| VarInt<br />
| <br />
|- <br />
| Pickup Item Count<br />
| VarInt<br />
| Seems to be 1 for XP orbs, otherwise the number of items in the stack.<br />
|}<br />
<br />
==== Entity Teleport ====<br />
<br />
This packet is sent by the server when an entity moves more than 8 blocks.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="7"| 0x57<br />
|rowspan="7"| Play<br />
|rowspan="7"| Client<br />
| Entity ID<br />
| VarInt<br />
| <br />
|-<br />
| X<br />
| Double<br />
| <br />
|-<br />
| Y<br />
| Double<br />
| <br />
|-<br />
| Z<br />
| Double<br />
| <br />
|-<br />
| Yaw<br />
| Angle<br />
| New angle, not a delta<br />
|-<br />
| Pitch<br />
| Angle<br />
| New angle, not a delta<br />
|-<br />
| On Ground<br />
| Boolean<br />
| <br />
|}<br />
<br />
==== Advancements ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
!colspan="2"| Field Name<br />
!colspan="2"| Field Type<br />
! Notes<br />
|-<br />
|rowspan="9"| 0x58<br />
|rowspan="9"| Play<br />
|rowspan="9"| Client<br />
|colspan="2"| Reset/Clear<br />
|colspan="2"| Boolean<br />
| Whether to reset/clear the current advancements<br />
|-<br />
|colspan="2"| Mapping size<br />
|colspan="2"| VarInt<br />
| Size of the following array<br />
|-<br />
|rowspan="2"| Advancement mapping<br />
| Key<br />
|rowspan="2"| Array<br />
| Identifier<br />
| The identifier of the advancement<br />
|-<br />
| Value<br />
| Advancement<br />
| See below<br />
|-<br />
|colspan="2"| List size<br />
|colspan="2"| VarInt<br />
| Size of the following array<br />
|-<br />
|colspan="2"| Identifiers<br />
|colspan="2"| Array of Identifier<br />
| The identifiers of the advancements that should be removed<br />
|-<br />
|colspan="2"| Progress size<br />
|colspan="2"| VarInt<br />
| Size of the following array<br />
|-<br />
|rowspan="2"| Progress mapping<br />
| Key<br />
|rowspan="2"| Array<br />
| Identifier<br />
| The identifier of the advancement<br />
|-<br />
| Value<br />
| Advancement progress<br />
| See below<br />
|}<br />
<br />
Advancement structure:<br />
<br />
{| class="wikitable"<br />
!colspan="2"| Field Name<br />
!colspan="2"| Field Type<br />
! Notes<br />
|-<br />
|colspan="2"| Has parent<br />
|colspan="2"| Boolean<br />
| Indicates whether the next field exists.<br />
|-<br />
|colspan="2"| Parent id<br />
|colspan="2"| Optional Identifier<br />
| The identifier of the parent advancement.<br />
|-<br />
|colspan="2"| Has display<br />
|colspan="2"| Boolean<br />
| Indicates whether the next field exists<br />
|-<br />
|colspan="2"| Display data<br />
|colspan="2"| Optional advancement display<br />
| See below.<br />
|-<br />
|colspan="2"| Number of criteria<br />
|colspan="2"| VarInt<br />
| Size of the following array<br />
|-<br />
|rowspan="2"| Criteria<br />
| Key<br />
|rowspan="2"| Array<br />
| Identifier<br />
| The identifier of the criterion<br />
|-<br />
| Value<br />
| '''Void'''<br />
| There is ''no'' content written here. Perhaps this will be expanded in the future?<br />
|-<br />
|colspan="2"| Array length<br />
|colspan="2"| VarInt<br />
| Number of arrays in the following array<br />
|-<br />
|rowspan="2"| Requirements<br />
| Array length 2<br />
|rowspan="2"| Array<br />
| VarInt<br />
| Number of elements in the following array<br />
|-<br />
| Requirement<br />
| Array of String<br />
| Array of required criteria<br />
|}<br />
<br />
Advancement display:<br />
<br />
{| class="wikitable"<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| Title<br />
| Chat<br />
|<br />
|-<br />
| Description<br />
| Chat<br />
|<br />
|-<br />
| Icon<br />
| [[Slot]]<br />
|<br />
|-<br />
| Frame type<br />
| VarInt enum<br />
| 0 = <code>task</code>, 1 = <code>challenge</code>, 2 = <code>goal</code><br />
|-<br />
| Flags<br />
| Integer<br />
| 0x1: has background texture; 0x2: <code>show_toast</code>; 0x4: <code>hidden</code><br />
|-<br />
| Background texture<br />
| Optional Identifier<br />
| Background texture location. Only if flags indicates it.<br />
|-<br />
| X coord<br />
| Float<br />
| <br />
|-<br />
| Y coord<br />
| Float<br />
| <br />
|}<br />
<br />
Advancement progress:<br />
<br />
{| class="wikitable"<br />
!colspan="2"| Field Name<br />
!colspan="2"| Field Type<br />
! Notes<br />
|-<br />
|colspan="2"| Size<br />
|colspan="2"| VarInt<br />
| Size of the following array<br />
|-<br />
|rowspan="2"| Criteria<br />
| Criterion identifier<br />
|rowspan="2"| Array<br />
| Identifier<br />
| The identifier of the criterion.<br />
|-<br />
| Criterion progress<br />
| Criterion progress<br />
|<br />
|}<br />
<br />
Criterion progress:<br />
<br />
{| class="wikitable"<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| Achieved<br />
| Boolean<br />
| If true, next field is present<br />
|-<br />
| Date of achieving<br />
| Optional Long<br />
| As returned by [https://docs.oracle.com/javase/6/docs/api/java/util/Date.html#getTime() <code>Date.getTime</code>]<br />
|}<br />
<br />
==== Entity Properties ====<br />
<br />
Sets {{Minecraft Wiki|Attribute|attributes}} on the given entity.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
!colspan="2"| Field Name<br />
!colspan="2"| Field Type<br />
! Notes<br />
|-<br />
|rowspan="6"| 0x59<br />
|rowspan="6"| Play<br />
|rowspan="6"| Client<br />
|colspan="2"| Entity ID<br />
|colspan="2"| VarInt<br />
| <br />
|-<br />
|colspan="2"| Number Of Properties<br />
|colspan="2"| Int<br />
| Number of elements in the following array<br />
|-<br />
|rowspan="4"| Property<br />
| Key<br />
|rowspan="4"| Array<br />
| String (64)<br />
| See below<br />
|-<br />
| Value<br />
| Double<br />
| See below<br />
|-<br />
| Number Of Modifiers<br />
| VarInt<br />
| Number of elements in the following array<br />
|-<br />
| Modifiers<br />
| Array of Modifier Data<br />
| See {{Minecraft Wiki|Attribute#Modifiers}}. Modifier Data defined below.<br />
|}<br />
<br />
Known Key values (see also {{Minecraft Wiki|Attribute#Modifiers}}):<br />
<br />
{| class="wikitable"<br />
|-<br />
! Key<br />
! Default<br />
! Min<br />
! Max<br />
! Label<br />
|-<br />
| generic.maxHealth<br />
| 20.0<br />
| 0.0<br />
| 1024.0<br />
| Max Health<br />
|-<br />
| generic.followRange<br />
| 32.0<br />
| 0.0<br />
| 2048.0<br />
| Follow Range<br />
|-<br />
| generic.knockbackResistance<br />
| 0.0 <br />
| 0.0<br />
| 1.0<br />
| Knockback Resistance<br />
|-<br />
| generic.movementSpeed<br />
| 0.7<br />
| 0.0<br />
| 1024.0<br />
| Movement Speed<br />
|-<br />
| generic.attackDamage<br />
| 2.0<br />
| 0.0<br />
| 2048.0<br />
| Attack Damage<br />
|-<br />
| generic.attackSpeed<br />
| 4.0<br />
| 0.0<br />
| 1024.0<br />
| Attack Speed<br />
|-<br />
| generic.flyingSpeed<br />
| 0.4<br />
| 0.0<br />
| 1024.0<br />
| Flying Speed<br />
|-<br />
| generic.armor<br />
| 0.0<br />
| 0.0<br />
| 30.0<br />
| Armor<br />
|-<br />
| generic.armorToughness<br />
| 0.0<br />
| 0.0<br />
| 20.0<br />
| Armor Toughness<br />
|-<br />
| generic.attackKnockback<br />
| 0.0<br />
| 0.0<br />
| 5.0<br />
| &mdash;<br />
|-<br />
| generic.luck<br />
| 0.0<br />
| -1024.0<br />
| 1024.0<br />
| Luck<br />
|-<br />
| horse.jumpStrength<br />
| 0.7<br />
| 0.0<br />
| 2.0<br />
| Jump Strength<br />
|-<br />
| zombie.spawnReinforcements<br />
| 0.0<br />
| 0.0<br />
| 1.0<br />
| Spawn Reinforcements Chance<br />
|-<br />
| generic.reachDistance<br />
| 5.0<br />
| 0.0<br />
| 1024.0<br />
| Player Reach Distance (Forge only)<br />
|-<br />
| forge.swimSpeed<br />
| 1.0<br />
| 0.0<br />
| 1024.0<br />
| Swimming Speed (Forge only)<br />
|}<br />
<br />
Unknown attributes will cause a game crash ([https://bugs.mojang.com/browse/MC-150405 MC-150405]) due to the default minimum being larger than the default value.<br />
<br />
''Modifier Data'' structure:<br />
<br />
{| class="wikitable"<br />
|-<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| UUID<br />
| UUID<br />
| <br />
|-<br />
| Amount<br />
| Double<br />
| May be positive or negative<br />
|-<br />
| Operation<br />
| Byte<br />
| See below<br />
|}<br />
<br />
The operation controls how the base value of the modifier is changed.<br />
<br />
* 0: Add/subtract amount<br />
* 1: Add/subtract amount percent of the current value<br />
* 2: Multiply by amount percent<br />
<br />
All of the 0's are applied first, and then the 1's, and then the 2's.<br />
<br />
==== Entity Effect ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x5A<br />
|rowspan="5"| Play<br />
|rowspan="5"| Client<br />
| Entity ID<br />
| VarInt<br />
| <br />
|-<br />
| Effect ID<br />
| Byte<br />
| See {{Minecraft Wiki|Status effect#List of effects|this table}}<br />
|-<br />
| Amplifier<br />
| Byte<br />
| Notchian client displays effect level as Amplifier + 1<br />
|-<br />
| Duration<br />
| VarInt<br />
| Duration in ticks.<br />
|-<br />
| Flags<br />
| Byte<br />
| Bit field, see below.<br />
|}<br />
<br />
Within flags:<br />
<br />
* 0x01: Is ambient - was the effect spawned from a beacon? All beacon-generated effects are ambient. Ambient effects use a different icon in the HUD (blue border rather than gray). If all effects on an entity are ambient, the [[Entities#Living|"Is potion effect ambient" living metadata field]] should be set to true. Usually should not be enabled.<br />
* 0x02: Show particles - should all particles from this effect be hidden? Effects with particles hidden are not included in the calculation of the effect color, and are not rendered on the HUD (but are still rendered within the inventory). Usually should be enabled.<br />
* 0x04: Show icon - should the icon be displayed on the client? Usually should be enabled.<br />
<br />
==== Declare Recipes ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
!colspan="2"| Field Name<br />
!colspan="2"| Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x5B<br />
|rowspan="4"| Play<br />
|rowspan="4"| Client<br />
|colspan="2"| Num Recipes<br />
|colspan="2"| VarInt<br />
| Number of elements in the following array<br />
|-<br />
|rowspan="3"| Recipe<br />
| Recipe ID<br />
|rowspan="3"| Array<br />
| Identifier<br />
|<br />
|-<br />
| Type<br />
| String<br />
| The recipe type, see below<br />
|-<br />
| Data<br />
| Optional, varies<br />
| Additional data for the recipe. For some types, there will be no data.<br />
|}<br />
<br />
Recipe types:<br />
<br />
{| class="wikitable"<br />
! Type<br />
! Description<br />
! Data<br />
|-<br />
| <code>crafting_shapeless</code><br />
| Shapeless crafting recipe. All items in the ingredient list must be present, but in any order/slot.<br />
| As follows:<br />
{| class="wikitable"<br />
! Name<br />
! Type<br />
! Description<br />
|-<br />
| Group<br />
| String<br />
| Used to group similar recipes together in the recipe book. Tag is present in recipe JSON.<br />
|-<br />
| Ingredient count<br />
| VarInt<br />
| Number of elements in the following array<br />
|-<br />
| Ingredients<br />
| Array of Ingredient<br />
|<br />
|-<br />
| Result<br />
| [[Slot]]<br />
|<br />
|}<br />
|-<br />
| <code>crafting_shaped</code><br />
| Shaped crafting recipe. All items must be present in the same pattern (which may be flipped horizontally or translated)<br />
| As follows:<br />
{| class="wikitable"<br />
! Name<br />
! Type<br />
! Description<br />
|-<br />
| Width<br />
| VarInt<br />
|<br />
|-<br />
| Height<br />
| VarInt<br />
|<br />
|-<br />
| Group<br />
| String<br />
| Used to group similar recipes together in the recipe book. Tag is present in recipe JSON.<br />
|-<br />
| Ingredients<br />
| Array of Ingredient<br />
| Length is width * height. Indexed by x + (y * width).<br />
|-<br />
| Result<br />
| [[Slot]]<br />
|<br />
|}<br />
|-<br />
| <code>crafting_special_armordye</code><br />
| Recipe for dying leather armor<br />
|rowspan="13"| None<br />
|-<br />
| <code>crafting_special_bookcloning</code><br />
| Recipe for copying contents of written books<br />
|-<br />
| <code>crafting_special_mapcloning</code><br />
| Recipe for copying maps<br />
|-<br />
| <code>crafting_special_mapextending</code><br />
| Recipe for adding paper to maps<br />
|-<br />
| <code>crafting_special_firework_rocket</code><br />
| Recipe for making firework rockets<br />
|-<br />
| <code>crafting_special_firework_star</code><br />
| Recipe for making firework stars<br />
|-<br />
| <code>crafting_special_firework_star_fade</code><br />
| Recipe for making firework stars fade between multiple colors<br />
|-<br />
| <code>crafting_special_repairitem</code><br />
| Recipe for repairing items via crafting<br />
|-<br />
| <code>crafting_special_tippedarrow</code><br />
| Recipe for crafting tipped arrows<br />
|-<br />
| <code>crafting_special_bannerduplicate</code><br />
| Recipe for copying banner patterns<br />
|-<br />
| <code>crafting_special_banneraddpattern</code><br />
| Recipe for adding patterns to banners<br />
|-<br />
| <code>crafting_special_shielddecoration</code><br />
| Recipe for applying a banner's pattern to a shield<br />
|-<br />
| <code>crafting_special_shulkerboxcoloring</code><br />
| Recipe for recoloring a shulker box<br />
|-<br />
| <code>smelting</code><br />
| Smelting recipe<br />
|rowspan="4"| As follows:<br />
{| class="wikitable"<br />
! Name<br />
! Type<br />
! Description<br />
|-<br />
| Group<br />
| String<br />
| Used to group similar recipes together in the recipe book.<br />
|-<br />
| Ingredient<br />
| Ingredient<br />
|<br />
|-<br />
| Result<br />
| [[Slot]]<br />
|<br />
|-<br />
| Experience<br />
| Float<br />
|<br />
|-<br />
| Cooking time<br />
| VarInt<br />
|<br />
|}<br />
|-<br />
| <code>blasting</code><br />
| Blast furnace recipe<br />
|-<br />
| <code>smoking</code><br />
| Smoker recipe<br />
|-<br />
| <code>campfire_cooking</code><br />
| Campfire recipe<br />
|-<br />
| <code>stonecutting</code><br />
| Stonecutter recipe<br />
| As follows:<br />
{| class="wikitable"<br />
! Name<br />
! Type<br />
! Description<br />
|-<br />
| Group<br />
| String<br />
| Used to group similar recipes together in the recipe book. Tag is present in recipe JSON.<br />
|-<br />
| Ingredient<br />
| Ingredient<br />
|<br />
|-<br />
| Result<br />
| [[Slot]]<br />
|<br />
|}<br />
|}<br />
<br />
Ingredient is defined as:<br />
<br />
{| class="wikitable"<br />
! Name<br />
! Type<br />
! Description<br />
|-<br />
| Count<br />
| VarInt<br />
| Number of elements in the following array<br />
|-<br />
| Items<br />
| Array of [[Slot]]<br />
| Any item in this array may be used for the recipe. The count of each item should be 1.<br />
|}<br />
<br />
==== Tags ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x5C<br />
|rowspan="4"| Play<br />
|rowspan="4"| Client<br />
| Block Tags<br />
| (See below)<br />
| IDs are block IDs<br />
|-<br />
| Item Tags<br />
| (See below)<br />
| IDs are item IDs<br />
|-<br />
| Fluid Tags<br />
| (See below)<br />
| IDs are fluid IDs<br />
|-<br />
| Entity Tags<br />
| (See below)<br />
| IDs are entity IDs<br />
|}<br />
<br />
Tags look like:<br />
<br />
{| class="wikitable"<br />
!colspan="2"| Field Name<br />
!colspan="2"| Field Type<br />
! Notes<br />
|-<br />
|colspan="2"| Length<br />
|colspan="2"| VarInt<br />
| Number of elements in the following array<br />
|-<br />
|rowspan="3"| Tags<br />
| Tag name<br />
|rowspan="3"| Array<br />
| Identifier<br />
|<br />
|-<br />
| Count<br />
| VarInt<br />
| Number of elements in the following array<br />
|-<br />
| Entries<br />
| Array of VarInt<br />
| Numeric ID of the block/item.<br />
|}<br />
<br />
=== Serverbound ===<br />
<br />
==== Teleport Confirm ====<br />
<br />
Sent by client as confirmation of [[#Player Position And Look (clientbound)|Player Position And Look]].<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x00<br />
| Play<br />
| Server<br />
| Teleport ID<br />
| VarInt<br />
| The ID given by the [[#Player Position And Look (clientbound)|Player Position And Look]] packet<br />
|}<br />
<br />
==== Query Block NBT ====<br />
<br />
Used when <kbd>Shift</kbd>+<kbd>F3</kbd>+<kbd>I</kbd> is pressed while looking at a block.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x01<br />
|rowspan="2"| Play<br />
|rowspan="2"| Server<br />
| Transaction ID<br />
| VarInt<br />
| An incremental ID so that the client can verify that the response matches.<br />
|-<br />
| Location<br />
| Position<br />
| The location of the block to check.<br />
|}<br />
<br />
==== Set Difficulty ====<br />
<br />
Must have at least op level 2 to use. Appears to only be used on singleplayer; the difficulty buttons are still disabled in multiplayer.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x02<br />
|rowspan="1"| Play<br />
|rowspan="1"| Server<br />
| New difficulty<br />
| Byte<br />
| 0: peaceful, 1: easy, 2: normal, 3: hard <br />
|}<br />
<br />
==== Chat Message (serverbound) ====<br />
<br />
Used to send a chat message to the server. The message may not be longer than 256 characters or else the server will kick the client.<br />
<br />
If the message starts with a <code>/</code>, the server will attempt to interpret it as a command. Otherwise, the server will broadcast the same chat message to all players on the server (including the player that sent the message), prepended with player's name. Specifically, it will respond with a translate [[chat]] component, "<code>chat.type.text</code>" with the first parameter set to the display name of the player (including some chat component logic to support clicking the name to send a PM) and the second parameter set to the message. See [[Chat#Processing chat|processing chat]] for more information.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x03<br />
|rowspan="1"| Play<br />
|rowspan="1"| Server<br />
| Message<br />
| String (256)<br />
| The client sends the raw input, not a [[Chat]] component<br />
|}<br />
<br />
==== Client Status ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x04<br />
|rowspan="1"| Play<br />
|rowspan="1"| Server<br />
| Action ID<br />
| VarInt Enum<br />
| See below<br />
|}<br />
<br />
''Action ID'' values:<br />
<br />
{| class="wikitable"<br />
|-<br />
! Action ID<br />
! Action<br />
! Notes<br />
|-<br />
| 0<br />
| Perform respawn<br />
| Sent when the client is ready to complete login and when the client is ready to respawn after death.<br />
|-<br />
| 1<br />
| Request stats<br />
| Sent when the client opens the Statistics menu<br />
|}<br />
<br />
==== Client Settings ====<br />
<br />
Sent when the player connects, or when settings are changed.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="6"| 0x05<br />
|rowspan="6"| Play<br />
|rowspan="6"| Server<br />
| Locale<br />
| String (16)<br />
| e.g. en_GB<br />
|-<br />
| View Distance<br />
| Byte<br />
| Client-side render distance, in chunks<br />
|-<br />
| Chat Mode<br />
| VarInt Enum<br />
| 0: enabled, 1: commands only, 2: hidden. See [[Chat#Processing chat|processing chat]] for more information.<br />
|-<br />
| Chat Colors<br />
| Boolean<br />
| “Colors” multiplayer setting<br />
|-<br />
| Displayed Skin Parts<br />
| Unsigned Byte<br />
| Bit mask, see below<br />
|-<br />
| Main Hand<br />
| VarInt Enum<br />
| 0: Left, 1: Right<br />
|}<br />
<br />
''Displayed Skin Parts'' flags:<br />
<br />
* Bit 0 (0x01): Cape enabled<br />
* Bit 1 (0x02): Jacket enabled<br />
* Bit 2 (0x04): Left Sleeve enabled<br />
* Bit 3 (0x08): Right Sleeve enabled<br />
* Bit 4 (0x10): Left Pants Leg enabled<br />
* Bit 5 (0x20): Right Pants Leg enabled<br />
* Bit 6 (0x40): Hat enabled<br />
<br />
The most significant bit (bit 7, 0x80) appears to be unused.<br />
<br />
==== Tab-Complete (serverbound) ====<br />
<br />
Sent when the client needs to tab-complete a <code>minecraft:ask_server</code> suggestion type.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x06<br />
|rowspan="2"| Play<br />
|rowspan="2"| Server<br />
| Transaction Id<br />
| VarInt<br />
| The id received in the tab completion request packet, must match or the client will ignore this packet. Client generates this and increments it each time it sends another tab completion that doesn't get a response.<br />
|-<br />
| Text<br />
| String (32500)<br />
| All text behind the cursor without the <code>/</code> (e.g. to the left of the cursor in left-to-right languages like English)<br />
|}<br />
<br />
==== Window Confirmation (serverbound) ====<br />
<br />
If a confirmation sent by the client was not accepted, the server will reply with a [[#Window Confirmation (clientbound)|Window Confirmation (clientbound)]] packet with the Accepted field set to false. When this happens, the client must send this packet to apologize (as with movement), otherwise the server ignores any successive confirmations.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x07<br />
|rowspan="3"| Play<br />
|rowspan="3"| Server<br />
| Window ID<br />
| Byte<br />
| The ID of the window that the action occurred in<br />
|-<br />
| Action Number<br />
| Short<br />
| Every action that is to be accepted has a unique number. This number is an incrementing integer (starting at 1) with separate counts for each window ID.<br />
|-<br />
| Accepted<br />
| Boolean<br />
| Whether the action was accepted<br />
|}<br />
<br />
==== Click Window Button ====<br />
<br />
Used when clicking on window buttons. Until 1.14, this was only used by enchantment tables.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x08<br />
|rowspan="2"| Play<br />
|rowspan="2"| Server<br />
| Window ID<br />
| Byte<br />
| The ID of the window sent by [[#Open Window|Open Window]]<br />
|-<br />
| Button ID<br />
| Byte<br />
| Meaning depends on window type; see below<br />
|}<br />
<br />
{| class="wikitable"<br />
! Window type<br />
! ID<br />
! Meaning<br />
|-<br />
|rowspan="3"| Enchantment Table<br />
| 0 || Topmost enchantment<br />
|-<br />
| 1 || Middle enchantment<br />
|-<br />
| 2 || Bottom enchantment<br />
|-<br />
|rowspan="4"| Lectern<br />
| 1 || Previous page (which does give a redstone output)<br />
|-<br />
| 2 || Next page<br />
|-<br />
| 3 || Take Book<br />
|-<br />
| 100+page || Opened page number - 100 + number<br />
|-<br />
| Stonecutter<br />
|colspan="2"| Recipe button number - 4*row + col. Depends on the item.<br />
|-<br />
| Loom<br />
|colspan="2"| Recipe button number - 4*row + col. Depends on the item.<br />
|}<br />
<br />
==== Click Window ====<br />
<br />
This packet is sent by the player when it clicks on a slot in a window.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="6"| 0x09<br />
|rowspan="6"| Play<br />
|rowspan="6"| Server<br />
| Window ID<br />
| Unsigned Byte<br />
| The ID of the window which was clicked. 0 for player inventory.<br />
|-<br />
| Slot<br />
| Short<br />
| The clicked slot number, see below<br />
|-<br />
| Button<br />
| Byte<br />
| The button used in the click, see below<br />
|-<br />
| Action Number<br />
| Short<br />
| A unique number for the action, implemented by Notchian as a counter, starting at 1 (different counter for every window ID). Used by the server to send back a [[#Confirm Transaction (clientbound)|Confirm Transaction (clientbound)]].<br />
|-<br />
| Mode<br />
| VarInt Enum<br />
| Inventory operation mode, see below<br />
|-<br />
| Clicked item<br />
| [[Slot Data|Slot]]<br />
| The clicked slot. Has to be empty (item ID = -1) for drop mode.<br />
|}<br />
<br />
See [[Inventory]] for further information about how slots are indexed.<br />
<br />
When right-clicking on a stack of items, half the stack will be picked up and half left in the slot. If the stack is an odd number, the half left in the slot will be smaller of the amounts.<br />
<br />
The distinct type of click performed by the client is determined by the combination of the Mode and Button fields.<br />
<br />
{| class="wikitable"<br />
! Mode<br />
! Button<br />
! Slot<br />
! Trigger<br />
|-<br />
!rowspan="2"| 0<br />
| 0<br />
| Normal<br />
| Left mouse click<br />
|-<br />
| 1<br />
| Normal<br />
| Right mouse click<br />
|-<br />
!rowspan="2"| 1<br />
| 0<br />
| Normal<br />
| Shift + left mouse click<br />
|-<br />
| 1<br />
| Normal<br />
| Shift + right mouse click ''(identical behavior)''<br />
|-<br />
!rowspan="5"| 2<br />
| 0<br />
| Normal<br />
| Number key 1<br />
|-<br />
| 1<br />
| Normal<br />
| Number key 2<br />
|-<br />
| 2<br />
| Normal<br />
| Number key 3<br />
|-<br />
| ⋮<br />
| ⋮<br />
| ⋮<br />
|-<br />
| 8<br />
| Normal<br />
| Number key 9<br />
|-<br />
!rowspan="1"| 3<br />
| 2<br />
| Normal<br />
| Middle click, only defined for creative players in non-player inventories.<br />
|-<br />
!rowspan="4"| 4<br />
| 0<br />
| Normal*<br />
| Drop key (Q) (* Clicked item is different, see above)<br />
|-<br />
| 1<br />
| Normal*<br />
| Ctrl + Drop key (Ctrl-Q) ''(drops full stack)''<br />
|-<br />
| 0<br />
| -999<br />
| Left click outside inventory holding nothing ''(no-op)''<br />
|-<br />
| 1<br />
| -999<br />
| Right click outside inventory holding nothing ''(no-op)''<br />
|-<br />
!rowspan="9"| 5<br />
| 0<br />
| -999<br />
| Starting left mouse drag<br />
|-<br />
| 4<br />
| -999<br />
| Starting right mouse drag<br />
|-<br />
| 8<br />
| -999<br />
| Starting middle mouse drag, only defined for creative players in non-player inventories. (Note: the vanilla client will still incorrectly send this for non-creative players - see [https://bugs.mojang.com/browse/MC-46584 MC-46584])<br />
|-<br />
| 1<br />
| Normal<br />
| Add slot for left-mouse drag<br />
|-<br />
| 5<br />
| Normal<br />
| Add slot for right-mouse drag<br />
|-<br />
| 9<br />
| Normal<br />
| Add slot for middle-mouse drag, only defined for creative players in non-player inventories. (Note: the vanilla client will still incorrectly send this for non-creative players - see [https://bugs.mojang.com/browse/MC-46584 MC-46584])<br />
|-<br />
| 2<br />
| -999<br />
| Ending left mouse drag<br />
|-<br />
| 6<br />
| -999<br />
| Ending right mouse drag<br />
|-<br />
| 10<br />
| -999<br />
| Ending middle mouse drag, only defined for creative players in non-player inventories. (Note: the vanilla client will still incorrectly send this for non-creative players - see [https://bugs.mojang.com/browse/MC-46584 MC-46584])<br />
|-<br />
! 6<br />
| 0<br />
| Normal<br />
| Double click<br />
|}<br />
<br />
Starting from version 1.5, “painting mode” is available for use in inventory windows. It is done by picking up stack of something (more than 1 item), then holding mouse button (left, right or middle) and dragging held stack over empty (or same type in case of right button) slots. In that case client sends the following to server after mouse button release (omitting first pickup packet which is sent as usual):<br />
<br />
# packet with mode 5, slot -999, button (0 for left | 4 for right);<br />
# packet for every slot painted on, mode is still 5, button (1 | 5);<br />
# packet with mode 5, slot -999, button (2 | 6);<br />
<br />
If any of the painting packets other than the “progress” ones are sent out of order (for example, a start, some slots, then another start; or a left-click in the middle) the painting status will be reset.<br />
<br />
The server will send back a [[#Confirm Transaction (clientbound)|Confirm Transaction]] packet. If the click was not accepted, the client must send a matching [[#Confirm Transaction (serverbound)|serverbound confirm transaction]] packet before sending more [[#Click Window|Click Window]] packets, otherwise the server will reject them silently. The Notchian server also sends a [[#Window Items|Window Items]] packet for the open window and [[#Set Slot|Set Slot]] packets for the clicked and cursor slot, but only when the click was not accepted, probably to resynchronize client and server.<br />
<br />
==== Close Window (serverbound) ====<br />
<br />
This packet is sent by the client when closing a window.<br />
<br />
Notchian clients send a Close Window packet with Window ID 0 to close their inventory even though there is never an [[#Open Window|Open Window]] packet for the inventory.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x0A<br />
| Play<br />
| Server<br />
| Window ID<br />
| Unsigned Byte<br />
| This is the ID of the window that was closed. 0 for player inventory.<br />
|}<br />
<br />
==== Plugin Message (serverbound) ====<br />
<br />
{{Main|Plugin channels}}<br />
<br />
Mods and plugins can use this to send their data. Minecraft itself uses some [[plugin channel]]s. These internal channels are in the <code>minecraft</code> namespace.<br />
<br />
More documentation on this: [http://dinnerbone.com/blog/2012/01/13/minecraft-plugin-channels-messaging/ http://dinnerbone.com/blog/2012/01/13/minecraft-plugin-channels-messaging/]<br />
<br />
Note that the length of Data is known only from the packet length, since the packet has no length field of any kind.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x0B<br />
|rowspan="2"| Play<br />
|rowspan="2"| Server<br />
| Channel<br />
| Identifier<br />
| Name of the [[plugin channel]] used to send the data<br />
|-<br />
| Data<br />
| Byte Array<br />
| Any data, depending on the channel. <code>minecraft:</code> channels are documented [[plugin channel|here]]. The length of this array must be inferred from the packet length.<br />
|}<br />
<br />
==== Edit Book ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x0C<br />
|rowspan="3"| Play<br />
|rowspan="3"| Server<br />
| New book<br />
| [[Slot]]<br />
|<br />
|-<br />
| Is signing<br />
| Boolean<br />
| True if the player is signing the book; false if the player is saving a draft.<br />
|-<br />
| Hand<br />
| VarInt enum<br />
| 0: Main hand, 1: Off hand<br />
|}<br />
<br />
When editing a draft, the [[NBT]] section of the Slot contains this:<br />
<br />
<pre><br />
TAG_Compound(<nowiki>''</nowiki>): 1 entry<br />
{<br />
TAG_List('pages'): 2 entries<br />
{<br />
TAG_String(0): 'Something on Page 1'<br />
TAG_String(1): 'Something on Page 2'<br />
}<br />
}<br />
</pre><br />
<br />
When signing the book, it instead looks like this:<br />
<br />
<pre><br />
TAG_Compound(<nowiki>''</nowiki>): 3 entires<br />
{<br />
TAG_String('author'): 'Steve'<br />
TAG_String('title'): 'A Wonderful Book'<br />
TAG_List('pages'): 2 entries<br />
{<br />
TAG_String(0): 'Something on Page 1'<br />
TAG_String(1): 'Something on Page 2'<br />
}<br />
}<br />
</pre><br />
<br />
==== Entity NBT Request ====<br />
<br />
Used when <kbd>Shift</kbd>+<kbd>F3</kbd>+<kbd>I</kbd> is pressed while looking at an entity.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x0D<br />
|rowspan="2"| Play<br />
|rowspan="2"| Server<br />
| Transaction ID<br />
| VarInt<br />
| An incremental ID so that the client can verify that the response matches.<br />
|-<br />
| Entity ID<br />
| VarInt<br />
| The ID of the entity to query.<br />
|}<br />
<br />
==== Interact Entity ====<br />
<br />
This packet is sent from the client to the server when the client attacks or right-clicks another entity (a player, minecart, etc).<br />
<br />
A Notchian server only accepts this packet if the entity being attacked/used is visible without obstruction and within a 4-unit radius of the player's position.<br />
<br />
Note that middle-click in creative mode is interpreted by the client and sent as a [[#Creative Inventory Action|Creative Inventory Action]] packet instead.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="6"| 0x0E<br />
|rowspan="6"| Play<br />
|rowspan="6"| Server<br />
| Entity ID<br />
| VarInt<br />
| The ID of the entity to interact<br />
|-<br />
| Type<br />
| VarInt Enum<br />
| 0: interact, 1: attack, 2: interact at<br />
|-<br />
| Target X<br />
| Optional Float<br />
| Only if Type is interact at<br />
|-<br />
| Target Y<br />
| Optional Float<br />
| Only if Type is interact at<br />
|-<br />
| Target Z<br />
| Optional Float<br />
| Only if Type is interact at<br />
|-<br />
| Hand<br />
| Optional VarInt Enum<br />
| Only if Type is interact or interact at; 0: main hand, 1: off hand<br />
|}<br />
<br />
==== Keep Alive (serverbound) ====<br />
<br />
The server will frequently send out a keep-alive, each containing a random ID. The client must respond with the same packet.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x0F<br />
| Play<br />
| Server<br />
| Keep Alive ID<br />
| Long<br />
| <br />
|}<br />
<br />
==== Lock Difficulty ====<br />
<br />
Must have at least op level 2 to use. Appears to only be used on singleplayer; the difficulty buttons are still disabled in multiplayer.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x10<br />
|rowspan="1"| Play<br />
|rowspan="1"| Server<br />
| Locked<br />
| Boolean<br />
|<br />
|}<br />
<br />
==== Player Position ====<br />
<br />
Updates the player's XYZ position on the server.<br />
<br />
Checking for moving too fast is achieved like this:<br />
<br />
* Each server tick, the player's current position is stored<br />
* When a player moves, the changes in x, y, and z coordinates are compared with the positions from the previous tick (&Delta;x, &Delta;y, &Delta;z)<br />
* Total movement distance squared is computed as &Delta;x&sup2; + &Delta;y&sup2; + &Delta;z&sup2;<br />
* The expected movement distance squared is computed as velocityX&sup2; + veloctyY&sup2; + velocityZ&sup2;<br />
* If the total movement distance squared value minus the expected movement distance squared value is more than 100 (300 if the player is using an elytra), they are moving too fast.<br />
<br />
If the player is moving too fast, it will be logged that "<player> moved too quickly! " followed by the change in x, y, and z, and the player will be teleported back to their current (before this packet) serverside position.<br />
<br />
Also, if the absolute value of X or the absolute value of Z is a value greater than 3.2×10<sup>7</sup>, or X, Y, or Z are not finite (either positive infinity, negative infinity, or NaN), the client will be kicked for “Invalid move player packet received”.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x11<br />
|rowspan="4"| Play<br />
|rowspan="4"| Server<br />
| X<br />
| Double<br />
| Absolute position<br />
|-<br />
| Feet Y<br />
| Double<br />
| Absolute feet position, normally Head Y - 1.62 <br />
|-<br />
| Z<br />
| Double<br />
| Absolute position<br />
|-<br />
| On Ground<br />
| Boolean<br />
| True if the client is on the ground, false otherwise<br />
|}<br />
<br />
==== Player Position And Rotation (serverbound) ====<br />
<br />
A combination of [[#Player Rotation|Player Rotation]] and [[#Player Position|Player Position]].<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="6"| 0x12<br />
|rowspan="6"| Play<br />
|rowspan="6"| Server<br />
| X<br />
| Double<br />
| Absolute position<br />
|-<br />
| Feet Y<br />
| Double<br />
| Absolute feet position, normally Head Y - 1.62<br />
|-<br />
| Z<br />
| Double<br />
| Absolute position<br />
|-<br />
| Yaw<br />
| Float<br />
| Absolute rotation on the X Axis, in degrees<br />
|-<br />
| Pitch<br />
| Float<br />
| Absolute rotation on the Y Axis, in degrees<br />
|-<br />
| On Ground<br />
| Boolean<br />
| True if the client is on the ground, false otherwise<br />
|}<br />
<br />
==== Player Rotation ====<br />
[[File:Minecraft-trig-yaw.png|thumb|The unit circle for yaw]]<br />
[[File:Yaw.png|thumb|The unit circle of yaw, redrawn]]<br />
<br />
Updates the direction the player is looking in.<br />
<br />
Yaw is measured in degrees, and does not follow classical trigonometry rules. The unit circle of yaw on the XZ-plane starts at (0, 1) and turns counterclockwise, with 90 at (-1, 0), 180 at (0,-1) and 270 at (1, 0). Additionally, yaw is not clamped to between 0 and 360 degrees; any number is valid, including negative numbers and numbers greater than 360.<br />
<br />
Pitch is measured in degrees, where 0 is looking straight ahead, -90 is looking straight up, and 90 is looking straight down.<br />
<br />
The yaw and pitch of player (in degrees), standing at point (x0, y0, z0) and looking towards point (x, y, z) can be calculated with:<br />
<br />
dx = x-x0<br />
dy = y-y0<br />
dz = z-z0<br />
r = sqrt( dx*dx + dy*dy + dz*dz )<br />
yaw = -atan2(dx,dz)/PI*180<br />
if yaw < 0 then<br />
yaw = 360 + yaw<br />
pitch = -arcsin(dy/r)/PI*180<br />
<br />
You can get a unit vector from a given yaw/pitch via:<br />
<br />
x = -cos(pitch) * sin(yaw)<br />
y = -sin(pitch)<br />
z = cos(pitch) * cos(yaw)<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x13<br />
|rowspan="3"| Play<br />
|rowspan="3"| Server<br />
| Yaw<br />
| Float<br />
| Absolute rotation on the X Axis, in degrees<br />
|-<br />
| Pitch<br />
| Float<br />
| Absolute rotation on the Y Axis, in degrees<br />
|-<br />
| On Ground<br />
| Boolean<br />
| True if the client is on the ground, False otherwise<br />
|}<br />
<br />
==== Player Movement ====<br />
<br />
This packet as well as [[#Player Position|Player Position]], [[#Player Look|Player Look]], and [[#Player Position And Look 2|Player Position And Look]] are called the “serverbound movement packets”. Vanilla clients will send Player Position once every 20 ticks even for a stationary player.<br />
<br />
This packet is used to indicate whether the player is on ground (walking/swimming), or airborne (jumping/falling).<br />
<br />
When dropping from sufficient height, fall damage is applied when this state goes from false to true. The amount of damage applied is based on the point where it last changed from true to false. Note that there are several movement related packets containing this state.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x14<br />
|rowspan="1"| Play<br />
|rowspan="1"| Server<br />
| On Ground<br />
| Boolean<br />
| True if the client is on the ground, false otherwise<br />
|}<br />
<br />
==== Vehicle Move (serverbound) ====<br />
<br />
Sent when a player moves in a vehicle. Fields are the same as in [[#Player Position And Look (serverbound)|Player Position And Look]]. Note that all fields use absolute positioning and do not allow for relative positioning.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x15<br />
|rowspan="5"| Play<br />
|rowspan="5"| Server<br />
| X<br />
| Double<br />
| Absolute position (X coordinate)<br />
|-<br />
| Y<br />
| Double<br />
| Absolute position (Y coordinate)<br />
|-<br />
| Z<br />
| Double<br />
| Absolute position (Z coordinate)<br />
|-<br />
| Yaw<br />
| Float<br />
| Absolute rotation on the vertical axis, in degrees<br />
|-<br />
| Pitch<br />
| Float<br />
| Absolute rotation on the horizontal axis, in degrees<br />
|}<br />
<br />
==== Steer Boat ====<br />
<br />
Used to ''visually'' update whether boat paddles are turning. The server will update the [[Entities#Boat|Boat entity metadata]] to match the values here.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x16<br />
|rowspan="2"| Play<br />
|rowspan="2"| Server<br />
| Left paddle turning<br />
| Boolean<br />
|<br />
|-<br />
| Right paddle turning<br />
| Boolean<br />
|<br />
|}<br />
<br />
Right paddle turning is set to true when the left button or forward button is held; left paddle turning is set to true when the right button or forward button is set to true.<br />
<br />
==== Pick Item ====<br />
<br />
Used to swap out an empty space on the hotbar with the item in the given inventory slot. The Notchain client uses this for pick block functionality (middle click) to retrieve items from the inventory.<br />
<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x17<br />
|rowspan="1"| Play<br />
|rowspan="1"| Server<br />
| Slot to use<br />
| VarInt<br />
| See [[Inventory]]<br />
|}<br />
<br />
The server will first search the player's hotbar for an empty slot, starting from the current slot and looping around to the slot before it. If there are no empty slots, it will start a second search from the current slot and find the first slot that does not contain an enchanted item. If there still are no slots that meet that criteria, then the server will use the currently selected slot.<br />
<br />
After finding the appropriate slot, the server swaps the items and then send 3 packets:<br />
<br />
* [[Protocol#Set slot|Set Slot]], with window ID set to -2 and slot set to the newly chosen slot and the item set to the item that is now in that slot (which was previously at the slot the client requested)<br />
* Set Slot, with window ID set to -2 and slot set to the slot the player requested, with the item that is now in that slot and was previously on the hotbar slot<br />
* [[Protocol#Held_Item_Change_.28clientbound.29|Held Item Change]], with the slot set to the newly chosen slot.<br />
<br />
==== Craft Recipe Request ====<br />
<br />
This packet is sent when a player clicks a recipe in the crafting book that is craftable (white border).<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x18<br />
|rowspan="3"| Play<br />
|rowspan="3"| Server<br />
| Window ID<br />
| Byte<br />
|<br />
|-<br />
| Recipe<br />
| Identifier<br />
| A recipe ID<br />
|-<br />
| Make all<br />
| Boolean<br />
| Affects the amount of items processed; true if shift is down when clicked<br />
|}<br />
<br />
==== Player Abilities (serverbound) ====<br />
<br />
The latter 2 fields are used to indicate the walking and flying speeds respectively, while the first field is used to determine the value of 4 booleans.<br />
<br />
The vanilla client sends this packet when the player starts/stops flying with the Flags parameter changed accordingly. All other parameters are ignored by the vanilla server.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x19<br />
|rowspan="3"| Play<br />
|rowspan="3"| Server<br />
| Flags<br />
| Byte<br />
| Bit mask. 0x08: damage disabled (god mode), 0x04: can fly, 0x02: is flying, 0x01: is Creative<br />
|-<br />
| Flying Speed<br />
| Float<br />
| <br />
|-<br />
| Walking Speed<br />
| Float<br />
| <br />
|}<br />
<br />
==== Player Digging ====<br />
<br />
Sent when the player mines a block. A Notchian server only accepts digging packets with coordinates within a 6-unit radius between the center of the block and 1.5 units from the player's feet (''not'' their eyes).<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x1A<br />
|rowspan="3"| Play<br />
|rowspan="3"| Server<br />
| Status<br />
| VarInt Enum<br />
| The action the player is taking against the block (see below)<br />
|-<br />
| Location<br />
| Position<br />
| Block position<br />
|-<br />
| Face<br />
| Byte Enum<br />
| The face being hit (see below)<br />
|}<br />
<br />
Status can be one of seven values:<br />
<br />
{| class="wikitable"<br />
! Value<br />
! Meaning<br />
! Notes<br />
|-<br />
| 0<br />
| Started digging<br />
| <br />
|-<br />
| 1<br />
| Cancelled digging<br />
| Sent when the player lets go of the Mine Block key (default: left click)<br />
|-<br />
| 2<br />
| Finished digging<br />
| Sent when the client thinks it is finished<br />
|-<br />
| 3<br />
| Drop item stack<br />
| Triggered by using the Drop Item key (default: Q) with the modifier to drop the entire selected stack (default: depends on OS). Location is always set to 0/0/0, Face is always set to -Y.<br />
|-<br />
| 4<br />
| Drop item<br />
| Triggered by using the Drop Item key (default: Q). Location is always set to 0/0/0, Face is always set to -Y.<br />
|-<br />
| 5<br />
| Shoot arrow / finish eating<br />
| Indicates that the currently held item should have its state updated such as eating food, pulling back bows, using buckets, etc. Location is always set to 0/0/0, Face is always set to -Y.<br />
|-<br />
| 6<br />
| Swap item in hand<br />
| Used to swap or assign an item to the second hand. Location is always set to 0/0/0, Face is always set to -Y.<br />
|}<br />
<br />
The Face field can be one of the following values, representing the face being hit:<br />
<br />
{| class="wikitable"<br />
|-<br />
! Value<br />
! Offset<br />
! Face<br />
|-<br />
| 0<br />
| -Y<br />
| Bottom<br />
|-<br />
| 1<br />
| +Y<br />
| Top<br />
|-<br />
| 2<br />
| -Z<br />
| North<br />
|-<br />
| 3<br />
| +Z<br />
| South<br />
|-<br />
| 4<br />
| -X<br />
| West<br />
|-<br />
| 5<br />
| +X<br />
| East<br />
|}<br />
<br />
==== Entity Action ====<br />
<br />
Sent by the client to indicate that it has performed certain actions: sneaking (crouching), sprinting, exiting a bed, jumping with a horse, and opening a horse's inventory while riding it.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x1B<br />
|rowspan="3"| Play<br />
|rowspan="3"| Server<br />
| Entity ID<br />
| VarInt<br />
| Player ID<br />
|-<br />
| Action ID<br />
| VarInt Enum<br />
| The ID of the action, see below<br />
|-<br />
| Jump Boost<br />
| VarInt<br />
| Only used by the “start jump with horse” action, in which case it ranges from 0 to 100. In all other cases it is 0.<br />
|}<br />
<br />
Action ID can be one of the following values:<br />
<br />
{| class="wikitable"<br />
! ID<br />
! Action<br />
|-<br />
| 0<br />
| Start sneaking<br />
|-<br />
| 1<br />
| Stop sneaking<br />
|-<br />
| 2<br />
| Leave bed<br />
|-<br />
| 3<br />
| Start sprinting<br />
|-<br />
| 4<br />
| Stop sprinting<br />
|-<br />
| 5<br />
| Start jump with horse<br />
|-<br />
| 6<br />
| Stop jump with horse<br />
|-<br />
| 7<br />
| Open horse inventory<br />
|-<br />
| 8<br />
| Start flying with elytra<br />
|}<br />
<br />
Leave bed is only sent when the “Leave Bed” button is clicked on the sleep GUI, not when waking up due today time.<br />
<br />
Open horse inventory is only sent when pressing the inventory key (default: E) while on a horse — all other methods of opening a horse's inventory (involving right-clicking or shift-right-clicking it) do not use this packet.<br />
<br />
==== Steer Vehicle ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x1C<br />
|rowspan="3"| Play<br />
|rowspan="3"| Server<br />
| Sideways<br />
| Float<br />
| Positive to the left of the player<br />
|-<br />
| Forward<br />
| Float<br />
| Positive forward<br />
|-<br />
| Flags<br />
| Unsigned Byte<br />
| Bit mask. 0x1: jump, 0x2: unmount<br />
|}<br />
<br />
Also known as 'Input' packet.<br />
<br />
==== Recipe Book Data ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
!colspan="2"| Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="11"| 0x1D<br />
|rowspan="11"| Play<br />
|rowspan="11"| Server<br />
|colspan="2"| Type<br />
| VarInt<br />
| Determines the format of the rest of the packet<br />
|-<br />
! Type<br />
! Field Name<br />
! <br />
! <br />
|-<br />
| 0: Displayed Recipe<br />
| Recipe ID<br />
| Identifier<br />
| A recipe ID<br />
|-<br />
|rowspan="4"| 1: Recipe Book States<br />
| Crafting Recipe Book Open<br />
| Boolean<br />
| Whether the player has the crafting recipe book currently opened/active.<br />
|-<br />
| Crafting Recipe Filter Active<br />
| Boolean<br />
| Whether the player has the crafting recipe book filter option currently active.<br />
|-<br />
| Smelting Recipe Book Open<br />
| Boolean<br />
| Whether the player has the smelting recipe book currently opened/active.<br />
|-<br />
| Smelting Recipe Filter Active<br />
| Boolean<br />
| Whether the player has the smelting recipe book filter option currently active.<br />
|-<br />
| Blasting Recipe Book Open<br />
| Boolean<br />
| May be swapped with smoking recipe book. Also, the notchian client appears to use the same value for both of those books currently.<br />
|-<br />
| Blasting Recipe Filter Active<br />
| Boolean<br />
| May be swapped with smoking recipe book. Also, the notchian client appears to use the same value for both of those books currently.<br />
|-<br />
| Smoking Recipe Book Open<br />
| Boolean<br />
|<br />
|-<br />
| Smoking Recipe Filter Active<br />
| Boolean<br />
|<br />
|}<br />
<br />
The Recipe Book Status type is sent when one of the states changes.<br />
<br />
==== Name Item ====<br />
<br />
Sent as a player is renaming an item in an anvil (each keypress in the anvil UI sends a new Name Item packet). If the new name is empty, then the item loses its custom name (this is different from setting the custom name to the normal name of the item). The item name may be no longer than 35 characters long, and if it is longer than that, then the rename is silently ignored.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x1E<br />
|rowspan="1"| Play<br />
|rowspan="1"| Server<br />
| Item name<br />
| String (32767)<br />
| The new name of the item<br />
|}<br />
<br />
==== Resource Pack Status ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x1F<br />
|rowspan="1"| Play<br />
|rowspan="1"| Server<br />
| Result<br />
| VarInt Enum<br />
| 0: successfully loaded, 1: declined, 2: failed download, 3: accepted<br />
|}<br />
<br />
==== Advancement Tab ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x20<br />
|rowspan="2"| Play<br />
|rowspan="2"| Server<br />
| Action<br />
| VarInt enum<br />
| 0: Opened tab, 1: Closed screen<br />
|-<br />
| Tab ID<br />
| Optional identifier<br />
| Only present if action is Opened tab<br />
|}<br />
<br />
==== Select Trade ====<br />
<br />
When a player selects a specific trade offered by a villager NPC.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x21<br />
|rowspan="1"| Play<br />
|rowspan="1"| Server<br />
| Selected slot<br />
| VarInt<br />
| The selected slot int the players current (trading) inventory. (Was a full Integer for the plugin message)<br />
|}<br />
<br />
==== Set Beacon Effect ====<br />
<br />
Changes the effect of the current beacon.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x22<br />
|rowspan="2"| Play<br />
|rowspan="2"| Server<br />
| Primary Effect<br />
| VarInt<br />
| A [http://minecraft.gamepedia.com/Data_values#Potions Potion ID]. (Was a full Integer for the plugin message)<br />
|-<br />
| Secondary Effect<br />
| VarInt<br />
| A [http://minecraft.gamepedia.com/Data_values#Potions Potion ID]. (Was a full Integer for the plugin message)<br />
|}<br />
<br />
==== Held Item Change (serverbound) ====<br />
<br />
Sent when the player changes the slot selection<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x23<br />
|rowspan="1"| Play<br />
|rowspan="1"| Server<br />
| Slot<br />
| Short<br />
| The slot which the player has selected (0–8)<br />
|}<br />
<br />
==== Update Command Block ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x24<br />
|rowspan="5"| Play<br />
|rowspan="5"| Server<br />
|-<br />
| Location<br />
| Position<br />
|<br />
|-<br />
| Command<br />
| String (32767)<br />
|<br />
|-<br />
| Mode || VarInt enum || One of SEQUENCE (0), AUTO (1), or REDSTONE (2) <br />
|-<br />
| Flags<br />
| Byte<br />
| 0x01: Track Output (if false, the output of the previous command will not be stored within the command block); 0x02: Is conditional; 0x04: Automatic<br />
|}<br />
<br />
==== Update Command Block Minecart ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x25<br />
|rowspan="3"| Play<br />
|rowspan="3"| Server<br />
| Entity ID<br />
| VarInt<br />
|<br />
|-<br />
| Command<br />
| String<br />
|<br />
|-<br />
| Track Output<br />
| Boolean<br />
| If false, the output of the previous command will not be stored within the command block.<br />
|}<br />
<br />
==== Creative Inventory Action ====<br />
<br />
While the user is in the standard inventory (i.e., not a crafting bench) in Creative mode, the player will send this packet.<br />
<br />
Clicking in the creative inventory menu is quite different from non-creative inventory management. Picking up an item with the mouse actually deletes the item from the server, and placing an item into a slot or dropping it out of the inventory actually tells the server to create the item from scratch. (This can be verified by clicking an item that you don't mind deleting, then severing the connection to the server; the item will be nowhere to be found when you log back in.) As a result of this implementation strategy, the "Destroy Item" slot is just a client-side implementation detail that means "I don't intend to recreate this item.". Additionally, the long listings of items (by category, etc.) are a client-side interface for choosing which item to create. Picking up an item from such listings sends no packets to the server; only when you put it somewhere does it tell the server to create the item in that location.<br />
<br />
This action can be described as "set inventory slot". Picking up an item sets the slot to item ID -1. Placing an item into an inventory slot sets the slot to the specified item. Dropping an item (by clicking outside the window) effectively sets slot -1 to the specified item, which causes the server to spawn the item entity, etc.. All other inventory slots are numbered the same as the non-creative inventory (including slots for the 2x2 crafting menu, even though they aren't visible in the vanilla client).<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x26<br />
|rowspan="2"| Play<br />
|rowspan="2"| Server<br />
| Slot<br />
| Short<br />
| Inventory slot<br />
|-<br />
| Clicked Item<br />
| [[Slot Data|Slot]]<br />
| <br />
|}<br />
<br />
==== Update Jigsaw Block ====<br />
<br />
Sent when Done is pressed on the {{Minecraft Wiki|Jigsaw Block}} interface.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x27<br />
|rowspan="4"| Play<br />
|rowspan="4"| Server<br />
| Location<br />
| Position<br />
| Block entity location<br />
|-<br />
| Attachment type<br />
| Identifier<br />
| <br />
|- <br />
| Target pool<br />
| Identifier<br />
| <br />
|-<br />
| Final state<br />
| String<br />
| "Turns into" on the GUI, <code>final_state</code> in NBT<br />
|}<br />
<br />
==== Update Structure Block ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="17"| 0x28<br />
|rowspan="17"| Play<br />
|rowspan="17"| Server<br />
|-<br />
| Location<br />
| Position<br />
| Block entity location<br />
|-<br />
| Action<br />
| VarInt enum<br />
| An additional action to perform beyond simply saving the given data; see below<br />
|-<br />
| Mode<br />
| VarInt enum<br />
| One of SAVE (0), LOAD (1), CORNER (2), DATA (3).<br />
|-<br />
| Name<br />
| String<br />
|<br />
|-<br />
| Offset X || Byte<br />
| Between -32 and 32<br />
|-<br />
| Offset Y || Byte<br />
| Between -32 and 32<br />
|-<br />
| Offset Z || Byte<br />
| Between -32 and 32<br />
|-<br />
| Size X || Byte<br />
| Between 0 and 32<br />
|-<br />
| Size Y || Byte<br />
| Between 0 and 32<br />
|-<br />
| Size Z || Byte<br />
| Between 0 and 32<br />
|-<br />
| Mirror<br />
| VarInt enum<br />
| One of NONE (0), LEFT_RIGHT (1), FRONT_BACK (2).<br />
|-<br />
| Rotation<br />
| VarInt enum<br />
| One of NONE (0), CLOCKWISE_90 (1), CLOCKWISE_180 (2), COUNTERCLOCKWISE_90 (3).<br />
|-<br />
| Metadata<br />
| String<br />
| <br />
|-<br />
| Integrity<br />
| Float<br />
| Between 0 and 1<br />
|-<br />
|Seed<br />
|VarLong<br />
|<br />
|-<br />
| Flags<br />
| Byte<br />
| 0x01: Ignore entities; 0x02: Show air; 0x04: Show bounding box<br />
|}<br />
<br />
Possible actions:<br />
<br />
* 0 - Update data<br />
* 1 - Save the structure<br />
* 2 - Load the structure<br />
* 3 - Detect size<br />
<br />
The Notchian client uses update data to indicate no special action should be taken (i.e. the done button).<br />
<br />
==== Update Sign ====<br />
<br />
{{anchor|Update Sign (serverbound)}}This message is sent from the client to the server when the “Done” button is pushed after placing a sign.<br />
<br />
The server only accepts this packet after [[#Open Sign Editor|Open Sign Editor]], otherwise this packet is silently ignored.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x29<br />
|rowspan="5"| Play<br />
|rowspan="5"| Server<br />
| Location<br />
| Position<br />
| Block Coordinates<br />
|-<br />
| Line 1<br />
| String (384)<br />
| First line of text in the sign<br />
|-<br />
| Line 2<br />
| String (384)<br />
| Second line of text in the sign<br />
|-<br />
| Line 3<br />
| String (384)<br />
| Third line of text in the sign<br />
|-<br />
| Line 4<br />
| String (384)<br />
| Fourth line of text in the sign<br />
|}<br />
<br />
==== Animation (serverbound) ====<br />
<br />
Sent when the player's arm swings.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x2A<br />
| Play<br />
| Server<br />
| Hand<br />
| VarInt Enum<br />
| Hand used for the animation. 0: main hand, 1: off hand.<br />
|}<br />
<br />
==== Spectate ====<br />
<br />
Teleports the player to the given entity. The player must be in spectator mode.<br />
<br />
The Notchian client only uses this to teleport to players, but it appears to accept any type of entity. The entity does not need to be in the same dimension as the player; if necessary, the player will be respawned in the right world. If the given entity cannot be found (or isn't loaded), this packet will be ignored. It will also be ignored if the player attempts to teleport to themselves.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x2B<br />
|rowspan="1"| Play<br />
|rowspan="1"| Server<br />
| Target Player<br />
| UUID<br />
| UUID of the player to teleport to (can also be an entity UUID)<br />
|}<br />
<br />
==== Player Block Placement ====<br />
<br />
{| class="wikitable"<br />
|-<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="7"| 0x2C<br />
|rowspan="7"| Play<br />
|rowspan="7"| Server<br />
| Hand<br />
| VarInt Enum<br />
| The hand from which the block is placed; 0: main hand, 1: off hand<br />
|-<br />
| Location<br />
| Position<br />
| Block position<br />
|-<br />
| Face<br />
| VarInt Enum<br />
| The face on which the block is placed (as documented at [[#Player Digging|Player Digging]])<br />
|-<br />
| Cursor Position X<br />
| Float<br />
| The position of the crosshair on the block, from 0 to 1 increasing from west to east<br />
|-<br />
| Cursor Position Y<br />
| Float<br />
| The position of the crosshair on the block, from 0 to 1 increasing from bottom to top<br />
|-<br />
| Cursor Position Z<br />
| Float<br />
| The position of the crosshair on the block, from 0 to 1 increasing from north to south<br />
|-<br />
| Inside block<br />
| Boolean<br />
| True when the player's head is inside of a block.<br />
|}<br />
<br />
Upon placing a block, this packet is sent once.<br />
<br />
The Cursor Position X/Y/Z fields (also known as in-block coordinates) are calculated using raytracing. The unit corresponds to sixteen pixels in the default resource pack. For example, let's say a slab is being placed against the south face of a full block. The Cursor Position X will be higher if the player was pointing near the right (east) edge of the face, lower if pointing near the left. The Cursor Position Y will be used to determine whether it will appear as a bottom slab (values 0.0–0.5) or as a top slab (values 0.5-1.0). The Cursor Position Z should be 1.0 since the player was looking at the southernmost part of the block.<br />
<br />
Inside block is true when a player's head (specifically eyes) are inside of a block's collision. In 1.13 and later versions, collision is rather complicated and individual blocks can have multiple collision boxes. For instance, a ring of vines has a non-colliding hole in the middle. This value is only true when the player is directly in the box. In practice, though, this value is only used by scaffolding to place in front of the player when sneaking inside of it (other blocks will place behind when you intersect with them -- try with glass for instance). <br />
<br />
==== Use Item ====<br />
<br />
Sent when pressing the Use Item key (default: right click) with an item in hand.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x2D<br />
| Play<br />
| Server<br />
| Hand<br />
| VarInt Enum<br />
| Hand used for the animation. 0: main hand, 1: off hand.<br />
|}<br />
<br />
[[Category:Protocol Details]]<br />
[[Category:Minecraft Modern]]</div>Orladoghttps://wiki.vg/index.php?title=Protocol&diff=15875Protocol2020-06-23T15:22:49Z<p>Orladog: Update terminology and add link to Bedrock page</p>
<hr />
<div>{{Box<br />
|BORDER = #9999FF<br />
|BACKGROUND = #99CCFF<br />
|WIDTH = 100%<br />
|ICON = <br />
|HEADING = Heads up!<br />
|CONTENT = This article is about the protocol for the latest '''stable''' release of Minecraft '''Java Edition''' ([[Protocol version numbers|1.15.2, protocol 578]]). For the Java Edition pre-releases, see [[Pre-release protocol]]. For the imcomplete Bedrock Edition docs, see [[Bedrock Protocol]]. For the old Pocket Edition, see [[Pocket Edition Protocol Documentation]].<br />
}}<br />
<br />
This page presents a dissection of the current '''[https://minecraft.net/ Minecraft] protocol'''.<br />
<br />
If you're having trouble, check out the [[Protocol FAQ|FAQ]] or ask for help in the IRC channel [ircs://chat.freenode.net:6697/mcdevs #mcdevs on chat.freenode.net] ([http://wiki.vg/MCDevs More Information]).<br />
<br />
'''Note:''' While you may use the contents of this page without restriction to create servers, clients, bots, etc… you still need to provide attribution to #mcdevs if you copy any of the contents of this page for publication elsewhere.<br />
<br />
The changes between versions may be viewed at [[Protocol History]].<br />
<br />
== Definitions ==<br />
<br />
The Minecraft server accepts connections from TCP clients and communicates with them using ''packets''. A packet is a sequence of bytes sent over the TCP connection. The meaning of a packet depends both on its packet ID and the current state of the connection. The initial state of each connection is [[#Handshaking|Handshaking]], and state is switched using the packets [[#Handshake|Handshake]] and [[#Login Success|Login Success]].<br />
<br />
=== Data types ===<br />
<br />
{{:Data types}} <!-- Transcluded contents of Data types article in here — go to that page if you want to edit it --><br />
<br />
=== Other definitions ===<br />
<br />
{| class="wikitable"<br />
|-<br />
! Term<br />
! Definition<br />
|-<br />
| Player<br />
| When used in the singular, Player always refers to the client connected to the server.<br />
|-<br />
| Entity<br />
| Entity refers to any item, player, mob, minecart or boat etc. See {{Minecraft Wiki|Entity|the Minecraft Wiki article}} for a full list.<br />
|-<br />
| EID<br />
| An EID — or Entity ID — is a 4-byte sequence used to identify a specific entity. An entity's EID is unique on the entire server.<br />
|-<br />
| XYZ<br />
| In this document, the axis names are the same as those shown in the debug screen (F3). Y points upwards, X points east, and Z points south.<br />
|-<br />
| Meter<br />
| The meter is Minecraft's base unit of length, equal to the length of a vertex of a solid block. The term “block” may be used to mean “meter” or “cubic meter”.<br />
|-<br />
| Global palette<br />
| A table/dictionary/palette mapping nonnegative integers to block states. Block state IDs are created in a linear fashion based off of order of assignment. One block state ID allocated for each unique block state for a block; if a block has multiple properties then the number of allocated states is the product of the number of values for each property. A current list of properties and state ID ranges is found on [https://pokechu22.github.io/Burger/1.15.2.html burger].<br />
<br />
Alternatively, the vanilla server now includes an option to export the current block state ID mapping, by running <code>java -cp minecraft_server.jar net.minecraft.data.Main --reports</code>. See [[Data Generators]] for more information.<br />
|-<br />
| Notchian<br />
| The official implementation of vanilla Minecraft as developed and released by Mojang.<br />
|}<br />
<br />
== Packet format ==<br />
<br />
=== Without compression ===<br />
<br />
{| class="wikitable"<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| Length<br />
| VarInt<br />
| Length of Packet ID + Data<br />
|-<br />
| Packet ID<br />
| VarInt<br />
| <br />
|-<br />
| Data<br />
| Byte Array<br />
| Depends on the connection state and packet ID, see the sections below<br />
|}<br />
<br />
=== With compression ===<br />
<br />
Once a [[#Set Compression|Set Compression]] packet (with a non-negative threshold) is sent, [[wikipedia:Zlib|zlib]] compression is enabled for all following packets. The format of a packet changes slighty to include the size of the uncompressed packet.<br />
<br />
{| class=wikitable<br />
! Compressed?<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| No<br />
| Packet Length<br />
| VarInt<br />
| Length of Data Length + compressed length of (Packet ID + Data)<br />
|-<br />
| No<br />
| Data Length<br />
| VarInt<br />
| Length of uncompressed (Packet ID + Data) or 0<br />
|-<br />
|rowspan="2"| Yes<br />
| Packet ID<br />
| VarInt<br />
| zlib compressed packet ID (see the sections below)<br />
|-<br />
| Data<br />
| Byte Array<br />
| zlib compressed packet data (see the sections below)<br />
|}<br />
<br />
The length given by the Packet Length field is the number of bytes that remain in that packet, including the Data Length field.<br />
<br />
If Data Length is set to zero, then the packet is uncompressed; otherwise it is the size of the uncompressed packet.<br />
<br />
If compressed, the uncompressed length of (Packet ID + Data) must be equal to or over the threshold set in the packet [[#Set Compression|Set Compression]], otherwise the receiving party will disconnect.<br />
<br />
Compression can be disabled by sending the packet [[#Set Compression|Set Compression]] with a negative Threshold, or not sending the Set Compression packet at all.<br />
<br />
== Handshaking ==<br />
<br />
=== Clientbound ===<br />
<br />
There are no clientbound packets in the Handshaking state, since the protocol immediately switches to a different state after the client sends the first packet.<br />
<br />
=== Serverbound ===<br />
<br />
==== Handshake ====<br />
<br />
This causes the server to switch into the target state.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x00<br />
|rowspan="4"| Handshaking<br />
|rowspan="4"| Server<br />
| Protocol Version<br />
| VarInt<br />
| See [[protocol version numbers]] (currently 578 in Minecraft 1.15.2)<br />
|-<br />
| Server Address<br />
| String (255)<br />
| Hostname or IP, e.g. localhost or 127.0.0.1, that was used to connect. The Notchian server does not use this information. Note that SRV records are a complete redirect, e.g. if _minecraft._tcp.example.com points to mc.example.org, users connecting to example.com will provide mc.example.org as server address in addition to connecting to it.<br />
|- <br />
| Server Port<br />
| Unsigned Short<br />
| Default is 25565. The Notchian server does not use this information.<br />
|-<br />
| Next State<br />
| VarInt Enum<br />
| 1 for [[#Status|status]], 2 for [[#Login|login]]<br />
|}<br />
<br />
==== Legacy Server List Ping ====<br />
<br />
{{Warning|This packet uses a nonstandard format. It is never length-prefixed, and the packet ID is an Unsigned Byte instead of a VarInt.}}<br />
<br />
While not technically part of the current protocol, legacy clients may send this packet to initiate [[Server List Ping]], and modern servers should handle it correctly.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0xFE<br />
| Handshaking<br />
| Server<br />
| Payload<br />
| Unsigned Byte<br />
| always 1 (<code>0x01</code>)<br />
|}<br />
<br />
See [[Server List Ping#1.6]] for the details of the protocol that follows this packet.<br />
<br />
== Status ==<br />
{{Main|Server List Ping}}<br />
<br />
=== Clientbound ===<br />
<br />
==== Response ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x00<br />
|rowspan="2"| Status<br />
|rowspan="2"| Client<br />
| JSON Length<br />
| VarInt<br />
|-<br />
| JSON Response<br />
| String (32767)<br />
| See [[Server List Ping#Response]]<br />
|}<br />
<br />
==== Pong ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x01<br />
|rowspan="1"| Status<br />
|rowspan="1"| Client<br />
| Payload<br />
| Long<br />
| Should be the same as sent by the client<br />
|}<br />
<br />
=== Serverbound ===<br />
<br />
==== Request ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x00<br />
| Status<br />
| Server<br />
|colspan="3"| ''no fields''<br />
|}<br />
<br />
==== Ping ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x01<br />
|rowspan="1"| Status<br />
|rowspan="1"| Server<br />
| Payload<br />
| Long<br />
| May be any number. Notchian clients use a system-dependent time value which is counted in milliseconds.<br />
|}<br />
<br />
== Login ==<br />
<br />
The login process is as follows:<br />
<br />
# C→S: [[#Handshake|Handshake]] with Next State set to 2 (login)<br />
# C→S: [[#Login Start|Login Start]]<br />
# S→C: [[#Encryption Request|Encryption Request]]<br />
# Client auth<br />
# C→S: [[#Encryption Response|Encryption Response]]<br />
# Server auth, both enable encryption<br />
# S→C: [[#Set Compression|Set Compression]] (optional)<br />
# S→C: [[#Login Success|Login Success]]<br />
<br />
Set Compression, if present, must be sent before Login Success. Note that anything sent after Set Compression must use the [[#With_compression|Post Compression packet format]].<br />
<br />
For unauthenticated ("cracked"/offline-mode) and localhost connections (either of the two conditions is enough for an unencrypted connection) there is no encryption. In that case [[#Login Start|Login Start]] is directly followed by [[#Login Success|Login Success]].<br />
<br />
See [[Protocol Encryption]] for details.<br />
<br />
=== Clientbound ===<br />
<br />
==== Disconnect (login) ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x00<br />
|rowspan="1"| Login<br />
|rowspan="1"| Client<br />
| Reason<br />
| [[Chat]]<br />
| <br />
|}<br />
<br />
==== Encryption Request ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x01<br />
|rowspan="5"| Login<br />
|rowspan="5"| Client<br />
| Server ID<br />
| String (20)<br />
| Appears to be empty<br />
|-<br />
| Public Key Length<br />
| VarInt<br />
| Length of Public Key<br />
|-<br />
| Public Key<br />
| Byte Array<br />
| <br />
|-<br />
| Verify Token Length<br />
| VarInt<br />
| Length of Verify Token. Always 4 for Notchian servers.<br />
|-<br />
| Verify Token<br />
| Byte Array<br />
| A sequence of random bytes generated by the server<br />
|}<br />
<br />
See [[Protocol Encryption]] for details.<br />
<br />
==== Login Success ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x02<br />
|rowspan="2"| Login<br />
|rowspan="2"| Client<br />
| UUID<br />
| String (36)<br />
| Unlike in other packets, this field contains the UUID as a string with hyphens.<br />
|-<br />
| Username<br />
| String (16)<br />
| <br />
|}<br />
<br />
This packet switches the connection state to [[#Play|play]].<br />
<br />
{{Warning2|The (notchian) server might take a bit to fully transition to the Play state, so it's recommended to wait before sendings Play packets, either by setting a timeout, or waiting for Play packets from the server (usually [[#Player Info|Player Info]]).<br />
<br />
The notchian client doesn't send any (non-[[#Keep Alive|keep alive]]) packets until the next tick/[[#Time Update|time update]] packet.<br />
}}<br />
<br />
==== Set Compression ====<br />
<br />
Enables compression. If compression is enabled, all following packets are encoded in the [[#With compression|compressed packet format]]. Negative or zero values will disable compression, meaning the packet format should remain in the [[#Without compression|uncompressed packet format]]. However, this packet is entirely optional, and if not sent, compression will also not be enabled (the notchian server does not send the packet when compression is disabled).<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x03<br />
|rowspan="1"| Login<br />
|rowspan="1"| Client<br />
| Threshold<br />
| VarInt<br />
| Maximum size of a packet before it is compressed<br />
|}<br />
<br />
==== Login Plugin Request ====<br />
<br />
Used to implement a custom handshaking flow together with [[#Login_Plugin_Response | Login Plugin Response]].<br />
<br />
Unlike plugin messages in "play" mode, these messages follow a lock-step request/response scheme, where the client is expected to respond to a request indicating whether it understood. The notchian client always responds that it hasn't understood, and sends an empty payload.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x04<br />
|rowspan="3"| Login<br />
|rowspan="3"| Client<br />
| Message ID<br />
| VarInt<br />
| Generated by the server - should be unique to the connection.<br />
|-<br />
| Channel<br />
| Identifier<br />
| Name of the [[plugin channel]] used to send the data<br />
|-<br />
| Data<br />
| Byte Array<br />
| Any data, depending on the channel. The length of this array must be inferred from the packet length.<br />
|}<br />
<br />
=== Serverbound ===<br />
<br />
==== Login Start ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x00<br />
|rowspan="1"| Login<br />
|rowspan="1"| Server<br />
| Name<br />
| String (16)<br />
| Player's Username<br />
|}<br />
<br />
==== Encryption Response ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x01<br />
|rowspan="4"| Login<br />
|rowspan="4"| Server<br />
| Shared Secret Length<br />
| VarInt<br />
| Length of Shared Secret<br />
|-<br />
| Shared Secret<br />
| Byte Array<br />
| <br />
|-<br />
| Verify Token Length<br />
| VarInt<br />
| Length of Verify Token<br />
|-<br />
| Verify Token<br />
| Byte Array<br />
| <br />
|}<br />
<br />
See [[Protocol Encryption]] for details.<br />
<br />
==== Login Plugin Response ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x02<br />
|rowspan="3"| Login<br />
|rowspan="3"| Server<br />
| Message ID<br />
| VarInt<br />
| Should match ID from server.<br />
|-<br />
| Successful<br />
| Boolean<br />
| <code>true</code> if the client understands the request, <code>false</code> otherwise. When <code>false</code>, no payload follows.<br />
|-<br />
| Data<br />
| Optional Byte Array<br />
| Any data, depending on the channel. The length of this array must be inferred from the packet length.<br />
|}<br />
<br />
== Play ==<br />
<br />
=== Clientbound ===<br />
<br />
==== Spawn Entity ====<br />
<br />
Sent by the server when a vehicle or other non-living entity is created.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="12"| 0x00<br />
|rowspan="12"| Play<br />
|rowspan="12"| Client<br />
| Entity ID<br />
| VarInt<br />
| EID of the entity<br />
|-<br />
| Object UUID<br />
| UUID<br />
| <br />
|-<br />
| Type<br />
| VarInt<br />
| The type of entity (same as in [[#Spawn Living Entity|Spawn Living Entity]])<br />
|-<br />
| X<br />
| Double<br />
| <br />
|-<br />
| Y<br />
| Double<br />
| <br />
|-<br />
| Z<br />
| Double<br />
| <br />
|-<br />
| Pitch<br />
| Angle<br />
| <br />
|-<br />
| Yaw<br />
| Angle<br />
| <br />
|-<br />
| Data<br />
| Int<br />
| Meaning dependent on the value of the Type field, see [[Object Data]] for details.<br />
|-<br />
| Velocity X<br />
| Short<br />
|rowspan="3"| Same units as [[#Entity Velocity|Entity Velocity]]. Always sent, but only used when Data is greater than 0 (except for some entities which always ignore it; see [[Object Data]] for details).<br />
|-<br />
| Velocity Y<br />
| Short<br />
|-<br />
| Velocity Z<br />
| Short<br />
|}<br />
<br />
==== Spawn Experience Orb ====<br />
<br />
Spawns one or more experience orbs.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x01<br />
|rowspan="5"| Play<br />
|rowspan="5"| Client<br />
| Entity ID<br />
| VarInt<br />
| <br />
|-<br />
| X<br />
| Double<br />
| <br />
|-<br />
| Y<br />
| Double<br />
| <br />
|-<br />
| Z<br />
| Double<br />
| <br />
|-<br />
| Count<br />
| Short<br />
| The amount of experience this orb will reward once collected<br />
|}<br />
<br />
==== Spawn Weather Entity ====<br />
<br />
With this packet, the server notifies the client of thunderbolts striking within a 512 block radius around the player. The coordinates specify where exactly the thunderbolt strikes.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x02<br />
|rowspan="5"| Play<br />
|rowspan="5"| Client<br />
| Entity ID<br />
| VarInt<br />
| The EID of the thunderbolt<br />
|-<br />
| Type<br />
| Byte Enum<br />
| The global entity type, currently always 1 for thunderbolt<br />
|-<br />
| X<br />
| Double<br />
| <br />
|-<br />
| Y<br />
| Double<br />
| <br />
|-<br />
| Z<br />
| Double<br />
| <br />
|}<br />
<br />
==== Spawn Living Entity ====<br />
<br />
Sent by the server when a living entity is spawned.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="12"| 0x03<br />
|rowspan="12"| Play<br />
|rowspan="12"| Client<br />
| Entity ID<br />
| VarInt<br />
| <br />
|-<br />
| Entity UUID<br />
| UUID<br />
| <br />
|-<br />
| Type<br />
| VarInt<br />
| The type of mob. See [[Entities#Mobs]]<br />
|-<br />
| X<br />
| Double<br />
| <br />
|-<br />
| Y<br />
| Double<br />
| <br />
|-<br />
| Z<br />
| Double<br />
| <br />
|-<br />
| Yaw<br />
| Angle<br />
| <br />
|-<br />
| Pitch<br />
| Angle<br />
| <br />
|-<br />
| Head Pitch<br />
| Angle<br />
| <br />
|-<br />
| Velocity X<br />
| Short<br />
| Same units as [[#Entity Velocity|Entity Velocity]]<br />
|-<br />
| Velocity Y<br />
| Short<br />
| Same units as [[#Entity Velocity|Entity Velocity]]<br />
|-<br />
| Velocity Z<br />
| Short<br />
| Same units as [[#Entity Velocity|Entity Velocity]]<br />
|}<br />
<br />
==== Spawn Painting ====<br />
<br />
This packet shows location, name, and type of painting.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x04<br />
|rowspan="5"| Play<br />
|rowspan="5"| Client<br />
| Entity ID<br />
| VarInt<br />
| <br />
|-<br />
| Entity UUID<br />
| UUID<br />
| <br />
|-<br />
| Motive<br />
| VarInt<br />
| Panting's ID, see below<br />
|-<br />
| Location<br />
| Position<br />
| Center coordinates (see below)<br />
|-<br />
| Direction<br />
| Byte Enum<br />
| Direction the painting faces (North = 2, South = 0, West = 1, East = 3)<br />
|}<br />
<br />
Calculating the center of an image: given a (width × height) grid of cells, with <code>(0, 0)</code> being the top left corner, the center is <code>(max(0, width / 2 - 1), height / 2)</code>. E.g. <code>(1, 0)</code> for a 2×1 painting, or <code>(1, 2)</code> for a 4×4 painting.<br />
<br />
List of paintings by coordinates in <code>paintings_kristoffer_zetterstrand.png</code> (where x and y are in pixels from the top left and width and height are in pixels or 16ths of a block):<br />
<br />
{| class="wikitable"<br />
! Name<br />
! ID<br />
! x<br />
! y<br />
! width<br />
! height<br />
|-<br />
| <code>minecraft:kebab</code><br />
| 0<br />
| 0<br />
| 0<br />
| 16<br />
| 16<br />
|-<br />
| <code>minecraft:aztec</code><br />
| 1<br />
| 16<br />
| 0<br />
| 16<br />
| 16<br />
|-<br />
| <code>minecraft:alban</code><br />
| 2<br />
| 32<br />
| 0<br />
| 16<br />
| 16<br />
|-<br />
| <code>minecraft:aztec2</code><br />
| 3<br />
| 48<br />
| 0<br />
| 16<br />
| 16<br />
|-<br />
| <code>minecraft:bomb</code><br />
| 4<br />
| 64<br />
| 0<br />
| 16<br />
| 16<br />
|-<br />
| <code>minecraft:plant</code><br />
| 5<br />
| 80<br />
| 0<br />
| 16<br />
| 16<br />
|-<br />
| <code>minecraft:wasteland</code><br />
| 6<br />
| 96<br />
| 0<br />
| 16<br />
| 16<br />
|-<br />
| <code>minecraft:pool</code><br />
| 7<br />
| 0<br />
| 32<br />
| 32<br />
| 16<br />
|-<br />
| <code>minecraft:courbet</code><br />
| 8<br />
| 32<br />
| 32<br />
| 32<br />
| 16<br />
|-<br />
| <code>minecraft:sea</code><br />
| 9<br />
| 64<br />
| 32<br />
| 32<br />
| 16<br />
|-<br />
| <code>minecraft:sunset</code><br />
| 10<br />
| 96<br />
| 32<br />
| 32<br />
| 16<br />
|-<br />
| <code>minecraft:creebet</code><br />
| 11<br />
| 128<br />
| 32<br />
| 32<br />
| 16<br />
|-<br />
| <code>minecraft:wanderer</code><br />
| 12<br />
| 0<br />
| 64<br />
| 16<br />
| 32<br />
|-<br />
| <code>minecraft:graham</code><br />
| 13<br />
| 16<br />
| 64<br />
| 16<br />
| 32<br />
|-<br />
| <code>minecraft:match</code><br />
| 14<br />
| 0<br />
| 128<br />
| 32<br />
| 32<br />
|-<br />
| <code>minecraft:bust</code><br />
| 15<br />
| 32<br />
| 128<br />
| 32<br />
| 32<br />
|-<br />
| <code>minecraft:stage</code><br />
| 16<br />
| 64<br />
| 128<br />
| 32<br />
| 32<br />
|-<br />
| <code>minecraft:void</code><br />
| 17<br />
| 96<br />
| 128<br />
| 32<br />
| 32<br />
|-<br />
| <code>skull_and_roses</code><br />
| 18<br />
| 128<br />
| 128<br />
| 32<br />
| 32<br />
|-<br />
| <code>minecraft:wither</code><br />
| 19<br />
| 160<br />
| 128<br />
| 32<br />
| 32<br />
|-<br />
| <code>minecraft:fighters</code><br />
| 20<br />
| 0<br />
| 96<br />
| 64<br />
| 32<br />
|-<br />
| <code>minecraft:pointer</code><br />
| 21<br />
| 0<br />
| 192<br />
| 64<br />
| 64<br />
|-<br />
| <code>minecraft:pigscene</code><br />
| 22<br />
| 64<br />
| 192<br />
| 64<br />
| 64<br />
|-<br />
| <code>minecraft:burning_skull</code><br />
| 23<br />
| 128<br />
| 192<br />
| 64<br />
| 64<br />
|-<br />
| <code>minecraft:skeleton</code><br />
| 24<br />
| 192<br />
| 64<br />
| 64<br />
| 48<br />
|-<br />
| <code>minecraft:donkey_kong</code><br />
| 25<br />
| 192<br />
| 112<br />
| 64<br />
| 48<br />
|}<br />
<br />
The {{Minecraft Wiki|Painting#Canvases|Minecraft Wiki article on paintings}} also provides a list of painting names to the actual images.<br />
<br />
==== Spawn Player ====<br />
<br />
This packet is sent by the server when a player comes into visible range, ''not'' when a player joins.<br />
<br />
This packet must be sent after the [[#Player Info|Player Info]] packet that adds the player data for the client to use when spawning a player. If the Player Info for the player spawned by this packet is not present when this packet arrives, Notchian clients will not spawn the player entity. The Player Info packet includes skin/cape data.<br />
<br />
Servers can, however, safely spawn player entities for players not in visible range. The client appears to handle it correctly.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="7"| 0x05<br />
|rowspan="7"| Play<br />
|rowspan="7"| Client<br />
| Entity ID<br />
| VarInt<br />
| Player's EID<br />
|-<br />
| Player UUID<br />
| UUID<br />
| See below for notes on {{Minecraft Wiki|Server.properties#online-mode|offline mode}} and NPCs<br />
|-<br />
| X<br />
| Double<br />
| <br />
|-<br />
| Y<br />
| Double<br />
| <br />
|-<br />
| Z<br />
| Double<br />
| <br />
|-<br />
| Yaw<br />
| Angle<br />
| <br />
|-<br />
| Pitch<br />
| Angle<br />
| <br />
|}<br />
<br />
When in {{Minecraft Wiki|Server.properties#online-mode|online mode}}, the UUIDs must be valid and have valid skin blobs.<br />
<br />
In offline mode, [[Wikipedia:Universally unique identifier#Versions 3 and 5 (namespace name-based)|UUID v3]] is used with the String <code>OfflinePlayer:&lt;player name&gt;</code>, encoded in UTF-8 (and case-sensitive).<br />
<br />
For NPCs UUID v2 should be used. Note:<br />
<br />
<+Grum> i will never confirm this as a feature you know that :)<br />
<br />
In an example UUID, <code>xxxxxxxx-xxxx-Yxxx-xxxx-xxxxxxxxxxxx</code>, the UUID version is specified by <code>Y</code>. So, for UUID v3, <code>Y</code> will always be <code>3</code>, and for UUID v2, <code>Y</code> will always be <code>2</code>.<br />
<br />
==== Entity Animation (clientbound) ====<br />
<br />
Sent whenever an entity should change animation.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x06<br />
|rowspan="2"| Play<br />
|rowspan="2"| Client<br />
| Entity ID<br />
| VarInt<br />
| Player ID<br />
|-<br />
| Animation<br />
| Unsigned Byte<br />
| Animation ID (see below)<br />
|}<br />
<br />
Animation can be one of the following values:<br />
<br />
{| class="wikitable"<br />
! ID<br />
! Animation<br />
|-<br />
| 0<br />
| Swing main arm<br />
|-<br />
| 1<br />
| Take damage<br />
|-<br />
| 2<br />
| Leave bed<br />
|-<br />
| 3<br />
| Swing offhand<br />
|-<br />
| 4<br />
| Critical effect<br />
|-<br />
| 5<br />
| Magic critical effect<br />
|}<br />
<br />
==== Statistics ====<br />
<br />
Sent as a response to [[#Client_Status|Client Status 0x04]] (id 1).<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To <br />
!colspan="2"| Field Name<br />
!colspan="2"| Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x07<br />
|rowspan="4"| Play<br />
|rowspan="4"| Client<br />
|colspan="2"| Count<br />
|colspan="2"| VarInt<br />
| Number of elements in the following array<br />
|-<br />
|rowspan="2"| Statistic<br />
| Category ID<br />
|rowspan="2"| Array<br />
| VarInt<br />
| See below<br />
|-<br />
| Statistic ID<br />
| VarInt<br />
| See below<br />
|-<br />
|colspan="2"| Value<br />
|colspan="2"| VarInt<br />
| The amount to set it to<br />
|}<br />
<br />
Categories (these are namespaced, but with <code>:</code> replaced with <code>.</code>):<br />
<br />
{| class="wikitable"<br />
! Name<br />
! ID<br />
! Registry<br />
|-<br />
| <code>minecraft.mined</code><br />
| 0<br />
| Blocks<br />
|-<br />
| <code>minecraft.crafted</code><br />
| 1<br />
| Items<br />
|-<br />
| <code>minecraft.used</code><br />
| 2<br />
| Items<br />
|-<br />
| <code>minecraft.broken</code><br />
| 3<br />
| Items<br />
|-<br />
| <code>minecraft.picked_up</code><br />
| 4<br />
| Items<br />
|-<br />
| <code>minecraft.dropped</code><br />
| 5<br />
| Items<br />
|-<br />
| <code>minecraft.killed</code><br />
| 6<br />
| Entities<br />
|-<br />
| <code>minecraft.killed_by</code><br />
| 7<br />
| Entities<br />
|-<br />
| <code>minecraft.custom</code><br />
| 8<br />
| Custom<br />
|}<br />
<br />
Blocks, Items, and Entities use block (not block state), item, and entity ids.<br />
<br />
Custom has the following (unit only matters for clients):<br />
<br />
{| class="wikitable"<br />
! Name<br />
! ID<br />
! Unit<br />
|-<br />
| <code>minecraft.leave_game</code><br />
| 0<br />
| None<br />
|-<br />
| <code>minecraft.play_one_minute</code><br />
| 1<br />
| Time<br />
|-<br />
| <code>minecraft.time_since_death</code><br />
| 2<br />
| Time<br />
|-<br />
| <code>minecraft.sneak_Time</code><br />
| 3<br />
| Time<br />
|-<br />
| <code>minecraft.walk_one_cm</code><br />
| 4<br />
| Distance<br />
|-<br />
| <code>minecraft.crouch_one_cm</code><br />
| 5<br />
| Distance<br />
|-<br />
| <code>minecraft.sprint_one_cm</code><br />
| 6<br />
| Distance<br />
|-<br />
| <code>minecraft.swim_one_cm</code><br />
| 7<br />
| Distance<br />
|-<br />
| <code>minecraft.fall_one_cm</code><br />
| 8<br />
| Distance<br />
|-<br />
| <code>minecraft.climb_one_cm</code><br />
| 9<br />
| Distance<br />
|-<br />
| <code>minecraft.fly_one_cm</code><br />
| 10<br />
| Distance<br />
|-<br />
| <code>minecraft.dive_one_cm</code><br />
| 11<br />
| Distance<br />
|-<br />
| <code>minecraft.minecart_one_cm</code><br />
| 12<br />
| Distance<br />
|-<br />
| <code>minecraft.boat_one_cm</code><br />
| 13<br />
| Distance<br />
|-<br />
| <code>minecraft.pig_one_cm</code><br />
| 14<br />
| Distance<br />
|-<br />
| <code>minecraft.horse_one_cm</code><br />
| 15<br />
| Distance<br />
|-<br />
| <code>minecraft.aviate_one_cm</code><br />
| 16<br />
| Distance<br />
|-<br />
| <code>minecraft.jump</code><br />
| 17<br />
| None<br />
|-<br />
| <code>minecraft.drop</code><br />
| 18<br />
| None<br />
|-<br />
| <code>minecraft.damage_dealt</code><br />
| 19<br />
| Damage<br />
|-<br />
| <code>minecraft.damage_taken</code><br />
| 20<br />
| Damage<br />
|-<br />
| <code>minecraft.deaths</code><br />
| 21<br />
| None<br />
|-<br />
| <code>minecraft.mob_kills</code><br />
| 22<br />
| None<br />
|-<br />
| <code>minecraft.animals_bred</code><br />
| 23<br />
| None<br />
|-<br />
| <code>minecraft.player_kills</code><br />
| 24<br />
| None<br />
|-<br />
| <code>minecraft.fish_caught</code><br />
| 25<br />
| None<br />
|-<br />
| <code>minecraft.talked_to_villager</code><br />
| 26<br />
| None<br />
|-<br />
| <code>minecraft.traded_with_villager</code><br />
| 27<br />
| None<br />
|-<br />
| <code>minecraft.eat_cake_slice</code><br />
| 28<br />
| None<br />
|-<br />
| <code>minecraft.fill_cauldron</code><br />
| 29<br />
| None<br />
|-<br />
| <code>minecraft.use_cauldron</code><br />
| 30<br />
| None<br />
|-<br />
| <code>minecraft.clean_armor</code><br />
| 31<br />
| None<br />
|-<br />
| <code>minecraft.clean_banner</code><br />
| 32<br />
| None<br />
|-<br />
| <code>minecraft.interact_with_brewingstand</code><br />
| 33<br />
| None<br />
|-<br />
| <code>minecraft.interact_with_beacon</code><br />
| 34<br />
| None<br />
|-<br />
| <code>minecraft.inspect_dropper</code><br />
| 35<br />
| None<br />
|-<br />
| <code>minecraft.inspect_hopper</code><br />
| 36<br />
| None<br />
|-<br />
| <code>minecraft.inspect_dispenser</code><br />
| 37<br />
| None<br />
|-<br />
| <code>minecraft.play_noteblock</code><br />
| 38<br />
| None<br />
|-<br />
| <code>minecraft.tune_noteblock</code><br />
| 39<br />
| None<br />
|-<br />
| <code>minecraft.pot_flower</code><br />
| 40<br />
| None<br />
|-<br />
| <code>minecraft.trigger_trapped_chest</code><br />
| 41<br />
| None<br />
|-<br />
| <code>minecraft.open_enderchest</code><br />
| 42<br />
| None<br />
|-<br />
| <code>minecraft.enchant_item</code><br />
| 43<br />
| None<br />
|-<br />
| <code>minecraft.play_record</code><br />
| 44<br />
| None<br />
|-<br />
| <code>minecraft.interact_with_furnace</code><br />
| 45<br />
| None<br />
|-<br />
| <code>minecraft.interact_with_crafting_table</code><br />
| 46<br />
| None<br />
|-<br />
| <code>minecraft.open_chest</code><br />
| 47<br />
| None<br />
|-<br />
| <code>minecraft.sleep_in_bed</code><br />
| 48<br />
| None<br />
|-<br />
| <code>minecraft.open_shulker_box</code><br />
| 49<br />
| None<br />
|}<br />
<br />
Units:<br />
<br />
* None: just a normal number (formatted with 0 decimal places)<br />
* Damage: value is 10 times the normal amount<br />
* Distance: a distance in centimeters (hundredths of blocks)<br />
* Time: a time span in ticks<br />
<br />
==== Acknowledge Player Digging ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x08<br />
|rowspan="4"| Play<br />
|rowspan="4"| Client<br />
| Location<br />
| Position<br />
| Position where the digging was happening<br />
|-<br />
| Block<br />
| VarInt<br />
| Block state ID of the block that should be at that position now.<br />
|-<br />
| Status<br />
| VarInt enum<br />
| Same as Player Digging. Only Started digging (0), Cancelled digging (1), and Finished digging (2) are used.<br />
|-<br />
| Successful<br />
| Boolean<br />
| True if the digging succeeded; false if the client should undo any changes it made locally. (How does this work?)<br />
|}<br />
<br />
==== Block Break Animation ====<br />
<br />
0–9 are the displayable destroy stages and each other number means that there is no animation on this coordinate.<br />
<br />
Block break animations can still be applied on air; the animation will remain visible although there is no block being broken. However, if this is applied to a transparent block, odd graphical effects may happen, including water losing its transparency. (An effect similar to this can be seen in normal gameplay when breaking ice blocks)<br />
<br />
If you need to display several break animations at the same time you have to give each of them a unique Entity ID. The entity ID does not need to correspond to an actual entity on the client. It is valid to use a randomly generated number.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x09<br />
|rowspan="3"| Play<br />
|rowspan="3"| Client<br />
| Entity ID<br />
| VarInt<br />
| Entity ID of the entity breaking the block<br />
|-<br />
| Location<br />
| Position<br />
| Block Position<br />
|-<br />
| Destroy Stage<br />
| Byte<br />
| 0–9 to set it, any other value to remove it<br />
|}<br />
<br />
==== Block Entity Data ====<br />
<br />
Sets the block entity associated with the block at the given location.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x0A<br />
|rowspan="3"| Play<br />
|rowspan="3"| Client<br />
| Location<br />
| Position<br />
| <br />
|-<br />
| Action<br />
| Unsigned Byte<br />
| The type of update to perform, see below<br />
|-<br />
| NBT Data<br />
| [[NBT|NBT Tag]]<br />
| Data to set. May be a TAG_END (0), in which case the block entity at the given location is removed (though this is not required since the client will remove the block entity automatically on chunk unload or block removal)<br />
|}<br />
<br />
''Action'' field:<br />
<br />
* '''1''': Set data of a mob spawner (everything except for SpawnPotentials: current delay, min/max delay, mob to be spawned, spawn count, spawn range, etc.)<br />
* '''2''': Set command block text (command and last execution status)<br />
* '''3''': Set the level, primary, and secondary powers of a beacon<br />
* '''4''': Set rotation and skin of mob head<br />
* '''5''': Declare a conduit<br />
* '''6''': Set base color and patterns on a banner<br />
* '''7''': Set the data for a Structure tile entity<br />
* '''8''': Set the destination for a end gateway<br />
* '''9''': Set the text on a sign<br />
* '''10''': Unused<br />
* '''11''': Declare a bed<br />
* '''12''': Set data of a jigsaw block<br />
* '''13''': Set items in a campfire<br />
* '''14''': Behive information<br />
<br />
==== Block Action ====<br />
<br />
This packet is used for a number of actions and animations performed by blocks, usually non-persistent.<br />
<br />
See [[Block Actions]] for a list of values.<br />
<br />
{{Warning2|This packet uses a block ID, not a block state. Unfortunately, block IDs are not directly included in the output from [[Data Generators]], but can manually be calculated.}}<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x0B<br />
|rowspan="4"| Play<br />
|rowspan="4"| Client<br />
| Location<br />
| Position<br />
| Block coordinates<br />
|-<br />
| Action ID (Byte 1)<br />
| Unsigned Byte<br />
| Varies depending on block — see [[Block Actions]]<br />
|-<br />
| Action Param (Byte 2)<br />
| Unsigned Byte<br />
| Varies depending on block — see [[Block Actions]]<br />
|-<br />
| Block Type<br />
| VarInt<br />
| The block type ID for the block. This must match the block at the given coordinates.<br />
|}<br />
<br />
==== Block Change ====<br />
<br />
Fired whenever a block is changed within the render distance.<br />
<br />
{{Warning2|Changing a block in a chunk that is not loaded is not a stable action. The Notchian client currently uses a ''shared'' empty chunk which is modified for all block changes in unloaded chunks; while in 1.9 this chunk never renders in older versions the changed block will appear in all copies of the empty chunk. Servers should avoid sending block changes in unloaded chunks and clients should ignore such packets.}}<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x0C<br />
|rowspan="2"| Play<br />
|rowspan="2"| Client<br />
| Location<br />
| Position<br />
| Block Coordinates<br />
|-<br />
| Block ID<br />
| VarInt<br />
| The new block state ID for the block as given in the {{Minecraft Wiki|Data values#Block IDs|global palette}}. See that section for more information.<br />
|}<br />
<br />
==== Boss Bar ==== <br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
!colspan="2"| Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="14"| 0x0D<br />
|rowspan="14"| Play<br />
|rowspan="14"| Client<br />
|colspan="2"| UUID<br />
| UUID<br />
| Unique ID for this bar<br />
|-<br />
|colspan="2"| Action<br />
| VarInt Enum<br />
| Determines the layout of the remaining packet<br />
|-<br />
! Action<br />
! Field Name<br />
! <br />
! <br />
|-<br />
|rowspan="5"| 0: add<br />
| Title<br />
| [[Chat]]<br />
| <br />
|-<br />
| Health<br />
| Float<br />
| From 0 to 1. Values greater than 1 do not crash a Notchian client, and start [https://i.johni0702.de/nA.png rendering part of a second health bar] at around 1.5.<br />
|-<br />
| Color<br />
| VarInt Enum<br />
| Color ID (see below)<br />
|-<br />
| Division<br />
| VarInt Enum<br />
| Type of division (see below)<br />
|-<br />
| Flags<br />
| Unsigned Byte<br />
| Bit mask. 0x1: should darken sky, 0x2: is dragon bar (used to play end music), 0x04: create fog (previously was also controlled by 0x02)<br />
|-<br />
| 1: remove<br />
| ''no fields''<br />
| ''no fields''<br />
| Removes this boss bar<br />
|-<br />
| 2: update health<br />
| Health<br />
| Float<br />
| as above<br />
|-<br />
| 3: update title<br />
| Title<br />
| [[Chat]]<br />
| <br />
|-<br />
|rowspan="2"| 4: update style<br />
| Color<br />
| VarInt Enum<br />
| Color ID (see below)<br />
|-<br />
| Dividers<br />
| VarInt Enum<br />
| as above<br />
|-<br />
| 5: update flags<br />
| Flags<br />
| Unsigned Byte<br />
| as above<br />
|-<br />
|}<br />
<br />
{| class="wikitable"<br />
! ID<br />
! Color<br />
|-<br />
| 0<br />
| Pink<br />
|-<br />
| 1<br />
| Blue<br />
|-<br />
| 2<br />
| Red<br />
|-<br />
| 3<br />
| Green<br />
|-<br />
| 4<br />
| Yellow<br />
|-<br />
| 5<br />
| Purple<br />
|-<br />
| 6<br />
| White<br />
|}<br />
<br />
{| class="wikitable"<br />
! ID<br />
! Type of division<br />
|-<br />
| 0<br />
| No division<br />
|-<br />
| 1<br />
| 6 notches<br />
|-<br />
| 2<br />
| 10 notches<br />
|-<br />
| 3<br />
| 12 notches<br />
|-<br />
| 4<br />
| 20 notches<br />
|}<br />
<br />
==== Server Difficulty ====<br />
<br />
Changes the difficulty setting in the client's option menu<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x0E<br />
|rowspan="2"| Play<br />
|rowspan="2"| Client<br />
| Difficulty<br />
| Unsigned Byte<br />
| 0: peaceful, 1: easy, 2: normal, 3: hard<br />
|-<br />
| Difficulty locked?<br />
| Boolean<br />
|<br />
|}<br />
<br />
==== Chat Message (clientbound) ==== <br />
<br />
Identifying the difference between Chat/System Message is important as it helps respect the user's chat visibility options. See [[Chat#Processing chat|processing chat]] for more info about these positions.<br />
<br />
{{warning2|Game info accepts json formatting but does not display it, although the deprecated §-based formatting works. This is not an issue when using the [[#Title|Title]] packet, so prefer that packet for displaying information in that slot. See [https://bugs.mojang.com/browse/MC-119145 MC-119145] for more information.}}<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x0F<br />
|rowspan="2"| Play<br />
|rowspan="2"| Client<br />
| JSON Data<br />
| [[Chat]]<br />
| Limited to 32767 bytes<br />
|-<br />
| Position<br />
| Byte<br />
| 0: chat (chat box), 1: system message (chat box), 2: game info (above hotbar).<br />
|}<br />
<br />
==== Multi Block Change ====<br />
<br />
Fired whenever 2 or more blocks are changed within the same chunk on the same tick.<br />
<br />
{{Warning|Changing blocks in chunks not loaded by the client is unsafe (see note on [[#Block Change|Block Change]]).}}<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
!colspan="2"| Field Name<br />
!colspan="2"| Field Type<br />
! Notes<br />
|-<br />
|rowspan="6"| 0x10<br />
|rowspan="6"| Play<br />
|rowspan="6"| Client<br />
|colspan="2"| Chunk X<br />
|colspan="2"| Int<br />
| Chunk X coordinate<br />
|-<br />
|colspan="2"| Chunk Z<br />
|colspan="2"| Int<br />
| Chunk Z coordinate<br />
|-<br />
|colspan="2"| Record Count<br />
|colspan="2"| VarInt<br />
| Number of elements in the following array, i.e. the number of blocks affected<br />
|-<br />
|rowspan="3"| Record<br />
| Horizontal Position<br />
|rowspan="3"| Array<br />
| Unsigned Byte<br />
| The 4 most significant bits (<code>0xF0</code>) encode the X coordinate, relative to the chunk. The 4 least significant bits (<code>0x0F</code>) encode the Z coordinate, relative to the chunk.<br />
|-<br />
| Y Coordinate<br />
| Unsigned Byte<br />
| Y coordinate of the block<br />
|-<br />
| Block ID<br />
| VarInt<br />
| The new block state ID for the block as given in the {{Minecraft Wiki|Data values#Block IDs|global palette}}. See that section for more information.<br />
|}<br />
<br />
To decode the position into a world position:<br />
<br />
<syntaxhighlight lang="java"><br />
worldX = (horizPos >> 4 & 15) + (chunkX * 16);<br />
worldY = vertPos;<br />
worldZ = (horizPos & 15) + (chunkZ * 16);<br />
</syntaxhighlight><br />
<br />
==== Tab-Complete (clientbound) ====<br />
<br />
The server responds with a list of auto-completions of the last word sent to it. In the case of regular chat, this is a player username. Command names and parameters are also supported. The client sorts these alphabetically before listing them.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
!colspan="2"| Field Name<br />
!colspan="2"| Field Type<br />
! Notes<br />
|-<br />
|rowspan="8"| 0x11<br />
|rowspan="8"| Play<br />
|rowspan="8"| Client<br />
|-<br />
|colspan="2"| ID<br />
|colspan="2"| VarInt<br />
| Transaction ID<br />
|-<br />
|colspan="2"| Start<br />
|colspan="2"| VarInt<br />
| Start of the text to replace<br />
|-<br />
|colspan="2"| Length<br />
|colspan="2"| VarInt<br />
| Length of the text to replace<br />
|-<br />
|colspan="2"| Count<br />
|colspan="2"| VarInt<br />
| Number of elements in the following array<br />
|-<br />
|rowspan="3"| Matches<br />
| Match<br />
|rowspan="3"| Array<br />
| String (32767)<br />
| One eligible value to insert, note that each command is sent separately instead of in a single string, hence the need for Count. Note that for instance this doesn't include a leading <code>/</code> on commands.<br />
|-<br />
| Has tooltip<br />
| Boolean<br />
| True if the following is present<br />
|-<br />
| Tooltip<br />
| Optional [[Chat]]<br />
| Tooltip to display; only present if previous boolean is true<br />
|}<br />
<br />
==== Declare Commands ====<br />
<br />
Lists all of the commands on the server, and how they are parsed.<br />
<br />
This is a directed graph, with one root node. Each redirect or child node must refer only to nodes that have already been declared.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x12<br />
|rowspan="3"| Play<br />
|rowspan="3"| Client<br />
| Count<br />
| VarInt<br />
| Number of elements in the following array<br />
|-<br />
| Nodes<br />
| Array of [[Command Data|Node]]<br />
| An array of nodes<br />
|-<br />
| Root index<br />
| VarInt<br />
| Index of the <code>root</code> node in the previous array<br />
|}<br />
<br />
For more information on this packet, see the [[Command Data]] article.<br />
<br />
==== Window Confirmation (clientbound) ====<br />
<br />
A packet from the server indicating whether a request from the client was accepted, or whether there was a conflict (due to lag). If the packet was not accepted, the client must respond with a [[#Window Confirmation (serverbound)|serverbound window confirmation]] packet.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x13<br />
|rowspan="3"| Play<br />
|rowspan="3"| Client<br />
| Window ID<br />
| Byte<br />
| The ID of the window that the action occurred in<br />
|-<br />
| Action Number<br />
| Short<br />
| Every action that is to be accepted has a unique number. This number is an incrementing integer (starting at 0) with separate counts for each window ID.<br />
|-<br />
| Accepted<br />
| Boolean<br />
| Whether the action was accepted<br />
|}<br />
<br />
==== Close Window (clientbound) ====<br />
<br />
This packet is sent from the server to the client when a window is forcibly closed, such as when a chest is destroyed while it's open.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x14<br />
| Play<br />
| Client<br />
| Window ID<br />
| Unsigned Byte<br />
| This is the ID of the window that was closed. 0 for inventory.<br />
|}<br />
<br />
==== Window Items ====<br />
[[File:Inventory-slots.png|thumb|The inventory slots]]<br />
<br />
Sent by the server when items in multiple slots (in a window) are added/removed. This includes the main inventory, equipped armour and crafting slots.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x15<br />
|rowspan="3"| Play<br />
|rowspan="3"| Client<br />
| Window ID<br />
| Unsigned Byte<br />
| The ID of window which items are being sent for. 0 for player inventory.<br />
|-<br />
| Count<br />
| Short<br />
| Number of elements in the following array<br />
|-<br />
| Slot Data<br />
| Array of [[Slot Data|Slot]]<br />
| <br />
|}<br />
<br />
See [[Inventory#Windows|inventory windows]] for further information about how slots are indexed.<br />
<br />
==== Window Property ====<br />
<br />
This packet is used to inform the client that part of a GUI window should be updated.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x16<br />
|rowspan="3"| Play<br />
|rowspan="3"| Client<br />
| Window ID<br />
| Unsigned Byte<br />
| <br />
|-<br />
| Property<br />
| Short<br />
| The property to be updated, see below<br />
|-<br />
| Value<br />
| Short<br />
| The new value for the property, see below<br />
|}<br />
<br />
The meaning of the Property field depends on the type of the window. The following table shows the known combinations of window type and property, and how the value is to be interpreted.<br />
<br />
{| class="wikitable"<br />
|-<br />
! Window type<br />
! Property<br />
! Value<br />
|-<br />
|rowspan="4"| Furnace<br />
| 0: Fire icon (fuel left)<br />
| counting from fuel burn time down to 0 (in-game ticks)<br />
|-<br />
| 1: Maximum fuel burn time<br />
| fuel burn time or 0 (in-game ticks)<br />
|-<br />
| 2: Progress arrow<br />
| counting from 0 to maximum progress (in-game ticks)<br />
|-<br />
| 3: Maximum progress<br />
| always 200 on the notchian server<br />
|-<br />
|rowspan="10"| Enchantment Table<br />
| 0: Level requirement for top enchantment slot<br />
|rowspan="3"| The enchantment's xp level requirement<br />
|-<br />
| 1: Level requirement for middle enchantment slot<br />
|-<br />
| 2: Level requirement for bottom enchantment slot<br />
|-<br />
| 3: The enchantment seed<br />
| Used for drawing the enchantment names (in [[Wikipedia:Standard Galactic Alphabet|SGA]]) clientside. The same seed ''is'' used to calculate enchantments, but some of the data isn't sent to the client to prevent easily guessing the entire list (the seed value here is the regular seed bitwise and <code>0xFFFFFFF0</code>).<br />
|-<br />
| 4: Enchantment ID shown on mouse hover over top enchantment slot<br />
|rowspan="3"| The enchantment id (set to -1 to hide it), see below for values<br />
|-<br />
| 5: Enchantment ID shown on mouse hover over middle enchantment slot<br />
|-<br />
| 6: Enchantment ID shown on mouse hover over bottom enchantment slot<br />
|-<br />
| 7: Enchantment level shown on mouse hover over the top slot<br />
|rowspan="3"| The enchantment level (1 = I, 2 = II, 6 = VI, etc.), or -1 if no enchant<br />
|-<br />
| 8: Enchantment level shown on mouse hover over the middle slot<br />
|-<br />
| 9: Enchantment level shown on mouse hover over the bottom slot<br />
|-<br />
|rowspan="3"| Beacon<br />
| 0: Power level<br />
| 0-4, controls what effect buttons are enabled<br />
|-<br />
| 1: First potion effect<br />
| {{Minecraft Wiki|Data values#Status effects|Potion effect ID}} for the first effect, or -1 if no effect<br />
|-<br />
| 2: Second potion effect<br />
| {{Minecraft Wiki|Data values#Status effects|Potion effect ID}} for the second effect, or -1 if no effect<br />
|-<br />
| Anvil<br />
| 0: Repair cost<br />
| The repair's cost in xp levels<br />
|-<br />
|rowspan="2"| Brewing Stand<br />
| 0: Brew time<br />
| 0 – 400, with 400 making the arrow empty, and 0 making the arrow full<br />
|-<br />
| 1: Fuel time<br />
| 0 - 20, with 0 making the arrow empty, and 20 making the arrow full<br />
|}<br />
<br />
For an enchanting table, the following numerical IDs are used:<br />
<br />
{| class="wikitable"<br />
! Numerical ID<br />
! Enchantment ID<br />
! Enchantment Name<br />
|-<br />
| 0<br />
| minecraft:protection<br />
| Protection<br />
|-<br />
| 1<br />
| minecraft:fire_protection<br />
| Fire Protection<br />
|-<br />
| 2<br />
| minecraft:feather_falling<br />
| Feather Falling<br />
|-<br />
| 3<br />
| minecraft:blast_protection<br />
| Blast Protection<br />
|-<br />
| 4<br />
| minecraft:projectile_protection<br />
| Projectile Protection<br />
|-<br />
| 5<br />
| minecraft:respiration<br />
| Respiration<br />
|-<br />
| 6<br />
| minecraft:aqua_affinity<br />
| Aqua Affinity<br />
|-<br />
| 7<br />
| minecraft:thorns<br />
| Thorns<br />
|-<br />
| 8<br />
| minecraft:depth_strider<br />
| Depth Strider<br />
|-<br />
| 9<br />
| minecraft:frost_walker<br />
| Frost Walker<br />
|-<br />
| 10<br />
| minecraft:binding_curse<br />
| Curse of Binding<br />
|-<br />
| 11<br />
| minecraft:sharpness<br />
| Sharpness<br />
|-<br />
| 12<br />
| minecraft:smite<br />
| Smite<br />
|-<br />
| 13<br />
| minecraft:bane_of_arthropods<br />
| Bane of Arthropods<br />
|-<br />
| 14<br />
| minecraft:knockback<br />
| Knockback<br />
|-<br />
| 15<br />
| minecraft:fire_aspect<br />
| Fire Aspect<br />
|-<br />
| 16<br />
| minecraft:looting<br />
| Looting<br />
|-<br />
| 17<br />
| minecraft:sweeping<br />
| Sweeping Edge<br />
|-<br />
| 18<br />
| minecraft:efficiency<br />
| Efficiency<br />
|-<br />
| 19<br />
| minecraft:silk_touch<br />
| Silk Touch<br />
|-<br />
| 20<br />
| minecraft:unbreaking<br />
| Unbreaking<br />
|-<br />
| 21<br />
| minecraft:fortune<br />
| Fortune<br />
|-<br />
| 22<br />
| minecraft:power<br />
| Power<br />
|-<br />
| 23<br />
| minecraft:punch<br />
| Punch<br />
|-<br />
| 24<br />
| minecraft:flame<br />
| Flame<br />
|-<br />
| 25<br />
| minecraft:infinity<br />
| Infinity<br />
|-<br />
| 26<br />
| minecraft:luck_of_the_sea<br />
| Luck of the Sea<br />
|-<br />
| 27<br />
| minecraft:lure<br />
| Lure<br />
|-<br />
| 28<br />
| minecraft:loyalty<br />
| Loyalty<br />
|-<br />
| 29<br />
| minecraft:impaling<br />
| Impaling<br />
|-<br />
| 30<br />
| minecraft:riptide<br />
| Riptide<br />
|-<br />
| 31<br />
| minecraft:channeling<br />
| Channeling<br />
|-<br />
| 32<br />
| minecraft:mending<br />
| Mending<br />
|-<br />
| 33<br />
| minecraft:vanishing_curse<br />
| Curse of Vanishing<br />
|}<br />
<br />
==== Set Slot ====<br />
<br />
Sent by the server when an item in a slot (in a window) is added/removed.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x17<br />
|rowspan="3"| Play<br />
|rowspan="3"| Client<br />
| Window ID<br />
| Byte<br />
| The window which is being updated. 0 for player inventory. Note that all known window types include the player inventory. This packet will only be sent for the currently opened window while the player is performing actions, even if it affects the player inventory. After the window is closed, a number of these packets are sent to update the player's inventory window (0).<br />
|-<br />
| Slot<br />
| Short<br />
| The slot that should be updated<br />
|-<br />
| Slot Data<br />
| [[Slot Data|Slot]]<br />
| <br />
|}<br />
<br />
To set the cursor (the item currently dragged with the mouse), use -1 as Window ID and as Slot.<br />
<br />
This packet can only be used to edit the hotbar of the player's inventory if window ID is set to 0 (slots 36 through 44). If the window ID is set to -2, then any slot in the inventory can be used but no add item animation will be played.<br />
<br />
==== Set Cooldown ====<br />
<br />
Applies a cooldown period to all items with the given type. Used by the Notchian server with enderpearls. This packet should be sent when the cooldown starts and also when the cooldown ends (to compensate for lag), although the client will end the cooldown automatically. Can be applied to any item, note that interactions still get sent to the server with the item but the client does not play the animation nor attempt to predict results (i.e block placing).<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x18<br />
|rowspan="2"| Play<br />
|rowspan="2"| Client<br />
| Item ID<br />
| VarInt<br />
| Numeric ID of the item to apply a cooldown to.<br />
|-<br />
| Cooldown Ticks<br />
| VarInt<br />
| Number of ticks to apply a cooldown for, or 0 to clear the cooldown.<br />
|}<br />
<br />
==== Plugin Message (clientbound) ====<br />
<br />
{{Main|Plugin channels}}<br />
<br />
Mods and plugins can use this to send their data. Minecraft itself uses several [[plugin channel]]s. These internal channels are in the <code>minecraft</code> namespace.<br />
<br />
More documentation on this: [http://dinnerbone.com/blog/2012/01/13/minecraft-plugin-channels-messaging/ http://dinnerbone.com/blog/2012/01/13/minecraft-plugin-channels-messaging/]<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x19<br />
|rowspan="2"| Play<br />
|rowspan="2"| Client<br />
| Channel<br />
| Identifier<br />
| Name of the [[plugin channel]] used to send the data<br />
|-<br />
| Data<br />
| Byte Array<br />
| Any data, depending on the channel. <code>minecraft:</code> channels are documented [[plugin channel|here]]. The length of this array must be inferred from the packet length.<br />
|}<br />
<br />
==== Named Sound Effect ====<br />
{{See also|#Sound Effect}}<br />
<br />
Used to play a sound effect on the client. Custom sounds may be added by resource packs.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="7"| 0x1A<br />
|rowspan="7"| Play<br />
|rowspan="7"| Client<br />
| Sound Name<br />
| Identifier<br />
| All sound effect names as of 1.15.2 can be seen [https://pokechu22.github.io/Burger/1.15.2.html#sounds here].<br />
|-<br />
| Sound Category<br />
| VarInt Enum<br />
| The category that this sound will be played from ([https://gist.github.com/konwboj/7c0c380d3923443e9d55 current categories])<br />
|-<br />
| Effect Position X<br />
| Int<br />
| Effect X multiplied by 8 ([[Data types#Fixed-point numbers|fixed-point number]] with only 3 bits dedicated to the fractional part)<br />
|-<br />
| Effect Position Y<br />
| Int<br />
| Effect Y multiplied by 8 ([[Data types#Fixed-point numbers|fixed-point number]] with only 3 bits dedicated to the fractional part)<br />
|-<br />
| Effect Position Z<br />
| Int<br />
| Effect Z multiplied by 8 ([[Data types#Fixed-point numbers|fixed-point number]] with only 3 bits dedicated to the fractional part)<br />
|-<br />
| Volume<br />
| Float<br />
| 1 is 100%, can be more<br />
|-<br />
| Pitch<br />
| Float<br />
| Float between 0.5 and 2.0 by Notchian clients<br />
|}<br />
<br />
==== Disconnect (play) ====<br />
<br />
Sent by the server before it disconnects a client. The client assumes that the server has already closed the connection by the time the packet arrives.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x1B<br />
| Play<br />
| Client<br />
| Reason<br />
| [[Chat]]<br />
| Displayed to the client when the connection terminates.<br />
|}<br />
<br />
==== Entity Status ====<br />
<br />
Entity statuses generally trigger an animation for an entity. The available statuses vary by the entity's type (and are available to subclasses of that type as well).<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x1C<br />
|rowspan="2"| Play<br />
|rowspan="2"| Client<br />
| Entity ID<br />
| Int<br />
| <br />
|-<br />
| Entity Status<br />
| Byte Enum<br />
| See below<br />
|}<br />
<br />
See [[Entity statuses]] for a list of which statuses are valid for each type of entity.<br />
<br />
==== Explosion ====<br />
<br />
Sent when an explosion occurs (creepers, TNT, and ghast fireballs).<br />
<br />
Each block in Records is set to air. Coordinates for each axis in record is int(X) + record.x<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="9"| 0x1D<br />
|rowspan="9"| Play<br />
|rowspan="9"| Client<br />
| X<br />
| Float<br />
| <br />
|-<br />
| Y<br />
| Float<br />
| <br />
|-<br />
| Z<br />
| Float<br />
| <br />
|-<br />
| Strength<br />
| Float<br />
| A strength greater than or equal to 2.0 spawns a <code>minecraft:explosion_emitter</code> particle, while a lesser strength spawns a <code>minecraft:explosion</code> particle.<br />
|-<br />
| Record Count<br />
| Int<br />
| Number of elements in the following array<br />
|-<br />
| Records<br />
| Array of (Byte, Byte, Byte)<br />
| Each record is 3 signed bytes long; the 3 bytes are the XYZ (respectively) signed offsets of affected blocks.<br />
|-<br />
| Player Motion X<br />
| Float<br />
| X velocity of the player being pushed by the explosion<br />
|-<br />
| Player Motion Y<br />
| Float<br />
| Y velocity of the player being pushed by the explosion<br />
|-<br />
| Player Motion Z<br />
| Float<br />
| Z velocity of the player being pushed by the explosion<br />
|}<br />
<br />
==== Unload Chunk ====<br />
<br />
Tells the client to unload a chunk column.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x1E<br />
|rowspan="2"| Play<br />
|rowspan="2"| Client<br />
| Chunk X<br />
| Int<br />
| Block coordinate divided by 16, rounded down<br />
|-<br />
| Chunk Z<br />
| Int<br />
| Block coordinate divided by 16, rounded down<br />
|}<br />
<br />
It is legal to send this packet even if the given chunk is not currently loaded.<br />
<br />
==== Change Game State ====<br />
<br />
Used for a wide variety of game state things, from whether to bed use to gamemode to demo messages.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x1F<br />
|rowspan="2"| Play<br />
|rowspan="2"| Client<br />
| Reason<br />
| Unsigned Byte<br />
| See below<br />
|-<br />
| Value<br />
| Float<br />
| Depends on Reason<br />
|}<br />
<br />
''Reason codes'':<br />
<br />
{| class="wikitable"<br />
! Reason<br />
! Effect<br />
! Value<br />
|-<br />
| 0<br />
| Invalid Bed<br />
| Would be used to switch between messages, but the only used message is 0 for invalid bed<br />
|-<br />
| 1<br />
| End raining<br />
| <br />
|-<br />
| 2<br />
| Begin raining<br />
| <br />
|-<br />
| 3<br />
| Change gamemode<br />
| 0: Survival, 1: Creative, 2: Adventure, 3: Spectator<br />
|-<br />
| 4<br />
| Exit end<br />
| 0: Immediately send Client Status of respawn without showing end credits; 1: Show end credits and respawn at the when they finish showing (or when esc is pressed). 1 is sent if the player has not yet received the "The end?" advancement, while if they do have it 0 is used.<br />
|-<br />
| 5<br />
| Demo message<br />
| 0: Show welcome to demo screen, 101: Tell movement controls, 102: Tell jump control, 103: Tell inventory control, 104: Tell that the demo is over and print a message about how to take a screenshot<br />
|- <br />
| 6<br />
| Arrow hitting player<br />
| Appears to be played when an arrow strikes another player in Multiplayer<br />
|-<br />
| 7<br />
| Fade value<br />
| The current darkness value. 1 = Dark, 0 = Bright, Setting the value higher causes the game to change color and freeze<br />
|-<br />
| 8<br />
| Fade time<br />
| Time in ticks for the sky to fade<br />
|-<br />
| 9<br />
| Play pufferfish sting sound<br />
|-<br />
| 10<br />
| Play elder guardian mob appearance (effect and sound)<br />
| <br />
|-<br />
| 11<br />
| Enable respawn screen<br />
| 0: Enable respawn screen, 1: Immediately respawn (sent when the doImmediateRespawn gamerule changes) <br />
|}<br />
<br />
==== Open Horse Window ====<br />
<br />
This packet is used exclusively for opening the horse GUI. [[#Open Window|Open Window]] is used for all other GUIs.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x20<br />
|rowspan="3"| Play<br />
|rowspan="3"| Client<br />
| Window ID?<br />
| Byte<br />
|<br />
|-<br />
| Number of slots?<br />
| VarInt<br />
|<br />
|-<br />
| Entity ID?<br />
| Integer<br />
|<br />
|}<br />
<br />
==== Keep Alive (clientbound) ====<br />
<br />
The server will frequently send out a keep-alive, each containing a random ID. The client must respond with the same packet. If the client does not respond to them for over 30 seconds, the server kicks the client. Vice versa, if the server does not send any keep-alives for 20 seconds, the client will disconnect and yields a "Timed out" exception.<br />
<br />
The Notchian server uses a system-dependent time in milliseconds to generate the keep alive ID value.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x21<br />
|rowspan="1"| Play<br />
|rowspan="1"| Client<br />
| Keep Alive ID<br />
| Long<br />
| <br />
|}<br />
<br />
==== Chunk Data ====<br />
{{Main|Chunk Format}}<br />
{{See also|#Unload Chunk}}<br />
<br />
{{Need Info|How do biomes work now? The biome change happened at the same time as the seed change, but it's not clear how/if biomes could be computed given that it's not the actual seed... ([https://www.reddit.com/r/Mojira/comments/e5at6i/a_discussion_for_the_changes_to_how_biomes_are/ /r/mojira discussion] which notes that it seems to be some kind of interpolation, and 3D biomes are only used in the nether)}}<br />
<br />
The server only sends skylight information for chunk pillars in the {{Minecraft Wiki|Overworld}}, it's up to the client to know in which dimenison the player is currently located. You can also infer this information from the primary bitmask and the amount of uncompressed bytes sent. This packet also sends all block entities in the chunk (though sending them is not required; it is still legal to send them with [[#Update Block Entity|Update Block Entity]] later).<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="10"| 0x22<br />
|rowspan="10"| Play<br />
|rowspan="10"| Client<br />
| Chunk X<br />
| Int<br />
| Chunk coordinate (block coordinate divided by 16, rounded down)<br />
|-<br />
| Chunk Z<br />
| Int<br />
| Chunk coordinate (block coordinate divided by 16, rounded down)<br />
|-<br />
| Full chunk<br />
| Boolean<br />
| See [[Chunk Format#Full chunk|Chunk Format]]<br />
|-<br />
| Primary Bit Mask<br />
| VarInt<br />
| Bitmask with bits set to 1 for every 16×16×16 chunk section whose data is included in Data. The least significant bit represents the chunk section at the bottom of the chunk column (from y=0 to y=15).<br />
|-<br />
| Heightmaps<br />
| [[NBT]]<br />
| Compound containing one long array named <code>MOTION_BLOCKING</code>, which is a heightmap for the highest solid block at each position in the chunk (as a compacted long array with 256 entries at 9 bits per entry totaling 36 longs). The Notchian server also adds a <code>WORLD_SURFACE</code> long array, the purpose of which is unknown, but it's not required for the chunk to be accepted.<br />
|-<br />
| Biomes<br />
| Optional array of Integer<br />
| 1024 biome IDs, ordered by x then z then y, in 4&times;4&times;4 blocks. Not present if full chunk is false.<br />
|- <br />
| Size<br />
| VarInt<br />
| Size of Data in bytes<br />
|-<br />
| Data<br />
| Byte array<br />
| See [[Chunk Format#Data structure|data structure]] in Chunk Format<br />
|-<br />
| Number of block entities<br />
| VarInt<br />
| Number of elements in the following array<br />
|-<br />
| Block entities<br />
| Array of [[NBT|NBT Tag]]<br />
| All block entities in the chunk. Use the x, y, and z tags in the NBT to determine their positions.<br />
|}<br />
<br />
Note that the Notchian client requires an [[#Update View Position|Update View Position]] packet when it crosses a chunk border, otherwise it'll only display render distance + 2 chunks around the chunk it spawned in.<br />
<br />
==== Effect ====<br />
Sent when a client is to play a sound or particle effect.<br />
<br />
By default, the Minecraft client adjusts the volume of sound effects based on distance. The final boolean field is used to disable this, and instead the effect is played from 2 blocks away in the correct direction. Currently this is only used for effect 1023 (wither spawn), effect 1028 (enderdragon death), and effect 1038 (end portal opening); it is ignored on other effects.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x23<br />
|rowspan="4"| Play<br />
|rowspan="4"| Client<br />
| Effect ID<br />
| Int<br />
| The ID of the effect, see below<br />
|-<br />
| Location<br />
| Position<br />
| The location of the effect<br />
|-<br />
| Data<br />
| Int<br />
| Extra data for certain effects, see below<br />
|-<br />
| Disable Relative Volume<br />
| Boolean<br />
| See above<br />
|}<br />
<br />
Effect IDs:<br />
<br />
{| class="wikitable"<br />
! ID<br />
! Name<br />
! Data<br />
|-<br />
!colspan="3"| Sound<br />
|-<br />
| 1000<br />
| Dispenser dispenses<br />
| <br />
|-<br />
| 1001<br />
| Dispenser fails to dispense<br />
| <br />
|-<br />
| 1002<br />
| Dispenser shoots<br />
| <br />
|-<br />
| 1003<br />
| Ender eye launched<br />
| <br />
|-<br />
| 1004<br />
| Firework shot<br />
| <br />
|-<br />
| 1005<br />
| Iron door opened<br />
| <br />
|-<br />
| 1006<br />
| Wooden door opened<br />
| <br />
|-<br />
| 1007<br />
| Wooden trapdoor opened<br />
| <br />
|-<br />
| 1008<br />
| Fence gate opened<br />
| <br />
|-<br />
| 1009<br />
| Fire extinguished<br />
| <br />
|-<br />
| 1010<br />
| Play record<br />
| Special case, see below for more info<br />
|-<br />
| 1011<br />
| Iron door closed<br />
| <br />
|-<br />
| 1012<br />
| Wooden door closed<br />
| <br />
|-<br />
| 1013<br />
| Wooden trapdoor closed<br />
| <br />
|-<br />
| 1014<br />
| Fence gate closed<br />
| <br />
|-<br />
| 1015<br />
| Ghast warns<br />
| <br />
|-<br />
| 1016<br />
| Ghast shoots<br />
| <br />
|-<br />
| 1017<br />
| Enderdragon shoots<br />
| <br />
|-<br />
| 1018<br />
| Blaze shoots<br />
| <br />
|-<br />
| 1019<br />
| Zombie attacks wood door<br />
| <br />
|-<br />
| 1020<br />
| Zombie attacks iron door<br />
| <br />
|-<br />
| 1021<br />
| Zombie breaks wood door<br />
|<br />
|-<br />
| 1022<br />
| Wither breaks block<br />
|<br />
|-<br />
| 1023<br />
| Wither spawned<br />
| <br />
|-<br />
| 1024<br />
| Wither shoots<br />
|<br />
|-<br />
| 1025<br />
| Bat takes off<br />
|<br />
|-<br />
| 1026<br />
| Zombie infects<br />
|<br />
|-<br />
| 1027<br />
| Zombie villager converted<br />
|<br />
|-<br />
| 1028<br />
| Ender dragon death<br />
|<br />
|-<br />
| 1029<br />
| Anvil destroyed<br />
| <br />
|-<br />
| 1030<br />
| Anvil used<br />
| <br />
|-<br />
| 1031<br />
| Anvil landed<br />
|<br />
|-<br />
| 1032<br />
| Portal travel<br />
| <br />
|-<br />
| 1033<br />
| Chorus flower grown<br />
|<br />
|-<br />
| 1034<br />
| Chorus flower died<br />
| <br />
|-<br />
| 1035<br />
| Brewing stand brewed<br />
|<br />
|-<br />
| 1036<br />
| Iron trapdoor opened<br />
| <br />
|-<br />
| 1037<br />
| Iron trapdoor closed<br />
|<br />
|-<br />
| 1038<br />
| End portal created in overworld<br />
|<br />
|-<br />
| 1039<br />
| Phantom bites<br />
|<br />
|-<br />
| 1040<br />
| Zombie converts to drowned<br />
|<br />
|-<br />
| 1041<br />
| Husk converts to zombie by drowning<br />
|<br />
|-<br />
| 1042<br />
| Grindstone used<br />
|<br />
|-<br />
| 1043<br />
| Book page turned<br />
|<br />
|-<br />
|-<br />
!colspan="3"| Particle<br />
|-<br />
| 1500<br />
| Composter composts<br />
|<br />
|-<br />
| 1501<br />
| Lava converts block (either water to stone, or removes existing blocks such as torches)<br />
|<br />
|-<br />
| 1502<br />
| Redstone torch burns out<br />
|<br />
|- <br />
| 1503<br />
| Ender eye placed<br />
|<br />
|-<br />
| 2000<br />
| Spawns 10 smoke particles, e.g. from a fire<br />
| Direction, see below<br />
|-<br />
| 2001<br />
| Block break + block break sound<br />
| Block state, as an index into the global palette<br />
|-<br />
| 2002<br />
| Splash potion. Particle effect + glass break sound.<br />
| [http://minecraft.gamepedia.com/Data_values#Potions Potion ID]<br />
|-<br />
| 2003<br />
| Eye of Ender entity break animation — particles and sound<br />
| <br />
|-<br />
| 2004<br />
| Mob spawn particle effect: smoke + flames<br />
| <br />
|-<br />
| 2005<br />
| Bonemeal particles<br />
| How many particles to spawn (if set to 0, 15 are spawned)<br />
|-<br />
| 2006<br />
| Dragon breath<br />
|<br />
|-<br />
| 2007<br />
| Instant splash potion<br />
| [http://minecraft.gamepedia.com/Data_values#Potions Potion ID]<br />
|-<br />
| 2008<br />
| Ender dragon destroys block<br />
|<br />
|-<br />
| 2009<br />
| Wet sponge vaporizes in nether<br />
|<br />
|-<br />
| 3000<br />
| End gateway spawn<br />
| <br />
|-<br />
| 3001<br />
| Enderdragon growl<br />
|<br />
|}<br />
<br />
Smoke directions:<br />
<br />
{| class="wikitable"<br />
! ID<br />
! Direction<br />
|-<br />
| 0<br />
| South-East<br />
|-<br />
| 1<br />
| South<br />
|-<br />
| 2<br />
| South-West<br />
|-<br />
| 3<br />
| East<br />
|-<br />
| 4<br />
| (Up or middle ?)<br />
|-<br />
| 5<br />
| West<br />
|-<br />
| 6<br />
| North-East<br />
|-<br />
| 7<br />
| North<br />
|-<br />
| 8<br />
| North-West<br />
|}<br />
<br />
Play record: This is actually a special case within this packet. You can start/stop a record at a specific location. Use a valid {{Minecraft Wiki|Music Discs|Record ID}} to start a record (or overwrite a currently playing one), any other value will stop the record. See [[Data Generators]] for information on item IDs.<br />
<br />
==== Particle ====<br />
<br />
Displays the named particle<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="11"| 0x24<br />
|rowspan="11"| Play<br />
|rowspan="11"| Client<br />
| Particle ID<br />
| Int<br />
| The particle ID listed in [[#Particle|the particle data type]].<br />
|-<br />
| Long Distance<br />
| Boolean<br />
| If true, particle distance increases from 256 to 65536<br />
|-<br />
| X<br />
| Double<br />
| X position of the particle<br />
|-<br />
| Y<br />
| Double<br />
| Y position of the particle<br />
|-<br />
| Z<br />
| Double<br />
| Z position of the particle<br />
|-<br />
| Offset X<br />
| Float<br />
| This is added to the X position after being multiplied by random.nextGaussian()<br />
|-<br />
| Offset Y<br />
| Float<br />
| This is added to the Y position after being multiplied by random.nextGaussian()<br />
|-<br />
| Offset Z<br />
| Float<br />
| This is added to the Z position after being multiplied by random.nextGaussian()<br />
|-<br />
| Particle Data<br />
| Float<br />
| The data of each particle<br />
|-<br />
| Particle Count<br />
| Int<br />
| The number of particles to create<br />
|-<br />
| Data<br />
| Varies<br />
| The variable data listed in [[#Particle|the particle data type]].<br />
|}<br />
<br />
==== Update Light ====<br />
<br />
Updates light levels for a chunk.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
!colspan="2"| Field Name<br />
!colspan="2"| Field Type<br />
! Notes<br />
|-<br />
|rowspan="10"| 0x25<br />
|rowspan="10"| Play<br />
|rowspan="10"| Client<br />
|colspan="2"| Chunk X<br />
|colspan="2"| VarInt<br />
| Chunk coordinate (block coordinate divided by 16, rounded down) <br />
|-<br />
|colspan="2"| Chunk Z<br />
|colspan="2"| VarInt<br />
| Chunk coordinate (block coordinate divided by 16, rounded down) <br />
|-<br />
|colspan="2"| Sky Light Mask<br />
|colspan="2"| VarInt<br />
| Mask containing 18 bits, with the lowest bit corresponding to chunk section -1 (in the void, y=-16 to y=-1) and the highest bit for chunk section 16 (above the world, y=256 to y=271)<br />
|-<br />
|colspan="2"| Block Light Mask<br />
|colspan="2"| VarInt<br />
| Mask containing 18 bits, with the same order as sky light<br />
|-<br />
|colspan="2"| Empty Sky Light Mask<br />
|colspan="2"| VarInt<br />
| Mask containing 18 bits, which indicates sections that have 0 for all their sky light values. If a section is set in both this mask and the main sky light mask, it is ignored for this mask and it is included in the sky light arrays (the notchian server does not create such masks). If it is only set in this mask, it is not included in the sky light arrays.<br />
|-<br />
|colspan="2"| Empty Block Light Mask<br />
|colspan="2"| VarInt<br />
| Mask containing 18 bits, which indicates sections that have 0 for all their block light values. If a section is set in both this mask and the main block light mask, it is ignored for this mask and it is included in the block light arrays (the notchian server does not create such masks). If it is only set in this mask, it is not included in the block light arrays.<br />
|-<br />
|rowspan="2"| Sky Light arrays<br />
| Length<br />
|rowspan="2"| Array<br />
| VarInt<br />
| Length of the following array in bytes (always 2048)<br />
|-<br />
| Sky Light array<br />
| Array of 2048 bytes<br />
| There is 1 array for each bit set to true in the sky light mask, starting with the lowest value. Half a byte per light value.<br />
|-<br />
|rowspan="2"| Block Light arrays<br />
| Length<br />
|rowspan="2"| Array<br />
| VarInt<br />
| Length of the following array in bytes (always 2048)<br />
|-<br />
| Block Light array<br />
| Array of 2048 bytes<br />
| There is 1 array for each bit set to true in the block light mask, starting with the lowest value. Half a byte per light value.<br />
|}<br />
<br />
Individual block or sky light arrays are is given for each block with increasing x coordinates, within rows of increasing z coordinates, within layers of increasing y coordinates. Even-indexed items (those with an even x coordinate, starting at 0) are packed into the low bits, odd-indexed into the high bits.<br />
<br />
==== Join Game ====<br />
<br />
See [[Protocol Encryption]] for information on logging in.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="9"| 0x26<br />
|rowspan="9"| Play<br />
|rowspan="9"| Client<br />
| Entity ID<br />
| Int<br />
| The player's Entity ID (EID)<br />
|-<br />
| Gamemode<br />
| Unsigned Byte<br />
| 0: Survival, 1: Creative, 2: Adventure, 3: Spectator. Bit 3 (0x8) is the hardcore flag.<br />
|-<br />
| Dimension<br />
| Int Enum<br />
| -1: Nether, 0: Overworld, 1: End; also, note that this is not a VarInt but instead a regular int.<br />
|-<br />
| Hashed seed<br />
| Long<br />
| First 8 bytes of the SHA-256 hash of the world's seed.<br />
|-<br />
| Max Players<br />
| Unsigned Byte<br />
| Was once used by the client to draw the player list, but now is ignored<br />
|-<br />
| Level Type<br />
| String Enum (16)<br />
| default, flat, largeBiomes, amplified, customized, buffet, default_1_1<br />
|-<br />
| View Distance<br />
| VarInt<br />
| Render distance (2-32)<br />
|-<br />
| Reduced Debug Info<br />
| Boolean<br />
| If true, a Notchian client shows reduced information on the {{Minecraft Wiki|debug screen}}. For servers in development, this should almost always be false.<br />
|-<br />
| Enable respawn screen<br />
| Boolean<br />
| Set to false when the doImmediateRespawn gamerule is true<br />
|}<br />
<br />
==== Map Data ====<br />
<br />
Updates a rectangular area on a {{Minecraft Wiki|map}} item.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
!colspan="2"| Field Name<br />
!colspan="2"| Field Type<br />
! Notes<br />
|-<br />
|rowspan="17"| 0x27<br />
|rowspan="17"| Play<br />
|rowspan="17"| Client<br />
|colspan="2"| Map ID<br />
|colspan="2"| VarInt<br />
| Map ID of the map being modified<br />
|-<br />
|colspan="2"| Scale<br />
|colspan="2"| Byte<br />
| From 0 for a fully zoomed-in map (1 block per pixel) to 4 for a fully zoomed-out map (16 blocks per pixel)<br />
|- <br />
|colspan="2"| Tracking Position<br />
|colspan="2"| Boolean<br />
| Specifies whether player and item frame icons are shown<br />
|-<br />
|colspan="2"| Locked<br />
|colspan="2"| Boolean<br />
| True if the map has been locked in a cartography table<br />
|- <br />
|colspan="2"| Icon Count<br />
|colspan="2"| VarInt<br />
| Number of elements in the following array<br />
|-<br />
|rowspan="6"| Icon<br />
| Type<br />
|rowspan="6"| Array<br />
| VarInt enum<br />
| See below<br />
|-<br />
| X<br />
| Byte<br />
| Map coordinates: -128 for furthest left, +127 for furthest right<br />
|-<br />
| Z<br />
| Byte<br />
| Map coordinates: -128 for highest, +127 for lowest<br />
|-<br />
| Direction<br />
| Byte<br />
| 0-15<br />
|-<br />
| Has Display Name<br />
| Boolean<br />
|<br />
|-<br />
| Display Name<br />
| Optional [[Chat]]<br />
| Only present if previous Boolean is true<br />
|- <br />
|colspan="2"| Columns<br />
|colspan="2"| Unsigned Byte<br />
| Number of columns updated<br />
|-<br />
|colspan="2"| Rows<br />
|colspan="2"| Optional Byte<br />
| Only if Columns is more than 0; number of rows updated<br />
|-<br />
|colspan="2"| X<br />
|colspan="2"| Optional Byte<br />
| Only if Columns is more than 0; x offset of the westernmost column<br />
|-<br />
|colspan="2"| Z<br />
|colspan="2"| Optional Byte<br />
| Only if Columns is more than 0; z offset of the northernmost row<br />
|-<br />
|colspan="2"| Length<br />
|colspan="2"| Optional VarInt<br />
| Only if Columns is more than 0; length of the following array<br />
|-<br />
|colspan="2"| Data<br />
|colspan="2"| Optional Array of Unsigned Byte<br />
| Only if Columns is more than 0; see {{Minecraft Wiki|Map item format}}<br />
|}<br />
<br />
For icons, a direction of 0 is a vertical icon and increments by 22.5&deg; (360/16).<br />
<br />
Types are based off of rows and columns in <code>map_icons.png</code>:<br />
<br />
{| class="wikitable"<br />
|-<br />
! Icon type<br />
! Result<br />
|-<br />
| 0<br />
| White arrow (players)<br />
|-<br />
| 1<br />
| Green arrow (item frames)<br />
|-<br />
| 2<br />
| Red arrow<br />
|-<br />
| 3<br />
| Blue arrow<br />
|-<br />
| 4<br />
| White cross<br />
|-<br />
| 5<br />
| Red pointer<br />
|-<br />
| 6<br />
| White circle (off-map players)<br />
|-<br />
| 7<br />
| Small white circle (far-off-map players)<br />
|-<br />
| 8<br />
| Mansion<br />
|-<br />
| 9<br />
| Temple<br />
|-<br />
| 10<br />
| White Banner<br />
|-<br />
| 11<br />
| Orange Banner<br />
|-<br />
| 12<br />
| Magenta Banner<br />
|-<br />
| 13<br />
| Light Blue Banner<br />
|-<br />
| 14<br />
| Yellow Banner<br />
|-<br />
| 15<br />
| Lime Banner<br />
|-<br />
| 16<br />
| Pink Banner<br />
|-<br />
| 17<br />
| Gray Banner<br />
|-<br />
| 18<br />
| Light Gray Banner<br />
|-<br />
| 19<br />
| Cyan Banner<br />
|-<br />
| 20<br />
| Purple Banner<br />
|-<br />
| 21<br />
| Blue Banner<br />
|-<br />
| 22<br />
| Brown Banner<br />
|-<br />
| 23<br />
| Green Banner<br />
|-<br />
| 24<br />
| Red Banner<br />
|-<br />
| 25<br />
| Black Banner<br />
|-<br />
| 26<br />
| Treasure marker<br />
|}<br />
<br />
==== Trade List ====<br />
<br />
The list of trades a villager NPC is offering.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
!colspan="2"| Field Name<br />
!colspan="2"| Field Type<br />
! Notes<br />
|-<br />
|rowspan="18"| 0x28<br />
|rowspan="18"| Play<br />
|rowspan="18"| Client<br />
|-<br />
| colspan="2" | Window ID<br />
| colspan="2" | VarInt<br />
| The ID of the window that is open; this is an int rather than a byte.<br />
|-<br />
| colspan="2" | Size<br />
| colspan="2" | Byte<br />
| The number of trades in the following array<br />
|-<br />
| rowspan="11" | Trades<br />
| Input item 1<br />
| rowspan="11" | Array<br />
| [[Slot]]<br />
| The first item the villager is buying<br />
|-<br />
| Output item<br />
| [[Slot]]<br />
| The item the villager is selling<br />
|-<br />
| Has second item<br />
| Boolean<br />
| Whether there is a second item<br />
|-<br />
| Input item 2<br />
| Optional [[Slot]]<br />
| The second item the villager is buying; only present if they have a second item.<br />
|-<br />
| Trade disabled<br />
| Boolean<br />
| True if the trade is disabled; false if the trade is enabled.<br />
|-<br />
| Number of trade uses<br />
| Integer<br />
| Number of times the trade has been used so far<br />
|-<br />
| Maximum number of trade uses<br />
| Integer<br />
| Number of times this trade can be used<br />
|-<br />
| XP<br />
| Integer<br />
|<br />
|-<br />
| Special Price<br />
| Integer<br />
|<br />
|-<br />
| Price Multiplier<br />
| Float<br />
|<br />
|-<br />
| Demand<br />
| Integer<br />
|<br />
|-<br />
|colspan="2"| Villager level<br />
|colspan="2"| VarInt<br />
| Appears on the trade GUI; meaning comes from the translation key <code>merchant.level.</code> + level.<br />
1: Novice, 2: Apprentice, 3: Journeyman, 4: Expert, 5: Master<br />
|-<br />
|colspan="2"| Experience<br />
|colspan="2"| VarInt<br />
| Total experience for this villager (always 0 for the wandering trader)<br />
|-<br />
|colspan="2"| Is regular villager<br />
|colspan="2"| Boolean<br />
| True if this is a regular villager; false for the wandering trader. When false, hides the villager level and some other GUI elements.<br />
|-<br />
|colspan="2"| Can restock<br />
|colspan="2"| Boolean<br />
| True for regular villagers and false for the wandering trader. If true, the "Villagers restock up to two times per day." message is displayed when hovering over disabled trades.<br />
|}<br />
<br />
[[File:1.14-merchant-slots.png|thumb|The merchant UI, for reference]]<br />
{{-}}<br />
<br />
==== Entity Position ====<br />
<br />
This packet is sent by the server when an entity moves less then 8 blocks; if an entity moves more than 8 blocks [[#Entity Teleport|Entity Teleport]] should be sent instead.<br />
<br />
This packet allows at most 8 blocks movement in any direction, because short range is from -32768 to 32767. And <code>32768 / (128 * 32)</code> = 8.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x29<br />
|rowspan="5"| Play<br />
|rowspan="5"| Client<br />
| Entity ID<br />
| VarInt<br />
| <br />
|-<br />
| Delta X<br />
| Short<br />
| Change in X position as <code>(currentX * 32 - prevX * 32) * 128</code><br />
|-<br />
| Delta Y<br />
| Short<br />
| Change in Y position as <code>(currentY * 32 - prevY * 32) * 128</code><br />
|-<br />
| Delta Z<br />
| Short<br />
| Change in Z position as <code>(currentZ * 32 - prevZ * 32) * 128</code><br />
|-<br />
| On Ground<br />
| Boolean<br />
| <br />
|}<br />
<br />
==== Entity Position and Rotation ====<br />
<br />
This packet is sent by the server when an entity rotates and moves. Since a short range is limited from -32768 to 32767, and movement is offset of fixed-point numbers, this packet allows at most 8 blocks movement in any direction. (<code>-32768 / (32 * 128) == -8</code>)<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="7"| 0x2A<br />
|rowspan="7"| Play<br />
|rowspan="7"| Client<br />
| Entity ID<br />
| VarInt<br />
| <br />
|-<br />
| Delta X<br />
| Short<br />
| Change in X position as <code>(currentX * 32 - prevX * 32) * 128</code><br />
|-<br />
| Delta Y<br />
| Short<br />
| Change in Y position as <code>(currentY * 32 - prevY * 32) * 128</code><br />
|-<br />
| Delta Z<br />
| Short<br />
| Change in Z position as <code>(currentZ * 32 - prevZ * 32) * 128</code><br />
|-<br />
| Yaw<br />
| Angle<br />
| New angle, not a delta<br />
|-<br />
| Pitch<br />
| Angle<br />
| New angle, not a delta<br />
|-<br />
| On Ground<br />
| Boolean<br />
| <br />
|}<br />
<br />
==== Entity Rotation ====<br />
<br />
This packet is sent by the server when an entity rotates.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x2B<br />
|rowspan="4"| Play<br />
|rowspan="4"| Client<br />
| Entity ID<br />
| VarInt<br />
| <br />
|-<br />
| Yaw<br />
| Angle<br />
| New angle, not a delta<br />
|-<br />
| Pitch<br />
| Angle<br />
| New angle, not a delta<br />
|-<br />
| On Ground<br />
| Boolean<br />
| <br />
|}<br />
<br />
==== Entity Movement ====<br />
<br />
This packet may be used to initialize an entity.<br />
<br />
For player entities, either this packet or any move/look packet is sent every game tick. So the meaning of this packet is basically that the entity did not move/look since the last such packet.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x2C<br />
|rowspan="1"| Play<br />
|rowspan="1"| Client<br />
| Entity ID<br />
| VarInt<br />
| <br />
|}<br />
<br />
==== Vehicle Move (clientbound) ====<br />
<br />
Note that all fields use absolute positioning and do not allow for relative positioning.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x2D<br />
|rowspan="5"| Play<br />
|rowspan="5"| Client<br />
| X<br />
| Double<br />
| Absolute position (X coordinate)<br />
|-<br />
| Y<br />
| Double<br />
| Absolute position (Y coordinate)<br />
|-<br />
| Z<br />
| Double<br />
| Absolute position (Z coordinate)<br />
|-<br />
| Yaw<br />
| Float<br />
| Absolute rotation on the vertical axis, in degrees<br />
|-<br />
| Pitch<br />
| Float<br />
| Absolute rotation on the horizontal axis, in degrees<br />
|}<br />
<br />
==== Open Book ====<br />
<br />
Sent when a player right clicks with a signed book. This tells the client to open the book GUI.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x2E<br />
|rowspan="1"| Play<br />
|rowspan="1"| Client<br />
| Hand<br />
| VarInt enum<br />
| 0: Main hand, 1: Off hand <br />
|}<br />
<br />
==== Open Window ====<br />
<br />
This is sent to the client when it should open an inventory, such as a chest, workbench, or furnace. This message is not sent anywhere for clients opening their own inventory. For horses, use [[#Open Horse Window|Open Horse Window]].<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x2F<br />
|rowspan="3"| Play<br />
|rowspan="3"| Client<br />
| Window ID<br />
| VarInt<br />
| A unique id number for the window to be displayed. Notchian server implementation is a counter, starting at 1.<br />
|-<br />
| Window Type<br />
| VarInt<br />
| The window type to use for display. Contained in the <code>minecraft:menu</code> regisry; see [[Inventory]] for the different values.<br />
|-<br />
| Window Title<br />
| [[Chat]]<br />
| The title of the window<br />
|}<br />
<br />
==== Open Sign Editor ====<br />
<br />
Sent when the client has placed a sign and is allowed to send [[#Update Sign|Update Sign]]. There must already be a sign at the given location (which the client does not do automatically) - send a [[#Block Change|Block Change]] first.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x30<br />
|rowspan="1"| Play<br />
|rowspan="1"| Client<br />
| Location<br />
| Position<br />
| <br />
|}<br />
<br />
==== Craft Recipe Response ====<br />
<br />
Response to the serverbound packet ([[#Craft Recipe Request|Craft Recipe Request]]), with the same recipe ID. Appears to be used to notify the UI.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x31<br />
|rowspan="2"| Play<br />
|rowspan="2"| Client<br />
| Window ID<br />
| Byte<br />
|<br />
|-<br />
| Recipe<br />
| Identifier<br />
| A recipe ID<br />
|}<br />
<br />
==== Player Abilities (clientbound) ====<br />
<br />
The latter 2 floats are used to indicate the field of view and flying speed respectively, while the first byte is used to determine the value of 4 booleans.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x32<br />
|rowspan="3"| Play<br />
|rowspan="3"| Client<br />
| Flags<br />
| Byte<br />
| Bit field, see below<br />
|-<br />
| Flying Speed<br />
| Float<br />
| 0.05 by default<br />
|-<br />
| Field of View Modifier<br />
| Float<br />
| Modifies the field of view, like a speed potion. A Notchian server will use the same value as the movement speed sent in the [[Protocol#Entity_Properties|Entity Properties]] packet, which defaults to 0.1 for players.<br />
|}<br />
<br />
About the flags:<br />
<br />
{| class="wikitable"<br />
|-<br />
! Field<br />
! Bit<br />
|-<br />
| Invulnerable<br />
| 0x01<br />
|-<br />
| Flying<br />
| 0x02<br />
|-<br />
| Allow Flying<br />
| 0x04<br />
|-<br />
| Creative Mode (Instant Break)<br />
| 0x08<br />
|}<br />
<br />
==== Combat Event ====<br />
<br />
Originally used for metadata for twitch streaming circa 1.8. Now only used to display the game over screen (with enter combat and end combat completely ignored by the Notchain client)<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
!colspan="2"| Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="8"| 0x33<br />
|rowspan="8"| Play<br />
|rowspan="8"| Client<br />
|colspan="2"| Event<br />
| VarInt Enum<br />
| Determines the layout of the remaining packet<br />
|-<br />
! Event<br />
! Field Name<br />
! <br />
! <br />
|-<br />
| 0: enter combat<br />
| ''no fields''<br />
| ''no fields''<br />
| <br />
|-<br />
|rowspan="2"| 1: end combat<br />
| Duration<br />
| VarInt<br />
| Length of the combat in ticks.<br />
|-<br />
| Entity ID<br />
| Int<br />
| ID of the primary opponent of the ended combat, or -1 if there is no obvious primary opponent.<br />
|-<br />
|rowspan="3"| 2: entity dead<br />
| Player ID<br />
| VarInt<br />
| Entity ID of the player that died (should match the client's entity ID).<br />
|-<br />
| Entity ID<br />
| Int<br />
| The killing entity's ID, or -1 if there is no obvious killer.<br />
|-<br />
| Message<br />
| [[Chat]]<br />
| The death message<br />
|}<br />
<br />
==== Player Info ====<br />
<br />
Sent by the server to update the user list (<tab> in the client).<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
!colspan="4"| Field Name<br />
!colspan="3"| Field Type<br />
! Notes<br />
|-<br />
|rowspan="19"| 0x34<br />
|rowspan="19"| Play<br />
|rowspan="19"| Client<br />
|colspan="4"| Action<br />
|colspan="3"| VarInt<br />
| Determines the rest of the Player format after the UUID<br />
|-<br />
|colspan="4"| Number Of Players<br />
|colspan="3"| VarInt<br />
| Number of elements in the following array<br />
|-<br />
|rowspan="17"| Player<br />
|colspan="3"| UUID<br />
|rowspan="17"| Array<br />
|colspan="2"| UUID<br />
| <br />
|-<br />
! Action<br />
!colspan="2"| Field Name<br />
!colspan="2"| <br />
! <br />
|-<br />
|rowspan="10"| 0: add player<br />
|colspan="2"| Name<br />
|colspan="2"| String (16)<br />
| <br />
|-<br />
|colspan="2"| Number Of Properties<br />
|colspan="2"| VarInt<br />
| Number of elements in the following array<br />
|-<br />
|rowspan="4"| Property<br />
| Name<br />
|rowspan="4"| Array<br />
| String (32767)<br />
| <br />
|-<br />
| Value<br />
| String (32767)<br />
| <br />
|- <br />
| Is Signed<br />
| Boolean<br />
| <br />
|-<br />
| Signature<br />
| Optional String (32767)<br />
| Only if Is Signed is true<br />
|-<br />
|colspan="2"| Gamemode<br />
|colspan="2"| VarInt<br />
| <br />
|-<br />
|colspan="2"| Ping<br />
|colspan="2"| VarInt<br />
| Measured in milliseconds<br />
|-<br />
|colspan="2"| Has Display Name<br />
|colspan="2"| Boolean<br />
| <br />
|-<br />
|colspan="2"| Display Name<br />
|colspan="2"| Optional [[Chat]]<br />
| Only if Has Display Name is true<br />
|-<br />
| 1: update gamemode<br />
|colspan="2"| Gamemode<br />
|colspan="2"| VarInt<br />
| <br />
|- <br />
| 2: update latency<br />
|colspan="2"| Ping<br />
|colspan="2"| VarInt<br />
| Measured in milliseconds<br />
|-<br />
|rowspan="2"| 3: update display name<br />
|colspan="2"| Has Display Name<br />
|colspan="2"| Boolean<br />
| <br />
|-<br />
|colspan="2"| Display Name<br />
|colspan="2"| Optional [[Chat]]<br />
| Only send if Has Display Name is true<br />
|-<br />
| 4: remove player<br />
|colspan="2"| ''no fields''<br />
|colspan="2"| ''no fields''<br />
| <br />
|}<br />
<br />
The Property field looks as in the response of [[Mojang API#UUID -> Profile + Skin/Cape]], except of course using the protocol format instead of JSON. That is, each player will usually have one property with Name “textures” and Value being a base64-encoded JSON string as documented at [[Mojang API#UUID -> Profile + Skin/Cape]]. An empty properties array is also acceptable, and will cause clients to display the player with one of the two default skins depending on UUID.<br />
<br />
Ping values correspond with icons in the following way:<br />
* A ping that negative (i.e. not known to the server yet) will result in the no connection icon.<br />
* A ping under 150 milliseconds will result in 5 bars<br />
* A ping under 300 milliseconds will result in 4 bars<br />
* A ping under 600 milliseconds will result in 3 bars<br />
* A ping under 1000 milliseconds (1 second) will result in 2 bars<br />
* A ping greater than or equal to 1 second will result in 1 bar.<br />
<br />
==== Face Player ====<br />
<br />
Used to rotate the client player to face the given location or entity (for <code>/teleport [<targets>] <x> <y> <z> facing</code>).<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="8"| 0x35<br />
|rowspan="8"| Play<br />
|rowspan="8"| Client<br />
|-<br />
| Feet/eyes<br />
| VarInt enum<br />
| Values are feet=0, eyes=1. If set to eyes, aims using the head position; otherwise aims using the feet position.<br />
|-<br />
| Target x<br />
| Double<br />
| x coordinate of the point to face towards<br />
|-<br />
| Target y<br />
| Double<br />
| y coordinate of the point to face towards<br />
|-<br />
| Target z<br />
| Double<br />
| z coordinate of the point to face towards<br />
|-<br />
| Is entity<br />
| Boolean<br />
| If true, additional information about an entity is provided.<br />
|-<br />
| Entity ID<br />
| Optional VarInt<br />
| Only if is entity is true &mdash; the entity to face towards<br />
|-<br />
| Entity feet/eyes<br />
| Optional VarInt enum<br />
| Whether to look at the entity's eyes or feet. Same values and meanings as before, just for the entity's head/feet.<br />
|}<br />
<br />
If the entity given by entity ID cannot be found, this packet should be treated as if is entity was false.<br />
<br />
==== Player Position And Look (clientbound) ==== <br />
<br />
Updates the player's position on the server. This packet will also close the “Downloading Terrain” screen when joining/respawning.<br />
<br />
If the distance between the last known position of the player on the server and the new position set by this packet is greater than 100 meters, the client will be kicked for “You moved too quickly :( (Hacking?)”.<br />
<br />
Also if the fixed-point number of X or Z is set greater than <code>3.2E7D</code> the client will be kicked for “Illegal position”.<br />
<br />
Yaw is measured in degrees, and does not follow classical trigonometry rules. The unit circle of yaw on the XZ-plane starts at (0, 1) and turns counterclockwise, with 90 at (-1, 0), 180 at (0, -1) and 270 at (1, 0). Additionally, yaw is not clamped to between 0 and 360 degrees; any number is valid, including negative numbers and numbers greater than 360.<br />
<br />
Pitch is measured in degrees, where 0 is looking straight ahead, -90 is looking straight up, and 90 is looking straight down.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="7"| 0x36<br />
|rowspan="7"| Play<br />
|rowspan="7"| Client<br />
| X<br />
| Double<br />
| Absolute or relative position, depending on Flags<br />
|-<br />
| Y<br />
| Double<br />
| Absolute or relative position, depending on Flags<br />
|-<br />
| Z<br />
| Double<br />
| Absolute or relative position, depending on Flags<br />
|-<br />
| Yaw<br />
| Float<br />
| Absolute or relative rotation on the X axis, in degrees<br />
|-<br />
| Pitch<br />
| Float<br />
| Absolute or relative rotation on the Y axis, in degrees<br />
|-<br />
| Flags<br />
| Byte<br />
| Bit field, see below<br />
|-<br />
| Teleport ID<br />
| VarInt<br />
| Client should confirm this packet with [[#Teleport Confirm|Teleport Confirm]] containing the same Teleport ID<br />
|}<br />
<br />
About the Flags field:<br />
<br />
<Dinnerbone> It's a bitfield, X/Y/Z/Y_ROT/X_ROT. If X is set, the x value is relative and not absolute.<br />
<br />
{| class="wikitable"<br />
|-<br />
! Field<br />
! Bit<br />
|-<br />
| X<br />
| 0x01<br />
|-<br />
| Y<br />
| 0x02<br />
|-<br />
| Z<br />
| 0x04<br />
|-<br />
| Y_ROT<br />
| 0x08<br />
|-<br />
| X_ROT<br />
| 0x10<br />
|}<br />
<br />
==== Unlock Recipes ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="10"| 0x37<br />
|rowspan="10"| Play<br />
|rowspan="10"| Client<br />
|-<br />
| Action<br />
| VarInt<br />
| 0: init, 1: add, 2: remove<br />
|-<br />
| Crafting Recipe Book Open<br />
| Boolean<br />
| If true, then the crafting recipe book will be open when the player opens its inventory.<br />
|-<br />
| Crafting Recipe Book Filter Active<br />
| Boolean<br />
| If true, then the filtering option is active when the players opens its inventory.<br />
|-<br />
| Smelting Recipe Book Open<br />
| Boolean<br />
| If true, then the smelting recipe book will be open when the player opens its inventory.<br />
|-<br />
| Smelting Recipe Book Filter Active<br />
| Boolean<br />
| If true, then the filtering option is active when the players opens its inventory.<br />
|-<br />
| Array size 1<br />
| VarInt<br />
| Number of elements in the following array<br />
|-<br />
| Recipe IDs<br />
| Array of Identifier<br />
|<br />
|-<br />
| Array size 2<br />
| Optional VarInt<br />
| Number of elements in the following array, only present if mode is 0 (init)<br />
|-<br />
| Recipe IDs<br />
| Optional Array of Identifier, only present if mode is 0 (init)<br />
|<br />
|}<br />
Action:<br />
* 0 (init) = All the recipes in the list 2 will added to the recipe book. All the recipes in list 1 will be tagged as displayed, recipes that aren't tagged will be shown in the notification. VERIFY LIST ORDER?<br />
* 1 (add) = All the recipes in the list are added and their icon will be shown in the notification.<br />
* 2 (remove) = Remove all the recipes in the list. This allows them to re-displayed when they are readded.<br />
<br />
==== Destroy Entities ====<br />
<br />
Sent by the server when a list of entities is to be destroyed on the client.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x38<br />
|rowspan="2"| Play<br />
|rowspan="2"| Client<br />
| Count<br />
| VarInt<br />
| Number of elements in the following array<br />
|-<br />
| Entity IDs<br />
| Array of VarInt<br />
| The list of entities of destroy<br />
|}<br />
<br />
==== Remove Entity Effect ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x39<br />
|rowspan="2"| Play<br />
|rowspan="2"| Client<br />
| Entity ID<br />
| VarInt<br />
| <br />
|-<br />
| Effect ID<br />
| Byte<br />
| See {{Minecraft Wiki|Status effect#List of effects|this table}}<br />
|}<br />
<br />
==== Resource Pack Send ==== <br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x3A<br />
|rowspan="2"| Play<br />
|rowspan="2"| Client<br />
| URL<br />
| String (32767)<br />
| The URL to the resource pack.<br />
|-<br />
| Hash<br />
| String (40)<br />
| A 40 character hexadecimal and lowercase [[wikipedia:SHA-1|SHA-1]] hash of the resource pack file. (must be lower case in order to work)<br />If it's not a 40 character hexadecimal string, the client will not use it for hash verification and likely waste bandwidth — but it will still treat it as a unique id<br />
|}<br />
<br />
==== Respawn ====<br />
<br />
To change the player's dimension (overworld/nether/end), send them a respawn packet with the appropriate dimension, followed by prechunks/chunks for the new dimension, and finally a position and look packet. You do not need to unload chunks, the client will do it automatically.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x3B<br />
|rowspan="4"| Play<br />
|rowspan="4"| Client<br />
| Dimension<br />
| Int Enum<br />
| -1: The Nether, 0: The Overworld, 1: The End<br />
|-<br />
| Hashed seed<br />
| Long<br />
| First 8 bytes of the SHA-256 hash of the world's seed.<br />
|-<br />
| Gamemode<br />
| Unsigned Byte<br />
| 0: survival, 1: creative, 2: adventure, 3: spectator. The hardcore flag is not included<br />
|-<br />
| Level Type<br />
| String (16)<br />
| Same as [[#Join Game|Join Game]]<br />
|}<br />
<br />
{{Warning2|Avoid changing player's dimension to same dimension they were already in unless they are dead. If you change the dimension to one they are already in, weird bugs can occur, such as the player being unable to attack other players in new world (until they die and respawn).<br />
<br />
If you must respawn a player in the same dimension without killing them, send two respawn packets, one to a different world and then another to the world you want. You do not need to complete the first respawn; it only matters that you send two packets.}}<br />
<br />
==== Entity Head Look ====<br />
<br />
Changes the direction an entity's head is facing.<br />
<br />
While sending the Entity Look packet changes the vertical rotation of the head, sending this packet appears to be necessary to rotate the head horizontally.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x3C<br />
|rowspan="2"| Play<br />
|rowspan="2"| Client<br />
| Entity ID<br />
| VarInt<br />
| <br />
|-<br />
| Head Yaw<br />
| Angle<br />
| New angle, not a delta<br />
|}<br />
<br />
==== Select Advancement Tab ====<br />
<br />
Sent by the server to indicate that the client should switch advancement tab. Sent either when the client switches tab in the GUI or when an advancement in another tab is made.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x3D<br />
|rowspan="2"| Play<br />
|rowspan="2"| Client<br />
| Has id<br />
| Boolean<br />
| Indicates if the next field is present<br />
|-<br />
| Optional Identifier<br />
| String (32767)<br />
| See below<br />
|}<br />
<br />
The Identifier can be one of the following:<br />
<br />
{| class="wikitable"<br />
! Optional Identifier<br />
|-<br />
| minecraft:story/root<br />
|-<br />
| minecraft:nether/root<br />
|-<br />
| minecraft:end/root<br />
|-<br />
| minecraft:adventure/root<br />
|-<br />
| minecraft:husbandry/root<br />
|}<br />
<br />
If no or an invalid identifier is sent, the client will switch to the first tab in the GUI.<br />
<br />
==== World Border ==== <br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
!colspan="2"| Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="18"| 0x3E<br />
|rowspan="18"| Play<br />
|rowspan="18"| Client<br />
|colspan="2"| Action<br />
| VarInt Enum<br />
| Determines the format of the rest of the packet<br />
|-<br />
! Action<br />
! Field Name<br />
! <br />
! <br />
|-<br />
| 0: set size<br />
| Diameter<br />
| Double<br />
| Length of a single side of the world border, in meters<br />
|-<br />
|rowspan="3"| 1: lerp size<br />
| Old Diameter<br />
| Double<br />
| Current length of a single side of the world border, in meters<br />
|-<br />
| New Diameter<br />
| Double<br />
| Target length of a single side of the world border, in meters<br />
|-<br />
| Speed<br />
| VarLong<br />
| Number of real-time ''milli''seconds until New Diameter is reached. It appears that Notchian server does not sync world border speed to game ticks, so it gets out of sync with server lag. If the world border is not moving, this is set to 0.<br />
|-<br />
|rowspan="2"| 2: set center<br />
| X<br />
| Double<br />
| <br />
|-<br />
| Z<br />
| Double<br />
| <br />
|-<br />
|rowspan="8"| 3: initialize<br />
| X<br />
| Double<br />
| <br />
|-<br />
| Z<br />
| Double<br />
| <br />
|-<br />
| Old Diameter<br />
| Double<br />
| Current length of a single side of the world border, in meters<br />
|-<br />
| New Diameter<br />
| Double<br />
| Target length of a single side of the world border, in meters<br />
|-<br />
| Speed<br />
| VarLong<br />
| Number of real-time ''milli''seconds until New Diameter is reached. It appears that Notchian server does not sync world border speed to game ticks, so it gets out of sync with server lag. If the world border is not moving, this is set to 0.<br />
|-<br />
| Portal Teleport Boundary<br />
| VarInt<br />
| Resulting coordinates from a portal teleport are limited to ±value. Usually 29999984.<br />
|-<br />
| Warning Time<br />
| VarInt<br />
| In seconds as set by <code>/worldborder warning time</code><br />
|-<br />
| Warning Blocks<br />
| VarInt<br />
| In meters<br />
|-<br />
|rowspan="1"| 4: set warning time<br />
| Warning Time<br />
| VarInt<br />
| In seconds as set by <code>/worldborder warning time</code><br />
|-<br />
|rowspan="1"| 5: set warning blocks<br />
| Warning Blocks<br />
| VarInt<br />
| In meters<br />
|}<br />
<br />
The Notchian client determines how solid to display the warning by comparing to whichever is higher, the warning distance or whichever is lower, the distance from the current diameter to the target diameter or the place the border will be after warningTime seconds. In pseudocode:<br />
<br />
<syntaxhighlight lang="java"><br />
distance = max(min(resizeSpeed * 1000 * warningTime, abs(targetDiameter - currentDiameter)), warningDistance);<br />
if (playerDistance < distance) {<br />
warning = 1.0 - playerDistance / distance;<br />
} else {<br />
warning = 0.0;<br />
}<br />
</syntaxhighlight><br />
<br />
==== Camera ====<br />
<br />
Sets the entity that the player renders from. This is normally used when the player left-clicks an entity while in spectator mode.<br />
<br />
The player's camera will move with the entity and look where it is looking. The entity is often another player, but can be any type of entity. The player is unable to move this entity (move packets will act as if they are coming from the other entity).<br />
<br />
If the given entity is not loaded by the player, this packet is ignored. To return control to the player, send this packet with their entity ID.<br />
<br />
The Notchian server resets this (sends it back to the default entity) whenever the spectated entity is killed or the player sneaks, but only if they were spectating an entity. It also sends this packet whenever the player switches out of spectator mode (even if they weren't spectating an entity).<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x3F<br />
|rowspan="1"| Play<br />
|rowspan="1"| Client<br />
| Camera ID<br />
| VarInt<br />
| ID of the entity to set the client's camera to<br />
|}<br />
<br />
The notchian also loads certain shaders for given entities:<br />
<br />
* Creeper &rarr; <code>shaders/post/creeper.json</code><br />
* Spider (and cave spider) &rarr; <code>shaders/post/spider.json</code><br />
* Enderman &rarr; <code>shaders/post/invert.json</code><br />
* Anything else &rarr; the current shader is unloaded<br />
<br />
==== Held Item Change (clientbound) ====<br />
<br />
Sent to change the player's slot selection.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x40<br />
|rowspan="1"| Play<br />
|rowspan="1"| Client<br />
| Slot<br />
| Byte<br />
| The slot which the player has selected (0–8)<br />
|}<br />
<br />
==== Update View Position ====<br />
<br />
{{Need Info|Why is this even needed? Is there a better name for it? My guess is that it's something to do with logical behavior with latency, but it still seems weird.}}<br />
<br />
Updates the client's location. This is used to determine what chunks should remain loaded and if a chunk load should be ignored; chunks outside of the view distance may be unloaded.<br />
<br />
Sent whenever the player moves across a chunk border horizontally, and also (according to testing) for any integer change in the vertical axis, even if it doesn't go across a chunk section border.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x41<br />
|rowspan="2"| Play<br />
|rowspan="2"| Client<br />
| Chunk X<br />
| VarInt<br />
| Chunk X coordinate of the player's position<br />
|-<br />
| Chunk Z<br />
| VarInt<br />
| Chunk Z coordinate of the player's position<br />
|}<br />
<br />
==== Update View Distance ====<br />
<br />
Sent by the integrated singleplayer server when changing render distance. Does not appear to be used by the dedicated server, as <code>view-distance</code> in server.properties cannot be changed at runtime.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x42<br />
|rowspan="1"| Play<br />
|rowspan="1"| Client<br />
| View Distance<br />
| VarInt<br />
| Render distance (2-32) <br />
|}<br />
<br />
==== Display Scoreboard ====<br />
<br />
This is sent to the client when it should display a scoreboard.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x43<br />
|rowspan="2"| Play<br />
|rowspan="2"| Client<br />
| Position<br />
| Byte<br />
| The position of the scoreboard. 0: list, 1: sidebar, 2: below name, 3 - 18: team specific sidebar, indexed as 3 + team color.<br />
|-<br />
| Score Name<br />
| String (16)<br />
| The unique name for the scoreboard to be displayed.<br />
|}<br />
<br />
==== Entity Metadata ====<br />
<br />
Updates one or more [[Entities#Entity Metadata Format|metadata]] properties for an existing entity. Any properties not included in the Metadata field are left unchanged.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x44<br />
|rowspan="2"| Play<br />
|rowspan="2"| Client<br />
| Entity ID<br />
| VarInt<br />
| <br />
|-<br />
| Metadata<br />
| [[Entities#Entity Metadata Format|Entity Metadata]]<br />
| <br />
|}<br />
<br />
==== Attach Entity ====<br />
<br />
This packet is sent when an entity has been {{Minecraft Wiki|Lead|leashed}} to another entity.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x45<br />
|rowspan="2"| Play<br />
|rowspan="2"| Client<br />
| Attached Entity ID<br />
| Int<br />
| Attached entity's EID<br />
|-<br />
| Holding Entity ID<br />
| Int<br />
| ID of the entity holding the lead. Set to -1 to detach.<br />
|}<br />
<br />
==== Entity Velocity ====<br />
<br />
Velocity is believed to be in units of 1/8000 of a block per server tick (50ms); for example, -1343 would move (-1343 / 8000) = −0.167875 blocks per tick (or −3,3575 blocks per second).<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x46<br />
|rowspan="4"| Play<br />
|rowspan="4"| Client<br />
| Entity ID<br />
| VarInt<br />
| <br />
|-<br />
| Velocity X<br />
| Short<br />
| Velocity on the X axis<br />
|-<br />
| Velocity Y<br />
| Short<br />
| Velocity on the Y axis<br />
|-<br />
| Velocity Z<br />
| Short<br />
| Velocity on the Z axis<br />
|}<br />
<br />
==== Entity Equipment ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x47<br />
|rowspan="3"| Play<br />
|rowspan="3"| Client<br />
| Entity ID<br />
| VarInt<br />
| Entity's EID<br />
|-<br />
| Slot<br />
| VarInt Enum<br />
| Equipment slot. 0: main hand, 1: off hand, 2–5: armor slot (2: boots, 3: leggings, 4: chestplate, 5: helmet)<br />
|-<br />
| Item<br />
| [[Slot Data|Slot]]<br />
| <br />
|}<br />
<br />
==== Set Experience ====<br />
<br />
Sent by the server when the client should change experience levels.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x48<br />
|rowspan="3"| Play<br />
|rowspan="3"| Client<br />
| Experience bar<br />
| Float<br />
| Between 0 and 1<br />
|-<br />
| Level<br />
| VarInt<br />
| <br />
|-<br />
| Total Experience<br />
| VarInt<br />
| See {{Minecraft Wiki|Experience#Leveling up}} on the Minecraft Wiki for Total Experience to Level conversion<br />
|}<br />
<br />
==== Update Health ====<br />
<br />
Sent by the server to update/set the health of the player it is sent to.<br />
<br />
Food {{Minecraft Wiki|Food#Hunger vs. Saturation|saturation}} acts as a food “overcharge”. Food values will not decrease while the saturation is over zero. Players logging in automatically get a saturation of 5.0. Eating food increases the saturation as well as the food bar.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x49<br />
|rowspan="3"| Play<br />
|rowspan="3"| Client<br />
| Health<br />
| Float<br />
| 0 or less = dead, 20 = full HP<br />
|-<br />
| Food<br />
| VarInt<br />
| 0–20<br />
|- <br />
| Food Saturation<br />
| Float<br />
| Seems to vary from 0.0 to 5.0 in integer increments<br />
|}<br />
<br />
==== Scoreboard Objective ====<br />
<br />
This is sent to the client when it should create a new {{Minecraft Wiki|scoreboard}} objective or remove one.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x4A<br />
|rowspan="4"| Play<br />
|rowspan="4"| Client<br />
| Objective Name<br />
| String (16)<br />
| An unique name for the objective<br />
|-<br />
| Mode<br />
| Byte<br />
| 0 to create the scoreboard. 1 to remove the scoreboard. 2 to update the display text. <br />
|-<br />
| Objective Value<br />
| Optional Chat<br />
| Only if mode is 0 or 2. The text to be displayed for the score<br />
|-<br />
| Type<br />
| Optional VarInt enum<br />
| Only if mode is 0 or 2. 0 = "integer", 1 = "hearts".<br />
|}<br />
<br />
==== Set Passengers ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x4B<br />
|rowspan="3"| Play<br />
|rowspan="3"| Client<br />
| Entity ID<br />
| VarInt<br />
| Vehicle's EID<br />
|-<br />
| Passenger Count<br />
| VarInt<br />
| Number of elements in the following array<br />
|-<br />
| Passengers<br />
| Array of VarInt<br />
| EIDs of entity's passengers<br />
|}<br />
<br />
==== Teams ====<br />
<br />
Creates and updates teams.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
!colspan="2"| Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="23"| 0x4C<br />
|rowspan="23"| Play<br />
|rowspan="23"| Client<br />
|colspan="2"| Team Name<br />
| String (16)<br />
| A unique name for the team. (Shared with scoreboard).<br />
|-<br />
|colspan="2"| Mode<br />
| Byte<br />
| Determines the layout of the remaining packet<br />
|-<br />
|rowspan="9"| 0: create team<br />
| Team Display Name<br />
| Chat<br />
| <br />
|-<br />
| Friendly Flags<br />
| Byte<br />
| Bit mask. 0x01: Allow friendly fire, 0x02: can see invisible players on same team<br />
|-<br />
| Name Tag Visibility<br />
| String Enum (32)<br />
| <code>always</code>, <code>hideForOtherTeams</code>, <code>hideForOwnTeam</code>, <code>never</code><br />
|-<br />
| Collision Rule<br />
| String Enum (32)<br />
| <code>always</code>, <code>pushOtherTeams</code>, <code>pushOwnTeam</code>, <code>never</code><br />
|-<br />
| Team Color<br />
| VarInt enum<br />
| Used to color the name of players on the team; see below<br />
|-<br />
| Team Prefix<br />
| Chat<br />
| Displayed before the names of players that are part of this team<br />
|-<br />
| Team Suffix<br />
| Chat<br />
| Displayed after the names of players that are part of this team<br />
|-<br />
| Entity Count<br />
| VarInt<br />
| Number of elements in the following array<br />
|-<br />
| Entities<br />
| Array of String (40)<br />
| Identifiers for the entities in this team. For players, this is their username; for other entities, it is their UUID.<br />
|-<br />
| 1: remove team<br />
| ''no fields''<br />
| ''no fields''<br />
| <br />
|-<br />
|rowspan="7"| 2: update team info<br />
| Team Display Name<br />
| Chat<br />
| <br />
|-<br />
| Friendly Flags<br />
| Byte<br />
| Bit mask. 0x01: Allow friendly fire, 0x02: can see invisible entities on same team<br />
|-<br />
| Name Tag Visibility<br />
| String Enum (32)<br />
| <code>always</code>, <code>hideForOtherTeams</code>, <code>hideForOwnTeam</code>, <code>never</code><br />
|-<br />
| Collision Rule<br />
| String Enum (32)<br />
| <code>always</code>, <code>pushOtherTeams</code>, <code>pushOwnTeam</code>, <code>never</code><br />
|-<br />
| Team Color<br />
| VarInt enum<br />
| Used to color the name of players on the team; see below<br />
|-<br />
| Team Prefix<br />
| Chat<br />
| Displayed before the names of players that are part of this team<br />
|-<br />
| Team Suffix<br />
| Chat<br />
| Displayed after the names of players that are part of this team<br />
|-<br />
|rowspan="2"| 3: add players to team<br />
| Entity Count<br />
| VarInt<br />
| Number of elements in the following array<br />
|-<br />
| Entities<br />
| Array of String (40)<br />
| Identifiers for the entities added. For players, this is their username; for other entities, it is their UUID.<br />
|-<br />
|rowspan="2"| 4: remove players from team<br />
| Entity Count<br />
| VarInt<br />
| Number of elements in the following array<br />
|-<br />
| Entities<br />
| Array of String (40)<br />
| Identifiers for the entities removed. For players, this is their username; for other entities, it is their UUID.<br />
|}<br />
<br />
Team Color: The color of a team defines how the names of the team members are visualized; any formatting code can be used. The following table lists all the possible values.<br />
<br />
{| class="wikitable"<br />
! ID<br />
! Formatting<br />
|-<br />
| 0-15<br />
| Color formatting, same values as [[Chat]] colors.<br />
|-<br />
| 16<br />
| Obfuscated<br />
|-<br />
| 17<br />
| Bold<br />
|-<br />
| 18<br />
| Strikethrough<br />
|-<br />
| 19<br />
| Underlined<br />
|-<br />
| 20<br />
| Italic<br />
|-<br />
| 21<br />
| Reset<br />
|}<br />
<br />
==== Update Score ====<br />
<br />
This is sent to the client when it should update a scoreboard item. <br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x4D<br />
|rowspan="4"| Play<br />
|rowspan="4"| Client<br />
| Entity Name<br />
| String (40)<br />
| The entity whose score this is. For players, this is their username; for other entities, it is their UUID.<br />
|-<br />
| Action<br />
| Byte<br />
| 0 to create/update an item. 1 to remove an item.<br />
|-<br />
| Objective Name<br />
| String (16)<br />
| The name of the objective the score belongs to<br />
|-<br />
| Value<br />
| Optional VarInt<br />
| The score to be displayed next to the entry. Only sent when Action does not equal 1.<br />
|}<br />
<br />
==== Spawn Position ====<br />
<br />
Sent by the server after login to specify the coordinates of the spawn point (the point at which players spawn at, and which the compass points to). It can be sent at any time to update the point compasses point at.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x4E<br />
|rowspan="1"| Play<br />
|rowspan="1"| Client<br />
| Location<br />
| Position<br />
| Spawn location<br />
|}<br />
<br />
==== Time Update ====<br />
<br />
Time is based on ticks, where 20 ticks happen every second. There are 24000 ticks in a day, making Minecraft days exactly 20 minutes long.<br />
<br />
The time of day is based on the timestamp modulo 24000. 0 is sunrise, 6000 is noon, 12000 is sunset, and 18000 is midnight.<br />
<br />
The default SMP server increments the time by <code>20</code> every second.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x4F<br />
|rowspan="2"| Play<br />
|rowspan="2"| Client<br />
| World Age<br />
| Long<br />
| In ticks; not changed by server commands<br />
|-<br />
| Time of day<br />
| Long<br />
| The world (or region) time, in ticks. If negative the sun will stop moving at the Math.abs of the time<br />
|}<br />
<br />
==== Title ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
!colspan="2"| Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="10"| 0x50<br />
|rowspan="10"| Play<br />
|rowspan="10"| Client<br />
|colspan="2"| Action<br />
| VarInt Enum<br />
| <br />
|-<br />
! Action<br />
! Field Name<br />
! <br />
! <br />
|-<br />
| 0: set title<br />
| Title Text<br />
| [[Chat]]<br />
| <br />
|-<br />
| 1: set subtitle<br />
| Subtitle Text<br />
| [[Chat]]<br />
| <br />
|- <br />
| 2: set action bar<br />
| Action bar text<br />
| [[Chat]]<br />
| Displays a message above the hotbar (the same as position 2 in [[#Chat Message (clientbound)|Chat Message (clientbound)]], except that it correctly renders formatted chat. See [https://bugs.mojang.com/browse/MC-119145 MC-119145] for more information.)<br />
|-<br />
|rowspan="3"| 3: set times and display<br />
| Fade In<br />
| Int<br />
| Ticks to spend fading in<br />
|-<br />
| Stay<br />
| Int<br />
| Ticks to keep the title displayed<br />
|-<br />
| Fade Out<br />
| Int<br />
| Ticks to spend out, not when to start fading out<br />
|-<br />
| 4: hide<br />
| ''no fields''<br />
| ''no fields''<br />
| <br />
|-<br />
| 5: reset<br />
| ''no fields''<br />
| ''no fields''<br />
| <br />
|}<br />
<br />
“Hide” makes the title disappear, but if you run times again the same title will appear. “Reset” erases the text.<br />
<br />
The title is visible on screen for Fade In + Stay + Fade Out ticks.<br />
<br />
==== Entity Sound Effect ====<br />
<br />
Plays a sound effect from an entity.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x51<br />
|rowspan="5"| Play<br />
|rowspan="5"| Client<br />
| Sound ID<br />
| VarInt<br />
| ID of hardcoded sound event ([https://pokechu22.github.io/Burger/1.15.2.html#sounds events] as of 1.15.2)<br />
|-<br />
| Sound Category<br />
| VarInt Enum<br />
| The category that this sound will be played from ([https://gist.github.com/konwboj/7c0c380d3923443e9d55 current categories])<br />
|-<br />
| Entity ID<br />
| VarInt<br />
|<br />
|-<br />
| Volume<br />
| Float<br />
| 1.0 is 100%, capped between 0.0 and 1.0 by Notchian clients<br />
|-<br />
| Pitch<br />
| Float<br />
| Float between 0.5 and 2.0 by Notchian clients<br />
|}<br />
<br />
==== Sound Effect ====<br />
<br />
This packet is used to play a number of hardcoded sound events. For custom sounds, use [[#Named Sound Effect|Named Sound Effect]].<br />
<br />
{{Warning|Numeric sound effect IDs are liable to change between versions}}<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="7"| 0x52<br />
|rowspan="7"| Play<br />
|rowspan="7"| Client<br />
| Sound ID<br />
| VarInt<br />
| ID of hardcoded sound event ([https://pokechu22.github.io/Burger/1.15.2.html#sounds events] as of 1.15.2)<br />
|-<br />
| Sound Category<br />
| VarInt Enum<br />
| The category that this sound will be played from ([https://gist.github.com/konwboj/7c0c380d3923443e9d55 current categories])<br />
|-<br />
| Effect Position X<br />
| Int<br />
| Effect X multiplied by 8 ([[Data types#Fixed-point numbers|fixed-point number]] with only 3 bits dedicated to the fractional part)<br />
|-<br />
| Effect Position Y<br />
| Int<br />
| Effect Y multiplied by 8 ([[Data types#Fixed-point numbers|fixed-point number]] with only 3 bits dedicated to the fractional part)<br />
|-<br />
| Effect Position Z<br />
| Int<br />
| Effect Z multiplied by 8 ([[Data types#Fixed-point numbers|fixed-point number]] with only 3 bits dedicated to the fractional part)<br />
|-<br />
| Volume<br />
| Float<br />
| 1.0 is 100%, capped between 0.0 and 1.0 by Notchian clients<br />
|-<br />
| Pitch<br />
| Float<br />
| Float between 0.5 and 2.0 by Notchian clients<br />
|}<br />
<br />
==== Stop Sound ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x53<br />
|rowspan="3"| Play<br />
|rowspan="3"| Client<br />
| Flags<br />
| Byte<br />
| Controls which fields are present.<br />
|-<br />
| Source<br />
| Optional VarInt enum<br />
| Only if flags is 3 or 1 (bit mask 0x1). See below. If not present, then sounds from all sources are cleared.<br />
|-<br />
| Sound<br />
| Optional Identifier<br />
| Only if flags is 2 or 3 (bit mask 0x2). A sound effect name, see [[#Named Sound Effect|Named Sound Effect]]. If not present, then all sounds are cleared.<br />
|}<br />
<br />
Categories:<br />
<br />
{| class="wikitable"<br />
! Name !! Value<br />
|-<br />
| master || 0<br />
|-<br />
| music || 1<br />
|-<br />
| record || 2<br />
|-<br />
| weather || 3<br />
|-<br />
| block || 4<br />
|-<br />
| hostile || 5<br />
|-<br />
| neutral || 6<br />
|-<br />
| player || 7<br />
|-<br />
| ambient || 8<br />
|-<br />
| voice || 9<br />
|}<br />
<br />
==== Player List Header And Footer ====<br />
<br />
This packet may be used by custom servers to display additional information above/below the player list. It is never sent by the Notchian server.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x54<br />
|rowspan="2"| Play<br />
|rowspan="2"| Client<br />
| Header<br />
| [[Chat]]<br />
| To remove the header, send a empty translatable component: {"translate":""}<br />
|-<br />
| Footer<br />
| [[Chat]]<br />
| To remove the footer, send a empty translatable component: {"translate":""}<br />
|}<br />
<br />
==== NBT Query Response ====<br />
<br />
Sent in response to [[#Query Block NBT|Query Block NBT]] or [[#Query Entity NBT|Query Entity NBT]].<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x55<br />
|rowspan="2"| Play<br />
|rowspan="2"| Client<br />
| Transaction ID<br />
| VarInt<br />
| Can be compared to the one sent in the original query packet.<br />
|-<br />
| NBT<br />
| [[NBT|NBT Tag]]<br />
| The NBT of the block or entity. May be a TAG_END (0) in which case no NBT is present.<br />
|}<br />
<br />
==== Collect Item ====<br />
<br />
Sent by the server when someone picks up an item lying on the ground — its sole purpose appears to be the animation of the item flying towards you. It doesn't destroy the entity in the client memory, and it doesn't add it to your inventory. The server only checks for items to be picked up after each [[#Player Position|Player Position]] (and [[#Player Position And Look|Player Position And Look]]) packet sent by the client. The collector entity can be any entity; it does not have to be a player. The collected entity also can be any entity, but the Notchian server only uses this for items, experience orbs, and the different varieties of arrows.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x56<br />
|rowspan="3"| Play<br />
|rowspan="3"| Client<br />
| Collected Entity ID<br />
| VarInt<br />
| <br />
|- <br />
| Collector Entity ID<br />
| VarInt<br />
| <br />
|- <br />
| Pickup Item Count<br />
| VarInt<br />
| Seems to be 1 for XP orbs, otherwise the number of items in the stack.<br />
|}<br />
<br />
==== Entity Teleport ====<br />
<br />
This packet is sent by the server when an entity moves more than 8 blocks.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="7"| 0x57<br />
|rowspan="7"| Play<br />
|rowspan="7"| Client<br />
| Entity ID<br />
| VarInt<br />
| <br />
|-<br />
| X<br />
| Double<br />
| <br />
|-<br />
| Y<br />
| Double<br />
| <br />
|-<br />
| Z<br />
| Double<br />
| <br />
|-<br />
| Yaw<br />
| Angle<br />
| New angle, not a delta<br />
|-<br />
| Pitch<br />
| Angle<br />
| New angle, not a delta<br />
|-<br />
| On Ground<br />
| Boolean<br />
| <br />
|}<br />
<br />
==== Advancements ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
!colspan="2"| Field Name<br />
!colspan="2"| Field Type<br />
! Notes<br />
|-<br />
|rowspan="9"| 0x58<br />
|rowspan="9"| Play<br />
|rowspan="9"| Client<br />
|colspan="2"| Reset/Clear<br />
|colspan="2"| Boolean<br />
| Whether to reset/clear the current advancements<br />
|-<br />
|colspan="2"| Mapping size<br />
|colspan="2"| VarInt<br />
| Size of the following array<br />
|-<br />
|rowspan="2"| Advancement mapping<br />
| Key<br />
|rowspan="2"| Array<br />
| Identifier<br />
| The identifier of the advancement<br />
|-<br />
| Value<br />
| Advancement<br />
| See below<br />
|-<br />
|colspan="2"| List size<br />
|colspan="2"| VarInt<br />
| Size of the following array<br />
|-<br />
|colspan="2"| Identifiers<br />
|colspan="2"| Array of Identifier<br />
| The identifiers of the advancements that should be removed<br />
|-<br />
|colspan="2"| Progress size<br />
|colspan="2"| VarInt<br />
| Size of the following array<br />
|-<br />
|rowspan="2"| Progress mapping<br />
| Key<br />
|rowspan="2"| Array<br />
| Identifier<br />
| The identifier of the advancement<br />
|-<br />
| Value<br />
| Advancement progress<br />
| See below<br />
|}<br />
<br />
Advancement structure:<br />
<br />
{| class="wikitable"<br />
!colspan="2"| Field Name<br />
!colspan="2"| Field Type<br />
! Notes<br />
|-<br />
|colspan="2"| Has parent<br />
|colspan="2"| Boolean<br />
| Indicates whether the next field exists.<br />
|-<br />
|colspan="2"| Parent id<br />
|colspan="2"| Optional Identifier<br />
| The identifier of the parent advancement.<br />
|-<br />
|colspan="2"| Has display<br />
|colspan="2"| Boolean<br />
| Indicates whether the next field exists<br />
|-<br />
|colspan="2"| Display data<br />
|colspan="2"| Optional advancement display<br />
| See below.<br />
|-<br />
|colspan="2"| Number of criteria<br />
|colspan="2"| VarInt<br />
| Size of the following array<br />
|-<br />
|rowspan="2"| Criteria<br />
| Key<br />
|rowspan="2"| Array<br />
| Identifier<br />
| The identifier of the criterion<br />
|-<br />
| Value<br />
| '''Void'''<br />
| There is ''no'' content written here. Perhaps this will be expanded in the future?<br />
|-<br />
|colspan="2"| Array length<br />
|colspan="2"| VarInt<br />
| Number of arrays in the following array<br />
|-<br />
|rowspan="2"| Requirements<br />
| Array length 2<br />
|rowspan="2"| Array<br />
| VarInt<br />
| Number of elements in the following array<br />
|-<br />
| Requirement<br />
| Array of String<br />
| Array of required criteria<br />
|}<br />
<br />
Advancement display:<br />
<br />
{| class="wikitable"<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| Title<br />
| Chat<br />
|<br />
|-<br />
| Description<br />
| Chat<br />
|<br />
|-<br />
| Icon<br />
| [[Slot]]<br />
|<br />
|-<br />
| Frame type<br />
| VarInt enum<br />
| 0 = <code>task</code>, 1 = <code>challenge</code>, 2 = <code>goal</code><br />
|-<br />
| Flags<br />
| Integer<br />
| 0x1: has background texture; 0x2: <code>show_toast</code>; 0x4: <code>hidden</code><br />
|-<br />
| Background texture<br />
| Optional Identifier<br />
| Background texture location. Only if flags indicates it.<br />
|-<br />
| X coord<br />
| Float<br />
| <br />
|-<br />
| Y coord<br />
| Float<br />
| <br />
|}<br />
<br />
Advancement progress:<br />
<br />
{| class="wikitable"<br />
!colspan="2"| Field Name<br />
!colspan="2"| Field Type<br />
! Notes<br />
|-<br />
|colspan="2"| Size<br />
|colspan="2"| VarInt<br />
| Size of the following array<br />
|-<br />
|rowspan="2"| Criteria<br />
| Criterion identifier<br />
|rowspan="2"| Array<br />
| Identifier<br />
| The identifier of the criterion.<br />
|-<br />
| Criterion progress<br />
| Criterion progress<br />
|<br />
|}<br />
<br />
Criterion progress:<br />
<br />
{| class="wikitable"<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| Achieved<br />
| Boolean<br />
| If true, next field is present<br />
|-<br />
| Date of achieving<br />
| Optional Long<br />
| As returned by [https://docs.oracle.com/javase/6/docs/api/java/util/Date.html#getTime() <code>Date.getTime</code>]<br />
|}<br />
<br />
==== Entity Properties ====<br />
<br />
Sets {{Minecraft Wiki|Attribute|attributes}} on the given entity.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
!colspan="2"| Field Name<br />
!colspan="2"| Field Type<br />
! Notes<br />
|-<br />
|rowspan="6"| 0x59<br />
|rowspan="6"| Play<br />
|rowspan="6"| Client<br />
|colspan="2"| Entity ID<br />
|colspan="2"| VarInt<br />
| <br />
|-<br />
|colspan="2"| Number Of Properties<br />
|colspan="2"| Int<br />
| Number of elements in the following array<br />
|-<br />
|rowspan="4"| Property<br />
| Key<br />
|rowspan="4"| Array<br />
| String (64)<br />
| See below<br />
|-<br />
| Value<br />
| Double<br />
| See below<br />
|-<br />
| Number Of Modifiers<br />
| VarInt<br />
| Number of elements in the following array<br />
|-<br />
| Modifiers<br />
| Array of Modifier Data<br />
| See {{Minecraft Wiki|Attribute#Modifiers}}. Modifier Data defined below.<br />
|}<br />
<br />
Known Key values (see also {{Minecraft Wiki|Attribute#Modifiers}}):<br />
<br />
{| class="wikitable"<br />
|-<br />
! Key<br />
! Default<br />
! Min<br />
! Max<br />
! Label<br />
|-<br />
| generic.maxHealth<br />
| 20.0<br />
| 0.0<br />
| 1024.0<br />
| Max Health<br />
|-<br />
| generic.followRange<br />
| 32.0<br />
| 0.0<br />
| 2048.0<br />
| Follow Range<br />
|-<br />
| generic.knockbackResistance<br />
| 0.0 <br />
| 0.0<br />
| 1.0<br />
| Knockback Resistance<br />
|-<br />
| generic.movementSpeed<br />
| 0.7<br />
| 0.0<br />
| 1024.0<br />
| Movement Speed<br />
|-<br />
| generic.attackDamage<br />
| 2.0<br />
| 0.0<br />
| 2048.0<br />
| Attack Damage<br />
|-<br />
| generic.attackSpeed<br />
| 4.0<br />
| 0.0<br />
| 1024.0<br />
| Attack Speed<br />
|-<br />
| generic.flyingSpeed<br />
| 0.4<br />
| 0.0<br />
| 1024.0<br />
| Flying Speed<br />
|-<br />
| generic.armor<br />
| 0.0<br />
| 0.0<br />
| 30.0<br />
| Armor<br />
|-<br />
| generic.armorToughness<br />
| 0.0<br />
| 0.0<br />
| 20.0<br />
| Armor Toughness<br />
|-<br />
| generic.attackKnockback<br />
| 0.0<br />
| 0.0<br />
| 5.0<br />
| &mdash;<br />
|-<br />
| generic.luck<br />
| 0.0<br />
| -1024.0<br />
| 1024.0<br />
| Luck<br />
|-<br />
| horse.jumpStrength<br />
| 0.7<br />
| 0.0<br />
| 2.0<br />
| Jump Strength<br />
|-<br />
| zombie.spawnReinforcements<br />
| 0.0<br />
| 0.0<br />
| 1.0<br />
| Spawn Reinforcements Chance<br />
|-<br />
| generic.reachDistance<br />
| 5.0<br />
| 0.0<br />
| 1024.0<br />
| Player Reach Distance (Forge only)<br />
|-<br />
| forge.swimSpeed<br />
| 1.0<br />
| 0.0<br />
| 1024.0<br />
| Swimming Speed (Forge only)<br />
|}<br />
<br />
Unknown attributes will cause a game crash ([https://bugs.mojang.com/browse/MC-150405 MC-150405]) due to the default minimum being larger than the default value.<br />
<br />
''Modifier Data'' structure:<br />
<br />
{| class="wikitable"<br />
|-<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| UUID<br />
| UUID<br />
| <br />
|-<br />
| Amount<br />
| Double<br />
| May be positive or negative<br />
|-<br />
| Operation<br />
| Byte<br />
| See below<br />
|}<br />
<br />
The operation controls how the base value of the modifier is changed.<br />
<br />
* 0: Add/subtract amount<br />
* 1: Add/subtract amount percent of the current value<br />
* 2: Multiply by amount percent<br />
<br />
All of the 0's are applied first, and then the 1's, and then the 2's.<br />
<br />
==== Entity Effect ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x5A<br />
|rowspan="5"| Play<br />
|rowspan="5"| Client<br />
| Entity ID<br />
| VarInt<br />
| <br />
|-<br />
| Effect ID<br />
| Byte<br />
| See {{Minecraft Wiki|Status effect#List of effects|this table}}<br />
|-<br />
| Amplifier<br />
| Byte<br />
| Notchian client displays effect level as Amplifier + 1<br />
|-<br />
| Duration<br />
| VarInt<br />
| Duration in ticks.<br />
|-<br />
| Flags<br />
| Byte<br />
| Bit field, see below.<br />
|}<br />
<br />
Within flags:<br />
<br />
* 0x01: Is ambient - was the effect spawned from a beacon? All beacon-generated effects are ambient. Ambient effects use a different icon in the HUD (blue border rather than gray). If all effects on an entity are ambient, the [[Entities#Living|"Is potion effect ambient" living metadata field]] should be set to true. Usually should not be enabled.<br />
* 0x02: Show particles - should all particles from this effect be hidden? Effects with particles hidden are not included in the calculation of the effect color, and are not rendered on the HUD (but are still rendered within the inventory). Usually should be enabled.<br />
* 0x04: Show icon - should the icon be displayed on the client? Usually should be enabled.<br />
<br />
==== Declare Recipes ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
!colspan="2"| Field Name<br />
!colspan="2"| Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x5B<br />
|rowspan="4"| Play<br />
|rowspan="4"| Client<br />
|colspan="2"| Num Recipes<br />
|colspan="2"| VarInt<br />
| Number of elements in the following array<br />
|-<br />
|rowspan="3"| Recipe<br />
| Recipe ID<br />
|rowspan="3"| Array<br />
| Identifier<br />
|<br />
|-<br />
| Type<br />
| String<br />
| The recipe type, see below<br />
|-<br />
| Data<br />
| Optional, varies<br />
| Additional data for the recipe. For some types, there will be no data.<br />
|}<br />
<br />
Recipe types:<br />
<br />
{| class="wikitable"<br />
! Type<br />
! Description<br />
! Data<br />
|-<br />
| <code>crafting_shapeless</code><br />
| Shapeless crafting recipe. All items in the ingredient list must be present, but in any order/slot.<br />
| As follows:<br />
{| class="wikitable"<br />
! Name<br />
! Type<br />
! Description<br />
|-<br />
| Group<br />
| String<br />
| Used to group similar recipes together in the recipe book. Tag is present in recipe JSON.<br />
|-<br />
| Ingredient count<br />
| VarInt<br />
| Number of elements in the following array<br />
|-<br />
| Ingredients<br />
| Array of Ingredient<br />
|<br />
|-<br />
| Result<br />
| [[Slot]]<br />
|<br />
|}<br />
|-<br />
| <code>crafting_shaped</code><br />
| Shaped crafting recipe. All items must be present in the same pattern (which may be flipped horizontally or translated)<br />
| As follows:<br />
{| class="wikitable"<br />
! Name<br />
! Type<br />
! Description<br />
|-<br />
| Width<br />
| VarInt<br />
|<br />
|-<br />
| Height<br />
| VarInt<br />
|<br />
|-<br />
| Group<br />
| String<br />
| Used to group similar recipes together in the recipe book. Tag is present in recipe JSON.<br />
|-<br />
| Ingredients<br />
| Array of Ingredient<br />
| Length is width * height. Indexed by x + (y * width).<br />
|-<br />
| Result<br />
| [[Slot]]<br />
|<br />
|}<br />
|-<br />
| <code>crafting_special_armordye</code><br />
| Recipe for dying leather armor<br />
|rowspan="13"| None<br />
|-<br />
| <code>crafting_special_bookcloning</code><br />
| Recipe for copying contents of written books<br />
|-<br />
| <code>crafting_special_mapcloning</code><br />
| Recipe for copying maps<br />
|-<br />
| <code>crafting_special_mapextending</code><br />
| Recipe for adding paper to maps<br />
|-<br />
| <code>crafting_special_firework_rocket</code><br />
| Recipe for making firework rockets<br />
|-<br />
| <code>crafting_special_firework_star</code><br />
| Recipe for making firework stars<br />
|-<br />
| <code>crafting_special_firework_star_fade</code><br />
| Recipe for making firework stars fade between multiple colors<br />
|-<br />
| <code>crafting_special_repairitem</code><br />
| Recipe for repairing items via crafting<br />
|-<br />
| <code>crafting_special_tippedarrow</code><br />
| Recipe for crafting tipped arrows<br />
|-<br />
| <code>crafting_special_bannerduplicate</code><br />
| Recipe for copying banner patterns<br />
|-<br />
| <code>crafting_special_banneraddpattern</code><br />
| Recipe for adding patterns to banners<br />
|-<br />
| <code>crafting_special_shielddecoration</code><br />
| Recipe for applying a banner's pattern to a shield<br />
|-<br />
| <code>crafting_special_shulkerboxcoloring</code><br />
| Recipe for recoloring a shulker box<br />
|-<br />
| <code>smelting</code><br />
| Smelting recipe<br />
|rowspan="4"| As follows:<br />
{| class="wikitable"<br />
! Name<br />
! Type<br />
! Description<br />
|-<br />
| Group<br />
| String<br />
| Used to group similar recipes together in the recipe book.<br />
|-<br />
| Ingredient<br />
| Ingredient<br />
|<br />
|-<br />
| Result<br />
| [[Slot]]<br />
|<br />
|-<br />
| Experience<br />
| Float<br />
|<br />
|-<br />
| Cooking time<br />
| VarInt<br />
|<br />
|}<br />
|-<br />
| <code>blasting</code><br />
| Blast furnace recipe<br />
|-<br />
| <code>smoking</code><br />
| Smoker recipe<br />
|-<br />
| <code>campfire_cooking</code><br />
| Campfire recipe<br />
|-<br />
| <code>stonecutting</code><br />
| Stonecutter recipe<br />
| As follows:<br />
{| class="wikitable"<br />
! Name<br />
! Type<br />
! Description<br />
|-<br />
| Group<br />
| String<br />
| Used to group similar recipes together in the recipe book. Tag is present in recipe JSON.<br />
|-<br />
| Ingredient<br />
| Ingredient<br />
|<br />
|-<br />
| Result<br />
| [[Slot]]<br />
|<br />
|}<br />
|}<br />
<br />
Ingredient is defined as:<br />
<br />
{| class="wikitable"<br />
! Name<br />
! Type<br />
! Description<br />
|-<br />
| Count<br />
| VarInt<br />
| Number of elements in the following array<br />
|-<br />
| Items<br />
| Array of [[Slot]]<br />
| Any item in this array may be used for the recipe. The count of each item should be 1.<br />
|}<br />
<br />
==== Tags ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x5C<br />
|rowspan="4"| Play<br />
|rowspan="4"| Client<br />
| Block Tags<br />
| (See below)<br />
| IDs are block IDs<br />
|-<br />
| Item Tags<br />
| (See below)<br />
| IDs are item IDs<br />
|-<br />
| Fluid Tags<br />
| (See below)<br />
| IDs are fluid IDs<br />
|-<br />
| Entity Tags<br />
| (See below)<br />
| IDs are entity IDs<br />
|}<br />
<br />
Tags look like:<br />
<br />
{| class="wikitable"<br />
!colspan="2"| Field Name<br />
!colspan="2"| Field Type<br />
! Notes<br />
|-<br />
|colspan="2"| Length<br />
|colspan="2"| VarInt<br />
| Number of elements in the following array<br />
|-<br />
|rowspan="3"| Tags<br />
| Tag name<br />
|rowspan="3"| Array<br />
| Identifier<br />
|<br />
|-<br />
| Count<br />
| VarInt<br />
| Number of elements in the following array<br />
|-<br />
| Entries<br />
| Array of VarInt<br />
| Numeric ID of the block/item.<br />
|}<br />
<br />
=== Serverbound ===<br />
<br />
==== Teleport Confirm ====<br />
<br />
Sent by client as confirmation of [[#Player Position And Look (clientbound)|Player Position And Look]].<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x00<br />
| Play<br />
| Server<br />
| Teleport ID<br />
| VarInt<br />
| The ID given by the [[#Player Position And Look (clientbound)|Player Position And Look]] packet<br />
|}<br />
<br />
==== Query Block NBT ====<br />
<br />
Used when <kbd>Shift</kbd>+<kbd>F3</kbd>+<kbd>I</kbd> is pressed while looking at a block.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x01<br />
|rowspan="2"| Play<br />
|rowspan="2"| Server<br />
| Transaction ID<br />
| VarInt<br />
| An incremental ID so that the client can verify that the response matches.<br />
|-<br />
| Location<br />
| Position<br />
| The location of the block to check.<br />
|}<br />
<br />
==== Set Difficulty ====<br />
<br />
Must have at least op level 2 to use. Appears to only be used on singleplayer; the difficulty buttons are still disabled in multiplayer.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x02<br />
|rowspan="1"| Play<br />
|rowspan="1"| Server<br />
| New difficulty<br />
| Byte<br />
| 0: peaceful, 1: easy, 2: normal, 3: hard <br />
|}<br />
<br />
==== Chat Message (serverbound) ====<br />
<br />
Used to send a chat message to the server. The message may not be longer than 256 characters or else the server will kick the client.<br />
<br />
If the message starts with a <code>/</code>, the server will attempt to interpret it as a command. Otherwise, the server will broadcast the same chat message to all players on the server (including the player that sent the message), prepended with player's name. Specifically, it will respond with a translate [[chat]] component, "<code>chat.type.text</code>" with the first parameter set to the display name of the player (including some chat component logic to support clicking the name to send a PM) and the second parameter set to the message. See [[Chat#Processing chat|processing chat]] for more information.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x03<br />
|rowspan="1"| Play<br />
|rowspan="1"| Server<br />
| Message<br />
| String (256)<br />
| The client sends the raw input, not a [[Chat]] component<br />
|}<br />
<br />
==== Client Status ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x04<br />
|rowspan="1"| Play<br />
|rowspan="1"| Server<br />
| Action ID<br />
| VarInt Enum<br />
| See below<br />
|}<br />
<br />
''Action ID'' values:<br />
<br />
{| class="wikitable"<br />
|-<br />
! Action ID<br />
! Action<br />
! Notes<br />
|-<br />
| 0<br />
| Perform respawn<br />
| Sent when the client is ready to complete login and when the client is ready to respawn after death.<br />
|-<br />
| 1<br />
| Request stats<br />
| Sent when the client opens the Statistics menu<br />
|}<br />
<br />
==== Client Settings ====<br />
<br />
Sent when the player connects, or when settings are changed.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="6"| 0x05<br />
|rowspan="6"| Play<br />
|rowspan="6"| Server<br />
| Locale<br />
| String (16)<br />
| e.g. en_GB<br />
|-<br />
| View Distance<br />
| Byte<br />
| Client-side render distance, in chunks<br />
|-<br />
| Chat Mode<br />
| VarInt Enum<br />
| 0: enabled, 1: commands only, 2: hidden. See [[Chat#Processing chat|processing chat]] for more information.<br />
|-<br />
| Chat Colors<br />
| Boolean<br />
| “Colors” multiplayer setting<br />
|-<br />
| Displayed Skin Parts<br />
| Unsigned Byte<br />
| Bit mask, see below<br />
|-<br />
| Main Hand<br />
| VarInt Enum<br />
| 0: Left, 1: Right<br />
|}<br />
<br />
''Displayed Skin Parts'' flags:<br />
<br />
* Bit 0 (0x01): Cape enabled<br />
* Bit 1 (0x02): Jacket enabled<br />
* Bit 2 (0x04): Left Sleeve enabled<br />
* Bit 3 (0x08): Right Sleeve enabled<br />
* Bit 4 (0x10): Left Pants Leg enabled<br />
* Bit 5 (0x20): Right Pants Leg enabled<br />
* Bit 6 (0x40): Hat enabled<br />
<br />
The most significant bit (bit 7, 0x80) appears to be unused.<br />
<br />
==== Tab-Complete (serverbound) ====<br />
<br />
Sent when the client needs to tab-complete a <code>minecraft:ask_server</code> suggestion type.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x06<br />
|rowspan="2"| Play<br />
|rowspan="2"| Server<br />
| Transaction Id<br />
| VarInt<br />
| The id received in the tab completion request packet, must match or the client will ignore this packet. Client generates this and increments it each time it sends another tab completion that doesn't get a response.<br />
|-<br />
| Text<br />
| String (32500)<br />
| All text behind the cursor without the <code>/</code> (e.g. to the left of the cursor in left-to-right languages like English)<br />
|}<br />
<br />
==== Window Confirmation (serverbound) ====<br />
<br />
If a confirmation sent by the client was not accepted, the server will reply with a [[#Window Confirmation (clientbound)|Window Confirmation (clientbound)]] packet with the Accepted field set to false. When this happens, the client must send this packet to apologize (as with movement), otherwise the server ignores any successive confirmations.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x07<br />
|rowspan="3"| Play<br />
|rowspan="3"| Server<br />
| Window ID<br />
| Byte<br />
| The ID of the window that the action occurred in<br />
|-<br />
| Action Number<br />
| Short<br />
| Every action that is to be accepted has a unique number. This number is an incrementing integer (starting at 1) with separate counts for each window ID.<br />
|-<br />
| Accepted<br />
| Boolean<br />
| Whether the action was accepted<br />
|}<br />
<br />
==== Click Window Button ====<br />
<br />
Used when clicking on window buttons. Until 1.14, this was only used by enchantment tables.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x08<br />
|rowspan="2"| Play<br />
|rowspan="2"| Server<br />
| Window ID<br />
| Byte<br />
| The ID of the window sent by [[#Open Window|Open Window]]<br />
|-<br />
| Button ID<br />
| Byte<br />
| Meaning depends on window type; see below<br />
|}<br />
<br />
{| class="wikitable"<br />
! Window type<br />
! ID<br />
! Meaning<br />
|-<br />
|rowspan="3"| Enchantment Table<br />
| 0 || Topmost enchantment<br />
|-<br />
| 1 || Middle enchantment<br />
|-<br />
| 2 || Bottom enchantment<br />
|-<br />
|rowspan="4"| Lectern<br />
| 1 || Previous page (which does give a redstone output)<br />
|-<br />
| 2 || Next page<br />
|-<br />
| 3 || Take Book<br />
|-<br />
| 100+page || Opened page number - 100 + number<br />
|-<br />
| Stonecutter<br />
|colspan="2"| Recipe button number - 4*row + col. Depends on the item.<br />
|-<br />
| Loom<br />
|colspan="2"| Recipe button number - 4*row + col. Depends on the item.<br />
|}<br />
<br />
==== Click Window ====<br />
<br />
This packet is sent by the player when it clicks on a slot in a window.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="6"| 0x09<br />
|rowspan="6"| Play<br />
|rowspan="6"| Server<br />
| Window ID<br />
| Unsigned Byte<br />
| The ID of the window which was clicked. 0 for player inventory.<br />
|-<br />
| Slot<br />
| Short<br />
| The clicked slot number, see below<br />
|-<br />
| Button<br />
| Byte<br />
| The button used in the click, see below<br />
|-<br />
| Action Number<br />
| Short<br />
| A unique number for the action, implemented by Notchian as a counter, starting at 1 (different counter for every window ID). Used by the server to send back a [[#Confirm Transaction (clientbound)|Confirm Transaction (clientbound)]].<br />
|-<br />
| Mode<br />
| VarInt Enum<br />
| Inventory operation mode, see below<br />
|-<br />
| Clicked item<br />
| [[Slot Data|Slot]]<br />
| The clicked slot. Has to be empty (item ID = -1) for drop mode.<br />
|}<br />
<br />
See [[Inventory]] for further information about how slots are indexed.<br />
<br />
When right-clicking on a stack of items, half the stack will be picked up and half left in the slot. If the stack is an odd number, the half left in the slot will be smaller of the amounts.<br />
<br />
The distinct type of click performed by the client is determined by the combination of the Mode and Button fields.<br />
<br />
{| class="wikitable"<br />
! Mode<br />
! Button<br />
! Slot<br />
! Trigger<br />
|-<br />
!rowspan="2"| 0<br />
| 0<br />
| Normal<br />
| Left mouse click<br />
|-<br />
| 1<br />
| Normal<br />
| Right mouse click<br />
|-<br />
!rowspan="2"| 1<br />
| 0<br />
| Normal<br />
| Shift + left mouse click<br />
|-<br />
| 1<br />
| Normal<br />
| Shift + right mouse click ''(identical behavior)''<br />
|-<br />
!rowspan="5"| 2<br />
| 0<br />
| Normal<br />
| Number key 1<br />
|-<br />
| 1<br />
| Normal<br />
| Number key 2<br />
|-<br />
| 2<br />
| Normal<br />
| Number key 3<br />
|-<br />
| ⋮<br />
| ⋮<br />
| ⋮<br />
|-<br />
| 8<br />
| Normal<br />
| Number key 9<br />
|-<br />
!rowspan="1"| 3<br />
| 2<br />
| Normal<br />
| Middle click, only defined for creative players in non-player inventories.<br />
|-<br />
!rowspan="4"| 4<br />
| 0<br />
| Normal*<br />
| Drop key (Q) (* Clicked item is different, see above)<br />
|-<br />
| 1<br />
| Normal*<br />
| Ctrl + Drop key (Ctrl-Q) ''(drops full stack)''<br />
|-<br />
| 0<br />
| -999<br />
| Left click outside inventory holding nothing ''(no-op)''<br />
|-<br />
| 1<br />
| -999<br />
| Right click outside inventory holding nothing ''(no-op)''<br />
|-<br />
!rowspan="9"| 5<br />
| 0<br />
| -999<br />
| Starting left mouse drag<br />
|-<br />
| 4<br />
| -999<br />
| Starting right mouse drag<br />
|-<br />
| 8<br />
| -999<br />
| Starting middle mouse drag, only defined for creative players in non-player inventories. (Note: the vanilla client will still incorrectly send this for non-creative players - see [https://bugs.mojang.com/browse/MC-46584 MC-46584])<br />
|-<br />
| 1<br />
| Normal<br />
| Add slot for left-mouse drag<br />
|-<br />
| 5<br />
| Normal<br />
| Add slot for right-mouse drag<br />
|-<br />
| 9<br />
| Normal<br />
| Add slot for middle-mouse drag, only defined for creative players in non-player inventories. (Note: the vanilla client will still incorrectly send this for non-creative players - see [https://bugs.mojang.com/browse/MC-46584 MC-46584])<br />
|-<br />
| 2<br />
| -999<br />
| Ending left mouse drag<br />
|-<br />
| 6<br />
| -999<br />
| Ending right mouse drag<br />
|-<br />
| 10<br />
| -999<br />
| Ending middle mouse drag, only defined for creative players in non-player inventories. (Note: the vanilla client will still incorrectly send this for non-creative players - see [https://bugs.mojang.com/browse/MC-46584 MC-46584])<br />
|-<br />
! 6<br />
| 0<br />
| Normal<br />
| Double click<br />
|}<br />
<br />
Starting from version 1.5, “painting mode” is available for use in inventory windows. It is done by picking up stack of something (more than 1 item), then holding mouse button (left, right or middle) and dragging held stack over empty (or same type in case of right button) slots. In that case client sends the following to server after mouse button release (omitting first pickup packet which is sent as usual):<br />
<br />
# packet with mode 5, slot -999, button (0 for left | 4 for right);<br />
# packet for every slot painted on, mode is still 5, button (1 | 5);<br />
# packet with mode 5, slot -999, button (2 | 6);<br />
<br />
If any of the painting packets other than the “progress” ones are sent out of order (for example, a start, some slots, then another start; or a left-click in the middle) the painting status will be reset.<br />
<br />
The server will send back a [[#Confirm Transaction (clientbound)|Confirm Transaction]] packet. If the click was not accepted, the client must send a matching [[#Confirm Transaction (serverbound)|serverbound confirm transaction]] packet before sending more [[#Click Window|Click Window]] packets, otherwise the server will reject them silently. The Notchian server also sends a [[#Window Items|Window Items]] packet for the open window and [[#Set Slot|Set Slot]] packets for the clicked and cursor slot, but only when the click was not accepted, probably to resynchronize client and server.<br />
<br />
==== Close Window (serverbound) ====<br />
<br />
This packet is sent by the client when closing a window.<br />
<br />
Notchian clients send a Close Window packet with Window ID 0 to close their inventory even though there is never an [[#Open Window|Open Window]] packet for the inventory.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x0A<br />
| Play<br />
| Server<br />
| Window ID<br />
| Unsigned Byte<br />
| This is the ID of the window that was closed. 0 for player inventory.<br />
|}<br />
<br />
==== Plugin Message (serverbound) ====<br />
<br />
{{Main|Plugin channels}}<br />
<br />
Mods and plugins can use this to send their data. Minecraft itself uses some [[plugin channel]]s. These internal channels are in the <code>minecraft</code> namespace.<br />
<br />
More documentation on this: [http://dinnerbone.com/blog/2012/01/13/minecraft-plugin-channels-messaging/ http://dinnerbone.com/blog/2012/01/13/minecraft-plugin-channels-messaging/]<br />
<br />
Note that the length of Data is known only from the packet length, since the packet has no length field of any kind.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x0B<br />
|rowspan="2"| Play<br />
|rowspan="2"| Server<br />
| Channel<br />
| Identifier<br />
| Name of the [[plugin channel]] used to send the data<br />
|-<br />
| Data<br />
| Byte Array<br />
| Any data, depending on the channel. <code>minecraft:</code> channels are documented [[plugin channel|here]]. The length of this array must be inferred from the packet length.<br />
|}<br />
<br />
==== Edit Book ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x0C<br />
|rowspan="3"| Play<br />
|rowspan="3"| Server<br />
| New book<br />
| [[Slot]]<br />
|<br />
|-<br />
| Is signing<br />
| Boolean<br />
| True if the player is signing the book; false if the player is saving a draft.<br />
|-<br />
| Hand<br />
| VarInt enum<br />
| 0: Main hand, 1: Off hand<br />
|}<br />
<br />
When editing a draft, the [[NBT]] section of the Slot contains this:<br />
<br />
<pre><br />
TAG_Compound(<nowiki>''</nowiki>): 1 entry<br />
{<br />
TAG_List('pages'): 2 entries<br />
{<br />
TAG_String(0): 'Something on Page 1'<br />
TAG_String(1): 'Something on Page 2'<br />
}<br />
}<br />
</pre><br />
<br />
When signing the book, it instead looks like this:<br />
<br />
<pre><br />
TAG_Compound(<nowiki>''</nowiki>): 3 entires<br />
{<br />
TAG_String('author'): 'Steve'<br />
TAG_String('title'): 'A Wonderful Book'<br />
TAG_List('pages'): 2 entries<br />
{<br />
TAG_String(0): 'Something on Page 1'<br />
TAG_String(1): 'Something on Page 2'<br />
}<br />
}<br />
</pre><br />
<br />
==== Entity NBT Request ====<br />
<br />
Used when <kbd>Shift</kbd>+<kbd>F3</kbd>+<kbd>I</kbd> is pressed while looking at an entity.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x0D<br />
|rowspan="2"| Play<br />
|rowspan="2"| Server<br />
| Transaction ID<br />
| VarInt<br />
| An incremental ID so that the client can verify that the response matches.<br />
|-<br />
| Entity ID<br />
| VarInt<br />
| The ID of the entity to query.<br />
|}<br />
<br />
==== Interact Entity ====<br />
<br />
This packet is sent from the client to the server when the client attacks or right-clicks another entity (a player, minecart, etc).<br />
<br />
A Notchian server only accepts this packet if the entity being attacked/used is visible without obstruction and within a 4-unit radius of the player's position.<br />
<br />
Note that middle-click in creative mode is interpreted by the client and sent as a [[#Creative Inventory Action|Creative Inventory Action]] packet instead.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="6"| 0x0E<br />
|rowspan="6"| Play<br />
|rowspan="6"| Server<br />
| Entity ID<br />
| VarInt<br />
| The ID of the entity to interact<br />
|-<br />
| Type<br />
| VarInt Enum<br />
| 0: interact, 1: attack, 2: interact at<br />
|-<br />
| Target X<br />
| Optional Float<br />
| Only if Type is interact at<br />
|-<br />
| Target Y<br />
| Optional Float<br />
| Only if Type is interact at<br />
|-<br />
| Target Z<br />
| Optional Float<br />
| Only if Type is interact at<br />
|-<br />
| Hand<br />
| Optional VarInt Enum<br />
| Only if Type is interact or interact at; 0: main hand, 1: off hand<br />
|}<br />
<br />
==== Keep Alive (serverbound) ====<br />
<br />
The server will frequently send out a keep-alive, each containing a random ID. The client must respond with the same packet.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x0F<br />
| Play<br />
| Server<br />
| Keep Alive ID<br />
| Long<br />
| <br />
|}<br />
<br />
==== Lock Difficulty ====<br />
<br />
Must have at least op level 2 to use. Appears to only be used on singleplayer; the difficulty buttons are still disabled in multiplayer.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x10<br />
|rowspan="1"| Play<br />
|rowspan="1"| Server<br />
| Locked<br />
| Boolean<br />
|<br />
|}<br />
<br />
==== Player Position ====<br />
<br />
Updates the player's XYZ position on the server.<br />
<br />
Checking for moving too fast is achieved like this:<br />
<br />
* Each server tick, the player's current position is stored<br />
* When a player moves, the changes in x, y, and z coordinates are compared with the positions from the previous tick (&Delta;x, &Delta;y, &Delta;z)<br />
* Total movement distance squared is computed as &Delta;x&sup2; + &Delta;y&sup2; + &Delta;z&sup2;<br />
* The expected movement distance squared is computed as velocityX&sup2; + veloctyY&sup2; + velocityZ&sup2;<br />
* If the total movement distance squared value minus the expected movement distance squared value is more than 100 (300 if the player is using an elytra), they are moving too fast.<br />
<br />
If the player is moving too fast, it will be logged that "<player> moved too quickly! " followed by the change in x, y, and z, and the player will be teleported back to their current (before this packet) serverside position.<br />
<br />
Also, if the absolute value of X or the absolute value of Z is a value greater than 3.2×10<sup>7</sup>, or X, Y, or Z are not finite (either positive infinity, negative infinity, or NaN), the client will be kicked for “Invalid move player packet received”.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x11<br />
|rowspan="4"| Play<br />
|rowspan="4"| Server<br />
| X<br />
| Double<br />
| Absolute position<br />
|-<br />
| Feet Y<br />
| Double<br />
| Absolute feet position, normally Head Y - 1.62 <br />
|-<br />
| Z<br />
| Double<br />
| Absolute position<br />
|-<br />
| On Ground<br />
| Boolean<br />
| True if the client is on the ground, false otherwise<br />
|}<br />
<br />
==== Player Position And Rotation (serverbound) ====<br />
<br />
A combination of [[#Player Rotation|Player Rotation]] and [[#Player Position|Player Position]].<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="6"| 0x12<br />
|rowspan="6"| Play<br />
|rowspan="6"| Server<br />
| X<br />
| Double<br />
| Absolute position<br />
|-<br />
| Feet Y<br />
| Double<br />
| Absolute feet position, normally Head Y - 1.62<br />
|-<br />
| Z<br />
| Double<br />
| Absolute position<br />
|-<br />
| Yaw<br />
| Float<br />
| Absolute rotation on the X Axis, in degrees<br />
|-<br />
| Pitch<br />
| Float<br />
| Absolute rotation on the Y Axis, in degrees<br />
|-<br />
| On Ground<br />
| Boolean<br />
| True if the client is on the ground, false otherwise<br />
|}<br />
<br />
==== Player Rotation ====<br />
[[File:Minecraft-trig-yaw.png|thumb|The unit circle for yaw]]<br />
[[File:Yaw.png|thumb|The unit circle of yaw, redrawn]]<br />
<br />
Updates the direction the player is looking in.<br />
<br />
Yaw is measured in degrees, and does not follow classical trigonometry rules. The unit circle of yaw on the XZ-plane starts at (0, 1) and turns counterclockwise, with 90 at (-1, 0), 180 at (0,-1) and 270 at (1, 0). Additionally, yaw is not clamped to between 0 and 360 degrees; any number is valid, including negative numbers and numbers greater than 360.<br />
<br />
Pitch is measured in degrees, where 0 is looking straight ahead, -90 is looking straight up, and 90 is looking straight down.<br />
<br />
The yaw and pitch of player (in degrees), standing at point (x0, y0, z0) and looking towards point (x, y, z) can be calculated with:<br />
<br />
dx = x-x0<br />
dy = y-y0<br />
dz = z-z0<br />
r = sqrt( dx*dx + dy*dy + dz*dz )<br />
yaw = -atan2(dx,dz)/PI*180<br />
if yaw < 0 then<br />
yaw = 360 + yaw<br />
pitch = -arcsin(dy/r)/PI*180<br />
<br />
You can get a unit vector from a given yaw/pitch via:<br />
<br />
x = -cos(pitch) * sin(yaw)<br />
y = -sin(pitch)<br />
z = cos(pitch) * cos(yaw)<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x13<br />
|rowspan="3"| Play<br />
|rowspan="3"| Server<br />
| Yaw<br />
| Float<br />
| Absolute rotation on the X Axis, in degrees<br />
|-<br />
| Pitch<br />
| Float<br />
| Absolute rotation on the Y Axis, in degrees<br />
|-<br />
| On Ground<br />
| Boolean<br />
| True if the client is on the ground, False otherwise<br />
|}<br />
<br />
==== Player Movement ====<br />
<br />
This packet as well as [[#Player Position|Player Position]], [[#Player Look|Player Look]], and [[#Player Position And Look 2|Player Position And Look]] are called the “serverbound movement packets”. Vanilla clients will send Player Position once every 20 ticks even for a stationary player.<br />
<br />
This packet is used to indicate whether the player is on ground (walking/swimming), or airborne (jumping/falling).<br />
<br />
When dropping from sufficient height, fall damage is applied when this state goes from false to true. The amount of damage applied is based on the point where it last changed from true to false. Note that there are several movement related packets containing this state.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x14<br />
|rowspan="1"| Play<br />
|rowspan="1"| Server<br />
| On Ground<br />
| Boolean<br />
| True if the client is on the ground, false otherwise<br />
|}<br />
<br />
==== Vehicle Move (serverbound) ====<br />
<br />
Sent when a player moves in a vehicle. Fields are the same as in [[#Player Position And Look (serverbound)|Player Position And Look]]. Note that all fields use absolute positioning and do not allow for relative positioning.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x15<br />
|rowspan="5"| Play<br />
|rowspan="5"| Server<br />
| X<br />
| Double<br />
| Absolute position (X coordinate)<br />
|-<br />
| Y<br />
| Double<br />
| Absolute position (Y coordinate)<br />
|-<br />
| Z<br />
| Double<br />
| Absolute position (Z coordinate)<br />
|-<br />
| Yaw<br />
| Float<br />
| Absolute rotation on the vertical axis, in degrees<br />
|-<br />
| Pitch<br />
| Float<br />
| Absolute rotation on the horizontal axis, in degrees<br />
|}<br />
<br />
==== Steer Boat ====<br />
<br />
Used to ''visually'' update whether boat paddles are turning. The server will update the [[Entities#Boat|Boat entity metadata]] to match the values here.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x16<br />
|rowspan="2"| Play<br />
|rowspan="2"| Server<br />
| Left paddle turning<br />
| Boolean<br />
|<br />
|-<br />
| Right paddle turning<br />
| Boolean<br />
|<br />
|}<br />
<br />
Right paddle turning is set to true when the left button or forward button is held; left paddle turning is set to true when the right button or forward button is set to true.<br />
<br />
==== Pick Item ====<br />
<br />
Used to swap out an empty space on the hotbar with the item in the given inventory slot. The Notchain client uses this for pick block functionality (middle click) to retrieve items from the inventory.<br />
<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x17<br />
|rowspan="1"| Play<br />
|rowspan="1"| Server<br />
| Slot to use<br />
| VarInt<br />
| See [[Inventory]]<br />
|}<br />
<br />
The server will first search the player's hotbar for an empty slot, starting from the current slot and looping around to the slot before it. If there are no empty slots, it will start a second search from the current slot and find the first slot that does not contain an enchanted item. If there still are no slots that meet that criteria, then the server will use the currently selected slot.<br />
<br />
After finding the appropriate slot, the server swaps the items and then send 3 packets:<br />
<br />
* [[Protocol#Set slot|Set Slot]], with window ID set to -2 and slot set to the newly chosen slot and the item set to the item that is now in that slot (which was previously at the slot the client requested)<br />
* Set Slot, with window ID set to -2 and slot set to the slot the player requested, with the item that is now in that slot and was previously on the hotbar slot<br />
* [[Protocol#Held_Item_Change_.28clientbound.29|Held Item Change]], with the slot set to the newly chosen slot.<br />
<br />
==== Craft Recipe Request ====<br />
<br />
This packet is sent when a player clicks a recipe in the crafting book that is craftable (white border).<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x18<br />
|rowspan="3"| Play<br />
|rowspan="3"| Server<br />
| Window ID<br />
| Byte<br />
|<br />
|-<br />
| Recipe<br />
| Identifier<br />
| A recipe ID<br />
|-<br />
| Make all<br />
| Boolean<br />
| Affects the amount of items processed; true if shift is down when clicked<br />
|}<br />
<br />
==== Player Abilities (serverbound) ====<br />
<br />
The latter 2 fields are used to indicate the walking and flying speeds respectively, while the first field is used to determine the value of 4 booleans.<br />
<br />
The vanilla client sends this packet when the player starts/stops flying with the Flags parameter changed accordingly. All other parameters are ignored by the vanilla server.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x19<br />
|rowspan="3"| Play<br />
|rowspan="3"| Server<br />
| Flags<br />
| Byte<br />
| Bit mask. 0x08: damage disabled (god mode), 0x04: can fly, 0x02: is flying, 0x01: is Creative<br />
|-<br />
| Flying Speed<br />
| Float<br />
| <br />
|-<br />
| Walking Speed<br />
| Float<br />
| <br />
|}<br />
<br />
==== Player Digging ====<br />
<br />
Sent when the player mines a block. A Notchian server only accepts digging packets with coordinates within a 6-unit radius between the center of the block and 1.5 units from the player's feet (''not'' their eyes).<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x1A<br />
|rowspan="3"| Play<br />
|rowspan="3"| Server<br />
| Status<br />
| VarInt Enum<br />
| The action the player is taking against the block (see below)<br />
|-<br />
| Location<br />
| Position<br />
| Block position<br />
|-<br />
| Face<br />
| Byte Enum<br />
| The face being hit (see below)<br />
|}<br />
<br />
Status can be one of seven values:<br />
<br />
{| class="wikitable"<br />
! Value<br />
! Meaning<br />
! Notes<br />
|-<br />
| 0<br />
| Started digging<br />
| <br />
|-<br />
| 1<br />
| Cancelled digging<br />
| Sent when the player lets go of the Mine Block key (default: left click)<br />
|-<br />
| 2<br />
| Finished digging<br />
| Sent when the client thinks it is finished<br />
|-<br />
| 3<br />
| Drop item stack<br />
| Triggered by using the Drop Item key (default: Q) with the modifier to drop the entire selected stack (default: depends on OS). Location is always set to 0/0/0, Face is always set to -Y.<br />
|-<br />
| 4<br />
| Drop item<br />
| Triggered by using the Drop Item key (default: Q). Location is always set to 0/0/0, Face is always set to -Y.<br />
|-<br />
| 5<br />
| Shoot arrow / finish eating<br />
| Indicates that the currently held item should have its state updated such as eating food, pulling back bows, using buckets, etc. Location is always set to 0/0/0, Face is always set to -Y.<br />
|-<br />
| 6<br />
| Swap item in hand<br />
| Used to swap or assign an item to the second hand. Location is always set to 0/0/0, Face is always set to -Y.<br />
|}<br />
<br />
The Face field can be one of the following values, representing the face being hit:<br />
<br />
{| class="wikitable"<br />
|-<br />
! Value<br />
! Offset<br />
! Face<br />
|-<br />
| 0<br />
| -Y<br />
| Bottom<br />
|-<br />
| 1<br />
| +Y<br />
| Top<br />
|-<br />
| 2<br />
| -Z<br />
| North<br />
|-<br />
| 3<br />
| +Z<br />
| South<br />
|-<br />
| 4<br />
| -X<br />
| West<br />
|-<br />
| 5<br />
| +X<br />
| East<br />
|}<br />
<br />
==== Entity Action ====<br />
<br />
Sent by the client to indicate that it has performed certain actions: sneaking (crouching), sprinting, exiting a bed, jumping with a horse, and opening a horse's inventory while riding it.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x1B<br />
|rowspan="3"| Play<br />
|rowspan="3"| Server<br />
| Entity ID<br />
| VarInt<br />
| Player ID<br />
|-<br />
| Action ID<br />
| VarInt Enum<br />
| The ID of the action, see below<br />
|-<br />
| Jump Boost<br />
| VarInt<br />
| Only used by the “start jump with horse” action, in which case it ranges from 0 to 100. In all other cases it is 0.<br />
|}<br />
<br />
Action ID can be one of the following values:<br />
<br />
{| class="wikitable"<br />
! ID<br />
! Action<br />
|-<br />
| 0<br />
| Start sneaking<br />
|-<br />
| 1<br />
| Stop sneaking<br />
|-<br />
| 2<br />
| Leave bed<br />
|-<br />
| 3<br />
| Start sprinting<br />
|-<br />
| 4<br />
| Stop sprinting<br />
|-<br />
| 5<br />
| Start jump with horse<br />
|-<br />
| 6<br />
| Stop jump with horse<br />
|-<br />
| 7<br />
| Open horse inventory<br />
|-<br />
| 8<br />
| Start flying with elytra<br />
|}<br />
<br />
Leave bed is only sent when the “Leave Bed” button is clicked on the sleep GUI, not when waking up due today time.<br />
<br />
Open horse inventory is only sent when pressing the inventory key (default: E) while on a horse — all other methods of opening a horse's inventory (involving right-clicking or shift-right-clicking it) do not use this packet.<br />
<br />
==== Steer Vehicle ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x1C<br />
|rowspan="3"| Play<br />
|rowspan="3"| Server<br />
| Sideways<br />
| Float<br />
| Positive to the left of the player<br />
|-<br />
| Forward<br />
| Float<br />
| Positive forward<br />
|-<br />
| Flags<br />
| Unsigned Byte<br />
| Bit mask. 0x1: jump, 0x2: unmount<br />
|}<br />
<br />
Also known as 'Input' packet.<br />
<br />
==== Recipe Book Data ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
!colspan="2"| Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="11"| 0x1D<br />
|rowspan="11"| Play<br />
|rowspan="11"| Server<br />
|colspan="2"| Type<br />
| VarInt<br />
| Determines the format of the rest of the packet<br />
|-<br />
! Type<br />
! Field Name<br />
! <br />
! <br />
|-<br />
| 0: Displayed Recipe<br />
| Recipe ID<br />
| Identifier<br />
| A recipe ID<br />
|-<br />
|rowspan="4"| 1: Recipe Book States<br />
| Crafting Recipe Book Open<br />
| Boolean<br />
| Whether the player has the crafting recipe book currently opened/active.<br />
|-<br />
| Crafting Recipe Filter Active<br />
| Boolean<br />
| Whether the player has the crafting recipe book filter option currently active.<br />
|-<br />
| Smelting Recipe Book Open<br />
| Boolean<br />
| Whether the player has the smelting recipe book currently opened/active.<br />
|-<br />
| Smelting Recipe Filter Active<br />
| Boolean<br />
| Whether the player has the smelting recipe book filter option currently active.<br />
|-<br />
| Blasting Recipe Book Open<br />
| Boolean<br />
| May be swapped with smoking recipe book. Also, the notchian client appears to use the same value for both of those books currently.<br />
|-<br />
| Blasting Recipe Filter Active<br />
| Boolean<br />
| May be swapped with smoking recipe book. Also, the notchian client appears to use the same value for both of those books currently.<br />
|-<br />
| Smoking Recipe Book Open<br />
| Boolean<br />
|<br />
|-<br />
| Smoking Recipe Filter Active<br />
| Boolean<br />
|<br />
|}<br />
<br />
The Recipe Book Status type is sent when one of the states changes.<br />
<br />
==== Name Item ====<br />
<br />
Sent as a player is renaming an item in an anvil (each keypress in the anvil UI sends a new Name Item packet). If the new name is empty, then the item loses its custom name (this is different from setting the custom name to the normal name of the item). The item name may be no longer than 35 characters long, and if it is longer than that, then the rename is silently ignored.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x1E<br />
|rowspan="1"| Play<br />
|rowspan="1"| Server<br />
| Item name<br />
| String (32767)<br />
| The new name of the item<br />
|}<br />
<br />
==== Resource Pack Status ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x1F<br />
|rowspan="1"| Play<br />
|rowspan="1"| Server<br />
| Result<br />
| VarInt Enum<br />
| 0: successfully loaded, 1: declined, 2: failed download, 3: accepted<br />
|}<br />
<br />
==== Advancement Tab ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x20<br />
|rowspan="2"| Play<br />
|rowspan="2"| Server<br />
| Action<br />
| VarInt enum<br />
| 0: Opened tab, 1: Closed screen<br />
|-<br />
| Tab ID<br />
| Optional identifier<br />
| Only present if action is Opened tab<br />
|}<br />
<br />
==== Select Trade ====<br />
<br />
When a player selects a specific trade offered by a villager NPC.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x21<br />
|rowspan="1"| Play<br />
|rowspan="1"| Server<br />
| Selected slot<br />
| VarInt<br />
| The selected slot int the players current (trading) inventory. (Was a full Integer for the plugin message)<br />
|}<br />
<br />
==== Set Beacon Effect ====<br />
<br />
Changes the effect of the current beacon.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x22<br />
|rowspan="2"| Play<br />
|rowspan="2"| Server<br />
| Primary Effect<br />
| VarInt<br />
| A [http://minecraft.gamepedia.com/Data_values#Potions Potion ID]. (Was a full Integer for the plugin message)<br />
|-<br />
| Secondary Effect<br />
| VarInt<br />
| A [http://minecraft.gamepedia.com/Data_values#Potions Potion ID]. (Was a full Integer for the plugin message)<br />
|}<br />
<br />
==== Held Item Change (serverbound) ====<br />
<br />
Sent when the player changes the slot selection<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x23<br />
|rowspan="1"| Play<br />
|rowspan="1"| Server<br />
| Slot<br />
| Short<br />
| The slot which the player has selected (0–8)<br />
|}<br />
<br />
==== Update Command Block ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x24<br />
|rowspan="5"| Play<br />
|rowspan="5"| Server<br />
|-<br />
| Location<br />
| Position<br />
|<br />
|-<br />
| Command<br />
| String (32767)<br />
|<br />
|-<br />
| Mode || VarInt enum || One of SEQUENCE (0), AUTO (1), or REDSTONE (2) <br />
|-<br />
| Flags<br />
| Byte<br />
| 0x01: Track Output (if false, the output of the previous command will not be stored within the command block); 0x02: Is conditional; 0x04: Automatic<br />
|}<br />
<br />
==== Update Command Block Minecart ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x25<br />
|rowspan="3"| Play<br />
|rowspan="3"| Server<br />
| Entity ID<br />
| VarInt<br />
|<br />
|-<br />
| Command<br />
| String<br />
|<br />
|-<br />
| Track Output<br />
| Boolean<br />
| If false, the output of the previous command will not be stored within the command block.<br />
|}<br />
<br />
==== Creative Inventory Action ====<br />
<br />
While the user is in the standard inventory (i.e., not a crafting bench) in Creative mode, the player will send this packet.<br />
<br />
Clicking in the creative inventory menu is quite different from non-creative inventory management. Picking up an item with the mouse actually deletes the item from the server, and placing an item into a slot or dropping it out of the inventory actually tells the server to create the item from scratch. (This can be verified by clicking an item that you don't mind deleting, then severing the connection to the server; the item will be nowhere to be found when you log back in.) As a result of this implementation strategy, the "Destroy Item" slot is just a client-side implementation detail that means "I don't intend to recreate this item.". Additionally, the long listings of items (by category, etc.) are a client-side interface for choosing which item to create. Picking up an item from such listings sends no packets to the server; only when you put it somewhere does it tell the server to create the item in that location.<br />
<br />
This action can be described as "set inventory slot". Picking up an item sets the slot to item ID -1. Placing an item into an inventory slot sets the slot to the specified item. Dropping an item (by clicking outside the window) effectively sets slot -1 to the specified item, which causes the server to spawn the item entity, etc.. All other inventory slots are numbered the same as the non-creative inventory (including slots for the 2x2 crafting menu, even though they aren't visible in the vanilla client).<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x26<br />
|rowspan="2"| Play<br />
|rowspan="2"| Server<br />
| Slot<br />
| Short<br />
| Inventory slot<br />
|-<br />
| Clicked Item<br />
| [[Slot Data|Slot]]<br />
| <br />
|}<br />
<br />
==== Update Jigsaw Block ====<br />
<br />
Sent when Done is pressed on the {{Minecraft Wiki|Jigsaw Block}} interface.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x27<br />
|rowspan="4"| Play<br />
|rowspan="4"| Server<br />
| Location<br />
| Position<br />
| Block entity location<br />
|-<br />
| Attachment type<br />
| Identifier<br />
| <br />
|- <br />
| Target pool<br />
| Identifier<br />
| <br />
|-<br />
| Final state<br />
| String<br />
| "Turns into" on the GUI, <code>final_state</code> in NBT<br />
|}<br />
<br />
==== Update Structure Block ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="17"| 0x28<br />
|rowspan="17"| Play<br />
|rowspan="17"| Server<br />
|-<br />
| Location<br />
| Position<br />
| Block entity location<br />
|-<br />
| Action<br />
| VarInt enum<br />
| An additional action to perform beyond simply saving the given data; see below<br />
|-<br />
| Mode<br />
| VarInt enum<br />
| One of SAVE (0), LOAD (1), CORNER (2), DATA (3).<br />
|-<br />
| Name<br />
| String<br />
|<br />
|-<br />
| Offset X || Byte<br />
| Between -32 and 32<br />
|-<br />
| Offset Y || Byte<br />
| Between -32 and 32<br />
|-<br />
| Offset Z || Byte<br />
| Between -32 and 32<br />
|-<br />
| Size X || Byte<br />
| Between 0 and 32<br />
|-<br />
| Size Y || Byte<br />
| Between 0 and 32<br />
|-<br />
| Size Z || Byte<br />
| Between 0 and 32<br />
|-<br />
| Mirror<br />
| VarInt enum<br />
| One of NONE (0), LEFT_RIGHT (1), FRONT_BACK (2).<br />
|-<br />
| Rotation<br />
| VarInt enum<br />
| One of NONE (0), CLOCKWISE_90 (1), CLOCKWISE_180 (2), COUNTERCLOCKWISE_90 (3).<br />
|-<br />
| Metadata<br />
| String<br />
| <br />
|-<br />
| Integrity<br />
| Float<br />
| Between 0 and 1<br />
|-<br />
|Seed<br />
|VarLong<br />
|<br />
|-<br />
| Flags<br />
| Byte<br />
| 0x01: Ignore entities; 0x02: Show air; 0x04: Show bounding box<br />
|}<br />
<br />
Possible actions:<br />
<br />
* 0 - Update data<br />
* 1 - Save the structure<br />
* 2 - Load the structure<br />
* 3 - Detect size<br />
<br />
The Notchian client uses update data to indicate no special action should be taken (i.e. the done button).<br />
<br />
==== Update Sign ====<br />
<br />
{{anchor|Update Sign (serverbound)}}This message is sent from the client to the server when the “Done” button is pushed after placing a sign.<br />
<br />
The server only accepts this packet after [[#Open Sign Editor|Open Sign Editor]], otherwise this packet is silently ignored.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x29<br />
|rowspan="5"| Play<br />
|rowspan="5"| Server<br />
| Location<br />
| Position<br />
| Block Coordinates<br />
|-<br />
| Line 1<br />
| String (384)<br />
| First line of text in the sign<br />
|-<br />
| Line 2<br />
| String (384)<br />
| Second line of text in the sign<br />
|-<br />
| Line 3<br />
| String (384)<br />
| Third line of text in the sign<br />
|-<br />
| Line 4<br />
| String (384)<br />
| Fourth line of text in the sign<br />
|}<br />
<br />
==== Animation (serverbound) ====<br />
<br />
Sent when the player's arm swings.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x2A<br />
| Play<br />
| Server<br />
| Hand<br />
| VarInt Enum<br />
| Hand used for the animation. 0: main hand, 1: off hand.<br />
|}<br />
<br />
==== Spectate ====<br />
<br />
Teleports the player to the given entity. The player must be in spectator mode.<br />
<br />
The Notchian client only uses this to teleport to players, but it appears to accept any type of entity. The entity does not need to be in the same dimension as the player; if necessary, the player will be respawned in the right world. If the given entity cannot be found (or isn't loaded), this packet will be ignored. It will also be ignored if the player attempts to teleport to themselves.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x2B<br />
|rowspan="1"| Play<br />
|rowspan="1"| Server<br />
| Target Player<br />
| UUID<br />
| UUID of the player to teleport to (can also be an entity UUID)<br />
|}<br />
<br />
==== Player Block Placement ====<br />
<br />
{| class="wikitable"<br />
|-<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="7"| 0x2C<br />
|rowspan="7"| Play<br />
|rowspan="7"| Server<br />
| Hand<br />
| VarInt Enum<br />
| The hand from which the block is placed; 0: main hand, 1: off hand<br />
|-<br />
| Location<br />
| Position<br />
| Block position<br />
|-<br />
| Face<br />
| VarInt Enum<br />
| The face on which the block is placed (as documented at [[#Player Digging|Player Digging]])<br />
|-<br />
| Cursor Position X<br />
| Float<br />
| The position of the crosshair on the block, from 0 to 1 increasing from west to east<br />
|-<br />
| Cursor Position Y<br />
| Float<br />
| The position of the crosshair on the block, from 0 to 1 increasing from bottom to top<br />
|-<br />
| Cursor Position Z<br />
| Float<br />
| The position of the crosshair on the block, from 0 to 1 increasing from north to south<br />
|-<br />
| Inside block<br />
| Boolean<br />
| True when the player's head is inside of a block.<br />
|}<br />
<br />
Upon placing a block, this packet is sent once.<br />
<br />
The Cursor Position X/Y/Z fields (also known as in-block coordinates) are calculated using raytracing. The unit corresponds to sixteen pixels in the default resource pack. For example, let's say a slab is being placed against the south face of a full block. The Cursor Position X will be higher if the player was pointing near the right (east) edge of the face, lower if pointing near the left. The Cursor Position Y will be used to determine whether it will appear as a bottom slab (values 0.0–0.5) or as a top slab (values 0.5-1.0). The Cursor Position Z should be 1.0 since the player was looking at the southernmost part of the block.<br />
<br />
Inside block is true when a player's head (specifically eyes) are inside of a block's collision. In 1.13 and later versions, collision is rather complicated and individual blocks can have multiple collision boxes. For instance, a ring of vines has a non-colliding hole in the middle. This value is only true when the player is directly in the box. In practice, though, this value is only used by scaffolding to place in front of the player when sneaking inside of it (other blocks will place behind when you intersect with them -- try with glass for instance). <br />
<br />
==== Use Item ====<br />
<br />
Sent when pressing the Use Item key (default: right click) with an item in hand.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! State<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x2D<br />
| Play<br />
| Server<br />
| Hand<br />
| VarInt Enum<br />
| Hand used for the animation. 0: main hand, 1: off hand.<br />
|}<br />
<br />
[[Category:Protocol Details]]<br />
[[Category:Minecraft Modern]]</div>Orladoghttps://wiki.vg/index.php?title=Protocol_version_numbers&diff=15874Protocol version numbers2020-06-23T15:18:27Z<p>Orladog: Apparently 1.16 is the same as 1.16-rc1 so link there for now</p>
<hr />
<div>This page lists the protocol version numbers used in the various MC releases. Official releases are marked bold, weekly snapshots are in regular font.<br />
<br />
The 1.7 release has seen a complete rewrite of the network protocol (using Netty), including the version numbers. The protocol numbers have been reset. This page contains version numbers for both the pre-Netty and post-Netty protocol versions.<br />
<br />
A list of packet IDs and names per linked protocol version on this page is available [https://github.com/ammaraskar/MinecraftPacketNames/blob/master/packets.json here.]<br />
<br />
== Versions after the Netty rewrite ==<br />
<br />
Beginning with the 1.7.1 pre-release (and release 1.7.2), versioning was reset. <!-- For copy-paste convenience: {{subst:REVISIONID: Pre-release protocol}} --><br />
<br />
{| class="wikitable"<br />
|-<br />
! Release name<br />
! Version number<br />
! Last known documentation<br />
{{/Entry|1.16|735|cur|snap=1}}<br />
{{/Entry|1.16-rc1|734|cur|snap=1}}<br />
{{/Entry|1.16-pre8|733|15861|snap=1}}<br />
{{/Entry|1.16-pre7|732|15857|snap=1}}<br />
{{/Entry|1.16-pre6|730|15854|snap=1}}<br />
{{/Entry|1.16-pre5|729|15847|snap=1}}<br />
{{/Entry|1.16-pre4|727|15843|snap=1}}<br />
{{/Entry|1.16-pre3|725|15839|snap=1}}<br />
{{/Entry|1.16-pre2|722|15831|snap=1}}<br />
{{/Entry|1.16-pre1|721|15831|snap=1}}<br />
{{/Entry|20w22a|719|15710|snap=1}}<br />
{{/Entry|20w21a|718|15661|snap=1}}<br />
{{/Entry|20w20b|717|15646|snap=1}}<br />
{{/Entry|20w20a|716|15643|snap=1}}<br />
{{/Entry|20w19a|715|15588|snap=1}}<br />
{{/Entry|20w18a|714|15577|snap=1}}<br />
{{/Entry|20w17a|713|15551|snap=1}}<br />
{{/Entry|20w16a|712|15536|snap=1}}<br />
{{/Entry|20w15a|711|15514|snap=1}}<br />
{{/Entry|20w14a|710|15452|snap=1}}<br />
|-<br />
| {{Minecraft Wiki|20w14∞}} || 709 || <ref group="note">April fools snapshot.</ref><br />
{{/Entry|20w13b|709|15392|snap=1}}<br />
{{/Entry|20w13a|708|15382|snap=1}}<br />
{{/Entry|20w12a|707|15368|snap=1}}<br />
{{/Entry|20w11a|706|15336|snap=1}}<br />
{{/Entry|20w10a|705|15326|snap=1}}<br />
{{/Entry|20w09a|704|15310|snap=1}}<br />
{{/Entry|20w08a|703|15306|snap=1}}<br />
{{/Entry|20w07a|702|15304|snap=1}}<br />
{{/Entry|20w06a|701|15295|snap=1}}<br />
{{/Entry|1.15.2|578|cur}}<br />
{{/Entry|1.15.2-pre2|577|15258|snap=1}}<br />
{{/Entry|1.15.2-pre1|576|15256|snap=1}}<br />
{{/Entry|1.15.1|575|15241|pre_release_doc=1}}<br />
{{/Entry|1.15.1-pre1|574|15183|snap=1}}<br />
{{/Entry|1.15|573|15173|pre_release_doc=1}}<br />
{{/Entry|1.15-pre7|572|15164|snap=1}}<br />
{{/Entry|1.15-pre6|571|15158|snap=1}}<br />
{{/Entry|1.15-pre5|570|15149|snap=1}}<br />
{{/Entry|1.15-pre4|569|15140|snap=1}}<br />
{{/Entry|1.15-pre3|567|15122|snap=1}}<br />
{{/Entry|1.15-pre2|566|15111|snap=1}}<br />
{{/Entry|1.15-pre1|565|15101|snap=1}}<br />
{{/Entry|19w46b|564|15073|snap=1}}<br />
{{/Entry|19w46a|563|15070|snap=1}}<br />
{{/Entry|19w45b|562|15056|snap=1}}<br />
{{/Entry|19w45a|561|15054|snap=1}}<br />
{{/Entry|19w44a|560|15050|snap=1}}<br />
{{/Entry|19w42a|559|15044|snap=1}}<br />
{{/Entry|19w41a|558|15032|snap=1}}<br />
{{/Entry|19w40a|557|15013|snap=1}}<br />
{{/Entry|19w39a|556|14987|snap=1}}<br />
{{/Entry|19w38b|555|14971|snap=1}}<br />
{{/Entry|19w38a|554|snap=1}}<br />
{{/Entry|19w37a|553|snap=1}}<br />
{{/Entry|19w36a|552|14970|snap=1}}<br />
{{/Entry|19w35a|551|14969|snap=1}}<br />
{{/Entry|19w34a|550|14968|snap=1}}<br />
{{/Entry|1.14.4|498|15346}}<br />
{{/Entry|1.14.4-pre7|497|14868|snap=1}}<br />
{{/Entry|1.14.4-pre6|496|14864|snap=1}}<br />
{{/Entry|1.14.4-pre5|495|14862|snap=1}}<br />
{{/Entry|1.14.4-pre4|494|14856|snap=1}}<br />
{{/Entry|1.14.4-pre3|493|14849|snap=1}}<br />
{{/Entry|1.14.4-pre2|492|14837|snap=1}}<br />
{{/Entry|1.14.4-pre1|491|14835|snap=1}}<br />
{{/Entry|1.14.3|490|14826|pre_release_doc=1}}<br />
{{/Entry|1.14.3 - Combat Test|500|snap=1}}<br />
{{/Entry|1.14.3-pre4|489|14824|snap=1}}<br />
{{/Entry|1.14.3-pre3|488|14820|snap=1}}<br />
{{/Entry|1.14.3-pre2|487|14816|snap=1}}<br />
{{/Entry|1.14.3-pre1|486|14806|snap=1}}<br />
{{/Entry|1.14.2|485|14794|pre_release_doc=1}}<br />
{{/Entry|1.14.2-pre4|484|14788|snap=1}}<br />
{{/Entry|1.14.2-pre3|483|14785|snap=1}}<br />
{{/Entry|1.14.2-pre2|482|14779|snap=1}}<br />
{{/Entry|1.14.2-pre1|481|14772|snap=1}}<br />
{{/Entry|1.14.1|480|14770|pre_release_doc=1}}<br />
{{/Entry|1.14.1-pre2|479|14762|snap=1}}<br />
{{/Entry|1.14.1-pre1|478|14757|snap=1}}<br />
{{/Entry|1.14|477|14752|pre_release_doc=1}}<br />
{{/Entry|1.14-pre5|476|14697|snap=1}}<br />
{{/Entry|1.14-pre4|475|14695|snap=1}}<br />
{{/Entry|1.14-pre3|474|14691|snap=1}}<br />
{{/Entry|1.14-pre2|473|14687|snap=1}}<br />
{{/Entry|1.14-pre1|472|14683|snap=1}}<br />
{{/Entry|19w14b|471|14670|snap=1}}<br />
{{/Entry|19w14a|470|14649|snap=1}}<br />
{{/Entry|19w13b|469|14642|snap=1}}<br />
{{/Entry|19w13a|468|14639|snap=1}}<br />
{{/Entry|19w12b|467|14627|snap=1}}<br />
{{/Entry|19w12a|466|14625|snap=1}}<br />
{{/Entry|19w11b|465|14613|snap=1}}<br />
{{/Entry|19w11a|464|14607|snap=1}}<br />
{{/Entry|19w09a|463|14591|snap=1}}<br />
{{/Entry|19w08b|462|14586|snap=1}}<br />
{{/Entry|19w08a|461|14585|snap=1}}<br />
{{/Entry|19w07a|460|14575|snap=1}}<br />
{{/Entry|19w06a|459|14562|snap=1}}<br />
{{/Entry|19w05a|458|14555|snap=1}}<br />
{{/Entry|19w04b|457|14550|snap=1}}<br />
{{/Entry|19w04a|456|14548|snap=1}}<br />
{{/Entry|19w03c|455|14544|snap=1}}<br />
{{/Entry|19w03b|454|14536|snap=1}}<br />
{{/Entry|19w03a|453|14530|snap=1}}<br />
{{/Entry|19w02a|452|14515|snap=1}}<br />
{{/Entry|18w50a|451|14491|snap=1}}<br />
{{/Entry|18w49a|450|14467|snap=1}}<br />
{{/Entry|18w48b|449|14461|snap=1}}<br />
{{/Entry|18w48a|448|14459|snap=1}}<br />
{{/Entry|18w47b|447|14452|snap=1}}<br />
{{/Entry|18w47a|446|14449|snap=1}}<br />
{{/Entry|18w46a|445|14441|snap=1}}<br />
{{/Entry|18w45a|444|14418|snap=1}}<br />
{{/Entry|18w44a|443|14414|snap=1}}<br />
{{/Entry|18w43c|442|14397|snap=1}}<br />
{{/Entry|18w43b|441|14381|snap=1}}<br />
{{/Entry|18w43a|441|snap=1}}<br />
{{/Entry|1.13.2|404|14889}} ([{{canonicalurl:Plugin channels|oldid=14658}} Plugin channels])<br />
{{/Entry|1.13.2-pre2|403|14359|snap=1}}<br />
{{/Entry|1.13.2-pre1|402|14357|snap=1}}<br />
{{/Entry|1.13.1|401|14301}}<br />
{{/Entry|1.13.1-pre2|400|14261|snap=1}}<br />
{{/Entry|1.13.1-pre1|399|14255|snap=1}}<br />
{{/Entry|18w33a|398|14252|snap=1}}<br />
{{/Entry|18w32a|397|14247|snap=1}}<br />
{{/Entry|18w31a|396|14196|snap=1}}<br />
{{/Entry|18w30b|395|14189|snap=1}}<br />
{{/Entry|18w30a|394|14158|snap=1}}<br />
{{/Entry|1.13|393|14150|pre_release_doc=1}}<br />
{{/Entry|1.13-pre10|392|14126|snap=1}}<br />
{{/Entry|1.13-pre9|391|14124|snap=1}}<br />
{{/Entry|1.13-pre8|390|14117|snap=1}}<br />
{{/Entry|1.13-pre7|389|14107|snap=1}}<br />
{{/Entry|1.13-pre6|388|14095|snap=1}}<br />
{{/Entry|1.13-pre5|387|14088|snap=1}}<br />
{{/Entry|1.13-pre4|386|14072|snap=1}}<br />
{{/Entry|1.13-pre3|385|14045|snap=1}}<br />
{{/Entry|1.13-pre2|384|14030|snap=1}}<br />
{{/Entry|1.13-pre1|383|13984|snap=1}}<br />
{{/Entry|18w22c|382|13965|snap=1}}<br />
{{/Entry|18w22b|381|13951|snap=1}}<br />
{{/Entry|18w22a|380|13947|snap=1}}<br />
{{/Entry|18w21b|379|13932|snap=1}}<br />
{{/Entry|18w21a|378|13926|snap=1}}<br />
{{/Entry|18w20c|377|13923|snap=1}}<br />
{{/Entry|18w20b|376|13913|snap=1}}<br />
{{/Entry|18w20a|375|13910|snap=1}}<br />
{{/Entry|18w19b|374|13905|snap=1}}<br />
{{/Entry|18w19a|373|13896|snap=1}}<br />
{{/Entry|18w16a|372|13891|snap=1}}<br />
{{/Entry|18w15a|371|13824|snap=1}}<br />
{{/Entry|18w14b|370|13744|snap=1}}<br />
{{/Entry|18w14a|369|13741|snap=1}}<br />
{{/Entry|18w11a|368|13724|snap=1}}<br />
{{/Entry|18w10d|367|13702|snap=1}}<br />
{{/Entry|18w10c|366|13699|snap=1}}<br />
{{/Entry|18w10b|365|13693|snap=1}}<br />
{{/Entry|18w10a|364|13692|snap=1}}<br />
{{/Entry|18w09a|363|13671|snap=1}}<br />
{{/Entry|18w08b|362|13666|snap=1}}<br />
{{/Entry|18w08a|361|13662|snap=1}}<br />
{{/Entry|18w07c|360|13658|snap=1}}<br />
{{/Entry|18w07b|359|13653|snap=1}}<br />
{{/Entry|18w07a|358|13648|snap=1}}<br />
{{/Entry|18w06a|357|13636|snap=1}}<br />
{{/Entry|18w05a|356|13628|snap=1}}<br />
{{/Entry|18w03b|355|13623|snap=1}}<br />
{{/Entry|18w03a|354|snap=1}}<br />
{{/Entry|18w02a|353|13611|snap=1}}<br />
{{/Entry|18w01a|352|13576|snap=1}}<br />
{{/Entry|17w50a|351|13556|snap=1}}<br />
{{/Entry|17w49b|350|13524|snap=1}}<br />
{{/Entry|17w49a|349|13516|snap=1}}<br />
{{/Entry|17w48a|348|13512|snap=1}}<br />
{{/Entry|17w47b|347|13487|snap=1}}<br />
{{/Entry|17w47a|346|13476|snap=1}}<br />
{{/Entry|17w46a|345|13472|snap=1}}<br />
{{/Entry|17w45b|344|13414|snap=1}}<br />
{{/Entry|17w45a|343|13413|snap=1}}<br />
{{/Entry|17w43b|342|13398|snap=1}}<br />
{{/Entry|17w43a|341|13396|snap=1}}<br />
|-<br />
| '''{{Minecraft Wiki|1.12.2}}'''<br />
| 340<br />
| [{{canonicalurl:Protocol|oldid=14204}} page]<br />
{{Warning|<abbr title{{=}}"Note that this permalink links to and embeds content from the current versions of the articles. Use the following links for accurate information instead.">Hover for warning</abbr>}}<br />
<br />
* [{{canonicalurl:Data types|oldid=14256}} Data types]<br />
* [{{canonicalurl:Slot Data|oldid=7835}} Slot Data]<br />
* [{{canonicalurl:Chunk Format|oldid=14135}} Chunk Format]<br />
* [{{canonicalurl:Entity metadata|oldid=14048}} Entity metadata]<br />
* [{{canonicalurl:Entity statuses|14009}} Entity statuses]<br />
* [{{canonicalurl:Object Data|oldid=8314}} Object Data]<br />
* [{{canonicalurl:Block Actions|oldid=12934}} Block Actions]<br />
* [{{canonicalurl:Plugin channels|oldid=14089}} Plugin channels]<br />
|-<br />
| {{Minecraft Wiki|1.12.2-pre2}}<br />
|rowspan="2"| 339<br />
|rowspan="2"| [{{canonicalurl:Pre-release protocol|oldid=13355}} page]<br />
|-<br />
| {{Minecraft Wiki|1.12.2-pre1}}<br />
|-<br />
| '''{{Minecraft Wiki|1.12.1}}'''<br />
| 338<br />
| [{{canonicalurl:Protocol|oldid=13339}} page]<br />
|-<br />
| {{Minecraft Wiki|1.12.1-pre1}}<br />
| 337<br />
| [{{canonicalurl:Pre-release protocol|oldid=13267}} page]<br />
|-<br />
| {{Minecraft Wiki|17w31a}}<br />
| 336<br />
| [{{canonicalurl:Pre-release protocol|oldid=13265}} page]<br />
|-<br />
| '''{{Minecraft Wiki|1.12}}'''<br />
| 335<br />
| [{{canonicalurl:Protocol|oldid=13223}} page]<br />
|-<br />
| {{Minecraft Wiki|1.12-pre7}}<br />
| 334<br />
| [{{canonicalurl:Pre-release protocol|oldid=12918}} page]<br />
|-<br />
| {{Minecraft Wiki|1.12-pre6}}<br />
| 333<br />
| [{{canonicalurl:Pre-release protocol|oldid=12909}} page]<br />
|-<br />
| {{Minecraft Wiki|1.12-pre5}}<br />
| 332<br />
| [{{canonicalurl:Pre-release protocol|oldid=10809}} page]<br />
|-<br />
| {{Minecraft Wiki|1.12-pre4}}<br />
| 331<br />
| [{{canonicalurl:Pre-release protocol|oldid=10804}} page]<br />
|-<br />
| {{Minecraft Wiki|1.12-pre3}}<br />
| 330<br />
| [{{canonicalurl:Pre-release protocol|oldid=10803}} page]<br />
|-<br />
| {{Minecraft Wiki|1.12-pre2}}<br />
| 329<br />
| [{{canonicalurl:Pre-release protocol|oldid=10418}} page]<br />
|-<br />
| {{Minecraft Wiki|1.12-pre1}}<br />
| 328<br />
| [{{canonicalurl:Pre-release protocol|oldid=9819}} page]<br />
|-<br />
| {{Minecraft Wiki|17w18b}}<br />
| 327<br />
| [{{canonicalurl:Pre-release protocol|oldid=8548}} page]<br />
|-<br />
| {{Minecraft Wiki|17w18a}}<br />
| 326<br />
| [{{canonicalurl:Pre-release protocol|oldid=8546}} page]<br />
|-<br />
| {{Minecraft Wiki|17w17b}}<br />
| 325<br />
| [{{canonicalurl:Pre-release protocol|oldid=8536}} page]<br />
|-<br />
| {{Minecraft Wiki|17w17a}}<br />
| 324<br />
| [{{canonicalurl:Pre-release protocol|oldid=8528}} page]<br />
|-<br />
| {{Minecraft Wiki|17w16b}}<br />
| 323<br />
| [{{canonicalurl:Pre-release protocol|oldid=8519}} page]<br />
|-<br />
| {{Minecraft Wiki|17w16a}}<br />
| 322<br />
| [{{canonicalurl:Pre-release protocol|oldid=8515}} page]<br />
|-<br />
| {{Minecraft Wiki|17w15a}}<br />
| 321<br />
| [{{canonicalurl:Pre-release protocol|oldid=8499}} page]<br />
|-<br />
| {{Minecraft Wiki|17w14a}}<br />
| 320<br />
| [{{canonicalurl:Pre-release protocol|oldid=8490}} page]<br />
|-<br />
| {{Minecraft Wiki|17w13b}}<br />
| 319<br />
| [{{canonicalurl:Pre-release protocol|oldid=8475}} page]<br />
|-<br />
| {{Minecraft Wiki|17w13a}}<br />
| 318<br />
| [{{canonicalurl:Pre-release protocol|oldid=8454}} page]<br />
|-<br />
| {{Minecraft Wiki|17w06a}}<br />
| 317<br />
| [{{canonicalurl:Pre-release protocol|oldid=8414}} page]<br />
|-<br />
| '''{{Minecraft Wiki|1.11.2}}'''<br />
|rowspan="3"| 316<br />
|rowspan="3"| [{{canonicalurl:Protocol|oldid=8543}} page]<br />
|-<br />
| '''{{Minecraft Wiki|1.11.1}}'''<br />
|-<br />
| {{Minecraft Wiki|16w50a}}<br />
|-<br />
| '''{{Minecraft Wiki|1.11}}'''<br />
| 315<br />
| [{{canonicalurl:Protocol|oldid=8405}} page]<br />
|-<br />
| {{Minecraft Wiki|1.11-pre1}}<br />
| 314<br />
| [{{canonicalurl:Pre-release protocol|oldid=8249}} page]<br />
|-<br />
| {{Minecraft Wiki|16w44a}}<br />
|rowspan="2"| 313<br />
|rowspan="2"| [{{canonicalurl:Pre-release protocol|oldid=8246}} page]<br />
|-<br />
| {{Minecraft Wiki|16w43a}}<br />
|-<br />
| {{Minecraft Wiki|16w42a}}<br />
| 312<br />
| [{{canonicalurl:Pre-release protocol|oldid=8225}} page]<br />
|-<br />
| {{Minecraft Wiki|16w41a}}<br />
| 311<br />
| [{{canonicalurl:Pre-release protocol|oldid=8218}} page]<br />
|-<br />
| {{Minecraft Wiki|16w40a}}<br />
| 310<br />
| [{{canonicalurl:Pre-release protocol|oldid=8204}} page]<br />
|-<br />
| {{Minecraft Wiki|16w39c}}<br />
| 309<br />
| [{{canonicalurl:Pre-release protocol|oldid=8177}} page]<br />
|-<br />
| {{Minecraft Wiki|16w39b}}<br />
| 308<br />
| [{{canonicalurl:Pre-release protocol|oldid=8149}} page]<br />
|-<br />
| {{Minecraft Wiki|16w39a}}<br />
| 307<br />
| [{{canonicalurl:Pre-release protocol|oldid=8141}} page]<br />
|-<br />
| {{Minecraft Wiki|16w38a}}<br />
| 306<br />
| [{{canonicalurl:Pre-release protocol|oldid=8118}} page]<br />
|-<br />
| {{Minecraft Wiki|16w36a}}<br />
| 305<br />
| [{{canonicalurl:Pre-release protocol|oldid=8099}} page]<br />
|-<br />
| {{Minecraft Wiki|16w35a}}<br />
| 304<br />
| [{{canonicalurl:Pre-release protocol|oldid=8094}} page]<br />
|-<br />
| {{Minecraft Wiki|16w33a}}<br />
| 303<br />
| [{{canonicalurl:Pre-release protocol|oldid=8084}} page]<br />
|-<br />
| {{Minecraft Wiki|16w32b}}<br />
| 302<br />
| [{{canonicalurl:Pre-release protocol|oldid=8063}} page]<br />
|-<br />
| {{Minecraft Wiki|16w32a}}<br />
| 301<br />
| [{{canonicalurl:Pre-release protocol|oldid=8062}} page]<br />
|-<br />
| '''{{Minecraft Wiki|1.10.2}}'''<br />
|rowspan="3"| 210<br />
|rowspan="3"| [{{canonicalurl:Protocol|oldid=8235}} page]<br />
|-<br />
| '''{{Minecraft Wiki|1.10.1}}'''<br />
|-<br />
| '''{{Minecraft Wiki|1.10}}'''<br />
|-<br />
| {{Minecraft Wiki|1.10-pre2}}<br />
| 205<br />
| [{{canonicalurl:Pre-release protocol|oldid=7961}} page]<br />
|-<br />
| {{Minecraft Wiki|1.10-pre1}}<br />
| 204<br />
| [{{canonicalurl:Pre-release protocol|oldid=7950}} page]<br />
|-<br />
| {{Minecraft Wiki|16w21b}}<br />
| 203<br />
| [{{canonicalurl:Pre-release protocol|oldid=7890}} page]<br />
|-<br />
| {{Minecraft Wiki|16w21a}}<br />
| 202<br />
| [{{canonicalurl:Pre-release protocol|oldid=7877}} page]<br />
|-<br />
| {{Minecraft Wiki|16w20a}}<br />
| 201<br />
| [{{canonicalurl:Pre-release protocol|oldid=7859}} page]<br />
|-<br />
| '''{{Minecraft Wiki|1.9.4}}'''<br />
|rowspan="4"| 110<br />
|rowspan="4"| [{{canonicalurl:Protocol|oldid=7959}} page]<br />
|-<br />
| '''{{Minecraft Wiki|1.9.3}}'''<br />
|-<br />
| {{Minecraft Wiki|1.9.3-pre3}}<br />
|-<br />
| {{Minecraft Wiki|1.9.3-pre2}} <br />
|-<br />
| {{Minecraft Wiki|1.9.3-pre1}}<br />
|rowspan="5"| 109<br />
|rowspan="5"| [{{canonicalurl:Protocol|oldid=7817}} page]<br />
|-<br />
| {{Minecraft Wiki|16w15b}}<br />
|-<br />
| {{Minecraft Wiki|16w15a}}<br />
|-<br />
| {{Minecraft Wiki|16w14a}}<br />
|-<br />
| '''{{Minecraft Wiki|1.9.2}}'''<br />
|-<br />
| {{Minecraft Wiki|1.RV-Pre1}}<br />
| 108<br />
| [{{canonicalurl:Pre-release protocol|oldid=7552}} page]<ref group="note">Although it has the same ID as 1.9.1, the April Fools version 1.RV-Pre1 has new blocks and items that cannot be used on 1.9.1 servers.</ref><br />
|-<br />
| '''{{Minecraft Wiki|1.9.1}}'''<br />
|rowspan="3"| 108<br />
|rowspan="3"| [{{canonicalurl:Pre-release protocol|oldid=7552}} page]<br />
|-<br />
| {{Minecraft Wiki|1.9.1-pre3}}<br />
|-<br />
| {{Minecraft Wiki|1.9.1-pre2}}<br />
|-<br />
| {{Minecraft Wiki|1.9.1-pre1}}<br />
|rowspan="2"| 107<br />
|rowspan="2"| [{{canonicalurl:Protocol|oldid=7617}} page]<br />
|-<br />
| '''{{Minecraft Wiki|1.9}}'''<br />
|-<br />
| {{Minecraft Wiki|1.9-pre4}}<br />
| 106<br />
| [{{canonicalurl:Pre-release protocol|oldid=7401}} page]<br />
|-<br />
| {{Minecraft Wiki|1.9-pre3}}<br />
| 105<br />
|<br />
|-<br />
| {{Minecraft Wiki|1.9-pre2}}<br />
| 104<br />
| <br />
|-<br />
| {{Minecraft Wiki|1.9-pre1}}<br />
| 103<br />
| <br />
|-<br />
| {{Minecraft Wiki|16w07b}}<br />
| 102<br />
| <br />
|-<br />
| {{Minecraft Wiki|16w07a}}<br />
| 101<br />
|<br />
|-<br />
| {{Minecraft Wiki|16w06a}}<br />
| 100<br />
|<br />
|-<br />
| {{Minecraft Wiki|16w05b}}<br />
| 99<br />
|<br />
|-<br />
| {{Minecraft Wiki|16w05a}}<br />
| 98<br />
|<br />
|-<br />
| {{Minecraft Wiki|16w04a}}<br />
| 97<br />
|<br />
|-<br />
| {{Minecraft Wiki|16w03a}}<br />
| 96<br />
|<br />
|-<br />
| {{Minecraft Wiki|16w02a}}<br />
| 95<br />
| [{{canonicalurl:Pre-release protocol|oldid=7268}} page]<br />
|-<br />
| {{Minecraft Wiki|15w51b}}<br />
| 94<br />
| [{{canonicalurl:Pre-release protocol|oldid=7193}} page]<br />
|-<br />
| {{Minecraft Wiki|15w51a}}<br />
| 93<br />
| <br />
|-<br />
| {{Minecraft Wiki|15w50a}}<br />
| 92<br />
| <br />
|-<br />
| {{Minecraft Wiki|15w49b}}<br />
| 91<br />
| <br />
|-<br />
| {{Minecraft Wiki|15w49a}}<br />
| 90<br />
| <br />
|-<br />
| {{Minecraft Wiki|15w47c}}<br />
| 89<br />
| <br />
|-<br />
| {{Minecraft Wiki|15w47b}}<br />
| 88<br />
| <br />
|-<br />
| {{Minecraft Wiki|15w47a}}<br />
| 87<br />
| <br />
|-<br />
| {{Minecraft Wiki|15w46a}}<br />
| 86<br />
| <br />
|-<br />
| {{Minecraft Wiki|15w45a}}<br />
| 85<br />
| <br />
|-<br />
| {{Minecraft Wiki|15w44b}}<br />
| 84<br />
| <br />
|-<br />
| {{Minecraft Wiki|15w44a}}<br />
| 83<br />
| <br />
|-<br />
| {{Minecraft Wiki|15w43c}}<br />
| 82<br />
| <br />
|-<br />
| {{Minecraft Wiki|15w43b}}<br />
| 81<br />
| <br />
|-<br />
| {{Minecraft Wiki|15w43a}}<br />
| 80<br />
| <br />
|-<br />
| {{Minecraft Wiki|15w42a}}<br />
| 79<br />
| <br />
|-<br />
| {{Minecraft Wiki|15w41b}}<br />
| 78<br />
| <br />
|-<br />
| {{Minecraft Wiki|15w41a}}<br />
| 77<br />
| <br />
|-<br />
| {{Minecraft Wiki|15w40b}}<br />
| 76<br />
| [{{canonicalurl:Pre-release protocol|oldid=7087}} page]<br />
|-<br />
| {{Minecraft Wiki|15w40a}}<br />
| 75<br />
| <br />
|-<br />
| {{Minecraft Wiki|15w39c}}<br />
|rowspan="3"|74<br />
|rowspan="3"|<br />
|-<br />
| {{Minecraft Wiki|15w39b}}<br />
|-<br />
| {{Minecraft Wiki|15w39a}}<br />
|-<br />
| {{Minecraft Wiki|15w38b}}<br />
| 73<br />
| [{{canonicalurl:Pre-release protocol|oldid=6935}} page]<br />
|-<br />
| {{Minecraft Wiki|15w38a}}<br />
| 72<br />
| [{{canonicalurl:Pre-release protocol|oldid=6932}} page]<br />
|-<br />
| {{Minecraft Wiki|15w37a}}<br />
| 71<br />
| <br />
|-<br />
| {{Minecraft Wiki|15w36d}}<br />
| 70<br />
| [{{canonicalurl:Pre-release protocol|oldid=6901}} page]<br />
|-<br />
| {{Minecraft Wiki|15w36c}}<br />
| 69<br />
| [{{canonicalurl:Pre-release protocol|oldid=6881}} page]<br />
|-<br />
| {{Minecraft Wiki|15w36b}}<br />
| 68<br />
| <br />
|-<br />
| {{Minecraft Wiki|15w36a}}<br />
| 67<br />
| <br />
|-<br />
| {{Minecraft Wiki|15w35e}}<br />
| 66<br />
| [{{canonicalurl:Pre-release protocol|oldid=6851}} page]<br />
|-<br />
| {{Minecraft Wiki|15w35d}}<br />
| 65<br />
| <br />
|-<br />
| {{Minecraft Wiki|15w35c}}<br />
| 64<br />
| <br />
|-<br />
| {{Minecraft Wiki|15w35b}}<br />
| 63<br />
| [{{canonicalurl:Pre-release protocol|oldid=6829}} page]<br />
|-<br />
| {{Minecraft Wiki|15w35a}}<br />
| 62<br />
| <br />
|-<br />
| {{Minecraft Wiki|15w34d}}<br />
| 61<br />
| <br />
|-<br />
| {{Minecraft Wiki|15w34c}}<br />
| 60<br />
| <br />
|-<br />
| {{Minecraft Wiki|15w34b}}<br />
| 59<br />
| <br />
|-<br />
| {{Minecraft Wiki|15w34a}}<br />
| 58<br />
| [{{canonicalurl:Pre-release protocol|oldid=6809}} page]<br />
|-<br />
| {{Minecraft Wiki|15w33c}}<br />
| 57<br />
| [{{canonicalurl:Pre-release protocol|oldid=6806}} page]<br />
|-<br />
| {{Minecraft Wiki|15w33b}}<br />
| 56<br />
| [{{canonicalurl:Pre-release protocol|oldid=6796}} page]<br />
|-<br />
| {{Minecraft Wiki|15w33a}}<br />
| 55<br />
| [{{canonicalurl:Pre-release protocol|oldid=6790}} page]<br />
|-<br />
| {{Minecraft Wiki|15w32c}}<br />
| 54<br />
| [{{canonicalurl:Pre-release protocol|oldid=6788}} page]<br />
|-<br />
| {{Minecraft Wiki|15w32b}}<br />
| 53<br />
| <br />
|- <br />
| {{Minecraft Wiki|15w32a}}<br />
| 52<br />
| [{{canonicalurl:Pre-release protocol|oldid=6785}} page]<br />
|-<br />
| {{Minecraft Wiki|15w31c}}<br />
| 51<br />
| [{{canonicalurl:Pre-release protocol|oldid=6780}} page]<br />
|-<br />
| {{Minecraft Wiki|15w31b}}<br />
| 50<br />
| [{{canonicalurl:Pre-release protocol|oldid=6746}} page]<ref group="note">{{IRC quote|Dinnerbone|Protocol itself didn't change in 31c btw, but we added an entity which warrants incompatibility}}</ref><br />
|-<br />
| {{Minecraft Wiki|15w31a}}<br />
| 49<br />
| <br />
|-<br />
| {{Minecraft Wiki|15w14a}}<br />
| 48<br />
| <br />
|-<br />
| '''{{Minecraft Wiki|1.8.9}}'''<br />
|rowspan="22"| 47<br />
|rowspan="22"| [{{canonicalurl:Protocol|oldid=7368}} page]<br />
|-<br />
| '''{{Minecraft Wiki|1.8.8}}'''<br />
|-<br />
| '''{{Minecraft Wiki|1.8.7}}'''<br />
|-<br />
| '''{{Minecraft Wiki|1.8.6}}'''<br />
|-<br />
| '''{{Minecraft Wiki|1.8.5}}'''<br />
|-<br />
| '''{{Minecraft Wiki|1.8.4}}'''<br />
|-<br />
| '''{{Minecraft Wiki|1.8.3}}'''<br />
|-<br />
| '''{{Minecraft Wiki|1.8.2}}'''<br />
|-<br />
| {{Minecraft Wiki|1.8.2-pre7}}<br />
|-<br />
| {{Minecraft Wiki|1.8.2-pre6}}<br />
|-<br />
| {{Minecraft Wiki|1.8.2-pre5}}<br />
|-<br />
| {{Minecraft Wiki|1.8.2-pre4}}<br />
|-<br />
| {{Minecraft Wiki|1.8.2-pre3}}<br />
|-<br />
| {{Minecraft Wiki|1.8.2-pre2}}<br />
|-<br />
| {{Minecraft Wiki|1.8.2-pre1}}<br />
|-<br />
| '''{{Minecraft Wiki|1.8.1}}'''<br />
|-<br />
| {{Minecraft Wiki|1.8.1-pre5}}<br />
|-<br />
| {{Minecraft Wiki|1.8.1-pre4}}<br />
|-<br />
| {{Minecraft Wiki|1.8.1-pre3}}<br />
|-<br />
| {{Minecraft Wiki|1.8.1-pre2}}<br />
|-<br />
| {{Minecraft Wiki|1.8.1-pre1}}<br />
|-<br />
| '''{{Minecraft Wiki|1.8}}'''<br />
|-<br />
| {{Minecraft Wiki|1.8-pre3}}<br />
| 46<br />
| <br />
|-<br />
| {{Minecraft Wiki|1.8-pre2}}<br />
| 45<br />
| <br />
|-<br />
| {{Minecraft Wiki|1.8-pre1}}<br />
| 44<br />
| <br />
|-<br />
| {{Minecraft Wiki|14w34d}}<br />
| 43<br />
| <br />
|-<br />
| {{Minecraft Wiki|14w34c}}<br />
| 42<br />
| <br />
|-<br />
| {{Minecraft Wiki|14w34b}}<br />
| 41<br />
| <br />
|-<br />
| {{Minecraft Wiki|14w34a}}<br />
| 40<br />
| <br />
|-<br />
| {{Minecraft Wiki|14w33c}}<br />
| 39<br />
| <br />
|-<br />
| {{Minecraft Wiki|14w33b}}<br />
| 38<br />
| <br />
|-<br />
| {{Minecraft Wiki|14w33a}}<br />
| 37<br />
| <br />
|-<br />
| {{Minecraft Wiki|14w32d}}<br />
| 36<br />
| <br />
|-<br />
| {{Minecraft Wiki|14w32c}}<br />
| 35<br />
| <br />
|-<br />
| {{Minecraft Wiki|14w32b}}<br />
| 34<br />
| <br />
|- <br />
| {{Minecraft Wiki|14w32a}}<br />
| 33<br />
| <br />
|-<br />
| {{Minecraft Wiki|14w31a}}<br />
| 32<br />
| <br />
|-<br />
| {{Minecraft Wiki|14w30c}}<br />
| 31<br />
| <br />
|-<br />
| {{Minecraft Wiki|14w30b}}<br />
|rowspan="2"| 30<br />
|rowspan="2"|<br />
|-<br />
| {{Minecraft Wiki|14w30a}}<br />
|-<br />
| {{Minecraft Wiki|14w29a}}<br />
|rowspan="2"| 29<br />
|rowspan="2"|<br />
|-<br />
| {{Minecraft Wiki|14w29a}}<br />
|-<br />
| {{Minecraft Wiki|14w28b}}<br />
| 28<br />
| <br />
|-<br />
| {{Minecraft Wiki|14w28a}}<br />
| 27<br />
| <br />
|-<br />
| {{Minecraft Wiki|14w27b}}<br />
|rowspan="2"| 26<br />
|rowspan="2"| <br />
|-<br />
| {{Minecraft Wiki|14w27a}}<br />
|-<br />
| {{Minecraft Wiki|14w26c}}<br />
| 25<br />
| <br />
|-<br />
| {{Minecraft Wiki|14w26b}}<br />
| 24<br />
| <br />
|-<br />
| {{Minecraft Wiki|14w26a}}<br />
| 23<br />
| <br />
|-<br />
| {{Minecraft Wiki|14w25b}}<br />
| 22<br />
| <br />
|-<br />
| {{Minecraft Wiki|14w25a}}<br />
| 21<br />
| <br />
|-<br />
| {{Minecraft Wiki|14w21b}}<br />
| 20<br />
| <br />
|-<br />
| {{Minecraft Wiki|14w21a}}<br />
| 19<br />
| <br />
|-<br />
| {{Minecraft Wiki|14w20b}}<br />
|rowspan="2"| 18<br />
|rowspan="2"|<br />
|-<br />
| {{Minecraft Wiki|14w20a}}<br />
|-<br />
| {{Minecraft Wiki|14w19a}}<br />
| 17<br />
| <br />
|-<br />
| {{Minecraft Wiki|14w18b}}<br />
|rowspan="2"| 16<br />
|rowspan="2"|<br />
|-<br />
| {{Minecraft Wiki|14w18a}}<br />
|-<br />
| {{Minecraft Wiki|14w17a}}<br />
| 15<br />
| <br />
|-<br />
| {{Minecraft Wiki|14w11b}}<br />
|rowspan="2"| 14<br />
|rowspan="2"|<br />
|-<br />
| {{Minecraft Wiki|14w11a}}<br />
|-<br />
| {{Minecraft Wiki|14w10c}}<br />
|rowspan="3"| 13<br />
|rowspan="3"| <br />
|-<br />
| {{Minecraft Wiki|14w10b}}<br />
|-<br />
| {{Minecraft Wiki|14w10a}}<br />
|-<br />
| {{Minecraft Wiki|14w08a}}<br />
| 12<br />
| <br />
|-<br />
| {{Minecraft Wiki|14w07a}}<br />
| 11<br />
| <br />
|-<br />
| {{Minecraft Wiki|14w06b}}<br />
|rowspan="2"| 10<br />
|rowspan="2"|<br />
|-<br />
| {{Minecraft Wiki|14w06a}}<br />
|-<br />
| {{Minecraft Wiki|14w05b}}<br />
|rowspan="2"| 9<br />
|rowspan="2"|<br />
|-<br />
| {{Minecraft Wiki|14w05a}}<br />
|-<br />
| {{Minecraft Wiki|14w04b}}<br />
| 8<br />
| <br />
|-<br />
| {{Minecraft Wiki|14w04a}}<br />
| 7<br />
| <br />
|-<br />
| {{Minecraft Wiki|14w03b}}<br />
|rowspan="2"| 6<br />
|rowspan="2"|<br />
|-<br />
| {{Minecraft Wiki|14w03a}}<br />
|-<br />
| {{Minecraft Wiki|14w02c}}<br />
|rowspan="14"| 5<br />
|rowspan="14"| [{{canonicalurl:Protocol|oldid=6003}} page]<br />
|-<br />
| {{Minecraft Wiki|14w02b}}<br />
|-<br />
| {{Minecraft Wiki|14w02a}}<br />
|-<br />
| '''{{Minecraft Wiki|1.7.10}}'''<br />
|-<br />
| {{Minecraft Wiki|1.7.10-pre4}}<br />
|-<br />
| {{Minecraft Wiki|1.7.10-pre3}}<br />
|-<br />
| {{Minecraft Wiki|1.7.10-pre2}}<br />
|-<br />
| {{Minecraft Wiki|1.7.10-pre1}}<br />
|-<br />
| '''{{Minecraft Wiki|1.7.9}}'''<br />
|-<br />
| '''{{Minecraft Wiki|1.7.8}}'''<br />
|-<br />
| '''{{Minecraft Wiki|1.7.7}}'''<br />
|-<br />
| '''{{Minecraft Wiki|1.7.6}}'''<br />
|-<br />
| {{Minecraft Wiki|1.7.6-pre2}}<br />
|-<br />
| {{Minecraft Wiki|1.7.6-pre1}}<br />
|-<br />
| '''{{Minecraft Wiki|1.7.5}}'''<br />
|rowspan="12"| 4<br />
|rowspan="12"| [{{canonicalurl:Protocol|oldid=5486}} page]<br />
|-<br />
| '''{{Minecraft Wiki|1.7.4}}'''<br />
|-<br />
| {{Minecraft Wiki|1.7.3-pre}}<br />
|-<br />
| {{Minecraft Wiki|13w49a}}<br />
|-<br />
| {{Minecraft Wiki|13w48b}}<br />
|-<br />
| {{Minecraft Wiki|13w48a}}<br />
|-<br />
| {{Minecraft Wiki|13w47e}}<br />
|-<br />
| {{Minecraft Wiki|13w47d}}<br />
|-<br />
| {{Minecraft Wiki|13w47c}}<br />
|-<br />
| {{Minecraft Wiki|13w47b}}<br />
|-<br />
| {{Minecraft Wiki|13w47a}}<br />
|-<br />
| '''{{Minecraft Wiki|1.7.2}}'''<br />
|-<br />
| {{Minecraft Wiki|1.7.1-pre}}<br />
|rowspan="2"| 3<br />
|rowspan="2"|<br />
|-<br />
| {{Minecraft Wiki|1.7-pre}}<br />
|-<br />
| {{Minecraft Wiki|13w43a}}<br />
| 2<br />
| <br />
|-<br />
| {{Minecraft Wiki|13w42b}}<br />
| rowspan="2" | 1<br />
| rowspan="2" | [{{canonicalurl:Pre-release protocol|oldid=5042}} page]<br />
|-<br />
| {{Minecraft Wiki|13w42a}}<br />
|-<br />
| {{Minecraft Wiki|13w41b}}<br />
| 0<br />
| [{{canonicalurl:Pre-release protocol|oldid=5007}} page]<ref group="note">Despite having the same ID, 13w41a and 13w41b are incompatible.</ref><br />
|-<br />
| {{Minecraft Wiki|13w41a}}<br />
| 0<br />
| [{{canonicalurl:Pre-release protocol|oldid=4957}} page]<br />
|}<br />
<br />
=== Notes ===<br />
<br />
<references group="note" /><br />
<br />
=== Examples ===<br />
<br />
Json: [https://github.com/PrismarineJS/minecraft-data/blob/master/data/pc/common/protocolVersions.json minecraft-data]<br />
<br />
== Versions before the Netty rewrite ==<br />
<br />
Minecraft version 1.6.4 and older used a protocol versioning scheme separate from the current one. As such, the same version number may ambiguously refer to an old version in this list and a new version in the list above. For ease of navigation, this list is also split by Minecraft release stages, but the versions were not reset between these (other than near the start of alpha).<br />
<br />
=== Release ===<br />
<br />
{| class="wikitable"<br />
|-<br />
! Release name<br />
! Version number<br />
! Last known documentation<br />
|-<br />
| {{Minecraft Wiki|13w39b}}<br />
|rowspan="2"| 80<br />
|rowspan="2"| [{{canonicalurl:Pre-release protocol|oldid=4825}} page]<br />
|-<br />
| {{Minecraft Wiki|13w39a}}<br />
|-<br />
| {{Minecraft Wiki|13w38c}}<br />
|rowspan="3"| 79<br />
|rowspan="3"| <br />
|-<br />
| {{Minecraft Wiki|13w38b}}<br />
|-<br />
| {{Minecraft Wiki|13w38a}}<br />
|-<br />
| '''{{Minecraft Wiki|1.6.4}}'''<br />
| 78<br />
| [{{canonicalurl:Protocol|oldid=4899}} page]<br />
|-<br />
| {{Minecraft Wiki|1.6.3-pre}}<br />
| 77<br />
| <br />
|-<br />
| {{Minecraft Wiki|13w37b}}<br />
|rowspan="2"| 76<br />
|rowspan="2"| <br />
|-<br />
| {{Minecraft Wiki|13w37a}}<br />
|-<br />
| {{Minecraft Wiki|13w36b}}<br />
|rowspan="2"| 75<br />
|rowspan="2"| <br />
|-<br />
| {{Minecraft Wiki|13w36a}}<br />
|-<br />
| '''{{Minecraft Wiki|1.6.2}}'''<br />
| 74<br />
| <br />
|-<br />
| '''{{Minecraft Wiki|1.6.1}}'''<br />
| 73<br />
| [{{canonicalurl:Protocol|oldid=1095}} page]<br />
|-<br />
| {{Minecraft Wiki|1.6-pre}}<br />
|rowspan="2"| 72<br />
|rowspan="2"| <br />
|-<br />
| {{Minecraft Wiki|13w26a}}<br />
|-<br />
| {{Minecraft Wiki|13w25c}}<br />
|rowspan="3"| 71<br />
|rowspan="3"| <br />
|-<br />
| {{Minecraft Wiki|13w25b}}<br />
|-<br />
| {{Minecraft Wiki|13w25a}}<br />
|-<br />
| {{Minecraft Wiki|13w24b}}<br />
| 70<br />
| <br />
|-<br />
| {{Minecraft Wiki|13w24a}}<br />
| 69<br />
| <br />
|-<br />
| {{Minecraft Wiki|13w23b}}<br />
| 68<br />
| <br />
|-<br />
| {{Minecraft Wiki|13w23a}}<br />
|rowspan="4"| 67<br />
|rowspan="4"| <br />
|-<br />
| {{Minecraft Wiki|13w22a}}<br />
|-<br />
| {{Minecraft Wiki|13w21b}}<br />
|-<br />
| {{Minecraft Wiki|13w21a}}<br />
|-<br />
| {{Minecraft Wiki|13w19a}}<br />
| 66<br />
| <br />
|-<br />
| {{Minecraft Wiki|13w18c}}<br />
|rowspan="3"| 65<br />
|rowspan="3"|<br />
|-<br />
| {{Minecraft Wiki|13w18b}}<br />
|-<br />
| {{Minecraft Wiki|13w18a}}<br />
|-<br />
| {{Minecraft Wiki|13w17a}}<br />
| 64<br />
| <br />
|-<br />
| {{Minecraft Wiki|13w16b}}<br />
| 63<br />
| <br />
|-<br />
| {{Minecraft Wiki|13w16a}}<br />
| 62<br />
| <br />
|-<br />
| '''{{Minecraft Wiki|1.5.2}}'''<br />
| 61<br />
| <br />
|-<br />
| '''{{Minecraft Wiki|2.0}}''': Purple<br />
| 92<br />
|<br />
|-<br />
| '''{{Minecraft Wiki|2.0}}''': Red<br />
| 91<br />
|<br />
|-<br />
| '''{{Minecraft Wiki|2.0}}''': Blue<br />
| 90<br />
|<br />
|-<br />
| '''{{Minecraft Wiki|1.5.1}}'''<br />
|rowspan="7"| 60<br />
|rowspan="7"|<br />
|-<br />
| {{Minecraft Wiki|13w12~}}<br />
|-<br />
| {{Minecraft Wiki|13w11a}}<br />
|-<br />
| '''{{Minecraft Wiki|1.5}}'''<br />
|-<br />
| {{Minecraft Wiki|13w10b}}<br />
|-<br />
| {{Minecraft Wiki|13w10a}}<br />
|-<br />
| {{Minecraft Wiki|13w09c}}<br />
|-<br />
| {{Minecraft Wiki|13w09b}}<br />
|rowspan="2"| 59<br />
|rowspan="2"|<br />
|-<br />
| {{Minecraft Wiki|13w09a}}<br />
|-<br />
| {{Minecraft Wiki|13w07a}}<br />
|rowspan="2"| 58<br />
|rowspan="2"|<br />
|-<br />
| {{Minecraft Wiki|13w06a}}<br />
|-<br />
| {{Minecraft Wiki|13w05b}}<br />
| 57<br />
| <br />
|-<br />
| {{Minecraft Wiki|13w05a}}<br />
| 56<br />
| <br />
|-<br />
| {{Minecraft Wiki|13w04a}}<br />
| 55<br />
| <br />
|-<br />
| {{Minecraft Wiki|13w03a}}<br />
| 54<br />
| <br />
|-<br />
| {{Minecraft Wiki|13w02b}}<br />
|rowspan="2"| 53<br />
|rowspan="2"|<br />
|-<br />
| {{Minecraft Wiki|13w02a}}<br />
|-<br />
| {{Minecraft Wiki|13w01b}}<br />
|rowspan="2"| 52<br />
|rowspan="2"|<br />
|-<br />
| {{Minecraft Wiki|13w01a}}<br />
|-<br />
| '''{{Minecraft Wiki|1.4.7}}'''<br />
|rowspan="4"| 51<br />
|rowspan="4"| [{{canonicalurl:Protocol|oldid=1039}} page]<br />
|-<br />
| '''{{Minecraft Wiki|1.4.6}}'''<br />
|-<br />
| {{Minecraft Wiki|12w50b}}<br />
|-<br />
| {{Minecraft Wiki|12w50a}}<br />
|-<br />
| {{Minecraft Wiki|12w49a}}<br />
| 50<br />
| <br />
|-<br />
| '''{{Minecraft Wiki|1.4.5}}'''<br />
|rowspan="2"| 49<br />
|rowspan="2"| <br />
|-<br />
| '''{{Minecraft Wiki|1.4.4}}'''<br />
|-<br />
| {{Minecraft Wiki|1.4.3-pre}}<br />
| 48<br />
| <br />
|-<br />
| '''{{Minecraft Wiki|1.4.2}}'''<br />
| 47<br />
| <br />
|-<br />
| {{Minecraft Wiki|12w42b}}<br />
|rowspan="4"| 46<br />
|rowspan="4"|<br />
|-<br />
| {{Minecraft Wiki|12w42a}}<br />
|-<br />
| {{Minecraft Wiki|12w41b}}<br />
|-<br />
| {{Minecraft Wiki|12w41a}}<br />
|-<br />
| {{Minecraft Wiki|12w40b}}<br />
| 45<br />
| <br />
|-<br />
| {{Minecraft Wiki|12w40a}}<br />
| 44<br />
| <br />
|-<br />
| {{Minecraft Wiki|12w39b}}<br />
|rowspan="4"| 43<br />
|rowspan="4"|<br />
|-<br />
| {{Minecraft Wiki|12w39a}}<br />
|-<br />
| {{Minecraft Wiki|12w38b}}<br />
|-<br />
| {{Minecraft Wiki|12w38a}}<br />
|-<br />
| {{Minecraft Wiki|12w37a}}<br />
|rowspan="3"| 42<br />
|rowspan="3"|<br />
|-<br />
| {{Minecraft Wiki|12w36a}}<br />
|-<br />
| {{Minecraft Wiki|12w34b}}<br />
|-<br />
| {{Minecraft Wiki|12w34a}}<br />
| 41<br />
| <br />
|-<br />
| {{Minecraft Wiki|12w32a}}<br />
| 40<br />
| <br />
|-<br />
| '''{{Minecraft Wiki|1.3.2}}'''<br />
|rowspan="5"| 39<br />
|rowspan="5"| [{{canonicalurl:Protocol|oldid=980}} page]<br />
|-<br />
| '''{{Minecraft Wiki|1.3.1}}'''<br />
|-<br />
| {{Minecraft Wiki|12w30e}}<br />
|-<br />
| {{Minecraft Wiki|12w30d}}<br />
|-<br />
| {{Minecraft Wiki|12w30c}}<br />
|-<br />
| {{Minecraft Wiki|12w30b}}<br />
|rowspan="3"| 38<br />
|rowspan="3"|<br />
|-<br />
| {{Minecraft Wiki|12w30a}}<br />
|-<br />
| {{Minecraft Wiki|12w27a}}<br />
|-<br />
| {{Minecraft Wiki|12w26a}}<br />
|rowspan="2"| 37<br />
|rowspan="2"| <br />
|-<br />
| {{Minecraft Wiki|12w25a}}<br />
|-<br />
| {{Minecraft Wiki|12w24a}}<br />
| 36<br />
| <br />
|-<br />
| {{Minecraft Wiki|12w23b}}<br />
|rowspan="2"| 35<br />
|rowspan="2"|<br />
|-<br />
| {{Minecraft Wiki|12w23a}}<br />
|-<br />
| {{Minecraft Wiki|12w22a}}<br />
| 34<br />
| <br />
|-<br />
| {{Minecraft Wiki|12w21b}}<br />
|rowspan="2"| 33<br />
|rowspan="2"| <br />
|-<br />
| {{Minecraft Wiki|12w21a}}<br />
|-<br />
| {{Minecraft Wiki|12w19a}}<br />
|rowspan="2"| 32<br />
|rowspan="2"| <br />
|-<br />
| {{Minecraft Wiki|12w18a}}<br />
|-<br />
| {{Minecraft Wiki|12w17a}}<br />
| 31<br />
| <br />
|-<br />
| {{Minecraft Wiki|12w16a}}<br />
| 30<br />
| <br />
|-<br />
| {{Minecraft Wiki|12w15a}}<br />
|rowspan="3"| 29<br />
|rowspan="3"| [{{canonicalurl:Protocol|oldid=932}} page]<ref group="old note">This protocol has no encryption and a different handshake layout than the previous ones.</ref><br />
|-<br />
| '''{{Minecraft Wiki|1.2.5}}'''<br />
|-<br />
| '''{{Minecraft Wiki|1.2.4}}'''<br />
|-<br />
| '''{{Minecraft Wiki|1.2.3}}'''<br />
|rowspan="4"| 28<br />
|rowspan="4"| <br />
|-<br />
| '''{{Minecraft Wiki|1.2.2}}'''<br />
|-<br />
| '''{{Minecraft Wiki|1.2.1}}'''<br />
|-<br />
| {{Minecraft Wiki|12w08a}}<br />
|-<br />
| {{Minecraft Wiki|12w07b}}<br />
|rowspan="2"| 27<br />
|rowspan="2"|<br />
|-<br />
| {{Minecraft Wiki|12w07a}}<br />
|-<br />
| {{Minecraft Wiki|12w06a}}<br />
| 25<br />
| <br />
|-<br />
| {{Minecraft Wiki|12w05b}}<br />
|rowspan="4"|24<br />
|rowspan="4"|<br />
|-<br />
| {{Minecraft Wiki|12w05a}}<br />
|-<br />
| {{Minecraft Wiki|12w04a}}<br />
|-<br />
| {{Minecraft Wiki|12w03a}}<br />
|-<br />
| '''{{Minecraft Wiki|1.1}}'''<br />
| 23 <ref group="old note">This version is incompatible with 12w01a which also uses protocol 23, due to the removal of 0x1B.</ref><br />
| <br />
|-<br />
| {{Minecraft Wiki|12w01a}}<br />
| 23<br />
| <br />
|-<br />
| {{Minecraft Wiki|11w50a}}<br />
|rowspan=2|22 <ref group="old note">These versions are incompatible with the previous snapshots also using protocol 22, due to the additon of 0xFA Plugin Message.</ref><br />
|rowspan=2|<br />
|-<br />
| {{Minecraft Wiki|11w49a}}<br />
|-<br />
| {{Minecraft Wiki|11w48a}}<br />
|rowspan=4|22<br />
|rowspan=4|[{{canonicalurl:Protocol|oldid=689}} page]<br />
|-<br />
| {{Minecraft Wiki|11w47a}}<br />
|-<br />
| '''{{Minecraft Wiki|1.0.1}}'''<br />
|-<br />
| '''{{Minecraft Wiki|1.0.0}}'''<br />
|}<br />
<br />
=== Beta ===<br />
<br />
{| class="wikitable"<br />
|-<br />
! Release name<br />
! Version number<br />
! Last known documentation<br />
|-<br />
| {{Minecraft Wiki|1.0.0-RC2}}<br />
|rowspan=3|22<br />
|rowspan=3|See 1.0.0<br />
|-<br />
| {{Minecraft Wiki|1.0.0-RC1}}<br />
|-<br />
| {{Minecraft Wiki|Beta 1.9-pre6}}<br />
|-<br />
| {{Minecraft Wiki|Beta 1.9-pre5}}<br />
| 21<br />
| <br />
|-<br />
| {{Minecraft Wiki|Beta 1.9-pre4}}<br />
| 20<br />
| <br />
|-<br />
| {{Minecraft Wiki|Beta 1.9-pre3}}<br />
|rowspan="2"|19<br />
|rowspan="2"|<br />
|-<br />
| {{Minecraft Wiki|Beta 1.9-pre2}}<br />
|-<br />
| {{Minecraft Wiki|Beta 1.9-pre1}}<br />
| 18<br />
| <br />
|-<br />
| '''{{Minecraft Wiki|Beta 1.8.1}}'''<br />
|rowspan="2"|17<br />
|rowspan="2"| <br />
|-<br />
| '''{{Minecraft Wiki|Beta 1.8}}'''<br />
|-<br />
| {{Minecraft Wiki|Beta 1.8-pre2}}<br />
| 16<br />
| <br />
|-<br />
| {{Minecraft Wiki|Beta 1.8-pre1}}<br />
| 15<br />
| <br />
|-<br />
| '''{{Minecraft Wiki|Beta 1.7.3}}'''<br />
|rowspan="4"|14<br />
|rowspan="4"|<br />
|-<br />
| '''{{Minecraft Wiki|Beta 1.7.2}}'''<br />
|-<br />
| '''{{Minecraft Wiki|Beta 1.7.1}}'''<br />
|-<br />
| '''{{Minecraft Wiki|Beta 1.7}}'''<br />
|-<br />
| '''{{Minecraft Wiki|Beta 1.6.6}}'''<br />
|rowspan="7"|13<br />
|rowspan="7"|<br />
|-<br />
| '''{{Minecraft Wiki|Beta 1.6.5}}'''<br />
|-<br />
| '''{{Minecraft Wiki|Beta 1.6.4}}'''<br />
|-<br />
| '''{{Minecraft Wiki|Beta 1.6.3}}'''<br />
|-<br />
| '''{{Minecraft Wiki|Beta 1.6.2}}'''<br />
|-<br />
| '''{{Minecraft Wiki|Beta 1.6.1}}'''<br />
|-<br />
| '''{{Minecraft Wiki|Beta 1.6}}'''<br />
|-<br />
| {{Minecraft Wiki|Beta 1.6 Test Build 3}}<br />
| 12<br />
| <ref group="old note">This version was never publicly released, but is found lurking on the old update site. It's equivalent to beta 1.6 in terms of protocol. Curiously, it has a unique protocol version.</ref><br />
|-<br />
| '''{{Minecraft Wiki|Beta 1.5_02}}'''<br />
|rowspan="3"| 11<br />
|<ref group="old note">Beta 1.5_02 was a server-only update.</ref><br />
|-<br />
| '''{{Minecraft Wiki|Beta 1.5_01}}'''<br />
|rowspan="2"|<br />
|-<br />
| '''{{Minecraft Wiki|Beta 1.5}}'''<br />
|-<br />
| '''{{Minecraft Wiki|Beta 1.4_01}}'''<br />
|rowspan="2"| 10<br />
|rowspan="2"|<br />
|-<br />
| '''{{Minecraft Wiki|Beta 1.4}}'''<br />
|-<br />
| '''{{Minecraft Wiki|Beta 1.3_01}}'''<br />
|rowspan="2"| 9<br />
|rowspan="2"|<br />
|-<br />
| '''{{Minecraft Wiki|Beta 1.3}}'''<br />
|-<br />
| '''{{Minecraft Wiki|Beta 1.2_02}}'''<br />
|rowspan="4"| 8<br />
|rowspan="4"|<br />
|-<br />
| '''{{Minecraft Wiki|Beta 1.2_01}}'''<br />
|-<br />
| '''{{Minecraft Wiki|Beta 1.2}}'''<br />
|-<br />
| '''{{Minecraft Wiki|Beta 1.1_02}}'''<br />
|-<br />
| '''{{Minecraft Wiki|Beta 1.1_01}}'''<br />
|rowspan="2"| 7<br />
|rowspan="2"|<br />
|-<br />
| '''{{Minecraft Wiki|Beta 1.1}}'''<br />
|-<br />
| '''{{Minecraft Wiki|Beta 1.0_02}}'''<br />
|rowspan="3"| 7<br />
|rowspan="3"|<br />
|-<br />
| '''{{Minecraft Wiki|Beta 1.0_01}}'''<br />
|-<br />
| '''{{Minecraft Wiki|Beta 1.0}}'''<br />
|}<br />
<br />
=== Alpha ===<br />
<br />
Note: the position of alpha servers with relation to clients is mostly guesswork partially based on timestamps, and shouldn't be treated as an exact record of when things were released publicly.<br />
<br />
{| class="wikitable"<br />
|-<br />
! Release name<br />
! Version number<br />
! Last known documentation<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.2.6}}'''<br />
|rowspan="9"| 6<br />
|rowspan="8"|<br />
|-<br />
| Alpha server 0.2.8<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.2.5}}'''<br />
|-<br />
| Alpha server 0.2.7<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.2.4_01}}'''<br />
|-<br />
| Alpha server 0.2.6_02<br />
|-<br />
| Alpha server 0.2.6_01<br />
|-<br />
| Alpha server 0.2.6<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.2.3_05}}'''<br />
| <ref group="old note">Alpha 1.2.3_05 is actually the first release of Alpha 1.2.4.</ref><br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.2.3_04}}'''<br />
|rowspan="7"| 5<br />
|rowspan="7"|<br />
|-<br />
| Alpha server 0.2.5_02<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.2.3_02}}'''<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.2.3_01}}'''<br />
|-<br />
| Alpha server 0.2.5_01<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.2.3}}'''<br />
|-<br />
| Alpha server 0.2.5<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.2.2}}'''<br />
|rowspan="2"| 4<br />
|rowspan="2"|<br />
|-<br />
| Alpha server 0.2.4<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.2.1_01}}'''<br />
|rowspan="2"| 3<br />
|rowspan="2"|<br />
|-<br />
| Alpha server 0.2.3<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.2.1}}'''<br />
| {{Unknown|Unknown (3?)}}<br />
|<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.2.0_02}}'''<br />
|rowspan="5"| 3<br />
|rowspan="5"|<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.2.0_01}}'''<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.2.0}}'''<br />
|-<br />
| Alpha server 0.2.2_01<br />
|-<br />
| Alpha server 0.2.2<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.1.2_01}}'''<br />
|rowspan="3"| 2<br />
|rowspan="3"|<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.1.2}}'''<br />
|-<br />
| Alpha server 0.2.1<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.1.1}}'''<br />
| {{Unknown|Unknown (2?)}}<br />
|<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.1.0}}'''<br />
|rowspan="4"| 2<br />
|rowspan="4"|<br />
|-<br />
| Alpha server 0.2.1<br />
|-<br />
| Alpha server 0.2.0_01<br />
|-<br />
| Alpha server 0.2.0<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.0.17_04}}'''<br />
|rowspan="4"| 1<br />
|rowspan="4"|<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.0.17_03}}'''<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.0.17_02}}'''<br />
|-<br />
| Alpha server 0.1.4<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.0.17_01}}'''<br />
|rowspan="2" {{Unknown|Unknown (1?)}}<br />
|rowspan="2"|<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.0.17}}'''<br />
|-<br />
| Alpha server 0.1.3<br />
|rowspan="5"|14<br />
|rowspan="5"|<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.0.16_02}}'''<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.0.16_01}}'''<br />
|-<br />
| Alpha server 0.1.2_01<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.0.16}}'''<br />
|-<br />
| Alpha server 0.1.0<br />
|rowspan="2"|13<br />
|<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.0.15}}'''<br />
| <ref group="old note">1.0.15 is the first version publicly supporting SMP</ref><br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.0.14}}'''<br />
|rowspan="3"| 12<br />
|rowspan="6"| <ref group="old note">These versions have a multiplayer button, but a specific server is hardcoded.</ref><br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.0.13_01}}'''<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.0.13}}'''<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.0.12}}'''<br />
| 11<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.0.11}}'''<br />
|rowspan="4"| 10<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.0.10}}'''<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.0.9}}'''<br />
|rowspan="10"| <ref group="old note">These versions have multiplayer code, but no multiplayer interface.</ref><br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.0.8_01}}'''<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.0.8}}'''<br />
| {{Unknown|Unknown (10?)}}<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.0.7}}'''<br />
|rowspan="2"| 10<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.0.6_03}}'''<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.0.6_02}}'''<br />
|{{Unknown|Unknown (10?)}}<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.0.6_01}}'''<br />
|rowspan="4"| 10<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.0.6}}'''<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.0.5_01}}'''<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.0.5}}'''<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.0.4}}'''<br />
|rowspan="8" {{No|Multiplayer did not exist at this time}}<br />
|rowspan="8" |<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.0.3}}'''<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.0.2_02}}'''<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.0.2_01}}'''<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.0.2}}'''<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.0.1_01}}'''<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.0.1}}'''<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.0.0}}'''<br />
|}<br />
<br />
=== Classic ===<br />
<br />
{| class="wikitable"<br />
|-<br />
! Release name<br />
! Version number<br />
! Last known documentation<br />
|-<br />
| c0.30-3<br />
|rowspan="5"| 7<br />
|rowspan="5"| [[Classic Protocol|page]]<br />
|-<br />
| c0.30-2<br />
|-<br />
| c0.30-1<br />
|-<br />
| c0.29_02<br />
|-<br />
| c0.29_01<br />
|-<br />
| c0.29<br />
|rowspan="1" {{Unknown|Unknown (7?)}}<br />
|rowspan="1" |<br />
|-<br />
| c0.28_01<br />
| 7<br />
|<br />
|-<br />
| c0.28<br />
| {{Unknown|Unknown (7?)}}<br />
|<br />
|-<br />
| c0.27_st_c<br />
|rowspan="2" {{Unknown|Unknown (6?)}}<br />
|rowspan="2" |<br />
|-<br />
| c0.27_st_b<br />
|-<br />
| c0.27_st_a<br />
| 6<br />
|<br />
|-<br />
| c0.26_st_g<br />
|rowspan="7" {{Unknown|Unknown (6?)}}<br />
|rowspan="7" |<br />
|-<br />
| c0.26_st_f<br />
|-<br />
| c0.26_st_e<br />
|-<br />
| c0.26_st_d<br />
|-<br />
| c0.26_st_c<br />
|-<br />
| c0.26_st_b<br />
|-<br />
| c0.26_st_a<br />
|-<br />
| c0.25_05_st<br />
| 6<br />
|-<br />
| c0.25_04_st<br />
|rowspan="6" {{Unknown|Unknown (6?)}}<br />
|rowspan="6" |<br />
|-<br />
| c0.25_03_st<br />
|-<br />
| c0.25_02_st<br />
|-<br />
| c0.25_01_st<br />
|-<br />
| c0.25_st<br />
|-<br />
| c0.24_st_d<br />
|-<br />
| c0.24_st_c<br />
| 6<br />
|-<br />
| c0.24_st_b<br />
|rowspan="10" {{Unknown|Unknown (6?)}}<br />
|rowspan="10" |<br />
|-<br />
| c0.24_st_a<br />
|-<br />
| c0.24_07<br />
|-<br />
| c0.24_06<br />
|-<br />
| c0.24_05<br />
|-<br />
| c0.24_04<br />
|-<br />
| c0.24_03<br />
|-<br />
| c0.24_02<br />
|-<br />
| c0.24_01<br />
|-<br />
| c0.24<br />
<!-- There is a version of this, but it is definitely tampered with; it has protocol 7 strangely but probably because it was modified from a newer version --><br />
|-<br />
| c0.0.23a_01<br />
| 6<br />
|<br />
|-<br />
| c0.0.23a<br />
| {{Unknown|Unknown (6?)}}<br />
|<br />
|-<br />
| c0.0.22a_05<br />
| 6<br />
|<br />
|-<br />
| c0.0.22a_04<br />
|rowspan="6" {{Unknown|Unknown (6?)}}<br />
|rowspan="6"|<br />
|-<br />
| c0.0.22a_03<br />
|-<br />
| c0.0.22a_02<br />
|-<br />
| c0.0.22a_01<br />
|-<br />
| c0.0.22a<br />
|-<br />
| c0.0.21a_01<br />
|-<br />
| c0.0.21a<br />
| 6<br />
|<br />
|-<br />
| c0.0.20a_02<br />
|rowspan="16" {{Unknown}}<br />
|rowspan="16" |<br />
|-<br />
| c0.0.20a_01<br />
|-<br />
| c0.0.20a<br />
|-<br />
| c0.0.19a_06<br />
|-<br />
| c0.0.19a_05<br />
|-<br />
| c0.0.19a_04<br />
|-<br />
| c0.0.19a_03<br />
|-<br />
| c0.0.19a_02<br />
|-<br />
| c0.0.19a_01<br />
|-<br />
| c0.0.19a<br />
|-<br />
| c0.0.18a_02<br />
|-<br />
| c0.0.18a_01<br />
|-<br />
| c0.0.18a<br />
|-<br />
| c0.0.17a_02<br />
|-<br />
| c0.0.17a_01<br />
|-<br />
| c0.0.17a<br />
|-<br />
| c0.0.16a_02<br />
| 3<br />
|<br />
|-<br />
| c0.0.16a_01<br />
| rowspan="4" {{Unknown}}<br />
| rowspan="4" |<br />
|-<br />
| c0.0.16a<br />
|-<br />
| c0.0.15a-3<br />
|-<br />
| c0.0.15a-2<br />
|-<br />
| c0.0.15a-1<br />
| None<ref group="old note">The Player Identification packet is only a single string, and does not include a version number.</ref><br />
|<br />
|-<br />
| c0.0.14a_08<br />
| rowspan="23" {{No|Multiplayer did not exist at this time}}<br />
| rowspan="23" |<br />
|-<br />
| c0.0.14a_07<br />
|-<br />
| c0.0.14a_06<br />
|-<br />
| c0.0.14a_05<br />
|-<br />
| c0.0.14a_04<br />
|-<br />
| c0.0.14a_03<br />
|-<br />
| c0.0.14a_02<br />
|-<br />
| c0.0.14a_01<br />
|-<br />
| c0.0.14a<br />
|-<br />
| c0.0.13a_04<br />
|-<br />
| c0.0.13a_03<br />
|-<br />
| c0.0.13a_02<br />
|-<br />
| c0.0.13a_01<br />
|-<br />
| c0.0.13a<br />
|-<br />
| c0.0.12a_03<br />
|-<br />
| c0.0.12a_02<br />
|-<br />
| c0.0.12a_01<br />
|-<br />
| c0.0.12a<br />
|-<br />
| c0.0.11a<br />
|-<br />
| c0.0.10a<br />
|-<br />
| c0.0.9a<br />
|-<br />
| c0.0.3a<br />
|-<br />
| c0.0.2a<br />
|}<br />
<br />
=== Notes ===<br />
<br />
<references group="old note" /><br />
<br />
[[Category:Minecraft Modern]]</div>Orladoghttps://wiki.vg/index.php?title=Protocol_version_numbers&diff=15873Protocol version numbers2020-06-23T15:15:13Z<p>Orladog: Add 1.16</p>
<hr />
<div>This page lists the protocol version numbers used in the various MC releases. Official releases are marked bold, weekly snapshots are in regular font.<br />
<br />
The 1.7 release has seen a complete rewrite of the network protocol (using Netty), including the version numbers. The protocol numbers have been reset. This page contains version numbers for both the pre-Netty and post-Netty protocol versions.<br />
<br />
A list of packet IDs and names per linked protocol version on this page is available [https://github.com/ammaraskar/MinecraftPacketNames/blob/master/packets.json here.]<br />
<br />
== Versions after the Netty rewrite ==<br />
<br />
Beginning with the 1.7.1 pre-release (and release 1.7.2), versioning was reset. <!-- For copy-paste convenience: {{subst:REVISIONID: Pre-release protocol}} --><br />
<br />
{| class="wikitable"<br />
|-<br />
! Release name<br />
! Version number<br />
! Last known documentation<br />
{{/Entry|1.16|735||snap=1}}<br />
{{/Entry|1.16-rc1|734|cur|snap=1}}<br />
{{/Entry|1.16-pre8|733|15861|snap=1}}<br />
{{/Entry|1.16-pre7|732|15857|snap=1}}<br />
{{/Entry|1.16-pre6|730|15854|snap=1}}<br />
{{/Entry|1.16-pre5|729|15847|snap=1}}<br />
{{/Entry|1.16-pre4|727|15843|snap=1}}<br />
{{/Entry|1.16-pre3|725|15839|snap=1}}<br />
{{/Entry|1.16-pre2|722|15831|snap=1}}<br />
{{/Entry|1.16-pre1|721|15831|snap=1}}<br />
{{/Entry|20w22a|719|15710|snap=1}}<br />
{{/Entry|20w21a|718|15661|snap=1}}<br />
{{/Entry|20w20b|717|15646|snap=1}}<br />
{{/Entry|20w20a|716|15643|snap=1}}<br />
{{/Entry|20w19a|715|15588|snap=1}}<br />
{{/Entry|20w18a|714|15577|snap=1}}<br />
{{/Entry|20w17a|713|15551|snap=1}}<br />
{{/Entry|20w16a|712|15536|snap=1}}<br />
{{/Entry|20w15a|711|15514|snap=1}}<br />
{{/Entry|20w14a|710|15452|snap=1}}<br />
|-<br />
| {{Minecraft Wiki|20w14∞}} || 709 || <ref group="note">April fools snapshot.</ref><br />
{{/Entry|20w13b|709|15392|snap=1}}<br />
{{/Entry|20w13a|708|15382|snap=1}}<br />
{{/Entry|20w12a|707|15368|snap=1}}<br />
{{/Entry|20w11a|706|15336|snap=1}}<br />
{{/Entry|20w10a|705|15326|snap=1}}<br />
{{/Entry|20w09a|704|15310|snap=1}}<br />
{{/Entry|20w08a|703|15306|snap=1}}<br />
{{/Entry|20w07a|702|15304|snap=1}}<br />
{{/Entry|20w06a|701|15295|snap=1}}<br />
{{/Entry|1.15.2|578|cur}}<br />
{{/Entry|1.15.2-pre2|577|15258|snap=1}}<br />
{{/Entry|1.15.2-pre1|576|15256|snap=1}}<br />
{{/Entry|1.15.1|575|15241|pre_release_doc=1}}<br />
{{/Entry|1.15.1-pre1|574|15183|snap=1}}<br />
{{/Entry|1.15|573|15173|pre_release_doc=1}}<br />
{{/Entry|1.15-pre7|572|15164|snap=1}}<br />
{{/Entry|1.15-pre6|571|15158|snap=1}}<br />
{{/Entry|1.15-pre5|570|15149|snap=1}}<br />
{{/Entry|1.15-pre4|569|15140|snap=1}}<br />
{{/Entry|1.15-pre3|567|15122|snap=1}}<br />
{{/Entry|1.15-pre2|566|15111|snap=1}}<br />
{{/Entry|1.15-pre1|565|15101|snap=1}}<br />
{{/Entry|19w46b|564|15073|snap=1}}<br />
{{/Entry|19w46a|563|15070|snap=1}}<br />
{{/Entry|19w45b|562|15056|snap=1}}<br />
{{/Entry|19w45a|561|15054|snap=1}}<br />
{{/Entry|19w44a|560|15050|snap=1}}<br />
{{/Entry|19w42a|559|15044|snap=1}}<br />
{{/Entry|19w41a|558|15032|snap=1}}<br />
{{/Entry|19w40a|557|15013|snap=1}}<br />
{{/Entry|19w39a|556|14987|snap=1}}<br />
{{/Entry|19w38b|555|14971|snap=1}}<br />
{{/Entry|19w38a|554|snap=1}}<br />
{{/Entry|19w37a|553|snap=1}}<br />
{{/Entry|19w36a|552|14970|snap=1}}<br />
{{/Entry|19w35a|551|14969|snap=1}}<br />
{{/Entry|19w34a|550|14968|snap=1}}<br />
{{/Entry|1.14.4|498|15346}}<br />
{{/Entry|1.14.4-pre7|497|14868|snap=1}}<br />
{{/Entry|1.14.4-pre6|496|14864|snap=1}}<br />
{{/Entry|1.14.4-pre5|495|14862|snap=1}}<br />
{{/Entry|1.14.4-pre4|494|14856|snap=1}}<br />
{{/Entry|1.14.4-pre3|493|14849|snap=1}}<br />
{{/Entry|1.14.4-pre2|492|14837|snap=1}}<br />
{{/Entry|1.14.4-pre1|491|14835|snap=1}}<br />
{{/Entry|1.14.3|490|14826|pre_release_doc=1}}<br />
{{/Entry|1.14.3 - Combat Test|500|snap=1}}<br />
{{/Entry|1.14.3-pre4|489|14824|snap=1}}<br />
{{/Entry|1.14.3-pre3|488|14820|snap=1}}<br />
{{/Entry|1.14.3-pre2|487|14816|snap=1}}<br />
{{/Entry|1.14.3-pre1|486|14806|snap=1}}<br />
{{/Entry|1.14.2|485|14794|pre_release_doc=1}}<br />
{{/Entry|1.14.2-pre4|484|14788|snap=1}}<br />
{{/Entry|1.14.2-pre3|483|14785|snap=1}}<br />
{{/Entry|1.14.2-pre2|482|14779|snap=1}}<br />
{{/Entry|1.14.2-pre1|481|14772|snap=1}}<br />
{{/Entry|1.14.1|480|14770|pre_release_doc=1}}<br />
{{/Entry|1.14.1-pre2|479|14762|snap=1}}<br />
{{/Entry|1.14.1-pre1|478|14757|snap=1}}<br />
{{/Entry|1.14|477|14752|pre_release_doc=1}}<br />
{{/Entry|1.14-pre5|476|14697|snap=1}}<br />
{{/Entry|1.14-pre4|475|14695|snap=1}}<br />
{{/Entry|1.14-pre3|474|14691|snap=1}}<br />
{{/Entry|1.14-pre2|473|14687|snap=1}}<br />
{{/Entry|1.14-pre1|472|14683|snap=1}}<br />
{{/Entry|19w14b|471|14670|snap=1}}<br />
{{/Entry|19w14a|470|14649|snap=1}}<br />
{{/Entry|19w13b|469|14642|snap=1}}<br />
{{/Entry|19w13a|468|14639|snap=1}}<br />
{{/Entry|19w12b|467|14627|snap=1}}<br />
{{/Entry|19w12a|466|14625|snap=1}}<br />
{{/Entry|19w11b|465|14613|snap=1}}<br />
{{/Entry|19w11a|464|14607|snap=1}}<br />
{{/Entry|19w09a|463|14591|snap=1}}<br />
{{/Entry|19w08b|462|14586|snap=1}}<br />
{{/Entry|19w08a|461|14585|snap=1}}<br />
{{/Entry|19w07a|460|14575|snap=1}}<br />
{{/Entry|19w06a|459|14562|snap=1}}<br />
{{/Entry|19w05a|458|14555|snap=1}}<br />
{{/Entry|19w04b|457|14550|snap=1}}<br />
{{/Entry|19w04a|456|14548|snap=1}}<br />
{{/Entry|19w03c|455|14544|snap=1}}<br />
{{/Entry|19w03b|454|14536|snap=1}}<br />
{{/Entry|19w03a|453|14530|snap=1}}<br />
{{/Entry|19w02a|452|14515|snap=1}}<br />
{{/Entry|18w50a|451|14491|snap=1}}<br />
{{/Entry|18w49a|450|14467|snap=1}}<br />
{{/Entry|18w48b|449|14461|snap=1}}<br />
{{/Entry|18w48a|448|14459|snap=1}}<br />
{{/Entry|18w47b|447|14452|snap=1}}<br />
{{/Entry|18w47a|446|14449|snap=1}}<br />
{{/Entry|18w46a|445|14441|snap=1}}<br />
{{/Entry|18w45a|444|14418|snap=1}}<br />
{{/Entry|18w44a|443|14414|snap=1}}<br />
{{/Entry|18w43c|442|14397|snap=1}}<br />
{{/Entry|18w43b|441|14381|snap=1}}<br />
{{/Entry|18w43a|441|snap=1}}<br />
{{/Entry|1.13.2|404|14889}} ([{{canonicalurl:Plugin channels|oldid=14658}} Plugin channels])<br />
{{/Entry|1.13.2-pre2|403|14359|snap=1}}<br />
{{/Entry|1.13.2-pre1|402|14357|snap=1}}<br />
{{/Entry|1.13.1|401|14301}}<br />
{{/Entry|1.13.1-pre2|400|14261|snap=1}}<br />
{{/Entry|1.13.1-pre1|399|14255|snap=1}}<br />
{{/Entry|18w33a|398|14252|snap=1}}<br />
{{/Entry|18w32a|397|14247|snap=1}}<br />
{{/Entry|18w31a|396|14196|snap=1}}<br />
{{/Entry|18w30b|395|14189|snap=1}}<br />
{{/Entry|18w30a|394|14158|snap=1}}<br />
{{/Entry|1.13|393|14150|pre_release_doc=1}}<br />
{{/Entry|1.13-pre10|392|14126|snap=1}}<br />
{{/Entry|1.13-pre9|391|14124|snap=1}}<br />
{{/Entry|1.13-pre8|390|14117|snap=1}}<br />
{{/Entry|1.13-pre7|389|14107|snap=1}}<br />
{{/Entry|1.13-pre6|388|14095|snap=1}}<br />
{{/Entry|1.13-pre5|387|14088|snap=1}}<br />
{{/Entry|1.13-pre4|386|14072|snap=1}}<br />
{{/Entry|1.13-pre3|385|14045|snap=1}}<br />
{{/Entry|1.13-pre2|384|14030|snap=1}}<br />
{{/Entry|1.13-pre1|383|13984|snap=1}}<br />
{{/Entry|18w22c|382|13965|snap=1}}<br />
{{/Entry|18w22b|381|13951|snap=1}}<br />
{{/Entry|18w22a|380|13947|snap=1}}<br />
{{/Entry|18w21b|379|13932|snap=1}}<br />
{{/Entry|18w21a|378|13926|snap=1}}<br />
{{/Entry|18w20c|377|13923|snap=1}}<br />
{{/Entry|18w20b|376|13913|snap=1}}<br />
{{/Entry|18w20a|375|13910|snap=1}}<br />
{{/Entry|18w19b|374|13905|snap=1}}<br />
{{/Entry|18w19a|373|13896|snap=1}}<br />
{{/Entry|18w16a|372|13891|snap=1}}<br />
{{/Entry|18w15a|371|13824|snap=1}}<br />
{{/Entry|18w14b|370|13744|snap=1}}<br />
{{/Entry|18w14a|369|13741|snap=1}}<br />
{{/Entry|18w11a|368|13724|snap=1}}<br />
{{/Entry|18w10d|367|13702|snap=1}}<br />
{{/Entry|18w10c|366|13699|snap=1}}<br />
{{/Entry|18w10b|365|13693|snap=1}}<br />
{{/Entry|18w10a|364|13692|snap=1}}<br />
{{/Entry|18w09a|363|13671|snap=1}}<br />
{{/Entry|18w08b|362|13666|snap=1}}<br />
{{/Entry|18w08a|361|13662|snap=1}}<br />
{{/Entry|18w07c|360|13658|snap=1}}<br />
{{/Entry|18w07b|359|13653|snap=1}}<br />
{{/Entry|18w07a|358|13648|snap=1}}<br />
{{/Entry|18w06a|357|13636|snap=1}}<br />
{{/Entry|18w05a|356|13628|snap=1}}<br />
{{/Entry|18w03b|355|13623|snap=1}}<br />
{{/Entry|18w03a|354|snap=1}}<br />
{{/Entry|18w02a|353|13611|snap=1}}<br />
{{/Entry|18w01a|352|13576|snap=1}}<br />
{{/Entry|17w50a|351|13556|snap=1}}<br />
{{/Entry|17w49b|350|13524|snap=1}}<br />
{{/Entry|17w49a|349|13516|snap=1}}<br />
{{/Entry|17w48a|348|13512|snap=1}}<br />
{{/Entry|17w47b|347|13487|snap=1}}<br />
{{/Entry|17w47a|346|13476|snap=1}}<br />
{{/Entry|17w46a|345|13472|snap=1}}<br />
{{/Entry|17w45b|344|13414|snap=1}}<br />
{{/Entry|17w45a|343|13413|snap=1}}<br />
{{/Entry|17w43b|342|13398|snap=1}}<br />
{{/Entry|17w43a|341|13396|snap=1}}<br />
|-<br />
| '''{{Minecraft Wiki|1.12.2}}'''<br />
| 340<br />
| [{{canonicalurl:Protocol|oldid=14204}} page]<br />
{{Warning|<abbr title{{=}}"Note that this permalink links to and embeds content from the current versions of the articles. Use the following links for accurate information instead.">Hover for warning</abbr>}}<br />
<br />
* [{{canonicalurl:Data types|oldid=14256}} Data types]<br />
* [{{canonicalurl:Slot Data|oldid=7835}} Slot Data]<br />
* [{{canonicalurl:Chunk Format|oldid=14135}} Chunk Format]<br />
* [{{canonicalurl:Entity metadata|oldid=14048}} Entity metadata]<br />
* [{{canonicalurl:Entity statuses|14009}} Entity statuses]<br />
* [{{canonicalurl:Object Data|oldid=8314}} Object Data]<br />
* [{{canonicalurl:Block Actions|oldid=12934}} Block Actions]<br />
* [{{canonicalurl:Plugin channels|oldid=14089}} Plugin channels]<br />
|-<br />
| {{Minecraft Wiki|1.12.2-pre2}}<br />
|rowspan="2"| 339<br />
|rowspan="2"| [{{canonicalurl:Pre-release protocol|oldid=13355}} page]<br />
|-<br />
| {{Minecraft Wiki|1.12.2-pre1}}<br />
|-<br />
| '''{{Minecraft Wiki|1.12.1}}'''<br />
| 338<br />
| [{{canonicalurl:Protocol|oldid=13339}} page]<br />
|-<br />
| {{Minecraft Wiki|1.12.1-pre1}}<br />
| 337<br />
| [{{canonicalurl:Pre-release protocol|oldid=13267}} page]<br />
|-<br />
| {{Minecraft Wiki|17w31a}}<br />
| 336<br />
| [{{canonicalurl:Pre-release protocol|oldid=13265}} page]<br />
|-<br />
| '''{{Minecraft Wiki|1.12}}'''<br />
| 335<br />
| [{{canonicalurl:Protocol|oldid=13223}} page]<br />
|-<br />
| {{Minecraft Wiki|1.12-pre7}}<br />
| 334<br />
| [{{canonicalurl:Pre-release protocol|oldid=12918}} page]<br />
|-<br />
| {{Minecraft Wiki|1.12-pre6}}<br />
| 333<br />
| [{{canonicalurl:Pre-release protocol|oldid=12909}} page]<br />
|-<br />
| {{Minecraft Wiki|1.12-pre5}}<br />
| 332<br />
| [{{canonicalurl:Pre-release protocol|oldid=10809}} page]<br />
|-<br />
| {{Minecraft Wiki|1.12-pre4}}<br />
| 331<br />
| [{{canonicalurl:Pre-release protocol|oldid=10804}} page]<br />
|-<br />
| {{Minecraft Wiki|1.12-pre3}}<br />
| 330<br />
| [{{canonicalurl:Pre-release protocol|oldid=10803}} page]<br />
|-<br />
| {{Minecraft Wiki|1.12-pre2}}<br />
| 329<br />
| [{{canonicalurl:Pre-release protocol|oldid=10418}} page]<br />
|-<br />
| {{Minecraft Wiki|1.12-pre1}}<br />
| 328<br />
| [{{canonicalurl:Pre-release protocol|oldid=9819}} page]<br />
|-<br />
| {{Minecraft Wiki|17w18b}}<br />
| 327<br />
| [{{canonicalurl:Pre-release protocol|oldid=8548}} page]<br />
|-<br />
| {{Minecraft Wiki|17w18a}}<br />
| 326<br />
| [{{canonicalurl:Pre-release protocol|oldid=8546}} page]<br />
|-<br />
| {{Minecraft Wiki|17w17b}}<br />
| 325<br />
| [{{canonicalurl:Pre-release protocol|oldid=8536}} page]<br />
|-<br />
| {{Minecraft Wiki|17w17a}}<br />
| 324<br />
| [{{canonicalurl:Pre-release protocol|oldid=8528}} page]<br />
|-<br />
| {{Minecraft Wiki|17w16b}}<br />
| 323<br />
| [{{canonicalurl:Pre-release protocol|oldid=8519}} page]<br />
|-<br />
| {{Minecraft Wiki|17w16a}}<br />
| 322<br />
| [{{canonicalurl:Pre-release protocol|oldid=8515}} page]<br />
|-<br />
| {{Minecraft Wiki|17w15a}}<br />
| 321<br />
| [{{canonicalurl:Pre-release protocol|oldid=8499}} page]<br />
|-<br />
| {{Minecraft Wiki|17w14a}}<br />
| 320<br />
| [{{canonicalurl:Pre-release protocol|oldid=8490}} page]<br />
|-<br />
| {{Minecraft Wiki|17w13b}}<br />
| 319<br />
| [{{canonicalurl:Pre-release protocol|oldid=8475}} page]<br />
|-<br />
| {{Minecraft Wiki|17w13a}}<br />
| 318<br />
| [{{canonicalurl:Pre-release protocol|oldid=8454}} page]<br />
|-<br />
| {{Minecraft Wiki|17w06a}}<br />
| 317<br />
| [{{canonicalurl:Pre-release protocol|oldid=8414}} page]<br />
|-<br />
| '''{{Minecraft Wiki|1.11.2}}'''<br />
|rowspan="3"| 316<br />
|rowspan="3"| [{{canonicalurl:Protocol|oldid=8543}} page]<br />
|-<br />
| '''{{Minecraft Wiki|1.11.1}}'''<br />
|-<br />
| {{Minecraft Wiki|16w50a}}<br />
|-<br />
| '''{{Minecraft Wiki|1.11}}'''<br />
| 315<br />
| [{{canonicalurl:Protocol|oldid=8405}} page]<br />
|-<br />
| {{Minecraft Wiki|1.11-pre1}}<br />
| 314<br />
| [{{canonicalurl:Pre-release protocol|oldid=8249}} page]<br />
|-<br />
| {{Minecraft Wiki|16w44a}}<br />
|rowspan="2"| 313<br />
|rowspan="2"| [{{canonicalurl:Pre-release protocol|oldid=8246}} page]<br />
|-<br />
| {{Minecraft Wiki|16w43a}}<br />
|-<br />
| {{Minecraft Wiki|16w42a}}<br />
| 312<br />
| [{{canonicalurl:Pre-release protocol|oldid=8225}} page]<br />
|-<br />
| {{Minecraft Wiki|16w41a}}<br />
| 311<br />
| [{{canonicalurl:Pre-release protocol|oldid=8218}} page]<br />
|-<br />
| {{Minecraft Wiki|16w40a}}<br />
| 310<br />
| [{{canonicalurl:Pre-release protocol|oldid=8204}} page]<br />
|-<br />
| {{Minecraft Wiki|16w39c}}<br />
| 309<br />
| [{{canonicalurl:Pre-release protocol|oldid=8177}} page]<br />
|-<br />
| {{Minecraft Wiki|16w39b}}<br />
| 308<br />
| [{{canonicalurl:Pre-release protocol|oldid=8149}} page]<br />
|-<br />
| {{Minecraft Wiki|16w39a}}<br />
| 307<br />
| [{{canonicalurl:Pre-release protocol|oldid=8141}} page]<br />
|-<br />
| {{Minecraft Wiki|16w38a}}<br />
| 306<br />
| [{{canonicalurl:Pre-release protocol|oldid=8118}} page]<br />
|-<br />
| {{Minecraft Wiki|16w36a}}<br />
| 305<br />
| [{{canonicalurl:Pre-release protocol|oldid=8099}} page]<br />
|-<br />
| {{Minecraft Wiki|16w35a}}<br />
| 304<br />
| [{{canonicalurl:Pre-release protocol|oldid=8094}} page]<br />
|-<br />
| {{Minecraft Wiki|16w33a}}<br />
| 303<br />
| [{{canonicalurl:Pre-release protocol|oldid=8084}} page]<br />
|-<br />
| {{Minecraft Wiki|16w32b}}<br />
| 302<br />
| [{{canonicalurl:Pre-release protocol|oldid=8063}} page]<br />
|-<br />
| {{Minecraft Wiki|16w32a}}<br />
| 301<br />
| [{{canonicalurl:Pre-release protocol|oldid=8062}} page]<br />
|-<br />
| '''{{Minecraft Wiki|1.10.2}}'''<br />
|rowspan="3"| 210<br />
|rowspan="3"| [{{canonicalurl:Protocol|oldid=8235}} page]<br />
|-<br />
| '''{{Minecraft Wiki|1.10.1}}'''<br />
|-<br />
| '''{{Minecraft Wiki|1.10}}'''<br />
|-<br />
| {{Minecraft Wiki|1.10-pre2}}<br />
| 205<br />
| [{{canonicalurl:Pre-release protocol|oldid=7961}} page]<br />
|-<br />
| {{Minecraft Wiki|1.10-pre1}}<br />
| 204<br />
| [{{canonicalurl:Pre-release protocol|oldid=7950}} page]<br />
|-<br />
| {{Minecraft Wiki|16w21b}}<br />
| 203<br />
| [{{canonicalurl:Pre-release protocol|oldid=7890}} page]<br />
|-<br />
| {{Minecraft Wiki|16w21a}}<br />
| 202<br />
| [{{canonicalurl:Pre-release protocol|oldid=7877}} page]<br />
|-<br />
| {{Minecraft Wiki|16w20a}}<br />
| 201<br />
| [{{canonicalurl:Pre-release protocol|oldid=7859}} page]<br />
|-<br />
| '''{{Minecraft Wiki|1.9.4}}'''<br />
|rowspan="4"| 110<br />
|rowspan="4"| [{{canonicalurl:Protocol|oldid=7959}} page]<br />
|-<br />
| '''{{Minecraft Wiki|1.9.3}}'''<br />
|-<br />
| {{Minecraft Wiki|1.9.3-pre3}}<br />
|-<br />
| {{Minecraft Wiki|1.9.3-pre2}} <br />
|-<br />
| {{Minecraft Wiki|1.9.3-pre1}}<br />
|rowspan="5"| 109<br />
|rowspan="5"| [{{canonicalurl:Protocol|oldid=7817}} page]<br />
|-<br />
| {{Minecraft Wiki|16w15b}}<br />
|-<br />
| {{Minecraft Wiki|16w15a}}<br />
|-<br />
| {{Minecraft Wiki|16w14a}}<br />
|-<br />
| '''{{Minecraft Wiki|1.9.2}}'''<br />
|-<br />
| {{Minecraft Wiki|1.RV-Pre1}}<br />
| 108<br />
| [{{canonicalurl:Pre-release protocol|oldid=7552}} page]<ref group="note">Although it has the same ID as 1.9.1, the April Fools version 1.RV-Pre1 has new blocks and items that cannot be used on 1.9.1 servers.</ref><br />
|-<br />
| '''{{Minecraft Wiki|1.9.1}}'''<br />
|rowspan="3"| 108<br />
|rowspan="3"| [{{canonicalurl:Pre-release protocol|oldid=7552}} page]<br />
|-<br />
| {{Minecraft Wiki|1.9.1-pre3}}<br />
|-<br />
| {{Minecraft Wiki|1.9.1-pre2}}<br />
|-<br />
| {{Minecraft Wiki|1.9.1-pre1}}<br />
|rowspan="2"| 107<br />
|rowspan="2"| [{{canonicalurl:Protocol|oldid=7617}} page]<br />
|-<br />
| '''{{Minecraft Wiki|1.9}}'''<br />
|-<br />
| {{Minecraft Wiki|1.9-pre4}}<br />
| 106<br />
| [{{canonicalurl:Pre-release protocol|oldid=7401}} page]<br />
|-<br />
| {{Minecraft Wiki|1.9-pre3}}<br />
| 105<br />
|<br />
|-<br />
| {{Minecraft Wiki|1.9-pre2}}<br />
| 104<br />
| <br />
|-<br />
| {{Minecraft Wiki|1.9-pre1}}<br />
| 103<br />
| <br />
|-<br />
| {{Minecraft Wiki|16w07b}}<br />
| 102<br />
| <br />
|-<br />
| {{Minecraft Wiki|16w07a}}<br />
| 101<br />
|<br />
|-<br />
| {{Minecraft Wiki|16w06a}}<br />
| 100<br />
|<br />
|-<br />
| {{Minecraft Wiki|16w05b}}<br />
| 99<br />
|<br />
|-<br />
| {{Minecraft Wiki|16w05a}}<br />
| 98<br />
|<br />
|-<br />
| {{Minecraft Wiki|16w04a}}<br />
| 97<br />
|<br />
|-<br />
| {{Minecraft Wiki|16w03a}}<br />
| 96<br />
|<br />
|-<br />
| {{Minecraft Wiki|16w02a}}<br />
| 95<br />
| [{{canonicalurl:Pre-release protocol|oldid=7268}} page]<br />
|-<br />
| {{Minecraft Wiki|15w51b}}<br />
| 94<br />
| [{{canonicalurl:Pre-release protocol|oldid=7193}} page]<br />
|-<br />
| {{Minecraft Wiki|15w51a}}<br />
| 93<br />
| <br />
|-<br />
| {{Minecraft Wiki|15w50a}}<br />
| 92<br />
| <br />
|-<br />
| {{Minecraft Wiki|15w49b}}<br />
| 91<br />
| <br />
|-<br />
| {{Minecraft Wiki|15w49a}}<br />
| 90<br />
| <br />
|-<br />
| {{Minecraft Wiki|15w47c}}<br />
| 89<br />
| <br />
|-<br />
| {{Minecraft Wiki|15w47b}}<br />
| 88<br />
| <br />
|-<br />
| {{Minecraft Wiki|15w47a}}<br />
| 87<br />
| <br />
|-<br />
| {{Minecraft Wiki|15w46a}}<br />
| 86<br />
| <br />
|-<br />
| {{Minecraft Wiki|15w45a}}<br />
| 85<br />
| <br />
|-<br />
| {{Minecraft Wiki|15w44b}}<br />
| 84<br />
| <br />
|-<br />
| {{Minecraft Wiki|15w44a}}<br />
| 83<br />
| <br />
|-<br />
| {{Minecraft Wiki|15w43c}}<br />
| 82<br />
| <br />
|-<br />
| {{Minecraft Wiki|15w43b}}<br />
| 81<br />
| <br />
|-<br />
| {{Minecraft Wiki|15w43a}}<br />
| 80<br />
| <br />
|-<br />
| {{Minecraft Wiki|15w42a}}<br />
| 79<br />
| <br />
|-<br />
| {{Minecraft Wiki|15w41b}}<br />
| 78<br />
| <br />
|-<br />
| {{Minecraft Wiki|15w41a}}<br />
| 77<br />
| <br />
|-<br />
| {{Minecraft Wiki|15w40b}}<br />
| 76<br />
| [{{canonicalurl:Pre-release protocol|oldid=7087}} page]<br />
|-<br />
| {{Minecraft Wiki|15w40a}}<br />
| 75<br />
| <br />
|-<br />
| {{Minecraft Wiki|15w39c}}<br />
|rowspan="3"|74<br />
|rowspan="3"|<br />
|-<br />
| {{Minecraft Wiki|15w39b}}<br />
|-<br />
| {{Minecraft Wiki|15w39a}}<br />
|-<br />
| {{Minecraft Wiki|15w38b}}<br />
| 73<br />
| [{{canonicalurl:Pre-release protocol|oldid=6935}} page]<br />
|-<br />
| {{Minecraft Wiki|15w38a}}<br />
| 72<br />
| [{{canonicalurl:Pre-release protocol|oldid=6932}} page]<br />
|-<br />
| {{Minecraft Wiki|15w37a}}<br />
| 71<br />
| <br />
|-<br />
| {{Minecraft Wiki|15w36d}}<br />
| 70<br />
| [{{canonicalurl:Pre-release protocol|oldid=6901}} page]<br />
|-<br />
| {{Minecraft Wiki|15w36c}}<br />
| 69<br />
| [{{canonicalurl:Pre-release protocol|oldid=6881}} page]<br />
|-<br />
| {{Minecraft Wiki|15w36b}}<br />
| 68<br />
| <br />
|-<br />
| {{Minecraft Wiki|15w36a}}<br />
| 67<br />
| <br />
|-<br />
| {{Minecraft Wiki|15w35e}}<br />
| 66<br />
| [{{canonicalurl:Pre-release protocol|oldid=6851}} page]<br />
|-<br />
| {{Minecraft Wiki|15w35d}}<br />
| 65<br />
| <br />
|-<br />
| {{Minecraft Wiki|15w35c}}<br />
| 64<br />
| <br />
|-<br />
| {{Minecraft Wiki|15w35b}}<br />
| 63<br />
| [{{canonicalurl:Pre-release protocol|oldid=6829}} page]<br />
|-<br />
| {{Minecraft Wiki|15w35a}}<br />
| 62<br />
| <br />
|-<br />
| {{Minecraft Wiki|15w34d}}<br />
| 61<br />
| <br />
|-<br />
| {{Minecraft Wiki|15w34c}}<br />
| 60<br />
| <br />
|-<br />
| {{Minecraft Wiki|15w34b}}<br />
| 59<br />
| <br />
|-<br />
| {{Minecraft Wiki|15w34a}}<br />
| 58<br />
| [{{canonicalurl:Pre-release protocol|oldid=6809}} page]<br />
|-<br />
| {{Minecraft Wiki|15w33c}}<br />
| 57<br />
| [{{canonicalurl:Pre-release protocol|oldid=6806}} page]<br />
|-<br />
| {{Minecraft Wiki|15w33b}}<br />
| 56<br />
| [{{canonicalurl:Pre-release protocol|oldid=6796}} page]<br />
|-<br />
| {{Minecraft Wiki|15w33a}}<br />
| 55<br />
| [{{canonicalurl:Pre-release protocol|oldid=6790}} page]<br />
|-<br />
| {{Minecraft Wiki|15w32c}}<br />
| 54<br />
| [{{canonicalurl:Pre-release protocol|oldid=6788}} page]<br />
|-<br />
| {{Minecraft Wiki|15w32b}}<br />
| 53<br />
| <br />
|- <br />
| {{Minecraft Wiki|15w32a}}<br />
| 52<br />
| [{{canonicalurl:Pre-release protocol|oldid=6785}} page]<br />
|-<br />
| {{Minecraft Wiki|15w31c}}<br />
| 51<br />
| [{{canonicalurl:Pre-release protocol|oldid=6780}} page]<br />
|-<br />
| {{Minecraft Wiki|15w31b}}<br />
| 50<br />
| [{{canonicalurl:Pre-release protocol|oldid=6746}} page]<ref group="note">{{IRC quote|Dinnerbone|Protocol itself didn't change in 31c btw, but we added an entity which warrants incompatibility}}</ref><br />
|-<br />
| {{Minecraft Wiki|15w31a}}<br />
| 49<br />
| <br />
|-<br />
| {{Minecraft Wiki|15w14a}}<br />
| 48<br />
| <br />
|-<br />
| '''{{Minecraft Wiki|1.8.9}}'''<br />
|rowspan="22"| 47<br />
|rowspan="22"| [{{canonicalurl:Protocol|oldid=7368}} page]<br />
|-<br />
| '''{{Minecraft Wiki|1.8.8}}'''<br />
|-<br />
| '''{{Minecraft Wiki|1.8.7}}'''<br />
|-<br />
| '''{{Minecraft Wiki|1.8.6}}'''<br />
|-<br />
| '''{{Minecraft Wiki|1.8.5}}'''<br />
|-<br />
| '''{{Minecraft Wiki|1.8.4}}'''<br />
|-<br />
| '''{{Minecraft Wiki|1.8.3}}'''<br />
|-<br />
| '''{{Minecraft Wiki|1.8.2}}'''<br />
|-<br />
| {{Minecraft Wiki|1.8.2-pre7}}<br />
|-<br />
| {{Minecraft Wiki|1.8.2-pre6}}<br />
|-<br />
| {{Minecraft Wiki|1.8.2-pre5}}<br />
|-<br />
| {{Minecraft Wiki|1.8.2-pre4}}<br />
|-<br />
| {{Minecraft Wiki|1.8.2-pre3}}<br />
|-<br />
| {{Minecraft Wiki|1.8.2-pre2}}<br />
|-<br />
| {{Minecraft Wiki|1.8.2-pre1}}<br />
|-<br />
| '''{{Minecraft Wiki|1.8.1}}'''<br />
|-<br />
| {{Minecraft Wiki|1.8.1-pre5}}<br />
|-<br />
| {{Minecraft Wiki|1.8.1-pre4}}<br />
|-<br />
| {{Minecraft Wiki|1.8.1-pre3}}<br />
|-<br />
| {{Minecraft Wiki|1.8.1-pre2}}<br />
|-<br />
| {{Minecraft Wiki|1.8.1-pre1}}<br />
|-<br />
| '''{{Minecraft Wiki|1.8}}'''<br />
|-<br />
| {{Minecraft Wiki|1.8-pre3}}<br />
| 46<br />
| <br />
|-<br />
| {{Minecraft Wiki|1.8-pre2}}<br />
| 45<br />
| <br />
|-<br />
| {{Minecraft Wiki|1.8-pre1}}<br />
| 44<br />
| <br />
|-<br />
| {{Minecraft Wiki|14w34d}}<br />
| 43<br />
| <br />
|-<br />
| {{Minecraft Wiki|14w34c}}<br />
| 42<br />
| <br />
|-<br />
| {{Minecraft Wiki|14w34b}}<br />
| 41<br />
| <br />
|-<br />
| {{Minecraft Wiki|14w34a}}<br />
| 40<br />
| <br />
|-<br />
| {{Minecraft Wiki|14w33c}}<br />
| 39<br />
| <br />
|-<br />
| {{Minecraft Wiki|14w33b}}<br />
| 38<br />
| <br />
|-<br />
| {{Minecraft Wiki|14w33a}}<br />
| 37<br />
| <br />
|-<br />
| {{Minecraft Wiki|14w32d}}<br />
| 36<br />
| <br />
|-<br />
| {{Minecraft Wiki|14w32c}}<br />
| 35<br />
| <br />
|-<br />
| {{Minecraft Wiki|14w32b}}<br />
| 34<br />
| <br />
|- <br />
| {{Minecraft Wiki|14w32a}}<br />
| 33<br />
| <br />
|-<br />
| {{Minecraft Wiki|14w31a}}<br />
| 32<br />
| <br />
|-<br />
| {{Minecraft Wiki|14w30c}}<br />
| 31<br />
| <br />
|-<br />
| {{Minecraft Wiki|14w30b}}<br />
|rowspan="2"| 30<br />
|rowspan="2"|<br />
|-<br />
| {{Minecraft Wiki|14w30a}}<br />
|-<br />
| {{Minecraft Wiki|14w29a}}<br />
|rowspan="2"| 29<br />
|rowspan="2"|<br />
|-<br />
| {{Minecraft Wiki|14w29a}}<br />
|-<br />
| {{Minecraft Wiki|14w28b}}<br />
| 28<br />
| <br />
|-<br />
| {{Minecraft Wiki|14w28a}}<br />
| 27<br />
| <br />
|-<br />
| {{Minecraft Wiki|14w27b}}<br />
|rowspan="2"| 26<br />
|rowspan="2"| <br />
|-<br />
| {{Minecraft Wiki|14w27a}}<br />
|-<br />
| {{Minecraft Wiki|14w26c}}<br />
| 25<br />
| <br />
|-<br />
| {{Minecraft Wiki|14w26b}}<br />
| 24<br />
| <br />
|-<br />
| {{Minecraft Wiki|14w26a}}<br />
| 23<br />
| <br />
|-<br />
| {{Minecraft Wiki|14w25b}}<br />
| 22<br />
| <br />
|-<br />
| {{Minecraft Wiki|14w25a}}<br />
| 21<br />
| <br />
|-<br />
| {{Minecraft Wiki|14w21b}}<br />
| 20<br />
| <br />
|-<br />
| {{Minecraft Wiki|14w21a}}<br />
| 19<br />
| <br />
|-<br />
| {{Minecraft Wiki|14w20b}}<br />
|rowspan="2"| 18<br />
|rowspan="2"|<br />
|-<br />
| {{Minecraft Wiki|14w20a}}<br />
|-<br />
| {{Minecraft Wiki|14w19a}}<br />
| 17<br />
| <br />
|-<br />
| {{Minecraft Wiki|14w18b}}<br />
|rowspan="2"| 16<br />
|rowspan="2"|<br />
|-<br />
| {{Minecraft Wiki|14w18a}}<br />
|-<br />
| {{Minecraft Wiki|14w17a}}<br />
| 15<br />
| <br />
|-<br />
| {{Minecraft Wiki|14w11b}}<br />
|rowspan="2"| 14<br />
|rowspan="2"|<br />
|-<br />
| {{Minecraft Wiki|14w11a}}<br />
|-<br />
| {{Minecraft Wiki|14w10c}}<br />
|rowspan="3"| 13<br />
|rowspan="3"| <br />
|-<br />
| {{Minecraft Wiki|14w10b}}<br />
|-<br />
| {{Minecraft Wiki|14w10a}}<br />
|-<br />
| {{Minecraft Wiki|14w08a}}<br />
| 12<br />
| <br />
|-<br />
| {{Minecraft Wiki|14w07a}}<br />
| 11<br />
| <br />
|-<br />
| {{Minecraft Wiki|14w06b}}<br />
|rowspan="2"| 10<br />
|rowspan="2"|<br />
|-<br />
| {{Minecraft Wiki|14w06a}}<br />
|-<br />
| {{Minecraft Wiki|14w05b}}<br />
|rowspan="2"| 9<br />
|rowspan="2"|<br />
|-<br />
| {{Minecraft Wiki|14w05a}}<br />
|-<br />
| {{Minecraft Wiki|14w04b}}<br />
| 8<br />
| <br />
|-<br />
| {{Minecraft Wiki|14w04a}}<br />
| 7<br />
| <br />
|-<br />
| {{Minecraft Wiki|14w03b}}<br />
|rowspan="2"| 6<br />
|rowspan="2"|<br />
|-<br />
| {{Minecraft Wiki|14w03a}}<br />
|-<br />
| {{Minecraft Wiki|14w02c}}<br />
|rowspan="14"| 5<br />
|rowspan="14"| [{{canonicalurl:Protocol|oldid=6003}} page]<br />
|-<br />
| {{Minecraft Wiki|14w02b}}<br />
|-<br />
| {{Minecraft Wiki|14w02a}}<br />
|-<br />
| '''{{Minecraft Wiki|1.7.10}}'''<br />
|-<br />
| {{Minecraft Wiki|1.7.10-pre4}}<br />
|-<br />
| {{Minecraft Wiki|1.7.10-pre3}}<br />
|-<br />
| {{Minecraft Wiki|1.7.10-pre2}}<br />
|-<br />
| {{Minecraft Wiki|1.7.10-pre1}}<br />
|-<br />
| '''{{Minecraft Wiki|1.7.9}}'''<br />
|-<br />
| '''{{Minecraft Wiki|1.7.8}}'''<br />
|-<br />
| '''{{Minecraft Wiki|1.7.7}}'''<br />
|-<br />
| '''{{Minecraft Wiki|1.7.6}}'''<br />
|-<br />
| {{Minecraft Wiki|1.7.6-pre2}}<br />
|-<br />
| {{Minecraft Wiki|1.7.6-pre1}}<br />
|-<br />
| '''{{Minecraft Wiki|1.7.5}}'''<br />
|rowspan="12"| 4<br />
|rowspan="12"| [{{canonicalurl:Protocol|oldid=5486}} page]<br />
|-<br />
| '''{{Minecraft Wiki|1.7.4}}'''<br />
|-<br />
| {{Minecraft Wiki|1.7.3-pre}}<br />
|-<br />
| {{Minecraft Wiki|13w49a}}<br />
|-<br />
| {{Minecraft Wiki|13w48b}}<br />
|-<br />
| {{Minecraft Wiki|13w48a}}<br />
|-<br />
| {{Minecraft Wiki|13w47e}}<br />
|-<br />
| {{Minecraft Wiki|13w47d}}<br />
|-<br />
| {{Minecraft Wiki|13w47c}}<br />
|-<br />
| {{Minecraft Wiki|13w47b}}<br />
|-<br />
| {{Minecraft Wiki|13w47a}}<br />
|-<br />
| '''{{Minecraft Wiki|1.7.2}}'''<br />
|-<br />
| {{Minecraft Wiki|1.7.1-pre}}<br />
|rowspan="2"| 3<br />
|rowspan="2"|<br />
|-<br />
| {{Minecraft Wiki|1.7-pre}}<br />
|-<br />
| {{Minecraft Wiki|13w43a}}<br />
| 2<br />
| <br />
|-<br />
| {{Minecraft Wiki|13w42b}}<br />
| rowspan="2" | 1<br />
| rowspan="2" | [{{canonicalurl:Pre-release protocol|oldid=5042}} page]<br />
|-<br />
| {{Minecraft Wiki|13w42a}}<br />
|-<br />
| {{Minecraft Wiki|13w41b}}<br />
| 0<br />
| [{{canonicalurl:Pre-release protocol|oldid=5007}} page]<ref group="note">Despite having the same ID, 13w41a and 13w41b are incompatible.</ref><br />
|-<br />
| {{Minecraft Wiki|13w41a}}<br />
| 0<br />
| [{{canonicalurl:Pre-release protocol|oldid=4957}} page]<br />
|}<br />
<br />
=== Notes ===<br />
<br />
<references group="note" /><br />
<br />
=== Examples ===<br />
<br />
Json: [https://github.com/PrismarineJS/minecraft-data/blob/master/data/pc/common/protocolVersions.json minecraft-data]<br />
<br />
== Versions before the Netty rewrite ==<br />
<br />
Minecraft version 1.6.4 and older used a protocol versioning scheme separate from the current one. As such, the same version number may ambiguously refer to an old version in this list and a new version in the list above. For ease of navigation, this list is also split by Minecraft release stages, but the versions were not reset between these (other than near the start of alpha).<br />
<br />
=== Release ===<br />
<br />
{| class="wikitable"<br />
|-<br />
! Release name<br />
! Version number<br />
! Last known documentation<br />
|-<br />
| {{Minecraft Wiki|13w39b}}<br />
|rowspan="2"| 80<br />
|rowspan="2"| [{{canonicalurl:Pre-release protocol|oldid=4825}} page]<br />
|-<br />
| {{Minecraft Wiki|13w39a}}<br />
|-<br />
| {{Minecraft Wiki|13w38c}}<br />
|rowspan="3"| 79<br />
|rowspan="3"| <br />
|-<br />
| {{Minecraft Wiki|13w38b}}<br />
|-<br />
| {{Minecraft Wiki|13w38a}}<br />
|-<br />
| '''{{Minecraft Wiki|1.6.4}}'''<br />
| 78<br />
| [{{canonicalurl:Protocol|oldid=4899}} page]<br />
|-<br />
| {{Minecraft Wiki|1.6.3-pre}}<br />
| 77<br />
| <br />
|-<br />
| {{Minecraft Wiki|13w37b}}<br />
|rowspan="2"| 76<br />
|rowspan="2"| <br />
|-<br />
| {{Minecraft Wiki|13w37a}}<br />
|-<br />
| {{Minecraft Wiki|13w36b}}<br />
|rowspan="2"| 75<br />
|rowspan="2"| <br />
|-<br />
| {{Minecraft Wiki|13w36a}}<br />
|-<br />
| '''{{Minecraft Wiki|1.6.2}}'''<br />
| 74<br />
| <br />
|-<br />
| '''{{Minecraft Wiki|1.6.1}}'''<br />
| 73<br />
| [{{canonicalurl:Protocol|oldid=1095}} page]<br />
|-<br />
| {{Minecraft Wiki|1.6-pre}}<br />
|rowspan="2"| 72<br />
|rowspan="2"| <br />
|-<br />
| {{Minecraft Wiki|13w26a}}<br />
|-<br />
| {{Minecraft Wiki|13w25c}}<br />
|rowspan="3"| 71<br />
|rowspan="3"| <br />
|-<br />
| {{Minecraft Wiki|13w25b}}<br />
|-<br />
| {{Minecraft Wiki|13w25a}}<br />
|-<br />
| {{Minecraft Wiki|13w24b}}<br />
| 70<br />
| <br />
|-<br />
| {{Minecraft Wiki|13w24a}}<br />
| 69<br />
| <br />
|-<br />
| {{Minecraft Wiki|13w23b}}<br />
| 68<br />
| <br />
|-<br />
| {{Minecraft Wiki|13w23a}}<br />
|rowspan="4"| 67<br />
|rowspan="4"| <br />
|-<br />
| {{Minecraft Wiki|13w22a}}<br />
|-<br />
| {{Minecraft Wiki|13w21b}}<br />
|-<br />
| {{Minecraft Wiki|13w21a}}<br />
|-<br />
| {{Minecraft Wiki|13w19a}}<br />
| 66<br />
| <br />
|-<br />
| {{Minecraft Wiki|13w18c}}<br />
|rowspan="3"| 65<br />
|rowspan="3"|<br />
|-<br />
| {{Minecraft Wiki|13w18b}}<br />
|-<br />
| {{Minecraft Wiki|13w18a}}<br />
|-<br />
| {{Minecraft Wiki|13w17a}}<br />
| 64<br />
| <br />
|-<br />
| {{Minecraft Wiki|13w16b}}<br />
| 63<br />
| <br />
|-<br />
| {{Minecraft Wiki|13w16a}}<br />
| 62<br />
| <br />
|-<br />
| '''{{Minecraft Wiki|1.5.2}}'''<br />
| 61<br />
| <br />
|-<br />
| '''{{Minecraft Wiki|2.0}}''': Purple<br />
| 92<br />
|<br />
|-<br />
| '''{{Minecraft Wiki|2.0}}''': Red<br />
| 91<br />
|<br />
|-<br />
| '''{{Minecraft Wiki|2.0}}''': Blue<br />
| 90<br />
|<br />
|-<br />
| '''{{Minecraft Wiki|1.5.1}}'''<br />
|rowspan="7"| 60<br />
|rowspan="7"|<br />
|-<br />
| {{Minecraft Wiki|13w12~}}<br />
|-<br />
| {{Minecraft Wiki|13w11a}}<br />
|-<br />
| '''{{Minecraft Wiki|1.5}}'''<br />
|-<br />
| {{Minecraft Wiki|13w10b}}<br />
|-<br />
| {{Minecraft Wiki|13w10a}}<br />
|-<br />
| {{Minecraft Wiki|13w09c}}<br />
|-<br />
| {{Minecraft Wiki|13w09b}}<br />
|rowspan="2"| 59<br />
|rowspan="2"|<br />
|-<br />
| {{Minecraft Wiki|13w09a}}<br />
|-<br />
| {{Minecraft Wiki|13w07a}}<br />
|rowspan="2"| 58<br />
|rowspan="2"|<br />
|-<br />
| {{Minecraft Wiki|13w06a}}<br />
|-<br />
| {{Minecraft Wiki|13w05b}}<br />
| 57<br />
| <br />
|-<br />
| {{Minecraft Wiki|13w05a}}<br />
| 56<br />
| <br />
|-<br />
| {{Minecraft Wiki|13w04a}}<br />
| 55<br />
| <br />
|-<br />
| {{Minecraft Wiki|13w03a}}<br />
| 54<br />
| <br />
|-<br />
| {{Minecraft Wiki|13w02b}}<br />
|rowspan="2"| 53<br />
|rowspan="2"|<br />
|-<br />
| {{Minecraft Wiki|13w02a}}<br />
|-<br />
| {{Minecraft Wiki|13w01b}}<br />
|rowspan="2"| 52<br />
|rowspan="2"|<br />
|-<br />
| {{Minecraft Wiki|13w01a}}<br />
|-<br />
| '''{{Minecraft Wiki|1.4.7}}'''<br />
|rowspan="4"| 51<br />
|rowspan="4"| [{{canonicalurl:Protocol|oldid=1039}} page]<br />
|-<br />
| '''{{Minecraft Wiki|1.4.6}}'''<br />
|-<br />
| {{Minecraft Wiki|12w50b}}<br />
|-<br />
| {{Minecraft Wiki|12w50a}}<br />
|-<br />
| {{Minecraft Wiki|12w49a}}<br />
| 50<br />
| <br />
|-<br />
| '''{{Minecraft Wiki|1.4.5}}'''<br />
|rowspan="2"| 49<br />
|rowspan="2"| <br />
|-<br />
| '''{{Minecraft Wiki|1.4.4}}'''<br />
|-<br />
| {{Minecraft Wiki|1.4.3-pre}}<br />
| 48<br />
| <br />
|-<br />
| '''{{Minecraft Wiki|1.4.2}}'''<br />
| 47<br />
| <br />
|-<br />
| {{Minecraft Wiki|12w42b}}<br />
|rowspan="4"| 46<br />
|rowspan="4"|<br />
|-<br />
| {{Minecraft Wiki|12w42a}}<br />
|-<br />
| {{Minecraft Wiki|12w41b}}<br />
|-<br />
| {{Minecraft Wiki|12w41a}}<br />
|-<br />
| {{Minecraft Wiki|12w40b}}<br />
| 45<br />
| <br />
|-<br />
| {{Minecraft Wiki|12w40a}}<br />
| 44<br />
| <br />
|-<br />
| {{Minecraft Wiki|12w39b}}<br />
|rowspan="4"| 43<br />
|rowspan="4"|<br />
|-<br />
| {{Minecraft Wiki|12w39a}}<br />
|-<br />
| {{Minecraft Wiki|12w38b}}<br />
|-<br />
| {{Minecraft Wiki|12w38a}}<br />
|-<br />
| {{Minecraft Wiki|12w37a}}<br />
|rowspan="3"| 42<br />
|rowspan="3"|<br />
|-<br />
| {{Minecraft Wiki|12w36a}}<br />
|-<br />
| {{Minecraft Wiki|12w34b}}<br />
|-<br />
| {{Minecraft Wiki|12w34a}}<br />
| 41<br />
| <br />
|-<br />
| {{Minecraft Wiki|12w32a}}<br />
| 40<br />
| <br />
|-<br />
| '''{{Minecraft Wiki|1.3.2}}'''<br />
|rowspan="5"| 39<br />
|rowspan="5"| [{{canonicalurl:Protocol|oldid=980}} page]<br />
|-<br />
| '''{{Minecraft Wiki|1.3.1}}'''<br />
|-<br />
| {{Minecraft Wiki|12w30e}}<br />
|-<br />
| {{Minecraft Wiki|12w30d}}<br />
|-<br />
| {{Minecraft Wiki|12w30c}}<br />
|-<br />
| {{Minecraft Wiki|12w30b}}<br />
|rowspan="3"| 38<br />
|rowspan="3"|<br />
|-<br />
| {{Minecraft Wiki|12w30a}}<br />
|-<br />
| {{Minecraft Wiki|12w27a}}<br />
|-<br />
| {{Minecraft Wiki|12w26a}}<br />
|rowspan="2"| 37<br />
|rowspan="2"| <br />
|-<br />
| {{Minecraft Wiki|12w25a}}<br />
|-<br />
| {{Minecraft Wiki|12w24a}}<br />
| 36<br />
| <br />
|-<br />
| {{Minecraft Wiki|12w23b}}<br />
|rowspan="2"| 35<br />
|rowspan="2"|<br />
|-<br />
| {{Minecraft Wiki|12w23a}}<br />
|-<br />
| {{Minecraft Wiki|12w22a}}<br />
| 34<br />
| <br />
|-<br />
| {{Minecraft Wiki|12w21b}}<br />
|rowspan="2"| 33<br />
|rowspan="2"| <br />
|-<br />
| {{Minecraft Wiki|12w21a}}<br />
|-<br />
| {{Minecraft Wiki|12w19a}}<br />
|rowspan="2"| 32<br />
|rowspan="2"| <br />
|-<br />
| {{Minecraft Wiki|12w18a}}<br />
|-<br />
| {{Minecraft Wiki|12w17a}}<br />
| 31<br />
| <br />
|-<br />
| {{Minecraft Wiki|12w16a}}<br />
| 30<br />
| <br />
|-<br />
| {{Minecraft Wiki|12w15a}}<br />
|rowspan="3"| 29<br />
|rowspan="3"| [{{canonicalurl:Protocol|oldid=932}} page]<ref group="old note">This protocol has no encryption and a different handshake layout than the previous ones.</ref><br />
|-<br />
| '''{{Minecraft Wiki|1.2.5}}'''<br />
|-<br />
| '''{{Minecraft Wiki|1.2.4}}'''<br />
|-<br />
| '''{{Minecraft Wiki|1.2.3}}'''<br />
|rowspan="4"| 28<br />
|rowspan="4"| <br />
|-<br />
| '''{{Minecraft Wiki|1.2.2}}'''<br />
|-<br />
| '''{{Minecraft Wiki|1.2.1}}'''<br />
|-<br />
| {{Minecraft Wiki|12w08a}}<br />
|-<br />
| {{Minecraft Wiki|12w07b}}<br />
|rowspan="2"| 27<br />
|rowspan="2"|<br />
|-<br />
| {{Minecraft Wiki|12w07a}}<br />
|-<br />
| {{Minecraft Wiki|12w06a}}<br />
| 25<br />
| <br />
|-<br />
| {{Minecraft Wiki|12w05b}}<br />
|rowspan="4"|24<br />
|rowspan="4"|<br />
|-<br />
| {{Minecraft Wiki|12w05a}}<br />
|-<br />
| {{Minecraft Wiki|12w04a}}<br />
|-<br />
| {{Minecraft Wiki|12w03a}}<br />
|-<br />
| '''{{Minecraft Wiki|1.1}}'''<br />
| 23 <ref group="old note">This version is incompatible with 12w01a which also uses protocol 23, due to the removal of 0x1B.</ref><br />
| <br />
|-<br />
| {{Minecraft Wiki|12w01a}}<br />
| 23<br />
| <br />
|-<br />
| {{Minecraft Wiki|11w50a}}<br />
|rowspan=2|22 <ref group="old note">These versions are incompatible with the previous snapshots also using protocol 22, due to the additon of 0xFA Plugin Message.</ref><br />
|rowspan=2|<br />
|-<br />
| {{Minecraft Wiki|11w49a}}<br />
|-<br />
| {{Minecraft Wiki|11w48a}}<br />
|rowspan=4|22<br />
|rowspan=4|[{{canonicalurl:Protocol|oldid=689}} page]<br />
|-<br />
| {{Minecraft Wiki|11w47a}}<br />
|-<br />
| '''{{Minecraft Wiki|1.0.1}}'''<br />
|-<br />
| '''{{Minecraft Wiki|1.0.0}}'''<br />
|}<br />
<br />
=== Beta ===<br />
<br />
{| class="wikitable"<br />
|-<br />
! Release name<br />
! Version number<br />
! Last known documentation<br />
|-<br />
| {{Minecraft Wiki|1.0.0-RC2}}<br />
|rowspan=3|22<br />
|rowspan=3|See 1.0.0<br />
|-<br />
| {{Minecraft Wiki|1.0.0-RC1}}<br />
|-<br />
| {{Minecraft Wiki|Beta 1.9-pre6}}<br />
|-<br />
| {{Minecraft Wiki|Beta 1.9-pre5}}<br />
| 21<br />
| <br />
|-<br />
| {{Minecraft Wiki|Beta 1.9-pre4}}<br />
| 20<br />
| <br />
|-<br />
| {{Minecraft Wiki|Beta 1.9-pre3}}<br />
|rowspan="2"|19<br />
|rowspan="2"|<br />
|-<br />
| {{Minecraft Wiki|Beta 1.9-pre2}}<br />
|-<br />
| {{Minecraft Wiki|Beta 1.9-pre1}}<br />
| 18<br />
| <br />
|-<br />
| '''{{Minecraft Wiki|Beta 1.8.1}}'''<br />
|rowspan="2"|17<br />
|rowspan="2"| <br />
|-<br />
| '''{{Minecraft Wiki|Beta 1.8}}'''<br />
|-<br />
| {{Minecraft Wiki|Beta 1.8-pre2}}<br />
| 16<br />
| <br />
|-<br />
| {{Minecraft Wiki|Beta 1.8-pre1}}<br />
| 15<br />
| <br />
|-<br />
| '''{{Minecraft Wiki|Beta 1.7.3}}'''<br />
|rowspan="4"|14<br />
|rowspan="4"|<br />
|-<br />
| '''{{Minecraft Wiki|Beta 1.7.2}}'''<br />
|-<br />
| '''{{Minecraft Wiki|Beta 1.7.1}}'''<br />
|-<br />
| '''{{Minecraft Wiki|Beta 1.7}}'''<br />
|-<br />
| '''{{Minecraft Wiki|Beta 1.6.6}}'''<br />
|rowspan="7"|13<br />
|rowspan="7"|<br />
|-<br />
| '''{{Minecraft Wiki|Beta 1.6.5}}'''<br />
|-<br />
| '''{{Minecraft Wiki|Beta 1.6.4}}'''<br />
|-<br />
| '''{{Minecraft Wiki|Beta 1.6.3}}'''<br />
|-<br />
| '''{{Minecraft Wiki|Beta 1.6.2}}'''<br />
|-<br />
| '''{{Minecraft Wiki|Beta 1.6.1}}'''<br />
|-<br />
| '''{{Minecraft Wiki|Beta 1.6}}'''<br />
|-<br />
| {{Minecraft Wiki|Beta 1.6 Test Build 3}}<br />
| 12<br />
| <ref group="old note">This version was never publicly released, but is found lurking on the old update site. It's equivalent to beta 1.6 in terms of protocol. Curiously, it has a unique protocol version.</ref><br />
|-<br />
| '''{{Minecraft Wiki|Beta 1.5_02}}'''<br />
|rowspan="3"| 11<br />
|<ref group="old note">Beta 1.5_02 was a server-only update.</ref><br />
|-<br />
| '''{{Minecraft Wiki|Beta 1.5_01}}'''<br />
|rowspan="2"|<br />
|-<br />
| '''{{Minecraft Wiki|Beta 1.5}}'''<br />
|-<br />
| '''{{Minecraft Wiki|Beta 1.4_01}}'''<br />
|rowspan="2"| 10<br />
|rowspan="2"|<br />
|-<br />
| '''{{Minecraft Wiki|Beta 1.4}}'''<br />
|-<br />
| '''{{Minecraft Wiki|Beta 1.3_01}}'''<br />
|rowspan="2"| 9<br />
|rowspan="2"|<br />
|-<br />
| '''{{Minecraft Wiki|Beta 1.3}}'''<br />
|-<br />
| '''{{Minecraft Wiki|Beta 1.2_02}}'''<br />
|rowspan="4"| 8<br />
|rowspan="4"|<br />
|-<br />
| '''{{Minecraft Wiki|Beta 1.2_01}}'''<br />
|-<br />
| '''{{Minecraft Wiki|Beta 1.2}}'''<br />
|-<br />
| '''{{Minecraft Wiki|Beta 1.1_02}}'''<br />
|-<br />
| '''{{Minecraft Wiki|Beta 1.1_01}}'''<br />
|rowspan="2"| 7<br />
|rowspan="2"|<br />
|-<br />
| '''{{Minecraft Wiki|Beta 1.1}}'''<br />
|-<br />
| '''{{Minecraft Wiki|Beta 1.0_02}}'''<br />
|rowspan="3"| 7<br />
|rowspan="3"|<br />
|-<br />
| '''{{Minecraft Wiki|Beta 1.0_01}}'''<br />
|-<br />
| '''{{Minecraft Wiki|Beta 1.0}}'''<br />
|}<br />
<br />
=== Alpha ===<br />
<br />
Note: the position of alpha servers with relation to clients is mostly guesswork partially based on timestamps, and shouldn't be treated as an exact record of when things were released publicly.<br />
<br />
{| class="wikitable"<br />
|-<br />
! Release name<br />
! Version number<br />
! Last known documentation<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.2.6}}'''<br />
|rowspan="9"| 6<br />
|rowspan="8"|<br />
|-<br />
| Alpha server 0.2.8<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.2.5}}'''<br />
|-<br />
| Alpha server 0.2.7<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.2.4_01}}'''<br />
|-<br />
| Alpha server 0.2.6_02<br />
|-<br />
| Alpha server 0.2.6_01<br />
|-<br />
| Alpha server 0.2.6<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.2.3_05}}'''<br />
| <ref group="old note">Alpha 1.2.3_05 is actually the first release of Alpha 1.2.4.</ref><br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.2.3_04}}'''<br />
|rowspan="7"| 5<br />
|rowspan="7"|<br />
|-<br />
| Alpha server 0.2.5_02<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.2.3_02}}'''<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.2.3_01}}'''<br />
|-<br />
| Alpha server 0.2.5_01<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.2.3}}'''<br />
|-<br />
| Alpha server 0.2.5<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.2.2}}'''<br />
|rowspan="2"| 4<br />
|rowspan="2"|<br />
|-<br />
| Alpha server 0.2.4<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.2.1_01}}'''<br />
|rowspan="2"| 3<br />
|rowspan="2"|<br />
|-<br />
| Alpha server 0.2.3<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.2.1}}'''<br />
| {{Unknown|Unknown (3?)}}<br />
|<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.2.0_02}}'''<br />
|rowspan="5"| 3<br />
|rowspan="5"|<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.2.0_01}}'''<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.2.0}}'''<br />
|-<br />
| Alpha server 0.2.2_01<br />
|-<br />
| Alpha server 0.2.2<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.1.2_01}}'''<br />
|rowspan="3"| 2<br />
|rowspan="3"|<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.1.2}}'''<br />
|-<br />
| Alpha server 0.2.1<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.1.1}}'''<br />
| {{Unknown|Unknown (2?)}}<br />
|<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.1.0}}'''<br />
|rowspan="4"| 2<br />
|rowspan="4"|<br />
|-<br />
| Alpha server 0.2.1<br />
|-<br />
| Alpha server 0.2.0_01<br />
|-<br />
| Alpha server 0.2.0<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.0.17_04}}'''<br />
|rowspan="4"| 1<br />
|rowspan="4"|<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.0.17_03}}'''<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.0.17_02}}'''<br />
|-<br />
| Alpha server 0.1.4<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.0.17_01}}'''<br />
|rowspan="2" {{Unknown|Unknown (1?)}}<br />
|rowspan="2"|<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.0.17}}'''<br />
|-<br />
| Alpha server 0.1.3<br />
|rowspan="5"|14<br />
|rowspan="5"|<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.0.16_02}}'''<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.0.16_01}}'''<br />
|-<br />
| Alpha server 0.1.2_01<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.0.16}}'''<br />
|-<br />
| Alpha server 0.1.0<br />
|rowspan="2"|13<br />
|<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.0.15}}'''<br />
| <ref group="old note">1.0.15 is the first version publicly supporting SMP</ref><br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.0.14}}'''<br />
|rowspan="3"| 12<br />
|rowspan="6"| <ref group="old note">These versions have a multiplayer button, but a specific server is hardcoded.</ref><br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.0.13_01}}'''<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.0.13}}'''<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.0.12}}'''<br />
| 11<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.0.11}}'''<br />
|rowspan="4"| 10<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.0.10}}'''<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.0.9}}'''<br />
|rowspan="10"| <ref group="old note">These versions have multiplayer code, but no multiplayer interface.</ref><br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.0.8_01}}'''<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.0.8}}'''<br />
| {{Unknown|Unknown (10?)}}<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.0.7}}'''<br />
|rowspan="2"| 10<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.0.6_03}}'''<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.0.6_02}}'''<br />
|{{Unknown|Unknown (10?)}}<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.0.6_01}}'''<br />
|rowspan="4"| 10<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.0.6}}'''<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.0.5_01}}'''<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.0.5}}'''<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.0.4}}'''<br />
|rowspan="8" {{No|Multiplayer did not exist at this time}}<br />
|rowspan="8" |<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.0.3}}'''<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.0.2_02}}'''<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.0.2_01}}'''<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.0.2}}'''<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.0.1_01}}'''<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.0.1}}'''<br />
|-<br />
| '''{{Minecraft Wiki|Alpha 1.0.0}}'''<br />
|}<br />
<br />
=== Classic ===<br />
<br />
{| class="wikitable"<br />
|-<br />
! Release name<br />
! Version number<br />
! Last known documentation<br />
|-<br />
| c0.30-3<br />
|rowspan="5"| 7<br />
|rowspan="5"| [[Classic Protocol|page]]<br />
|-<br />
| c0.30-2<br />
|-<br />
| c0.30-1<br />
|-<br />
| c0.29_02<br />
|-<br />
| c0.29_01<br />
|-<br />
| c0.29<br />
|rowspan="1" {{Unknown|Unknown (7?)}}<br />
|rowspan="1" |<br />
|-<br />
| c0.28_01<br />
| 7<br />
|<br />
|-<br />
| c0.28<br />
| {{Unknown|Unknown (7?)}}<br />
|<br />
|-<br />
| c0.27_st_c<br />
|rowspan="2" {{Unknown|Unknown (6?)}}<br />
|rowspan="2" |<br />
|-<br />
| c0.27_st_b<br />
|-<br />
| c0.27_st_a<br />
| 6<br />
|<br />
|-<br />
| c0.26_st_g<br />
|rowspan="7" {{Unknown|Unknown (6?)}}<br />
|rowspan="7" |<br />
|-<br />
| c0.26_st_f<br />
|-<br />
| c0.26_st_e<br />
|-<br />
| c0.26_st_d<br />
|-<br />
| c0.26_st_c<br />
|-<br />
| c0.26_st_b<br />
|-<br />
| c0.26_st_a<br />
|-<br />
| c0.25_05_st<br />
| 6<br />
|-<br />
| c0.25_04_st<br />
|rowspan="6" {{Unknown|Unknown (6?)}}<br />
|rowspan="6" |<br />
|-<br />
| c0.25_03_st<br />
|-<br />
| c0.25_02_st<br />
|-<br />
| c0.25_01_st<br />
|-<br />
| c0.25_st<br />
|-<br />
| c0.24_st_d<br />
|-<br />
| c0.24_st_c<br />
| 6<br />
|-<br />
| c0.24_st_b<br />
|rowspan="10" {{Unknown|Unknown (6?)}}<br />
|rowspan="10" |<br />
|-<br />
| c0.24_st_a<br />
|-<br />
| c0.24_07<br />
|-<br />
| c0.24_06<br />
|-<br />
| c0.24_05<br />
|-<br />
| c0.24_04<br />
|-<br />
| c0.24_03<br />
|-<br />
| c0.24_02<br />
|-<br />
| c0.24_01<br />
|-<br />
| c0.24<br />
<!-- There is a version of this, but it is definitely tampered with; it has protocol 7 strangely but probably because it was modified from a newer version --><br />
|-<br />
| c0.0.23a_01<br />
| 6<br />
|<br />
|-<br />
| c0.0.23a<br />
| {{Unknown|Unknown (6?)}}<br />
|<br />
|-<br />
| c0.0.22a_05<br />
| 6<br />
|<br />
|-<br />
| c0.0.22a_04<br />
|rowspan="6" {{Unknown|Unknown (6?)}}<br />
|rowspan="6"|<br />
|-<br />
| c0.0.22a_03<br />
|-<br />
| c0.0.22a_02<br />
|-<br />
| c0.0.22a_01<br />
|-<br />
| c0.0.22a<br />
|-<br />
| c0.0.21a_01<br />
|-<br />
| c0.0.21a<br />
| 6<br />
|<br />
|-<br />
| c0.0.20a_02<br />
|rowspan="16" {{Unknown}}<br />
|rowspan="16" |<br />
|-<br />
| c0.0.20a_01<br />
|-<br />
| c0.0.20a<br />
|-<br />
| c0.0.19a_06<br />
|-<br />
| c0.0.19a_05<br />
|-<br />
| c0.0.19a_04<br />
|-<br />
| c0.0.19a_03<br />
|-<br />
| c0.0.19a_02<br />
|-<br />
| c0.0.19a_01<br />
|-<br />
| c0.0.19a<br />
|-<br />
| c0.0.18a_02<br />
|-<br />
| c0.0.18a_01<br />
|-<br />
| c0.0.18a<br />
|-<br />
| c0.0.17a_02<br />
|-<br />
| c0.0.17a_01<br />
|-<br />
| c0.0.17a<br />
|-<br />
| c0.0.16a_02<br />
| 3<br />
|<br />
|-<br />
| c0.0.16a_01<br />
| rowspan="4" {{Unknown}}<br />
| rowspan="4" |<br />
|-<br />
| c0.0.16a<br />
|-<br />
| c0.0.15a-3<br />
|-<br />
| c0.0.15a-2<br />
|-<br />
| c0.0.15a-1<br />
| None<ref group="old note">The Player Identification packet is only a single string, and does not include a version number.</ref><br />
|<br />
|-<br />
| c0.0.14a_08<br />
| rowspan="23" {{No|Multiplayer did not exist at this time}}<br />
| rowspan="23" |<br />
|-<br />
| c0.0.14a_07<br />
|-<br />
| c0.0.14a_06<br />
|-<br />
| c0.0.14a_05<br />
|-<br />
| c0.0.14a_04<br />
|-<br />
| c0.0.14a_03<br />
|-<br />
| c0.0.14a_02<br />
|-<br />
| c0.0.14a_01<br />
|-<br />
| c0.0.14a<br />
|-<br />
| c0.0.13a_04<br />
|-<br />
| c0.0.13a_03<br />
|-<br />
| c0.0.13a_02<br />
|-<br />
| c0.0.13a_01<br />
|-<br />
| c0.0.13a<br />
|-<br />
| c0.0.12a_03<br />
|-<br />
| c0.0.12a_02<br />
|-<br />
| c0.0.12a_01<br />
|-<br />
| c0.0.12a<br />
|-<br />
| c0.0.11a<br />
|-<br />
| c0.0.10a<br />
|-<br />
| c0.0.9a<br />
|-<br />
| c0.0.3a<br />
|-<br />
| c0.0.2a<br />
|}<br />
<br />
=== Notes ===<br />
<br />
<references group="old note" /><br />
<br />
[[Category:Minecraft Modern]]</div>Orladoghttps://wiki.vg/index.php?title=Raknet_Protocol&diff=15852Raknet Protocol2020-06-13T13:31:44Z<p>Orladog: Add category</p>
<hr />
<div>:: '''Remember that this page is a WIP.''' Come back later to see a more complete page.<br />
----<br />
<br />
[http://www.jenkinssoftware.com/ RakNet] is a networking library used by Minecraft Bedrock Edition. You might want to also look at the documentation for the [[Bedrock Protocol]].<br />
This is based on the old [https://wiki.vg/Pocket_Edition_Protocol_Documentation#RakNet_protocol Pocket Edition Protocol Documentation] and may be incomplete or outdated.<br />
The source code for the RakNet Library can be found [https://github.com/OculusVR/RakNet/ here].<br />
RakNet uses [https://en.wikipedia.org/wiki/User_Datagram_Protocol UDP] as its networking protocol. The key differences from TCP are that not all packets are guaranteed to reach the destination at all or in order (it isn't reliable) and it uses messages with a specified length instead of streams of data. RakNet compensates for the out-of-order delivery and makes it reliable.<br />
<br />
<br />
'''NOTE:'''<br />
You may want to use an existing library if one exists for your language of choice.<br />
Here is an incomplete list. Not all of these are maintained or complete. If these are outdated you may need to change the protocol version to 9 before it can work. The protocol doesn't seem to have had any significant changes since the official implementation was discontinued in 2014, so as long as you bump the protocol version older libraries are likely to still work.<br />
<br />
{| class="wikitable sortable" style="width: auto; text-align: center;"[[Category:Bedrock Minecraft]]<br />
|-style="background:#eee"<br />
! Name<br />
!class="unsortable"| Description<br />
! Language<br />
! License<br />
! Active development<br />
|-<br />
! [https://github.com/NukkitX/Network NukkitX Network]<br />
| Network components used within NukkitX, but with great support for general use as well<br />
| Java<br />
| Apache License<br />
| Yes<br />
|-<br />
! [https://github.com/JRakNet/JRakNet JRakNet]<br />
| JRakNet is a networking library for Java which implements the UDP based protocol RakNet<br />
| Java<br />
| MIT<br />
| Yes<br />
|-<br />
! [https://github.com/jython234/JRakLibPlus JRakLibPlus]<br />
| A library for easy creation of RakNet servers, based on RakLib and JRakLib.<br />
| Java<br />
| LGPL<br />
| No<br />
|-<br />
! [https://github.com/pmmp/RakLib RakLib]<br />
| RakNet server implementation written in PHP. This library is very lightweight on actual implementation - it provides the bare minimum to get a Minecraft Pocket Edition server functional. It only currently provides server functionality, and does not support most RakNet features.<br />
| PHP<br />
| GPL<br />
| Yes<br />
|-<br />
! [https://www.npmjs.com/package/raknet/ raknet]<br />
| UDP network library that follows the RakNet protocol for Node.js<br />
| node.js<br />
| MIT<br />
| No<br />
|-<br />
! [https://pypi.org/project/PyRakLib/ PyRakLib]<br />
| PyRakLib is a networking library that follows the RakNet protocol for MCPE. It is ported from the PHP library RakLib. <br />
| Python<br />
| GPL<br />
| No<br />
|-<br />
! [https://github.com/facebookarchive/RakNet Raknet] (official)<br />
| The official implementation. Outdated and mostly for reference purposes. May not work with the latest Bedrock.<br />
| C++<br />
| BSD<br />
| No<br />
|}<br />
<br />
== Data types ==<br />
<br />
{| class="wikitable"<br />
|-<br />
!<br />
! Size (Bytes)<br />
! Range<br />
! Notes<br />
|-<br />
! byte<br />
| 1<br />
| 0 to 255<br />
|<br />
|-<br />
! Long<br />
| 8<br />
| -2^63 to 2^63-1<br />
| Signed 64-bit Integer<br />
|-<br />
! Magic<br />
| 16<br />
| <code>00ffff00fefefefefdfdfdfd12345678</code><br />
| Always those hex bytes, corresponding to RakNet's default OFFLINE_MESSAGE_DATA_ID<br />
|-<br />
! short<br />
| 2<br />
| -32768 to 32767<br />
| <br />
|-<br />
! unsigned short<br />
| 2<br />
| 0 to 65535<br />
| <br />
|-<br />
! string<br />
| unsigned short + string<br />
| N/A<br />
| class="col3" | Prefixed by a short containing the length of the string in characters. It appears that only the following ASCII characters can be displayed: !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~<br />
|-<br />
! boolean <br />
| 1<br />
| 0 to 1<br />
| True is encoded as <code>0x01</code>, false as <code>0x00</code>. <br />
|-<br />
! address<br />
| 7<br />
| <br />
| 1 byte for the IP version (4 or 6), followed by (for IPv4) 4 bytes for the IP and an unsigned short for the port number<br />
|-<br />
! uint24le<br />
| 3<br />
| <br />
| 3-byte little-endian unsigned integer<br />
|}<br />
<br />
== Handshake sequence ==<br />
<br />
# C→S: [[#Open Connection Request 1|Open Connection Request 1]]<br />
# S→C: [[#Open Connection Reply 1|Open Connection Reply 1]]<br />
# C→S: [[#Open Connection Request 2|Open Connection Request 2]]<br />
# S→C: [[#Open Connection Reply 2|Open Connection Reply 2]]<br />
<br />
From here on, the RakNet connection is established and all RakNet messages are contained in a [[#Frame Set Packet|Frame Set Packet]].<br />
<br />
This is currently incomplete<br />
<br />
== Packets ==<br />
<br />
=== Unconnected Ping ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x01, 0x02<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| MAGIC<br />
| magic<br />
| <br />
|-<br />
| Client GUID<br />
| Long<br />
| <br />
|}<br />
<br />
<code>0x02</code> is only replied to if there are open connections to the server. '''Note:''' as of 0.15.6 it seems that the game refreshes it's LAN world list every 4-5 seconds, however it seems the game will still ping in 1 second intervals.<br><br />
This packet should be responded to with unconnected Pong.<br />
<br />
=== Unconnected Pong ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x1c<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| MAGIC<br />
| magic<br />
| <br />
|-<br />
| Server ID string<br />
| string<br />
| Used for the MOTD. See below for details.<br />
|}<br />
<br />
'''Server ID string format'''<br />
<br />
For Minecraft Bedrock this is separated by semicolons and uses the following format:<br><br />
<code>Edition (MCPE or MCEE for Education Edition);MOTD line 1;Protocol Version;Version Name;Player Count;Max Player Count;Server Unique ID;MOTD line 2;Game mode;Game mode (numeric);Port (IPv4);Port (IPv6);</code><br><br />
Example:<br><br />
<code>MCPE;Dedicated Server;390;1.14.60;0;10;13253860892328930865;Bedrock level;Survival;1;19132;19133;</code><br><br />
Result:<br><br />
[[File:Server_ID_String_Example.png]]<br><br />
The Game mode and Game mode (numeric) values seem to not be used by the client.<br />
<br />
=== Connected Ping ===<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x00<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Connected Pong ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x03<br />
| Ping Time<br />
| Long<br />
| <br />
|-<br />
| Pong Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Open Connection Request 1 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x05<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Protocol version<br />
| byte<br />
| Currently 9<br />
|-<br />
| MTU<br />
| Zero padding<br />
| The MTU sent in the response appears to be somewhere around the size of this padding + 46 (28 udp overhead, 1 packet id, 16 magic, 1 protocol version). This padding seems to be used to discover the maximum packet size the network can handle.<br />
|}<br />
<br />
The client sends these to the target server with ever decreasing MTU until the server responds. This is used to discover the MTU size for the connection. According to the official docs, "The MTU size is the maximum size of a packet RakNet will generate", and "if you set the MTU size larger than your or any router along the network path takes, then the network will split the packet at best, or drop it at worst", so this process of sending decreasingly padded packets (compensating for the size of the packet itself and UDP overhead, which together make 48 bytes) seem to be used to discover the maximum packet size the network can handle. See the [http://www.jenkinssoftware.com/raknet/manual/programmingtips.html official documentation page] for more info about the MTU size. If the RakNet protocol does not match your own, respond with the Incompatible protocol packet.<br><br><br />
You should always respond to the first of these packets that you receive with Open Connection Reply 1, containing an MTU size of the amount of padding you received in bytes plus 46.<br />
<br />
=== Open Connection Reply 1 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x06<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| Use security<br />
| boolean<br />
| Make sure this is false, it is vital for the login sequence to continue!<br />
|-<br />
| MTU<br />
| short<br />
| see Open Connection Request 1<br />
|}<br />
<br />
=== Open Connection Request 2 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x07<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server Address<br />
| address<br />
| <br />
|-<br />
| MTU<br />
| short<br />
| <br />
|-<br />
| Client GUID<br />
| Long<br />
| <br />
|}<br />
<br />
=== Open Connection Reply 2 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x08<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| Client Address<br />
| address<br />
| <br />
|-<br />
| MTU<br />
| short<br />
| <br />
|-<br />
| Encryption enabled?<br />
| boolean<br />
| <br />
|}<br />
<br />
=== Connection Request ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x09<br />
| GUID<br />
| Long<br />
| <br />
|-<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Connection Request Accepted ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x10<br />
| Client address<br />
| address<br />
| <br />
|-<br />
| System index<br />
| short<br />
| Unknown what this does. 0 works as a value.<br />
|-<br />
| Internal IDs<br />
| 10x address<br />
| Unknown what these do. 255.255.255.255:19132 for all of them seems to work, any other address will probably work as well.<br />
|-<br />
| Request time<br />
| Long<br />
| <br />
|-<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Incompatible Protocol ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x19<br />
| Protocol<br />
| byte<br />
| <br />
|-<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
|}<br />
<br />
=== Unconnected Ping ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x01, 0x02<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| GUID<br />
| Long<br />
| <br />
|}<br />
<br />
=== Frame Set Packet ===<br />
{| class="wikitable"<br />
! Packet ID<br />
!colspan="3"| Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="11"| 0x80..0x8d<br />
|colspan="3"| Sequence number<br />
| uint24le<br />
| <br />
|-<br />
|rowspan="10"| Frames<br />
|colspan="2"| Flags<br />
| byte<br />
| Top 3 bits are reliability type, fourth bit is 1 when the frame is fragmented and part of a compound.<br />
|-<br />
|colspan="2"| Length IN BITS<br />
| short<br />
| Length of the body in bits.<br />
|-<br />
|colspan="2"| Reliable frame index<br />
| uint24le<br />
| only if reliable<br />
|-<br />
|colspan="2"| Sequenced frame index<br />
| uint24le<br />
| only if sequenced<br />
|-<br />
|rowspan="2"| Order<br />
| Ordered frame index<br />
| uint24le<br />
|rowspan="2"| only if ordered<br />
|-<br />
| Order channel<br />
| byte<br />
|-<br />
|rowspan="3"| Fragment<br />
| Compound size<br />
| int<br />
|rowspan="3"| only if fragmented<br />
|-<br />
| Compound ID<br />
| short<br />
|-<br />
| Index<br />
| int<br />
|-<br />
| Body<br />
| ceil(length/8) bytes<br />
|}<br />
<br />
The reliability types are as follows:<br />
<br />
{| class="wikitable"<br />
! style="text-align: center; font-weight: bold;" | ID<br />
! style="font-weight: bold;" | Name<br />
! style="text-align: center; font-weight: bold;" | Reliable<br />
! style="text-align: center; font-weight: bold;" | Ordered<br />
! style="text-align: center; font-weight: bold;" | Sequenced<br />
|-<br />
| style="text-align: center;" | 0<br />
| unreliable<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 1<br />
| unreliable sequenced<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
|-<br />
| style="text-align: center;" | 2<br />
| reliable<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 3<br />
| reliable ordered<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 4<br />
| reliable sequenced<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
|-<br />
| style="text-align: center;" | 5<br />
| unreliable (+ ACK receipt)<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 6<br />
| reliable (+ ACK receipt)<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 7<br />
| reliable ordered (+ ACK receipt)<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
|}<br />
<br />
Sequenced implies ordered.<br />
<br />
=== Game Packet ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x8e<br />
| Body<br />
| bytes<br />
| Single packet of the GAME protocol.<br />
|}<br />
<br />
=== NACK ===<br />
{| class="wikitable"<br />
! style="font-weight: bold;" | Packet ID<br />
! colspan="3" style="font-weight: bold;" | Field Name<br />
! style="font-weight: bold;" | Field Type<br />
! style="font-weight: bold;" | Notes<br />
|-<br />
| 0xa0<br />
| colspan="3" | Record count<br />
| short<br />
| <br />
|-<br />
| <br />
| rowspan="4" | Record<br />
| colspan="2" | Is Range?<br />
| byte<br />
| 0 for range, 1 for no range<br />
|-<br />
| <br />
| No Range<br />
| Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| rowspan="2" | Range<br />
| Start Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| End Index<br />
| uint24le<br />
| <br />
|}<br />
<br />
=== ACK ===<br />
{| class="wikitable"<br />
! style="font-weight: bold;" | Packet ID<br />
! colspan="3" style="font-weight: bold;" | Field Name<br />
! style="font-weight: bold;" | Field Type<br />
! style="font-weight: bold;" | Notes<br />
|-<br />
| 0xc0<br />
| colspan="3" | Record count<br />
| short<br />
| <br />
|-<br />
| <br />
| rowspan="4" | Record<br />
| colspan="2" | Is Range?<br />
| byte<br />
| 0 for range, 1 for no range<br />
|-<br />
| <br />
| No Range<br />
| Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| rowspan="2" | Range<br />
| Start Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| End Index<br />
| uint24le<br />
| <br />
|}<br />
<br />
[[Category:Bedrock Minecraft]]</div>Orladoghttps://wiki.vg/index.php?title=Bedrock_Protocol&diff=15851Bedrock Protocol2020-06-13T10:00:59Z<p>Orladog: Mention that packets can be batched</p>
<hr />
<div>:: '''Remember that this page is a WIP'''. Come back later to see a more complete page.<br />
----<br />
<br />
{{Box<br />
|BORDER = #9999FF<br />
|BACKGROUND = #99CCFF<br />
|WIDTH = 100%<br />
|ICON = <br />
|HEADING = Heads up!<br />
|CONTENT = This article is about the protocol for the latest '''stable''' release of Minecraft '''Bedrock Edition''' ([[Bedrock Protocol version numbers|1.14.60, protocol 390]]). See [[Protocol]] for the Java Edition Protocol.<br />
}}<br />
<br />
This is the [https://minecraft.gamepedia.com/Bedrock_Edition Bedrock Edition] Protocol Documentation.<br />
The Bedrock Edition Protocol uses [[wikipedia:User Datagram Protocol|UDP]] instead of [[wikipedia:Transmission Control Protocol|TCP]] that is used for the Java Edition.<br />
Bedrock Edition uses [[Raknet Protocol|RakNet]] as its protocol library.<br />
<br />
The default Bedrock Edition port is 19132.<br />
<br />
Information for this page was obtained from the [https://github.com/NukkitX/Protocol NukkitX Protocol library], [https://github.com/NiclasOlofsson/MiNET MiNET] and [https://github.com/Sandertv/gophertunnel gophertunnel].<br />
<br />
<br />
== Data types ==<br />
<br />
{| class="wikitable"<br />
|-<br />
!<br />
! Size (Bytes)<br />
! Range<br />
! Notes<br />
|-<br />
! Byte<br />
| 1<br />
| 0 to 255<br />
|<br />
|-<br />
! Boolean<br />
| 1<br />
| 0 or 1<br />
| A Byte treated as boolean, 0 is false but anything greater then that is true<br />
|-<br />
! Short<br />
| 2<br />
| -32768 to 32767<br />
|<br />
|-<br />
! Unsigned Short<br />
| 2<br />
| 0 to 65535<br />
|<br />
|-<br />
! Int<br />
| 4<br />
| -2147483648 to 2147483647<br />
| Signed little-endian 32-bit Integer<br />
|-<br />
! Int (big endian)<br />
| 4<br />
| -2147483648 to 2147483647<br />
| Signed big-endian 32-bit Integer<br />
|-<br />
! Unsigned Int<br />
| 4<br />
| 0 to 4294967295<br />
| Unsigned 32-bit Integer<br />
|-<br />
! Long<br />
| 8<br />
| -2^63 to 2^63-1<br />
| Signed 64-bit Integer<br />
|-<br />
! Unsigned Long<br />
| 8<br />
| 2^64-1<br />
| Unsigned 64-bit Integer<br />
|-<br />
! Float<br />
| 4<br />
| <br />
| A [[wikipedia:Single-precision_Floating-poInt_format|single-precision 32-bit IEEE 754 Floating poInt number]]<br />
|-<br />
! Double<br />
| 8<br />
| <br />
| A [[wikipedia:Double-precision_Floating-poInt_format|Double-precision 64-bit IEEE 754 Floating poInt number]]<br />
|-<br />
! VarInt<br />
| &ge; 1<br>&le; 5<br />
| 0 to 4294967295<br />
| <br />
|-<br />
! SignedVarInt<br />
| &ge; 1<br>&le; 5<br />
| -2147483648 and 2147483647<br />
| <br />
|-<br />
! VarLong<br />
| &ge; 1<br>&le; 10<br />
| <br />
|<br />
|-<br />
! SignedVarLong<br />
| &ge; 1<br>&le; 10<br />
| -2^63 and 2^63-1<br />
|<br />
|-<br />
! String<br />
| <br />
| <br />
| [[wikipedia:UTF-8|UTF-8]] String prefixed with its size in Bytes as a VarInt. This has the same data structure as a ByteArray but it contains textual data.<br />
|-<br />
! Vector3<br />
| 12<br />
| <br />
| Three Float values (X, Y and Z respectively)<br />
|-<br />
! Vector2<br />
| 8<br />
| <br />
| Two Float values (X and Y respectively)<br />
|-<br />
! NBT<br />
| <br />
| <br />
| <br />
|-<br />
! ByteArray<br />
| <br />
| <br />
| An arbitrary array of Bytes prefixed with its size in Bytes as a VarInt.<br />
|-<br />
! BlockCoordinates<br />
| &ge; 3<br>&le; 15<br />
| <br />
| A SignedVarInt, a normal VarInt and another SignedVarInt (X, Y and Z respectively)<br />
|-<br />
! PlayerLocation<br />
| 15<br />
| <br />
| Three Float values (X, Y and Z respectively), followed by three Bytes (pitch, head yaw and yaw respectively). To convert the Bytes to normal pitch and yaw values divide them by 0.71<br />
|-<br />
! UUID<br />
| 16<br />
| A [[wikipedia:Universally_unique_identifier|UUID]]<br />
| Encoded as two unsigned 64-bit Integers: the most significant 64 bits and the least significant 64 bits<br />
|-<br />
! Item<br />
| <br />
| <br />
|<br />
|-<br />
! ItemStacks<br />
| <br />
| <br />
|<br />
|-<br />
! Itemstates<br />
| <br />
| <br />
|<br />
|-<br />
! EntityAttributes<br />
| <br />
| <br />
|<br />
|-<br />
! PlayerAttributes<br />
| <br />
| <br />
|<br />
|-<br />
! Skin<br />
| <br />
| <br />
|<br />
|-<br />
! Recipes<br />
| <br />
| <br />
|<br />
|-<br />
! GameRules<br />
| <br />
| <br />
| <br />
|-<br />
! Transaction<br />
| <br />
| <br />
| <br />
|-<br />
! BlockPalette<br />
| <br />
| <br />
|<br />
|-<br />
! ScoreEntries<br />
| <br />
| <br />
|<br />
|-<br />
! MapInfo<br />
| <br />
| <br />
|<br />
|-<br />
! PlayerRecords<br />
| <br />
| <br />
|<br />
|-<br />
! ScoreboardIdentityEntries<br />
| <br />
| <br />
|<br />
|-<br />
! MetadataDictionary<br />
| <br />
| <br />
| <br />
|-<br />
! PotionTypeRecipe<br />
| <br />
| <br />
| <br />
|-<br />
! PotionContainerChangeRecipe<br />
| <br />
| <br />
| <br />
|-<br />
! ResourcePackInfos<br />
| <br />
| <br />
|<br />
|-<br />
! ResourcePackIdVersions<br />
| <br />
| <br />
|<br />
|-<br />
! ResourcePackIds<br />
| <br />
| <br />
| <br />
|}<br />
<br />
== Packet Format ==<br />
<br />
Bedrock Edition uses [[Raknet Protocol|RakNet]] as its protocol library, so the packets are sent that way. The UDP protocol specifies packet length, so unlike Java Edition and TCP which deal with raw data streams packets are not length-prefixed. Packets seem to always use compression and can also use encryption. Multiple packets can also be batched into a single packet.<br />
Packet compression uses [https://zlib.net/ zlib], and it seems that packet data can be fed directly into zlib (after being decrypted if encryption is enabled).<br />
<br><br><br />
Refer to [https://github.com/Sandertv/gophertunnel/blob/19c96251a36a39d9ffb938053410852e811755e3/minecraft/protocol/packet/decoder.go#L58 gophertunnel] for more information.<br />
<br />
== Login process ==<br />
The login process is as follows:<br />
# C→S: [[#Login|Login]]<br />
# S→C: [[#Server To Client Handshake|Server To Client Handshake]]<br />
# C→S: [[#Client To Server Handshake|Client To Server Handshake]]<br />
# S→C: [[#Play Status|Play Status]] (Login success)<br />
<br />
To spawn, the following packets should be sent, in order, after the ones above:<br />
# S→C: [[#Resource Packs Info|Resource Packs Info]]<br />
# C→S: [[#Resource Pack Client Response|Resource Pack Client Response]]<br />
# S→C: [[#Resource Pack Stack|Resource Pack Stack]]<br />
# C→S: [[#Resource Pack Client Response|Resource Pack Client Response]]<br />
# S→C: [[#Start Game|Start Game]]<br />
# S→C: [[#Biome Definition List|Biome Definition List]]<br />
# S→C: Chunks<br />
# S→C: [[#Play Status|Play Status]] (Player spawn)<br />
<br />
If there are no resource packs being sent, a [[#Resource Pack Stack|Resource Pack Stack]] can be sent directly after [[#Resource Packs Info|Resource Packs Info]] to avoid the client responses.<br />
<br />
== Packets ==<br />
Please note that some packet ids are missing, so they don't line up.<br />
The following packet ids are missing:<br />
0x10, 0x74, 0x7F, 0x80<br />
(16, 116, 127, 128)<br />
<br />
==== Login ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x01<br />
|rowspan="3"| Server<br />
| Protocol version<br />
| Int (big-endian)<br />
| <br />
|-<br />
| Chain data<br />
| JSON array of JWT Data<br />
| Contains the display name, UUID and XUID<br />
|-<br />
| Skin data<br />
| JWT Data<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Play Status ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x02<br />
|rowspan="1"| Client<br />
| Status<br />
| Int (big-endian)<br />
| The current status of the connection.<br />
|}<br />
<br />
The values for each status are as follows:<br />
* 0: Login success<br />
* 1: Failed client<br />
* 2: Failed server<br />
* 3 Player spawn<br />
* 4 Failed invalid Tenant<br />
* 5: Failed Vanilla Edu.<br />
* 6: Failed Edu. Vanilla<br />
* 7: Failed server full<br />
<br />
==== Server To Client Handshake ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x03<br />
|rowspan="1"| Client<br />
| JWT data<br />
| JWT String<br />
| Contains the salt to complete the Diffie-Hellman key exchange<br />
|}<br />
<br />
<br />
<br />
==== Client To Server Handshake ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x04<br />
|rowspan="1"| Server<br />
<br />
|}<br />
<br />
Sent by the client in response to a ServerToClientHandshake packet sent by theserver. It is the first encrypted packet in the login handshake and serves as a confirmation that encryption is correctly initialised client side. It has no fields.<br />
<br />
==== Disconnect ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x05<br />
|rowspan="2"| Client<br />
| Hide disconnect screen<br />
| Boolean<br />
| Specifies if the disconnection screen should be hidden when the client is disconnected, meaning it will be sent directly to the main menu.<br />
|-<br />
| Kick message<br />
| String<br />
| An optional message to show when disconnected.<br />
|}<br />
<br />
==== Resource Packs info ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x06<br />
|rowspan="4"| Client<br />
| Forced to Accept<br />
| Boolean<br />
| If the resource pack requires the client accept it.<br />
|-<br />
| Scripting Enabled<br />
| Boolean<br />
| If scripting is enabled.<br />
|-<br />
| BehahaviorPackInfos<br />
| ResourcePackInfo[]<br />
| A list of behaviour packs that the client needs to download before joining the server. All of these behaviour packs will be applied together.<br />
|-<br />
| ResourcePackInfos<br />
| ResourcePackInfo[]<br />
| A list of resource packs that the client needs to download before joining the server. The order of these resource packs is not relevant in this packet. It is however important in the Resource Pack Stack packet.<br />
|}<br />
<br />
<br />
<br />
==== Resource Pack Stack ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! colspan="2" | Field Name<br />
! colspan="2" | Field Type<br />
! Notes<br />
|-<br />
| rowspan="11" | 0x07<br />
| rowspan="11" | Client<br />
| colspan="2" | Forced to Accept<br />
| colspan="2" | Boolean<br />
| If the resource pack must be accepted for the player to join the server.<br />
|-<br />
! Resource Pack Entry<br />
! Field Name<br />
! colspan="2" | <br />
! <br />
|-<br />
| rowspan="3" | Array<br />
| Pack ID<br />
| colspan="2" | String<br />
| The ID of the resource pack.<br />
|-<br />
| Pack Version<br />
| colspan="2" | String<br />
| The version of the resource pack.<br />
|-<br />
| Subpack Name<br />
| colspan="2" | String<br />
| The subpack name of the resource pack.<br />
|-<br />
! Behavior Pack Entry<br />
! Field Name<br />
! colspan="2" | <br />
! <br />
|-<br />
| rowspan="3" | Array<br />
| Pack ID<br />
| colspan="2" | String<br />
| The ID of the resource pack.<br />
|-<br />
| Pack Version<br />
| colspan="2" | String<br />
| The version of the resource pack.<br />
|-<br />
| Subpack Name<br />
| colspan="2" | String<br />
| The subpack name of the resource pack.<br />
|-<br />
| colspan="2" | Experimental<br />
| colspan="2" | Boolean<br />
| If the sent resource and behavior packs are experimental.<br />
|-<br />
| colspan="2" | Game Version<br />
| colspan="2" | String<br />
| The version of the game the sent resource and behavior packs were made for.<br />
|}<br />
<br />
==== Resource Pack Response ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x08<br />
|rowspan="2"| Server<br />
| Status<br />
| Byte<br />
| See below<br />
|-<br />
| Pack IDs<br />
| ResourcePackIds<br />
| All of the pack IDs.<br />
|}<br />
<br />
The values for each status are as follows:<br />
* 0: None<br />
* 1: Refused<br />
* 2: Send packs<br />
* 3: Have all packs<br />
* 4: Completed<br />
<br />
==== Text ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! colspan="2" | Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| rowspan="9" | 0x09<br />
| rowspan="9" | Server &amp; Client<br />
| colspan="2" | Type<br />
| Byte<br />
| The type of chat message sent.<br />
|-<br />
| colspan="2" | Needs Translation<br />
| Boolean<br />
| If the message sent is a translation key and needs to be translated.<br />
|-<br />
! Chat Type ID<br />
! Text<br />
! <br />
! Derived from above; values sent here change depending on that.<br />
|-<br />
| rowspan="1" | 0, 1, or 2<br />
| rowspan="1" | Source Name<br />
| rowspan="1" | String<br />
| rowspan="1" | The name of the source.<br />
|-<br />
|-<br />
|-<br />
| rowspan="1" | 3, 4, or 5<br />
| rowspan="1" | Message<br />
| rowspan="1" | String<br />
| rowspan="1" | The message sent with the packet.<br />
|-<br />
|-<br />
|-<br />
|-<br />
| rowspan="2" | 6, 7, or 8<br />
| Message<br />
| String<br />
| The message sent with the packet<br />
|-<br />
| Parameters<br />
| Array<br />
| The parameters sent with the packet. This usually includes translation parameters or similar types depending on what kind of chat type was sent.<br />
|-<br />
| colspan="2" | XUID<br />
| Optional String<br />
| The XUID of the player who sent this message.<br />
|-<br />
| colspan="2" | Platform Chat ID<br />
| Optional String<br />
| The platform chat ID of the sent message.<br />
|}<br />
<br />
{| class="wikitable"<br />
! ID<br />
! Chat Type<br />
|-<br />
| 0<br />
| Chat<br />
|-<br />
| 1<br />
| Whisper<br />
|-<br />
| 2<br />
| Announcement<br />
|-<br />
| 3<br />
| Raw<br />
|-<br />
| 4<br />
| Tip<br />
|-<br />
| 5<br />
| System<br />
|-<br />
| 6<br />
| Translation<br />
|-<br />
| 7<br />
| Popup<br />
|-<br />
| 8<br />
| Jukebox Popup<br />
|}<br />
<br />
For additional information and examples of all the chat types above, see here: https://imgur.com/a/KhcFscg<br />
<br />
==== Set Time ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x0A<br />
|rowspan="1"| Client<br />
| Time<br />
| SignedVarInt<br />
| Time is the current time. The time is not limited to 24000 (time of day), but continues progressing after that.<br />
|}<br />
<br />
SetTime is sent by the server to update the current time client-side. The client actually advances time client-side by itself, so this packet does not need to be sent each tick. It is merely a means of synchronising time between server and client.<br />
<br />
==== Start Game ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="47"| 0x0B<br />
|rowspan="47"| Client<br />
| Entity ID Self<br />
| SignedVarLong<br />
| The unique ID of the player. The unique ID is a value that remains consistent across different sessions of the same world, but most unofficial servers simply fill the runtime ID of the entity out for this field.<br />
|-<br />
| Runtime Entity ID<br />
| VarLong<br />
| The runtime ID of the player. The runtime ID is unique for each world session, and entities are generally identified in packets using this runtime ID.<br />
|-<br />
| Player Gamemode<br />
| SignedVarInt<br />
|-<br />
| Spawn<br />
| Vector3<br />
| The spawn position of the player in the world. In servers this is often the same as the world's spawn position found below.<br />
|-<br />
| Rotation<br />
| Vector2<br />
| The pitch and yaw of the player<br />
|-<br />
| Seed<br />
| SignedVarInt<br />
| The seed used to generate the world. Unlike in Java edition, the seed is a 32bit Integer here.<br />
|-<br />
| Dimension<br />
| SignedVarInt<br />
| Dimension is the ID of the dimension that the player spawns in. It is a value from 0-2, with 0 being the overworld, 1 being the nether and 2 being the end.<br />
|-<br />
| Generator<br />
| SignedVarInt<br />
| Generator is the generator used for the world. It is a value from 0-4, with 0 being old limited worlds, 1 being infinite worlds, 2 being flat worlds, 3 being nether worlds and 4 being end worlds. A value of 0 will actually make the client stop rendering chunks you send beyond the world limit.<br />
|-<br />
| World Gamemode<br />
| SignedVarInt<br />
| The game mode that a player gets when it first spawns in the world. It is shown in the settings and is used if the Player Gamemode is set to 5.<br />
|-<br />
| Difficulty<br />
| SignedVarInt<br />
| Difficulty is the difficulty of the world. It is a value from 0-3, with 0 being peaceful, 1 being easy, 2 being normal and 3 being hard.<br />
|-<br />
| World Spawn<br />
| BlockCoordinates <br />
| The block on which the world spawn of the world. This coordinate has no effect on the place that the client spawns, but it does have an effect on the direction that a compass poInts.<br />
|-<br />
| Has achievements disabled<br />
| Boolean<br />
| Defines if achievements are disabled in the world. The client crashes if this value is set to true while the player's or the world's game mode is creative, and it's recommended to simply always set this to false as a server.<br />
|-<br />
| Day cycle stop time<br />
| SignedVarInt<br />
| The time at which the day cycle was locked if the day cycle is disabled using the respective game rule. The client will maIntain this time as Boolean as the day cycle is disabled.<br />
|-<br />
| EDU offer<br />
| SignedVarInt<br />
| Some Minecraft: Education Edition field that specifies what 'region' the world was from, with 0 being None, 1 being RestOfWorld, and 2 being China. The actual use of this field is unknown.<br />
|-<br />
| Has Education Edition features enabled<br />
| Boolean<br />
| Specifies if the world has education edition features enabled, such as the blocks or entities specific to education edition.<br />
|-<br />
| Rain level<br />
| Float<br />
| The level specifying the Intensity of the rain falling. When set to 0, no rain falls at all.<br />
|-<br />
| Lightning level<br />
| Float<br />
| The level specifying the Intensity of the thunder. This may actually be set independently from the rain level, meaning dark clouds can be produced without rain.<br />
|-<br />
| Has Confirmed Platform Locked Content<br />
| Boolean<br />
| <br />
|-<br />
| Is Multiplayer<br />
| Boolean<br />
| Specifies if the world is a multi-player game. This should always be set to true for servers.<br />
|-<br />
| Broadcast To LAN<br />
| Boolean<br />
| Specifies if LAN broadcast was Intended to be enabled for the world.<br />
|-<br />
| Xbox Live Broadcast Mode<br />
| VarInt<br />
| The mode used to broadcast the joined game across XBOX Live.<br />
|-<br />
| Platform Broadcast Mode<br />
| VarInt<br />
| The mode used to broadcast the joined game across the platform.<br />
|-<br />
| Enable commands<br />
| Boolean<br />
| If commands are enabled for the player. It is recommended to always set this to true on the server, as setting it to false means the player cannot, under any circumstance, use a command.<br />
|-<br />
| Are texture packs required<br />
| Boolean<br />
| Specifies if the texture pack the world might hold is required, meaning the client was forced to download it before joining.<br />
|-<br />
| GameRules<br />
| GameRules<br />
| Defines game rules currently active with their respective values. The value of these game rules may be either 'bool', 'Int32' or 'Float32'. Some game rules are server side only, and don't necessarily need to be sent to the client.<br />
|-<br />
| Bonus Chest<br />
| Boolean<br />
| Specifies if the world had the bonus map setting enabled when generating it. It does not have any effect client-side.<br />
|-<br />
| Map Enabled<br />
| Boolean<br />
| Specifies if the world has the start with map setting enabled, meaning each joining player obtains a map. This should always be set to false, because the client obtains a map all on its own accord if this is set to true.<br />
|-<br />
| Permission Level<br />
| SignedVarInt<br />
| The permission level of the player. It is a value from 0-3, with 0 being visitor, 1 being member, 2 being operator and 3 being custom.<br />
|-<br />
| Server Chunk Tick Range<br />
| Int<br />
| The radius around the player in which chunks are ticked. Most servers set this value to a fixed number, as it does not necessarily affect anything client-side.<br />
|-<br />
| Has Locked Behavior Pack<br />
| Boolean<br />
| Specifies if the texture pack of the world is locked, meaning it cannot be disabled from the world. This is typically set for worlds on the marketplace that have a dedicated texture pack.<br />
|-<br />
| Has Locked Resource Pack<br />
| Boolean<br />
| Specifies if the texture pack of the world is locked, meaning it cannot be disabled from the world. This is typically set for worlds on the marketplace that have a dedicated texture pack.<br />
|-<br />
| Is From Locked World Template<br />
| Boolean<br />
| Specifies if the world from the server was from a locked world template. For servers this should always be set to false.<br />
|-<br />
| Use MSA Gamertags Only<br />
| Boolean<br />
| <br />
|-<br />
| Is From World Template<br />
| Boolean<br />
| Specifies if the world from the server was from a locked world template. For servers this should always be set to false.<br />
|-<br />
| Is World Template Option Locked<br />
| Boolean<br />
| Specifies if the world was a template that locks all settings that change properties above in the settings GUI. It is recommended to set this to true for servers that do not allow things such as setting game rules through the GUI.<br />
|-<br />
| Only Spawn V1 Villagers<br />
| Boolean<br />
| A hack that Mojang put in place to preserve backwards compatibility with old villagers. The his never actually read though, so it has no functionality.<br />
|-<br />
| Game Version<br />
| String<br />
| The version of the game from which Vanilla features will be used. The exact function of this field isn't clear.<br />
|-<br />
| Level ID<br />
| String<br />
| A base64 encoded world ID that is used to identify the world.<br />
|-<br />
| World name<br />
| String<br />
| The name of the world that the player is joining. Note that this field shows up above the player list for the rest of the game session, and cannot be changed. Setting the server name to this field is recommended.<br />
|-<br />
| Premium World Template Id<br />
| String<br />
| A UUID specific to the premium world template that might have been used to generate the world. Servers should always fill out an empty String for this.<br />
|-<br />
| Is Trial<br />
| Boolean<br />
| Specifies if the world was a trial world, meaning features are limited and there is a time limit on the world.<br />
|-<br />
| Is Server Side movement enabled<br />
| Boolean<br />
| Specifies if the server is authoritative over the movement of the player, meaning it controls the movement of it.<br />
|-<br />
| Current Tick<br />
| Boolean<br />
| The total time in ticks that has elapsed since the start of the world.<br />
|-<br />
| Enchantment Seed<br />
| SignedVarInt<br />
| The seed used to seed the random used to produce enchantments in the enchantment table. Note that the exact correct random implementation must be used to produce the correct results both client- and server-side.<br />
|-<br />
| Block Palette<br />
| BlockPalette<br />
| A list of all blocks registered on the server.<br />
|-<br />
| Itemstates<br />
| Itemstates<br />
| A list of all items with their legacy IDs which are available in the game. Failing to send any of the items that are in the game will crash mobile clients.<br />
|-<br />
| Multiplayer Correlation ID<br />
| String<br />
| A unique ID specifying the multi-player session of the player. A random UUID should be filled out for this field.<br />
|}<br />
<br />
==== Add Player ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="19"| 0x0C<br />
|rowspan="19"| Client<br />
| UUID<br />
| UUID<br />
| UUID is the UUID of the player. It is the same UUID that the client sent in the Login packet at the start of the session. A player with this UUID must exist in the player list (built up using the Player List packet) for it to show up in-game.<br />
|-<br />
| Username<br />
| String<br />
| Username is the name of the player. This username is the username that will be set as the initial name tag of the player.<br />
|-<br />
| Entity ID Self<br />
| SignedVarLong<br />
| The unique ID of the player. The unique ID is a value that remains consistent across different sessions of the same world, but most unoffical servers simply fill the runtime ID of the player out for this field.<br />
|-<br />
| Runtime Entity ID<br />
| VarLong<br />
| The runtime ID of the player. The runtime ID is unique for each world session, and entities are generally identified in packets using this runtime ID.<br />
|-<br />
| Platform Chat ID<br />
| String<br />
| An identifier only set for particular platforms when chatting (presumably only for Nintendo Switch). It is otherwise an empty string, and is used to decide which players are able to chat with each other.<br />
|-<br />
| Position<br />
| Vector3<br />
| The position to spawn the player at. If the player is at a distance that the viewer cannot see, the player will still show up if the viewer moves closer.<br />
|-<br />
| Velocity<br />
| Vector3<br />
| The initial velocity the player spawns with. This velocity will initiate client side movement of the player.<br />
|-<br />
| Rotation<br />
| Float<br />
| Pitch, yaw and head yaw<br />
|-<br />
| Held Item<br />
| Item<br />
| The item that the player is holding. The item is shown to the viewer as soon as the player itself shows up. Needless to say that this field is rather pointless, as additional packets still must be sent for armour to show up.<br />
|-<br />
| Metadata<br />
| MetadataDictionary<br />
| A map of entity metadata, which includes flags and data properties that alter in particular the way the player looks. Flags include ones such as 'on fire' and 'sprinting'. The metadata values are indexed by their property key.<br />
|-<br />
| Flags<br />
| VarInt<br />
| Flags is a set of flags that specify certain properties of the player, such as whether or not it can fly and/or move through blocks.<br />
|-<br />
| Command permission<br />
| VarInt<br />
| A set of permissions that specify what commands a player is allowed to execute.<br />
|-<br />
| Action Permissions<br />
| VarInt<br />
| Action Permissions is, much like Flags, a set of flags that specify actions that the player is allowed to undertake, such as whether it is allowed to edit blocks, open doors etc.<br />
|-<br />
| Permission Level<br />
| VarInt<br />
| The permission level of the player as it shows up in the player list built up using the PlayerList packet.<br />
|-<br />
| Custom stored permissions<br />
| VarInt<br />
| <br />
|-<br />
| User Id<br />
| Long<br />
| A unique identifier of the player. It appears it is not required to fill this field out with a correct value. Simply writing 0 seems to work.<br />
|-<br />
| Links<br />
| Links<br />
| A list of entity links that are currently active on the player. These links alter the way the player shows up when first spawned in terms of it shown as riding an entity. Setting these links is important for new viewers to see the player is riding another entity.<br />
|-<br />
| Device ID<br />
| String<br />
| The device ID set in one of the files found in the storage of the device of the player. It may be changed freely, so it should not be relied on for anything.<br />
|-<br />
| Device OS<br />
| Int<br />
| The build platform/device OS of the player that is about to be added, as it sent in the Login packet when joining.<br />
|}<br />
<br />
Add Player is sent by the server to the client to make a player entity show up client-side. It is one of the few entities that cannot be sent using the AddActor packet.<br />
<br />
==== Add Entity ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="9"| 0x0D<br />
|rowspan="9"| Client<br />
| Entity ID Self<br />
| SignedVarLong<br />
| The unique ID of the entity. The unique ID is a value that remains consistent across different sessions of the same world, but most unofficial servers simply fill the runtime ID of the entity out for this field.<br />
|-<br />
| Runtime Entity ID<br />
| VarLong<br />
| The runtime ID of the entity. The runtime ID is unique for each world session, and entities are generally identified in packets using this runtime ID.<br />
|-<br />
| Entity Type<br />
| String<br />
| The string entity type of the entity, for example 'minecraft:skeleton'.<br />
|-<br />
| Position<br />
| Vector3<br />
| The position to spawn the entity at. If the entity is at a distance that the player cannot see, the entity will still show up if the player moves closer.<br />
|-<br />
| Velocity<br />
| Vector3<br />
| The initial velocity the entity spawns with. This velocity will initiate client side movement of the entity.<br />
|-<br />
| Rotation<br />
| Vector3<br />
| Pitch, yaw and head yaw<br />
|-<br />
| Attributes<br />
| EntityAttributes<br />
| A slice of attributes that the entity has. It includes attributes such as its health, movement speed, etc.<br />
|-<br />
| Metadata<br />
| MetadataDictionary<br />
| A map of entity metadata, which includes flags and data properties that alter in particular the way the entity looks. Flags include ones such as 'on fire' and 'sprinting'. The metadata values are indexed by their property key.<br />
|-<br />
| Links<br />
| Links<br />
| A list of entity links that are currently active on the entity. These links alter the way the entity shows up when first spawned in terms of it shown as riding an entity. Setting these links is important for new viewers to see the entity is riding another entity.<br />
|}<br />
<br />
Sent by the server to the client to spawn an entity to the player. It is used for every entity except other players, paintings and items, for which the Add Player, Add Painting and Add Item Entity packets are used.<br />
<br />
==== Remove Entity ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x0E<br />
|rowspan="1"| Client<br />
| Unique Entity Id<br />
| SignedVarLong<br />
| The unique ID of the entity to be removed. The unique ID is a value that remains consistent across different sessions of the same world, but most unofficial servers simply fill the runtime ID of the entity out for this field.<br />
|}<br />
<br />
Sent by the server to remove an entity that currently exists in the world from the client-side. Sending this packet if the client cannot already see this entity will have no effect.<br />
<br />
==== Add Item Entity ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="7"| 0x0F<br />
|rowspan="7"| Client<br />
| Entity ID Self<br />
| SignedVarLong<br />
| The unique ID of the entity. The unique ID is a value that remains consistent across different sessions of the same world, but most unofficial servers simply fill the runtime ID of the entity out for this field.<br />
|-<br />
| Runtime Entity ID<br />
| VarLong<br />
| The runtime ID of the entity. The runtime ID is unique for each world session, and entities are generally identified in packets using this runtime ID.<br />
|-<br />
| Item<br />
| Item<br />
| The item that is spawned. It must have a valid ID for it to show up client-side. If it is not a valid item, the client will crash when coming near.<br />
|-<br />
| Position<br />
| Vector3<br />
| The position to spawn the entity on. If the entity is at a distance that the player cannot see, the entity will still show up if the player moves closer.<br />
|-<br />
| Velocity<br />
| Vector3<br />
| The initial velocity the entity spawns with. This velocity will initiate client side movement of the entity.<br />
|-<br />
| Metadata<br />
| MetadataDictionary<br />
| A map of entity metadata, which includes flags and data properties that alter in particular the way the entity looks. Flags include ones such as 'on fire' and 'sprinting'. The metadata values are indexed by their property key.<br />
|-<br />
| Is From Fishing<br />
| Boolean<br />
| Specifies if the item was obtained by fishing it up using a fishing rod. It is not clear why the client needs to know this.<br />
|}<br />
<br />
Sent by the server to the client to make an item entity show up. It is one of the few entities that cannot be sent using the AddActor packet.<br />
<br />
==== Take Item Entity ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x11<br />
|rowspan="2"| Client<br />
| Item Runtime Entity Id<br />
| VarLong<br />
| the entity runtime ID of the item that is being taken by another entity. It will disappear to viewers after showing the pick-up animation.<br />
|-<br />
| Runtime Entity Id<br />
| VarLong<br />
| The runtime ID of the entity that took the item, which is usually a player, but could be another entity like a zombie too.<br />
|}<br />
<br />
Sent by the server when a player picks up an item entity. It makes the item entity disappear to viewers and shows the pick-up animation.<br />
<br />
==== Move Entity Absolute ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x12<br />
|rowspan="4"| Server & Client<br />
| Runtime entity id<br />
| VarLong<br />
| The runtime ID of the entity. The runtime ID is unique for each world session, and entities are generally identified in packets using this runtime ID.<br />
|-<br />
| Flags<br />
| byte<br />
| A combination of flags that specify details of the movement. See below for more info.<br />
|-<br />
| Position<br />
| PlayerLocation<br />
| <br />
|}<br />
<br />
{| class="wikitable"<br />
|-<br />
! Field<br />
! Bit<br />
! Notes<br />
|-<br />
| On ground<br />
| 0x01<br />
| If the entity is touching the ground<br />
|-<br />
| Telported<br />
| 0x02<br />
|<br />
|}<br />
<br />
Sent by the server to move an entity to an absolute position. It is typically used for movements where high accuracy isn't needed, such as for long range teleporting.<br />
This packet is also sent by the client when riding a horse/donkey.<br />
<br />
==== Move Player ====<br />
<br />
Sent by players to send their movement to the server, and by the server to update the movement of player entities to other players.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="8"| 0x13<br />
|rowspan="8"| Server & Client<br />
| Runtime entity id<br />
| VarLong<br />
| The runtime ID of the player. The runtime ID is unique for each world session, and entities are generally identified in packets using this runtime ID.<br />
|-<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| Rotation<br />
| Vector3<br />
| Pitch, yaw and head yaw<br />
|-<br />
| Mode<br />
| Byte<br />
| <br />
|-<br />
| On ground<br />
| Boolean<br />
| Specifies if the player is considered on the ground. Note that proxies or hacked clients could fake this to always be true, so it should not be taken for granted.<br />
|-<br />
| Riding runtime entity id<br />
| Float<br />
| The runtime ID of the entity that the player might currently be riding. If not riding, this should be left 0.<br />
|-<br />
| Teleportation cause<br />
| VarLong<br />
| See below. Only needs to exist if Mode cause is 2 (teleport).<br />
|-<br />
| Entity type<br />
| Byte<br />
| Only needs to exist if Mode cause is 2 (teleport).<br />
|}<br />
<br />
Modes:<br />
* 0: Normal<br />
* 1: Reset<br />
* 2: Teleport<br />
* 3: Rotation<br />
<br />
Teleportation causes:<br />
* 0: Unknown<br />
* 1: Projectile<br />
* 2: Chorus fruit<br />
* 3: Command<br />
* 4: Behavior<br />
<br />
==== Rider Jump ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x14<br />
|rowspan="1"| Server & Client<br />
| Jump Strength<br />
| SignedVarInt<br />
| The strength of the jump, depending on how long the rider has held the jump button.<br />
|}<br />
<br />
Sent by the client to the server when it jumps while riding an entity that has the WASDControlled entity flag set, for example when riding a horse. According to MiNET this can also be sent from the server to the client, but details on this are unknown.<br />
<br />
==== Update Block ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x15<br />
|rowspan="4"| Client<br />
| Coordinates<br />
| BlockCoordinates<br />
| The block position at which a block is updated.<br />
|-<br />
| Block Runtime ID<br />
| VarInt<br />
| The runtime ID of the block that is placed at Position after sending the packet to the client. The runtime ID must point to a block sent in the list in the Start Game packet.<br />
|-<br />
| Flags<br />
| VarInt<br />
| See below. Flags is a combination of flags that specify the way the block is updated client-side. It is a combination of the flags below, but typically sending only the Network flag is sufficient.<br />
|-<br />
| Layer<br />
| VarInt<br />
| The world layer on which the block is updated. In Bedrock, multiple blocks can be put in the same location using layers. The second layer is usually used for liquids, so blocks can be inside a liquid. For most blocks, this is the first layer, as that layer is the default layer to place blocks on, but for blocks inside of each other, this differs. As this system is designed with liquids, there may be bugs when using this to place blocks inside each other. For example, placing an interactable block such as an item frame on the second layer can cause a game crash if the player tries to interact with it.<br />
|}<br />
<br />
{| class="wikitable"<br />
|-<br />
! Field<br />
! Bit<br />
! Notes<br />
|-<br />
| Neighbors<br />
| 0x01<br />
| <br />
|-<br />
| Network<br />
| 0x02<br />
|<br />
|-<br />
| No Graphic<br />
| 0x04<br />
|<br />
|-<br />
| Priority<br />
| 0x08<br />
|<br />
|}<br />
<br />
Sent by the server to update a block client-side, without resending the entire chunk that the block is located in. It is particularly useful for small modifications like block breaking/placing.<br />
<br />
==== Add Painting ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x16<br />
|rowspan="5"| Client<br />
| Unique Entity Id<br />
| SignedVarLong<br />
| The unique ID of the entity. The unique ID is a value that remains consistent across different sessions of the same world, but most unofficial servers simply fill the runtime ID of the entity out for this field.<br />
|-<br />
| Runtime Entity Id<br />
| VarLong<br />
| The runtime ID of the entity. The runtime ID is unique for each world session, and entities are generally identified in packets using this runtime ID.<br />
|-<br />
| Position<br />
| Vector3<br />
| The position to spawn the entity at. If the entity is at a distance that the player cannot see, the entity will still show up if the player moves closer.<br />
|-<br />
| Direction<br />
| SignedVarInt<br />
| The facing direction of the painting. See below.<br />
|-<br />
| Name<br />
| String<br />
| This is the name of the painting (e.g. BurningSkull). See below.<br />
|}<br />
<br />
Valid facing values:<br />
* 0 - Facing towards positive Z (south)<br />
* 1 - Facing towards negative X (west)<br />
* 2 - Facing towards negative Z (north)<br />
* 3 - Facing towards positive X (east)<br />
<br />
Valid name values:<br />
* Kebab<br />
* Aztec<br />
* Alban<br />
* Aztec<br />
* Aztec2<br />
* Bomb<br />
* Plant<br />
* Wasteland<br />
* Wanderer<br />
* Graham<br />
* Pool<br />
* Courbet<br />
* Sunset<br />
* Sea<br />
* Creebet<br />
* Match<br />
* Bust<br />
* Stage<br />
* Void<br />
* SkullAndRoses<br />
* Wither<br />
* Fighters<br />
* Skeleton<br />
* DonkeyKong<br />
* PoInter<br />
* Pigscene<br />
* BurningSkull<br />
<br />
==== Tick Sync ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x17<br />
|rowspan="2"| Server & Client<br />
| Request Timestamp<br />
| Boolean<br />
| <br />
|-<br />
| Response Timestamp<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Level Sound Event (1) ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="6"| 0x18<br />
|rowspan="6"| Server & Client<br />
| Sound ID<br />
| Byte<br />
| <br />
|-<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| Block Id<br />
| SignedVarInt<br />
| <br />
|-<br />
| Entity Type<br />
| SignedVarInt<br />
| <br />
|-<br />
| Is baby mob<br />
| Boolean<br />
| <br />
|-<br />
| Is global<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Level Event ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x19<br />
|rowspan="3"| Client<br />
| Event ID<br />
| SignedVarInt<br />
| <br />
|-<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| Data<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Block Event ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x1A<br />
|rowspan="3"| Client<br />
| Block Position<br />
| BlockCoordinates<br />
| <br />
|-<br />
| Event Type<br />
| SignedVarInt<br />
| <br />
|-<br />
| Event Data<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
==== Entity Event ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x1B<br />
|rowspan="3"| Server & Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Event ID<br />
| Byte<br />
| <br />
|-<br />
| Data<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Mob Effect ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="6"| 0x1C<br />
|rowspan="6"| Client<br />
| Runtime entity id<br />
| VarLong<br />
| <br />
|-<br />
| Event<br />
| Byte<br />
| <br />
|-<br />
| Effect id<br />
| SignedVarInt<br />
| <br />
|-<br />
| Amplifier<br />
| SignedVarInt<br />
| <br />
|-<br />
| Particles<br />
| Boolean<br />
| <br />
|-<br />
| Duration<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
Events:<br />
* 0: None<br />
* 1: Add<br />
* 2: Modify<br />
* 3: Remove<br />
<br />
==== Update Attributes ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x1D<br />
|rowspan="2"| Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Attributes<br />
| PlayerAttributes<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Inventory Transaction ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x1E<br />
|rowspan="1"| Server & Client<br />
| Transaction<br />
| Transaction<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Mob Equipment ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x1F<br />
|rowspan="5"| Server & Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Item<br />
| Item<br />
| <br />
|-<br />
| Slot<br />
| Byte<br />
| <br />
|-<br />
| Selected Slot<br />
| Byte<br />
| <br />
|-<br />
| Windows Id<br />
| Byte<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Mob Armor Equipment ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x20<br />
|rowspan="5"| Server & Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Helmet<br />
| Item<br />
| <br />
|-<br />
| Chestplate<br />
| Item<br />
| <br />
|-<br />
| Leggings<br />
| Item<br />
| <br />
|-<br />
| Boots<br />
| Item<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Interact ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x21<br />
|rowspan="2"| Server & Client<br />
| Action ID<br />
| Byte<br />
| <br />
|-<br />
| Target Runtime Entity ID<br />
| VarLong<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Block Pick Request ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x22<br />
|rowspan="5"| Server<br />
| Block Position X<br />
| SignedVarInt<br />
| <br />
|-<br />
| Block Position Y<br />
| SignedVarInt<br />
| <br />
|-<br />
| Block Position Z<br />
| SignedVarInt<br />
| <br />
|-<br />
| Add User Data<br />
| bool<br />
| Whether there should be NBT data in the picked block (activated by pressing Ctrl on default keyboard controls)<br />
|-<br />
| Hotbar Slot<br />
| Byte<br />
| <br />
|}<br />
<br />
The Bedrock client sends the position of the block. It expects the server to decide the block to pick and add it to the inventory or switch the hotbar slot if needed.<br />
<br />
==== Entity Pick Request ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x23<br />
|rowspan="2"| Server<br />
| Runtime Entity Id<br />
| Unsigned Long<br />
| <br />
|-<br />
| Hotbar Slot<br />
| Byte<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Player Action ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x24<br />
|rowspan="4"| Server<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Action ID<br />
| SignedVarInt<br />
| <br />
|-<br />
| Coordinates<br />
| BlockCoordinates<br />
| <br />
|-<br />
| Face<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Entity Fall ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x25<br />
|rowspan="3"| Server<br />
| Runtime Entity Id<br />
| VarLong<br />
| <br />
|-<br />
| Fall Distance<br />
| Float<br />
| <br />
|-<br />
| In Void<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Hurt Armor ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x26<br />
|rowspan="1"| Client<br />
| Health<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Entity Data ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x27<br />
|rowspan="2"| Server & Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Metadata<br />
| MetadataDictionary<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Entity Motion ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x28<br />
|rowspan="4"| Server & Client<br />
| Runtime Entity Id<br />
| VarLong<br />
| <br />
|-<br />
| Motion X<br />
| Vector3<br />
| <br />
|-<br />
| Motion Y<br />
| Float<br />
| <br />
|-<br />
| Motion Z<br />
| Float<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Entity Link ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x29<br />
|rowspan="4"| Client<br />
| Ridden ID<br />
| SignedVarLong<br />
| <br />
|-<br />
| Rider ID<br />
| SignedVarLong<br />
| <br />
|-<br />
| Link Type<br />
| Byte<br />
| <br />
|-<br />
| Unknown<br />
| Byte<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Health ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x2A<br />
|rowspan="1"| Client<br />
| Health<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Spawn Position ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x2B<br />
|rowspan="3"| Client<br />
| Spawn Type<br />
| SignedVarInt<br />
| <br />
|-<br />
| Coordinates<br />
| BlockCoordinates<br />
| <br />
|-<br />
| Forced<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Animate ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x2C<br />
|rowspan="2"| Server & Client<br />
| Action ID<br />
| SignedVarInt<br />
| <br />
|-<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Respawn ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x2D<br />
|rowspan="3"| Server & Client<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| Runtime Entity Id<br />
| Byte<br />
| <br />
|-<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|}<br />
<br />
==== Container Open ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x2E<br />
|rowspan="4"| Client<br />
| Window Id<br />
| Byte<br />
| <br />
|-<br />
| Type<br />
| Byte<br />
| <br />
|-<br />
| Block Position<br />
| BlockCoordinates<br />
| <br />
|-<br />
| Unique Entity Id<br />
| SignedVarLong<br />
| <br />
|}<br />
<br />
Bedrock needs either a valid block position, with an actual block at that position, or an entity ID for this to work. The entity must have CONTAINER_BASE_SIZE metadata, or the block must be a container. The entity ID is used for minecart chests etc. but any entity will work. If the entity has NAMETAG metadata this will be used as the container name.<br />
<br />
==== Container Close ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x2F<br />
|rowspan="1"| Server & Client<br />
| Window Id<br />
| Byte<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Player Hotbar ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x30<br />
|rowspan="3"| Server & Client<br />
| Selected Hotbar Slot<br />
| VarInt<br />
| <br />
|-<br />
| Container Id<br />
| Byte<br />
| <br />
|-<br />
| Select Hotbar Slot<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Inventory Content ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x31<br />
|rowspan="2"| Server & Client<br />
| Inventory Id<br />
| VarInt<br />
| <br />
|-<br />
| Input<br />
| ItemStacks<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Inventory Slot ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x32<br />
|rowspan="3"| Server & Client<br />
| Inventory Id<br />
| VarInt<br />
| <br />
|-<br />
| Slot<br />
| VarInt<br />
| <br />
|-<br />
| Item<br />
| Item<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Container Set Data ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x33<br />
|rowspan="3"| Client<br />
| Window Id<br />
| Byte<br />
| <br />
|-<br />
| Property<br />
| SignedVarInt<br />
| <br />
|-<br />
| Value<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Crafting Data ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x34<br />
|rowspan="4"| Client<br />
| Recipes<br />
| Recipes<br />
| <br />
|-<br />
| Potion type recipes<br />
| PotionTypeRecipe[]<br />
| <br />
|-<br />
| potion container recipes<br />
| PotionContainerChangeRecipe[]<br />
| <br />
|-<br />
| Is Clean<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Crafting Event ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x35<br />
|rowspan="5"| Server & Client<br />
| Window ID<br />
| Byte<br />
| <br />
|-<br />
| Recipe Type<br />
| SignedVarInt<br />
| <br />
|-<br />
| Recipe ID<br />
| UUID<br />
| <br />
|-<br />
| Input<br />
| ItemStacks<br />
| <br />
|-<br />
| Result<br />
| ItemStacks<br />
| <br />
|}<br />
<br />
<br />
<br />
==== GUI Data Pick Item ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x36<br />
|rowspan="1"| Client<br />
|-<br />
| Item name<br />
| String<br />
| The name of the item that shows up in the top part of the popup that shows up when selecting an item. It is shown as if an item was selected by the player itself.<br />
|-<br />
| Item effects<br />
| String<br />
| The line under the Item name, where the effects of the item are usually situated.<br />
|-<br />
| Hotbar Slot<br />
| int<br />
| The hot bar slot to be selected/picked. This does not currently work, so it does not matter what number this is.<br />
|}<br />
<br />
Sent by the server to make the client 'select' a hotbar slot. It currently appears to be broken however, and does not actually set the selected slot to the hotbar slot set in the packet.<br />
<br />
==== Adventure Settings ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="6"| 0x37<br />
|rowspan="6"| Server & Client<br />
| Flags<br />
| VarInt<br />
| <br />
|-<br />
| Command permission<br />
| VarInt<br />
| <br />
|-<br />
| Action permissions<br />
| VarInt<br />
| <br />
|-<br />
| Permission level<br />
| VarInt<br />
| <br />
|-<br />
| Custom stored permissions<br />
| VarInt<br />
| <br />
|-<br />
| User Id<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Block Entity Data ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x38<br />
|rowspan="2"| Server & Client<br />
| Coordinates<br />
| BlockCoordinates<br />
| <br />
|-<br />
| NamedTag<br />
| NBT<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Player Input ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x39<br />
|rowspan="4"| Server<br />
| Motion X<br />
| Float<br />
| <br />
|-<br />
| Motion Z<br />
| Float<br />
| <br />
|-<br />
| Jumping<br />
| Boolean<br />
| <br />
|-<br />
| Sneaking<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Level Chunk ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x3A<br />
|rowspan="5"| Client<br />
| Chunk X<br />
| SignedVarInt<br />
| <br />
|-<br />
| Chunk Z<br />
| SignedVarInt<br />
| <br />
|-<br />
| Sub Chunk Count<br />
| VarInt<br />
| <br />
|-<br />
| Cache Enabled<br />
| Boolean<br />
| <br />
|-<br />
| Chunk Data<br />
| ByteArray<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Commands Enabled ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x3B<br />
|rowspan="1"| Client<br />
| Commands enabled<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Difficulty ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x3C<br />
|rowspan="1"| Client<br />
| Difficulty<br />
| VarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Change Dimension ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x3D<br />
|rowspan="5"| Client<br />
| Dimension<br />
| SignedVarInt<br />
| <br />
|-<br />
| Position X<br />
| Vector3<br />
| <br />
|-<br />
| Position Y<br />
| Boolean<br />
| <br />
|-<br />
| Position Z<br />
| Float<br />
| <br />
|-<br />
| Respawn<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Player Game Type ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x3E<br />
|rowspan="1"| Server & Client<br />
| Game mode<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Player List ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x3F<br />
|rowspan="1"| Client<br />
| Records<br />
| PlayerRecords<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Simple Event ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x40<br />
|rowspan="1"| Client<br />
| Event Type<br />
| Unsigned Short<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Event ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x41<br />
|rowspan="3"| Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Event data<br />
| SignedVarInt<br />
| <br />
|-<br />
| Event type<br />
| Byte<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Spawn Experience Orb ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x42<br />
|rowspan="2"| Client<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| Count<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Map Item Data ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x43<br />
|rowspan="1"| Client<br />
| MapInfo<br />
| MapInfo<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Map Info Request ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x44<br />
|rowspan="1"| Server & Client<br />
| Unique Map Id<br />
| SignedVarLong<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Request Chunk Radius ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x45<br />
|rowspan="1"| Server & Client<br />
| Chunk radius<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Chunk Radius Updated ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x46<br />
|rowspan="1"| Client<br />
| Chunk radius<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== ItemFrame Drop Item ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x47<br />
|rowspan="1"| Server & Client<br />
| Block Position<br />
| BlockCoordinates<br />
| See note below.<br />
|}<br />
<br />
According to the NukkitX Protocol, the server sends the Y coordinate divided by two, and negative if needs to be subtracted by one. Example:<br />
<br />
Int y;<br />
if (packet.getBlockPosition().getY() &gt; 0) {<br />
y = packet.getBlockPosition().getY() * 2;<br />
} else {<br />
y = (packet.getBlockPosition().getY() * -2) - 1;<br />
}<br />
<br />
==== Game Rules Changed ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x48<br />
|rowspan="1"| Client<br />
| Rules<br />
| GameRules<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Camera ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x49<br />
|rowspan="2"| Client<br />
| Camera Unique Entity Id<br />
| SignedVarLong<br />
| <br />
|-<br />
| Player Unique Entity Id<br />
| SignedVarLong<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Boss Event ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x4A<br />
|rowspan="2"| Client<br />
| Boss Entity ID<br />
| SignedVarLong<br />
| <br />
|-<br />
| Event Type<br />
| VarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Show Credits ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x4B<br />
|rowspan="2"| Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Status<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Available Commands ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x4C<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== Command Request ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x4D<br />
|rowspan="5"| Server<br />
| Command<br />
| String<br />
| <br />
|-<br />
| Command type<br />
| VarInt<br />
| <br />
|-<br />
| Unknown UUID<br />
| UUID<br />
| <br />
|-<br />
| Request ID<br />
| String<br />
| <br />
|-<br />
| Unknown<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== CommandBlock Update ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x4E<br />
|rowspan="1"| Server<br />
| Is Block<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Command Output ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x4F<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== Update Trade ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="10"| 0x50<br />
|rowspan="10"| Client<br />
| Window ID<br />
| Byte<br />
| <br />
|-<br />
| Window Type<br />
| Byte<br />
| <br />
|-<br />
| Unknown0<br />
| VarInt<br />
| <br />
|-<br />
| Unknown1<br />
| VarInt<br />
| <br />
|-<br />
| Unknown2<br />
| VarInt<br />
| <br />
|-<br />
| Is Willing<br />
| Boolean<br />
| <br />
|-<br />
| Trader Entity ID<br />
| SignedVarLong<br />
| <br />
|-<br />
| Player Entity ID<br />
| SignedVarLong<br />
| <br />
|-<br />
| Display Name<br />
| String<br />
| <br />
|-<br />
| NamedTag<br />
| NBT<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Update Equip ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x51<br />
|rowspan="5"| Client<br />
| Window ID<br />
| Byte<br />
| <br />
|-<br />
| Window Type<br />
| Byte<br />
| <br />
|-<br />
| Unknown<br />
| Byte<br />
| <br />
|-<br />
| Entity ID<br />
| SignedVarLong<br />
| <br />
|-<br />
| NamedTag<br />
| NBT<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Resource Pack Data Info ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="7"| 0x52<br />
|rowspan="7"| Client<br />
| Package ID<br />
| String<br />
| <br />
|-<br />
| Max Chunk Size<br />
| Unsigned Int<br />
| <br />
|-<br />
| Chunk Count<br />
| Unsigned Int<br />
| <br />
|-<br />
| Compressed Package Size<br />
| Unsigned Long<br />
| <br />
|-<br />
| Hash<br />
| ByteArray<br />
| <br />
|-<br />
| Is Premium<br />
| Boolean<br />
| <br />
|-<br />
| Pack Type<br />
| Byte<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Resource Pack Chunk Data ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x53<br />
|rowspan="4"| Client<br />
| Package ID<br />
| String<br />
| <br />
|-<br />
| Chunk Index<br />
| Unsigned Int<br />
| <br />
|-<br />
| Progress<br />
| Unsigned Long<br />
| <br />
|-<br />
| Payload<br />
| ByteArray<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Resource Pack Chunk Request ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x54<br />
|rowspan="2"| Server<br />
| Package ID<br />
| String<br />
| <br />
|-<br />
| Chunk Index<br />
| Unsigned Int<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Transfer ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x55<br />
|rowspan="2"| Client<br />
| Address<br />
| String<br />
| <br />
|-<br />
| Port<br />
| Unsigned Short<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Play Sound ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x56<br />
|rowspan="4"| Client<br />
| Sound name<br />
| String<br />
| <br />
|-<br />
| Sound position<br />
| Position<br />
| <br />
|-<br />
| Volume<br />
| Float<br />
| <br />
|-<br />
| Pitch<br />
| Float<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Stop Sound ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x57<br />
|rowspan="2"| Client<br />
| Sound Name<br />
| String<br />
| <br />
|-<br />
| Stopping All Sound<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Title ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x58<br />
|rowspan="5"| Client<br />
| Type<br />
| SignedVarInt<br />
| <br />
|-<br />
| Text<br />
| String<br />
| <br />
|-<br />
| Fade In Time<br />
| SignedVarInt<br />
| <br />
|-<br />
| Stay Time<br />
| SignedVarInt<br />
| <br />
|-<br />
| Fade Out Time<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Add Behavior Tree ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x59<br />
|rowspan="1"| Client<br />
| Behavior Tree Json<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Structure Block Update ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x5A<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== Show Store Offer ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x5B<br />
|rowspan="2"| Client<br />
| Offer Id<br />
| String<br />
| <br />
|-<br />
| Shown To All<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Purchase Receipt ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x5C<br />
|rowspan="1"| Server<br />
<br />
|}<br />
<br />
<br />
<br />
==== Player Skin ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x5D<br />
|rowspan="4"| Server & Client<br />
| UUID<br />
| UUID<br />
| <br />
|-<br />
| Skin<br />
| Skin<br />
| <br />
|-<br />
| Skin Name<br />
| String<br />
| <br />
|-<br />
| Old Skin Name<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Sub Client Login ====<br />
Sent when an additional player attempts to join from a split screen session. The contents of the chain data and skin data fields use the same format as the [[#Login|Login]] packet, and can be decoded the same way.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x5E<br />
|rowspan="2"| Server<br />
| Chain data<br />
| JSON array of JWT Data<br />
| Contains the display name, UUID and XUID<br />
|-<br />
| Skin data<br />
| JWT Data<br />
| <br />
|}<br />
<br />
==== Automation Client Connect ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x5F<br />
|rowspan="1"| Client<br />
| Address<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Last Hurt By ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x60<br />
|rowspan="1"| Client<br />
| Entity Type Id<br />
| VarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Book Edit ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x61<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== NPC Request ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x62<br />
|rowspan="4"| Server & Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Unknown0<br />
| Byte<br />
| <br />
|-<br />
| Unknown1<br />
| String<br />
| <br />
|-<br />
| Unknown2<br />
| Byte<br />
| <br />
|}<br />
<br />
==== Photo Transfer ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x63<br />
|rowspan="3"| Server<br />
| File name<br />
| String<br />
| <br />
|-<br />
| Image data<br />
| String<br />
| <br />
|-<br />
| Unknown2<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Model Form Request ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x64<br />
|rowspan="2"| Client<br />
| Form Id<br />
| VarInt<br />
| <br />
|-<br />
| Form Data<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Model Form Response ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x65<br />
|rowspan="2"| Server<br />
| Form Id<br />
| VarInt<br />
| <br />
|-<br />
| Form Data<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Server Settings Request ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x66<br />
|rowspan="1"| Server<br />
<br />
|}<br />
<br />
<br />
<br />
==== Server Settings Response ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x67<br />
|rowspan="2"| Client<br />
| Form Id<br />
| VarLong<br />
| <br />
|-<br />
| Form Data<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Show Profile ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x68<br />
|rowspan="1"| Client<br />
| Xuid<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Default Game Type ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x69<br />
|rowspan="1"| Client<br />
| Game mode<br />
| VarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Remove Objective ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x6A<br />
|rowspan="1"| Client<br />
| Objective Id<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Display Objective ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x6B<br />
|rowspan="5"| Client<br />
| Display Slot<br />
| String<br />
| <br />
|-<br />
| Objective Id<br />
| String<br />
| <br />
|-<br />
| Display Name<br />
| String<br />
| <br />
|-<br />
| Criteria<br />
| String<br />
| <br />
|-<br />
| Sort Order<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Score ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x6C<br />
|rowspan="1"| Client<br />
| Entries<br />
| ScoreEntries<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Lab Table ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x6D<br />
|rowspan="5"| Server & Client<br />
| Unknown Byte 0<br />
| Byte<br />
| <br />
|-<br />
| Block Entity Position X<br />
| VarInt<br />
| <br />
|-<br />
| Block Entity Position Y<br />
| VarInt<br />
| <br />
|-<br />
| Block Entity Position Z<br />
| VarInt<br />
| <br />
|-<br />
| Reaction Type<br />
| Byte<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Update Block Synced ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="6"| 0x6E<br />
|rowspan="6"| Client<br />
| Coordinates<br />
| BlockCoordinates<br />
| <br />
|-<br />
| Block Runtime ID<br />
| VarInt<br />
| <br />
|-<br />
| Block Priority<br />
| VarInt<br />
| <br />
|-<br />
| Data Layer ID<br />
| VarInt<br />
| <br />
|-<br />
| Unknown0<br />
| VarLong<br />
| <br />
|-<br />
| Unknown1<br />
| VarLong<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Move Entity Delta ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x6F<br />
|rowspan="2"| Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Flags<br />
| Unsigned Short<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Scoreboard Identity ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x70<br />
|rowspan="1"| Client<br />
| Entries<br />
| ScoreboardIdentityEntries<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Local Player As Initialized ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x71<br />
|rowspan="1"| Server<br />
| Runtime Entity Id<br />
| VarLong<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Update Soft Enum ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x72<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== Network Stack Latency ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x73<br />
|rowspan="2"| Server & Client<br />
| Timestamp<br />
| Unsigned Long<br />
| <br />
|-<br />
| Send Back<br />
| Byte<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Script Custom Event ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x75<br />
|rowspan="2"| Server & Client<br />
| Event Name<br />
| String<br />
| <br />
|-<br />
| Data<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Spawn Particle Effect ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x76<br />
|rowspan="4"| Client<br />
| Dimension Id<br />
| Byte<br />
| <br />
|-<br />
| Unique Entity Id<br />
| SignedVarLong<br />
| <br />
|-<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| Identifier<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Available Entity Identifiers ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x77<br />
|rowspan="1"| Client<br />
| NamedTag<br />
| NBT<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Level Sound Event (2) ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="6"| 0x78<br />
|rowspan="6"| Server & Client<br />
| Sound ID<br />
| Byte<br />
| <br />
|-<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| Block Id<br />
| SignedVarInt<br />
| <br />
|-<br />
| Entity Type<br />
| String<br />
| <br />
|-<br />
| Is baby mob<br />
| Boolean<br />
| <br />
|-<br />
| Is global<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Network Chunk Publisher Update ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x79<br />
|rowspan="2"| Client<br />
| Coordinates<br />
| BlockCoordinates<br />
| <br />
|-<br />
| Radius<br />
| VarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Biome Definition List ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x7A<br />
|rowspan="1"| Client<br />
| NamedTag<br />
| NBT<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Level Sound Event (3) ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="6"| 0x7B<br />
|rowspan="6"| Server & Client<br />
| Sound ID<br />
| VarInt<br />
| <br />
|-<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| Block Id<br />
| SignedVarInt<br />
| <br />
|-<br />
| Entity Type<br />
| String<br />
| <br />
|-<br />
| Is baby mob<br />
| Boolean<br />
| <br />
|-<br />
| Is global<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Level Event Generic ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x7C<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== Lectern Update ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x7D<br />
|rowspan="4"| Client<br />
| Page<br />
| Byte<br />
| <br />
|-<br />
| Total Pages<br />
| Byte<br />
| <br />
|-<br />
| Block Position<br />
| Position<br />
| <br />
|-<br />
| Dropping Book<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Video Stream Connect ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x7E<br />
|rowspan="5"| Client<br />
| Server URI<br />
| String<br />
| <br />
|-<br />
| Frame Send Frequency<br />
| Float<br />
| <br />
|-<br />
| Action<br />
| Byte<br />
| <br />
|-<br />
| Resolution X<br />
| Int<br />
| <br />
|-<br />
| Resolution Y<br />
| Int<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Client Cache Status ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x81<br />
|rowspan="1"| Server & Client<br />
| Supported<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== On Screen Texture Animation ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x82<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== Map Create Locked Copy ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x83<br />
|rowspan="2"| Client<br />
| Original Map Id<br />
| Boolean<br />
| <br />
|-<br />
| New Map Id<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Structure Template Data Export Request ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x84<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== Structure Template Data Export Response ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x85<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== Update Block Properties ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x86<br />
|rowspan="2"| Client<br />
| Unknown<br />
| Byte<br />
| <br />
|-<br />
| NamedTag<br />
| NBT<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Client Cache Blob Status ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x87<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== Client Cache Miss Response ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x88<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== Network Settings ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x8F<br />
|rowspan="2"| Client<br />
| Unknown<br />
| Byte<br />
| <br />
|-<br />
| Compression threshold<br />
| Short<br />
| <br />
|}<br />
<br />
[[Category:Bedrock Minecraft]]</div>Orladoghttps://wiki.vg/index.php?title=Bedrock_Protocol&diff=15850Bedrock Protocol2020-06-13T09:59:37Z<p>Orladog: Add more basic info to Packet Format</p>
<hr />
<div>:: '''Remember that this page is a WIP'''. Come back later to see a more complete page.<br />
----<br />
<br />
{{Box<br />
|BORDER = #9999FF<br />
|BACKGROUND = #99CCFF<br />
|WIDTH = 100%<br />
|ICON = <br />
|HEADING = Heads up!<br />
|CONTENT = This article is about the protocol for the latest '''stable''' release of Minecraft '''Bedrock Edition''' ([[Bedrock Protocol version numbers|1.14.60, protocol 390]]). See [[Protocol]] for the Java Edition Protocol.<br />
}}<br />
<br />
This is the [https://minecraft.gamepedia.com/Bedrock_Edition Bedrock Edition] Protocol Documentation.<br />
The Bedrock Edition Protocol uses [[wikipedia:User Datagram Protocol|UDP]] instead of [[wikipedia:Transmission Control Protocol|TCP]] that is used for the Java Edition.<br />
Bedrock Edition uses [[Raknet Protocol|RakNet]] as its protocol library.<br />
<br />
The default Bedrock Edition port is 19132.<br />
<br />
Information for this page was obtained from the [https://github.com/NukkitX/Protocol NukkitX Protocol library], [https://github.com/NiclasOlofsson/MiNET MiNET] and [https://github.com/Sandertv/gophertunnel gophertunnel].<br />
<br />
<br />
== Data types ==<br />
<br />
{| class="wikitable"<br />
|-<br />
!<br />
! Size (Bytes)<br />
! Range<br />
! Notes<br />
|-<br />
! Byte<br />
| 1<br />
| 0 to 255<br />
|<br />
|-<br />
! Boolean<br />
| 1<br />
| 0 or 1<br />
| A Byte treated as boolean, 0 is false but anything greater then that is true<br />
|-<br />
! Short<br />
| 2<br />
| -32768 to 32767<br />
|<br />
|-<br />
! Unsigned Short<br />
| 2<br />
| 0 to 65535<br />
|<br />
|-<br />
! Int<br />
| 4<br />
| -2147483648 to 2147483647<br />
| Signed little-endian 32-bit Integer<br />
|-<br />
! Int (big endian)<br />
| 4<br />
| -2147483648 to 2147483647<br />
| Signed big-endian 32-bit Integer<br />
|-<br />
! Unsigned Int<br />
| 4<br />
| 0 to 4294967295<br />
| Unsigned 32-bit Integer<br />
|-<br />
! Long<br />
| 8<br />
| -2^63 to 2^63-1<br />
| Signed 64-bit Integer<br />
|-<br />
! Unsigned Long<br />
| 8<br />
| 2^64-1<br />
| Unsigned 64-bit Integer<br />
|-<br />
! Float<br />
| 4<br />
| <br />
| A [[wikipedia:Single-precision_Floating-poInt_format|single-precision 32-bit IEEE 754 Floating poInt number]]<br />
|-<br />
! Double<br />
| 8<br />
| <br />
| A [[wikipedia:Double-precision_Floating-poInt_format|Double-precision 64-bit IEEE 754 Floating poInt number]]<br />
|-<br />
! VarInt<br />
| &ge; 1<br>&le; 5<br />
| 0 to 4294967295<br />
| <br />
|-<br />
! SignedVarInt<br />
| &ge; 1<br>&le; 5<br />
| -2147483648 and 2147483647<br />
| <br />
|-<br />
! VarLong<br />
| &ge; 1<br>&le; 10<br />
| <br />
|<br />
|-<br />
! SignedVarLong<br />
| &ge; 1<br>&le; 10<br />
| -2^63 and 2^63-1<br />
|<br />
|-<br />
! String<br />
| <br />
| <br />
| [[wikipedia:UTF-8|UTF-8]] String prefixed with its size in Bytes as a VarInt. This has the same data structure as a ByteArray but it contains textual data.<br />
|-<br />
! Vector3<br />
| 12<br />
| <br />
| Three Float values (X, Y and Z respectively)<br />
|-<br />
! Vector2<br />
| 8<br />
| <br />
| Two Float values (X and Y respectively)<br />
|-<br />
! NBT<br />
| <br />
| <br />
| <br />
|-<br />
! ByteArray<br />
| <br />
| <br />
| An arbitrary array of Bytes prefixed with its size in Bytes as a VarInt.<br />
|-<br />
! BlockCoordinates<br />
| &ge; 3<br>&le; 15<br />
| <br />
| A SignedVarInt, a normal VarInt and another SignedVarInt (X, Y and Z respectively)<br />
|-<br />
! PlayerLocation<br />
| 15<br />
| <br />
| Three Float values (X, Y and Z respectively), followed by three Bytes (pitch, head yaw and yaw respectively). To convert the Bytes to normal pitch and yaw values divide them by 0.71<br />
|-<br />
! UUID<br />
| 16<br />
| A [[wikipedia:Universally_unique_identifier|UUID]]<br />
| Encoded as two unsigned 64-bit Integers: the most significant 64 bits and the least significant 64 bits<br />
|-<br />
! Item<br />
| <br />
| <br />
|<br />
|-<br />
! ItemStacks<br />
| <br />
| <br />
|<br />
|-<br />
! Itemstates<br />
| <br />
| <br />
|<br />
|-<br />
! EntityAttributes<br />
| <br />
| <br />
|<br />
|-<br />
! PlayerAttributes<br />
| <br />
| <br />
|<br />
|-<br />
! Skin<br />
| <br />
| <br />
|<br />
|-<br />
! Recipes<br />
| <br />
| <br />
|<br />
|-<br />
! GameRules<br />
| <br />
| <br />
| <br />
|-<br />
! Transaction<br />
| <br />
| <br />
| <br />
|-<br />
! BlockPalette<br />
| <br />
| <br />
|<br />
|-<br />
! ScoreEntries<br />
| <br />
| <br />
|<br />
|-<br />
! MapInfo<br />
| <br />
| <br />
|<br />
|-<br />
! PlayerRecords<br />
| <br />
| <br />
|<br />
|-<br />
! ScoreboardIdentityEntries<br />
| <br />
| <br />
|<br />
|-<br />
! MetadataDictionary<br />
| <br />
| <br />
| <br />
|-<br />
! PotionTypeRecipe<br />
| <br />
| <br />
| <br />
|-<br />
! PotionContainerChangeRecipe<br />
| <br />
| <br />
| <br />
|-<br />
! ResourcePackInfos<br />
| <br />
| <br />
|<br />
|-<br />
! ResourcePackIdVersions<br />
| <br />
| <br />
|<br />
|-<br />
! ResourcePackIds<br />
| <br />
| <br />
| <br />
|}<br />
<br />
== Packet Format ==<br />
<br />
Bedrock Edition uses [[Raknet Protocol|RakNet]] as its protocol library, so the packets are sent that way. The UDP protocol specifies packet length, so unlike Java Edition and TCP which deal with raw data streams packets are not length-prefixed. Packets seem to always use compression and can also use encryption.<br />
Packet compression uses [https://zlib.net/ zlib], and it seems that packet data can be fed directly into zlib (after being decrypted if encryption is enabled).<br />
<br><br><br />
Refer to [https://github.com/Sandertv/gophertunnel/blob/19c96251a36a39d9ffb938053410852e811755e3/minecraft/protocol/packet/decoder.go#L58 gophertunnel] for more information.<br />
<br />
== Login process ==<br />
The login process is as follows:<br />
# C→S: [[#Login|Login]]<br />
# S→C: [[#Server To Client Handshake|Server To Client Handshake]]<br />
# C→S: [[#Client To Server Handshake|Client To Server Handshake]]<br />
# S→C: [[#Play Status|Play Status]] (Login success)<br />
<br />
To spawn, the following packets should be sent, in order, after the ones above:<br />
# S→C: [[#Resource Packs Info|Resource Packs Info]]<br />
# C→S: [[#Resource Pack Client Response|Resource Pack Client Response]]<br />
# S→C: [[#Resource Pack Stack|Resource Pack Stack]]<br />
# C→S: [[#Resource Pack Client Response|Resource Pack Client Response]]<br />
# S→C: [[#Start Game|Start Game]]<br />
# S→C: [[#Biome Definition List|Biome Definition List]]<br />
# S→C: Chunks<br />
# S→C: [[#Play Status|Play Status]] (Player spawn)<br />
<br />
If there are no resource packs being sent, a [[#Resource Pack Stack|Resource Pack Stack]] can be sent directly after [[#Resource Packs Info|Resource Packs Info]] to avoid the client responses.<br />
<br />
== Packets ==<br />
Please note that some packet ids are missing, so they don't line up.<br />
The following packet ids are missing:<br />
0x10, 0x74, 0x7F, 0x80<br />
(16, 116, 127, 128)<br />
<br />
==== Login ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x01<br />
|rowspan="3"| Server<br />
| Protocol version<br />
| Int (big-endian)<br />
| <br />
|-<br />
| Chain data<br />
| JSON array of JWT Data<br />
| Contains the display name, UUID and XUID<br />
|-<br />
| Skin data<br />
| JWT Data<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Play Status ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x02<br />
|rowspan="1"| Client<br />
| Status<br />
| Int (big-endian)<br />
| The current status of the connection.<br />
|}<br />
<br />
The values for each status are as follows:<br />
* 0: Login success<br />
* 1: Failed client<br />
* 2: Failed server<br />
* 3 Player spawn<br />
* 4 Failed invalid Tenant<br />
* 5: Failed Vanilla Edu.<br />
* 6: Failed Edu. Vanilla<br />
* 7: Failed server full<br />
<br />
==== Server To Client Handshake ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x03<br />
|rowspan="1"| Client<br />
| JWT data<br />
| JWT String<br />
| Contains the salt to complete the Diffie-Hellman key exchange<br />
|}<br />
<br />
<br />
<br />
==== Client To Server Handshake ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x04<br />
|rowspan="1"| Server<br />
<br />
|}<br />
<br />
Sent by the client in response to a ServerToClientHandshake packet sent by theserver. It is the first encrypted packet in the login handshake and serves as a confirmation that encryption is correctly initialised client side. It has no fields.<br />
<br />
==== Disconnect ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x05<br />
|rowspan="2"| Client<br />
| Hide disconnect screen<br />
| Boolean<br />
| Specifies if the disconnection screen should be hidden when the client is disconnected, meaning it will be sent directly to the main menu.<br />
|-<br />
| Kick message<br />
| String<br />
| An optional message to show when disconnected.<br />
|}<br />
<br />
==== Resource Packs info ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x06<br />
|rowspan="4"| Client<br />
| Forced to Accept<br />
| Boolean<br />
| If the resource pack requires the client accept it.<br />
|-<br />
| Scripting Enabled<br />
| Boolean<br />
| If scripting is enabled.<br />
|-<br />
| BehahaviorPackInfos<br />
| ResourcePackInfo[]<br />
| A list of behaviour packs that the client needs to download before joining the server. All of these behaviour packs will be applied together.<br />
|-<br />
| ResourcePackInfos<br />
| ResourcePackInfo[]<br />
| A list of resource packs that the client needs to download before joining the server. The order of these resource packs is not relevant in this packet. It is however important in the Resource Pack Stack packet.<br />
|}<br />
<br />
<br />
<br />
==== Resource Pack Stack ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! colspan="2" | Field Name<br />
! colspan="2" | Field Type<br />
! Notes<br />
|-<br />
| rowspan="11" | 0x07<br />
| rowspan="11" | Client<br />
| colspan="2" | Forced to Accept<br />
| colspan="2" | Boolean<br />
| If the resource pack must be accepted for the player to join the server.<br />
|-<br />
! Resource Pack Entry<br />
! Field Name<br />
! colspan="2" | <br />
! <br />
|-<br />
| rowspan="3" | Array<br />
| Pack ID<br />
| colspan="2" | String<br />
| The ID of the resource pack.<br />
|-<br />
| Pack Version<br />
| colspan="2" | String<br />
| The version of the resource pack.<br />
|-<br />
| Subpack Name<br />
| colspan="2" | String<br />
| The subpack name of the resource pack.<br />
|-<br />
! Behavior Pack Entry<br />
! Field Name<br />
! colspan="2" | <br />
! <br />
|-<br />
| rowspan="3" | Array<br />
| Pack ID<br />
| colspan="2" | String<br />
| The ID of the resource pack.<br />
|-<br />
| Pack Version<br />
| colspan="2" | String<br />
| The version of the resource pack.<br />
|-<br />
| Subpack Name<br />
| colspan="2" | String<br />
| The subpack name of the resource pack.<br />
|-<br />
| colspan="2" | Experimental<br />
| colspan="2" | Boolean<br />
| If the sent resource and behavior packs are experimental.<br />
|-<br />
| colspan="2" | Game Version<br />
| colspan="2" | String<br />
| The version of the game the sent resource and behavior packs were made for.<br />
|}<br />
<br />
==== Resource Pack Response ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x08<br />
|rowspan="2"| Server<br />
| Status<br />
| Byte<br />
| See below<br />
|-<br />
| Pack IDs<br />
| ResourcePackIds<br />
| All of the pack IDs.<br />
|}<br />
<br />
The values for each status are as follows:<br />
* 0: None<br />
* 1: Refused<br />
* 2: Send packs<br />
* 3: Have all packs<br />
* 4: Completed<br />
<br />
==== Text ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! colspan="2" | Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| rowspan="9" | 0x09<br />
| rowspan="9" | Server &amp; Client<br />
| colspan="2" | Type<br />
| Byte<br />
| The type of chat message sent.<br />
|-<br />
| colspan="2" | Needs Translation<br />
| Boolean<br />
| If the message sent is a translation key and needs to be translated.<br />
|-<br />
! Chat Type ID<br />
! Text<br />
! <br />
! Derived from above; values sent here change depending on that.<br />
|-<br />
| rowspan="1" | 0, 1, or 2<br />
| rowspan="1" | Source Name<br />
| rowspan="1" | String<br />
| rowspan="1" | The name of the source.<br />
|-<br />
|-<br />
|-<br />
| rowspan="1" | 3, 4, or 5<br />
| rowspan="1" | Message<br />
| rowspan="1" | String<br />
| rowspan="1" | The message sent with the packet.<br />
|-<br />
|-<br />
|-<br />
|-<br />
| rowspan="2" | 6, 7, or 8<br />
| Message<br />
| String<br />
| The message sent with the packet<br />
|-<br />
| Parameters<br />
| Array<br />
| The parameters sent with the packet. This usually includes translation parameters or similar types depending on what kind of chat type was sent.<br />
|-<br />
| colspan="2" | XUID<br />
| Optional String<br />
| The XUID of the player who sent this message.<br />
|-<br />
| colspan="2" | Platform Chat ID<br />
| Optional String<br />
| The platform chat ID of the sent message.<br />
|}<br />
<br />
{| class="wikitable"<br />
! ID<br />
! Chat Type<br />
|-<br />
| 0<br />
| Chat<br />
|-<br />
| 1<br />
| Whisper<br />
|-<br />
| 2<br />
| Announcement<br />
|-<br />
| 3<br />
| Raw<br />
|-<br />
| 4<br />
| Tip<br />
|-<br />
| 5<br />
| System<br />
|-<br />
| 6<br />
| Translation<br />
|-<br />
| 7<br />
| Popup<br />
|-<br />
| 8<br />
| Jukebox Popup<br />
|}<br />
<br />
For additional information and examples of all the chat types above, see here: https://imgur.com/a/KhcFscg<br />
<br />
==== Set Time ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x0A<br />
|rowspan="1"| Client<br />
| Time<br />
| SignedVarInt<br />
| Time is the current time. The time is not limited to 24000 (time of day), but continues progressing after that.<br />
|}<br />
<br />
SetTime is sent by the server to update the current time client-side. The client actually advances time client-side by itself, so this packet does not need to be sent each tick. It is merely a means of synchronising time between server and client.<br />
<br />
==== Start Game ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="47"| 0x0B<br />
|rowspan="47"| Client<br />
| Entity ID Self<br />
| SignedVarLong<br />
| The unique ID of the player. The unique ID is a value that remains consistent across different sessions of the same world, but most unofficial servers simply fill the runtime ID of the entity out for this field.<br />
|-<br />
| Runtime Entity ID<br />
| VarLong<br />
| The runtime ID of the player. The runtime ID is unique for each world session, and entities are generally identified in packets using this runtime ID.<br />
|-<br />
| Player Gamemode<br />
| SignedVarInt<br />
|-<br />
| Spawn<br />
| Vector3<br />
| The spawn position of the player in the world. In servers this is often the same as the world's spawn position found below.<br />
|-<br />
| Rotation<br />
| Vector2<br />
| The pitch and yaw of the player<br />
|-<br />
| Seed<br />
| SignedVarInt<br />
| The seed used to generate the world. Unlike in Java edition, the seed is a 32bit Integer here.<br />
|-<br />
| Dimension<br />
| SignedVarInt<br />
| Dimension is the ID of the dimension that the player spawns in. It is a value from 0-2, with 0 being the overworld, 1 being the nether and 2 being the end.<br />
|-<br />
| Generator<br />
| SignedVarInt<br />
| Generator is the generator used for the world. It is a value from 0-4, with 0 being old limited worlds, 1 being infinite worlds, 2 being flat worlds, 3 being nether worlds and 4 being end worlds. A value of 0 will actually make the client stop rendering chunks you send beyond the world limit.<br />
|-<br />
| World Gamemode<br />
| SignedVarInt<br />
| The game mode that a player gets when it first spawns in the world. It is shown in the settings and is used if the Player Gamemode is set to 5.<br />
|-<br />
| Difficulty<br />
| SignedVarInt<br />
| Difficulty is the difficulty of the world. It is a value from 0-3, with 0 being peaceful, 1 being easy, 2 being normal and 3 being hard.<br />
|-<br />
| World Spawn<br />
| BlockCoordinates <br />
| The block on which the world spawn of the world. This coordinate has no effect on the place that the client spawns, but it does have an effect on the direction that a compass poInts.<br />
|-<br />
| Has achievements disabled<br />
| Boolean<br />
| Defines if achievements are disabled in the world. The client crashes if this value is set to true while the player's or the world's game mode is creative, and it's recommended to simply always set this to false as a server.<br />
|-<br />
| Day cycle stop time<br />
| SignedVarInt<br />
| The time at which the day cycle was locked if the day cycle is disabled using the respective game rule. The client will maIntain this time as Boolean as the day cycle is disabled.<br />
|-<br />
| EDU offer<br />
| SignedVarInt<br />
| Some Minecraft: Education Edition field that specifies what 'region' the world was from, with 0 being None, 1 being RestOfWorld, and 2 being China. The actual use of this field is unknown.<br />
|-<br />
| Has Education Edition features enabled<br />
| Boolean<br />
| Specifies if the world has education edition features enabled, such as the blocks or entities specific to education edition.<br />
|-<br />
| Rain level<br />
| Float<br />
| The level specifying the Intensity of the rain falling. When set to 0, no rain falls at all.<br />
|-<br />
| Lightning level<br />
| Float<br />
| The level specifying the Intensity of the thunder. This may actually be set independently from the rain level, meaning dark clouds can be produced without rain.<br />
|-<br />
| Has Confirmed Platform Locked Content<br />
| Boolean<br />
| <br />
|-<br />
| Is Multiplayer<br />
| Boolean<br />
| Specifies if the world is a multi-player game. This should always be set to true for servers.<br />
|-<br />
| Broadcast To LAN<br />
| Boolean<br />
| Specifies if LAN broadcast was Intended to be enabled for the world.<br />
|-<br />
| Xbox Live Broadcast Mode<br />
| VarInt<br />
| The mode used to broadcast the joined game across XBOX Live.<br />
|-<br />
| Platform Broadcast Mode<br />
| VarInt<br />
| The mode used to broadcast the joined game across the platform.<br />
|-<br />
| Enable commands<br />
| Boolean<br />
| If commands are enabled for the player. It is recommended to always set this to true on the server, as setting it to false means the player cannot, under any circumstance, use a command.<br />
|-<br />
| Are texture packs required<br />
| Boolean<br />
| Specifies if the texture pack the world might hold is required, meaning the client was forced to download it before joining.<br />
|-<br />
| GameRules<br />
| GameRules<br />
| Defines game rules currently active with their respective values. The value of these game rules may be either 'bool', 'Int32' or 'Float32'. Some game rules are server side only, and don't necessarily need to be sent to the client.<br />
|-<br />
| Bonus Chest<br />
| Boolean<br />
| Specifies if the world had the bonus map setting enabled when generating it. It does not have any effect client-side.<br />
|-<br />
| Map Enabled<br />
| Boolean<br />
| Specifies if the world has the start with map setting enabled, meaning each joining player obtains a map. This should always be set to false, because the client obtains a map all on its own accord if this is set to true.<br />
|-<br />
| Permission Level<br />
| SignedVarInt<br />
| The permission level of the player. It is a value from 0-3, with 0 being visitor, 1 being member, 2 being operator and 3 being custom.<br />
|-<br />
| Server Chunk Tick Range<br />
| Int<br />
| The radius around the player in which chunks are ticked. Most servers set this value to a fixed number, as it does not necessarily affect anything client-side.<br />
|-<br />
| Has Locked Behavior Pack<br />
| Boolean<br />
| Specifies if the texture pack of the world is locked, meaning it cannot be disabled from the world. This is typically set for worlds on the marketplace that have a dedicated texture pack.<br />
|-<br />
| Has Locked Resource Pack<br />
| Boolean<br />
| Specifies if the texture pack of the world is locked, meaning it cannot be disabled from the world. This is typically set for worlds on the marketplace that have a dedicated texture pack.<br />
|-<br />
| Is From Locked World Template<br />
| Boolean<br />
| Specifies if the world from the server was from a locked world template. For servers this should always be set to false.<br />
|-<br />
| Use MSA Gamertags Only<br />
| Boolean<br />
| <br />
|-<br />
| Is From World Template<br />
| Boolean<br />
| Specifies if the world from the server was from a locked world template. For servers this should always be set to false.<br />
|-<br />
| Is World Template Option Locked<br />
| Boolean<br />
| Specifies if the world was a template that locks all settings that change properties above in the settings GUI. It is recommended to set this to true for servers that do not allow things such as setting game rules through the GUI.<br />
|-<br />
| Only Spawn V1 Villagers<br />
| Boolean<br />
| A hack that Mojang put in place to preserve backwards compatibility with old villagers. The his never actually read though, so it has no functionality.<br />
|-<br />
| Game Version<br />
| String<br />
| The version of the game from which Vanilla features will be used. The exact function of this field isn't clear.<br />
|-<br />
| Level ID<br />
| String<br />
| A base64 encoded world ID that is used to identify the world.<br />
|-<br />
| World name<br />
| String<br />
| The name of the world that the player is joining. Note that this field shows up above the player list for the rest of the game session, and cannot be changed. Setting the server name to this field is recommended.<br />
|-<br />
| Premium World Template Id<br />
| String<br />
| A UUID specific to the premium world template that might have been used to generate the world. Servers should always fill out an empty String for this.<br />
|-<br />
| Is Trial<br />
| Boolean<br />
| Specifies if the world was a trial world, meaning features are limited and there is a time limit on the world.<br />
|-<br />
| Is Server Side movement enabled<br />
| Boolean<br />
| Specifies if the server is authoritative over the movement of the player, meaning it controls the movement of it.<br />
|-<br />
| Current Tick<br />
| Boolean<br />
| The total time in ticks that has elapsed since the start of the world.<br />
|-<br />
| Enchantment Seed<br />
| SignedVarInt<br />
| The seed used to seed the random used to produce enchantments in the enchantment table. Note that the exact correct random implementation must be used to produce the correct results both client- and server-side.<br />
|-<br />
| Block Palette<br />
| BlockPalette<br />
| A list of all blocks registered on the server.<br />
|-<br />
| Itemstates<br />
| Itemstates<br />
| A list of all items with their legacy IDs which are available in the game. Failing to send any of the items that are in the game will crash mobile clients.<br />
|-<br />
| Multiplayer Correlation ID<br />
| String<br />
| A unique ID specifying the multi-player session of the player. A random UUID should be filled out for this field.<br />
|}<br />
<br />
==== Add Player ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="19"| 0x0C<br />
|rowspan="19"| Client<br />
| UUID<br />
| UUID<br />
| UUID is the UUID of the player. It is the same UUID that the client sent in the Login packet at the start of the session. A player with this UUID must exist in the player list (built up using the Player List packet) for it to show up in-game.<br />
|-<br />
| Username<br />
| String<br />
| Username is the name of the player. This username is the username that will be set as the initial name tag of the player.<br />
|-<br />
| Entity ID Self<br />
| SignedVarLong<br />
| The unique ID of the player. The unique ID is a value that remains consistent across different sessions of the same world, but most unoffical servers simply fill the runtime ID of the player out for this field.<br />
|-<br />
| Runtime Entity ID<br />
| VarLong<br />
| The runtime ID of the player. The runtime ID is unique for each world session, and entities are generally identified in packets using this runtime ID.<br />
|-<br />
| Platform Chat ID<br />
| String<br />
| An identifier only set for particular platforms when chatting (presumably only for Nintendo Switch). It is otherwise an empty string, and is used to decide which players are able to chat with each other.<br />
|-<br />
| Position<br />
| Vector3<br />
| The position to spawn the player at. If the player is at a distance that the viewer cannot see, the player will still show up if the viewer moves closer.<br />
|-<br />
| Velocity<br />
| Vector3<br />
| The initial velocity the player spawns with. This velocity will initiate client side movement of the player.<br />
|-<br />
| Rotation<br />
| Float<br />
| Pitch, yaw and head yaw<br />
|-<br />
| Held Item<br />
| Item<br />
| The item that the player is holding. The item is shown to the viewer as soon as the player itself shows up. Needless to say that this field is rather pointless, as additional packets still must be sent for armour to show up.<br />
|-<br />
| Metadata<br />
| MetadataDictionary<br />
| A map of entity metadata, which includes flags and data properties that alter in particular the way the player looks. Flags include ones such as 'on fire' and 'sprinting'. The metadata values are indexed by their property key.<br />
|-<br />
| Flags<br />
| VarInt<br />
| Flags is a set of flags that specify certain properties of the player, such as whether or not it can fly and/or move through blocks.<br />
|-<br />
| Command permission<br />
| VarInt<br />
| A set of permissions that specify what commands a player is allowed to execute.<br />
|-<br />
| Action Permissions<br />
| VarInt<br />
| Action Permissions is, much like Flags, a set of flags that specify actions that the player is allowed to undertake, such as whether it is allowed to edit blocks, open doors etc.<br />
|-<br />
| Permission Level<br />
| VarInt<br />
| The permission level of the player as it shows up in the player list built up using the PlayerList packet.<br />
|-<br />
| Custom stored permissions<br />
| VarInt<br />
| <br />
|-<br />
| User Id<br />
| Long<br />
| A unique identifier of the player. It appears it is not required to fill this field out with a correct value. Simply writing 0 seems to work.<br />
|-<br />
| Links<br />
| Links<br />
| A list of entity links that are currently active on the player. These links alter the way the player shows up when first spawned in terms of it shown as riding an entity. Setting these links is important for new viewers to see the player is riding another entity.<br />
|-<br />
| Device ID<br />
| String<br />
| The device ID set in one of the files found in the storage of the device of the player. It may be changed freely, so it should not be relied on for anything.<br />
|-<br />
| Device OS<br />
| Int<br />
| The build platform/device OS of the player that is about to be added, as it sent in the Login packet when joining.<br />
|}<br />
<br />
Add Player is sent by the server to the client to make a player entity show up client-side. It is one of the few entities that cannot be sent using the AddActor packet.<br />
<br />
==== Add Entity ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="9"| 0x0D<br />
|rowspan="9"| Client<br />
| Entity ID Self<br />
| SignedVarLong<br />
| The unique ID of the entity. The unique ID is a value that remains consistent across different sessions of the same world, but most unofficial servers simply fill the runtime ID of the entity out for this field.<br />
|-<br />
| Runtime Entity ID<br />
| VarLong<br />
| The runtime ID of the entity. The runtime ID is unique for each world session, and entities are generally identified in packets using this runtime ID.<br />
|-<br />
| Entity Type<br />
| String<br />
| The string entity type of the entity, for example 'minecraft:skeleton'.<br />
|-<br />
| Position<br />
| Vector3<br />
| The position to spawn the entity at. If the entity is at a distance that the player cannot see, the entity will still show up if the player moves closer.<br />
|-<br />
| Velocity<br />
| Vector3<br />
| The initial velocity the entity spawns with. This velocity will initiate client side movement of the entity.<br />
|-<br />
| Rotation<br />
| Vector3<br />
| Pitch, yaw and head yaw<br />
|-<br />
| Attributes<br />
| EntityAttributes<br />
| A slice of attributes that the entity has. It includes attributes such as its health, movement speed, etc.<br />
|-<br />
| Metadata<br />
| MetadataDictionary<br />
| A map of entity metadata, which includes flags and data properties that alter in particular the way the entity looks. Flags include ones such as 'on fire' and 'sprinting'. The metadata values are indexed by their property key.<br />
|-<br />
| Links<br />
| Links<br />
| A list of entity links that are currently active on the entity. These links alter the way the entity shows up when first spawned in terms of it shown as riding an entity. Setting these links is important for new viewers to see the entity is riding another entity.<br />
|}<br />
<br />
Sent by the server to the client to spawn an entity to the player. It is used for every entity except other players, paintings and items, for which the Add Player, Add Painting and Add Item Entity packets are used.<br />
<br />
==== Remove Entity ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x0E<br />
|rowspan="1"| Client<br />
| Unique Entity Id<br />
| SignedVarLong<br />
| The unique ID of the entity to be removed. The unique ID is a value that remains consistent across different sessions of the same world, but most unofficial servers simply fill the runtime ID of the entity out for this field.<br />
|}<br />
<br />
Sent by the server to remove an entity that currently exists in the world from the client-side. Sending this packet if the client cannot already see this entity will have no effect.<br />
<br />
==== Add Item Entity ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="7"| 0x0F<br />
|rowspan="7"| Client<br />
| Entity ID Self<br />
| SignedVarLong<br />
| The unique ID of the entity. The unique ID is a value that remains consistent across different sessions of the same world, but most unofficial servers simply fill the runtime ID of the entity out for this field.<br />
|-<br />
| Runtime Entity ID<br />
| VarLong<br />
| The runtime ID of the entity. The runtime ID is unique for each world session, and entities are generally identified in packets using this runtime ID.<br />
|-<br />
| Item<br />
| Item<br />
| The item that is spawned. It must have a valid ID for it to show up client-side. If it is not a valid item, the client will crash when coming near.<br />
|-<br />
| Position<br />
| Vector3<br />
| The position to spawn the entity on. If the entity is at a distance that the player cannot see, the entity will still show up if the player moves closer.<br />
|-<br />
| Velocity<br />
| Vector3<br />
| The initial velocity the entity spawns with. This velocity will initiate client side movement of the entity.<br />
|-<br />
| Metadata<br />
| MetadataDictionary<br />
| A map of entity metadata, which includes flags and data properties that alter in particular the way the entity looks. Flags include ones such as 'on fire' and 'sprinting'. The metadata values are indexed by their property key.<br />
|-<br />
| Is From Fishing<br />
| Boolean<br />
| Specifies if the item was obtained by fishing it up using a fishing rod. It is not clear why the client needs to know this.<br />
|}<br />
<br />
Sent by the server to the client to make an item entity show up. It is one of the few entities that cannot be sent using the AddActor packet.<br />
<br />
==== Take Item Entity ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x11<br />
|rowspan="2"| Client<br />
| Item Runtime Entity Id<br />
| VarLong<br />
| the entity runtime ID of the item that is being taken by another entity. It will disappear to viewers after showing the pick-up animation.<br />
|-<br />
| Runtime Entity Id<br />
| VarLong<br />
| The runtime ID of the entity that took the item, which is usually a player, but could be another entity like a zombie too.<br />
|}<br />
<br />
Sent by the server when a player picks up an item entity. It makes the item entity disappear to viewers and shows the pick-up animation.<br />
<br />
==== Move Entity Absolute ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x12<br />
|rowspan="4"| Server & Client<br />
| Runtime entity id<br />
| VarLong<br />
| The runtime ID of the entity. The runtime ID is unique for each world session, and entities are generally identified in packets using this runtime ID.<br />
|-<br />
| Flags<br />
| byte<br />
| A combination of flags that specify details of the movement. See below for more info.<br />
|-<br />
| Position<br />
| PlayerLocation<br />
| <br />
|}<br />
<br />
{| class="wikitable"<br />
|-<br />
! Field<br />
! Bit<br />
! Notes<br />
|-<br />
| On ground<br />
| 0x01<br />
| If the entity is touching the ground<br />
|-<br />
| Telported<br />
| 0x02<br />
|<br />
|}<br />
<br />
Sent by the server to move an entity to an absolute position. It is typically used for movements where high accuracy isn't needed, such as for long range teleporting.<br />
This packet is also sent by the client when riding a horse/donkey.<br />
<br />
==== Move Player ====<br />
<br />
Sent by players to send their movement to the server, and by the server to update the movement of player entities to other players.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="8"| 0x13<br />
|rowspan="8"| Server & Client<br />
| Runtime entity id<br />
| VarLong<br />
| The runtime ID of the player. The runtime ID is unique for each world session, and entities are generally identified in packets using this runtime ID.<br />
|-<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| Rotation<br />
| Vector3<br />
| Pitch, yaw and head yaw<br />
|-<br />
| Mode<br />
| Byte<br />
| <br />
|-<br />
| On ground<br />
| Boolean<br />
| Specifies if the player is considered on the ground. Note that proxies or hacked clients could fake this to always be true, so it should not be taken for granted.<br />
|-<br />
| Riding runtime entity id<br />
| Float<br />
| The runtime ID of the entity that the player might currently be riding. If not riding, this should be left 0.<br />
|-<br />
| Teleportation cause<br />
| VarLong<br />
| See below. Only needs to exist if Mode cause is 2 (teleport).<br />
|-<br />
| Entity type<br />
| Byte<br />
| Only needs to exist if Mode cause is 2 (teleport).<br />
|}<br />
<br />
Modes:<br />
* 0: Normal<br />
* 1: Reset<br />
* 2: Teleport<br />
* 3: Rotation<br />
<br />
Teleportation causes:<br />
* 0: Unknown<br />
* 1: Projectile<br />
* 2: Chorus fruit<br />
* 3: Command<br />
* 4: Behavior<br />
<br />
==== Rider Jump ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x14<br />
|rowspan="1"| Server & Client<br />
| Jump Strength<br />
| SignedVarInt<br />
| The strength of the jump, depending on how long the rider has held the jump button.<br />
|}<br />
<br />
Sent by the client to the server when it jumps while riding an entity that has the WASDControlled entity flag set, for example when riding a horse. According to MiNET this can also be sent from the server to the client, but details on this are unknown.<br />
<br />
==== Update Block ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x15<br />
|rowspan="4"| Client<br />
| Coordinates<br />
| BlockCoordinates<br />
| The block position at which a block is updated.<br />
|-<br />
| Block Runtime ID<br />
| VarInt<br />
| The runtime ID of the block that is placed at Position after sending the packet to the client. The runtime ID must point to a block sent in the list in the Start Game packet.<br />
|-<br />
| Flags<br />
| VarInt<br />
| See below. Flags is a combination of flags that specify the way the block is updated client-side. It is a combination of the flags below, but typically sending only the Network flag is sufficient.<br />
|-<br />
| Layer<br />
| VarInt<br />
| The world layer on which the block is updated. In Bedrock, multiple blocks can be put in the same location using layers. The second layer is usually used for liquids, so blocks can be inside a liquid. For most blocks, this is the first layer, as that layer is the default layer to place blocks on, but for blocks inside of each other, this differs. As this system is designed with liquids, there may be bugs when using this to place blocks inside each other. For example, placing an interactable block such as an item frame on the second layer can cause a game crash if the player tries to interact with it.<br />
|}<br />
<br />
{| class="wikitable"<br />
|-<br />
! Field<br />
! Bit<br />
! Notes<br />
|-<br />
| Neighbors<br />
| 0x01<br />
| <br />
|-<br />
| Network<br />
| 0x02<br />
|<br />
|-<br />
| No Graphic<br />
| 0x04<br />
|<br />
|-<br />
| Priority<br />
| 0x08<br />
|<br />
|}<br />
<br />
Sent by the server to update a block client-side, without resending the entire chunk that the block is located in. It is particularly useful for small modifications like block breaking/placing.<br />
<br />
==== Add Painting ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x16<br />
|rowspan="5"| Client<br />
| Unique Entity Id<br />
| SignedVarLong<br />
| The unique ID of the entity. The unique ID is a value that remains consistent across different sessions of the same world, but most unofficial servers simply fill the runtime ID of the entity out for this field.<br />
|-<br />
| Runtime Entity Id<br />
| VarLong<br />
| The runtime ID of the entity. The runtime ID is unique for each world session, and entities are generally identified in packets using this runtime ID.<br />
|-<br />
| Position<br />
| Vector3<br />
| The position to spawn the entity at. If the entity is at a distance that the player cannot see, the entity will still show up if the player moves closer.<br />
|-<br />
| Direction<br />
| SignedVarInt<br />
| The facing direction of the painting. See below.<br />
|-<br />
| Name<br />
| String<br />
| This is the name of the painting (e.g. BurningSkull). See below.<br />
|}<br />
<br />
Valid facing values:<br />
* 0 - Facing towards positive Z (south)<br />
* 1 - Facing towards negative X (west)<br />
* 2 - Facing towards negative Z (north)<br />
* 3 - Facing towards positive X (east)<br />
<br />
Valid name values:<br />
* Kebab<br />
* Aztec<br />
* Alban<br />
* Aztec<br />
* Aztec2<br />
* Bomb<br />
* Plant<br />
* Wasteland<br />
* Wanderer<br />
* Graham<br />
* Pool<br />
* Courbet<br />
* Sunset<br />
* Sea<br />
* Creebet<br />
* Match<br />
* Bust<br />
* Stage<br />
* Void<br />
* SkullAndRoses<br />
* Wither<br />
* Fighters<br />
* Skeleton<br />
* DonkeyKong<br />
* PoInter<br />
* Pigscene<br />
* BurningSkull<br />
<br />
==== Tick Sync ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x17<br />
|rowspan="2"| Server & Client<br />
| Request Timestamp<br />
| Boolean<br />
| <br />
|-<br />
| Response Timestamp<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Level Sound Event (1) ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="6"| 0x18<br />
|rowspan="6"| Server & Client<br />
| Sound ID<br />
| Byte<br />
| <br />
|-<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| Block Id<br />
| SignedVarInt<br />
| <br />
|-<br />
| Entity Type<br />
| SignedVarInt<br />
| <br />
|-<br />
| Is baby mob<br />
| Boolean<br />
| <br />
|-<br />
| Is global<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Level Event ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x19<br />
|rowspan="3"| Client<br />
| Event ID<br />
| SignedVarInt<br />
| <br />
|-<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| Data<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Block Event ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x1A<br />
|rowspan="3"| Client<br />
| Block Position<br />
| BlockCoordinates<br />
| <br />
|-<br />
| Event Type<br />
| SignedVarInt<br />
| <br />
|-<br />
| Event Data<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
==== Entity Event ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x1B<br />
|rowspan="3"| Server & Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Event ID<br />
| Byte<br />
| <br />
|-<br />
| Data<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Mob Effect ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="6"| 0x1C<br />
|rowspan="6"| Client<br />
| Runtime entity id<br />
| VarLong<br />
| <br />
|-<br />
| Event<br />
| Byte<br />
| <br />
|-<br />
| Effect id<br />
| SignedVarInt<br />
| <br />
|-<br />
| Amplifier<br />
| SignedVarInt<br />
| <br />
|-<br />
| Particles<br />
| Boolean<br />
| <br />
|-<br />
| Duration<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
Events:<br />
* 0: None<br />
* 1: Add<br />
* 2: Modify<br />
* 3: Remove<br />
<br />
==== Update Attributes ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x1D<br />
|rowspan="2"| Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Attributes<br />
| PlayerAttributes<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Inventory Transaction ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x1E<br />
|rowspan="1"| Server & Client<br />
| Transaction<br />
| Transaction<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Mob Equipment ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x1F<br />
|rowspan="5"| Server & Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Item<br />
| Item<br />
| <br />
|-<br />
| Slot<br />
| Byte<br />
| <br />
|-<br />
| Selected Slot<br />
| Byte<br />
| <br />
|-<br />
| Windows Id<br />
| Byte<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Mob Armor Equipment ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x20<br />
|rowspan="5"| Server & Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Helmet<br />
| Item<br />
| <br />
|-<br />
| Chestplate<br />
| Item<br />
| <br />
|-<br />
| Leggings<br />
| Item<br />
| <br />
|-<br />
| Boots<br />
| Item<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Interact ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x21<br />
|rowspan="2"| Server & Client<br />
| Action ID<br />
| Byte<br />
| <br />
|-<br />
| Target Runtime Entity ID<br />
| VarLong<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Block Pick Request ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x22<br />
|rowspan="5"| Server<br />
| Block Position X<br />
| SignedVarInt<br />
| <br />
|-<br />
| Block Position Y<br />
| SignedVarInt<br />
| <br />
|-<br />
| Block Position Z<br />
| SignedVarInt<br />
| <br />
|-<br />
| Add User Data<br />
| bool<br />
| Whether there should be NBT data in the picked block (activated by pressing Ctrl on default keyboard controls)<br />
|-<br />
| Hotbar Slot<br />
| Byte<br />
| <br />
|}<br />
<br />
The Bedrock client sends the position of the block. It expects the server to decide the block to pick and add it to the inventory or switch the hotbar slot if needed.<br />
<br />
==== Entity Pick Request ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x23<br />
|rowspan="2"| Server<br />
| Runtime Entity Id<br />
| Unsigned Long<br />
| <br />
|-<br />
| Hotbar Slot<br />
| Byte<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Player Action ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x24<br />
|rowspan="4"| Server<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Action ID<br />
| SignedVarInt<br />
| <br />
|-<br />
| Coordinates<br />
| BlockCoordinates<br />
| <br />
|-<br />
| Face<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Entity Fall ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x25<br />
|rowspan="3"| Server<br />
| Runtime Entity Id<br />
| VarLong<br />
| <br />
|-<br />
| Fall Distance<br />
| Float<br />
| <br />
|-<br />
| In Void<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Hurt Armor ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x26<br />
|rowspan="1"| Client<br />
| Health<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Entity Data ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x27<br />
|rowspan="2"| Server & Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Metadata<br />
| MetadataDictionary<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Entity Motion ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x28<br />
|rowspan="4"| Server & Client<br />
| Runtime Entity Id<br />
| VarLong<br />
| <br />
|-<br />
| Motion X<br />
| Vector3<br />
| <br />
|-<br />
| Motion Y<br />
| Float<br />
| <br />
|-<br />
| Motion Z<br />
| Float<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Entity Link ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x29<br />
|rowspan="4"| Client<br />
| Ridden ID<br />
| SignedVarLong<br />
| <br />
|-<br />
| Rider ID<br />
| SignedVarLong<br />
| <br />
|-<br />
| Link Type<br />
| Byte<br />
| <br />
|-<br />
| Unknown<br />
| Byte<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Health ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x2A<br />
|rowspan="1"| Client<br />
| Health<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Spawn Position ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x2B<br />
|rowspan="3"| Client<br />
| Spawn Type<br />
| SignedVarInt<br />
| <br />
|-<br />
| Coordinates<br />
| BlockCoordinates<br />
| <br />
|-<br />
| Forced<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Animate ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x2C<br />
|rowspan="2"| Server & Client<br />
| Action ID<br />
| SignedVarInt<br />
| <br />
|-<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Respawn ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x2D<br />
|rowspan="3"| Server & Client<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| Runtime Entity Id<br />
| Byte<br />
| <br />
|-<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|}<br />
<br />
==== Container Open ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x2E<br />
|rowspan="4"| Client<br />
| Window Id<br />
| Byte<br />
| <br />
|-<br />
| Type<br />
| Byte<br />
| <br />
|-<br />
| Block Position<br />
| BlockCoordinates<br />
| <br />
|-<br />
| Unique Entity Id<br />
| SignedVarLong<br />
| <br />
|}<br />
<br />
Bedrock needs either a valid block position, with an actual block at that position, or an entity ID for this to work. The entity must have CONTAINER_BASE_SIZE metadata, or the block must be a container. The entity ID is used for minecart chests etc. but any entity will work. If the entity has NAMETAG metadata this will be used as the container name.<br />
<br />
==== Container Close ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x2F<br />
|rowspan="1"| Server & Client<br />
| Window Id<br />
| Byte<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Player Hotbar ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x30<br />
|rowspan="3"| Server & Client<br />
| Selected Hotbar Slot<br />
| VarInt<br />
| <br />
|-<br />
| Container Id<br />
| Byte<br />
| <br />
|-<br />
| Select Hotbar Slot<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Inventory Content ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x31<br />
|rowspan="2"| Server & Client<br />
| Inventory Id<br />
| VarInt<br />
| <br />
|-<br />
| Input<br />
| ItemStacks<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Inventory Slot ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x32<br />
|rowspan="3"| Server & Client<br />
| Inventory Id<br />
| VarInt<br />
| <br />
|-<br />
| Slot<br />
| VarInt<br />
| <br />
|-<br />
| Item<br />
| Item<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Container Set Data ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x33<br />
|rowspan="3"| Client<br />
| Window Id<br />
| Byte<br />
| <br />
|-<br />
| Property<br />
| SignedVarInt<br />
| <br />
|-<br />
| Value<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Crafting Data ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x34<br />
|rowspan="4"| Client<br />
| Recipes<br />
| Recipes<br />
| <br />
|-<br />
| Potion type recipes<br />
| PotionTypeRecipe[]<br />
| <br />
|-<br />
| potion container recipes<br />
| PotionContainerChangeRecipe[]<br />
| <br />
|-<br />
| Is Clean<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Crafting Event ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x35<br />
|rowspan="5"| Server & Client<br />
| Window ID<br />
| Byte<br />
| <br />
|-<br />
| Recipe Type<br />
| SignedVarInt<br />
| <br />
|-<br />
| Recipe ID<br />
| UUID<br />
| <br />
|-<br />
| Input<br />
| ItemStacks<br />
| <br />
|-<br />
| Result<br />
| ItemStacks<br />
| <br />
|}<br />
<br />
<br />
<br />
==== GUI Data Pick Item ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x36<br />
|rowspan="1"| Client<br />
|-<br />
| Item name<br />
| String<br />
| The name of the item that shows up in the top part of the popup that shows up when selecting an item. It is shown as if an item was selected by the player itself.<br />
|-<br />
| Item effects<br />
| String<br />
| The line under the Item name, where the effects of the item are usually situated.<br />
|-<br />
| Hotbar Slot<br />
| int<br />
| The hot bar slot to be selected/picked. This does not currently work, so it does not matter what number this is.<br />
|}<br />
<br />
Sent by the server to make the client 'select' a hotbar slot. It currently appears to be broken however, and does not actually set the selected slot to the hotbar slot set in the packet.<br />
<br />
==== Adventure Settings ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="6"| 0x37<br />
|rowspan="6"| Server & Client<br />
| Flags<br />
| VarInt<br />
| <br />
|-<br />
| Command permission<br />
| VarInt<br />
| <br />
|-<br />
| Action permissions<br />
| VarInt<br />
| <br />
|-<br />
| Permission level<br />
| VarInt<br />
| <br />
|-<br />
| Custom stored permissions<br />
| VarInt<br />
| <br />
|-<br />
| User Id<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Block Entity Data ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x38<br />
|rowspan="2"| Server & Client<br />
| Coordinates<br />
| BlockCoordinates<br />
| <br />
|-<br />
| NamedTag<br />
| NBT<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Player Input ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x39<br />
|rowspan="4"| Server<br />
| Motion X<br />
| Float<br />
| <br />
|-<br />
| Motion Z<br />
| Float<br />
| <br />
|-<br />
| Jumping<br />
| Boolean<br />
| <br />
|-<br />
| Sneaking<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Level Chunk ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x3A<br />
|rowspan="5"| Client<br />
| Chunk X<br />
| SignedVarInt<br />
| <br />
|-<br />
| Chunk Z<br />
| SignedVarInt<br />
| <br />
|-<br />
| Sub Chunk Count<br />
| VarInt<br />
| <br />
|-<br />
| Cache Enabled<br />
| Boolean<br />
| <br />
|-<br />
| Chunk Data<br />
| ByteArray<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Commands Enabled ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x3B<br />
|rowspan="1"| Client<br />
| Commands enabled<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Difficulty ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x3C<br />
|rowspan="1"| Client<br />
| Difficulty<br />
| VarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Change Dimension ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x3D<br />
|rowspan="5"| Client<br />
| Dimension<br />
| SignedVarInt<br />
| <br />
|-<br />
| Position X<br />
| Vector3<br />
| <br />
|-<br />
| Position Y<br />
| Boolean<br />
| <br />
|-<br />
| Position Z<br />
| Float<br />
| <br />
|-<br />
| Respawn<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Player Game Type ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x3E<br />
|rowspan="1"| Server & Client<br />
| Game mode<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Player List ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x3F<br />
|rowspan="1"| Client<br />
| Records<br />
| PlayerRecords<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Simple Event ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x40<br />
|rowspan="1"| Client<br />
| Event Type<br />
| Unsigned Short<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Event ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x41<br />
|rowspan="3"| Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Event data<br />
| SignedVarInt<br />
| <br />
|-<br />
| Event type<br />
| Byte<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Spawn Experience Orb ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x42<br />
|rowspan="2"| Client<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| Count<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Map Item Data ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x43<br />
|rowspan="1"| Client<br />
| MapInfo<br />
| MapInfo<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Map Info Request ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x44<br />
|rowspan="1"| Server & Client<br />
| Unique Map Id<br />
| SignedVarLong<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Request Chunk Radius ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x45<br />
|rowspan="1"| Server & Client<br />
| Chunk radius<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Chunk Radius Updated ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x46<br />
|rowspan="1"| Client<br />
| Chunk radius<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== ItemFrame Drop Item ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x47<br />
|rowspan="1"| Server & Client<br />
| Block Position<br />
| BlockCoordinates<br />
| See note below.<br />
|}<br />
<br />
According to the NukkitX Protocol, the server sends the Y coordinate divided by two, and negative if needs to be subtracted by one. Example:<br />
<br />
Int y;<br />
if (packet.getBlockPosition().getY() &gt; 0) {<br />
y = packet.getBlockPosition().getY() * 2;<br />
} else {<br />
y = (packet.getBlockPosition().getY() * -2) - 1;<br />
}<br />
<br />
==== Game Rules Changed ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x48<br />
|rowspan="1"| Client<br />
| Rules<br />
| GameRules<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Camera ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x49<br />
|rowspan="2"| Client<br />
| Camera Unique Entity Id<br />
| SignedVarLong<br />
| <br />
|-<br />
| Player Unique Entity Id<br />
| SignedVarLong<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Boss Event ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x4A<br />
|rowspan="2"| Client<br />
| Boss Entity ID<br />
| SignedVarLong<br />
| <br />
|-<br />
| Event Type<br />
| VarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Show Credits ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x4B<br />
|rowspan="2"| Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Status<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Available Commands ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x4C<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== Command Request ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x4D<br />
|rowspan="5"| Server<br />
| Command<br />
| String<br />
| <br />
|-<br />
| Command type<br />
| VarInt<br />
| <br />
|-<br />
| Unknown UUID<br />
| UUID<br />
| <br />
|-<br />
| Request ID<br />
| String<br />
| <br />
|-<br />
| Unknown<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== CommandBlock Update ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x4E<br />
|rowspan="1"| Server<br />
| Is Block<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Command Output ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x4F<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== Update Trade ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="10"| 0x50<br />
|rowspan="10"| Client<br />
| Window ID<br />
| Byte<br />
| <br />
|-<br />
| Window Type<br />
| Byte<br />
| <br />
|-<br />
| Unknown0<br />
| VarInt<br />
| <br />
|-<br />
| Unknown1<br />
| VarInt<br />
| <br />
|-<br />
| Unknown2<br />
| VarInt<br />
| <br />
|-<br />
| Is Willing<br />
| Boolean<br />
| <br />
|-<br />
| Trader Entity ID<br />
| SignedVarLong<br />
| <br />
|-<br />
| Player Entity ID<br />
| SignedVarLong<br />
| <br />
|-<br />
| Display Name<br />
| String<br />
| <br />
|-<br />
| NamedTag<br />
| NBT<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Update Equip ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x51<br />
|rowspan="5"| Client<br />
| Window ID<br />
| Byte<br />
| <br />
|-<br />
| Window Type<br />
| Byte<br />
| <br />
|-<br />
| Unknown<br />
| Byte<br />
| <br />
|-<br />
| Entity ID<br />
| SignedVarLong<br />
| <br />
|-<br />
| NamedTag<br />
| NBT<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Resource Pack Data Info ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="7"| 0x52<br />
|rowspan="7"| Client<br />
| Package ID<br />
| String<br />
| <br />
|-<br />
| Max Chunk Size<br />
| Unsigned Int<br />
| <br />
|-<br />
| Chunk Count<br />
| Unsigned Int<br />
| <br />
|-<br />
| Compressed Package Size<br />
| Unsigned Long<br />
| <br />
|-<br />
| Hash<br />
| ByteArray<br />
| <br />
|-<br />
| Is Premium<br />
| Boolean<br />
| <br />
|-<br />
| Pack Type<br />
| Byte<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Resource Pack Chunk Data ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x53<br />
|rowspan="4"| Client<br />
| Package ID<br />
| String<br />
| <br />
|-<br />
| Chunk Index<br />
| Unsigned Int<br />
| <br />
|-<br />
| Progress<br />
| Unsigned Long<br />
| <br />
|-<br />
| Payload<br />
| ByteArray<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Resource Pack Chunk Request ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x54<br />
|rowspan="2"| Server<br />
| Package ID<br />
| String<br />
| <br />
|-<br />
| Chunk Index<br />
| Unsigned Int<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Transfer ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x55<br />
|rowspan="2"| Client<br />
| Address<br />
| String<br />
| <br />
|-<br />
| Port<br />
| Unsigned Short<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Play Sound ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x56<br />
|rowspan="4"| Client<br />
| Sound name<br />
| String<br />
| <br />
|-<br />
| Sound position<br />
| Position<br />
| <br />
|-<br />
| Volume<br />
| Float<br />
| <br />
|-<br />
| Pitch<br />
| Float<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Stop Sound ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x57<br />
|rowspan="2"| Client<br />
| Sound Name<br />
| String<br />
| <br />
|-<br />
| Stopping All Sound<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Title ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x58<br />
|rowspan="5"| Client<br />
| Type<br />
| SignedVarInt<br />
| <br />
|-<br />
| Text<br />
| String<br />
| <br />
|-<br />
| Fade In Time<br />
| SignedVarInt<br />
| <br />
|-<br />
| Stay Time<br />
| SignedVarInt<br />
| <br />
|-<br />
| Fade Out Time<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Add Behavior Tree ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x59<br />
|rowspan="1"| Client<br />
| Behavior Tree Json<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Structure Block Update ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x5A<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== Show Store Offer ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x5B<br />
|rowspan="2"| Client<br />
| Offer Id<br />
| String<br />
| <br />
|-<br />
| Shown To All<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Purchase Receipt ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x5C<br />
|rowspan="1"| Server<br />
<br />
|}<br />
<br />
<br />
<br />
==== Player Skin ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x5D<br />
|rowspan="4"| Server & Client<br />
| UUID<br />
| UUID<br />
| <br />
|-<br />
| Skin<br />
| Skin<br />
| <br />
|-<br />
| Skin Name<br />
| String<br />
| <br />
|-<br />
| Old Skin Name<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Sub Client Login ====<br />
Sent when an additional player attempts to join from a split screen session. The contents of the chain data and skin data fields use the same format as the [[#Login|Login]] packet, and can be decoded the same way.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x5E<br />
|rowspan="2"| Server<br />
| Chain data<br />
| JSON array of JWT Data<br />
| Contains the display name, UUID and XUID<br />
|-<br />
| Skin data<br />
| JWT Data<br />
| <br />
|}<br />
<br />
==== Automation Client Connect ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x5F<br />
|rowspan="1"| Client<br />
| Address<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Last Hurt By ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x60<br />
|rowspan="1"| Client<br />
| Entity Type Id<br />
| VarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Book Edit ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x61<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== NPC Request ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x62<br />
|rowspan="4"| Server & Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Unknown0<br />
| Byte<br />
| <br />
|-<br />
| Unknown1<br />
| String<br />
| <br />
|-<br />
| Unknown2<br />
| Byte<br />
| <br />
|}<br />
<br />
==== Photo Transfer ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x63<br />
|rowspan="3"| Server<br />
| File name<br />
| String<br />
| <br />
|-<br />
| Image data<br />
| String<br />
| <br />
|-<br />
| Unknown2<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Model Form Request ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x64<br />
|rowspan="2"| Client<br />
| Form Id<br />
| VarInt<br />
| <br />
|-<br />
| Form Data<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Model Form Response ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x65<br />
|rowspan="2"| Server<br />
| Form Id<br />
| VarInt<br />
| <br />
|-<br />
| Form Data<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Server Settings Request ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x66<br />
|rowspan="1"| Server<br />
<br />
|}<br />
<br />
<br />
<br />
==== Server Settings Response ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x67<br />
|rowspan="2"| Client<br />
| Form Id<br />
| VarLong<br />
| <br />
|-<br />
| Form Data<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Show Profile ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x68<br />
|rowspan="1"| Client<br />
| Xuid<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Default Game Type ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x69<br />
|rowspan="1"| Client<br />
| Game mode<br />
| VarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Remove Objective ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x6A<br />
|rowspan="1"| Client<br />
| Objective Id<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Display Objective ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x6B<br />
|rowspan="5"| Client<br />
| Display Slot<br />
| String<br />
| <br />
|-<br />
| Objective Id<br />
| String<br />
| <br />
|-<br />
| Display Name<br />
| String<br />
| <br />
|-<br />
| Criteria<br />
| String<br />
| <br />
|-<br />
| Sort Order<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Score ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x6C<br />
|rowspan="1"| Client<br />
| Entries<br />
| ScoreEntries<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Lab Table ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x6D<br />
|rowspan="5"| Server & Client<br />
| Unknown Byte 0<br />
| Byte<br />
| <br />
|-<br />
| Block Entity Position X<br />
| VarInt<br />
| <br />
|-<br />
| Block Entity Position Y<br />
| VarInt<br />
| <br />
|-<br />
| Block Entity Position Z<br />
| VarInt<br />
| <br />
|-<br />
| Reaction Type<br />
| Byte<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Update Block Synced ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="6"| 0x6E<br />
|rowspan="6"| Client<br />
| Coordinates<br />
| BlockCoordinates<br />
| <br />
|-<br />
| Block Runtime ID<br />
| VarInt<br />
| <br />
|-<br />
| Block Priority<br />
| VarInt<br />
| <br />
|-<br />
| Data Layer ID<br />
| VarInt<br />
| <br />
|-<br />
| Unknown0<br />
| VarLong<br />
| <br />
|-<br />
| Unknown1<br />
| VarLong<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Move Entity Delta ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x6F<br />
|rowspan="2"| Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Flags<br />
| Unsigned Short<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Scoreboard Identity ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x70<br />
|rowspan="1"| Client<br />
| Entries<br />
| ScoreboardIdentityEntries<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Local Player As Initialized ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x71<br />
|rowspan="1"| Server<br />
| Runtime Entity Id<br />
| VarLong<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Update Soft Enum ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x72<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== Network Stack Latency ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x73<br />
|rowspan="2"| Server & Client<br />
| Timestamp<br />
| Unsigned Long<br />
| <br />
|-<br />
| Send Back<br />
| Byte<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Script Custom Event ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x75<br />
|rowspan="2"| Server & Client<br />
| Event Name<br />
| String<br />
| <br />
|-<br />
| Data<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Spawn Particle Effect ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x76<br />
|rowspan="4"| Client<br />
| Dimension Id<br />
| Byte<br />
| <br />
|-<br />
| Unique Entity Id<br />
| SignedVarLong<br />
| <br />
|-<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| Identifier<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Available Entity Identifiers ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x77<br />
|rowspan="1"| Client<br />
| NamedTag<br />
| NBT<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Level Sound Event (2) ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="6"| 0x78<br />
|rowspan="6"| Server & Client<br />
| Sound ID<br />
| Byte<br />
| <br />
|-<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| Block Id<br />
| SignedVarInt<br />
| <br />
|-<br />
| Entity Type<br />
| String<br />
| <br />
|-<br />
| Is baby mob<br />
| Boolean<br />
| <br />
|-<br />
| Is global<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Network Chunk Publisher Update ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x79<br />
|rowspan="2"| Client<br />
| Coordinates<br />
| BlockCoordinates<br />
| <br />
|-<br />
| Radius<br />
| VarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Biome Definition List ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x7A<br />
|rowspan="1"| Client<br />
| NamedTag<br />
| NBT<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Level Sound Event (3) ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="6"| 0x7B<br />
|rowspan="6"| Server & Client<br />
| Sound ID<br />
| VarInt<br />
| <br />
|-<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| Block Id<br />
| SignedVarInt<br />
| <br />
|-<br />
| Entity Type<br />
| String<br />
| <br />
|-<br />
| Is baby mob<br />
| Boolean<br />
| <br />
|-<br />
| Is global<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Level Event Generic ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x7C<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== Lectern Update ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x7D<br />
|rowspan="4"| Client<br />
| Page<br />
| Byte<br />
| <br />
|-<br />
| Total Pages<br />
| Byte<br />
| <br />
|-<br />
| Block Position<br />
| Position<br />
| <br />
|-<br />
| Dropping Book<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Video Stream Connect ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x7E<br />
|rowspan="5"| Client<br />
| Server URI<br />
| String<br />
| <br />
|-<br />
| Frame Send Frequency<br />
| Float<br />
| <br />
|-<br />
| Action<br />
| Byte<br />
| <br />
|-<br />
| Resolution X<br />
| Int<br />
| <br />
|-<br />
| Resolution Y<br />
| Int<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Client Cache Status ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x81<br />
|rowspan="1"| Server & Client<br />
| Supported<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== On Screen Texture Animation ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x82<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== Map Create Locked Copy ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x83<br />
|rowspan="2"| Client<br />
| Original Map Id<br />
| Boolean<br />
| <br />
|-<br />
| New Map Id<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Structure Template Data Export Request ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x84<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== Structure Template Data Export Response ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x85<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== Update Block Properties ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x86<br />
|rowspan="2"| Client<br />
| Unknown<br />
| Byte<br />
| <br />
|-<br />
| NamedTag<br />
| NBT<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Client Cache Blob Status ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x87<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== Client Cache Miss Response ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x88<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== Network Settings ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x8F<br />
|rowspan="2"| Client<br />
| Unknown<br />
| Byte<br />
| <br />
|-<br />
| Compression threshold<br />
| Short<br />
| <br />
|}<br />
<br />
[[Category:Bedrock Minecraft]]</div>Orladoghttps://wiki.vg/index.php?title=Bedrock_Protocol&diff=15849Bedrock Protocol2020-06-13T09:53:37Z<p>Orladog: Add basic info to Packet Format</p>
<hr />
<div>:: '''Remember that this page is a WIP'''. Come back later to see a more complete page.<br />
----<br />
<br />
{{Box<br />
|BORDER = #9999FF<br />
|BACKGROUND = #99CCFF<br />
|WIDTH = 100%<br />
|ICON = <br />
|HEADING = Heads up!<br />
|CONTENT = This article is about the protocol for the latest '''stable''' release of Minecraft '''Bedrock Edition''' ([[Bedrock Protocol version numbers|1.14.60, protocol 390]]). See [[Protocol]] for the Java Edition Protocol.<br />
}}<br />
<br />
This is the [https://minecraft.gamepedia.com/Bedrock_Edition Bedrock Edition] Protocol Documentation.<br />
The Bedrock Edition Protocol uses [[wikipedia:User Datagram Protocol|UDP]] instead of [[wikipedia:Transmission Control Protocol|TCP]] that is used for the Java Edition.<br />
Bedrock Edition uses [[Raknet Protocol|RakNet]] as its protocol library.<br />
<br />
The default Bedrock Edition port is 19132.<br />
<br />
Information for this page was obtained from the [https://github.com/NukkitX/Protocol NukkitX Protocol library], [https://github.com/NiclasOlofsson/MiNET MiNET] and [https://github.com/Sandertv/gophertunnel gophertunnel].<br />
<br />
<br />
== Data types ==<br />
<br />
{| class="wikitable"<br />
|-<br />
!<br />
! Size (Bytes)<br />
! Range<br />
! Notes<br />
|-<br />
! Byte<br />
| 1<br />
| 0 to 255<br />
|<br />
|-<br />
! Boolean<br />
| 1<br />
| 0 or 1<br />
| A Byte treated as boolean, 0 is false but anything greater then that is true<br />
|-<br />
! Short<br />
| 2<br />
| -32768 to 32767<br />
|<br />
|-<br />
! Unsigned Short<br />
| 2<br />
| 0 to 65535<br />
|<br />
|-<br />
! Int<br />
| 4<br />
| -2147483648 to 2147483647<br />
| Signed little-endian 32-bit Integer<br />
|-<br />
! Int (big endian)<br />
| 4<br />
| -2147483648 to 2147483647<br />
| Signed big-endian 32-bit Integer<br />
|-<br />
! Unsigned Int<br />
| 4<br />
| 0 to 4294967295<br />
| Unsigned 32-bit Integer<br />
|-<br />
! Long<br />
| 8<br />
| -2^63 to 2^63-1<br />
| Signed 64-bit Integer<br />
|-<br />
! Unsigned Long<br />
| 8<br />
| 2^64-1<br />
| Unsigned 64-bit Integer<br />
|-<br />
! Float<br />
| 4<br />
| <br />
| A [[wikipedia:Single-precision_Floating-poInt_format|single-precision 32-bit IEEE 754 Floating poInt number]]<br />
|-<br />
! Double<br />
| 8<br />
| <br />
| A [[wikipedia:Double-precision_Floating-poInt_format|Double-precision 64-bit IEEE 754 Floating poInt number]]<br />
|-<br />
! VarInt<br />
| &ge; 1<br>&le; 5<br />
| 0 to 4294967295<br />
| <br />
|-<br />
! SignedVarInt<br />
| &ge; 1<br>&le; 5<br />
| -2147483648 and 2147483647<br />
| <br />
|-<br />
! VarLong<br />
| &ge; 1<br>&le; 10<br />
| <br />
|<br />
|-<br />
! SignedVarLong<br />
| &ge; 1<br>&le; 10<br />
| -2^63 and 2^63-1<br />
|<br />
|-<br />
! String<br />
| <br />
| <br />
| [[wikipedia:UTF-8|UTF-8]] String prefixed with its size in Bytes as a VarInt. This has the same data structure as a ByteArray but it contains textual data.<br />
|-<br />
! Vector3<br />
| 12<br />
| <br />
| Three Float values (X, Y and Z respectively)<br />
|-<br />
! Vector2<br />
| 8<br />
| <br />
| Two Float values (X and Y respectively)<br />
|-<br />
! NBT<br />
| <br />
| <br />
| <br />
|-<br />
! ByteArray<br />
| <br />
| <br />
| An arbitrary array of Bytes prefixed with its size in Bytes as a VarInt.<br />
|-<br />
! BlockCoordinates<br />
| &ge; 3<br>&le; 15<br />
| <br />
| A SignedVarInt, a normal VarInt and another SignedVarInt (X, Y and Z respectively)<br />
|-<br />
! PlayerLocation<br />
| 15<br />
| <br />
| Three Float values (X, Y and Z respectively), followed by three Bytes (pitch, head yaw and yaw respectively). To convert the Bytes to normal pitch and yaw values divide them by 0.71<br />
|-<br />
! UUID<br />
| 16<br />
| A [[wikipedia:Universally_unique_identifier|UUID]]<br />
| Encoded as two unsigned 64-bit Integers: the most significant 64 bits and the least significant 64 bits<br />
|-<br />
! Item<br />
| <br />
| <br />
|<br />
|-<br />
! ItemStacks<br />
| <br />
| <br />
|<br />
|-<br />
! Itemstates<br />
| <br />
| <br />
|<br />
|-<br />
! EntityAttributes<br />
| <br />
| <br />
|<br />
|-<br />
! PlayerAttributes<br />
| <br />
| <br />
|<br />
|-<br />
! Skin<br />
| <br />
| <br />
|<br />
|-<br />
! Recipes<br />
| <br />
| <br />
|<br />
|-<br />
! GameRules<br />
| <br />
| <br />
| <br />
|-<br />
! Transaction<br />
| <br />
| <br />
| <br />
|-<br />
! BlockPalette<br />
| <br />
| <br />
|<br />
|-<br />
! ScoreEntries<br />
| <br />
| <br />
|<br />
|-<br />
! MapInfo<br />
| <br />
| <br />
|<br />
|-<br />
! PlayerRecords<br />
| <br />
| <br />
|<br />
|-<br />
! ScoreboardIdentityEntries<br />
| <br />
| <br />
|<br />
|-<br />
! MetadataDictionary<br />
| <br />
| <br />
| <br />
|-<br />
! PotionTypeRecipe<br />
| <br />
| <br />
| <br />
|-<br />
! PotionContainerChangeRecipe<br />
| <br />
| <br />
| <br />
|-<br />
! ResourcePackInfos<br />
| <br />
| <br />
|<br />
|-<br />
! ResourcePackIdVersions<br />
| <br />
| <br />
|<br />
|-<br />
! ResourcePackIds<br />
| <br />
| <br />
| <br />
|}<br />
<br />
== Packet Format ==<br />
<br />
Bedrock Edition uses [[Raknet Protocol|RakNet]] as its protocol library, so the packets are sent that way. Packets can use compression and encryption.<br />
<br />
== Login process ==<br />
The login process is as follows:<br />
# C→S: [[#Login|Login]]<br />
# S→C: [[#Server To Client Handshake|Server To Client Handshake]]<br />
# C→S: [[#Client To Server Handshake|Client To Server Handshake]]<br />
# S→C: [[#Play Status|Play Status]] (Login success)<br />
<br />
To spawn, the following packets should be sent, in order, after the ones above:<br />
# S→C: [[#Resource Packs Info|Resource Packs Info]]<br />
# C→S: [[#Resource Pack Client Response|Resource Pack Client Response]]<br />
# S→C: [[#Resource Pack Stack|Resource Pack Stack]]<br />
# C→S: [[#Resource Pack Client Response|Resource Pack Client Response]]<br />
# S→C: [[#Start Game|Start Game]]<br />
# S→C: [[#Biome Definition List|Biome Definition List]]<br />
# S→C: Chunks<br />
# S→C: [[#Play Status|Play Status]] (Player spawn)<br />
<br />
If there are no resource packs being sent, a [[#Resource Pack Stack|Resource Pack Stack]] can be sent directly after [[#Resource Packs Info|Resource Packs Info]] to avoid the client responses.<br />
<br />
== Packets ==<br />
Please note that some packet ids are missing, so they don't line up.<br />
The following packet ids are missing:<br />
0x10, 0x74, 0x7F, 0x80<br />
(16, 116, 127, 128)<br />
<br />
==== Login ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x01<br />
|rowspan="3"| Server<br />
| Protocol version<br />
| Int (big-endian)<br />
| <br />
|-<br />
| Chain data<br />
| JSON array of JWT Data<br />
| Contains the display name, UUID and XUID<br />
|-<br />
| Skin data<br />
| JWT Data<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Play Status ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x02<br />
|rowspan="1"| Client<br />
| Status<br />
| Int (big-endian)<br />
| The current status of the connection.<br />
|}<br />
<br />
The values for each status are as follows:<br />
* 0: Login success<br />
* 1: Failed client<br />
* 2: Failed server<br />
* 3 Player spawn<br />
* 4 Failed invalid Tenant<br />
* 5: Failed Vanilla Edu.<br />
* 6: Failed Edu. Vanilla<br />
* 7: Failed server full<br />
<br />
==== Server To Client Handshake ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x03<br />
|rowspan="1"| Client<br />
| JWT data<br />
| JWT String<br />
| Contains the salt to complete the Diffie-Hellman key exchange<br />
|}<br />
<br />
<br />
<br />
==== Client To Server Handshake ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x04<br />
|rowspan="1"| Server<br />
<br />
|}<br />
<br />
Sent by the client in response to a ServerToClientHandshake packet sent by theserver. It is the first encrypted packet in the login handshake and serves as a confirmation that encryption is correctly initialised client side. It has no fields.<br />
<br />
==== Disconnect ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x05<br />
|rowspan="2"| Client<br />
| Hide disconnect screen<br />
| Boolean<br />
| Specifies if the disconnection screen should be hidden when the client is disconnected, meaning it will be sent directly to the main menu.<br />
|-<br />
| Kick message<br />
| String<br />
| An optional message to show when disconnected.<br />
|}<br />
<br />
==== Resource Packs info ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x06<br />
|rowspan="4"| Client<br />
| Forced to Accept<br />
| Boolean<br />
| If the resource pack requires the client accept it.<br />
|-<br />
| Scripting Enabled<br />
| Boolean<br />
| If scripting is enabled.<br />
|-<br />
| BehahaviorPackInfos<br />
| ResourcePackInfo[]<br />
| A list of behaviour packs that the client needs to download before joining the server. All of these behaviour packs will be applied together.<br />
|-<br />
| ResourcePackInfos<br />
| ResourcePackInfo[]<br />
| A list of resource packs that the client needs to download before joining the server. The order of these resource packs is not relevant in this packet. It is however important in the Resource Pack Stack packet.<br />
|}<br />
<br />
<br />
<br />
==== Resource Pack Stack ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! colspan="2" | Field Name<br />
! colspan="2" | Field Type<br />
! Notes<br />
|-<br />
| rowspan="11" | 0x07<br />
| rowspan="11" | Client<br />
| colspan="2" | Forced to Accept<br />
| colspan="2" | Boolean<br />
| If the resource pack must be accepted for the player to join the server.<br />
|-<br />
! Resource Pack Entry<br />
! Field Name<br />
! colspan="2" | <br />
! <br />
|-<br />
| rowspan="3" | Array<br />
| Pack ID<br />
| colspan="2" | String<br />
| The ID of the resource pack.<br />
|-<br />
| Pack Version<br />
| colspan="2" | String<br />
| The version of the resource pack.<br />
|-<br />
| Subpack Name<br />
| colspan="2" | String<br />
| The subpack name of the resource pack.<br />
|-<br />
! Behavior Pack Entry<br />
! Field Name<br />
! colspan="2" | <br />
! <br />
|-<br />
| rowspan="3" | Array<br />
| Pack ID<br />
| colspan="2" | String<br />
| The ID of the resource pack.<br />
|-<br />
| Pack Version<br />
| colspan="2" | String<br />
| The version of the resource pack.<br />
|-<br />
| Subpack Name<br />
| colspan="2" | String<br />
| The subpack name of the resource pack.<br />
|-<br />
| colspan="2" | Experimental<br />
| colspan="2" | Boolean<br />
| If the sent resource and behavior packs are experimental.<br />
|-<br />
| colspan="2" | Game Version<br />
| colspan="2" | String<br />
| The version of the game the sent resource and behavior packs were made for.<br />
|}<br />
<br />
==== Resource Pack Response ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x08<br />
|rowspan="2"| Server<br />
| Status<br />
| Byte<br />
| See below<br />
|-<br />
| Pack IDs<br />
| ResourcePackIds<br />
| All of the pack IDs.<br />
|}<br />
<br />
The values for each status are as follows:<br />
* 0: None<br />
* 1: Refused<br />
* 2: Send packs<br />
* 3: Have all packs<br />
* 4: Completed<br />
<br />
==== Text ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! colspan="2" | Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| rowspan="9" | 0x09<br />
| rowspan="9" | Server &amp; Client<br />
| colspan="2" | Type<br />
| Byte<br />
| The type of chat message sent.<br />
|-<br />
| colspan="2" | Needs Translation<br />
| Boolean<br />
| If the message sent is a translation key and needs to be translated.<br />
|-<br />
! Chat Type ID<br />
! Text<br />
! <br />
! Derived from above; values sent here change depending on that.<br />
|-<br />
| rowspan="1" | 0, 1, or 2<br />
| rowspan="1" | Source Name<br />
| rowspan="1" | String<br />
| rowspan="1" | The name of the source.<br />
|-<br />
|-<br />
|-<br />
| rowspan="1" | 3, 4, or 5<br />
| rowspan="1" | Message<br />
| rowspan="1" | String<br />
| rowspan="1" | The message sent with the packet.<br />
|-<br />
|-<br />
|-<br />
|-<br />
| rowspan="2" | 6, 7, or 8<br />
| Message<br />
| String<br />
| The message sent with the packet<br />
|-<br />
| Parameters<br />
| Array<br />
| The parameters sent with the packet. This usually includes translation parameters or similar types depending on what kind of chat type was sent.<br />
|-<br />
| colspan="2" | XUID<br />
| Optional String<br />
| The XUID of the player who sent this message.<br />
|-<br />
| colspan="2" | Platform Chat ID<br />
| Optional String<br />
| The platform chat ID of the sent message.<br />
|}<br />
<br />
{| class="wikitable"<br />
! ID<br />
! Chat Type<br />
|-<br />
| 0<br />
| Chat<br />
|-<br />
| 1<br />
| Whisper<br />
|-<br />
| 2<br />
| Announcement<br />
|-<br />
| 3<br />
| Raw<br />
|-<br />
| 4<br />
| Tip<br />
|-<br />
| 5<br />
| System<br />
|-<br />
| 6<br />
| Translation<br />
|-<br />
| 7<br />
| Popup<br />
|-<br />
| 8<br />
| Jukebox Popup<br />
|}<br />
<br />
For additional information and examples of all the chat types above, see here: https://imgur.com/a/KhcFscg<br />
<br />
==== Set Time ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x0A<br />
|rowspan="1"| Client<br />
| Time<br />
| SignedVarInt<br />
| Time is the current time. The time is not limited to 24000 (time of day), but continues progressing after that.<br />
|}<br />
<br />
SetTime is sent by the server to update the current time client-side. The client actually advances time client-side by itself, so this packet does not need to be sent each tick. It is merely a means of synchronising time between server and client.<br />
<br />
==== Start Game ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="47"| 0x0B<br />
|rowspan="47"| Client<br />
| Entity ID Self<br />
| SignedVarLong<br />
| The unique ID of the player. The unique ID is a value that remains consistent across different sessions of the same world, but most unofficial servers simply fill the runtime ID of the entity out for this field.<br />
|-<br />
| Runtime Entity ID<br />
| VarLong<br />
| The runtime ID of the player. The runtime ID is unique for each world session, and entities are generally identified in packets using this runtime ID.<br />
|-<br />
| Player Gamemode<br />
| SignedVarInt<br />
|-<br />
| Spawn<br />
| Vector3<br />
| The spawn position of the player in the world. In servers this is often the same as the world's spawn position found below.<br />
|-<br />
| Rotation<br />
| Vector2<br />
| The pitch and yaw of the player<br />
|-<br />
| Seed<br />
| SignedVarInt<br />
| The seed used to generate the world. Unlike in Java edition, the seed is a 32bit Integer here.<br />
|-<br />
| Dimension<br />
| SignedVarInt<br />
| Dimension is the ID of the dimension that the player spawns in. It is a value from 0-2, with 0 being the overworld, 1 being the nether and 2 being the end.<br />
|-<br />
| Generator<br />
| SignedVarInt<br />
| Generator is the generator used for the world. It is a value from 0-4, with 0 being old limited worlds, 1 being infinite worlds, 2 being flat worlds, 3 being nether worlds and 4 being end worlds. A value of 0 will actually make the client stop rendering chunks you send beyond the world limit.<br />
|-<br />
| World Gamemode<br />
| SignedVarInt<br />
| The game mode that a player gets when it first spawns in the world. It is shown in the settings and is used if the Player Gamemode is set to 5.<br />
|-<br />
| Difficulty<br />
| SignedVarInt<br />
| Difficulty is the difficulty of the world. It is a value from 0-3, with 0 being peaceful, 1 being easy, 2 being normal and 3 being hard.<br />
|-<br />
| World Spawn<br />
| BlockCoordinates <br />
| The block on which the world spawn of the world. This coordinate has no effect on the place that the client spawns, but it does have an effect on the direction that a compass poInts.<br />
|-<br />
| Has achievements disabled<br />
| Boolean<br />
| Defines if achievements are disabled in the world. The client crashes if this value is set to true while the player's or the world's game mode is creative, and it's recommended to simply always set this to false as a server.<br />
|-<br />
| Day cycle stop time<br />
| SignedVarInt<br />
| The time at which the day cycle was locked if the day cycle is disabled using the respective game rule. The client will maIntain this time as Boolean as the day cycle is disabled.<br />
|-<br />
| EDU offer<br />
| SignedVarInt<br />
| Some Minecraft: Education Edition field that specifies what 'region' the world was from, with 0 being None, 1 being RestOfWorld, and 2 being China. The actual use of this field is unknown.<br />
|-<br />
| Has Education Edition features enabled<br />
| Boolean<br />
| Specifies if the world has education edition features enabled, such as the blocks or entities specific to education edition.<br />
|-<br />
| Rain level<br />
| Float<br />
| The level specifying the Intensity of the rain falling. When set to 0, no rain falls at all.<br />
|-<br />
| Lightning level<br />
| Float<br />
| The level specifying the Intensity of the thunder. This may actually be set independently from the rain level, meaning dark clouds can be produced without rain.<br />
|-<br />
| Has Confirmed Platform Locked Content<br />
| Boolean<br />
| <br />
|-<br />
| Is Multiplayer<br />
| Boolean<br />
| Specifies if the world is a multi-player game. This should always be set to true for servers.<br />
|-<br />
| Broadcast To LAN<br />
| Boolean<br />
| Specifies if LAN broadcast was Intended to be enabled for the world.<br />
|-<br />
| Xbox Live Broadcast Mode<br />
| VarInt<br />
| The mode used to broadcast the joined game across XBOX Live.<br />
|-<br />
| Platform Broadcast Mode<br />
| VarInt<br />
| The mode used to broadcast the joined game across the platform.<br />
|-<br />
| Enable commands<br />
| Boolean<br />
| If commands are enabled for the player. It is recommended to always set this to true on the server, as setting it to false means the player cannot, under any circumstance, use a command.<br />
|-<br />
| Are texture packs required<br />
| Boolean<br />
| Specifies if the texture pack the world might hold is required, meaning the client was forced to download it before joining.<br />
|-<br />
| GameRules<br />
| GameRules<br />
| Defines game rules currently active with their respective values. The value of these game rules may be either 'bool', 'Int32' or 'Float32'. Some game rules are server side only, and don't necessarily need to be sent to the client.<br />
|-<br />
| Bonus Chest<br />
| Boolean<br />
| Specifies if the world had the bonus map setting enabled when generating it. It does not have any effect client-side.<br />
|-<br />
| Map Enabled<br />
| Boolean<br />
| Specifies if the world has the start with map setting enabled, meaning each joining player obtains a map. This should always be set to false, because the client obtains a map all on its own accord if this is set to true.<br />
|-<br />
| Permission Level<br />
| SignedVarInt<br />
| The permission level of the player. It is a value from 0-3, with 0 being visitor, 1 being member, 2 being operator and 3 being custom.<br />
|-<br />
| Server Chunk Tick Range<br />
| Int<br />
| The radius around the player in which chunks are ticked. Most servers set this value to a fixed number, as it does not necessarily affect anything client-side.<br />
|-<br />
| Has Locked Behavior Pack<br />
| Boolean<br />
| Specifies if the texture pack of the world is locked, meaning it cannot be disabled from the world. This is typically set for worlds on the marketplace that have a dedicated texture pack.<br />
|-<br />
| Has Locked Resource Pack<br />
| Boolean<br />
| Specifies if the texture pack of the world is locked, meaning it cannot be disabled from the world. This is typically set for worlds on the marketplace that have a dedicated texture pack.<br />
|-<br />
| Is From Locked World Template<br />
| Boolean<br />
| Specifies if the world from the server was from a locked world template. For servers this should always be set to false.<br />
|-<br />
| Use MSA Gamertags Only<br />
| Boolean<br />
| <br />
|-<br />
| Is From World Template<br />
| Boolean<br />
| Specifies if the world from the server was from a locked world template. For servers this should always be set to false.<br />
|-<br />
| Is World Template Option Locked<br />
| Boolean<br />
| Specifies if the world was a template that locks all settings that change properties above in the settings GUI. It is recommended to set this to true for servers that do not allow things such as setting game rules through the GUI.<br />
|-<br />
| Only Spawn V1 Villagers<br />
| Boolean<br />
| A hack that Mojang put in place to preserve backwards compatibility with old villagers. The his never actually read though, so it has no functionality.<br />
|-<br />
| Game Version<br />
| String<br />
| The version of the game from which Vanilla features will be used. The exact function of this field isn't clear.<br />
|-<br />
| Level ID<br />
| String<br />
| A base64 encoded world ID that is used to identify the world.<br />
|-<br />
| World name<br />
| String<br />
| The name of the world that the player is joining. Note that this field shows up above the player list for the rest of the game session, and cannot be changed. Setting the server name to this field is recommended.<br />
|-<br />
| Premium World Template Id<br />
| String<br />
| A UUID specific to the premium world template that might have been used to generate the world. Servers should always fill out an empty String for this.<br />
|-<br />
| Is Trial<br />
| Boolean<br />
| Specifies if the world was a trial world, meaning features are limited and there is a time limit on the world.<br />
|-<br />
| Is Server Side movement enabled<br />
| Boolean<br />
| Specifies if the server is authoritative over the movement of the player, meaning it controls the movement of it.<br />
|-<br />
| Current Tick<br />
| Boolean<br />
| The total time in ticks that has elapsed since the start of the world.<br />
|-<br />
| Enchantment Seed<br />
| SignedVarInt<br />
| The seed used to seed the random used to produce enchantments in the enchantment table. Note that the exact correct random implementation must be used to produce the correct results both client- and server-side.<br />
|-<br />
| Block Palette<br />
| BlockPalette<br />
| A list of all blocks registered on the server.<br />
|-<br />
| Itemstates<br />
| Itemstates<br />
| A list of all items with their legacy IDs which are available in the game. Failing to send any of the items that are in the game will crash mobile clients.<br />
|-<br />
| Multiplayer Correlation ID<br />
| String<br />
| A unique ID specifying the multi-player session of the player. A random UUID should be filled out for this field.<br />
|}<br />
<br />
==== Add Player ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="19"| 0x0C<br />
|rowspan="19"| Client<br />
| UUID<br />
| UUID<br />
| UUID is the UUID of the player. It is the same UUID that the client sent in the Login packet at the start of the session. A player with this UUID must exist in the player list (built up using the Player List packet) for it to show up in-game.<br />
|-<br />
| Username<br />
| String<br />
| Username is the name of the player. This username is the username that will be set as the initial name tag of the player.<br />
|-<br />
| Entity ID Self<br />
| SignedVarLong<br />
| The unique ID of the player. The unique ID is a value that remains consistent across different sessions of the same world, but most unoffical servers simply fill the runtime ID of the player out for this field.<br />
|-<br />
| Runtime Entity ID<br />
| VarLong<br />
| The runtime ID of the player. The runtime ID is unique for each world session, and entities are generally identified in packets using this runtime ID.<br />
|-<br />
| Platform Chat ID<br />
| String<br />
| An identifier only set for particular platforms when chatting (presumably only for Nintendo Switch). It is otherwise an empty string, and is used to decide which players are able to chat with each other.<br />
|-<br />
| Position<br />
| Vector3<br />
| The position to spawn the player at. If the player is at a distance that the viewer cannot see, the player will still show up if the viewer moves closer.<br />
|-<br />
| Velocity<br />
| Vector3<br />
| The initial velocity the player spawns with. This velocity will initiate client side movement of the player.<br />
|-<br />
| Rotation<br />
| Float<br />
| Pitch, yaw and head yaw<br />
|-<br />
| Held Item<br />
| Item<br />
| The item that the player is holding. The item is shown to the viewer as soon as the player itself shows up. Needless to say that this field is rather pointless, as additional packets still must be sent for armour to show up.<br />
|-<br />
| Metadata<br />
| MetadataDictionary<br />
| A map of entity metadata, which includes flags and data properties that alter in particular the way the player looks. Flags include ones such as 'on fire' and 'sprinting'. The metadata values are indexed by their property key.<br />
|-<br />
| Flags<br />
| VarInt<br />
| Flags is a set of flags that specify certain properties of the player, such as whether or not it can fly and/or move through blocks.<br />
|-<br />
| Command permission<br />
| VarInt<br />
| A set of permissions that specify what commands a player is allowed to execute.<br />
|-<br />
| Action Permissions<br />
| VarInt<br />
| Action Permissions is, much like Flags, a set of flags that specify actions that the player is allowed to undertake, such as whether it is allowed to edit blocks, open doors etc.<br />
|-<br />
| Permission Level<br />
| VarInt<br />
| The permission level of the player as it shows up in the player list built up using the PlayerList packet.<br />
|-<br />
| Custom stored permissions<br />
| VarInt<br />
| <br />
|-<br />
| User Id<br />
| Long<br />
| A unique identifier of the player. It appears it is not required to fill this field out with a correct value. Simply writing 0 seems to work.<br />
|-<br />
| Links<br />
| Links<br />
| A list of entity links that are currently active on the player. These links alter the way the player shows up when first spawned in terms of it shown as riding an entity. Setting these links is important for new viewers to see the player is riding another entity.<br />
|-<br />
| Device ID<br />
| String<br />
| The device ID set in one of the files found in the storage of the device of the player. It may be changed freely, so it should not be relied on for anything.<br />
|-<br />
| Device OS<br />
| Int<br />
| The build platform/device OS of the player that is about to be added, as it sent in the Login packet when joining.<br />
|}<br />
<br />
Add Player is sent by the server to the client to make a player entity show up client-side. It is one of the few entities that cannot be sent using the AddActor packet.<br />
<br />
==== Add Entity ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="9"| 0x0D<br />
|rowspan="9"| Client<br />
| Entity ID Self<br />
| SignedVarLong<br />
| The unique ID of the entity. The unique ID is a value that remains consistent across different sessions of the same world, but most unofficial servers simply fill the runtime ID of the entity out for this field.<br />
|-<br />
| Runtime Entity ID<br />
| VarLong<br />
| The runtime ID of the entity. The runtime ID is unique for each world session, and entities are generally identified in packets using this runtime ID.<br />
|-<br />
| Entity Type<br />
| String<br />
| The string entity type of the entity, for example 'minecraft:skeleton'.<br />
|-<br />
| Position<br />
| Vector3<br />
| The position to spawn the entity at. If the entity is at a distance that the player cannot see, the entity will still show up if the player moves closer.<br />
|-<br />
| Velocity<br />
| Vector3<br />
| The initial velocity the entity spawns with. This velocity will initiate client side movement of the entity.<br />
|-<br />
| Rotation<br />
| Vector3<br />
| Pitch, yaw and head yaw<br />
|-<br />
| Attributes<br />
| EntityAttributes<br />
| A slice of attributes that the entity has. It includes attributes such as its health, movement speed, etc.<br />
|-<br />
| Metadata<br />
| MetadataDictionary<br />
| A map of entity metadata, which includes flags and data properties that alter in particular the way the entity looks. Flags include ones such as 'on fire' and 'sprinting'. The metadata values are indexed by their property key.<br />
|-<br />
| Links<br />
| Links<br />
| A list of entity links that are currently active on the entity. These links alter the way the entity shows up when first spawned in terms of it shown as riding an entity. Setting these links is important for new viewers to see the entity is riding another entity.<br />
|}<br />
<br />
Sent by the server to the client to spawn an entity to the player. It is used for every entity except other players, paintings and items, for which the Add Player, Add Painting and Add Item Entity packets are used.<br />
<br />
==== Remove Entity ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x0E<br />
|rowspan="1"| Client<br />
| Unique Entity Id<br />
| SignedVarLong<br />
| The unique ID of the entity to be removed. The unique ID is a value that remains consistent across different sessions of the same world, but most unofficial servers simply fill the runtime ID of the entity out for this field.<br />
|}<br />
<br />
Sent by the server to remove an entity that currently exists in the world from the client-side. Sending this packet if the client cannot already see this entity will have no effect.<br />
<br />
==== Add Item Entity ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="7"| 0x0F<br />
|rowspan="7"| Client<br />
| Entity ID Self<br />
| SignedVarLong<br />
| The unique ID of the entity. The unique ID is a value that remains consistent across different sessions of the same world, but most unofficial servers simply fill the runtime ID of the entity out for this field.<br />
|-<br />
| Runtime Entity ID<br />
| VarLong<br />
| The runtime ID of the entity. The runtime ID is unique for each world session, and entities are generally identified in packets using this runtime ID.<br />
|-<br />
| Item<br />
| Item<br />
| The item that is spawned. It must have a valid ID for it to show up client-side. If it is not a valid item, the client will crash when coming near.<br />
|-<br />
| Position<br />
| Vector3<br />
| The position to spawn the entity on. If the entity is at a distance that the player cannot see, the entity will still show up if the player moves closer.<br />
|-<br />
| Velocity<br />
| Vector3<br />
| The initial velocity the entity spawns with. This velocity will initiate client side movement of the entity.<br />
|-<br />
| Metadata<br />
| MetadataDictionary<br />
| A map of entity metadata, which includes flags and data properties that alter in particular the way the entity looks. Flags include ones such as 'on fire' and 'sprinting'. The metadata values are indexed by their property key.<br />
|-<br />
| Is From Fishing<br />
| Boolean<br />
| Specifies if the item was obtained by fishing it up using a fishing rod. It is not clear why the client needs to know this.<br />
|}<br />
<br />
Sent by the server to the client to make an item entity show up. It is one of the few entities that cannot be sent using the AddActor packet.<br />
<br />
==== Take Item Entity ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x11<br />
|rowspan="2"| Client<br />
| Item Runtime Entity Id<br />
| VarLong<br />
| the entity runtime ID of the item that is being taken by another entity. It will disappear to viewers after showing the pick-up animation.<br />
|-<br />
| Runtime Entity Id<br />
| VarLong<br />
| The runtime ID of the entity that took the item, which is usually a player, but could be another entity like a zombie too.<br />
|}<br />
<br />
Sent by the server when a player picks up an item entity. It makes the item entity disappear to viewers and shows the pick-up animation.<br />
<br />
==== Move Entity Absolute ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x12<br />
|rowspan="4"| Server & Client<br />
| Runtime entity id<br />
| VarLong<br />
| The runtime ID of the entity. The runtime ID is unique for each world session, and entities are generally identified in packets using this runtime ID.<br />
|-<br />
| Flags<br />
| byte<br />
| A combination of flags that specify details of the movement. See below for more info.<br />
|-<br />
| Position<br />
| PlayerLocation<br />
| <br />
|}<br />
<br />
{| class="wikitable"<br />
|-<br />
! Field<br />
! Bit<br />
! Notes<br />
|-<br />
| On ground<br />
| 0x01<br />
| If the entity is touching the ground<br />
|-<br />
| Telported<br />
| 0x02<br />
|<br />
|}<br />
<br />
Sent by the server to move an entity to an absolute position. It is typically used for movements where high accuracy isn't needed, such as for long range teleporting.<br />
This packet is also sent by the client when riding a horse/donkey.<br />
<br />
==== Move Player ====<br />
<br />
Sent by players to send their movement to the server, and by the server to update the movement of player entities to other players.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="8"| 0x13<br />
|rowspan="8"| Server & Client<br />
| Runtime entity id<br />
| VarLong<br />
| The runtime ID of the player. The runtime ID is unique for each world session, and entities are generally identified in packets using this runtime ID.<br />
|-<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| Rotation<br />
| Vector3<br />
| Pitch, yaw and head yaw<br />
|-<br />
| Mode<br />
| Byte<br />
| <br />
|-<br />
| On ground<br />
| Boolean<br />
| Specifies if the player is considered on the ground. Note that proxies or hacked clients could fake this to always be true, so it should not be taken for granted.<br />
|-<br />
| Riding runtime entity id<br />
| Float<br />
| The runtime ID of the entity that the player might currently be riding. If not riding, this should be left 0.<br />
|-<br />
| Teleportation cause<br />
| VarLong<br />
| See below. Only needs to exist if Mode cause is 2 (teleport).<br />
|-<br />
| Entity type<br />
| Byte<br />
| Only needs to exist if Mode cause is 2 (teleport).<br />
|}<br />
<br />
Modes:<br />
* 0: Normal<br />
* 1: Reset<br />
* 2: Teleport<br />
* 3: Rotation<br />
<br />
Teleportation causes:<br />
* 0: Unknown<br />
* 1: Projectile<br />
* 2: Chorus fruit<br />
* 3: Command<br />
* 4: Behavior<br />
<br />
==== Rider Jump ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x14<br />
|rowspan="1"| Server & Client<br />
| Jump Strength<br />
| SignedVarInt<br />
| The strength of the jump, depending on how long the rider has held the jump button.<br />
|}<br />
<br />
Sent by the client to the server when it jumps while riding an entity that has the WASDControlled entity flag set, for example when riding a horse. According to MiNET this can also be sent from the server to the client, but details on this are unknown.<br />
<br />
==== Update Block ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x15<br />
|rowspan="4"| Client<br />
| Coordinates<br />
| BlockCoordinates<br />
| The block position at which a block is updated.<br />
|-<br />
| Block Runtime ID<br />
| VarInt<br />
| The runtime ID of the block that is placed at Position after sending the packet to the client. The runtime ID must point to a block sent in the list in the Start Game packet.<br />
|-<br />
| Flags<br />
| VarInt<br />
| See below. Flags is a combination of flags that specify the way the block is updated client-side. It is a combination of the flags below, but typically sending only the Network flag is sufficient.<br />
|-<br />
| Layer<br />
| VarInt<br />
| The world layer on which the block is updated. In Bedrock, multiple blocks can be put in the same location using layers. The second layer is usually used for liquids, so blocks can be inside a liquid. For most blocks, this is the first layer, as that layer is the default layer to place blocks on, but for blocks inside of each other, this differs. As this system is designed with liquids, there may be bugs when using this to place blocks inside each other. For example, placing an interactable block such as an item frame on the second layer can cause a game crash if the player tries to interact with it.<br />
|}<br />
<br />
{| class="wikitable"<br />
|-<br />
! Field<br />
! Bit<br />
! Notes<br />
|-<br />
| Neighbors<br />
| 0x01<br />
| <br />
|-<br />
| Network<br />
| 0x02<br />
|<br />
|-<br />
| No Graphic<br />
| 0x04<br />
|<br />
|-<br />
| Priority<br />
| 0x08<br />
|<br />
|}<br />
<br />
Sent by the server to update a block client-side, without resending the entire chunk that the block is located in. It is particularly useful for small modifications like block breaking/placing.<br />
<br />
==== Add Painting ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x16<br />
|rowspan="5"| Client<br />
| Unique Entity Id<br />
| SignedVarLong<br />
| The unique ID of the entity. The unique ID is a value that remains consistent across different sessions of the same world, but most unofficial servers simply fill the runtime ID of the entity out for this field.<br />
|-<br />
| Runtime Entity Id<br />
| VarLong<br />
| The runtime ID of the entity. The runtime ID is unique for each world session, and entities are generally identified in packets using this runtime ID.<br />
|-<br />
| Position<br />
| Vector3<br />
| The position to spawn the entity at. If the entity is at a distance that the player cannot see, the entity will still show up if the player moves closer.<br />
|-<br />
| Direction<br />
| SignedVarInt<br />
| The facing direction of the painting. See below.<br />
|-<br />
| Name<br />
| String<br />
| This is the name of the painting (e.g. BurningSkull). See below.<br />
|}<br />
<br />
Valid facing values:<br />
* 0 - Facing towards positive Z (south)<br />
* 1 - Facing towards negative X (west)<br />
* 2 - Facing towards negative Z (north)<br />
* 3 - Facing towards positive X (east)<br />
<br />
Valid name values:<br />
* Kebab<br />
* Aztec<br />
* Alban<br />
* Aztec<br />
* Aztec2<br />
* Bomb<br />
* Plant<br />
* Wasteland<br />
* Wanderer<br />
* Graham<br />
* Pool<br />
* Courbet<br />
* Sunset<br />
* Sea<br />
* Creebet<br />
* Match<br />
* Bust<br />
* Stage<br />
* Void<br />
* SkullAndRoses<br />
* Wither<br />
* Fighters<br />
* Skeleton<br />
* DonkeyKong<br />
* PoInter<br />
* Pigscene<br />
* BurningSkull<br />
<br />
==== Tick Sync ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x17<br />
|rowspan="2"| Server & Client<br />
| Request Timestamp<br />
| Boolean<br />
| <br />
|-<br />
| Response Timestamp<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Level Sound Event (1) ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="6"| 0x18<br />
|rowspan="6"| Server & Client<br />
| Sound ID<br />
| Byte<br />
| <br />
|-<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| Block Id<br />
| SignedVarInt<br />
| <br />
|-<br />
| Entity Type<br />
| SignedVarInt<br />
| <br />
|-<br />
| Is baby mob<br />
| Boolean<br />
| <br />
|-<br />
| Is global<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Level Event ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x19<br />
|rowspan="3"| Client<br />
| Event ID<br />
| SignedVarInt<br />
| <br />
|-<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| Data<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Block Event ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x1A<br />
|rowspan="3"| Client<br />
| Block Position<br />
| BlockCoordinates<br />
| <br />
|-<br />
| Event Type<br />
| SignedVarInt<br />
| <br />
|-<br />
| Event Data<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
==== Entity Event ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x1B<br />
|rowspan="3"| Server & Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Event ID<br />
| Byte<br />
| <br />
|-<br />
| Data<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Mob Effect ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="6"| 0x1C<br />
|rowspan="6"| Client<br />
| Runtime entity id<br />
| VarLong<br />
| <br />
|-<br />
| Event<br />
| Byte<br />
| <br />
|-<br />
| Effect id<br />
| SignedVarInt<br />
| <br />
|-<br />
| Amplifier<br />
| SignedVarInt<br />
| <br />
|-<br />
| Particles<br />
| Boolean<br />
| <br />
|-<br />
| Duration<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
Events:<br />
* 0: None<br />
* 1: Add<br />
* 2: Modify<br />
* 3: Remove<br />
<br />
==== Update Attributes ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x1D<br />
|rowspan="2"| Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Attributes<br />
| PlayerAttributes<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Inventory Transaction ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x1E<br />
|rowspan="1"| Server & Client<br />
| Transaction<br />
| Transaction<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Mob Equipment ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x1F<br />
|rowspan="5"| Server & Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Item<br />
| Item<br />
| <br />
|-<br />
| Slot<br />
| Byte<br />
| <br />
|-<br />
| Selected Slot<br />
| Byte<br />
| <br />
|-<br />
| Windows Id<br />
| Byte<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Mob Armor Equipment ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x20<br />
|rowspan="5"| Server & Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Helmet<br />
| Item<br />
| <br />
|-<br />
| Chestplate<br />
| Item<br />
| <br />
|-<br />
| Leggings<br />
| Item<br />
| <br />
|-<br />
| Boots<br />
| Item<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Interact ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x21<br />
|rowspan="2"| Server & Client<br />
| Action ID<br />
| Byte<br />
| <br />
|-<br />
| Target Runtime Entity ID<br />
| VarLong<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Block Pick Request ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x22<br />
|rowspan="5"| Server<br />
| Block Position X<br />
| SignedVarInt<br />
| <br />
|-<br />
| Block Position Y<br />
| SignedVarInt<br />
| <br />
|-<br />
| Block Position Z<br />
| SignedVarInt<br />
| <br />
|-<br />
| Add User Data<br />
| bool<br />
| Whether there should be NBT data in the picked block (activated by pressing Ctrl on default keyboard controls)<br />
|-<br />
| Hotbar Slot<br />
| Byte<br />
| <br />
|}<br />
<br />
The Bedrock client sends the position of the block. It expects the server to decide the block to pick and add it to the inventory or switch the hotbar slot if needed.<br />
<br />
==== Entity Pick Request ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x23<br />
|rowspan="2"| Server<br />
| Runtime Entity Id<br />
| Unsigned Long<br />
| <br />
|-<br />
| Hotbar Slot<br />
| Byte<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Player Action ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x24<br />
|rowspan="4"| Server<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Action ID<br />
| SignedVarInt<br />
| <br />
|-<br />
| Coordinates<br />
| BlockCoordinates<br />
| <br />
|-<br />
| Face<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Entity Fall ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x25<br />
|rowspan="3"| Server<br />
| Runtime Entity Id<br />
| VarLong<br />
| <br />
|-<br />
| Fall Distance<br />
| Float<br />
| <br />
|-<br />
| In Void<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Hurt Armor ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x26<br />
|rowspan="1"| Client<br />
| Health<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Entity Data ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x27<br />
|rowspan="2"| Server & Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Metadata<br />
| MetadataDictionary<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Entity Motion ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x28<br />
|rowspan="4"| Server & Client<br />
| Runtime Entity Id<br />
| VarLong<br />
| <br />
|-<br />
| Motion X<br />
| Vector3<br />
| <br />
|-<br />
| Motion Y<br />
| Float<br />
| <br />
|-<br />
| Motion Z<br />
| Float<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Entity Link ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x29<br />
|rowspan="4"| Client<br />
| Ridden ID<br />
| SignedVarLong<br />
| <br />
|-<br />
| Rider ID<br />
| SignedVarLong<br />
| <br />
|-<br />
| Link Type<br />
| Byte<br />
| <br />
|-<br />
| Unknown<br />
| Byte<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Health ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x2A<br />
|rowspan="1"| Client<br />
| Health<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Spawn Position ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x2B<br />
|rowspan="3"| Client<br />
| Spawn Type<br />
| SignedVarInt<br />
| <br />
|-<br />
| Coordinates<br />
| BlockCoordinates<br />
| <br />
|-<br />
| Forced<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Animate ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x2C<br />
|rowspan="2"| Server & Client<br />
| Action ID<br />
| SignedVarInt<br />
| <br />
|-<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Respawn ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x2D<br />
|rowspan="3"| Server & Client<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| Runtime Entity Id<br />
| Byte<br />
| <br />
|-<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|}<br />
<br />
==== Container Open ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x2E<br />
|rowspan="4"| Client<br />
| Window Id<br />
| Byte<br />
| <br />
|-<br />
| Type<br />
| Byte<br />
| <br />
|-<br />
| Block Position<br />
| BlockCoordinates<br />
| <br />
|-<br />
| Unique Entity Id<br />
| SignedVarLong<br />
| <br />
|}<br />
<br />
Bedrock needs either a valid block position, with an actual block at that position, or an entity ID for this to work. The entity must have CONTAINER_BASE_SIZE metadata, or the block must be a container. The entity ID is used for minecart chests etc. but any entity will work. If the entity has NAMETAG metadata this will be used as the container name.<br />
<br />
==== Container Close ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x2F<br />
|rowspan="1"| Server & Client<br />
| Window Id<br />
| Byte<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Player Hotbar ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x30<br />
|rowspan="3"| Server & Client<br />
| Selected Hotbar Slot<br />
| VarInt<br />
| <br />
|-<br />
| Container Id<br />
| Byte<br />
| <br />
|-<br />
| Select Hotbar Slot<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Inventory Content ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x31<br />
|rowspan="2"| Server & Client<br />
| Inventory Id<br />
| VarInt<br />
| <br />
|-<br />
| Input<br />
| ItemStacks<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Inventory Slot ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x32<br />
|rowspan="3"| Server & Client<br />
| Inventory Id<br />
| VarInt<br />
| <br />
|-<br />
| Slot<br />
| VarInt<br />
| <br />
|-<br />
| Item<br />
| Item<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Container Set Data ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x33<br />
|rowspan="3"| Client<br />
| Window Id<br />
| Byte<br />
| <br />
|-<br />
| Property<br />
| SignedVarInt<br />
| <br />
|-<br />
| Value<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Crafting Data ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x34<br />
|rowspan="4"| Client<br />
| Recipes<br />
| Recipes<br />
| <br />
|-<br />
| Potion type recipes<br />
| PotionTypeRecipe[]<br />
| <br />
|-<br />
| potion container recipes<br />
| PotionContainerChangeRecipe[]<br />
| <br />
|-<br />
| Is Clean<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Crafting Event ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x35<br />
|rowspan="5"| Server & Client<br />
| Window ID<br />
| Byte<br />
| <br />
|-<br />
| Recipe Type<br />
| SignedVarInt<br />
| <br />
|-<br />
| Recipe ID<br />
| UUID<br />
| <br />
|-<br />
| Input<br />
| ItemStacks<br />
| <br />
|-<br />
| Result<br />
| ItemStacks<br />
| <br />
|}<br />
<br />
<br />
<br />
==== GUI Data Pick Item ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x36<br />
|rowspan="1"| Client<br />
|-<br />
| Item name<br />
| String<br />
| The name of the item that shows up in the top part of the popup that shows up when selecting an item. It is shown as if an item was selected by the player itself.<br />
|-<br />
| Item effects<br />
| String<br />
| The line under the Item name, where the effects of the item are usually situated.<br />
|-<br />
| Hotbar Slot<br />
| int<br />
| The hot bar slot to be selected/picked. This does not currently work, so it does not matter what number this is.<br />
|}<br />
<br />
Sent by the server to make the client 'select' a hotbar slot. It currently appears to be broken however, and does not actually set the selected slot to the hotbar slot set in the packet.<br />
<br />
==== Adventure Settings ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="6"| 0x37<br />
|rowspan="6"| Server & Client<br />
| Flags<br />
| VarInt<br />
| <br />
|-<br />
| Command permission<br />
| VarInt<br />
| <br />
|-<br />
| Action permissions<br />
| VarInt<br />
| <br />
|-<br />
| Permission level<br />
| VarInt<br />
| <br />
|-<br />
| Custom stored permissions<br />
| VarInt<br />
| <br />
|-<br />
| User Id<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Block Entity Data ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x38<br />
|rowspan="2"| Server & Client<br />
| Coordinates<br />
| BlockCoordinates<br />
| <br />
|-<br />
| NamedTag<br />
| NBT<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Player Input ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x39<br />
|rowspan="4"| Server<br />
| Motion X<br />
| Float<br />
| <br />
|-<br />
| Motion Z<br />
| Float<br />
| <br />
|-<br />
| Jumping<br />
| Boolean<br />
| <br />
|-<br />
| Sneaking<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Level Chunk ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x3A<br />
|rowspan="5"| Client<br />
| Chunk X<br />
| SignedVarInt<br />
| <br />
|-<br />
| Chunk Z<br />
| SignedVarInt<br />
| <br />
|-<br />
| Sub Chunk Count<br />
| VarInt<br />
| <br />
|-<br />
| Cache Enabled<br />
| Boolean<br />
| <br />
|-<br />
| Chunk Data<br />
| ByteArray<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Commands Enabled ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x3B<br />
|rowspan="1"| Client<br />
| Commands enabled<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Difficulty ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x3C<br />
|rowspan="1"| Client<br />
| Difficulty<br />
| VarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Change Dimension ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x3D<br />
|rowspan="5"| Client<br />
| Dimension<br />
| SignedVarInt<br />
| <br />
|-<br />
| Position X<br />
| Vector3<br />
| <br />
|-<br />
| Position Y<br />
| Boolean<br />
| <br />
|-<br />
| Position Z<br />
| Float<br />
| <br />
|-<br />
| Respawn<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Player Game Type ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x3E<br />
|rowspan="1"| Server & Client<br />
| Game mode<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Player List ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x3F<br />
|rowspan="1"| Client<br />
| Records<br />
| PlayerRecords<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Simple Event ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x40<br />
|rowspan="1"| Client<br />
| Event Type<br />
| Unsigned Short<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Event ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x41<br />
|rowspan="3"| Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Event data<br />
| SignedVarInt<br />
| <br />
|-<br />
| Event type<br />
| Byte<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Spawn Experience Orb ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x42<br />
|rowspan="2"| Client<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| Count<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Map Item Data ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x43<br />
|rowspan="1"| Client<br />
| MapInfo<br />
| MapInfo<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Map Info Request ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x44<br />
|rowspan="1"| Server & Client<br />
| Unique Map Id<br />
| SignedVarLong<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Request Chunk Radius ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x45<br />
|rowspan="1"| Server & Client<br />
| Chunk radius<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Chunk Radius Updated ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x46<br />
|rowspan="1"| Client<br />
| Chunk radius<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== ItemFrame Drop Item ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x47<br />
|rowspan="1"| Server & Client<br />
| Block Position<br />
| BlockCoordinates<br />
| See note below.<br />
|}<br />
<br />
According to the NukkitX Protocol, the server sends the Y coordinate divided by two, and negative if needs to be subtracted by one. Example:<br />
<br />
Int y;<br />
if (packet.getBlockPosition().getY() &gt; 0) {<br />
y = packet.getBlockPosition().getY() * 2;<br />
} else {<br />
y = (packet.getBlockPosition().getY() * -2) - 1;<br />
}<br />
<br />
==== Game Rules Changed ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x48<br />
|rowspan="1"| Client<br />
| Rules<br />
| GameRules<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Camera ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x49<br />
|rowspan="2"| Client<br />
| Camera Unique Entity Id<br />
| SignedVarLong<br />
| <br />
|-<br />
| Player Unique Entity Id<br />
| SignedVarLong<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Boss Event ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x4A<br />
|rowspan="2"| Client<br />
| Boss Entity ID<br />
| SignedVarLong<br />
| <br />
|-<br />
| Event Type<br />
| VarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Show Credits ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x4B<br />
|rowspan="2"| Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Status<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Available Commands ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x4C<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== Command Request ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x4D<br />
|rowspan="5"| Server<br />
| Command<br />
| String<br />
| <br />
|-<br />
| Command type<br />
| VarInt<br />
| <br />
|-<br />
| Unknown UUID<br />
| UUID<br />
| <br />
|-<br />
| Request ID<br />
| String<br />
| <br />
|-<br />
| Unknown<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== CommandBlock Update ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x4E<br />
|rowspan="1"| Server<br />
| Is Block<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Command Output ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x4F<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== Update Trade ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="10"| 0x50<br />
|rowspan="10"| Client<br />
| Window ID<br />
| Byte<br />
| <br />
|-<br />
| Window Type<br />
| Byte<br />
| <br />
|-<br />
| Unknown0<br />
| VarInt<br />
| <br />
|-<br />
| Unknown1<br />
| VarInt<br />
| <br />
|-<br />
| Unknown2<br />
| VarInt<br />
| <br />
|-<br />
| Is Willing<br />
| Boolean<br />
| <br />
|-<br />
| Trader Entity ID<br />
| SignedVarLong<br />
| <br />
|-<br />
| Player Entity ID<br />
| SignedVarLong<br />
| <br />
|-<br />
| Display Name<br />
| String<br />
| <br />
|-<br />
| NamedTag<br />
| NBT<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Update Equip ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x51<br />
|rowspan="5"| Client<br />
| Window ID<br />
| Byte<br />
| <br />
|-<br />
| Window Type<br />
| Byte<br />
| <br />
|-<br />
| Unknown<br />
| Byte<br />
| <br />
|-<br />
| Entity ID<br />
| SignedVarLong<br />
| <br />
|-<br />
| NamedTag<br />
| NBT<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Resource Pack Data Info ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="7"| 0x52<br />
|rowspan="7"| Client<br />
| Package ID<br />
| String<br />
| <br />
|-<br />
| Max Chunk Size<br />
| Unsigned Int<br />
| <br />
|-<br />
| Chunk Count<br />
| Unsigned Int<br />
| <br />
|-<br />
| Compressed Package Size<br />
| Unsigned Long<br />
| <br />
|-<br />
| Hash<br />
| ByteArray<br />
| <br />
|-<br />
| Is Premium<br />
| Boolean<br />
| <br />
|-<br />
| Pack Type<br />
| Byte<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Resource Pack Chunk Data ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x53<br />
|rowspan="4"| Client<br />
| Package ID<br />
| String<br />
| <br />
|-<br />
| Chunk Index<br />
| Unsigned Int<br />
| <br />
|-<br />
| Progress<br />
| Unsigned Long<br />
| <br />
|-<br />
| Payload<br />
| ByteArray<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Resource Pack Chunk Request ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x54<br />
|rowspan="2"| Server<br />
| Package ID<br />
| String<br />
| <br />
|-<br />
| Chunk Index<br />
| Unsigned Int<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Transfer ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x55<br />
|rowspan="2"| Client<br />
| Address<br />
| String<br />
| <br />
|-<br />
| Port<br />
| Unsigned Short<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Play Sound ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x56<br />
|rowspan="4"| Client<br />
| Sound name<br />
| String<br />
| <br />
|-<br />
| Sound position<br />
| Position<br />
| <br />
|-<br />
| Volume<br />
| Float<br />
| <br />
|-<br />
| Pitch<br />
| Float<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Stop Sound ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x57<br />
|rowspan="2"| Client<br />
| Sound Name<br />
| String<br />
| <br />
|-<br />
| Stopping All Sound<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Title ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x58<br />
|rowspan="5"| Client<br />
| Type<br />
| SignedVarInt<br />
| <br />
|-<br />
| Text<br />
| String<br />
| <br />
|-<br />
| Fade In Time<br />
| SignedVarInt<br />
| <br />
|-<br />
| Stay Time<br />
| SignedVarInt<br />
| <br />
|-<br />
| Fade Out Time<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Add Behavior Tree ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x59<br />
|rowspan="1"| Client<br />
| Behavior Tree Json<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Structure Block Update ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x5A<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== Show Store Offer ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x5B<br />
|rowspan="2"| Client<br />
| Offer Id<br />
| String<br />
| <br />
|-<br />
| Shown To All<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Purchase Receipt ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x5C<br />
|rowspan="1"| Server<br />
<br />
|}<br />
<br />
<br />
<br />
==== Player Skin ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x5D<br />
|rowspan="4"| Server & Client<br />
| UUID<br />
| UUID<br />
| <br />
|-<br />
| Skin<br />
| Skin<br />
| <br />
|-<br />
| Skin Name<br />
| String<br />
| <br />
|-<br />
| Old Skin Name<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Sub Client Login ====<br />
Sent when an additional player attempts to join from a split screen session. The contents of the chain data and skin data fields use the same format as the [[#Login|Login]] packet, and can be decoded the same way.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x5E<br />
|rowspan="2"| Server<br />
| Chain data<br />
| JSON array of JWT Data<br />
| Contains the display name, UUID and XUID<br />
|-<br />
| Skin data<br />
| JWT Data<br />
| <br />
|}<br />
<br />
==== Automation Client Connect ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x5F<br />
|rowspan="1"| Client<br />
| Address<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Last Hurt By ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x60<br />
|rowspan="1"| Client<br />
| Entity Type Id<br />
| VarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Book Edit ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x61<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== NPC Request ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x62<br />
|rowspan="4"| Server & Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Unknown0<br />
| Byte<br />
| <br />
|-<br />
| Unknown1<br />
| String<br />
| <br />
|-<br />
| Unknown2<br />
| Byte<br />
| <br />
|}<br />
<br />
==== Photo Transfer ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x63<br />
|rowspan="3"| Server<br />
| File name<br />
| String<br />
| <br />
|-<br />
| Image data<br />
| String<br />
| <br />
|-<br />
| Unknown2<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Model Form Request ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x64<br />
|rowspan="2"| Client<br />
| Form Id<br />
| VarInt<br />
| <br />
|-<br />
| Form Data<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Model Form Response ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x65<br />
|rowspan="2"| Server<br />
| Form Id<br />
| VarInt<br />
| <br />
|-<br />
| Form Data<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Server Settings Request ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x66<br />
|rowspan="1"| Server<br />
<br />
|}<br />
<br />
<br />
<br />
==== Server Settings Response ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x67<br />
|rowspan="2"| Client<br />
| Form Id<br />
| VarLong<br />
| <br />
|-<br />
| Form Data<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Show Profile ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x68<br />
|rowspan="1"| Client<br />
| Xuid<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Default Game Type ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x69<br />
|rowspan="1"| Client<br />
| Game mode<br />
| VarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Remove Objective ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x6A<br />
|rowspan="1"| Client<br />
| Objective Id<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Display Objective ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x6B<br />
|rowspan="5"| Client<br />
| Display Slot<br />
| String<br />
| <br />
|-<br />
| Objective Id<br />
| String<br />
| <br />
|-<br />
| Display Name<br />
| String<br />
| <br />
|-<br />
| Criteria<br />
| String<br />
| <br />
|-<br />
| Sort Order<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Score ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x6C<br />
|rowspan="1"| Client<br />
| Entries<br />
| ScoreEntries<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Lab Table ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x6D<br />
|rowspan="5"| Server & Client<br />
| Unknown Byte 0<br />
| Byte<br />
| <br />
|-<br />
| Block Entity Position X<br />
| VarInt<br />
| <br />
|-<br />
| Block Entity Position Y<br />
| VarInt<br />
| <br />
|-<br />
| Block Entity Position Z<br />
| VarInt<br />
| <br />
|-<br />
| Reaction Type<br />
| Byte<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Update Block Synced ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="6"| 0x6E<br />
|rowspan="6"| Client<br />
| Coordinates<br />
| BlockCoordinates<br />
| <br />
|-<br />
| Block Runtime ID<br />
| VarInt<br />
| <br />
|-<br />
| Block Priority<br />
| VarInt<br />
| <br />
|-<br />
| Data Layer ID<br />
| VarInt<br />
| <br />
|-<br />
| Unknown0<br />
| VarLong<br />
| <br />
|-<br />
| Unknown1<br />
| VarLong<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Move Entity Delta ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x6F<br />
|rowspan="2"| Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Flags<br />
| Unsigned Short<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Scoreboard Identity ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x70<br />
|rowspan="1"| Client<br />
| Entries<br />
| ScoreboardIdentityEntries<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Local Player As Initialized ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x71<br />
|rowspan="1"| Server<br />
| Runtime Entity Id<br />
| VarLong<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Update Soft Enum ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x72<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== Network Stack Latency ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x73<br />
|rowspan="2"| Server & Client<br />
| Timestamp<br />
| Unsigned Long<br />
| <br />
|-<br />
| Send Back<br />
| Byte<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Script Custom Event ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x75<br />
|rowspan="2"| Server & Client<br />
| Event Name<br />
| String<br />
| <br />
|-<br />
| Data<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Spawn Particle Effect ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x76<br />
|rowspan="4"| Client<br />
| Dimension Id<br />
| Byte<br />
| <br />
|-<br />
| Unique Entity Id<br />
| SignedVarLong<br />
| <br />
|-<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| Identifier<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Available Entity Identifiers ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x77<br />
|rowspan="1"| Client<br />
| NamedTag<br />
| NBT<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Level Sound Event (2) ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="6"| 0x78<br />
|rowspan="6"| Server & Client<br />
| Sound ID<br />
| Byte<br />
| <br />
|-<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| Block Id<br />
| SignedVarInt<br />
| <br />
|-<br />
| Entity Type<br />
| String<br />
| <br />
|-<br />
| Is baby mob<br />
| Boolean<br />
| <br />
|-<br />
| Is global<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Network Chunk Publisher Update ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x79<br />
|rowspan="2"| Client<br />
| Coordinates<br />
| BlockCoordinates<br />
| <br />
|-<br />
| Radius<br />
| VarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Biome Definition List ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x7A<br />
|rowspan="1"| Client<br />
| NamedTag<br />
| NBT<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Level Sound Event (3) ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="6"| 0x7B<br />
|rowspan="6"| Server & Client<br />
| Sound ID<br />
| VarInt<br />
| <br />
|-<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| Block Id<br />
| SignedVarInt<br />
| <br />
|-<br />
| Entity Type<br />
| String<br />
| <br />
|-<br />
| Is baby mob<br />
| Boolean<br />
| <br />
|-<br />
| Is global<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Level Event Generic ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x7C<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== Lectern Update ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x7D<br />
|rowspan="4"| Client<br />
| Page<br />
| Byte<br />
| <br />
|-<br />
| Total Pages<br />
| Byte<br />
| <br />
|-<br />
| Block Position<br />
| Position<br />
| <br />
|-<br />
| Dropping Book<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Video Stream Connect ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x7E<br />
|rowspan="5"| Client<br />
| Server URI<br />
| String<br />
| <br />
|-<br />
| Frame Send Frequency<br />
| Float<br />
| <br />
|-<br />
| Action<br />
| Byte<br />
| <br />
|-<br />
| Resolution X<br />
| Int<br />
| <br />
|-<br />
| Resolution Y<br />
| Int<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Client Cache Status ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x81<br />
|rowspan="1"| Server & Client<br />
| Supported<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== On Screen Texture Animation ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x82<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== Map Create Locked Copy ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x83<br />
|rowspan="2"| Client<br />
| Original Map Id<br />
| Boolean<br />
| <br />
|-<br />
| New Map Id<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Structure Template Data Export Request ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x84<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== Structure Template Data Export Response ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x85<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== Update Block Properties ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x86<br />
|rowspan="2"| Client<br />
| Unknown<br />
| Byte<br />
| <br />
|-<br />
| NamedTag<br />
| NBT<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Client Cache Blob Status ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x87<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== Client Cache Miss Response ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x88<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== Network Settings ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x8F<br />
|rowspan="2"| Client<br />
| Unknown<br />
| Byte<br />
| <br />
|-<br />
| Compression threshold<br />
| Short<br />
| <br />
|}<br />
<br />
[[Category:Bedrock Minecraft]]</div>Orladoghttps://wiki.vg/index.php?title=Bedrock_Protocol&diff=15848Bedrock Protocol2020-06-13T09:52:05Z<p>Orladog: Change info about RakNet</p>
<hr />
<div>:: '''Remember that this page is a WIP'''. Come back later to see a more complete page.<br />
----<br />
<br />
{{Box<br />
|BORDER = #9999FF<br />
|BACKGROUND = #99CCFF<br />
|WIDTH = 100%<br />
|ICON = <br />
|HEADING = Heads up!<br />
|CONTENT = This article is about the protocol for the latest '''stable''' release of Minecraft '''Bedrock Edition''' ([[Bedrock Protocol version numbers|1.14.60, protocol 390]]). See [[Protocol]] for the Java Edition Protocol.<br />
}}<br />
<br />
This is the [https://minecraft.gamepedia.com/Bedrock_Edition Bedrock Edition] Protocol Documentation.<br />
The Bedrock Edition Protocol uses [[wikipedia:User Datagram Protocol|UDP]] instead of [[wikipedia:Transmission Control Protocol|TCP]] that is used for the Java Edition.<br />
Bedrock Edition uses [[Raknet Protocol|RakNet]] as its protocol library.<br />
<br />
The default Bedrock Edition port is 19132.<br />
<br />
Information for this page was obtained from the [https://github.com/NukkitX/Protocol NukkitX Protocol library], [https://github.com/NiclasOlofsson/MiNET MiNET] and [https://github.com/Sandertv/gophertunnel gophertunnel].<br />
<br />
<br />
== Data types ==<br />
<br />
{| class="wikitable"<br />
|-<br />
!<br />
! Size (Bytes)<br />
! Range<br />
! Notes<br />
|-<br />
! Byte<br />
| 1<br />
| 0 to 255<br />
|<br />
|-<br />
! Boolean<br />
| 1<br />
| 0 or 1<br />
| A Byte treated as boolean, 0 is false but anything greater then that is true<br />
|-<br />
! Short<br />
| 2<br />
| -32768 to 32767<br />
|<br />
|-<br />
! Unsigned Short<br />
| 2<br />
| 0 to 65535<br />
|<br />
|-<br />
! Int<br />
| 4<br />
| -2147483648 to 2147483647<br />
| Signed little-endian 32-bit Integer<br />
|-<br />
! Int (big endian)<br />
| 4<br />
| -2147483648 to 2147483647<br />
| Signed big-endian 32-bit Integer<br />
|-<br />
! Unsigned Int<br />
| 4<br />
| 0 to 4294967295<br />
| Unsigned 32-bit Integer<br />
|-<br />
! Long<br />
| 8<br />
| -2^63 to 2^63-1<br />
| Signed 64-bit Integer<br />
|-<br />
! Unsigned Long<br />
| 8<br />
| 2^64-1<br />
| Unsigned 64-bit Integer<br />
|-<br />
! Float<br />
| 4<br />
| <br />
| A [[wikipedia:Single-precision_Floating-poInt_format|single-precision 32-bit IEEE 754 Floating poInt number]]<br />
|-<br />
! Double<br />
| 8<br />
| <br />
| A [[wikipedia:Double-precision_Floating-poInt_format|Double-precision 64-bit IEEE 754 Floating poInt number]]<br />
|-<br />
! VarInt<br />
| &ge; 1<br>&le; 5<br />
| 0 to 4294967295<br />
| <br />
|-<br />
! SignedVarInt<br />
| &ge; 1<br>&le; 5<br />
| -2147483648 and 2147483647<br />
| <br />
|-<br />
! VarLong<br />
| &ge; 1<br>&le; 10<br />
| <br />
|<br />
|-<br />
! SignedVarLong<br />
| &ge; 1<br>&le; 10<br />
| -2^63 and 2^63-1<br />
|<br />
|-<br />
! String<br />
| <br />
| <br />
| [[wikipedia:UTF-8|UTF-8]] String prefixed with its size in Bytes as a VarInt. This has the same data structure as a ByteArray but it contains textual data.<br />
|-<br />
! Vector3<br />
| 12<br />
| <br />
| Three Float values (X, Y and Z respectively)<br />
|-<br />
! Vector2<br />
| 8<br />
| <br />
| Two Float values (X and Y respectively)<br />
|-<br />
! NBT<br />
| <br />
| <br />
| <br />
|-<br />
! ByteArray<br />
| <br />
| <br />
| An arbitrary array of Bytes prefixed with its size in Bytes as a VarInt.<br />
|-<br />
! BlockCoordinates<br />
| &ge; 3<br>&le; 15<br />
| <br />
| A SignedVarInt, a normal VarInt and another SignedVarInt (X, Y and Z respectively)<br />
|-<br />
! PlayerLocation<br />
| 15<br />
| <br />
| Three Float values (X, Y and Z respectively), followed by three Bytes (pitch, head yaw and yaw respectively). To convert the Bytes to normal pitch and yaw values divide them by 0.71<br />
|-<br />
! UUID<br />
| 16<br />
| A [[wikipedia:Universally_unique_identifier|UUID]]<br />
| Encoded as two unsigned 64-bit Integers: the most significant 64 bits and the least significant 64 bits<br />
|-<br />
! Item<br />
| <br />
| <br />
|<br />
|-<br />
! ItemStacks<br />
| <br />
| <br />
|<br />
|-<br />
! Itemstates<br />
| <br />
| <br />
|<br />
|-<br />
! EntityAttributes<br />
| <br />
| <br />
|<br />
|-<br />
! PlayerAttributes<br />
| <br />
| <br />
|<br />
|-<br />
! Skin<br />
| <br />
| <br />
|<br />
|-<br />
! Recipes<br />
| <br />
| <br />
|<br />
|-<br />
! GameRules<br />
| <br />
| <br />
| <br />
|-<br />
! Transaction<br />
| <br />
| <br />
| <br />
|-<br />
! BlockPalette<br />
| <br />
| <br />
|<br />
|-<br />
! ScoreEntries<br />
| <br />
| <br />
|<br />
|-<br />
! MapInfo<br />
| <br />
| <br />
|<br />
|-<br />
! PlayerRecords<br />
| <br />
| <br />
|<br />
|-<br />
! ScoreboardIdentityEntries<br />
| <br />
| <br />
|<br />
|-<br />
! MetadataDictionary<br />
| <br />
| <br />
| <br />
|-<br />
! PotionTypeRecipe<br />
| <br />
| <br />
| <br />
|-<br />
! PotionContainerChangeRecipe<br />
| <br />
| <br />
| <br />
|-<br />
! ResourcePackInfos<br />
| <br />
| <br />
|<br />
|-<br />
! ResourcePackIdVersions<br />
| <br />
| <br />
|<br />
|-<br />
! ResourcePackIds<br />
| <br />
| <br />
| <br />
|}<br />
<br />
== Packet Format ==<br />
<br />
== Login process ==<br />
The login process is as follows:<br />
# C→S: [[#Login|Login]]<br />
# S→C: [[#Server To Client Handshake|Server To Client Handshake]]<br />
# C→S: [[#Client To Server Handshake|Client To Server Handshake]]<br />
# S→C: [[#Play Status|Play Status]] (Login success)<br />
<br />
To spawn, the following packets should be sent, in order, after the ones above:<br />
# S→C: [[#Resource Packs Info|Resource Packs Info]]<br />
# C→S: [[#Resource Pack Client Response|Resource Pack Client Response]]<br />
# S→C: [[#Resource Pack Stack|Resource Pack Stack]]<br />
# C→S: [[#Resource Pack Client Response|Resource Pack Client Response]]<br />
# S→C: [[#Start Game|Start Game]]<br />
# S→C: [[#Biome Definition List|Biome Definition List]]<br />
# S→C: Chunks<br />
# S→C: [[#Play Status|Play Status]] (Player spawn)<br />
<br />
If there are no resource packs being sent, a [[#Resource Pack Stack|Resource Pack Stack]] can be sent directly after [[#Resource Packs Info|Resource Packs Info]] to avoid the client responses.<br />
<br />
== Packets ==<br />
Please note that some packet ids are missing, so they don't line up.<br />
The following packet ids are missing:<br />
0x10, 0x74, 0x7F, 0x80<br />
(16, 116, 127, 128)<br />
<br />
==== Login ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x01<br />
|rowspan="3"| Server<br />
| Protocol version<br />
| Int (big-endian)<br />
| <br />
|-<br />
| Chain data<br />
| JSON array of JWT Data<br />
| Contains the display name, UUID and XUID<br />
|-<br />
| Skin data<br />
| JWT Data<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Play Status ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x02<br />
|rowspan="1"| Client<br />
| Status<br />
| Int (big-endian)<br />
| The current status of the connection.<br />
|}<br />
<br />
The values for each status are as follows:<br />
* 0: Login success<br />
* 1: Failed client<br />
* 2: Failed server<br />
* 3 Player spawn<br />
* 4 Failed invalid Tenant<br />
* 5: Failed Vanilla Edu.<br />
* 6: Failed Edu. Vanilla<br />
* 7: Failed server full<br />
<br />
==== Server To Client Handshake ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x03<br />
|rowspan="1"| Client<br />
| JWT data<br />
| JWT String<br />
| Contains the salt to complete the Diffie-Hellman key exchange<br />
|}<br />
<br />
<br />
<br />
==== Client To Server Handshake ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x04<br />
|rowspan="1"| Server<br />
<br />
|}<br />
<br />
Sent by the client in response to a ServerToClientHandshake packet sent by theserver. It is the first encrypted packet in the login handshake and serves as a confirmation that encryption is correctly initialised client side. It has no fields.<br />
<br />
==== Disconnect ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x05<br />
|rowspan="2"| Client<br />
| Hide disconnect screen<br />
| Boolean<br />
| Specifies if the disconnection screen should be hidden when the client is disconnected, meaning it will be sent directly to the main menu.<br />
|-<br />
| Kick message<br />
| String<br />
| An optional message to show when disconnected.<br />
|}<br />
<br />
==== Resource Packs info ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x06<br />
|rowspan="4"| Client<br />
| Forced to Accept<br />
| Boolean<br />
| If the resource pack requires the client accept it.<br />
|-<br />
| Scripting Enabled<br />
| Boolean<br />
| If scripting is enabled.<br />
|-<br />
| BehahaviorPackInfos<br />
| ResourcePackInfo[]<br />
| A list of behaviour packs that the client needs to download before joining the server. All of these behaviour packs will be applied together.<br />
|-<br />
| ResourcePackInfos<br />
| ResourcePackInfo[]<br />
| A list of resource packs that the client needs to download before joining the server. The order of these resource packs is not relevant in this packet. It is however important in the Resource Pack Stack packet.<br />
|}<br />
<br />
<br />
<br />
==== Resource Pack Stack ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! colspan="2" | Field Name<br />
! colspan="2" | Field Type<br />
! Notes<br />
|-<br />
| rowspan="11" | 0x07<br />
| rowspan="11" | Client<br />
| colspan="2" | Forced to Accept<br />
| colspan="2" | Boolean<br />
| If the resource pack must be accepted for the player to join the server.<br />
|-<br />
! Resource Pack Entry<br />
! Field Name<br />
! colspan="2" | <br />
! <br />
|-<br />
| rowspan="3" | Array<br />
| Pack ID<br />
| colspan="2" | String<br />
| The ID of the resource pack.<br />
|-<br />
| Pack Version<br />
| colspan="2" | String<br />
| The version of the resource pack.<br />
|-<br />
| Subpack Name<br />
| colspan="2" | String<br />
| The subpack name of the resource pack.<br />
|-<br />
! Behavior Pack Entry<br />
! Field Name<br />
! colspan="2" | <br />
! <br />
|-<br />
| rowspan="3" | Array<br />
| Pack ID<br />
| colspan="2" | String<br />
| The ID of the resource pack.<br />
|-<br />
| Pack Version<br />
| colspan="2" | String<br />
| The version of the resource pack.<br />
|-<br />
| Subpack Name<br />
| colspan="2" | String<br />
| The subpack name of the resource pack.<br />
|-<br />
| colspan="2" | Experimental<br />
| colspan="2" | Boolean<br />
| If the sent resource and behavior packs are experimental.<br />
|-<br />
| colspan="2" | Game Version<br />
| colspan="2" | String<br />
| The version of the game the sent resource and behavior packs were made for.<br />
|}<br />
<br />
==== Resource Pack Response ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x08<br />
|rowspan="2"| Server<br />
| Status<br />
| Byte<br />
| See below<br />
|-<br />
| Pack IDs<br />
| ResourcePackIds<br />
| All of the pack IDs.<br />
|}<br />
<br />
The values for each status are as follows:<br />
* 0: None<br />
* 1: Refused<br />
* 2: Send packs<br />
* 3: Have all packs<br />
* 4: Completed<br />
<br />
==== Text ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! colspan="2" | Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| rowspan="9" | 0x09<br />
| rowspan="9" | Server &amp; Client<br />
| colspan="2" | Type<br />
| Byte<br />
| The type of chat message sent.<br />
|-<br />
| colspan="2" | Needs Translation<br />
| Boolean<br />
| If the message sent is a translation key and needs to be translated.<br />
|-<br />
! Chat Type ID<br />
! Text<br />
! <br />
! Derived from above; values sent here change depending on that.<br />
|-<br />
| rowspan="1" | 0, 1, or 2<br />
| rowspan="1" | Source Name<br />
| rowspan="1" | String<br />
| rowspan="1" | The name of the source.<br />
|-<br />
|-<br />
|-<br />
| rowspan="1" | 3, 4, or 5<br />
| rowspan="1" | Message<br />
| rowspan="1" | String<br />
| rowspan="1" | The message sent with the packet.<br />
|-<br />
|-<br />
|-<br />
|-<br />
| rowspan="2" | 6, 7, or 8<br />
| Message<br />
| String<br />
| The message sent with the packet<br />
|-<br />
| Parameters<br />
| Array<br />
| The parameters sent with the packet. This usually includes translation parameters or similar types depending on what kind of chat type was sent.<br />
|-<br />
| colspan="2" | XUID<br />
| Optional String<br />
| The XUID of the player who sent this message.<br />
|-<br />
| colspan="2" | Platform Chat ID<br />
| Optional String<br />
| The platform chat ID of the sent message.<br />
|}<br />
<br />
{| class="wikitable"<br />
! ID<br />
! Chat Type<br />
|-<br />
| 0<br />
| Chat<br />
|-<br />
| 1<br />
| Whisper<br />
|-<br />
| 2<br />
| Announcement<br />
|-<br />
| 3<br />
| Raw<br />
|-<br />
| 4<br />
| Tip<br />
|-<br />
| 5<br />
| System<br />
|-<br />
| 6<br />
| Translation<br />
|-<br />
| 7<br />
| Popup<br />
|-<br />
| 8<br />
| Jukebox Popup<br />
|}<br />
<br />
For additional information and examples of all the chat types above, see here: https://imgur.com/a/KhcFscg<br />
<br />
==== Set Time ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x0A<br />
|rowspan="1"| Client<br />
| Time<br />
| SignedVarInt<br />
| Time is the current time. The time is not limited to 24000 (time of day), but continues progressing after that.<br />
|}<br />
<br />
SetTime is sent by the server to update the current time client-side. The client actually advances time client-side by itself, so this packet does not need to be sent each tick. It is merely a means of synchronising time between server and client.<br />
<br />
==== Start Game ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="47"| 0x0B<br />
|rowspan="47"| Client<br />
| Entity ID Self<br />
| SignedVarLong<br />
| The unique ID of the player. The unique ID is a value that remains consistent across different sessions of the same world, but most unofficial servers simply fill the runtime ID of the entity out for this field.<br />
|-<br />
| Runtime Entity ID<br />
| VarLong<br />
| The runtime ID of the player. The runtime ID is unique for each world session, and entities are generally identified in packets using this runtime ID.<br />
|-<br />
| Player Gamemode<br />
| SignedVarInt<br />
|-<br />
| Spawn<br />
| Vector3<br />
| The spawn position of the player in the world. In servers this is often the same as the world's spawn position found below.<br />
|-<br />
| Rotation<br />
| Vector2<br />
| The pitch and yaw of the player<br />
|-<br />
| Seed<br />
| SignedVarInt<br />
| The seed used to generate the world. Unlike in Java edition, the seed is a 32bit Integer here.<br />
|-<br />
| Dimension<br />
| SignedVarInt<br />
| Dimension is the ID of the dimension that the player spawns in. It is a value from 0-2, with 0 being the overworld, 1 being the nether and 2 being the end.<br />
|-<br />
| Generator<br />
| SignedVarInt<br />
| Generator is the generator used for the world. It is a value from 0-4, with 0 being old limited worlds, 1 being infinite worlds, 2 being flat worlds, 3 being nether worlds and 4 being end worlds. A value of 0 will actually make the client stop rendering chunks you send beyond the world limit.<br />
|-<br />
| World Gamemode<br />
| SignedVarInt<br />
| The game mode that a player gets when it first spawns in the world. It is shown in the settings and is used if the Player Gamemode is set to 5.<br />
|-<br />
| Difficulty<br />
| SignedVarInt<br />
| Difficulty is the difficulty of the world. It is a value from 0-3, with 0 being peaceful, 1 being easy, 2 being normal and 3 being hard.<br />
|-<br />
| World Spawn<br />
| BlockCoordinates <br />
| The block on which the world spawn of the world. This coordinate has no effect on the place that the client spawns, but it does have an effect on the direction that a compass poInts.<br />
|-<br />
| Has achievements disabled<br />
| Boolean<br />
| Defines if achievements are disabled in the world. The client crashes if this value is set to true while the player's or the world's game mode is creative, and it's recommended to simply always set this to false as a server.<br />
|-<br />
| Day cycle stop time<br />
| SignedVarInt<br />
| The time at which the day cycle was locked if the day cycle is disabled using the respective game rule. The client will maIntain this time as Boolean as the day cycle is disabled.<br />
|-<br />
| EDU offer<br />
| SignedVarInt<br />
| Some Minecraft: Education Edition field that specifies what 'region' the world was from, with 0 being None, 1 being RestOfWorld, and 2 being China. The actual use of this field is unknown.<br />
|-<br />
| Has Education Edition features enabled<br />
| Boolean<br />
| Specifies if the world has education edition features enabled, such as the blocks or entities specific to education edition.<br />
|-<br />
| Rain level<br />
| Float<br />
| The level specifying the Intensity of the rain falling. When set to 0, no rain falls at all.<br />
|-<br />
| Lightning level<br />
| Float<br />
| The level specifying the Intensity of the thunder. This may actually be set independently from the rain level, meaning dark clouds can be produced without rain.<br />
|-<br />
| Has Confirmed Platform Locked Content<br />
| Boolean<br />
| <br />
|-<br />
| Is Multiplayer<br />
| Boolean<br />
| Specifies if the world is a multi-player game. This should always be set to true for servers.<br />
|-<br />
| Broadcast To LAN<br />
| Boolean<br />
| Specifies if LAN broadcast was Intended to be enabled for the world.<br />
|-<br />
| Xbox Live Broadcast Mode<br />
| VarInt<br />
| The mode used to broadcast the joined game across XBOX Live.<br />
|-<br />
| Platform Broadcast Mode<br />
| VarInt<br />
| The mode used to broadcast the joined game across the platform.<br />
|-<br />
| Enable commands<br />
| Boolean<br />
| If commands are enabled for the player. It is recommended to always set this to true on the server, as setting it to false means the player cannot, under any circumstance, use a command.<br />
|-<br />
| Are texture packs required<br />
| Boolean<br />
| Specifies if the texture pack the world might hold is required, meaning the client was forced to download it before joining.<br />
|-<br />
| GameRules<br />
| GameRules<br />
| Defines game rules currently active with their respective values. The value of these game rules may be either 'bool', 'Int32' or 'Float32'. Some game rules are server side only, and don't necessarily need to be sent to the client.<br />
|-<br />
| Bonus Chest<br />
| Boolean<br />
| Specifies if the world had the bonus map setting enabled when generating it. It does not have any effect client-side.<br />
|-<br />
| Map Enabled<br />
| Boolean<br />
| Specifies if the world has the start with map setting enabled, meaning each joining player obtains a map. This should always be set to false, because the client obtains a map all on its own accord if this is set to true.<br />
|-<br />
| Permission Level<br />
| SignedVarInt<br />
| The permission level of the player. It is a value from 0-3, with 0 being visitor, 1 being member, 2 being operator and 3 being custom.<br />
|-<br />
| Server Chunk Tick Range<br />
| Int<br />
| The radius around the player in which chunks are ticked. Most servers set this value to a fixed number, as it does not necessarily affect anything client-side.<br />
|-<br />
| Has Locked Behavior Pack<br />
| Boolean<br />
| Specifies if the texture pack of the world is locked, meaning it cannot be disabled from the world. This is typically set for worlds on the marketplace that have a dedicated texture pack.<br />
|-<br />
| Has Locked Resource Pack<br />
| Boolean<br />
| Specifies if the texture pack of the world is locked, meaning it cannot be disabled from the world. This is typically set for worlds on the marketplace that have a dedicated texture pack.<br />
|-<br />
| Is From Locked World Template<br />
| Boolean<br />
| Specifies if the world from the server was from a locked world template. For servers this should always be set to false.<br />
|-<br />
| Use MSA Gamertags Only<br />
| Boolean<br />
| <br />
|-<br />
| Is From World Template<br />
| Boolean<br />
| Specifies if the world from the server was from a locked world template. For servers this should always be set to false.<br />
|-<br />
| Is World Template Option Locked<br />
| Boolean<br />
| Specifies if the world was a template that locks all settings that change properties above in the settings GUI. It is recommended to set this to true for servers that do not allow things such as setting game rules through the GUI.<br />
|-<br />
| Only Spawn V1 Villagers<br />
| Boolean<br />
| A hack that Mojang put in place to preserve backwards compatibility with old villagers. The his never actually read though, so it has no functionality.<br />
|-<br />
| Game Version<br />
| String<br />
| The version of the game from which Vanilla features will be used. The exact function of this field isn't clear.<br />
|-<br />
| Level ID<br />
| String<br />
| A base64 encoded world ID that is used to identify the world.<br />
|-<br />
| World name<br />
| String<br />
| The name of the world that the player is joining. Note that this field shows up above the player list for the rest of the game session, and cannot be changed. Setting the server name to this field is recommended.<br />
|-<br />
| Premium World Template Id<br />
| String<br />
| A UUID specific to the premium world template that might have been used to generate the world. Servers should always fill out an empty String for this.<br />
|-<br />
| Is Trial<br />
| Boolean<br />
| Specifies if the world was a trial world, meaning features are limited and there is a time limit on the world.<br />
|-<br />
| Is Server Side movement enabled<br />
| Boolean<br />
| Specifies if the server is authoritative over the movement of the player, meaning it controls the movement of it.<br />
|-<br />
| Current Tick<br />
| Boolean<br />
| The total time in ticks that has elapsed since the start of the world.<br />
|-<br />
| Enchantment Seed<br />
| SignedVarInt<br />
| The seed used to seed the random used to produce enchantments in the enchantment table. Note that the exact correct random implementation must be used to produce the correct results both client- and server-side.<br />
|-<br />
| Block Palette<br />
| BlockPalette<br />
| A list of all blocks registered on the server.<br />
|-<br />
| Itemstates<br />
| Itemstates<br />
| A list of all items with their legacy IDs which are available in the game. Failing to send any of the items that are in the game will crash mobile clients.<br />
|-<br />
| Multiplayer Correlation ID<br />
| String<br />
| A unique ID specifying the multi-player session of the player. A random UUID should be filled out for this field.<br />
|}<br />
<br />
==== Add Player ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="19"| 0x0C<br />
|rowspan="19"| Client<br />
| UUID<br />
| UUID<br />
| UUID is the UUID of the player. It is the same UUID that the client sent in the Login packet at the start of the session. A player with this UUID must exist in the player list (built up using the Player List packet) for it to show up in-game.<br />
|-<br />
| Username<br />
| String<br />
| Username is the name of the player. This username is the username that will be set as the initial name tag of the player.<br />
|-<br />
| Entity ID Self<br />
| SignedVarLong<br />
| The unique ID of the player. The unique ID is a value that remains consistent across different sessions of the same world, but most unoffical servers simply fill the runtime ID of the player out for this field.<br />
|-<br />
| Runtime Entity ID<br />
| VarLong<br />
| The runtime ID of the player. The runtime ID is unique for each world session, and entities are generally identified in packets using this runtime ID.<br />
|-<br />
| Platform Chat ID<br />
| String<br />
| An identifier only set for particular platforms when chatting (presumably only for Nintendo Switch). It is otherwise an empty string, and is used to decide which players are able to chat with each other.<br />
|-<br />
| Position<br />
| Vector3<br />
| The position to spawn the player at. If the player is at a distance that the viewer cannot see, the player will still show up if the viewer moves closer.<br />
|-<br />
| Velocity<br />
| Vector3<br />
| The initial velocity the player spawns with. This velocity will initiate client side movement of the player.<br />
|-<br />
| Rotation<br />
| Float<br />
| Pitch, yaw and head yaw<br />
|-<br />
| Held Item<br />
| Item<br />
| The item that the player is holding. The item is shown to the viewer as soon as the player itself shows up. Needless to say that this field is rather pointless, as additional packets still must be sent for armour to show up.<br />
|-<br />
| Metadata<br />
| MetadataDictionary<br />
| A map of entity metadata, which includes flags and data properties that alter in particular the way the player looks. Flags include ones such as 'on fire' and 'sprinting'. The metadata values are indexed by their property key.<br />
|-<br />
| Flags<br />
| VarInt<br />
| Flags is a set of flags that specify certain properties of the player, such as whether or not it can fly and/or move through blocks.<br />
|-<br />
| Command permission<br />
| VarInt<br />
| A set of permissions that specify what commands a player is allowed to execute.<br />
|-<br />
| Action Permissions<br />
| VarInt<br />
| Action Permissions is, much like Flags, a set of flags that specify actions that the player is allowed to undertake, such as whether it is allowed to edit blocks, open doors etc.<br />
|-<br />
| Permission Level<br />
| VarInt<br />
| The permission level of the player as it shows up in the player list built up using the PlayerList packet.<br />
|-<br />
| Custom stored permissions<br />
| VarInt<br />
| <br />
|-<br />
| User Id<br />
| Long<br />
| A unique identifier of the player. It appears it is not required to fill this field out with a correct value. Simply writing 0 seems to work.<br />
|-<br />
| Links<br />
| Links<br />
| A list of entity links that are currently active on the player. These links alter the way the player shows up when first spawned in terms of it shown as riding an entity. Setting these links is important for new viewers to see the player is riding another entity.<br />
|-<br />
| Device ID<br />
| String<br />
| The device ID set in one of the files found in the storage of the device of the player. It may be changed freely, so it should not be relied on for anything.<br />
|-<br />
| Device OS<br />
| Int<br />
| The build platform/device OS of the player that is about to be added, as it sent in the Login packet when joining.<br />
|}<br />
<br />
Add Player is sent by the server to the client to make a player entity show up client-side. It is one of the few entities that cannot be sent using the AddActor packet.<br />
<br />
==== Add Entity ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="9"| 0x0D<br />
|rowspan="9"| Client<br />
| Entity ID Self<br />
| SignedVarLong<br />
| The unique ID of the entity. The unique ID is a value that remains consistent across different sessions of the same world, but most unofficial servers simply fill the runtime ID of the entity out for this field.<br />
|-<br />
| Runtime Entity ID<br />
| VarLong<br />
| The runtime ID of the entity. The runtime ID is unique for each world session, and entities are generally identified in packets using this runtime ID.<br />
|-<br />
| Entity Type<br />
| String<br />
| The string entity type of the entity, for example 'minecraft:skeleton'.<br />
|-<br />
| Position<br />
| Vector3<br />
| The position to spawn the entity at. If the entity is at a distance that the player cannot see, the entity will still show up if the player moves closer.<br />
|-<br />
| Velocity<br />
| Vector3<br />
| The initial velocity the entity spawns with. This velocity will initiate client side movement of the entity.<br />
|-<br />
| Rotation<br />
| Vector3<br />
| Pitch, yaw and head yaw<br />
|-<br />
| Attributes<br />
| EntityAttributes<br />
| A slice of attributes that the entity has. It includes attributes such as its health, movement speed, etc.<br />
|-<br />
| Metadata<br />
| MetadataDictionary<br />
| A map of entity metadata, which includes flags and data properties that alter in particular the way the entity looks. Flags include ones such as 'on fire' and 'sprinting'. The metadata values are indexed by their property key.<br />
|-<br />
| Links<br />
| Links<br />
| A list of entity links that are currently active on the entity. These links alter the way the entity shows up when first spawned in terms of it shown as riding an entity. Setting these links is important for new viewers to see the entity is riding another entity.<br />
|}<br />
<br />
Sent by the server to the client to spawn an entity to the player. It is used for every entity except other players, paintings and items, for which the Add Player, Add Painting and Add Item Entity packets are used.<br />
<br />
==== Remove Entity ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x0E<br />
|rowspan="1"| Client<br />
| Unique Entity Id<br />
| SignedVarLong<br />
| The unique ID of the entity to be removed. The unique ID is a value that remains consistent across different sessions of the same world, but most unofficial servers simply fill the runtime ID of the entity out for this field.<br />
|}<br />
<br />
Sent by the server to remove an entity that currently exists in the world from the client-side. Sending this packet if the client cannot already see this entity will have no effect.<br />
<br />
==== Add Item Entity ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="7"| 0x0F<br />
|rowspan="7"| Client<br />
| Entity ID Self<br />
| SignedVarLong<br />
| The unique ID of the entity. The unique ID is a value that remains consistent across different sessions of the same world, but most unofficial servers simply fill the runtime ID of the entity out for this field.<br />
|-<br />
| Runtime Entity ID<br />
| VarLong<br />
| The runtime ID of the entity. The runtime ID is unique for each world session, and entities are generally identified in packets using this runtime ID.<br />
|-<br />
| Item<br />
| Item<br />
| The item that is spawned. It must have a valid ID for it to show up client-side. If it is not a valid item, the client will crash when coming near.<br />
|-<br />
| Position<br />
| Vector3<br />
| The position to spawn the entity on. If the entity is at a distance that the player cannot see, the entity will still show up if the player moves closer.<br />
|-<br />
| Velocity<br />
| Vector3<br />
| The initial velocity the entity spawns with. This velocity will initiate client side movement of the entity.<br />
|-<br />
| Metadata<br />
| MetadataDictionary<br />
| A map of entity metadata, which includes flags and data properties that alter in particular the way the entity looks. Flags include ones such as 'on fire' and 'sprinting'. The metadata values are indexed by their property key.<br />
|-<br />
| Is From Fishing<br />
| Boolean<br />
| Specifies if the item was obtained by fishing it up using a fishing rod. It is not clear why the client needs to know this.<br />
|}<br />
<br />
Sent by the server to the client to make an item entity show up. It is one of the few entities that cannot be sent using the AddActor packet.<br />
<br />
==== Take Item Entity ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x11<br />
|rowspan="2"| Client<br />
| Item Runtime Entity Id<br />
| VarLong<br />
| the entity runtime ID of the item that is being taken by another entity. It will disappear to viewers after showing the pick-up animation.<br />
|-<br />
| Runtime Entity Id<br />
| VarLong<br />
| The runtime ID of the entity that took the item, which is usually a player, but could be another entity like a zombie too.<br />
|}<br />
<br />
Sent by the server when a player picks up an item entity. It makes the item entity disappear to viewers and shows the pick-up animation.<br />
<br />
==== Move Entity Absolute ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x12<br />
|rowspan="4"| Server & Client<br />
| Runtime entity id<br />
| VarLong<br />
| The runtime ID of the entity. The runtime ID is unique for each world session, and entities are generally identified in packets using this runtime ID.<br />
|-<br />
| Flags<br />
| byte<br />
| A combination of flags that specify details of the movement. See below for more info.<br />
|-<br />
| Position<br />
| PlayerLocation<br />
| <br />
|}<br />
<br />
{| class="wikitable"<br />
|-<br />
! Field<br />
! Bit<br />
! Notes<br />
|-<br />
| On ground<br />
| 0x01<br />
| If the entity is touching the ground<br />
|-<br />
| Telported<br />
| 0x02<br />
|<br />
|}<br />
<br />
Sent by the server to move an entity to an absolute position. It is typically used for movements where high accuracy isn't needed, such as for long range teleporting.<br />
This packet is also sent by the client when riding a horse/donkey.<br />
<br />
==== Move Player ====<br />
<br />
Sent by players to send their movement to the server, and by the server to update the movement of player entities to other players.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="8"| 0x13<br />
|rowspan="8"| Server & Client<br />
| Runtime entity id<br />
| VarLong<br />
| The runtime ID of the player. The runtime ID is unique for each world session, and entities are generally identified in packets using this runtime ID.<br />
|-<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| Rotation<br />
| Vector3<br />
| Pitch, yaw and head yaw<br />
|-<br />
| Mode<br />
| Byte<br />
| <br />
|-<br />
| On ground<br />
| Boolean<br />
| Specifies if the player is considered on the ground. Note that proxies or hacked clients could fake this to always be true, so it should not be taken for granted.<br />
|-<br />
| Riding runtime entity id<br />
| Float<br />
| The runtime ID of the entity that the player might currently be riding. If not riding, this should be left 0.<br />
|-<br />
| Teleportation cause<br />
| VarLong<br />
| See below. Only needs to exist if Mode cause is 2 (teleport).<br />
|-<br />
| Entity type<br />
| Byte<br />
| Only needs to exist if Mode cause is 2 (teleport).<br />
|}<br />
<br />
Modes:<br />
* 0: Normal<br />
* 1: Reset<br />
* 2: Teleport<br />
* 3: Rotation<br />
<br />
Teleportation causes:<br />
* 0: Unknown<br />
* 1: Projectile<br />
* 2: Chorus fruit<br />
* 3: Command<br />
* 4: Behavior<br />
<br />
==== Rider Jump ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x14<br />
|rowspan="1"| Server & Client<br />
| Jump Strength<br />
| SignedVarInt<br />
| The strength of the jump, depending on how long the rider has held the jump button.<br />
|}<br />
<br />
Sent by the client to the server when it jumps while riding an entity that has the WASDControlled entity flag set, for example when riding a horse. According to MiNET this can also be sent from the server to the client, but details on this are unknown.<br />
<br />
==== Update Block ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x15<br />
|rowspan="4"| Client<br />
| Coordinates<br />
| BlockCoordinates<br />
| The block position at which a block is updated.<br />
|-<br />
| Block Runtime ID<br />
| VarInt<br />
| The runtime ID of the block that is placed at Position after sending the packet to the client. The runtime ID must point to a block sent in the list in the Start Game packet.<br />
|-<br />
| Flags<br />
| VarInt<br />
| See below. Flags is a combination of flags that specify the way the block is updated client-side. It is a combination of the flags below, but typically sending only the Network flag is sufficient.<br />
|-<br />
| Layer<br />
| VarInt<br />
| The world layer on which the block is updated. In Bedrock, multiple blocks can be put in the same location using layers. The second layer is usually used for liquids, so blocks can be inside a liquid. For most blocks, this is the first layer, as that layer is the default layer to place blocks on, but for blocks inside of each other, this differs. As this system is designed with liquids, there may be bugs when using this to place blocks inside each other. For example, placing an interactable block such as an item frame on the second layer can cause a game crash if the player tries to interact with it.<br />
|}<br />
<br />
{| class="wikitable"<br />
|-<br />
! Field<br />
! Bit<br />
! Notes<br />
|-<br />
| Neighbors<br />
| 0x01<br />
| <br />
|-<br />
| Network<br />
| 0x02<br />
|<br />
|-<br />
| No Graphic<br />
| 0x04<br />
|<br />
|-<br />
| Priority<br />
| 0x08<br />
|<br />
|}<br />
<br />
Sent by the server to update a block client-side, without resending the entire chunk that the block is located in. It is particularly useful for small modifications like block breaking/placing.<br />
<br />
==== Add Painting ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x16<br />
|rowspan="5"| Client<br />
| Unique Entity Id<br />
| SignedVarLong<br />
| The unique ID of the entity. The unique ID is a value that remains consistent across different sessions of the same world, but most unofficial servers simply fill the runtime ID of the entity out for this field.<br />
|-<br />
| Runtime Entity Id<br />
| VarLong<br />
| The runtime ID of the entity. The runtime ID is unique for each world session, and entities are generally identified in packets using this runtime ID.<br />
|-<br />
| Position<br />
| Vector3<br />
| The position to spawn the entity at. If the entity is at a distance that the player cannot see, the entity will still show up if the player moves closer.<br />
|-<br />
| Direction<br />
| SignedVarInt<br />
| The facing direction of the painting. See below.<br />
|-<br />
| Name<br />
| String<br />
| This is the name of the painting (e.g. BurningSkull). See below.<br />
|}<br />
<br />
Valid facing values:<br />
* 0 - Facing towards positive Z (south)<br />
* 1 - Facing towards negative X (west)<br />
* 2 - Facing towards negative Z (north)<br />
* 3 - Facing towards positive X (east)<br />
<br />
Valid name values:<br />
* Kebab<br />
* Aztec<br />
* Alban<br />
* Aztec<br />
* Aztec2<br />
* Bomb<br />
* Plant<br />
* Wasteland<br />
* Wanderer<br />
* Graham<br />
* Pool<br />
* Courbet<br />
* Sunset<br />
* Sea<br />
* Creebet<br />
* Match<br />
* Bust<br />
* Stage<br />
* Void<br />
* SkullAndRoses<br />
* Wither<br />
* Fighters<br />
* Skeleton<br />
* DonkeyKong<br />
* PoInter<br />
* Pigscene<br />
* BurningSkull<br />
<br />
==== Tick Sync ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x17<br />
|rowspan="2"| Server & Client<br />
| Request Timestamp<br />
| Boolean<br />
| <br />
|-<br />
| Response Timestamp<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Level Sound Event (1) ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="6"| 0x18<br />
|rowspan="6"| Server & Client<br />
| Sound ID<br />
| Byte<br />
| <br />
|-<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| Block Id<br />
| SignedVarInt<br />
| <br />
|-<br />
| Entity Type<br />
| SignedVarInt<br />
| <br />
|-<br />
| Is baby mob<br />
| Boolean<br />
| <br />
|-<br />
| Is global<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Level Event ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x19<br />
|rowspan="3"| Client<br />
| Event ID<br />
| SignedVarInt<br />
| <br />
|-<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| Data<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Block Event ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x1A<br />
|rowspan="3"| Client<br />
| Block Position<br />
| BlockCoordinates<br />
| <br />
|-<br />
| Event Type<br />
| SignedVarInt<br />
| <br />
|-<br />
| Event Data<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
==== Entity Event ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x1B<br />
|rowspan="3"| Server & Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Event ID<br />
| Byte<br />
| <br />
|-<br />
| Data<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Mob Effect ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="6"| 0x1C<br />
|rowspan="6"| Client<br />
| Runtime entity id<br />
| VarLong<br />
| <br />
|-<br />
| Event<br />
| Byte<br />
| <br />
|-<br />
| Effect id<br />
| SignedVarInt<br />
| <br />
|-<br />
| Amplifier<br />
| SignedVarInt<br />
| <br />
|-<br />
| Particles<br />
| Boolean<br />
| <br />
|-<br />
| Duration<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
Events:<br />
* 0: None<br />
* 1: Add<br />
* 2: Modify<br />
* 3: Remove<br />
<br />
==== Update Attributes ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x1D<br />
|rowspan="2"| Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Attributes<br />
| PlayerAttributes<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Inventory Transaction ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x1E<br />
|rowspan="1"| Server & Client<br />
| Transaction<br />
| Transaction<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Mob Equipment ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x1F<br />
|rowspan="5"| Server & Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Item<br />
| Item<br />
| <br />
|-<br />
| Slot<br />
| Byte<br />
| <br />
|-<br />
| Selected Slot<br />
| Byte<br />
| <br />
|-<br />
| Windows Id<br />
| Byte<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Mob Armor Equipment ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x20<br />
|rowspan="5"| Server & Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Helmet<br />
| Item<br />
| <br />
|-<br />
| Chestplate<br />
| Item<br />
| <br />
|-<br />
| Leggings<br />
| Item<br />
| <br />
|-<br />
| Boots<br />
| Item<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Interact ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x21<br />
|rowspan="2"| Server & Client<br />
| Action ID<br />
| Byte<br />
| <br />
|-<br />
| Target Runtime Entity ID<br />
| VarLong<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Block Pick Request ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x22<br />
|rowspan="5"| Server<br />
| Block Position X<br />
| SignedVarInt<br />
| <br />
|-<br />
| Block Position Y<br />
| SignedVarInt<br />
| <br />
|-<br />
| Block Position Z<br />
| SignedVarInt<br />
| <br />
|-<br />
| Add User Data<br />
| bool<br />
| Whether there should be NBT data in the picked block (activated by pressing Ctrl on default keyboard controls)<br />
|-<br />
| Hotbar Slot<br />
| Byte<br />
| <br />
|}<br />
<br />
The Bedrock client sends the position of the block. It expects the server to decide the block to pick and add it to the inventory or switch the hotbar slot if needed.<br />
<br />
==== Entity Pick Request ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x23<br />
|rowspan="2"| Server<br />
| Runtime Entity Id<br />
| Unsigned Long<br />
| <br />
|-<br />
| Hotbar Slot<br />
| Byte<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Player Action ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x24<br />
|rowspan="4"| Server<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Action ID<br />
| SignedVarInt<br />
| <br />
|-<br />
| Coordinates<br />
| BlockCoordinates<br />
| <br />
|-<br />
| Face<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Entity Fall ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x25<br />
|rowspan="3"| Server<br />
| Runtime Entity Id<br />
| VarLong<br />
| <br />
|-<br />
| Fall Distance<br />
| Float<br />
| <br />
|-<br />
| In Void<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Hurt Armor ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x26<br />
|rowspan="1"| Client<br />
| Health<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Entity Data ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x27<br />
|rowspan="2"| Server & Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Metadata<br />
| MetadataDictionary<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Entity Motion ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x28<br />
|rowspan="4"| Server & Client<br />
| Runtime Entity Id<br />
| VarLong<br />
| <br />
|-<br />
| Motion X<br />
| Vector3<br />
| <br />
|-<br />
| Motion Y<br />
| Float<br />
| <br />
|-<br />
| Motion Z<br />
| Float<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Entity Link ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x29<br />
|rowspan="4"| Client<br />
| Ridden ID<br />
| SignedVarLong<br />
| <br />
|-<br />
| Rider ID<br />
| SignedVarLong<br />
| <br />
|-<br />
| Link Type<br />
| Byte<br />
| <br />
|-<br />
| Unknown<br />
| Byte<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Health ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x2A<br />
|rowspan="1"| Client<br />
| Health<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Spawn Position ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x2B<br />
|rowspan="3"| Client<br />
| Spawn Type<br />
| SignedVarInt<br />
| <br />
|-<br />
| Coordinates<br />
| BlockCoordinates<br />
| <br />
|-<br />
| Forced<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Animate ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x2C<br />
|rowspan="2"| Server & Client<br />
| Action ID<br />
| SignedVarInt<br />
| <br />
|-<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Respawn ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x2D<br />
|rowspan="3"| Server & Client<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| Runtime Entity Id<br />
| Byte<br />
| <br />
|-<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|}<br />
<br />
==== Container Open ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x2E<br />
|rowspan="4"| Client<br />
| Window Id<br />
| Byte<br />
| <br />
|-<br />
| Type<br />
| Byte<br />
| <br />
|-<br />
| Block Position<br />
| BlockCoordinates<br />
| <br />
|-<br />
| Unique Entity Id<br />
| SignedVarLong<br />
| <br />
|}<br />
<br />
Bedrock needs either a valid block position, with an actual block at that position, or an entity ID for this to work. The entity must have CONTAINER_BASE_SIZE metadata, or the block must be a container. The entity ID is used for minecart chests etc. but any entity will work. If the entity has NAMETAG metadata this will be used as the container name.<br />
<br />
==== Container Close ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x2F<br />
|rowspan="1"| Server & Client<br />
| Window Id<br />
| Byte<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Player Hotbar ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x30<br />
|rowspan="3"| Server & Client<br />
| Selected Hotbar Slot<br />
| VarInt<br />
| <br />
|-<br />
| Container Id<br />
| Byte<br />
| <br />
|-<br />
| Select Hotbar Slot<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Inventory Content ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x31<br />
|rowspan="2"| Server & Client<br />
| Inventory Id<br />
| VarInt<br />
| <br />
|-<br />
| Input<br />
| ItemStacks<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Inventory Slot ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x32<br />
|rowspan="3"| Server & Client<br />
| Inventory Id<br />
| VarInt<br />
| <br />
|-<br />
| Slot<br />
| VarInt<br />
| <br />
|-<br />
| Item<br />
| Item<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Container Set Data ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x33<br />
|rowspan="3"| Client<br />
| Window Id<br />
| Byte<br />
| <br />
|-<br />
| Property<br />
| SignedVarInt<br />
| <br />
|-<br />
| Value<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Crafting Data ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x34<br />
|rowspan="4"| Client<br />
| Recipes<br />
| Recipes<br />
| <br />
|-<br />
| Potion type recipes<br />
| PotionTypeRecipe[]<br />
| <br />
|-<br />
| potion container recipes<br />
| PotionContainerChangeRecipe[]<br />
| <br />
|-<br />
| Is Clean<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Crafting Event ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x35<br />
|rowspan="5"| Server & Client<br />
| Window ID<br />
| Byte<br />
| <br />
|-<br />
| Recipe Type<br />
| SignedVarInt<br />
| <br />
|-<br />
| Recipe ID<br />
| UUID<br />
| <br />
|-<br />
| Input<br />
| ItemStacks<br />
| <br />
|-<br />
| Result<br />
| ItemStacks<br />
| <br />
|}<br />
<br />
<br />
<br />
==== GUI Data Pick Item ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x36<br />
|rowspan="1"| Client<br />
|-<br />
| Item name<br />
| String<br />
| The name of the item that shows up in the top part of the popup that shows up when selecting an item. It is shown as if an item was selected by the player itself.<br />
|-<br />
| Item effects<br />
| String<br />
| The line under the Item name, where the effects of the item are usually situated.<br />
|-<br />
| Hotbar Slot<br />
| int<br />
| The hot bar slot to be selected/picked. This does not currently work, so it does not matter what number this is.<br />
|}<br />
<br />
Sent by the server to make the client 'select' a hotbar slot. It currently appears to be broken however, and does not actually set the selected slot to the hotbar slot set in the packet.<br />
<br />
==== Adventure Settings ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="6"| 0x37<br />
|rowspan="6"| Server & Client<br />
| Flags<br />
| VarInt<br />
| <br />
|-<br />
| Command permission<br />
| VarInt<br />
| <br />
|-<br />
| Action permissions<br />
| VarInt<br />
| <br />
|-<br />
| Permission level<br />
| VarInt<br />
| <br />
|-<br />
| Custom stored permissions<br />
| VarInt<br />
| <br />
|-<br />
| User Id<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Block Entity Data ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x38<br />
|rowspan="2"| Server & Client<br />
| Coordinates<br />
| BlockCoordinates<br />
| <br />
|-<br />
| NamedTag<br />
| NBT<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Player Input ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x39<br />
|rowspan="4"| Server<br />
| Motion X<br />
| Float<br />
| <br />
|-<br />
| Motion Z<br />
| Float<br />
| <br />
|-<br />
| Jumping<br />
| Boolean<br />
| <br />
|-<br />
| Sneaking<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Level Chunk ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x3A<br />
|rowspan="5"| Client<br />
| Chunk X<br />
| SignedVarInt<br />
| <br />
|-<br />
| Chunk Z<br />
| SignedVarInt<br />
| <br />
|-<br />
| Sub Chunk Count<br />
| VarInt<br />
| <br />
|-<br />
| Cache Enabled<br />
| Boolean<br />
| <br />
|-<br />
| Chunk Data<br />
| ByteArray<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Commands Enabled ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x3B<br />
|rowspan="1"| Client<br />
| Commands enabled<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Difficulty ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x3C<br />
|rowspan="1"| Client<br />
| Difficulty<br />
| VarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Change Dimension ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x3D<br />
|rowspan="5"| Client<br />
| Dimension<br />
| SignedVarInt<br />
| <br />
|-<br />
| Position X<br />
| Vector3<br />
| <br />
|-<br />
| Position Y<br />
| Boolean<br />
| <br />
|-<br />
| Position Z<br />
| Float<br />
| <br />
|-<br />
| Respawn<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Player Game Type ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x3E<br />
|rowspan="1"| Server & Client<br />
| Game mode<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Player List ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x3F<br />
|rowspan="1"| Client<br />
| Records<br />
| PlayerRecords<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Simple Event ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x40<br />
|rowspan="1"| Client<br />
| Event Type<br />
| Unsigned Short<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Event ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x41<br />
|rowspan="3"| Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Event data<br />
| SignedVarInt<br />
| <br />
|-<br />
| Event type<br />
| Byte<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Spawn Experience Orb ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x42<br />
|rowspan="2"| Client<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| Count<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Map Item Data ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x43<br />
|rowspan="1"| Client<br />
| MapInfo<br />
| MapInfo<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Map Info Request ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x44<br />
|rowspan="1"| Server & Client<br />
| Unique Map Id<br />
| SignedVarLong<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Request Chunk Radius ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x45<br />
|rowspan="1"| Server & Client<br />
| Chunk radius<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Chunk Radius Updated ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x46<br />
|rowspan="1"| Client<br />
| Chunk radius<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== ItemFrame Drop Item ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x47<br />
|rowspan="1"| Server & Client<br />
| Block Position<br />
| BlockCoordinates<br />
| See note below.<br />
|}<br />
<br />
According to the NukkitX Protocol, the server sends the Y coordinate divided by two, and negative if needs to be subtracted by one. Example:<br />
<br />
Int y;<br />
if (packet.getBlockPosition().getY() &gt; 0) {<br />
y = packet.getBlockPosition().getY() * 2;<br />
} else {<br />
y = (packet.getBlockPosition().getY() * -2) - 1;<br />
}<br />
<br />
==== Game Rules Changed ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x48<br />
|rowspan="1"| Client<br />
| Rules<br />
| GameRules<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Camera ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x49<br />
|rowspan="2"| Client<br />
| Camera Unique Entity Id<br />
| SignedVarLong<br />
| <br />
|-<br />
| Player Unique Entity Id<br />
| SignedVarLong<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Boss Event ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x4A<br />
|rowspan="2"| Client<br />
| Boss Entity ID<br />
| SignedVarLong<br />
| <br />
|-<br />
| Event Type<br />
| VarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Show Credits ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x4B<br />
|rowspan="2"| Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Status<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Available Commands ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x4C<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== Command Request ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x4D<br />
|rowspan="5"| Server<br />
| Command<br />
| String<br />
| <br />
|-<br />
| Command type<br />
| VarInt<br />
| <br />
|-<br />
| Unknown UUID<br />
| UUID<br />
| <br />
|-<br />
| Request ID<br />
| String<br />
| <br />
|-<br />
| Unknown<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== CommandBlock Update ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x4E<br />
|rowspan="1"| Server<br />
| Is Block<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Command Output ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x4F<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== Update Trade ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="10"| 0x50<br />
|rowspan="10"| Client<br />
| Window ID<br />
| Byte<br />
| <br />
|-<br />
| Window Type<br />
| Byte<br />
| <br />
|-<br />
| Unknown0<br />
| VarInt<br />
| <br />
|-<br />
| Unknown1<br />
| VarInt<br />
| <br />
|-<br />
| Unknown2<br />
| VarInt<br />
| <br />
|-<br />
| Is Willing<br />
| Boolean<br />
| <br />
|-<br />
| Trader Entity ID<br />
| SignedVarLong<br />
| <br />
|-<br />
| Player Entity ID<br />
| SignedVarLong<br />
| <br />
|-<br />
| Display Name<br />
| String<br />
| <br />
|-<br />
| NamedTag<br />
| NBT<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Update Equip ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x51<br />
|rowspan="5"| Client<br />
| Window ID<br />
| Byte<br />
| <br />
|-<br />
| Window Type<br />
| Byte<br />
| <br />
|-<br />
| Unknown<br />
| Byte<br />
| <br />
|-<br />
| Entity ID<br />
| SignedVarLong<br />
| <br />
|-<br />
| NamedTag<br />
| NBT<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Resource Pack Data Info ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="7"| 0x52<br />
|rowspan="7"| Client<br />
| Package ID<br />
| String<br />
| <br />
|-<br />
| Max Chunk Size<br />
| Unsigned Int<br />
| <br />
|-<br />
| Chunk Count<br />
| Unsigned Int<br />
| <br />
|-<br />
| Compressed Package Size<br />
| Unsigned Long<br />
| <br />
|-<br />
| Hash<br />
| ByteArray<br />
| <br />
|-<br />
| Is Premium<br />
| Boolean<br />
| <br />
|-<br />
| Pack Type<br />
| Byte<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Resource Pack Chunk Data ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x53<br />
|rowspan="4"| Client<br />
| Package ID<br />
| String<br />
| <br />
|-<br />
| Chunk Index<br />
| Unsigned Int<br />
| <br />
|-<br />
| Progress<br />
| Unsigned Long<br />
| <br />
|-<br />
| Payload<br />
| ByteArray<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Resource Pack Chunk Request ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x54<br />
|rowspan="2"| Server<br />
| Package ID<br />
| String<br />
| <br />
|-<br />
| Chunk Index<br />
| Unsigned Int<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Transfer ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x55<br />
|rowspan="2"| Client<br />
| Address<br />
| String<br />
| <br />
|-<br />
| Port<br />
| Unsigned Short<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Play Sound ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x56<br />
|rowspan="4"| Client<br />
| Sound name<br />
| String<br />
| <br />
|-<br />
| Sound position<br />
| Position<br />
| <br />
|-<br />
| Volume<br />
| Float<br />
| <br />
|-<br />
| Pitch<br />
| Float<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Stop Sound ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x57<br />
|rowspan="2"| Client<br />
| Sound Name<br />
| String<br />
| <br />
|-<br />
| Stopping All Sound<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Title ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x58<br />
|rowspan="5"| Client<br />
| Type<br />
| SignedVarInt<br />
| <br />
|-<br />
| Text<br />
| String<br />
| <br />
|-<br />
| Fade In Time<br />
| SignedVarInt<br />
| <br />
|-<br />
| Stay Time<br />
| SignedVarInt<br />
| <br />
|-<br />
| Fade Out Time<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Add Behavior Tree ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x59<br />
|rowspan="1"| Client<br />
| Behavior Tree Json<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Structure Block Update ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x5A<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== Show Store Offer ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x5B<br />
|rowspan="2"| Client<br />
| Offer Id<br />
| String<br />
| <br />
|-<br />
| Shown To All<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Purchase Receipt ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x5C<br />
|rowspan="1"| Server<br />
<br />
|}<br />
<br />
<br />
<br />
==== Player Skin ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x5D<br />
|rowspan="4"| Server & Client<br />
| UUID<br />
| UUID<br />
| <br />
|-<br />
| Skin<br />
| Skin<br />
| <br />
|-<br />
| Skin Name<br />
| String<br />
| <br />
|-<br />
| Old Skin Name<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Sub Client Login ====<br />
Sent when an additional player attempts to join from a split screen session. The contents of the chain data and skin data fields use the same format as the [[#Login|Login]] packet, and can be decoded the same way.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x5E<br />
|rowspan="2"| Server<br />
| Chain data<br />
| JSON array of JWT Data<br />
| Contains the display name, UUID and XUID<br />
|-<br />
| Skin data<br />
| JWT Data<br />
| <br />
|}<br />
<br />
==== Automation Client Connect ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x5F<br />
|rowspan="1"| Client<br />
| Address<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Last Hurt By ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x60<br />
|rowspan="1"| Client<br />
| Entity Type Id<br />
| VarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Book Edit ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x61<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== NPC Request ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x62<br />
|rowspan="4"| Server & Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Unknown0<br />
| Byte<br />
| <br />
|-<br />
| Unknown1<br />
| String<br />
| <br />
|-<br />
| Unknown2<br />
| Byte<br />
| <br />
|}<br />
<br />
==== Photo Transfer ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x63<br />
|rowspan="3"| Server<br />
| File name<br />
| String<br />
| <br />
|-<br />
| Image data<br />
| String<br />
| <br />
|-<br />
| Unknown2<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Model Form Request ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x64<br />
|rowspan="2"| Client<br />
| Form Id<br />
| VarInt<br />
| <br />
|-<br />
| Form Data<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Model Form Response ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x65<br />
|rowspan="2"| Server<br />
| Form Id<br />
| VarInt<br />
| <br />
|-<br />
| Form Data<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Server Settings Request ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x66<br />
|rowspan="1"| Server<br />
<br />
|}<br />
<br />
<br />
<br />
==== Server Settings Response ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x67<br />
|rowspan="2"| Client<br />
| Form Id<br />
| VarLong<br />
| <br />
|-<br />
| Form Data<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Show Profile ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x68<br />
|rowspan="1"| Client<br />
| Xuid<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Default Game Type ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x69<br />
|rowspan="1"| Client<br />
| Game mode<br />
| VarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Remove Objective ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x6A<br />
|rowspan="1"| Client<br />
| Objective Id<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Display Objective ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x6B<br />
|rowspan="5"| Client<br />
| Display Slot<br />
| String<br />
| <br />
|-<br />
| Objective Id<br />
| String<br />
| <br />
|-<br />
| Display Name<br />
| String<br />
| <br />
|-<br />
| Criteria<br />
| String<br />
| <br />
|-<br />
| Sort Order<br />
| SignedVarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Score ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x6C<br />
|rowspan="1"| Client<br />
| Entries<br />
| ScoreEntries<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Lab Table ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x6D<br />
|rowspan="5"| Server & Client<br />
| Unknown Byte 0<br />
| Byte<br />
| <br />
|-<br />
| Block Entity Position X<br />
| VarInt<br />
| <br />
|-<br />
| Block Entity Position Y<br />
| VarInt<br />
| <br />
|-<br />
| Block Entity Position Z<br />
| VarInt<br />
| <br />
|-<br />
| Reaction Type<br />
| Byte<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Update Block Synced ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="6"| 0x6E<br />
|rowspan="6"| Client<br />
| Coordinates<br />
| BlockCoordinates<br />
| <br />
|-<br />
| Block Runtime ID<br />
| VarInt<br />
| <br />
|-<br />
| Block Priority<br />
| VarInt<br />
| <br />
|-<br />
| Data Layer ID<br />
| VarInt<br />
| <br />
|-<br />
| Unknown0<br />
| VarLong<br />
| <br />
|-<br />
| Unknown1<br />
| VarLong<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Move Entity Delta ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x6F<br />
|rowspan="2"| Client<br />
| Runtime Entity ID<br />
| VarLong<br />
| <br />
|-<br />
| Flags<br />
| Unsigned Short<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Scoreboard Identity ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x70<br />
|rowspan="1"| Client<br />
| Entries<br />
| ScoreboardIdentityEntries<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Set Local Player As Initialized ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x71<br />
|rowspan="1"| Server<br />
| Runtime Entity Id<br />
| VarLong<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Update Soft Enum ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x72<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== Network Stack Latency ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x73<br />
|rowspan="2"| Server & Client<br />
| Timestamp<br />
| Unsigned Long<br />
| <br />
|-<br />
| Send Back<br />
| Byte<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Script Custom Event ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x75<br />
|rowspan="2"| Server & Client<br />
| Event Name<br />
| String<br />
| <br />
|-<br />
| Data<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Spawn Particle Effect ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x76<br />
|rowspan="4"| Client<br />
| Dimension Id<br />
| Byte<br />
| <br />
|-<br />
| Unique Entity Id<br />
| SignedVarLong<br />
| <br />
|-<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| Identifier<br />
| String<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Available Entity Identifiers ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x77<br />
|rowspan="1"| Client<br />
| NamedTag<br />
| NBT<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Level Sound Event (2) ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="6"| 0x78<br />
|rowspan="6"| Server & Client<br />
| Sound ID<br />
| Byte<br />
| <br />
|-<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| Block Id<br />
| SignedVarInt<br />
| <br />
|-<br />
| Entity Type<br />
| String<br />
| <br />
|-<br />
| Is baby mob<br />
| Boolean<br />
| <br />
|-<br />
| Is global<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Network Chunk Publisher Update ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x79<br />
|rowspan="2"| Client<br />
| Coordinates<br />
| BlockCoordinates<br />
| <br />
|-<br />
| Radius<br />
| VarInt<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Biome Definition List ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x7A<br />
|rowspan="1"| Client<br />
| NamedTag<br />
| NBT<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Level Sound Event (3) ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="6"| 0x7B<br />
|rowspan="6"| Server & Client<br />
| Sound ID<br />
| VarInt<br />
| <br />
|-<br />
| Position<br />
| Vector3<br />
| <br />
|-<br />
| Block Id<br />
| SignedVarInt<br />
| <br />
|-<br />
| Entity Type<br />
| String<br />
| <br />
|-<br />
| Is baby mob<br />
| Boolean<br />
| <br />
|-<br />
| Is global<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Level Event Generic ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x7C<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== Lectern Update ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x7D<br />
|rowspan="4"| Client<br />
| Page<br />
| Byte<br />
| <br />
|-<br />
| Total Pages<br />
| Byte<br />
| <br />
|-<br />
| Block Position<br />
| Position<br />
| <br />
|-<br />
| Dropping Book<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Video Stream Connect ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x7E<br />
|rowspan="5"| Client<br />
| Server URI<br />
| String<br />
| <br />
|-<br />
| Frame Send Frequency<br />
| Float<br />
| <br />
|-<br />
| Action<br />
| Byte<br />
| <br />
|-<br />
| Resolution X<br />
| Int<br />
| <br />
|-<br />
| Resolution Y<br />
| Int<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Client Cache Status ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x81<br />
|rowspan="1"| Server & Client<br />
| Supported<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== On Screen Texture Animation ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x82<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== Map Create Locked Copy ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x83<br />
|rowspan="2"| Client<br />
| Original Map Id<br />
| Boolean<br />
| <br />
|-<br />
| New Map Id<br />
| Boolean<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Structure Template Data Export Request ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x84<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== Structure Template Data Export Response ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x85<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== Update Block Properties ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x86<br />
|rowspan="2"| Client<br />
| Unknown<br />
| Byte<br />
| <br />
|-<br />
| NamedTag<br />
| NBT<br />
| <br />
|}<br />
<br />
<br />
<br />
==== Client Cache Blob Status ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x87<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== Client Cache Miss Response ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="1"| 0x88<br />
|rowspan="1"| Client<br />
<br />
|}<br />
<br />
<br />
<br />
==== Network Settings ====<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Bound To<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x8F<br />
|rowspan="2"| Client<br />
| Unknown<br />
| Byte<br />
| <br />
|-<br />
| Compression threshold<br />
| Short<br />
| <br />
|}<br />
<br />
[[Category:Bedrock Minecraft]]</div>Orladoghttps://wiki.vg/index.php?title=Raknet_Protocol&diff=15840Raknet Protocol2020-06-11T10:01:20Z<p>Orladog: Change some names to match with Wireshark</p>
<hr />
<div>:: '''Remember that this page is a WIP.''' Come back later to see a more complete page.<br />
----<br />
<br />
[http://www.jenkinssoftware.com/ RakNet] is a networking library used by Minecraft Bedrock Edition. You might want to also look at the documentation for the [[Bedrock Protocol]].<br />
This is based on the old [https://wiki.vg/Pocket_Edition_Protocol_Documentation#RakNet_protocol Pocket Edition Protocol Documentation] and may be incomplete or outdated.<br />
The source code for the RakNet Library can be found [https://github.com/OculusVR/RakNet/ here].<br />
RakNet uses [https://en.wikipedia.org/wiki/User_Datagram_Protocol UDP] as its networking protocol. The key differences from TCP are that not all packets are guaranteed to reach the destination at all or in order (it isn't reliable) and it uses messages with a specified length instead of streams of data. RakNet compensates for the out-of-order delivery and makes it reliable.<br />
<br />
<br />
'''NOTE:'''<br />
You may want to use an existing library if one exists for your language of choice.<br />
Here is an incomplete list. Not all of these are maintained or complete. If these are outdated you may need to change the protocol version to 9 before it can work. The protocol doesn't seem to have had any significant changes since the official implementation was discontinued in 2014, so as long as you bump the protocol version older libraries are likely to still work.<br />
<br />
{| class="wikitable sortable" style="width: auto; text-align: center;"<br />
|-style="background:#eee"<br />
! Name<br />
!class="unsortable"| Description<br />
! Language<br />
! License<br />
! Active development<br />
|-<br />
! [https://github.com/NukkitX/Network NukkitX Network]<br />
| Network components used within NukkitX, but with great support for general use as well<br />
| Java<br />
| Apache License<br />
| Yes<br />
|-<br />
! [https://github.com/JRakNet/JRakNet JRakNet]<br />
| JRakNet is a networking library for Java which implements the UDP based protocol RakNet<br />
| Java<br />
| MIT<br />
| Yes<br />
|-<br />
! [https://github.com/jython234/JRakLibPlus JRakLibPlus]<br />
| A library for easy creation of RakNet servers, based on RakLib and JRakLib.<br />
| Java<br />
| LGPL<br />
| No<br />
|-<br />
! [https://github.com/pmmp/RakLib RakLib]<br />
| RakNet server implementation written in PHP. This library is very lightweight on actual implementation - it provides the bare minimum to get a Minecraft Pocket Edition server functional. It only currently provides server functionality, and does not support most RakNet features.<br />
| PHP<br />
| GPL<br />
| Yes<br />
|-<br />
! [https://www.npmjs.com/package/raknet/ raknet]<br />
| UDP network library that follows the RakNet protocol for Node.js<br />
| node.js<br />
| MIT<br />
| No<br />
|-<br />
! [https://pypi.org/project/PyRakLib/ PyRakLib]<br />
| PyRakLib is a networking library that follows the RakNet protocol for MCPE. It is ported from the PHP library RakLib. <br />
| Python<br />
| GPL<br />
| No<br />
|-<br />
! [https://github.com/facebookarchive/RakNet Raknet] (official)<br />
| The official implementation. Outdated and mostly for reference purposes. May not work with the latest Bedrock.<br />
| C++<br />
| BSD<br />
| No<br />
|}<br />
<br />
== Data types ==<br />
<br />
{| class="wikitable"<br />
|-<br />
!<br />
! Size (Bytes)<br />
! Range<br />
! Notes<br />
|-<br />
! byte<br />
| 1<br />
| 0 to 255<br />
|<br />
|-<br />
! Long<br />
| 8<br />
| -2^63 to 2^63-1<br />
| Signed 64-bit Integer<br />
|-<br />
! Magic<br />
| 16<br />
| <code>00ffff00fefefefefdfdfdfd12345678</code><br />
| Always those hex bytes, corresponding to RakNet's default OFFLINE_MESSAGE_DATA_ID<br />
|-<br />
! short<br />
| 2<br />
| -32768 to 32767<br />
| <br />
|-<br />
! unsigned short<br />
| 2<br />
| 0 to 65535<br />
| <br />
|-<br />
! string<br />
| unsigned short + string<br />
| N/A<br />
| class="col3" | Prefixed by a short containing the length of the string in characters. It appears that only the following ASCII characters can be displayed: !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~<br />
|-<br />
! boolean <br />
| 1<br />
| 0 to 1<br />
| True is encoded as <code>0x01</code>, false as <code>0x00</code>. <br />
|-<br />
! address<br />
| 7<br />
| <br />
| 1 byte for the IP version (4 or 6), followed by (for IPv4) 4 bytes for the IP and an unsigned short for the port number<br />
|-<br />
! uint24le<br />
| 3<br />
| <br />
| 3-byte little-endian unsigned integer<br />
|}<br />
<br />
== Handshake sequence ==<br />
<br />
# C→S: [[#Open Connection Request 1|Open Connection Request 1]]<br />
# S→C: [[#Open Connection Reply 1|Open Connection Reply 1]]<br />
# C→S: [[#Open Connection Request 2|Open Connection Request 2]]<br />
# S→C: [[#Open Connection Reply 2|Open Connection Reply 2]]<br />
<br />
From here on, the RakNet connection is established and all RakNet messages are contained in a [[#Frame Set Packet|Frame Set Packet]].<br />
<br />
This is currently incomplete<br />
<br />
== Packets ==<br />
<br />
=== Unconnected Ping ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x01, 0x02<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| MAGIC<br />
| magic<br />
| <br />
|-<br />
| Client GUID<br />
| Long<br />
| <br />
|}<br />
<br />
<code>0x02</code> is only replied to if there are open connections to the server. '''Note:''' as of 0.15.6 it seems that the game refreshes it's LAN world list every 4-5 seconds, however it seems the game will still ping in 1 second intervals.<br><br />
This packet should be responded to with unconnected Pong.<br />
<br />
=== Unconnected Pong ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x1c<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| MAGIC<br />
| magic<br />
| <br />
|-<br />
| Server ID string<br />
| string<br />
| Used for the MOTD. See below for details.<br />
|}<br />
<br />
'''Server ID string format'''<br />
<br />
For Minecraft Bedrock this is separated by semicolons and uses the following format:<br><br />
<code>Edition (MCPE or MCEE for Education Edition);MOTD line 1;Protocol Version;Version Name;Player Count;Max Player Count;Server Unique ID;MOTD line 2;Game mode;Game mode (numeric);Port (IPv4);Port (IPv6);</code><br><br />
Example:<br><br />
<code>MCPE;Dedicated Server;390;1.14.60;0;10;13253860892328930865;Bedrock level;Survival;1;19132;19133;</code><br><br />
Result:<br><br />
[[File:Server_ID_String_Example.png]]<br><br />
The Game mode and Game mode (numeric) values seem to not be used by the client.<br />
<br />
=== Connected Ping ===<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x00<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Connected Pong ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x03<br />
| Ping Time<br />
| Long<br />
| <br />
|-<br />
| Pong Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Open Connection Request 1 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x05<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Protocol version<br />
| byte<br />
| Currently 9<br />
|-<br />
| MTU<br />
| Zero padding<br />
| The MTU sent in the response appears to be somewhere around the size of this padding + 46 (28 udp overhead, 1 packet id, 16 magic, 1 protocol version). This padding seems to be used to discover the maximum packet size the network can handle.<br />
|}<br />
<br />
The client sends these to the target server with ever decreasing MTU until the server responds. This is used to discover the MTU size for the connection. According to the official docs, "The MTU size is the maximum size of a packet RakNet will generate", and "if you set the MTU size larger than your or any router along the network path takes, then the network will split the packet at best, or drop it at worst", so this process of sending decreasingly padded packets (compensating for the size of the packet itself and UDP overhead, which together make 48 bytes) seem to be used to discover the maximum packet size the network can handle. See the [http://www.jenkinssoftware.com/raknet/manual/programmingtips.html official documentation page] for more info about the MTU size. If the RakNet protocol does not match your own, respond with the Incompatible protocol packet.<br><br><br />
You should always respond to the first of these packets that you receive with Open Connection Reply 1, containing an MTU size of the amount of padding you received in bytes plus 46.<br />
<br />
=== Open Connection Reply 1 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x06<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| Use security<br />
| boolean<br />
| Make sure this is false, it is vital for the login sequence to continue!<br />
|-<br />
| MTU<br />
| short<br />
| see Open Connection Request 1<br />
|}<br />
<br />
=== Open Connection Request 2 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x07<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server Address<br />
| address<br />
| <br />
|-<br />
| MTU<br />
| short<br />
| <br />
|-<br />
| Client GUID<br />
| Long<br />
| <br />
|}<br />
<br />
=== Open Connection Reply 2 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x08<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| Client Address<br />
| address<br />
| <br />
|-<br />
| MTU<br />
| short<br />
| <br />
|-<br />
| Encryption enabled?<br />
| boolean<br />
| <br />
|}<br />
<br />
=== Connection Request ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x09<br />
| GUID<br />
| Long<br />
| <br />
|-<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Connection Request Accepted ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x10<br />
| Client address<br />
| address<br />
| <br />
|-<br />
| System index<br />
| short<br />
| Unknown what this does. 0 works as a value.<br />
|-<br />
| Internal IDs<br />
| 10x address<br />
| Unknown what these do. 255.255.255.255:19132 for all of them seems to work, any other address will probably work as well.<br />
|-<br />
| Request time<br />
| Long<br />
| <br />
|-<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Incompatible Protocol ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x19<br />
| Protocol<br />
| byte<br />
| <br />
|-<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
|}<br />
<br />
=== Unconnected Ping ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x01, 0x02<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| GUID<br />
| Long<br />
| <br />
|}<br />
<br />
=== Frame Set Packet ===<br />
{| class="wikitable"<br />
! Packet ID<br />
!colspan="3"| Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="11"| 0x80..0x8d<br />
|colspan="3"| Sequence number<br />
| uint24le<br />
| <br />
|-<br />
|rowspan="10"| Frames<br />
|colspan="2"| Flags<br />
| byte<br />
| Top 3 bits are reliability type, fourth bit is 1 when the frame is fragmented and part of a compound.<br />
|-<br />
|colspan="2"| Length IN BITS<br />
| short<br />
| Length of the body in bits.<br />
|-<br />
|colspan="2"| Reliable frame index<br />
| uint24le<br />
| only if reliable<br />
|-<br />
|colspan="2"| Sequenced frame index<br />
| uint24le<br />
| only if sequenced<br />
|-<br />
|rowspan="2"| Order<br />
| Ordered frame index<br />
| uint24le<br />
|rowspan="2"| only if ordered<br />
|-<br />
| Order channel<br />
| byte<br />
|-<br />
|rowspan="3"| Fragment<br />
| Compound size<br />
| int<br />
|rowspan="3"| only if fragmented<br />
|-<br />
| Compound ID<br />
| short<br />
|-<br />
| Index<br />
| int<br />
|-<br />
| Body<br />
| ceil(length/8) bytes<br />
|}<br />
<br />
The reliability types are as follows:<br />
<br />
{| class="wikitable"<br />
! style="text-align: center; font-weight: bold;" | ID<br />
! style="font-weight: bold;" | Name<br />
! style="text-align: center; font-weight: bold;" | Reliable<br />
! style="text-align: center; font-weight: bold;" | Ordered<br />
! style="text-align: center; font-weight: bold;" | Sequenced<br />
|-<br />
| style="text-align: center;" | 0<br />
| unreliable<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 1<br />
| unreliable sequenced<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
|-<br />
| style="text-align: center;" | 2<br />
| reliable<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 3<br />
| reliable ordered<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 4<br />
| reliable sequenced<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
|-<br />
| style="text-align: center;" | 5<br />
| unreliable (+ ACK receipt)<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 6<br />
| reliable (+ ACK receipt)<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 7<br />
| reliable ordered (+ ACK receipt)<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
|}<br />
<br />
Sequenced implies ordered.<br />
<br />
=== Game Packet ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x8e<br />
| Body<br />
| bytes<br />
| Single packet of the GAME protocol.<br />
|}<br />
<br />
=== NACK ===<br />
{| class="wikitable"<br />
! style="font-weight: bold;" | Packet ID<br />
! colspan="3" style="font-weight: bold;" | Field Name<br />
! style="font-weight: bold;" | Field Type<br />
! style="font-weight: bold;" | Notes<br />
|-<br />
| 0xa0<br />
| colspan="3" | Record count<br />
| short<br />
| <br />
|-<br />
| <br />
| rowspan="4" | Record<br />
| colspan="2" | Is Range?<br />
| byte<br />
| 0 for range, 1 for no range<br />
|-<br />
| <br />
| No Range<br />
| Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| rowspan="2" | Range<br />
| Start Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| End Index<br />
| uint24le<br />
| <br />
|}<br />
<br />
=== ACK ===<br />
{| class="wikitable"<br />
! style="font-weight: bold;" | Packet ID<br />
! colspan="3" style="font-weight: bold;" | Field Name<br />
! style="font-weight: bold;" | Field Type<br />
! style="font-weight: bold;" | Notes<br />
|-<br />
| 0xc0<br />
| colspan="3" | Record count<br />
| short<br />
| <br />
|-<br />
| <br />
| rowspan="4" | Record<br />
| colspan="2" | Is Range?<br />
| byte<br />
| 0 for range, 1 for no range<br />
|-<br />
| <br />
| No Range<br />
| Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| rowspan="2" | Range<br />
| Start Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| End Index<br />
| uint24le<br />
| <br />
|}</div>Orladoghttps://wiki.vg/index.php?title=Bedrock_Protocol_version_numbers&diff=15836Bedrock Protocol version numbers2020-06-10T19:36:15Z<p>Orladog: Add latest beta</p>
<hr />
<div>This page contains lists the protocol version numbers used in the Minecraft Bedrock Edition releases. Official releases are marked bold, betas are in regular font.<br><br />
This page will soon also contain the Pocket Edition protocol version numbers.<br />
<br />
== Bedrock Protocol Versions ==<br />
<br />
{| class="wikitable"<br />
|-<br />
! Release name<br />
! Version number<br />
! Last known documentation<br />
<br />
{{/Entry|1.16.0.66|407|beta=1}}<br />
{{/Entry|1.16.0.51|400|beta=1}}<br />
{{/Entry|1.15.0.56|396|beta=1}}<br />
{{/Entry|1.15.0.55|395|beta=1}}<br />
{{/Entry|1.15.0.54|394|beta=1}}<br />
{{/Entry|1.15.0.53|393|beta=1}}<br />
{{/Entry|1.15.0.51|392|beta=1}}<br />
{{/Entry|1.14.60|390|cur}}<br />
{{/Entry|1.14.41|389}}<br />
{{/Entry|1.14.30|389}}<br />
{{/Entry|1.14.30.51|389|beta=1|multi=17}}<br />
{{/Entry|1.14.20}}<br />
{{/Entry|1.14.25.1|beta=1}}<br />
{{/Entry|1.14.2.51|beta=1}}<br />
{{/Entry|1.14.2.50|beta=1}}<br />
{{/Entry|1.14.1}}<br />
{{/Entry|1.14.1.3|beta=1}}<br />
{{/Entry|1.14.1.2|beta=1}}<br />
{{/Entry|1.14.0.12}}<br />
{{/Entry|1.14.0}}<br />
{{/Entry|1.14.0.52|beta=1}}<br />
{{/Entry|1.14.0.51|beta=1}}<br />
{{/Entry|1.14.0.50|beta=1}}<br />
{{/Entry|1.14.0.6|beta=1}}<br />
{{/Entry|1.14.0.4|beta=1}}<br />
{{/Entry|1.14.0.3|beta=1}}<br />
{{/Entry|1.14.0.2|beta=1}}<br />
{{/Entry|1.14.0.1|390|beta=1}}<br />
{{/Entry|1.13.3|388|multi=4}}<br />
{{/Entry|1.13.2}}<br />
{{/Entry|1.13.1}}<br />
{{/Entry|1.13.0}}<br />
{{/Entry|1.13.0.18|389|beta=1}}<br />
{{/Entry|1.13.0.17|388|beta=1|multi=2}}<br />
{{/Entry|1.13.0.16|beta=1}}<br />
{{/Entry|1.13.0.15|387|beta=1}}<br />
{{/Entry|1.13.0.13|386|beta=1}}<br />
{{/Entry|1.13.0.9|385|beta=1}}<br />
{{/Entry|1.13.0.6|371|beta=1|multi=3}}<br />
{{/Entry|1.13.0.5|beta=1}}<br />
{{/Entry|1.13.0.4|beta=1}}<br />
{{/Entry|1.13.0.2|370|beta=1|multi=2}}<br />
{{/Entry|1.13.0.1|beta=1}}<br />
{{/Entry|1.12.1|361|multi=11}}<br />
{{/Entry|1.12.0}}<br />
{{/Entry|1.12.0.14|beta=1}}<br />
{{/Entry|1.12.0.13|beta=1}}<br />
{{/Entry|1.12.0.12|beta=1}}<br />
{{/Entry|1.12.0.11|beta=1}}<br />
{{/Entry|1.12.0.10|beta=1}}<br />
{{/Entry|1.12.0.9|beta=1}}<br />
{{/Entry|1.12.0.6|beta=1}}<br />
{{/Entry|1.12.0.4|beta=1}}<br />
{{/Entry|1.12.0.3|beta=1}}<br />
{{/Entry|1.12.0.2|360|beta=1}}<br />
{{/Entry|1.11.4|354|multi=9}}<br />
{{/Entry|1.11.3}}<br />
{{/Entry|1.11.2}}<br />
{{/Entry|1.11.1}}<br />
{{/Entry|1.11.0}}<br />
{{/Entry|1.11.0.10|beta=1}}<br />
{{/Entry|1.11.0.9|beta=1}}<br />
{{/Entry|1.11.0.8|beta=1}}<br />
{{/Entry|1.11.0.7|beta=1}}<br />
{{/Entry|1.11.0.5|353|beta=1}}<br />
{{/Entry|1.11.0.4|352|beta=1}}<br />
{{/Entry|1.11.0.3|351|beta=1}}<br />
{{/Entry|1.11.0.1|350|beta=1}}<br />
{{/Entry|1.10.1|340|multi=4}}<br />
{{/Entry|1.10.0}}<br />
{{/Entry|1.10.0.4|beta=1}}<br />
{{/Entry|1.10.0.3|beta=1}}<br />
{{/Entry|1.9.0|332|multi=3}}<br />
{{/Entry|1.9.0.5|beta=1}}<br />
{{/Entry|1.9.0.3|beta=1}}<br />
{{/Entry|1.9.0.2|331|beta=1}}<br />
{{/Entry|1.9.0.0|330|beta=1}}<br />
{{/Entry|1.8.1|313|multi=2}}<br />
{{/Entry|1.8.0}}<br />
{{/Entry|1.8.0.14|312|beta=1|multi=3}}<br />
{{/Entry|1.8.0.13|beta=1}}<br />
{{/Entry|1.8.0.11|beta=1}}<br />
{{/Entry|1.8.0.10|311|beta=1}}<br />
{{/Entry|1.8.0.8|310|beta=1}}<br />
{{/Entry|1.7.1|291|multi=5}}<br />
{{/Entry|1.7.0}}<br />
{{/Entry|1.7.0.9|beta=1}}<br />
{{/Entry|1.7.0.7|beta=1}}<br />
{{/Entry|1.7.0.5|beta=1}}<br />
{{/Entry|1.7.0.3|290|beta=1|multi=2}}<br />
{{/Entry|1.7.0.2|beta=1}}<br />
{{/Entry|1.6.2|282|multi=5}}<br />
{{/Entry|1.6.1}}<br />
{{/Entry|1.6.0}}<br />
{{/Entry|1.6.0.30|beta=1}}<br />
{{/Entry|1.6.0.8|beta=1}}<br />
{{/Entry|1.6.0.6|281|beta=1|multi=2}}<br />
{{/Entry|1.6.0.5|beta=1}}<br />
{{/Entry|1.6.0.1|280|beta=1}}<br />
{{/Entry|1.5.3|274|multi=5}}<br />
{{/Entry|1.5.2}}<br />
{{/Entry|1.5.1}}<br />
{{/Entry|1.5.0}}<br />
{{/Entry|1.5.0.10|beta=1}}<br />
{{/Entry|1.5.0.7|273|beta=1}}<br />
{{/Entry|1.5.0.4|271|beta=1|multi=2}}<br />
{{/Entry|1.5.0.1|beta=1}}<br />
{{/Entry|1.5.0.0|270|beta=1}}<br />
{{/Entry|1.4.4|261|multi=5}}<br />
{{/Entry|1.4.3}}<br />
{{/Entry|1.4.2}}<br />
{{/Entry|1.4.1}}<br />
{{/Entry|1.4.0}}<br />
{{/Entry|1.2.20.2|260|beta=1|multi=2}}<br />
{{/Entry|1.2.20.1|beta=1}}<br />
{{/Entry|1.2.14.3|240|beta=1|multi=2}}<br />
{{/Entry|1.2.14.2|beta=1}}<br />
{{/Entry|1.2.13.12|223|beta=1}}<br />
{{/Entry|1.2.13.11|224|beta=1}}<br />
{{/Entry|1.2.13.10|222|beta=1}}<br />
{{/Entry|1.2.13.8|221|beta=1}}<br />
{{/Entry|1.2.16|unknown|multi=3}}<br />
{{/Entry|1.2.15}}<br />
{{/Entry|1.2.14}}<br />
{{/Entry|1.2.13|223}}<br />
{{/Entry|1.2.13.6|220|beta=1|multi=2}}<br />
{{/Entry|1.2.13.5|beta=1}}<br />
{{/Entry|1.2.11|unknown}}<br />
{{/Entry|1.2.10|201}}<br />
{{/Entry|1.2.10.1|200|beta=1}}<br />
{{/Entry|1.2.9|unknown|multi=2}}<br />
{{/Entry|1.2.8}}<br />
{{/Entry|1.2.7|160}}<br />
{{/Entry|1.2.6.1|unknown|multi=2}}<br />
{{/Entry|1.2.6}}<br />
{{/Entry|1.2.6.2|140|beta=1}}<br />
{{/Entry|1.2.5|141|multi=2}}<br />
{{/Entry|1.2.5.15|beta=1}}<br />
{{/Entry|1.2.5.12|140|beta=1}}<br />
{{/Entry|1.2.5.0|137|beta=1}}<br />
{{/Entry|1.2.3|unknown}}<br />
{{/Entry|1.2.3.3|137|beta=1}}<br />
{{/Entry|1.2.2|unknown|multi=3}}<br />
{{/Entry|1.2.1}}<br />
{{/Entry|1.2.0}}<br />
{{/Entry|1.2.0.31|136|beta=1}}<br />
{{/Entry|1.2.0.25|135|beta=1}}<br />
{{/Entry|1.2.0.22|134|beta=1}}<br />
{{/Entry|1.2.0.18|133|beta=1}}<br />
{{/Entry|1.2.0.15|132|beta=1|multi=2}}<br />
{{/Entry|1.2.0.11|beta=1}}<br />
{{/Entry|1.2.0.9|131|beta=1|multi=2}}<br />
{{/Entry|1.2.0.7|beta=1}}<br />
{{/Entry|1.2.0.2|130|beta=1}}<br />
|}<br />
<br />
== Pocket Protocol Versions ==<br />
<br />
<nowiki>#SOON</nowiki><br />
<br />
[[Category:Bedrock Minecraft]]</div>Orladoghttps://wiki.vg/index.php?title=Raknet_Protocol&diff=15829Raknet Protocol2020-06-10T16:23:05Z<p>Orladog: Remove duplicate "byte" in Data types</p>
<hr />
<div>:: '''Remember that this page is a WIP.''' Come back later to see a more complete page.<br />
----<br />
<br />
[http://www.jenkinssoftware.com/ RakNet] is a networking library used by Minecraft Bedrock Edition. You might want to also look at the documentation for the [[Bedrock Protocol]].<br />
This is based on the old [https://wiki.vg/Pocket_Edition_Protocol_Documentation#RakNet_protocol Pocket Edition Protocol Documentation] and may be incomplete or outdated.<br />
The source code for the RakNet Library can be found [https://github.com/OculusVR/RakNet/ here].<br />
RakNet uses [https://en.wikipedia.org/wiki/User_Datagram_Protocol UDP] as its networking protocol. The key differences from TCP are that not all packets are guaranteed to reach the destination at all or in order (it isn't reliable) and it uses messages with a specified length instead of streams of data. RakNet compensates for the out-of-order delivery and makes it reliable.<br />
<br />
<br />
'''NOTE:'''<br />
You may want to use an existing library if one exists for your language of choice.<br />
Here is an incomplete list. Not all of these are maintained or complete. If these are outdated you may need to change the protocol version to 9 before it can work. The protocol doesn't seem to have had any significant changes since the official implementation was discontinued in 2014, so as long as you bump the protocol version older libraries are likely to still work.<br />
<br />
{| class="wikitable sortable" style="width: auto; text-align: center;"<br />
|-style="background:#eee"<br />
! Name<br />
!class="unsortable"| Description<br />
! Language<br />
! License<br />
! Active development<br />
|-<br />
! [https://github.com/NukkitX/Network NukkitX Network]<br />
| Network components used within NukkitX, but with great support for general use as well<br />
| Java<br />
| Apache License<br />
| Yes<br />
|-<br />
! [https://github.com/JRakNet/JRakNet JRakNet]<br />
| JRakNet is a networking library for Java which implements the UDP based protocol RakNet<br />
| Java<br />
| MIT<br />
| Yes<br />
|-<br />
! [https://github.com/jython234/JRakLibPlus JRakLibPlus]<br />
| A library for easy creation of RakNet servers, based on RakLib and JRakLib.<br />
| Java<br />
| LGPL<br />
| No<br />
|-<br />
! [https://github.com/pmmp/RakLib RakLib]<br />
| RakNet server implementation written in PHP. This library is very lightweight on actual implementation - it provides the bare minimum to get a Minecraft Pocket Edition server functional. It only currently provides server functionality, and does not support most RakNet features.<br />
| PHP<br />
| GPL<br />
| Yes<br />
|-<br />
! [https://www.npmjs.com/package/raknet/ raknet]<br />
| UDP network library that follows the RakNet protocol for Node.js<br />
| node.js<br />
| MIT<br />
| No<br />
|-<br />
! [https://pypi.org/project/PyRakLib/ PyRakLib]<br />
| PyRakLib is a networking library that follows the RakNet protocol for MCPE. It is ported from the PHP library RakLib. <br />
| Python<br />
| GPL<br />
| No<br />
|-<br />
! [https://github.com/facebookarchive/RakNet Raknet] (official)<br />
| The official implementation. Outdated and mostly for reference purposes. May not work with the latest Bedrock.<br />
| C++<br />
| BSD<br />
| No<br />
|}<br />
<br />
== Data types ==<br />
<br />
{| class="wikitable"<br />
|-<br />
!<br />
! Size (Bytes)<br />
! Range<br />
! Notes<br />
|-<br />
! byte<br />
| 1<br />
| 0 to 255<br />
|<br />
|-<br />
! Long<br />
| 8<br />
| -2^63 to 2^63-1<br />
| Signed 64-bit Integer<br />
|-<br />
! Magic<br />
| 16<br />
| <code>00ffff00fefefefefdfdfdfd12345678</code><br />
| Always those hex bytes, corresponding to RakNet's default OFFLINE_MESSAGE_DATA_ID<br />
|-<br />
! short<br />
| 2<br />
| -32768 to 32767<br />
| <br />
|-<br />
! unsigned short<br />
| 2<br />
| 0 to 65535<br />
| <br />
|-<br />
! string<br />
| unsigned short + string<br />
| N/A<br />
| class="col3" | Prefixed by a short containing the length of the string in characters. It appears that only the following ASCII characters can be displayed: !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~<br />
|-<br />
! boolean <br />
| 1<br />
| 0 to 1<br />
| True is encoded as <code>0x01</code>, false as <code>0x00</code>. <br />
|-<br />
! address<br />
| 7<br />
| <br />
| 1 byte for the IP version (4 or 6), followed by (for IPv4) 4 bytes for the IP and an unsigned short for the port number<br />
|-<br />
! uint24le<br />
| 3<br />
| <br />
| 3-byte little-endian unsigned integer<br />
|}<br />
<br />
== Handshake sequence ==<br />
<br />
# C→S: [[#Offline Connection Request 1|Offline Connection Request 1]]<br />
# S→C: [[#Offline Connection Response 1|Offline Connection Response 1]]<br />
# C→S: [[#Offline Connection Request 2|Offline Connection Request 2]]<br />
# S→C: [[#Offline Connection Response 2|Offline Connection Response 2]]<br />
<br />
From here on, the RakNet connection is established and all RakNet messages are contained in a [[#Frame Set Packet|Frame Set Packet]].<br />
<br />
This is currently incomplete<br />
<br />
== Packets ==<br />
<br />
=== Unconnected Ping ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x01, 0x02<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| MAGIC<br />
| magic<br />
| <br />
|-<br />
| Client GUID<br />
| Long<br />
| <br />
|}<br />
<br />
<code>0x02</code> is only replied to if there are open connections to the server. '''Note:''' as of 0.15.6 it seems that the game refreshes it's LAN world list every 4-5 seconds, however it seems the game will still ping in 1 second intervals.<br><br />
This packet should be responded to with unconnected Pong.<br />
<br />
=== Unconnected Pong ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x1c<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| MAGIC<br />
| magic<br />
| <br />
|-<br />
| Server ID string<br />
| string<br />
| Used for the MOTD. See below for details.<br />
|}<br />
<br />
'''Server ID string format'''<br />
<br />
For Minecraft Bedrock this is separated by semicolons and uses the following format:<br><br />
<code>Edition (MCPE or MCEE for Education Edition);MOTD line 1;Protocol Version;Version Name;Player Count;Max Player Count;Server Unique ID;MOTD line 2;Game mode;Game mode (numeric);Port (IPv4);Port (IPv6);</code><br><br />
Example:<br><br />
<code>MCPE;Dedicated Server;390;1.14.60;0;10;13253860892328930865;Bedrock level;Survival;1;19132;19133;</code><br><br />
Result:<br><br />
[[File:Server_ID_String_Example.png]]<br><br />
The Game mode and Game mode (numeric) values seem to not be used by the client.<br />
<br />
=== Connected Ping ===<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x00<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Connected Pong ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x03<br />
| Ping Time<br />
| Long<br />
| <br />
|-<br />
| Pong Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Offline Connection Request 1 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x05<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Protocol version<br />
| byte<br />
| Currently 9<br />
|-<br />
| MTU<br />
| Zero padding<br />
| The MTU sent in the response appears to be somewhere around the size of this padding + 46 (28 udp overhead, 1 packet id, 16 magic, 1 protocol version). This padding seems to be used to discover the maximum packet size the network can handle.<br />
|}<br />
<br />
The client sends these to the target server with ever decreasing MTU until the server responds. This is used to discover the MTU size for the connection. According to the official docs, "The MTU size is the maximum size of a packet RakNet will generate", and "if you set the MTU size larger than your or any router along the network path takes, then the network will split the packet at best, or drop it at worst", so this process of sending decreasingly padded packets (compensating for the size of the packet itself and UDP overhead, which together make 48 bytes) seem to be used to discover the maximum packet size the network can handle. See the [http://www.jenkinssoftware.com/raknet/manual/programmingtips.html official documentation page] for more info about the MTU size. If the RakNet protocol does not match your own, respond with the Incompatible protocol packet.<br><br><br />
You should always respond to the first of these packets that you receive with Offline Connection Response 1, containing an MTU size of the amount of padding you received in bytes plus 46.<br />
<br />
=== Offline Connection Response 1 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x06<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| Use security<br />
| boolean<br />
| Make sure this is false, it is vital for the login sequence to continue!<br />
|-<br />
| MTU<br />
| short<br />
| see Offline Connection Request 1<br />
|}<br />
<br />
=== Offline Connection Request 2 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x07<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server Address<br />
| address<br />
| <br />
|-<br />
| MTU<br />
| short<br />
| <br />
|-<br />
| Client GUID<br />
| Long<br />
| <br />
|}<br />
<br />
=== Offline Connection Response 2 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x08<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| Client Address<br />
| address<br />
| <br />
|-<br />
| MTU<br />
| short<br />
| <br />
|-<br />
| Encryption enabled?<br />
| boolean<br />
| <br />
|}<br />
<br />
=== Online Connection Request ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x09<br />
| GUID<br />
| Long<br />
| <br />
|-<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Online Connection Request Accepted ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x10<br />
| Client address<br />
| address<br />
| <br />
|-<br />
| System index<br />
| short<br />
| Unknown what this does. 0 works as a value.<br />
|-<br />
| Internal IDs<br />
| 10x address<br />
| Unknown what these do. 255.255.255.255:19132 for all of them seems to work, any other address will probably work as well.<br />
|-<br />
| Request time<br />
| Long<br />
| <br />
|-<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Incompatible protocol ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x19<br />
| Protocol<br />
| byte<br />
| <br />
|-<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
|}<br />
<br />
=== Unconnected Ping ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x01, 0x02<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| GUID<br />
| Long<br />
| <br />
|}<br />
<br />
=== Frame Set Packet ===<br />
{| class="wikitable"<br />
! Packet ID<br />
!colspan="3"| Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="11"| 0x80..0x8d<br />
|colspan="3"| Sequence number<br />
| uint24le<br />
| <br />
|-<br />
|rowspan="10"| Frames<br />
|colspan="2"| Flags<br />
| byte<br />
| Top 3 bits are reliability type, fourth bit is 1 when the frame is fragmented and part of a compound.<br />
|-<br />
|colspan="2"| Length IN BITS<br />
| short<br />
| Length of the body in bits.<br />
|-<br />
|colspan="2"| Reliable frame index<br />
| uint24le<br />
| only if reliable<br />
|-<br />
|colspan="2"| Sequenced frame index<br />
| uint24le<br />
| only if sequenced<br />
|-<br />
|rowspan="2"| Order<br />
| Ordered frame index<br />
| uint24le<br />
|rowspan="2"| only if ordered<br />
|-<br />
| Order channel<br />
| byte<br />
|-<br />
|rowspan="3"| Fragment<br />
| Compound size<br />
| int<br />
|rowspan="3"| only if fragmented<br />
|-<br />
| Compound ID<br />
| short<br />
|-<br />
| Index<br />
| int<br />
|-<br />
| Body<br />
| ceil(length/8) bytes<br />
|}<br />
<br />
The reliability types are as follows:<br />
<br />
{| class="wikitable"<br />
! style="text-align: center; font-weight: bold;" | ID<br />
! style="font-weight: bold;" | Name<br />
! style="text-align: center; font-weight: bold;" | Reliable<br />
! style="text-align: center; font-weight: bold;" | Ordered<br />
! style="text-align: center; font-weight: bold;" | Sequenced<br />
|-<br />
| style="text-align: center;" | 0<br />
| unreliable<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 1<br />
| unreliable sequenced<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
|-<br />
| style="text-align: center;" | 2<br />
| reliable<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 3<br />
| reliable ordered<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 4<br />
| reliable sequenced<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
|-<br />
| style="text-align: center;" | 5<br />
| unreliable (+ ACK receipt)<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 6<br />
| reliable (+ ACK receipt)<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 7<br />
| reliable ordered (+ ACK receipt)<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
|}<br />
<br />
Sequenced implies ordered.<br />
<br />
=== Game Packet ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x8e<br />
| Body<br />
| bytes<br />
| Single packet of the GAME protocol.<br />
|}<br />
<br />
=== NACK ===<br />
{| class="wikitable"<br />
! style="font-weight: bold;" | Packet ID<br />
! colspan="3" style="font-weight: bold;" | Field Name<br />
! style="font-weight: bold;" | Field Type<br />
! style="font-weight: bold;" | Notes<br />
|-<br />
| 0xa0<br />
| colspan="3" | Record count<br />
| short<br />
| <br />
|-<br />
| <br />
| rowspan="4" | Record<br />
| colspan="2" | Is Range?<br />
| byte<br />
| 0 for range, 1 for no range<br />
|-<br />
| <br />
| No Range<br />
| Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| rowspan="2" | Range<br />
| Start Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| End Index<br />
| uint24le<br />
| <br />
|}<br />
<br />
=== ACK ===<br />
{| class="wikitable"<br />
! style="font-weight: bold;" | Packet ID<br />
! colspan="3" style="font-weight: bold;" | Field Name<br />
! style="font-weight: bold;" | Field Type<br />
! style="font-weight: bold;" | Notes<br />
|-<br />
| 0xc0<br />
| colspan="3" | Record count<br />
| short<br />
| <br />
|-<br />
| <br />
| rowspan="4" | Record<br />
| colspan="2" | Is Range?<br />
| byte<br />
| 0 for range, 1 for no range<br />
|-<br />
| <br />
| No Range<br />
| Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| rowspan="2" | Range<br />
| Start Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| End Index<br />
| uint24le<br />
| <br />
|}</div>Orladoghttps://wiki.vg/index.php?title=Raknet_Protocol&diff=15828Raknet Protocol2020-06-10T16:22:13Z<p>Orladog: Clarify UDP info</p>
<hr />
<div>:: '''Remember that this page is a WIP.''' Come back later to see a more complete page.<br />
----<br />
<br />
[http://www.jenkinssoftware.com/ RakNet] is a networking library used by Minecraft Bedrock Edition. You might want to also look at the documentation for the [[Bedrock Protocol]].<br />
This is based on the old [https://wiki.vg/Pocket_Edition_Protocol_Documentation#RakNet_protocol Pocket Edition Protocol Documentation] and may be incomplete or outdated.<br />
The source code for the RakNet Library can be found [https://github.com/OculusVR/RakNet/ here].<br />
RakNet uses [https://en.wikipedia.org/wiki/User_Datagram_Protocol UDP] as its networking protocol. The key differences from TCP are that not all packets are guaranteed to reach the destination at all or in order (it isn't reliable) and it uses messages with a specified length instead of streams of data. RakNet compensates for the out-of-order delivery and makes it reliable.<br />
<br />
<br />
'''NOTE:'''<br />
You may want to use an existing library if one exists for your language of choice.<br />
Here is an incomplete list. Not all of these are maintained or complete. If these are outdated you may need to change the protocol version to 9 before it can work. The protocol doesn't seem to have had any significant changes since the official implementation was discontinued in 2014, so as long as you bump the protocol version older libraries are likely to still work.<br />
<br />
{| class="wikitable sortable" style="width: auto; text-align: center;"<br />
|-style="background:#eee"<br />
! Name<br />
!class="unsortable"| Description<br />
! Language<br />
! License<br />
! Active development<br />
|-<br />
! [https://github.com/NukkitX/Network NukkitX Network]<br />
| Network components used within NukkitX, but with great support for general use as well<br />
| Java<br />
| Apache License<br />
| Yes<br />
|-<br />
! [https://github.com/JRakNet/JRakNet JRakNet]<br />
| JRakNet is a networking library for Java which implements the UDP based protocol RakNet<br />
| Java<br />
| MIT<br />
| Yes<br />
|-<br />
! [https://github.com/jython234/JRakLibPlus JRakLibPlus]<br />
| A library for easy creation of RakNet servers, based on RakLib and JRakLib.<br />
| Java<br />
| LGPL<br />
| No<br />
|-<br />
! [https://github.com/pmmp/RakLib RakLib]<br />
| RakNet server implementation written in PHP. This library is very lightweight on actual implementation - it provides the bare minimum to get a Minecraft Pocket Edition server functional. It only currently provides server functionality, and does not support most RakNet features.<br />
| PHP<br />
| GPL<br />
| Yes<br />
|-<br />
! [https://www.npmjs.com/package/raknet/ raknet]<br />
| UDP network library that follows the RakNet protocol for Node.js<br />
| node.js<br />
| MIT<br />
| No<br />
|-<br />
! [https://pypi.org/project/PyRakLib/ PyRakLib]<br />
| PyRakLib is a networking library that follows the RakNet protocol for MCPE. It is ported from the PHP library RakLib. <br />
| Python<br />
| GPL<br />
| No<br />
|-<br />
! [https://github.com/facebookarchive/RakNet Raknet] (official)<br />
| The official implementation. Outdated and mostly for reference purposes. May not work with the latest Bedrock.<br />
| C++<br />
| BSD<br />
| No<br />
|}<br />
<br />
== Data types ==<br />
<br />
{| class="wikitable"<br />
|-<br />
!<br />
! Size (Bytes)<br />
! Range<br />
! Notes<br />
|-<br />
! Byte<br />
| 1<br />
| 0 to 255<br />
|<br />
|-<br />
! Long<br />
| 8<br />
| -2^63 to 2^63-1<br />
| Signed 64-bit Integer<br />
|-<br />
! Magic<br />
| 16<br />
| <code>00ffff00fefefefefdfdfdfd12345678</code><br />
| Always those hex bytes, corresponding to RakNet's default OFFLINE_MESSAGE_DATA_ID<br />
|-<br />
! short<br />
| 2<br />
| -32768 to 32767<br />
| <br />
|-<br />
! unsigned short<br />
| 2<br />
| 0 to 65535<br />
| <br />
|-<br />
! string<br />
| unsigned short + string<br />
| N/A<br />
| class="col3" | Prefixed by a short containing the length of the string in characters. It appears that only the following ASCII characters can be displayed: !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~<br />
|-<br />
! byte<br />
| 1<br />
| 0 to 255<br />
|<br />
|-<br />
! boolean <br />
| 1<br />
| 0 to 1<br />
| True is encoded as <code>0x01</code>, false as <code>0x00</code>. <br />
|-<br />
! address<br />
| 7<br />
| <br />
| 1 byte for the IP version (4 or 6), followed by (for IPv4) 4 bytes for the IP and an unsigned short for the port number<br />
|-<br />
! uint24le<br />
| 3<br />
| <br />
| 3-byte little-endian unsigned integer<br />
|}<br />
<br />
== Handshake sequence ==<br />
<br />
# C→S: [[#Offline Connection Request 1|Offline Connection Request 1]]<br />
# S→C: [[#Offline Connection Response 1|Offline Connection Response 1]]<br />
# C→S: [[#Offline Connection Request 2|Offline Connection Request 2]]<br />
# S→C: [[#Offline Connection Response 2|Offline Connection Response 2]]<br />
<br />
From here on, the RakNet connection is established and all RakNet messages are contained in a [[#Frame Set Packet|Frame Set Packet]].<br />
<br />
This is currently incomplete<br />
<br />
== Packets ==<br />
<br />
=== Unconnected Ping ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x01, 0x02<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| MAGIC<br />
| magic<br />
| <br />
|-<br />
| Client GUID<br />
| Long<br />
| <br />
|}<br />
<br />
<code>0x02</code> is only replied to if there are open connections to the server. '''Note:''' as of 0.15.6 it seems that the game refreshes it's LAN world list every 4-5 seconds, however it seems the game will still ping in 1 second intervals.<br><br />
This packet should be responded to with unconnected Pong.<br />
<br />
=== Unconnected Pong ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x1c<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| MAGIC<br />
| magic<br />
| <br />
|-<br />
| Server ID string<br />
| string<br />
| Used for the MOTD. See below for details.<br />
|}<br />
<br />
'''Server ID string format'''<br />
<br />
For Minecraft Bedrock this is separated by semicolons and uses the following format:<br><br />
<code>Edition (MCPE or MCEE for Education Edition);MOTD line 1;Protocol Version;Version Name;Player Count;Max Player Count;Server Unique ID;MOTD line 2;Game mode;Game mode (numeric);Port (IPv4);Port (IPv6);</code><br><br />
Example:<br><br />
<code>MCPE;Dedicated Server;390;1.14.60;0;10;13253860892328930865;Bedrock level;Survival;1;19132;19133;</code><br><br />
Result:<br><br />
[[File:Server_ID_String_Example.png]]<br><br />
The Game mode and Game mode (numeric) values seem to not be used by the client.<br />
<br />
=== Connected Ping ===<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x00<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Connected Pong ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x03<br />
| Ping Time<br />
| Long<br />
| <br />
|-<br />
| Pong Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Offline Connection Request 1 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x05<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Protocol version<br />
| byte<br />
| Currently 9<br />
|-<br />
| MTU<br />
| Zero padding<br />
| The MTU sent in the response appears to be somewhere around the size of this padding + 46 (28 udp overhead, 1 packet id, 16 magic, 1 protocol version). This padding seems to be used to discover the maximum packet size the network can handle.<br />
|}<br />
<br />
The client sends these to the target server with ever decreasing MTU until the server responds. This is used to discover the MTU size for the connection. According to the official docs, "The MTU size is the maximum size of a packet RakNet will generate", and "if you set the MTU size larger than your or any router along the network path takes, then the network will split the packet at best, or drop it at worst", so this process of sending decreasingly padded packets (compensating for the size of the packet itself and UDP overhead, which together make 48 bytes) seem to be used to discover the maximum packet size the network can handle. See the [http://www.jenkinssoftware.com/raknet/manual/programmingtips.html official documentation page] for more info about the MTU size. If the RakNet protocol does not match your own, respond with the Incompatible protocol packet.<br><br><br />
You should always respond to the first of these packets that you receive with Offline Connection Response 1, containing an MTU size of the amount of padding you received in bytes plus 46.<br />
<br />
=== Offline Connection Response 1 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x06<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| Use security<br />
| boolean<br />
| Make sure this is false, it is vital for the login sequence to continue!<br />
|-<br />
| MTU<br />
| short<br />
| see Offline Connection Request 1<br />
|}<br />
<br />
=== Offline Connection Request 2 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x07<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server Address<br />
| address<br />
| <br />
|-<br />
| MTU<br />
| short<br />
| <br />
|-<br />
| Client GUID<br />
| Long<br />
| <br />
|}<br />
<br />
=== Offline Connection Response 2 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x08<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| Client Address<br />
| address<br />
| <br />
|-<br />
| MTU<br />
| short<br />
| <br />
|-<br />
| Encryption enabled?<br />
| boolean<br />
| <br />
|}<br />
<br />
=== Online Connection Request ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x09<br />
| GUID<br />
| Long<br />
| <br />
|-<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Online Connection Request Accepted ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x10<br />
| Client address<br />
| address<br />
| <br />
|-<br />
| System index<br />
| short<br />
| Unknown what this does. 0 works as a value.<br />
|-<br />
| Internal IDs<br />
| 10x address<br />
| Unknown what these do. 255.255.255.255:19132 for all of them seems to work, any other address will probably work as well.<br />
|-<br />
| Request time<br />
| Long<br />
| <br />
|-<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Incompatible protocol ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x19<br />
| Protocol<br />
| byte<br />
| <br />
|-<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
|}<br />
<br />
=== Unconnected Ping ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x01, 0x02<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| GUID<br />
| Long<br />
| <br />
|}<br />
<br />
=== Frame Set Packet ===<br />
{| class="wikitable"<br />
! Packet ID<br />
!colspan="3"| Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="11"| 0x80..0x8d<br />
|colspan="3"| Sequence number<br />
| uint24le<br />
| <br />
|-<br />
|rowspan="10"| Frames<br />
|colspan="2"| Flags<br />
| byte<br />
| Top 3 bits are reliability type, fourth bit is 1 when the frame is fragmented and part of a compound.<br />
|-<br />
|colspan="2"| Length IN BITS<br />
| short<br />
| Length of the body in bits.<br />
|-<br />
|colspan="2"| Reliable frame index<br />
| uint24le<br />
| only if reliable<br />
|-<br />
|colspan="2"| Sequenced frame index<br />
| uint24le<br />
| only if sequenced<br />
|-<br />
|rowspan="2"| Order<br />
| Ordered frame index<br />
| uint24le<br />
|rowspan="2"| only if ordered<br />
|-<br />
| Order channel<br />
| byte<br />
|-<br />
|rowspan="3"| Fragment<br />
| Compound size<br />
| int<br />
|rowspan="3"| only if fragmented<br />
|-<br />
| Compound ID<br />
| short<br />
|-<br />
| Index<br />
| int<br />
|-<br />
| Body<br />
| ceil(length/8) bytes<br />
|}<br />
<br />
The reliability types are as follows:<br />
<br />
{| class="wikitable"<br />
! style="text-align: center; font-weight: bold;" | ID<br />
! style="font-weight: bold;" | Name<br />
! style="text-align: center; font-weight: bold;" | Reliable<br />
! style="text-align: center; font-weight: bold;" | Ordered<br />
! style="text-align: center; font-weight: bold;" | Sequenced<br />
|-<br />
| style="text-align: center;" | 0<br />
| unreliable<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 1<br />
| unreliable sequenced<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
|-<br />
| style="text-align: center;" | 2<br />
| reliable<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 3<br />
| reliable ordered<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 4<br />
| reliable sequenced<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
|-<br />
| style="text-align: center;" | 5<br />
| unreliable (+ ACK receipt)<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 6<br />
| reliable (+ ACK receipt)<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 7<br />
| reliable ordered (+ ACK receipt)<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
|}<br />
<br />
Sequenced implies ordered.<br />
<br />
=== Game Packet ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x8e<br />
| Body<br />
| bytes<br />
| Single packet of the GAME protocol.<br />
|}<br />
<br />
=== NACK ===<br />
{| class="wikitable"<br />
! style="font-weight: bold;" | Packet ID<br />
! colspan="3" style="font-weight: bold;" | Field Name<br />
! style="font-weight: bold;" | Field Type<br />
! style="font-weight: bold;" | Notes<br />
|-<br />
| 0xa0<br />
| colspan="3" | Record count<br />
| short<br />
| <br />
|-<br />
| <br />
| rowspan="4" | Record<br />
| colspan="2" | Is Range?<br />
| byte<br />
| 0 for range, 1 for no range<br />
|-<br />
| <br />
| No Range<br />
| Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| rowspan="2" | Range<br />
| Start Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| End Index<br />
| uint24le<br />
| <br />
|}<br />
<br />
=== ACK ===<br />
{| class="wikitable"<br />
! style="font-weight: bold;" | Packet ID<br />
! colspan="3" style="font-weight: bold;" | Field Name<br />
! style="font-weight: bold;" | Field Type<br />
! style="font-weight: bold;" | Notes<br />
|-<br />
| 0xc0<br />
| colspan="3" | Record count<br />
| short<br />
| <br />
|-<br />
| <br />
| rowspan="4" | Record<br />
| colspan="2" | Is Range?<br />
| byte<br />
| 0 for range, 1 for no range<br />
|-<br />
| <br />
| No Range<br />
| Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| rowspan="2" | Range<br />
| Start Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| End Index<br />
| uint24le<br />
| <br />
|}</div>Orladoghttps://wiki.vg/index.php?title=Raknet_Protocol&diff=15827Raknet Protocol2020-06-10T16:21:16Z<p>Orladog: Add info about UDP</p>
<hr />
<div>:: '''Remember that this page is a WIP.''' Come back later to see a more complete page.<br />
----<br />
<br />
[http://www.jenkinssoftware.com/ RakNet] is a networking library used by Minecraft Bedrock Edition. You might want to also look at the documentation for the [[Bedrock Protocol]].<br />
This is based on the old [https://wiki.vg/Pocket_Edition_Protocol_Documentation#RakNet_protocol Pocket Edition Protocol Documentation] and may be incomplete or outdated.<br />
The source code for the RakNet Library can be found [https://github.com/OculusVR/RakNet/ here].<br />
RakNet uses [https://en.wikipedia.org/wiki/User_Datagram_Protocol UDP] as its networking protocol. The key differences from TCP are that not all packets are guaranteed to reach the destination in order (it isn't reliable) and it uses messages with a specified length instead of streams of data. RakNet compensates for the out-of-order delivery and makes it reliable.<br />
<br />
<br />
'''NOTE:'''<br />
You may want to use an existing library if one exists for your language of choice.<br />
Here is an incomplete list. Not all of these are maintained or complete. If these are outdated you may need to change the protocol version to 9 before it can work. The protocol doesn't seem to have had any significant changes since the official implementation was discontinued in 2014, so as long as you bump the protocol version older libraries are likely to still work.<br />
<br />
{| class="wikitable sortable" style="width: auto; text-align: center;"<br />
|-style="background:#eee"<br />
! Name<br />
!class="unsortable"| Description<br />
! Language<br />
! License<br />
! Active development<br />
|-<br />
! [https://github.com/NukkitX/Network NukkitX Network]<br />
| Network components used within NukkitX, but with great support for general use as well<br />
| Java<br />
| Apache License<br />
| Yes<br />
|-<br />
! [https://github.com/JRakNet/JRakNet JRakNet]<br />
| JRakNet is a networking library for Java which implements the UDP based protocol RakNet<br />
| Java<br />
| MIT<br />
| Yes<br />
|-<br />
! [https://github.com/jython234/JRakLibPlus JRakLibPlus]<br />
| A library for easy creation of RakNet servers, based on RakLib and JRakLib.<br />
| Java<br />
| LGPL<br />
| No<br />
|-<br />
! [https://github.com/pmmp/RakLib RakLib]<br />
| RakNet server implementation written in PHP. This library is very lightweight on actual implementation - it provides the bare minimum to get a Minecraft Pocket Edition server functional. It only currently provides server functionality, and does not support most RakNet features.<br />
| PHP<br />
| GPL<br />
| Yes<br />
|-<br />
! [https://www.npmjs.com/package/raknet/ raknet]<br />
| UDP network library that follows the RakNet protocol for Node.js<br />
| node.js<br />
| MIT<br />
| No<br />
|-<br />
! [https://pypi.org/project/PyRakLib/ PyRakLib]<br />
| PyRakLib is a networking library that follows the RakNet protocol for MCPE. It is ported from the PHP library RakLib. <br />
| Python<br />
| GPL<br />
| No<br />
|-<br />
! [https://github.com/facebookarchive/RakNet Raknet] (official)<br />
| The official implementation. Outdated and mostly for reference purposes. May not work with the latest Bedrock.<br />
| C++<br />
| BSD<br />
| No<br />
|}<br />
<br />
== Data types ==<br />
<br />
{| class="wikitable"<br />
|-<br />
!<br />
! Size (Bytes)<br />
! Range<br />
! Notes<br />
|-<br />
! Byte<br />
| 1<br />
| 0 to 255<br />
|<br />
|-<br />
! Long<br />
| 8<br />
| -2^63 to 2^63-1<br />
| Signed 64-bit Integer<br />
|-<br />
! Magic<br />
| 16<br />
| <code>00ffff00fefefefefdfdfdfd12345678</code><br />
| Always those hex bytes, corresponding to RakNet's default OFFLINE_MESSAGE_DATA_ID<br />
|-<br />
! short<br />
| 2<br />
| -32768 to 32767<br />
| <br />
|-<br />
! unsigned short<br />
| 2<br />
| 0 to 65535<br />
| <br />
|-<br />
! string<br />
| unsigned short + string<br />
| N/A<br />
| class="col3" | Prefixed by a short containing the length of the string in characters. It appears that only the following ASCII characters can be displayed: !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~<br />
|-<br />
! byte<br />
| 1<br />
| 0 to 255<br />
|<br />
|-<br />
! boolean <br />
| 1<br />
| 0 to 1<br />
| True is encoded as <code>0x01</code>, false as <code>0x00</code>. <br />
|-<br />
! address<br />
| 7<br />
| <br />
| 1 byte for the IP version (4 or 6), followed by (for IPv4) 4 bytes for the IP and an unsigned short for the port number<br />
|-<br />
! uint24le<br />
| 3<br />
| <br />
| 3-byte little-endian unsigned integer<br />
|}<br />
<br />
== Handshake sequence ==<br />
<br />
# C→S: [[#Offline Connection Request 1|Offline Connection Request 1]]<br />
# S→C: [[#Offline Connection Response 1|Offline Connection Response 1]]<br />
# C→S: [[#Offline Connection Request 2|Offline Connection Request 2]]<br />
# S→C: [[#Offline Connection Response 2|Offline Connection Response 2]]<br />
<br />
From here on, the RakNet connection is established and all RakNet messages are contained in a [[#Frame Set Packet|Frame Set Packet]].<br />
<br />
This is currently incomplete<br />
<br />
== Packets ==<br />
<br />
=== Unconnected Ping ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x01, 0x02<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| MAGIC<br />
| magic<br />
| <br />
|-<br />
| Client GUID<br />
| Long<br />
| <br />
|}<br />
<br />
<code>0x02</code> is only replied to if there are open connections to the server. '''Note:''' as of 0.15.6 it seems that the game refreshes it's LAN world list every 4-5 seconds, however it seems the game will still ping in 1 second intervals.<br><br />
This packet should be responded to with unconnected Pong.<br />
<br />
=== Unconnected Pong ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x1c<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| MAGIC<br />
| magic<br />
| <br />
|-<br />
| Server ID string<br />
| string<br />
| Used for the MOTD. See below for details.<br />
|}<br />
<br />
'''Server ID string format'''<br />
<br />
For Minecraft Bedrock this is separated by semicolons and uses the following format:<br><br />
<code>Edition (MCPE or MCEE for Education Edition);MOTD line 1;Protocol Version;Version Name;Player Count;Max Player Count;Server Unique ID;MOTD line 2;Game mode;Game mode (numeric);Port (IPv4);Port (IPv6);</code><br><br />
Example:<br><br />
<code>MCPE;Dedicated Server;390;1.14.60;0;10;13253860892328930865;Bedrock level;Survival;1;19132;19133;</code><br><br />
Result:<br><br />
[[File:Server_ID_String_Example.png]]<br><br />
The Game mode and Game mode (numeric) values seem to not be used by the client.<br />
<br />
=== Connected Ping ===<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x00<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Connected Pong ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x03<br />
| Ping Time<br />
| Long<br />
| <br />
|-<br />
| Pong Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Offline Connection Request 1 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x05<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Protocol version<br />
| byte<br />
| Currently 9<br />
|-<br />
| MTU<br />
| Zero padding<br />
| The MTU sent in the response appears to be somewhere around the size of this padding + 46 (28 udp overhead, 1 packet id, 16 magic, 1 protocol version). This padding seems to be used to discover the maximum packet size the network can handle.<br />
|}<br />
<br />
The client sends these to the target server with ever decreasing MTU until the server responds. This is used to discover the MTU size for the connection. According to the official docs, "The MTU size is the maximum size of a packet RakNet will generate", and "if you set the MTU size larger than your or any router along the network path takes, then the network will split the packet at best, or drop it at worst", so this process of sending decreasingly padded packets (compensating for the size of the packet itself and UDP overhead, which together make 48 bytes) seem to be used to discover the maximum packet size the network can handle. See the [http://www.jenkinssoftware.com/raknet/manual/programmingtips.html official documentation page] for more info about the MTU size. If the RakNet protocol does not match your own, respond with the Incompatible protocol packet.<br><br><br />
You should always respond to the first of these packets that you receive with Offline Connection Response 1, containing an MTU size of the amount of padding you received in bytes plus 46.<br />
<br />
=== Offline Connection Response 1 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x06<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| Use security<br />
| boolean<br />
| Make sure this is false, it is vital for the login sequence to continue!<br />
|-<br />
| MTU<br />
| short<br />
| see Offline Connection Request 1<br />
|}<br />
<br />
=== Offline Connection Request 2 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x07<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server Address<br />
| address<br />
| <br />
|-<br />
| MTU<br />
| short<br />
| <br />
|-<br />
| Client GUID<br />
| Long<br />
| <br />
|}<br />
<br />
=== Offline Connection Response 2 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x08<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| Client Address<br />
| address<br />
| <br />
|-<br />
| MTU<br />
| short<br />
| <br />
|-<br />
| Encryption enabled?<br />
| boolean<br />
| <br />
|}<br />
<br />
=== Online Connection Request ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x09<br />
| GUID<br />
| Long<br />
| <br />
|-<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Online Connection Request Accepted ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x10<br />
| Client address<br />
| address<br />
| <br />
|-<br />
| System index<br />
| short<br />
| Unknown what this does. 0 works as a value.<br />
|-<br />
| Internal IDs<br />
| 10x address<br />
| Unknown what these do. 255.255.255.255:19132 for all of them seems to work, any other address will probably work as well.<br />
|-<br />
| Request time<br />
| Long<br />
| <br />
|-<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Incompatible protocol ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x19<br />
| Protocol<br />
| byte<br />
| <br />
|-<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
|}<br />
<br />
=== Unconnected Ping ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x01, 0x02<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| GUID<br />
| Long<br />
| <br />
|}<br />
<br />
=== Frame Set Packet ===<br />
{| class="wikitable"<br />
! Packet ID<br />
!colspan="3"| Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="11"| 0x80..0x8d<br />
|colspan="3"| Sequence number<br />
| uint24le<br />
| <br />
|-<br />
|rowspan="10"| Frames<br />
|colspan="2"| Flags<br />
| byte<br />
| Top 3 bits are reliability type, fourth bit is 1 when the frame is fragmented and part of a compound.<br />
|-<br />
|colspan="2"| Length IN BITS<br />
| short<br />
| Length of the body in bits.<br />
|-<br />
|colspan="2"| Reliable frame index<br />
| uint24le<br />
| only if reliable<br />
|-<br />
|colspan="2"| Sequenced frame index<br />
| uint24le<br />
| only if sequenced<br />
|-<br />
|rowspan="2"| Order<br />
| Ordered frame index<br />
| uint24le<br />
|rowspan="2"| only if ordered<br />
|-<br />
| Order channel<br />
| byte<br />
|-<br />
|rowspan="3"| Fragment<br />
| Compound size<br />
| int<br />
|rowspan="3"| only if fragmented<br />
|-<br />
| Compound ID<br />
| short<br />
|-<br />
| Index<br />
| int<br />
|-<br />
| Body<br />
| ceil(length/8) bytes<br />
|}<br />
<br />
The reliability types are as follows:<br />
<br />
{| class="wikitable"<br />
! style="text-align: center; font-weight: bold;" | ID<br />
! style="font-weight: bold;" | Name<br />
! style="text-align: center; font-weight: bold;" | Reliable<br />
! style="text-align: center; font-weight: bold;" | Ordered<br />
! style="text-align: center; font-weight: bold;" | Sequenced<br />
|-<br />
| style="text-align: center;" | 0<br />
| unreliable<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 1<br />
| unreliable sequenced<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
|-<br />
| style="text-align: center;" | 2<br />
| reliable<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 3<br />
| reliable ordered<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 4<br />
| reliable sequenced<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
|-<br />
| style="text-align: center;" | 5<br />
| unreliable (+ ACK receipt)<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 6<br />
| reliable (+ ACK receipt)<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 7<br />
| reliable ordered (+ ACK receipt)<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
|}<br />
<br />
Sequenced implies ordered.<br />
<br />
=== Game Packet ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x8e<br />
| Body<br />
| bytes<br />
| Single packet of the GAME protocol.<br />
|}<br />
<br />
=== NACK ===<br />
{| class="wikitable"<br />
! style="font-weight: bold;" | Packet ID<br />
! colspan="3" style="font-weight: bold;" | Field Name<br />
! style="font-weight: bold;" | Field Type<br />
! style="font-weight: bold;" | Notes<br />
|-<br />
| 0xa0<br />
| colspan="3" | Record count<br />
| short<br />
| <br />
|-<br />
| <br />
| rowspan="4" | Record<br />
| colspan="2" | Is Range?<br />
| byte<br />
| 0 for range, 1 for no range<br />
|-<br />
| <br />
| No Range<br />
| Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| rowspan="2" | Range<br />
| Start Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| End Index<br />
| uint24le<br />
| <br />
|}<br />
<br />
=== ACK ===<br />
{| class="wikitable"<br />
! style="font-weight: bold;" | Packet ID<br />
! colspan="3" style="font-weight: bold;" | Field Name<br />
! style="font-weight: bold;" | Field Type<br />
! style="font-weight: bold;" | Notes<br />
|-<br />
| 0xc0<br />
| colspan="3" | Record count<br />
| short<br />
| <br />
|-<br />
| <br />
| rowspan="4" | Record<br />
| colspan="2" | Is Range?<br />
| byte<br />
| 0 for range, 1 for no range<br />
|-<br />
| <br />
| No Range<br />
| Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| rowspan="2" | Range<br />
| Start Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| End Index<br />
| uint24le<br />
| <br />
|}</div>Orladoghttps://wiki.vg/index.php?title=Raknet_Protocol&diff=15825Raknet Protocol2020-06-09T10:16:20Z<p>Orladog: Change Frame Set index to Sequence number to match with Wireshark</p>
<hr />
<div>:: '''Remember that this page is a WIP.''' Come back later to see a more complete page.<br />
----<br />
<br />
[http://www.jenkinssoftware.com/ RakNet] is a networking library used by Minecraft Bedrock Edition. You might want to also look at the documentation for the [[Bedrock Protocol]].<br />
<br />
This is based on the old [https://wiki.vg/Pocket_Edition_Protocol_Documentation#RakNet_protocol Pocket Edition Protocol Documentation] and may be incomplete or outdated.<br />
<br />
The source code for the RakNet Library can be found [https://github.com/OculusVR/RakNet/ here].<br />
<br />
<br />
'''NOTE:'''<br />
You may want to use an existing library if one exists for your language of choice.<br />
Here is an incomplete list. Not all of these are maintained or complete. If these are outdated you may need to change the protocol version to 9 before it can work. The protocol doesn't seem to have had any significant changes since the official implementation was discontinued in 2014, so as long as you bump the protocol version older libraries are likely to still work.<br />
<br />
{| class="wikitable sortable" style="width: auto; text-align: center;"<br />
|-style="background:#eee"<br />
! Name<br />
!class="unsortable"| Description<br />
! Language<br />
! License<br />
! Active development<br />
|-<br />
! [https://github.com/NukkitX/Network NukkitX Network]<br />
| Network components used within NukkitX, but with great support for general use as well<br />
| Java<br />
| Apache License<br />
| Yes<br />
|-<br />
! [https://github.com/JRakNet/JRakNet JRakNet]<br />
| JRakNet is a networking library for Java which implements the UDP based protocol RakNet<br />
| Java<br />
| MIT<br />
| Yes<br />
|-<br />
! [https://github.com/jython234/JRakLibPlus JRakLibPlus]<br />
| A library for easy creation of RakNet servers, based on RakLib and JRakLib.<br />
| Java<br />
| LGPL<br />
| No<br />
|-<br />
! [https://github.com/pmmp/RakLib RakLib]<br />
| RakNet server implementation written in PHP. This library is very lightweight on actual implementation - it provides the bare minimum to get a Minecraft Pocket Edition server functional. It only currently provides server functionality, and does not support most RakNet features.<br />
| PHP<br />
| GPL<br />
| Yes<br />
|-<br />
! [https://www.npmjs.com/package/raknet/ raknet]<br />
| UDP network library that follows the RakNet protocol for Node.js<br />
| node.js<br />
| MIT<br />
| No<br />
|-<br />
! [https://pypi.org/project/PyRakLib/ PyRakLib]<br />
| PyRakLib is a networking library that follows the RakNet protocol for MCPE. It is ported from the PHP library RakLib. <br />
| Python<br />
| GPL<br />
| No<br />
|-<br />
! [https://github.com/facebookarchive/RakNet Raknet] (official)<br />
| The official implementation. Outdated and mostly for reference purposes. May not work with the latest Bedrock.<br />
| C++<br />
| BSD<br />
| No<br />
|}<br />
<br />
== Data types ==<br />
<br />
{| class="wikitable"<br />
|-<br />
!<br />
! Size (Bytes)<br />
! Range<br />
! Notes<br />
|-<br />
! Byte<br />
| 1<br />
| 0 to 255<br />
|<br />
|-<br />
! Long<br />
| 8<br />
| -2^63 to 2^63-1<br />
| Signed 64-bit Integer<br />
|-<br />
! Magic<br />
| 16<br />
| <code>00ffff00fefefefefdfdfdfd12345678</code><br />
| Always those hex bytes, corresponding to RakNet's default OFFLINE_MESSAGE_DATA_ID<br />
|-<br />
! short<br />
| 2<br />
| -32768 to 32767<br />
| <br />
|-<br />
! unsigned short<br />
| 2<br />
| 0 to 65535<br />
| <br />
|-<br />
! string<br />
| unsigned short + string<br />
| N/A<br />
| class="col3" | Prefixed by a short containing the length of the string in characters. It appears that only the following ASCII characters can be displayed: !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~<br />
|-<br />
! byte<br />
| 1<br />
| 0 to 255<br />
|<br />
|-<br />
! boolean <br />
| 1<br />
| 0 to 1<br />
| True is encoded as <code>0x01</code>, false as <code>0x00</code>. <br />
|-<br />
! address<br />
| 7<br />
| <br />
| 1 byte for the IP version (4 or 6), followed by (for IPv4) 4 bytes for the IP and an unsigned short for the port number<br />
|-<br />
! uint24le<br />
| 3<br />
| <br />
| 3-byte little-endian unsigned integer<br />
|}<br />
<br />
== Handshake sequence ==<br />
<br />
# C→S: [[#Offline Connection Request 1|Offline Connection Request 1]]<br />
# S→C: [[#Offline Connection Response 1|Offline Connection Response 1]]<br />
# C→S: [[#Offline Connection Request 2|Offline Connection Request 2]]<br />
# S→C: [[#Offline Connection Response 2|Offline Connection Response 2]]<br />
<br />
From here on, the RakNet connection is established and all RakNet messages are contained in a [[#Frame Set Packet|Frame Set Packet]].<br />
<br />
This is currently incomplete<br />
<br />
== Packets ==<br />
<br />
=== Unconnected Ping ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x01, 0x02<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| MAGIC<br />
| magic<br />
| <br />
|-<br />
| Client GUID<br />
| Long<br />
| <br />
|}<br />
<br />
<code>0x02</code> is only replied to if there are open connections to the server. '''Note:''' as of 0.15.6 it seems that the game refreshes it's LAN world list every 4-5 seconds, however it seems the game will still ping in 1 second intervals.<br><br />
This packet should be responded to with unconnected Pong.<br />
<br />
=== Unconnected Pong ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x1c<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| MAGIC<br />
| magic<br />
| <br />
|-<br />
| Server ID string<br />
| string<br />
| Used for the MOTD. See below for details.<br />
|}<br />
<br />
'''Server ID string format'''<br />
<br />
For Minecraft Bedrock this is separated by semicolons and uses the following format:<br><br />
<code>Edition (MCPE or MCEE for Education Edition);MOTD line 1;Protocol Version;Version Name;Player Count;Max Player Count;Server Unique ID;MOTD line 2;Game mode;Game mode (numeric);Port (IPv4);Port (IPv6);</code><br><br />
Example:<br><br />
<code>MCPE;Dedicated Server;390;1.14.60;0;10;13253860892328930865;Bedrock level;Survival;1;19132;19133;</code><br><br />
Result:<br><br />
[[File:Server_ID_String_Example.png]]<br><br />
The Game mode and Game mode (numeric) values seem to not be used by the client.<br />
<br />
=== Connected Ping ===<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x00<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Connected Pong ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x03<br />
| Ping Time<br />
| Long<br />
| <br />
|-<br />
| Pong Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Offline Connection Request 1 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x05<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Protocol version<br />
| byte<br />
| Currently 9<br />
|-<br />
| MTU<br />
| Zero padding<br />
| The MTU sent in the response appears to be somewhere around the size of this padding + 46 (28 udp overhead, 1 packet id, 16 magic, 1 protocol version). This padding seems to be used to discover the maximum packet size the network can handle.<br />
|}<br />
<br />
The client sends these to the target server with ever decreasing MTU until the server responds. This is used to discover the MTU size for the connection. According to the official docs, "The MTU size is the maximum size of a packet RakNet will generate", and "if you set the MTU size larger than your or any router along the network path takes, then the network will split the packet at best, or drop it at worst", so this process of sending decreasingly padded packets (compensating for the size of the packet itself and UDP overhead, which together make 48 bytes) seem to be used to discover the maximum packet size the network can handle. See the [http://www.jenkinssoftware.com/raknet/manual/programmingtips.html official documentation page] for more info about the MTU size. If the RakNet protocol does not match your own, respond with the Incompatible protocol packet.<br><br><br />
You should always respond to the first of these packets that you receive with Offline Connection Response 1, containing an MTU size of the amount of padding you received in bytes plus 46.<br />
<br />
=== Offline Connection Response 1 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x06<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| Use security<br />
| boolean<br />
| Make sure this is false, it is vital for the login sequence to continue!<br />
|-<br />
| MTU<br />
| short<br />
| see Offline Connection Request 1<br />
|}<br />
<br />
=== Offline Connection Request 2 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x07<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server Address<br />
| address<br />
| <br />
|-<br />
| MTU<br />
| short<br />
| <br />
|-<br />
| Client GUID<br />
| Long<br />
| <br />
|}<br />
<br />
=== Offline Connection Response 2 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x08<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| Client Address<br />
| address<br />
| <br />
|-<br />
| MTU<br />
| short<br />
| <br />
|-<br />
| Encryption enabled?<br />
| boolean<br />
| <br />
|}<br />
<br />
=== Online Connection Request ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x09<br />
| GUID<br />
| Long<br />
| <br />
|-<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Online Connection Request Accepted ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x10<br />
| Client address<br />
| address<br />
| <br />
|-<br />
| System index<br />
| short<br />
| Unknown what this does. 0 works as a value.<br />
|-<br />
| Internal IDs<br />
| 10x address<br />
| Unknown what these do. 255.255.255.255:19132 for all of them seems to work, any other address will probably work as well.<br />
|-<br />
| Request time<br />
| Long<br />
| <br />
|-<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Incompatible protocol ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x19<br />
| Protocol<br />
| byte<br />
| <br />
|-<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
|}<br />
<br />
=== Unconnected Ping ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x01, 0x02<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| GUID<br />
| Long<br />
| <br />
|}<br />
<br />
=== Frame Set Packet ===<br />
{| class="wikitable"<br />
! Packet ID<br />
!colspan="3"| Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="11"| 0x80..0x8d<br />
|colspan="3"| Sequence number<br />
| uint24le<br />
| <br />
|-<br />
|rowspan="10"| Frames<br />
|colspan="2"| Flags<br />
| byte<br />
| Top 3 bits are reliability type, fourth bit is 1 when the frame is fragmented and part of a compound.<br />
|-<br />
|colspan="2"| Length IN BITS<br />
| short<br />
| Length of the body in bits.<br />
|-<br />
|colspan="2"| Reliable frame index<br />
| uint24le<br />
| only if reliable<br />
|-<br />
|colspan="2"| Sequenced frame index<br />
| uint24le<br />
| only if sequenced<br />
|-<br />
|rowspan="2"| Order<br />
| Ordered frame index<br />
| uint24le<br />
|rowspan="2"| only if ordered<br />
|-<br />
| Order channel<br />
| byte<br />
|-<br />
|rowspan="3"| Fragment<br />
| Compound size<br />
| int<br />
|rowspan="3"| only if fragmented<br />
|-<br />
| Compound ID<br />
| short<br />
|-<br />
| Index<br />
| int<br />
|-<br />
| Body<br />
| ceil(length/8) bytes<br />
|}<br />
<br />
The reliability types are as follows:<br />
<br />
{| class="wikitable"<br />
! style="text-align: center; font-weight: bold;" | ID<br />
! style="font-weight: bold;" | Name<br />
! style="text-align: center; font-weight: bold;" | Reliable<br />
! style="text-align: center; font-weight: bold;" | Ordered<br />
! style="text-align: center; font-weight: bold;" | Sequenced<br />
|-<br />
| style="text-align: center;" | 0<br />
| unreliable<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 1<br />
| unreliable sequenced<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
|-<br />
| style="text-align: center;" | 2<br />
| reliable<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 3<br />
| reliable ordered<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 4<br />
| reliable sequenced<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
|-<br />
| style="text-align: center;" | 5<br />
| unreliable (+ ACK receipt)<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 6<br />
| reliable (+ ACK receipt)<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 7<br />
| reliable ordered (+ ACK receipt)<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
|}<br />
<br />
Sequenced implies ordered.<br />
<br />
=== Game Packet ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x8e<br />
| Body<br />
| bytes<br />
| Single packet of the GAME protocol.<br />
|}<br />
<br />
=== NACK ===<br />
{| class="wikitable"<br />
! style="font-weight: bold;" | Packet ID<br />
! colspan="3" style="font-weight: bold;" | Field Name<br />
! style="font-weight: bold;" | Field Type<br />
! style="font-weight: bold;" | Notes<br />
|-<br />
| 0xa0<br />
| colspan="3" | Record count<br />
| short<br />
| <br />
|-<br />
| <br />
| rowspan="4" | Record<br />
| colspan="2" | Is Range?<br />
| byte<br />
| 0 for range, 1 for no range<br />
|-<br />
| <br />
| No Range<br />
| Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| rowspan="2" | Range<br />
| Start Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| End Index<br />
| uint24le<br />
| <br />
|}<br />
<br />
=== ACK ===<br />
{| class="wikitable"<br />
! style="font-weight: bold;" | Packet ID<br />
! colspan="3" style="font-weight: bold;" | Field Name<br />
! style="font-weight: bold;" | Field Type<br />
! style="font-weight: bold;" | Notes<br />
|-<br />
| 0xc0<br />
| colspan="3" | Record count<br />
| short<br />
| <br />
|-<br />
| <br />
| rowspan="4" | Record<br />
| colspan="2" | Is Range?<br />
| byte<br />
| 0 for range, 1 for no range<br />
|-<br />
| <br />
| No Range<br />
| Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| rowspan="2" | Range<br />
| Start Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| End Index<br />
| uint24le<br />
| <br />
|}</div>Orladoghttps://wiki.vg/index.php?title=Raknet_Protocol&diff=15824Raknet Protocol2020-06-09T10:13:10Z<p>Orladog: Add info to Handshake sequence</p>
<hr />
<div>:: '''Remember that this page is a WIP.''' Come back later to see a more complete page.<br />
----<br />
<br />
[http://www.jenkinssoftware.com/ RakNet] is a networking library used by Minecraft Bedrock Edition. You might want to also look at the documentation for the [[Bedrock Protocol]].<br />
<br />
This is based on the old [https://wiki.vg/Pocket_Edition_Protocol_Documentation#RakNet_protocol Pocket Edition Protocol Documentation] and may be incomplete or outdated.<br />
<br />
The source code for the RakNet Library can be found [https://github.com/OculusVR/RakNet/ here].<br />
<br />
<br />
'''NOTE:'''<br />
You may want to use an existing library if one exists for your language of choice.<br />
Here is an incomplete list. Not all of these are maintained or complete. If these are outdated you may need to change the protocol version to 9 before it can work. The protocol doesn't seem to have had any significant changes since the official implementation was discontinued in 2014, so as long as you bump the protocol version older libraries are likely to still work.<br />
<br />
{| class="wikitable sortable" style="width: auto; text-align: center;"<br />
|-style="background:#eee"<br />
! Name<br />
!class="unsortable"| Description<br />
! Language<br />
! License<br />
! Active development<br />
|-<br />
! [https://github.com/NukkitX/Network NukkitX Network]<br />
| Network components used within NukkitX, but with great support for general use as well<br />
| Java<br />
| Apache License<br />
| Yes<br />
|-<br />
! [https://github.com/JRakNet/JRakNet JRakNet]<br />
| JRakNet is a networking library for Java which implements the UDP based protocol RakNet<br />
| Java<br />
| MIT<br />
| Yes<br />
|-<br />
! [https://github.com/jython234/JRakLibPlus JRakLibPlus]<br />
| A library for easy creation of RakNet servers, based on RakLib and JRakLib.<br />
| Java<br />
| LGPL<br />
| No<br />
|-<br />
! [https://github.com/pmmp/RakLib RakLib]<br />
| RakNet server implementation written in PHP. This library is very lightweight on actual implementation - it provides the bare minimum to get a Minecraft Pocket Edition server functional. It only currently provides server functionality, and does not support most RakNet features.<br />
| PHP<br />
| GPL<br />
| Yes<br />
|-<br />
! [https://www.npmjs.com/package/raknet/ raknet]<br />
| UDP network library that follows the RakNet protocol for Node.js<br />
| node.js<br />
| MIT<br />
| No<br />
|-<br />
! [https://pypi.org/project/PyRakLib/ PyRakLib]<br />
| PyRakLib is a networking library that follows the RakNet protocol for MCPE. It is ported from the PHP library RakLib. <br />
| Python<br />
| GPL<br />
| No<br />
|-<br />
! [https://github.com/facebookarchive/RakNet Raknet] (official)<br />
| The official implementation. Outdated and mostly for reference purposes. May not work with the latest Bedrock.<br />
| C++<br />
| BSD<br />
| No<br />
|}<br />
<br />
== Data types ==<br />
<br />
{| class="wikitable"<br />
|-<br />
!<br />
! Size (Bytes)<br />
! Range<br />
! Notes<br />
|-<br />
! Byte<br />
| 1<br />
| 0 to 255<br />
|<br />
|-<br />
! Long<br />
| 8<br />
| -2^63 to 2^63-1<br />
| Signed 64-bit Integer<br />
|-<br />
! Magic<br />
| 16<br />
| <code>00ffff00fefefefefdfdfdfd12345678</code><br />
| Always those hex bytes, corresponding to RakNet's default OFFLINE_MESSAGE_DATA_ID<br />
|-<br />
! short<br />
| 2<br />
| -32768 to 32767<br />
| <br />
|-<br />
! unsigned short<br />
| 2<br />
| 0 to 65535<br />
| <br />
|-<br />
! string<br />
| unsigned short + string<br />
| N/A<br />
| class="col3" | Prefixed by a short containing the length of the string in characters. It appears that only the following ASCII characters can be displayed: !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~<br />
|-<br />
! byte<br />
| 1<br />
| 0 to 255<br />
|<br />
|-<br />
! boolean <br />
| 1<br />
| 0 to 1<br />
| True is encoded as <code>0x01</code>, false as <code>0x00</code>. <br />
|-<br />
! address<br />
| 7<br />
| <br />
| 1 byte for the IP version (4 or 6), followed by (for IPv4) 4 bytes for the IP and an unsigned short for the port number<br />
|-<br />
! uint24le<br />
| 3<br />
| <br />
| 3-byte little-endian unsigned integer<br />
|}<br />
<br />
== Handshake sequence ==<br />
<br />
# C→S: [[#Offline Connection Request 1|Offline Connection Request 1]]<br />
# S→C: [[#Offline Connection Response 1|Offline Connection Response 1]]<br />
# C→S: [[#Offline Connection Request 2|Offline Connection Request 2]]<br />
# S→C: [[#Offline Connection Response 2|Offline Connection Response 2]]<br />
<br />
From here on, the RakNet connection is established and all RakNet messages are contained in a [[#Frame Set Packet|Frame Set Packet]].<br />
<br />
This is currently incomplete<br />
<br />
== Packets ==<br />
<br />
=== Unconnected Ping ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x01, 0x02<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| MAGIC<br />
| magic<br />
| <br />
|-<br />
| Client GUID<br />
| Long<br />
| <br />
|}<br />
<br />
<code>0x02</code> is only replied to if there are open connections to the server. '''Note:''' as of 0.15.6 it seems that the game refreshes it's LAN world list every 4-5 seconds, however it seems the game will still ping in 1 second intervals.<br><br />
This packet should be responded to with unconnected Pong.<br />
<br />
=== Unconnected Pong ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x1c<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| MAGIC<br />
| magic<br />
| <br />
|-<br />
| Server ID string<br />
| string<br />
| Used for the MOTD. See below for details.<br />
|}<br />
<br />
'''Server ID string format'''<br />
<br />
For Minecraft Bedrock this is separated by semicolons and uses the following format:<br><br />
<code>Edition (MCPE or MCEE for Education Edition);MOTD line 1;Protocol Version;Version Name;Player Count;Max Player Count;Server Unique ID;MOTD line 2;Game mode;Game mode (numeric);Port (IPv4);Port (IPv6);</code><br><br />
Example:<br><br />
<code>MCPE;Dedicated Server;390;1.14.60;0;10;13253860892328930865;Bedrock level;Survival;1;19132;19133;</code><br><br />
Result:<br><br />
[[File:Server_ID_String_Example.png]]<br><br />
The Game mode and Game mode (numeric) values seem to not be used by the client.<br />
<br />
=== Connected Ping ===<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x00<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Connected Pong ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x03<br />
| Ping Time<br />
| Long<br />
| <br />
|-<br />
| Pong Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Offline Connection Request 1 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x05<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Protocol version<br />
| byte<br />
| Currently 9<br />
|-<br />
| MTU<br />
| Zero padding<br />
| The MTU sent in the response appears to be somewhere around the size of this padding + 46 (28 udp overhead, 1 packet id, 16 magic, 1 protocol version). This padding seems to be used to discover the maximum packet size the network can handle.<br />
|}<br />
<br />
The client sends these to the target server with ever decreasing MTU until the server responds. This is used to discover the MTU size for the connection. According to the official docs, "The MTU size is the maximum size of a packet RakNet will generate", and "if you set the MTU size larger than your or any router along the network path takes, then the network will split the packet at best, or drop it at worst", so this process of sending decreasingly padded packets (compensating for the size of the packet itself and UDP overhead, which together make 48 bytes) seem to be used to discover the maximum packet size the network can handle. See the [http://www.jenkinssoftware.com/raknet/manual/programmingtips.html official documentation page] for more info about the MTU size. If the RakNet protocol does not match your own, respond with the Incompatible protocol packet.<br><br><br />
You should always respond to the first of these packets that you receive with Offline Connection Response 1, containing an MTU size of the amount of padding you received in bytes plus 46.<br />
<br />
=== Offline Connection Response 1 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x06<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| Use security<br />
| boolean<br />
| Make sure this is false, it is vital for the login sequence to continue!<br />
|-<br />
| MTU<br />
| short<br />
| see Offline Connection Request 1<br />
|}<br />
<br />
=== Offline Connection Request 2 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x07<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server Address<br />
| address<br />
| <br />
|-<br />
| MTU<br />
| short<br />
| <br />
|-<br />
| Client GUID<br />
| Long<br />
| <br />
|}<br />
<br />
=== Offline Connection Response 2 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x08<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| Client Address<br />
| address<br />
| <br />
|-<br />
| MTU<br />
| short<br />
| <br />
|-<br />
| Encryption enabled?<br />
| boolean<br />
| <br />
|}<br />
<br />
=== Online Connection Request ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x09<br />
| GUID<br />
| Long<br />
| <br />
|-<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Online Connection Request Accepted ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x10<br />
| Client address<br />
| address<br />
| <br />
|-<br />
| System index<br />
| short<br />
| Unknown what this does. 0 works as a value.<br />
|-<br />
| Internal IDs<br />
| 10x address<br />
| Unknown what these do. 255.255.255.255:19132 for all of them seems to work, any other address will probably work as well.<br />
|-<br />
| Request time<br />
| Long<br />
| <br />
|-<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Incompatible protocol ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x19<br />
| Protocol<br />
| byte<br />
| <br />
|-<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
|}<br />
<br />
=== Unconnected Ping ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x01, 0x02<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| GUID<br />
| Long<br />
| <br />
|}<br />
<br />
=== Frame Set Packet ===<br />
{| class="wikitable"<br />
! Packet ID<br />
!colspan="3"| Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="11"| 0x80..0x8d<br />
|colspan="3"| Frame Set index<br />
| uint24le<br />
| <br />
|-<br />
|rowspan="10"| Frames<br />
|colspan="2"| Flags<br />
| byte<br />
| Top 3 bits are reliability type, fourth bit is 1 when the frame is fragmented and part of a compound.<br />
|-<br />
|colspan="2"| Length IN BITS<br />
| short<br />
| Length of the body in bits.<br />
|-<br />
|colspan="2"| Reliable frame index<br />
| uint24le<br />
| only if reliable<br />
|-<br />
|colspan="2"| Sequenced frame index<br />
| uint24le<br />
| only if sequenced<br />
|-<br />
|rowspan="2"| Order<br />
| Ordered frame index<br />
| uint24le<br />
|rowspan="2"| only if ordered<br />
|-<br />
| Order channel<br />
| byte<br />
|-<br />
|rowspan="3"| Fragment<br />
| Compound size<br />
| int<br />
|rowspan="3"| only if fragmented<br />
|-<br />
| Compound ID<br />
| short<br />
|-<br />
| Index<br />
| int<br />
|-<br />
| Body<br />
| ceil(length/8) bytes<br />
|}<br />
<br />
The reliability types are as follows:<br />
<br />
{| class="wikitable"<br />
! style="text-align: center; font-weight: bold;" | ID<br />
! style="font-weight: bold;" | Name<br />
! style="text-align: center; font-weight: bold;" | Reliable<br />
! style="text-align: center; font-weight: bold;" | Ordered<br />
! style="text-align: center; font-weight: bold;" | Sequenced<br />
|-<br />
| style="text-align: center;" | 0<br />
| unreliable<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 1<br />
| unreliable sequenced<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
|-<br />
| style="text-align: center;" | 2<br />
| reliable<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 3<br />
| reliable ordered<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 4<br />
| reliable sequenced<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
|-<br />
| style="text-align: center;" | 5<br />
| unreliable (+ ACK receipt)<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 6<br />
| reliable (+ ACK receipt)<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 7<br />
| reliable ordered (+ ACK receipt)<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
|}<br />
<br />
Sequenced implies ordered.<br />
<br />
=== Game Packet ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x8e<br />
| Body<br />
| bytes<br />
| Single packet of the GAME protocol.<br />
|}<br />
<br />
=== NACK ===<br />
{| class="wikitable"<br />
! style="font-weight: bold;" | Packet ID<br />
! colspan="3" style="font-weight: bold;" | Field Name<br />
! style="font-weight: bold;" | Field Type<br />
! style="font-weight: bold;" | Notes<br />
|-<br />
| 0xa0<br />
| colspan="3" | Record count<br />
| short<br />
| <br />
|-<br />
| <br />
| rowspan="4" | Record<br />
| colspan="2" | Is Range?<br />
| byte<br />
| 0 for range, 1 for no range<br />
|-<br />
| <br />
| No Range<br />
| Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| rowspan="2" | Range<br />
| Start Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| End Index<br />
| uint24le<br />
| <br />
|}<br />
<br />
=== ACK ===<br />
{| class="wikitable"<br />
! style="font-weight: bold;" | Packet ID<br />
! colspan="3" style="font-weight: bold;" | Field Name<br />
! style="font-weight: bold;" | Field Type<br />
! style="font-weight: bold;" | Notes<br />
|-<br />
| 0xc0<br />
| colspan="3" | Record count<br />
| short<br />
| <br />
|-<br />
| <br />
| rowspan="4" | Record<br />
| colspan="2" | Is Range?<br />
| byte<br />
| 0 for range, 1 for no range<br />
|-<br />
| <br />
| No Range<br />
| Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| rowspan="2" | Range<br />
| Start Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| End Index<br />
| uint24le<br />
| <br />
|}</div>Orladoghttps://wiki.vg/index.php?title=Raknet_Protocol&diff=15823Raknet Protocol2020-06-09T10:11:17Z<p>Orladog: Add uint24le to Data types</p>
<hr />
<div>:: '''Remember that this page is a WIP.''' Come back later to see a more complete page.<br />
----<br />
<br />
[http://www.jenkinssoftware.com/ RakNet] is a networking library used by Minecraft Bedrock Edition. You might want to also look at the documentation for the [[Bedrock Protocol]].<br />
<br />
This is based on the old [https://wiki.vg/Pocket_Edition_Protocol_Documentation#RakNet_protocol Pocket Edition Protocol Documentation] and may be incomplete or outdated.<br />
<br />
The source code for the RakNet Library can be found [https://github.com/OculusVR/RakNet/ here].<br />
<br />
<br />
'''NOTE:'''<br />
You may want to use an existing library if one exists for your language of choice.<br />
Here is an incomplete list. Not all of these are maintained or complete. If these are outdated you may need to change the protocol version to 9 before it can work. The protocol doesn't seem to have had any significant changes since the official implementation was discontinued in 2014, so as long as you bump the protocol version older libraries are likely to still work.<br />
<br />
{| class="wikitable sortable" style="width: auto; text-align: center;"<br />
|-style="background:#eee"<br />
! Name<br />
!class="unsortable"| Description<br />
! Language<br />
! License<br />
! Active development<br />
|-<br />
! [https://github.com/NukkitX/Network NukkitX Network]<br />
| Network components used within NukkitX, but with great support for general use as well<br />
| Java<br />
| Apache License<br />
| Yes<br />
|-<br />
! [https://github.com/JRakNet/JRakNet JRakNet]<br />
| JRakNet is a networking library for Java which implements the UDP based protocol RakNet<br />
| Java<br />
| MIT<br />
| Yes<br />
|-<br />
! [https://github.com/jython234/JRakLibPlus JRakLibPlus]<br />
| A library for easy creation of RakNet servers, based on RakLib and JRakLib.<br />
| Java<br />
| LGPL<br />
| No<br />
|-<br />
! [https://github.com/pmmp/RakLib RakLib]<br />
| RakNet server implementation written in PHP. This library is very lightweight on actual implementation - it provides the bare minimum to get a Minecraft Pocket Edition server functional. It only currently provides server functionality, and does not support most RakNet features.<br />
| PHP<br />
| GPL<br />
| Yes<br />
|-<br />
! [https://www.npmjs.com/package/raknet/ raknet]<br />
| UDP network library that follows the RakNet protocol for Node.js<br />
| node.js<br />
| MIT<br />
| No<br />
|-<br />
! [https://pypi.org/project/PyRakLib/ PyRakLib]<br />
| PyRakLib is a networking library that follows the RakNet protocol for MCPE. It is ported from the PHP library RakLib. <br />
| Python<br />
| GPL<br />
| No<br />
|-<br />
! [https://github.com/facebookarchive/RakNet Raknet] (official)<br />
| The official implementation. Outdated and mostly for reference purposes. May not work with the latest Bedrock.<br />
| C++<br />
| BSD<br />
| No<br />
|}<br />
<br />
== Data types ==<br />
<br />
{| class="wikitable"<br />
|-<br />
!<br />
! Size (Bytes)<br />
! Range<br />
! Notes<br />
|-<br />
! Byte<br />
| 1<br />
| 0 to 255<br />
|<br />
|-<br />
! Long<br />
| 8<br />
| -2^63 to 2^63-1<br />
| Signed 64-bit Integer<br />
|-<br />
! Magic<br />
| 16<br />
| <code>00ffff00fefefefefdfdfdfd12345678</code><br />
| Always those hex bytes, corresponding to RakNet's default OFFLINE_MESSAGE_DATA_ID<br />
|-<br />
! short<br />
| 2<br />
| -32768 to 32767<br />
| <br />
|-<br />
! unsigned short<br />
| 2<br />
| 0 to 65535<br />
| <br />
|-<br />
! string<br />
| unsigned short + string<br />
| N/A<br />
| class="col3" | Prefixed by a short containing the length of the string in characters. It appears that only the following ASCII characters can be displayed: !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~<br />
|-<br />
! byte<br />
| 1<br />
| 0 to 255<br />
|<br />
|-<br />
! boolean <br />
| 1<br />
| 0 to 1<br />
| True is encoded as <code>0x01</code>, false as <code>0x00</code>. <br />
|-<br />
! address<br />
| 7<br />
| <br />
| 1 byte for the IP version (4 or 6), followed by (for IPv4) 4 bytes for the IP and an unsigned short for the port number<br />
|-<br />
! uint24le<br />
| 3<br />
| <br />
| 3-byte little-endian unsigned integer<br />
|}<br />
<br />
== Handshake sequence ==<br />
<br />
# C→S: [[#Offline Connection Request 1|Offline Connection Request 1]]<br />
# S→C: [[#Offline Connection Response 1|Offline Connection Response 1]]<br />
# C→S: [[#Offline Connection Request 2|Offline Connection Request 2]]<br />
# S→C: [[#Offline Connection Response 2|Offline Connection Response 2]]<br />
<br />
This is currently incomplete<br />
<br />
== Packets ==<br />
<br />
=== Unconnected Ping ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x01, 0x02<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| MAGIC<br />
| magic<br />
| <br />
|-<br />
| Client GUID<br />
| Long<br />
| <br />
|}<br />
<br />
<code>0x02</code> is only replied to if there are open connections to the server. '''Note:''' as of 0.15.6 it seems that the game refreshes it's LAN world list every 4-5 seconds, however it seems the game will still ping in 1 second intervals.<br><br />
This packet should be responded to with unconnected Pong.<br />
<br />
=== Unconnected Pong ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x1c<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| MAGIC<br />
| magic<br />
| <br />
|-<br />
| Server ID string<br />
| string<br />
| Used for the MOTD. See below for details.<br />
|}<br />
<br />
'''Server ID string format'''<br />
<br />
For Minecraft Bedrock this is separated by semicolons and uses the following format:<br><br />
<code>Edition (MCPE or MCEE for Education Edition);MOTD line 1;Protocol Version;Version Name;Player Count;Max Player Count;Server Unique ID;MOTD line 2;Game mode;Game mode (numeric);Port (IPv4);Port (IPv6);</code><br><br />
Example:<br><br />
<code>MCPE;Dedicated Server;390;1.14.60;0;10;13253860892328930865;Bedrock level;Survival;1;19132;19133;</code><br><br />
Result:<br><br />
[[File:Server_ID_String_Example.png]]<br><br />
The Game mode and Game mode (numeric) values seem to not be used by the client.<br />
<br />
=== Connected Ping ===<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x00<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Connected Pong ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x03<br />
| Ping Time<br />
| Long<br />
| <br />
|-<br />
| Pong Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Offline Connection Request 1 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x05<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Protocol version<br />
| byte<br />
| Currently 9<br />
|-<br />
| MTU<br />
| Zero padding<br />
| The MTU sent in the response appears to be somewhere around the size of this padding + 46 (28 udp overhead, 1 packet id, 16 magic, 1 protocol version). This padding seems to be used to discover the maximum packet size the network can handle.<br />
|}<br />
<br />
The client sends these to the target server with ever decreasing MTU until the server responds. This is used to discover the MTU size for the connection. According to the official docs, "The MTU size is the maximum size of a packet RakNet will generate", and "if you set the MTU size larger than your or any router along the network path takes, then the network will split the packet at best, or drop it at worst", so this process of sending decreasingly padded packets (compensating for the size of the packet itself and UDP overhead, which together make 48 bytes) seem to be used to discover the maximum packet size the network can handle. See the [http://www.jenkinssoftware.com/raknet/manual/programmingtips.html official documentation page] for more info about the MTU size. If the RakNet protocol does not match your own, respond with the Incompatible protocol packet.<br><br><br />
You should always respond to the first of these packets that you receive with Offline Connection Response 1, containing an MTU size of the amount of padding you received in bytes plus 46.<br />
<br />
=== Offline Connection Response 1 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x06<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| Use security<br />
| boolean<br />
| Make sure this is false, it is vital for the login sequence to continue!<br />
|-<br />
| MTU<br />
| short<br />
| see Offline Connection Request 1<br />
|}<br />
<br />
=== Offline Connection Request 2 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x07<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server Address<br />
| address<br />
| <br />
|-<br />
| MTU<br />
| short<br />
| <br />
|-<br />
| Client GUID<br />
| Long<br />
| <br />
|}<br />
<br />
=== Offline Connection Response 2 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x08<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| Client Address<br />
| address<br />
| <br />
|-<br />
| MTU<br />
| short<br />
| <br />
|-<br />
| Encryption enabled?<br />
| boolean<br />
| <br />
|}<br />
<br />
=== Online Connection Request ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x09<br />
| GUID<br />
| Long<br />
| <br />
|-<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Online Connection Request Accepted ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x10<br />
| Client address<br />
| address<br />
| <br />
|-<br />
| System index<br />
| short<br />
| Unknown what this does. 0 works as a value.<br />
|-<br />
| Internal IDs<br />
| 10x address<br />
| Unknown what these do. 255.255.255.255:19132 for all of them seems to work, any other address will probably work as well.<br />
|-<br />
| Request time<br />
| Long<br />
| <br />
|-<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Incompatible protocol ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x19<br />
| Protocol<br />
| byte<br />
| <br />
|-<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
|}<br />
<br />
=== Unconnected Ping ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x01, 0x02<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| GUID<br />
| Long<br />
| <br />
|}<br />
<br />
=== Frame Set Packet ===<br />
{| class="wikitable"<br />
! Packet ID<br />
!colspan="3"| Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="11"| 0x80..0x8d<br />
|colspan="3"| Frame Set index<br />
| uint24le<br />
| <br />
|-<br />
|rowspan="10"| Frames<br />
|colspan="2"| Flags<br />
| byte<br />
| Top 3 bits are reliability type, fourth bit is 1 when the frame is fragmented and part of a compound.<br />
|-<br />
|colspan="2"| Length IN BITS<br />
| short<br />
| Length of the body in bits.<br />
|-<br />
|colspan="2"| Reliable frame index<br />
| uint24le<br />
| only if reliable<br />
|-<br />
|colspan="2"| Sequenced frame index<br />
| uint24le<br />
| only if sequenced<br />
|-<br />
|rowspan="2"| Order<br />
| Ordered frame index<br />
| uint24le<br />
|rowspan="2"| only if ordered<br />
|-<br />
| Order channel<br />
| byte<br />
|-<br />
|rowspan="3"| Fragment<br />
| Compound size<br />
| int<br />
|rowspan="3"| only if fragmented<br />
|-<br />
| Compound ID<br />
| short<br />
|-<br />
| Index<br />
| int<br />
|-<br />
| Body<br />
| ceil(length/8) bytes<br />
|}<br />
<br />
The reliability types are as follows:<br />
<br />
{| class="wikitable"<br />
! style="text-align: center; font-weight: bold;" | ID<br />
! style="font-weight: bold;" | Name<br />
! style="text-align: center; font-weight: bold;" | Reliable<br />
! style="text-align: center; font-weight: bold;" | Ordered<br />
! style="text-align: center; font-weight: bold;" | Sequenced<br />
|-<br />
| style="text-align: center;" | 0<br />
| unreliable<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 1<br />
| unreliable sequenced<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
|-<br />
| style="text-align: center;" | 2<br />
| reliable<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 3<br />
| reliable ordered<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 4<br />
| reliable sequenced<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
|-<br />
| style="text-align: center;" | 5<br />
| unreliable (+ ACK receipt)<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 6<br />
| reliable (+ ACK receipt)<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 7<br />
| reliable ordered (+ ACK receipt)<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
|}<br />
<br />
Sequenced implies ordered.<br />
<br />
=== Game Packet ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x8e<br />
| Body<br />
| bytes<br />
| Single packet of the GAME protocol.<br />
|}<br />
<br />
=== NACK ===<br />
{| class="wikitable"<br />
! style="font-weight: bold;" | Packet ID<br />
! colspan="3" style="font-weight: bold;" | Field Name<br />
! style="font-weight: bold;" | Field Type<br />
! style="font-weight: bold;" | Notes<br />
|-<br />
| 0xa0<br />
| colspan="3" | Record count<br />
| short<br />
| <br />
|-<br />
| <br />
| rowspan="4" | Record<br />
| colspan="2" | Is Range?<br />
| byte<br />
| 0 for range, 1 for no range<br />
|-<br />
| <br />
| No Range<br />
| Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| rowspan="2" | Range<br />
| Start Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| End Index<br />
| uint24le<br />
| <br />
|}<br />
<br />
=== ACK ===<br />
{| class="wikitable"<br />
! style="font-weight: bold;" | Packet ID<br />
! colspan="3" style="font-weight: bold;" | Field Name<br />
! style="font-weight: bold;" | Field Type<br />
! style="font-weight: bold;" | Notes<br />
|-<br />
| 0xc0<br />
| colspan="3" | Record count<br />
| short<br />
| <br />
|-<br />
| <br />
| rowspan="4" | Record<br />
| colspan="2" | Is Range?<br />
| byte<br />
| 0 for range, 1 for no range<br />
|-<br />
| <br />
| No Range<br />
| Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| rowspan="2" | Range<br />
| Start Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| End Index<br />
| uint24le<br />
| <br />
|}</div>Orladoghttps://wiki.vg/index.php?title=Raknet_Protocol&diff=15822Raknet Protocol2020-06-09T10:09:53Z<p>Orladog: Fix rowspan for Incompatible protocol</p>
<hr />
<div>:: '''Remember that this page is a WIP.''' Come back later to see a more complete page.<br />
----<br />
<br />
[http://www.jenkinssoftware.com/ RakNet] is a networking library used by Minecraft Bedrock Edition. You might want to also look at the documentation for the [[Bedrock Protocol]].<br />
<br />
This is based on the old [https://wiki.vg/Pocket_Edition_Protocol_Documentation#RakNet_protocol Pocket Edition Protocol Documentation] and may be incomplete or outdated.<br />
<br />
The source code for the RakNet Library can be found [https://github.com/OculusVR/RakNet/ here].<br />
<br />
<br />
'''NOTE:'''<br />
You may want to use an existing library if one exists for your language of choice.<br />
Here is an incomplete list. Not all of these are maintained or complete. If these are outdated you may need to change the protocol version to 9 before it can work. The protocol doesn't seem to have had any significant changes since the official implementation was discontinued in 2014, so as long as you bump the protocol version older libraries are likely to still work.<br />
<br />
{| class="wikitable sortable" style="width: auto; text-align: center;"<br />
|-style="background:#eee"<br />
! Name<br />
!class="unsortable"| Description<br />
! Language<br />
! License<br />
! Active development<br />
|-<br />
! [https://github.com/NukkitX/Network NukkitX Network]<br />
| Network components used within NukkitX, but with great support for general use as well<br />
| Java<br />
| Apache License<br />
| Yes<br />
|-<br />
! [https://github.com/JRakNet/JRakNet JRakNet]<br />
| JRakNet is a networking library for Java which implements the UDP based protocol RakNet<br />
| Java<br />
| MIT<br />
| Yes<br />
|-<br />
! [https://github.com/jython234/JRakLibPlus JRakLibPlus]<br />
| A library for easy creation of RakNet servers, based on RakLib and JRakLib.<br />
| Java<br />
| LGPL<br />
| No<br />
|-<br />
! [https://github.com/pmmp/RakLib RakLib]<br />
| RakNet server implementation written in PHP. This library is very lightweight on actual implementation - it provides the bare minimum to get a Minecraft Pocket Edition server functional. It only currently provides server functionality, and does not support most RakNet features.<br />
| PHP<br />
| GPL<br />
| Yes<br />
|-<br />
! [https://www.npmjs.com/package/raknet/ raknet]<br />
| UDP network library that follows the RakNet protocol for Node.js<br />
| node.js<br />
| MIT<br />
| No<br />
|-<br />
! [https://pypi.org/project/PyRakLib/ PyRakLib]<br />
| PyRakLib is a networking library that follows the RakNet protocol for MCPE. It is ported from the PHP library RakLib. <br />
| Python<br />
| GPL<br />
| No<br />
|-<br />
! [https://github.com/facebookarchive/RakNet Raknet] (official)<br />
| The official implementation. Outdated and mostly for reference purposes. May not work with the latest Bedrock.<br />
| C++<br />
| BSD<br />
| No<br />
|}<br />
<br />
== Data types ==<br />
<br />
{| class="wikitable"<br />
|-<br />
!<br />
! Size (Bytes)<br />
! Range<br />
! Notes<br />
|-<br />
! Byte<br />
| 1<br />
| 0 to 255<br />
|<br />
|-<br />
! Long<br />
| 8<br />
| -2^63 to 2^63-1<br />
| Signed 64-bit Integer<br />
|-<br />
! Magic<br />
| 16<br />
| <code>00ffff00fefefefefdfdfdfd12345678</code><br />
| Always those hex bytes, corresponding to RakNet's default OFFLINE_MESSAGE_DATA_ID<br />
|-<br />
! short<br />
| 2<br />
| -32768 to 32767<br />
| <br />
|-<br />
! unsigned short<br />
| 2<br />
| 0 to 65535<br />
| <br />
|-<br />
! string<br />
| unsigned short + string<br />
| N/A<br />
| class="col3" | Prefixed by a short containing the length of the string in characters. It appears that only the following ASCII characters can be displayed: !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~<br />
|-<br />
! byte<br />
| 1<br />
| 0 to 255<br />
|<br />
|-<br />
! boolean <br />
| 1<br />
| 0 to 1<br />
| True is encoded as <code>0x01</code>, false as <code>0x00</code>. <br />
|-<br />
! address<br />
| 7<br />
| <br />
| 1 byte for the IP version (4 or 6), followed by (for IPv4) 4 bytes for the IP and an unsigned short for the port number<br />
|}<br />
<br />
== Handshake sequence ==<br />
<br />
# C→S: [[#Offline Connection Request 1|Offline Connection Request 1]]<br />
# S→C: [[#Offline Connection Response 1|Offline Connection Response 1]]<br />
# C→S: [[#Offline Connection Request 2|Offline Connection Request 2]]<br />
# S→C: [[#Offline Connection Response 2|Offline Connection Response 2]]<br />
<br />
This is currently incomplete<br />
<br />
== Packets ==<br />
<br />
=== Unconnected Ping ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x01, 0x02<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| MAGIC<br />
| magic<br />
| <br />
|-<br />
| Client GUID<br />
| Long<br />
| <br />
|}<br />
<br />
<code>0x02</code> is only replied to if there are open connections to the server. '''Note:''' as of 0.15.6 it seems that the game refreshes it's LAN world list every 4-5 seconds, however it seems the game will still ping in 1 second intervals.<br><br />
This packet should be responded to with unconnected Pong.<br />
<br />
=== Unconnected Pong ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x1c<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| MAGIC<br />
| magic<br />
| <br />
|-<br />
| Server ID string<br />
| string<br />
| Used for the MOTD. See below for details.<br />
|}<br />
<br />
'''Server ID string format'''<br />
<br />
For Minecraft Bedrock this is separated by semicolons and uses the following format:<br><br />
<code>Edition (MCPE or MCEE for Education Edition);MOTD line 1;Protocol Version;Version Name;Player Count;Max Player Count;Server Unique ID;MOTD line 2;Game mode;Game mode (numeric);Port (IPv4);Port (IPv6);</code><br><br />
Example:<br><br />
<code>MCPE;Dedicated Server;390;1.14.60;0;10;13253860892328930865;Bedrock level;Survival;1;19132;19133;</code><br><br />
Result:<br><br />
[[File:Server_ID_String_Example.png]]<br><br />
The Game mode and Game mode (numeric) values seem to not be used by the client.<br />
<br />
=== Connected Ping ===<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x00<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Connected Pong ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x03<br />
| Ping Time<br />
| Long<br />
| <br />
|-<br />
| Pong Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Offline Connection Request 1 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x05<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Protocol version<br />
| byte<br />
| Currently 9<br />
|-<br />
| MTU<br />
| Zero padding<br />
| The MTU sent in the response appears to be somewhere around the size of this padding + 46 (28 udp overhead, 1 packet id, 16 magic, 1 protocol version). This padding seems to be used to discover the maximum packet size the network can handle.<br />
|}<br />
<br />
The client sends these to the target server with ever decreasing MTU until the server responds. This is used to discover the MTU size for the connection. According to the official docs, "The MTU size is the maximum size of a packet RakNet will generate", and "if you set the MTU size larger than your or any router along the network path takes, then the network will split the packet at best, or drop it at worst", so this process of sending decreasingly padded packets (compensating for the size of the packet itself and UDP overhead, which together make 48 bytes) seem to be used to discover the maximum packet size the network can handle. See the [http://www.jenkinssoftware.com/raknet/manual/programmingtips.html official documentation page] for more info about the MTU size. If the RakNet protocol does not match your own, respond with the Incompatible protocol packet.<br><br><br />
You should always respond to the first of these packets that you receive with Offline Connection Response 1, containing an MTU size of the amount of padding you received in bytes plus 46.<br />
<br />
=== Offline Connection Response 1 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x06<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| Use security<br />
| boolean<br />
| Make sure this is false, it is vital for the login sequence to continue!<br />
|-<br />
| MTU<br />
| short<br />
| see Offline Connection Request 1<br />
|}<br />
<br />
=== Offline Connection Request 2 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x07<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server Address<br />
| address<br />
| <br />
|-<br />
| MTU<br />
| short<br />
| <br />
|-<br />
| Client GUID<br />
| Long<br />
| <br />
|}<br />
<br />
=== Offline Connection Response 2 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x08<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| Client Address<br />
| address<br />
| <br />
|-<br />
| MTU<br />
| short<br />
| <br />
|-<br />
| Encryption enabled?<br />
| boolean<br />
| <br />
|}<br />
<br />
=== Online Connection Request ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x09<br />
| GUID<br />
| Long<br />
| <br />
|-<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Online Connection Request Accepted ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x10<br />
| Client address<br />
| address<br />
| <br />
|-<br />
| System index<br />
| short<br />
| Unknown what this does. 0 works as a value.<br />
|-<br />
| Internal IDs<br />
| 10x address<br />
| Unknown what these do. 255.255.255.255:19132 for all of them seems to work, any other address will probably work as well.<br />
|-<br />
| Request time<br />
| Long<br />
| <br />
|-<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Incompatible protocol ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x19<br />
| Protocol<br />
| byte<br />
| <br />
|-<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
|}<br />
<br />
=== Unconnected Ping ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x01, 0x02<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| GUID<br />
| Long<br />
| <br />
|}<br />
<br />
=== Frame Set Packet ===<br />
{| class="wikitable"<br />
! Packet ID<br />
!colspan="3"| Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="11"| 0x80..0x8d<br />
|colspan="3"| Frame Set index<br />
| uint24le<br />
| <br />
|-<br />
|rowspan="10"| Frames<br />
|colspan="2"| Flags<br />
| byte<br />
| Top 3 bits are reliability type, fourth bit is 1 when the frame is fragmented and part of a compound.<br />
|-<br />
|colspan="2"| Length IN BITS<br />
| short<br />
| Length of the body in bits.<br />
|-<br />
|colspan="2"| Reliable frame index<br />
| uint24le<br />
| only if reliable<br />
|-<br />
|colspan="2"| Sequenced frame index<br />
| uint24le<br />
| only if sequenced<br />
|-<br />
|rowspan="2"| Order<br />
| Ordered frame index<br />
| uint24le<br />
|rowspan="2"| only if ordered<br />
|-<br />
| Order channel<br />
| byte<br />
|-<br />
|rowspan="3"| Fragment<br />
| Compound size<br />
| int<br />
|rowspan="3"| only if fragmented<br />
|-<br />
| Compound ID<br />
| short<br />
|-<br />
| Index<br />
| int<br />
|-<br />
| Body<br />
| ceil(length/8) bytes<br />
|}<br />
<br />
The reliability types are as follows:<br />
<br />
{| class="wikitable"<br />
! style="text-align: center; font-weight: bold;" | ID<br />
! style="font-weight: bold;" | Name<br />
! style="text-align: center; font-weight: bold;" | Reliable<br />
! style="text-align: center; font-weight: bold;" | Ordered<br />
! style="text-align: center; font-weight: bold;" | Sequenced<br />
|-<br />
| style="text-align: center;" | 0<br />
| unreliable<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 1<br />
| unreliable sequenced<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
|-<br />
| style="text-align: center;" | 2<br />
| reliable<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 3<br />
| reliable ordered<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 4<br />
| reliable sequenced<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
|-<br />
| style="text-align: center;" | 5<br />
| unreliable (+ ACK receipt)<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 6<br />
| reliable (+ ACK receipt)<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 7<br />
| reliable ordered (+ ACK receipt)<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
|}<br />
<br />
Sequenced implies ordered.<br />
<br />
=== Game Packet ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x8e<br />
| Body<br />
| bytes<br />
| Single packet of the GAME protocol.<br />
|}<br />
<br />
=== NACK ===<br />
{| class="wikitable"<br />
! style="font-weight: bold;" | Packet ID<br />
! colspan="3" style="font-weight: bold;" | Field Name<br />
! style="font-weight: bold;" | Field Type<br />
! style="font-weight: bold;" | Notes<br />
|-<br />
| 0xa0<br />
| colspan="3" | Record count<br />
| short<br />
| <br />
|-<br />
| <br />
| rowspan="4" | Record<br />
| colspan="2" | Is Range?<br />
| byte<br />
| 0 for range, 1 for no range<br />
|-<br />
| <br />
| No Range<br />
| Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| rowspan="2" | Range<br />
| Start Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| End Index<br />
| uint24le<br />
| <br />
|}<br />
<br />
=== ACK ===<br />
{| class="wikitable"<br />
! style="font-weight: bold;" | Packet ID<br />
! colspan="3" style="font-weight: bold;" | Field Name<br />
! style="font-weight: bold;" | Field Type<br />
! style="font-weight: bold;" | Notes<br />
|-<br />
| 0xc0<br />
| colspan="3" | Record count<br />
| short<br />
| <br />
|-<br />
| <br />
| rowspan="4" | Record<br />
| colspan="2" | Is Range?<br />
| byte<br />
| 0 for range, 1 for no range<br />
|-<br />
| <br />
| No Range<br />
| Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| rowspan="2" | Range<br />
| Start Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| End Index<br />
| uint24le<br />
| <br />
|}</div>Orladoghttps://wiki.vg/index.php?title=Raknet_Protocol&diff=15821Raknet Protocol2020-06-09T10:07:13Z<p>Orladog: Fix typo</p>
<hr />
<div>:: '''Remember that this page is a WIP.''' Come back later to see a more complete page.<br />
----<br />
<br />
[http://www.jenkinssoftware.com/ RakNet] is a networking library used by Minecraft Bedrock Edition. You might want to also look at the documentation for the [[Bedrock Protocol]].<br />
<br />
This is based on the old [https://wiki.vg/Pocket_Edition_Protocol_Documentation#RakNet_protocol Pocket Edition Protocol Documentation] and may be incomplete or outdated.<br />
<br />
The source code for the RakNet Library can be found [https://github.com/OculusVR/RakNet/ here].<br />
<br />
<br />
'''NOTE:'''<br />
You may want to use an existing library if one exists for your language of choice.<br />
Here is an incomplete list. Not all of these are maintained or complete. If these are outdated you may need to change the protocol version to 9 before it can work. The protocol doesn't seem to have had any significant changes since the official implementation was discontinued in 2014, so as long as you bump the protocol version older libraries are likely to still work.<br />
<br />
{| class="wikitable sortable" style="width: auto; text-align: center;"<br />
|-style="background:#eee"<br />
! Name<br />
!class="unsortable"| Description<br />
! Language<br />
! License<br />
! Active development<br />
|-<br />
! [https://github.com/NukkitX/Network NukkitX Network]<br />
| Network components used within NukkitX, but with great support for general use as well<br />
| Java<br />
| Apache License<br />
| Yes<br />
|-<br />
! [https://github.com/JRakNet/JRakNet JRakNet]<br />
| JRakNet is a networking library for Java which implements the UDP based protocol RakNet<br />
| Java<br />
| MIT<br />
| Yes<br />
|-<br />
! [https://github.com/jython234/JRakLibPlus JRakLibPlus]<br />
| A library for easy creation of RakNet servers, based on RakLib and JRakLib.<br />
| Java<br />
| LGPL<br />
| No<br />
|-<br />
! [https://github.com/pmmp/RakLib RakLib]<br />
| RakNet server implementation written in PHP. This library is very lightweight on actual implementation - it provides the bare minimum to get a Minecraft Pocket Edition server functional. It only currently provides server functionality, and does not support most RakNet features.<br />
| PHP<br />
| GPL<br />
| Yes<br />
|-<br />
! [https://www.npmjs.com/package/raknet/ raknet]<br />
| UDP network library that follows the RakNet protocol for Node.js<br />
| node.js<br />
| MIT<br />
| No<br />
|-<br />
! [https://pypi.org/project/PyRakLib/ PyRakLib]<br />
| PyRakLib is a networking library that follows the RakNet protocol for MCPE. It is ported from the PHP library RakLib. <br />
| Python<br />
| GPL<br />
| No<br />
|-<br />
! [https://github.com/facebookarchive/RakNet Raknet] (official)<br />
| The official implementation. Outdated and mostly for reference purposes. May not work with the latest Bedrock.<br />
| C++<br />
| BSD<br />
| No<br />
|}<br />
<br />
== Data types ==<br />
<br />
{| class="wikitable"<br />
|-<br />
!<br />
! Size (Bytes)<br />
! Range<br />
! Notes<br />
|-<br />
! Byte<br />
| 1<br />
| 0 to 255<br />
|<br />
|-<br />
! Long<br />
| 8<br />
| -2^63 to 2^63-1<br />
| Signed 64-bit Integer<br />
|-<br />
! Magic<br />
| 16<br />
| <code>00ffff00fefefefefdfdfdfd12345678</code><br />
| Always those hex bytes, corresponding to RakNet's default OFFLINE_MESSAGE_DATA_ID<br />
|-<br />
! short<br />
| 2<br />
| -32768 to 32767<br />
| <br />
|-<br />
! unsigned short<br />
| 2<br />
| 0 to 65535<br />
| <br />
|-<br />
! string<br />
| unsigned short + string<br />
| N/A<br />
| class="col3" | Prefixed by a short containing the length of the string in characters. It appears that only the following ASCII characters can be displayed: !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~<br />
|-<br />
! byte<br />
| 1<br />
| 0 to 255<br />
|<br />
|-<br />
! boolean <br />
| 1<br />
| 0 to 1<br />
| True is encoded as <code>0x01</code>, false as <code>0x00</code>. <br />
|-<br />
! address<br />
| 7<br />
| <br />
| 1 byte for the IP version (4 or 6), followed by (for IPv4) 4 bytes for the IP and an unsigned short for the port number<br />
|}<br />
<br />
== Handshake sequence ==<br />
<br />
# C→S: [[#Offline Connection Request 1|Offline Connection Request 1]]<br />
# S→C: [[#Offline Connection Response 1|Offline Connection Response 1]]<br />
# C→S: [[#Offline Connection Request 2|Offline Connection Request 2]]<br />
# S→C: [[#Offline Connection Response 2|Offline Connection Response 2]]<br />
<br />
This is currently incomplete<br />
<br />
== Packets ==<br />
<br />
=== Unconnected Ping ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x01, 0x02<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| MAGIC<br />
| magic<br />
| <br />
|-<br />
| Client GUID<br />
| Long<br />
| <br />
|}<br />
<br />
<code>0x02</code> is only replied to if there are open connections to the server. '''Note:''' as of 0.15.6 it seems that the game refreshes it's LAN world list every 4-5 seconds, however it seems the game will still ping in 1 second intervals.<br><br />
This packet should be responded to with unconnected Pong.<br />
<br />
=== Unconnected Pong ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x1c<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| MAGIC<br />
| magic<br />
| <br />
|-<br />
| Server ID string<br />
| string<br />
| Used for the MOTD. See below for details.<br />
|}<br />
<br />
'''Server ID string format'''<br />
<br />
For Minecraft Bedrock this is separated by semicolons and uses the following format:<br><br />
<code>Edition (MCPE or MCEE for Education Edition);MOTD line 1;Protocol Version;Version Name;Player Count;Max Player Count;Server Unique ID;MOTD line 2;Game mode;Game mode (numeric);Port (IPv4);Port (IPv6);</code><br><br />
Example:<br><br />
<code>MCPE;Dedicated Server;390;1.14.60;0;10;13253860892328930865;Bedrock level;Survival;1;19132;19133;</code><br><br />
Result:<br><br />
[[File:Server_ID_String_Example.png]]<br><br />
The Game mode and Game mode (numeric) values seem to not be used by the client.<br />
<br />
=== Connected Ping ===<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x00<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Connected Pong ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x03<br />
| Ping Time<br />
| Long<br />
| <br />
|-<br />
| Pong Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Offline Connection Request 1 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x05<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Protocol version<br />
| byte<br />
| Currently 9<br />
|-<br />
| MTU<br />
| Zero padding<br />
| The MTU sent in the response appears to be somewhere around the size of this padding + 46 (28 udp overhead, 1 packet id, 16 magic, 1 protocol version). This padding seems to be used to discover the maximum packet size the network can handle.<br />
|}<br />
<br />
The client sends these to the target server with ever decreasing MTU until the server responds. This is used to discover the MTU size for the connection. According to the official docs, "The MTU size is the maximum size of a packet RakNet will generate", and "if you set the MTU size larger than your or any router along the network path takes, then the network will split the packet at best, or drop it at worst", so this process of sending decreasingly padded packets (compensating for the size of the packet itself and UDP overhead, which together make 48 bytes) seem to be used to discover the maximum packet size the network can handle. See the [http://www.jenkinssoftware.com/raknet/manual/programmingtips.html official documentation page] for more info about the MTU size. If the RakNet protocol does not match your own, respond with the Incompatible protocol packet.<br><br><br />
You should always respond to the first of these packets that you receive with Offline Connection Response 1, containing an MTU size of the amount of padding you received in bytes plus 46.<br />
<br />
=== Offline Connection Response 1 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x06<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| Use security<br />
| boolean<br />
| Make sure this is false, it is vital for the login sequence to continue!<br />
|-<br />
| MTU<br />
| short<br />
| see Offline Connection Request 1<br />
|}<br />
<br />
=== Offline Connection Request 2 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x07<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server Address<br />
| address<br />
| <br />
|-<br />
| MTU<br />
| short<br />
| <br />
|-<br />
| Client GUID<br />
| Long<br />
| <br />
|}<br />
<br />
=== Offline Connection Response 2 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x08<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| Client Address<br />
| address<br />
| <br />
|-<br />
| MTU<br />
| short<br />
| <br />
|-<br />
| Encryption enabled?<br />
| boolean<br />
| <br />
|}<br />
<br />
=== Online Connection Request ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x09<br />
| GUID<br />
| Long<br />
| <br />
|-<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Online Connection Request Accepted ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x10<br />
| Client address<br />
| address<br />
| <br />
|-<br />
| System index<br />
| short<br />
| Unknown what this does. 0 works as a value.<br />
|-<br />
| Internal IDs<br />
| 10x address<br />
| Unknown what these do. 255.255.255.255:19132 for all of them seems to work, any other address will probably work as well.<br />
|-<br />
| Request time<br />
| Long<br />
| <br />
|-<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Incompatible protocol ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x19<br />
| Protocol<br />
| byte<br />
| <br />
|-<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
|}<br />
<br />
=== Unconnected Ping ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x01, 0x02<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| GUID<br />
| Long<br />
| <br />
|}<br />
<br />
=== Frame Set Packet ===<br />
{| class="wikitable"<br />
! Packet ID<br />
!colspan="3"| Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="11"| 0x80..0x8d<br />
|colspan="3"| Frame Set index<br />
| uint24le<br />
| <br />
|-<br />
|rowspan="10"| Frames<br />
|colspan="2"| Flags<br />
| byte<br />
| Top 3 bits are reliability type, fourth bit is 1 when the frame is fragmented and part of a compound.<br />
|-<br />
|colspan="2"| Length IN BITS<br />
| short<br />
| Length of the body in bits.<br />
|-<br />
|colspan="2"| Reliable frame index<br />
| uint24le<br />
| only if reliable<br />
|-<br />
|colspan="2"| Sequenced frame index<br />
| uint24le<br />
| only if sequenced<br />
|-<br />
|rowspan="2"| Order<br />
| Ordered frame index<br />
| uint24le<br />
|rowspan="2"| only if ordered<br />
|-<br />
| Order channel<br />
| byte<br />
|-<br />
|rowspan="3"| Fragment<br />
| Compound size<br />
| int<br />
|rowspan="3"| only if fragmented<br />
|-<br />
| Compound ID<br />
| short<br />
|-<br />
| Index<br />
| int<br />
|-<br />
| Body<br />
| ceil(length/8) bytes<br />
|}<br />
<br />
The reliability types are as follows:<br />
<br />
{| class="wikitable"<br />
! style="text-align: center; font-weight: bold;" | ID<br />
! style="font-weight: bold;" | Name<br />
! style="text-align: center; font-weight: bold;" | Reliable<br />
! style="text-align: center; font-weight: bold;" | Ordered<br />
! style="text-align: center; font-weight: bold;" | Sequenced<br />
|-<br />
| style="text-align: center;" | 0<br />
| unreliable<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 1<br />
| unreliable sequenced<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
|-<br />
| style="text-align: center;" | 2<br />
| reliable<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 3<br />
| reliable ordered<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 4<br />
| reliable sequenced<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
|-<br />
| style="text-align: center;" | 5<br />
| unreliable (+ ACK receipt)<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 6<br />
| reliable (+ ACK receipt)<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 7<br />
| reliable ordered (+ ACK receipt)<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
|}<br />
<br />
Sequenced implies ordered.<br />
<br />
=== Game Packet ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x8e<br />
| Body<br />
| bytes<br />
| Single packet of the GAME protocol.<br />
|}<br />
<br />
=== NACK ===<br />
{| class="wikitable"<br />
! style="font-weight: bold;" | Packet ID<br />
! colspan="3" style="font-weight: bold;" | Field Name<br />
! style="font-weight: bold;" | Field Type<br />
! style="font-weight: bold;" | Notes<br />
|-<br />
| 0xa0<br />
| colspan="3" | Record count<br />
| short<br />
| <br />
|-<br />
| <br />
| rowspan="4" | Record<br />
| colspan="2" | Is Range?<br />
| byte<br />
| 0 for range, 1 for no range<br />
|-<br />
| <br />
| No Range<br />
| Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| rowspan="2" | Range<br />
| Start Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| End Index<br />
| uint24le<br />
| <br />
|}<br />
<br />
=== ACK ===<br />
{| class="wikitable"<br />
! style="font-weight: bold;" | Packet ID<br />
! colspan="3" style="font-weight: bold;" | Field Name<br />
! style="font-weight: bold;" | Field Type<br />
! style="font-weight: bold;" | Notes<br />
|-<br />
| 0xc0<br />
| colspan="3" | Record count<br />
| short<br />
| <br />
|-<br />
| <br />
| rowspan="4" | Record<br />
| colspan="2" | Is Range?<br />
| byte<br />
| 0 for range, 1 for no range<br />
|-<br />
| <br />
| No Range<br />
| Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| rowspan="2" | Range<br />
| Start Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| End Index<br />
| uint24le<br />
| <br />
|}</div>Orladoghttps://wiki.vg/index.php?title=Raknet_Protocol&diff=15820Raknet Protocol2020-06-09T10:03:17Z<p>Orladog: Change byte to boolean in Offline Connection Response 2</p>
<hr />
<div>:: '''Remember that this page is a WIP.''' Come back later to see a more complete page.<br />
----<br />
<br />
[http://www.jenkinssoftware.com/ RakNet] is a networking library used by Minecraft Bedrock Edition. You might want to also look at the documentation for the [[Bedrock Protocol]].<br />
<br />
This is based on the old [https://wiki.vg/Pocket_Edition_Protocol_Documentation#RakNet_protocol Pocket Edition Protocol Documentation] and may be incomplete or outdated.<br />
<br />
The source code for the RakNet Library can be found [https://github.com/OculusVR/RakNet/ here].<br />
<br />
<br />
'''NOTE:'''<br />
You may want to use an existing library if one exists for your language of choice.<br />
Here is an incomplete list. Not all of these are maintained or complete. If these are outdated you may need to change the protocol version to 9 before it can work. The protocol doesn't seem to have had any significant changes since the official implementation was discontinued in 2014, so as long as you bump the protocol version older libraries are likely to still work.<br />
<br />
{| class="wikitable sortable" style="width: auto; text-align: center;"<br />
|-style="background:#eee"<br />
! Name<br />
!class="unsortable"| Description<br />
! Language<br />
! License<br />
! Active development<br />
|-<br />
! [https://github.com/NukkitX/Network NukkitX Network]<br />
| Network components used within NukkitX, but with great support for general use as well<br />
| Java<br />
| Apache License<br />
| Yes<br />
|-<br />
! [https://github.com/JRakNet/JRakNet JRakNet]<br />
| JRakNet is a networking library for Java which implements the UDP based protocol RakNet<br />
| Java<br />
| MIT<br />
| Yes<br />
|-<br />
! [https://github.com/jython234/JRakLibPlus JRakLibPlus]<br />
| A library for easy creation of RakNet servers, based on RakLib and JRakLib.<br />
| Java<br />
| LGPL<br />
| No<br />
|-<br />
! [https://github.com/pmmp/RakLib RakLib]<br />
| RakNet server implementation written in PHP. This library is very lightweight on actual implementation - it provides the bare minimum to get a Minecraft Pocket Edition server functional. It only currently provides server functionality, and does not support most RakNet features.<br />
| PHP<br />
| GPL<br />
| Yes<br />
|-<br />
! [https://www.npmjs.com/package/raknet/ raknet]<br />
| UDP network library that follows the RakNet protocol for Node.js<br />
| node.js<br />
| MIT<br />
| No<br />
|-<br />
! [https://pypi.org/project/PyRakLib/ PyRakLib]<br />
| PyRakLib is a networking library that follows the RakNet protocol for MCPE. It is ported from the PHP library RakLib. <br />
| Python<br />
| GPL<br />
| No<br />
|-<br />
! [https://github.com/facebookarchive/RakNet Raknet] (official)<br />
| The official implementation. Outdated and mostly for reference purposes. May not work with the latest Bedrock.<br />
| C++<br />
| BSD<br />
| No<br />
|}<br />
<br />
== Data types ==<br />
<br />
{| class="wikitable"<br />
|-<br />
!<br />
! Size (Bytes)<br />
! Range<br />
! Notes<br />
|-<br />
! Byte<br />
| 1<br />
| 0 to 255<br />
|<br />
|-<br />
! Long<br />
| 8<br />
| -2^63 to 2^63-1<br />
| Signed 64-bit Integer<br />
|-<br />
! Magic<br />
| 16<br />
| <code>00ffff00fefefefefdfdfdfd12345678</code><br />
| Always those hex bytes, corresponding to RakNet's default OFFLINE_MESSAGE_DATA_ID<br />
|-<br />
! short<br />
| 2<br />
| -32768 to 32767<br />
| <br />
|-<br />
! unsigned short<br />
| 2<br />
| 0 to 65535<br />
| <br />
|-<br />
! string<br />
| unsigned short + string<br />
| N/A<br />
| class="col3" | Prefixed by a short containing the length of the string in characters. It appears that only the following ASCII characters can be displayed: !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~<br />
|-<br />
! byte<br />
| 1<br />
| 0 to 255<br />
|<br />
|-<br />
! boolean <br />
| 1<br />
| 0 to 1<br />
| True is encoded as <code>0x01</code>, false as <code>0x00</code>. <br />
|-<br />
! address<br />
| 7<br />
| <br />
| 1 byte for the IP version (4 or 6), followed by (for IPv4) 4 bytes for the IP and an unsigned short for the port number<br />
|}<br />
<br />
== Handshake sequence ==<br />
<br />
# C→S: [[#Offline Connection Request 1|Offline Connection Request 1]]<br />
# S→C: [[#Offline Connection Response 1|Offline Connection Response 1]]<br />
# C→S: [[#Offline Connection Request 2|Offline Connection Request 2]]<br />
# S→C: [[#Offline Connection Response 2|Offline Connection Response 2]]<br />
<br />
This is currently imcomplete<br />
<br />
== Packets ==<br />
<br />
=== Unconnected Ping ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x01, 0x02<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| MAGIC<br />
| magic<br />
| <br />
|-<br />
| Client GUID<br />
| Long<br />
| <br />
|}<br />
<br />
<code>0x02</code> is only replied to if there are open connections to the server. '''Note:''' as of 0.15.6 it seems that the game refreshes it's LAN world list every 4-5 seconds, however it seems the game will still ping in 1 second intervals.<br><br />
This packet should be responded to with unconnected Pong.<br />
<br />
=== Unconnected Pong ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x1c<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| MAGIC<br />
| magic<br />
| <br />
|-<br />
| Server ID string<br />
| string<br />
| Used for the MOTD. See below for details.<br />
|}<br />
<br />
'''Server ID string format'''<br />
<br />
For Minecraft Bedrock this is separated by semicolons and uses the following format:<br><br />
<code>Edition (MCPE or MCEE for Education Edition);MOTD line 1;Protocol Version;Version Name;Player Count;Max Player Count;Server Unique ID;MOTD line 2;Game mode;Game mode (numeric);Port (IPv4);Port (IPv6);</code><br><br />
Example:<br><br />
<code>MCPE;Dedicated Server;390;1.14.60;0;10;13253860892328930865;Bedrock level;Survival;1;19132;19133;</code><br><br />
Result:<br><br />
[[File:Server_ID_String_Example.png]]<br><br />
The Game mode and Game mode (numeric) values seem to not be used by the client.<br />
<br />
=== Connected Ping ===<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x00<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Connected Pong ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x03<br />
| Ping Time<br />
| Long<br />
| <br />
|-<br />
| Pong Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Offline Connection Request 1 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x05<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Protocol version<br />
| byte<br />
| Currently 9<br />
|-<br />
| MTU<br />
| Zero padding<br />
| The MTU sent in the response appears to be somewhere around the size of this padding + 46 (28 udp overhead, 1 packet id, 16 magic, 1 protocol version). This padding seems to be used to discover the maximum packet size the network can handle.<br />
|}<br />
<br />
The client sends these to the target server with ever decreasing MTU until the server responds. This is used to discover the MTU size for the connection. According to the official docs, "The MTU size is the maximum size of a packet RakNet will generate", and "if you set the MTU size larger than your or any router along the network path takes, then the network will split the packet at best, or drop it at worst", so this process of sending decreasingly padded packets (compensating for the size of the packet itself and UDP overhead, which together make 48 bytes) seem to be used to discover the maximum packet size the network can handle. See the [http://www.jenkinssoftware.com/raknet/manual/programmingtips.html official documentation page] for more info about the MTU size. If the RakNet protocol does not match your own, respond with the Incompatible protocol packet.<br><br><br />
You should always respond to the first of these packets that you receive with Offline Connection Response 1, containing an MTU size of the amount of padding you received in bytes plus 46.<br />
<br />
=== Offline Connection Response 1 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x06<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| Use security<br />
| boolean<br />
| Make sure this is false, it is vital for the login sequence to continue!<br />
|-<br />
| MTU<br />
| short<br />
| see Offline Connection Request 1<br />
|}<br />
<br />
=== Offline Connection Request 2 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x07<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server Address<br />
| address<br />
| <br />
|-<br />
| MTU<br />
| short<br />
| <br />
|-<br />
| Client GUID<br />
| Long<br />
| <br />
|}<br />
<br />
=== Offline Connection Response 2 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x08<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| Client Address<br />
| address<br />
| <br />
|-<br />
| MTU<br />
| short<br />
| <br />
|-<br />
| Encryption enabled?<br />
| boolean<br />
| <br />
|}<br />
<br />
=== Online Connection Request ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x09<br />
| GUID<br />
| Long<br />
| <br />
|-<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Online Connection Request Accepted ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x10<br />
| Client address<br />
| address<br />
| <br />
|-<br />
| System index<br />
| short<br />
| Unknown what this does. 0 works as a value.<br />
|-<br />
| Internal IDs<br />
| 10x address<br />
| Unknown what these do. 255.255.255.255:19132 for all of them seems to work, any other address will probably work as well.<br />
|-<br />
| Request time<br />
| Long<br />
| <br />
|-<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Incompatible protocol ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x19<br />
| Protocol<br />
| byte<br />
| <br />
|-<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
|}<br />
<br />
=== Unconnected Ping ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x01, 0x02<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| GUID<br />
| Long<br />
| <br />
|}<br />
<br />
=== Frame Set Packet ===<br />
{| class="wikitable"<br />
! Packet ID<br />
!colspan="3"| Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="11"| 0x80..0x8d<br />
|colspan="3"| Frame Set index<br />
| uint24le<br />
| <br />
|-<br />
|rowspan="10"| Frames<br />
|colspan="2"| Flags<br />
| byte<br />
| Top 3 bits are reliability type, fourth bit is 1 when the frame is fragmented and part of a compound.<br />
|-<br />
|colspan="2"| Length IN BITS<br />
| short<br />
| Length of the body in bits.<br />
|-<br />
|colspan="2"| Reliable frame index<br />
| uint24le<br />
| only if reliable<br />
|-<br />
|colspan="2"| Sequenced frame index<br />
| uint24le<br />
| only if sequenced<br />
|-<br />
|rowspan="2"| Order<br />
| Ordered frame index<br />
| uint24le<br />
|rowspan="2"| only if ordered<br />
|-<br />
| Order channel<br />
| byte<br />
|-<br />
|rowspan="3"| Fragment<br />
| Compound size<br />
| int<br />
|rowspan="3"| only if fragmented<br />
|-<br />
| Compound ID<br />
| short<br />
|-<br />
| Index<br />
| int<br />
|-<br />
| Body<br />
| ceil(length/8) bytes<br />
|}<br />
<br />
The reliability types are as follows:<br />
<br />
{| class="wikitable"<br />
! style="text-align: center; font-weight: bold;" | ID<br />
! style="font-weight: bold;" | Name<br />
! style="text-align: center; font-weight: bold;" | Reliable<br />
! style="text-align: center; font-weight: bold;" | Ordered<br />
! style="text-align: center; font-weight: bold;" | Sequenced<br />
|-<br />
| style="text-align: center;" | 0<br />
| unreliable<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 1<br />
| unreliable sequenced<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
|-<br />
| style="text-align: center;" | 2<br />
| reliable<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 3<br />
| reliable ordered<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 4<br />
| reliable sequenced<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
|-<br />
| style="text-align: center;" | 5<br />
| unreliable (+ ACK receipt)<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 6<br />
| reliable (+ ACK receipt)<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 7<br />
| reliable ordered (+ ACK receipt)<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
|}<br />
<br />
Sequenced implies ordered.<br />
<br />
=== Game Packet ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x8e<br />
| Body<br />
| bytes<br />
| Single packet of the GAME protocol.<br />
|}<br />
<br />
=== NACK ===<br />
{| class="wikitable"<br />
! style="font-weight: bold;" | Packet ID<br />
! colspan="3" style="font-weight: bold;" | Field Name<br />
! style="font-weight: bold;" | Field Type<br />
! style="font-weight: bold;" | Notes<br />
|-<br />
| 0xa0<br />
| colspan="3" | Record count<br />
| short<br />
| <br />
|-<br />
| <br />
| rowspan="4" | Record<br />
| colspan="2" | Is Range?<br />
| byte<br />
| 0 for range, 1 for no range<br />
|-<br />
| <br />
| No Range<br />
| Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| rowspan="2" | Range<br />
| Start Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| End Index<br />
| uint24le<br />
| <br />
|}<br />
<br />
=== ACK ===<br />
{| class="wikitable"<br />
! style="font-weight: bold;" | Packet ID<br />
! colspan="3" style="font-weight: bold;" | Field Name<br />
! style="font-weight: bold;" | Field Type<br />
! style="font-weight: bold;" | Notes<br />
|-<br />
| 0xc0<br />
| colspan="3" | Record count<br />
| short<br />
| <br />
|-<br />
| <br />
| rowspan="4" | Record<br />
| colspan="2" | Is Range?<br />
| byte<br />
| 0 for range, 1 for no range<br />
|-<br />
| <br />
| No Range<br />
| Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| rowspan="2" | Range<br />
| Start Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| End Index<br />
| uint24le<br />
| <br />
|}</div>Orladoghttps://wiki.vg/index.php?title=Raknet_Protocol&diff=15819Raknet Protocol2020-06-09T10:00:51Z<p>Orladog: Add address to Data types</p>
<hr />
<div>:: '''Remember that this page is a WIP.''' Come back later to see a more complete page.<br />
----<br />
<br />
[http://www.jenkinssoftware.com/ RakNet] is a networking library used by Minecraft Bedrock Edition. You might want to also look at the documentation for the [[Bedrock Protocol]].<br />
<br />
This is based on the old [https://wiki.vg/Pocket_Edition_Protocol_Documentation#RakNet_protocol Pocket Edition Protocol Documentation] and may be incomplete or outdated.<br />
<br />
The source code for the RakNet Library can be found [https://github.com/OculusVR/RakNet/ here].<br />
<br />
<br />
'''NOTE:'''<br />
You may want to use an existing library if one exists for your language of choice.<br />
Here is an incomplete list. Not all of these are maintained or complete. If these are outdated you may need to change the protocol version to 9 before it can work. The protocol doesn't seem to have had any significant changes since the official implementation was discontinued in 2014, so as long as you bump the protocol version older libraries are likely to still work.<br />
<br />
{| class="wikitable sortable" style="width: auto; text-align: center;"<br />
|-style="background:#eee"<br />
! Name<br />
!class="unsortable"| Description<br />
! Language<br />
! License<br />
! Active development<br />
|-<br />
! [https://github.com/NukkitX/Network NukkitX Network]<br />
| Network components used within NukkitX, but with great support for general use as well<br />
| Java<br />
| Apache License<br />
| Yes<br />
|-<br />
! [https://github.com/JRakNet/JRakNet JRakNet]<br />
| JRakNet is a networking library for Java which implements the UDP based protocol RakNet<br />
| Java<br />
| MIT<br />
| Yes<br />
|-<br />
! [https://github.com/jython234/JRakLibPlus JRakLibPlus]<br />
| A library for easy creation of RakNet servers, based on RakLib and JRakLib.<br />
| Java<br />
| LGPL<br />
| No<br />
|-<br />
! [https://github.com/pmmp/RakLib RakLib]<br />
| RakNet server implementation written in PHP. This library is very lightweight on actual implementation - it provides the bare minimum to get a Minecraft Pocket Edition server functional. It only currently provides server functionality, and does not support most RakNet features.<br />
| PHP<br />
| GPL<br />
| Yes<br />
|-<br />
! [https://www.npmjs.com/package/raknet/ raknet]<br />
| UDP network library that follows the RakNet protocol for Node.js<br />
| node.js<br />
| MIT<br />
| No<br />
|-<br />
! [https://pypi.org/project/PyRakLib/ PyRakLib]<br />
| PyRakLib is a networking library that follows the RakNet protocol for MCPE. It is ported from the PHP library RakLib. <br />
| Python<br />
| GPL<br />
| No<br />
|-<br />
! [https://github.com/facebookarchive/RakNet Raknet] (official)<br />
| The official implementation. Outdated and mostly for reference purposes. May not work with the latest Bedrock.<br />
| C++<br />
| BSD<br />
| No<br />
|}<br />
<br />
== Data types ==<br />
<br />
{| class="wikitable"<br />
|-<br />
!<br />
! Size (Bytes)<br />
! Range<br />
! Notes<br />
|-<br />
! Byte<br />
| 1<br />
| 0 to 255<br />
|<br />
|-<br />
! Long<br />
| 8<br />
| -2^63 to 2^63-1<br />
| Signed 64-bit Integer<br />
|-<br />
! Magic<br />
| 16<br />
| <code>00ffff00fefefefefdfdfdfd12345678</code><br />
| Always those hex bytes, corresponding to RakNet's default OFFLINE_MESSAGE_DATA_ID<br />
|-<br />
! short<br />
| 2<br />
| -32768 to 32767<br />
| <br />
|-<br />
! unsigned short<br />
| 2<br />
| 0 to 65535<br />
| <br />
|-<br />
! string<br />
| unsigned short + string<br />
| N/A<br />
| class="col3" | Prefixed by a short containing the length of the string in characters. It appears that only the following ASCII characters can be displayed: !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~<br />
|-<br />
! byte<br />
| 1<br />
| 0 to 255<br />
|<br />
|-<br />
! boolean <br />
| 1<br />
| 0 to 1<br />
| True is encoded as <code>0x01</code>, false as <code>0x00</code>. <br />
|-<br />
! address<br />
| 7<br />
| <br />
| 1 byte for the IP version (4 or 6), followed by (for IPv4) 4 bytes for the IP and an unsigned short for the port number<br />
|}<br />
<br />
== Handshake sequence ==<br />
<br />
# C→S: [[#Offline Connection Request 1|Offline Connection Request 1]]<br />
# S→C: [[#Offline Connection Response 1|Offline Connection Response 1]]<br />
# C→S: [[#Offline Connection Request 2|Offline Connection Request 2]]<br />
# S→C: [[#Offline Connection Response 2|Offline Connection Response 2]]<br />
<br />
This is currently imcomplete<br />
<br />
== Packets ==<br />
<br />
=== Unconnected Ping ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x01, 0x02<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| MAGIC<br />
| magic<br />
| <br />
|-<br />
| Client GUID<br />
| Long<br />
| <br />
|}<br />
<br />
<code>0x02</code> is only replied to if there are open connections to the server. '''Note:''' as of 0.15.6 it seems that the game refreshes it's LAN world list every 4-5 seconds, however it seems the game will still ping in 1 second intervals.<br><br />
This packet should be responded to with unconnected Pong.<br />
<br />
=== Unconnected Pong ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x1c<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| MAGIC<br />
| magic<br />
| <br />
|-<br />
| Server ID string<br />
| string<br />
| Used for the MOTD. See below for details.<br />
|}<br />
<br />
'''Server ID string format'''<br />
<br />
For Minecraft Bedrock this is separated by semicolons and uses the following format:<br><br />
<code>Edition (MCPE or MCEE for Education Edition);MOTD line 1;Protocol Version;Version Name;Player Count;Max Player Count;Server Unique ID;MOTD line 2;Game mode;Game mode (numeric);Port (IPv4);Port (IPv6);</code><br><br />
Example:<br><br />
<code>MCPE;Dedicated Server;390;1.14.60;0;10;13253860892328930865;Bedrock level;Survival;1;19132;19133;</code><br><br />
Result:<br><br />
[[File:Server_ID_String_Example.png]]<br><br />
The Game mode and Game mode (numeric) values seem to not be used by the client.<br />
<br />
=== Connected Ping ===<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x00<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Connected Pong ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x03<br />
| Ping Time<br />
| Long<br />
| <br />
|-<br />
| Pong Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Offline Connection Request 1 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x05<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Protocol version<br />
| byte<br />
| Currently 9<br />
|-<br />
| MTU<br />
| Zero padding<br />
| The MTU sent in the response appears to be somewhere around the size of this padding + 46 (28 udp overhead, 1 packet id, 16 magic, 1 protocol version). This padding seems to be used to discover the maximum packet size the network can handle.<br />
|}<br />
<br />
The client sends these to the target server with ever decreasing MTU until the server responds. This is used to discover the MTU size for the connection. According to the official docs, "The MTU size is the maximum size of a packet RakNet will generate", and "if you set the MTU size larger than your or any router along the network path takes, then the network will split the packet at best, or drop it at worst", so this process of sending decreasingly padded packets (compensating for the size of the packet itself and UDP overhead, which together make 48 bytes) seem to be used to discover the maximum packet size the network can handle. See the [http://www.jenkinssoftware.com/raknet/manual/programmingtips.html official documentation page] for more info about the MTU size. If the RakNet protocol does not match your own, respond with the Incompatible protocol packet.<br><br><br />
You should always respond to the first of these packets that you receive with Offline Connection Response 1, containing an MTU size of the amount of padding you received in bytes plus 46.<br />
<br />
=== Offline Connection Response 1 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x06<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| Use security<br />
| boolean<br />
| Make sure this is false, it is vital for the login sequence to continue!<br />
|-<br />
| MTU<br />
| short<br />
| see Offline Connection Request 1<br />
|}<br />
<br />
=== Offline Connection Request 2 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x07<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server Address<br />
| address<br />
| <br />
|-<br />
| MTU<br />
| short<br />
| <br />
|-<br />
| Client GUID<br />
| Long<br />
| <br />
|}<br />
<br />
=== Offline Connection Response 2 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x08<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| Client Address<br />
| address<br />
| <br />
|-<br />
| MTU<br />
| short<br />
| <br />
|-<br />
| Encryption enabled?<br />
| byte<br />
| 0 for disabled.<br />
|}<br />
<br />
=== Online Connection Request ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x09<br />
| GUID<br />
| Long<br />
| <br />
|-<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Online Connection Request Accepted ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x10<br />
| Client address<br />
| address<br />
| <br />
|-<br />
| System index<br />
| short<br />
| Unknown what this does. 0 works as a value.<br />
|-<br />
| Internal IDs<br />
| 10x address<br />
| Unknown what these do. 255.255.255.255:19132 for all of them seems to work, any other address will probably work as well.<br />
|-<br />
| Request time<br />
| Long<br />
| <br />
|-<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Incompatible protocol ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x19<br />
| Protocol<br />
| byte<br />
| <br />
|-<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
|}<br />
<br />
=== Unconnected Ping ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x01, 0x02<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| GUID<br />
| Long<br />
| <br />
|}<br />
<br />
=== Frame Set Packet ===<br />
{| class="wikitable"<br />
! Packet ID<br />
!colspan="3"| Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="11"| 0x80..0x8d<br />
|colspan="3"| Frame Set index<br />
| uint24le<br />
| <br />
|-<br />
|rowspan="10"| Frames<br />
|colspan="2"| Flags<br />
| byte<br />
| Top 3 bits are reliability type, fourth bit is 1 when the frame is fragmented and part of a compound.<br />
|-<br />
|colspan="2"| Length IN BITS<br />
| short<br />
| Length of the body in bits.<br />
|-<br />
|colspan="2"| Reliable frame index<br />
| uint24le<br />
| only if reliable<br />
|-<br />
|colspan="2"| Sequenced frame index<br />
| uint24le<br />
| only if sequenced<br />
|-<br />
|rowspan="2"| Order<br />
| Ordered frame index<br />
| uint24le<br />
|rowspan="2"| only if ordered<br />
|-<br />
| Order channel<br />
| byte<br />
|-<br />
|rowspan="3"| Fragment<br />
| Compound size<br />
| int<br />
|rowspan="3"| only if fragmented<br />
|-<br />
| Compound ID<br />
| short<br />
|-<br />
| Index<br />
| int<br />
|-<br />
| Body<br />
| ceil(length/8) bytes<br />
|}<br />
<br />
The reliability types are as follows:<br />
<br />
{| class="wikitable"<br />
! style="text-align: center; font-weight: bold;" | ID<br />
! style="font-weight: bold;" | Name<br />
! style="text-align: center; font-weight: bold;" | Reliable<br />
! style="text-align: center; font-weight: bold;" | Ordered<br />
! style="text-align: center; font-weight: bold;" | Sequenced<br />
|-<br />
| style="text-align: center;" | 0<br />
| unreliable<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 1<br />
| unreliable sequenced<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
|-<br />
| style="text-align: center;" | 2<br />
| reliable<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 3<br />
| reliable ordered<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 4<br />
| reliable sequenced<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
|-<br />
| style="text-align: center;" | 5<br />
| unreliable (+ ACK receipt)<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 6<br />
| reliable (+ ACK receipt)<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 7<br />
| reliable ordered (+ ACK receipt)<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
|}<br />
<br />
Sequenced implies ordered.<br />
<br />
=== Game Packet ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x8e<br />
| Body<br />
| bytes<br />
| Single packet of the GAME protocol.<br />
|}<br />
<br />
=== NACK ===<br />
{| class="wikitable"<br />
! style="font-weight: bold;" | Packet ID<br />
! colspan="3" style="font-weight: bold;" | Field Name<br />
! style="font-weight: bold;" | Field Type<br />
! style="font-weight: bold;" | Notes<br />
|-<br />
| 0xa0<br />
| colspan="3" | Record count<br />
| short<br />
| <br />
|-<br />
| <br />
| rowspan="4" | Record<br />
| colspan="2" | Is Range?<br />
| byte<br />
| 0 for range, 1 for no range<br />
|-<br />
| <br />
| No Range<br />
| Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| rowspan="2" | Range<br />
| Start Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| End Index<br />
| uint24le<br />
| <br />
|}<br />
<br />
=== ACK ===<br />
{| class="wikitable"<br />
! style="font-weight: bold;" | Packet ID<br />
! colspan="3" style="font-weight: bold;" | Field Name<br />
! style="font-weight: bold;" | Field Type<br />
! style="font-weight: bold;" | Notes<br />
|-<br />
| 0xc0<br />
| colspan="3" | Record count<br />
| short<br />
| <br />
|-<br />
| <br />
| rowspan="4" | Record<br />
| colspan="2" | Is Range?<br />
| byte<br />
| 0 for range, 1 for no range<br />
|-<br />
| <br />
| No Range<br />
| Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| rowspan="2" | Range<br />
| Start Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| End Index<br />
| uint24le<br />
| <br />
|}</div>Orladoghttps://wiki.vg/index.php?title=Raknet_Protocol&diff=15818Raknet Protocol2020-06-09T09:57:30Z<p>Orladog: Add handshake sequence</p>
<hr />
<div>:: '''Remember that this page is a WIP.''' Come back later to see a more complete page.<br />
----<br />
<br />
[http://www.jenkinssoftware.com/ RakNet] is a networking library used by Minecraft Bedrock Edition. You might want to also look at the documentation for the [[Bedrock Protocol]].<br />
<br />
This is based on the old [https://wiki.vg/Pocket_Edition_Protocol_Documentation#RakNet_protocol Pocket Edition Protocol Documentation] and may be incomplete or outdated.<br />
<br />
The source code for the RakNet Library can be found [https://github.com/OculusVR/RakNet/ here].<br />
<br />
<br />
'''NOTE:'''<br />
You may want to use an existing library if one exists for your language of choice.<br />
Here is an incomplete list. Not all of these are maintained or complete. If these are outdated you may need to change the protocol version to 9 before it can work. The protocol doesn't seem to have had any significant changes since the official implementation was discontinued in 2014, so as long as you bump the protocol version older libraries are likely to still work.<br />
<br />
{| class="wikitable sortable" style="width: auto; text-align: center;"<br />
|-style="background:#eee"<br />
! Name<br />
!class="unsortable"| Description<br />
! Language<br />
! License<br />
! Active development<br />
|-<br />
! [https://github.com/NukkitX/Network NukkitX Network]<br />
| Network components used within NukkitX, but with great support for general use as well<br />
| Java<br />
| Apache License<br />
| Yes<br />
|-<br />
! [https://github.com/JRakNet/JRakNet JRakNet]<br />
| JRakNet is a networking library for Java which implements the UDP based protocol RakNet<br />
| Java<br />
| MIT<br />
| Yes<br />
|-<br />
! [https://github.com/jython234/JRakLibPlus JRakLibPlus]<br />
| A library for easy creation of RakNet servers, based on RakLib and JRakLib.<br />
| Java<br />
| LGPL<br />
| No<br />
|-<br />
! [https://github.com/pmmp/RakLib RakLib]<br />
| RakNet server implementation written in PHP. This library is very lightweight on actual implementation - it provides the bare minimum to get a Minecraft Pocket Edition server functional. It only currently provides server functionality, and does not support most RakNet features.<br />
| PHP<br />
| GPL<br />
| Yes<br />
|-<br />
! [https://www.npmjs.com/package/raknet/ raknet]<br />
| UDP network library that follows the RakNet protocol for Node.js<br />
| node.js<br />
| MIT<br />
| No<br />
|-<br />
! [https://pypi.org/project/PyRakLib/ PyRakLib]<br />
| PyRakLib is a networking library that follows the RakNet protocol for MCPE. It is ported from the PHP library RakLib. <br />
| Python<br />
| GPL<br />
| No<br />
|-<br />
! [https://github.com/facebookarchive/RakNet Raknet] (official)<br />
| The official implementation. Outdated and mostly for reference purposes. May not work with the latest Bedrock.<br />
| C++<br />
| BSD<br />
| No<br />
|}<br />
<br />
== Data types ==<br />
<br />
{| class="wikitable"<br />
|-<br />
!<br />
! Size (Bytes)<br />
! Range<br />
! Notes<br />
|-<br />
! Byte<br />
| 1<br />
| 0 to 255<br />
|<br />
|-<br />
! Long<br />
| 8<br />
| -2^63 to 2^63-1<br />
| Signed 64-bit Integer<br />
|-<br />
! Magic<br />
| 16<br />
| <code>00ffff00fefefefefdfdfdfd12345678</code><br />
| Always those hex bytes, corresponding to RakNet's default OFFLINE_MESSAGE_DATA_ID<br />
|-<br />
! short<br />
| 2<br />
| -32768 to 32767<br />
| <br />
|-<br />
! unsigned short<br />
| 2<br />
| 0 to 65535<br />
| <br />
|-<br />
! string<br />
| unsigned short + string<br />
| N/A<br />
| class="col3" | Prefixed by a short containing the length of the string in characters. It appears that only the following ASCII characters can be displayed: !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~<br />
|-<br />
! byte<br />
| 1<br />
| 0 to 255<br />
|<br />
|-<br />
! boolean <br />
| 1<br />
| 0 to 1<br />
| True is encoded as <code>0x01</code>, false as <code>0x00</code>. <br />
|}<br />
<br />
== Handshake sequence ==<br />
<br />
# C→S: [[#Offline Connection Request 1|Offline Connection Request 1]]<br />
# S→C: [[#Offline Connection Response 1|Offline Connection Response 1]]<br />
# C→S: [[#Offline Connection Request 2|Offline Connection Request 2]]<br />
# S→C: [[#Offline Connection Response 2|Offline Connection Response 2]]<br />
<br />
This is currently imcomplete<br />
<br />
== Packets ==<br />
<br />
=== Unconnected Ping ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x01, 0x02<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| MAGIC<br />
| magic<br />
| <br />
|-<br />
| Client GUID<br />
| Long<br />
| <br />
|}<br />
<br />
<code>0x02</code> is only replied to if there are open connections to the server. '''Note:''' as of 0.15.6 it seems that the game refreshes it's LAN world list every 4-5 seconds, however it seems the game will still ping in 1 second intervals.<br><br />
This packet should be responded to with unconnected Pong.<br />
<br />
=== Unconnected Pong ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x1c<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| MAGIC<br />
| magic<br />
| <br />
|-<br />
| Server ID string<br />
| string<br />
| Used for the MOTD. See below for details.<br />
|}<br />
<br />
'''Server ID string format'''<br />
<br />
For Minecraft Bedrock this is separated by semicolons and uses the following format:<br><br />
<code>Edition (MCPE or MCEE for Education Edition);MOTD line 1;Protocol Version;Version Name;Player Count;Max Player Count;Server Unique ID;MOTD line 2;Game mode;Game mode (numeric);Port (IPv4);Port (IPv6);</code><br><br />
Example:<br><br />
<code>MCPE;Dedicated Server;390;1.14.60;0;10;13253860892328930865;Bedrock level;Survival;1;19132;19133;</code><br><br />
Result:<br><br />
[[File:Server_ID_String_Example.png]]<br><br />
The Game mode and Game mode (numeric) values seem to not be used by the client.<br />
<br />
=== Connected Ping ===<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x00<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Connected Pong ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x03<br />
| Ping Time<br />
| Long<br />
| <br />
|-<br />
| Pong Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Offline Connection Request 1 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x05<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Protocol version<br />
| byte<br />
| Currently 9<br />
|-<br />
| MTU<br />
| Zero padding<br />
| The MTU sent in the response appears to be somewhere around the size of this padding + 46 (28 udp overhead, 1 packet id, 16 magic, 1 protocol version). This padding seems to be used to discover the maximum packet size the network can handle.<br />
|}<br />
<br />
The client sends these to the target server with ever decreasing MTU until the server responds. This is used to discover the MTU size for the connection. According to the official docs, "The MTU size is the maximum size of a packet RakNet will generate", and "if you set the MTU size larger than your or any router along the network path takes, then the network will split the packet at best, or drop it at worst", so this process of sending decreasingly padded packets (compensating for the size of the packet itself and UDP overhead, which together make 48 bytes) seem to be used to discover the maximum packet size the network can handle. See the [http://www.jenkinssoftware.com/raknet/manual/programmingtips.html official documentation page] for more info about the MTU size. If the RakNet protocol does not match your own, respond with the Incompatible protocol packet.<br><br><br />
You should always respond to the first of these packets that you receive with Offline Connection Response 1, containing an MTU size of the amount of padding you received in bytes plus 46.<br />
<br />
=== Offline Connection Response 1 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x06<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| Use security<br />
| boolean<br />
| Make sure this is false, it is vital for the login sequence to continue!<br />
|-<br />
| MTU<br />
| short<br />
| see Offline Connection Request 1<br />
|}<br />
<br />
=== Offline Connection Request 2 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x07<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server Address<br />
| address<br />
| <br />
|-<br />
| MTU<br />
| short<br />
| <br />
|-<br />
| Client GUID<br />
| Long<br />
| <br />
|}<br />
<br />
=== Offline Connection Response 2 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x08<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| Client Address<br />
| address<br />
| <br />
|-<br />
| MTU<br />
| short<br />
| <br />
|-<br />
| Encryption enabled?<br />
| byte<br />
| 0 for disabled.<br />
|}<br />
<br />
=== Online Connection Request ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x09<br />
| GUID<br />
| Long<br />
| <br />
|-<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Online Connection Request Accepted ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x10<br />
| Client address<br />
| address<br />
| <br />
|-<br />
| System index<br />
| short<br />
| Unknown what this does. 0 works as a value.<br />
|-<br />
| Internal IDs<br />
| 10x address<br />
| Unknown what these do. 255.255.255.255:19132 for all of them seems to work, any other address will probably work as well.<br />
|-<br />
| Request time<br />
| Long<br />
| <br />
|-<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Incompatible protocol ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x19<br />
| Protocol<br />
| byte<br />
| <br />
|-<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
|}<br />
<br />
=== Unconnected Ping ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x01, 0x02<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| GUID<br />
| Long<br />
| <br />
|}<br />
<br />
=== Frame Set Packet ===<br />
{| class="wikitable"<br />
! Packet ID<br />
!colspan="3"| Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="11"| 0x80..0x8d<br />
|colspan="3"| Frame Set index<br />
| uint24le<br />
| <br />
|-<br />
|rowspan="10"| Frames<br />
|colspan="2"| Flags<br />
| byte<br />
| Top 3 bits are reliability type, fourth bit is 1 when the frame is fragmented and part of a compound.<br />
|-<br />
|colspan="2"| Length IN BITS<br />
| short<br />
| Length of the body in bits.<br />
|-<br />
|colspan="2"| Reliable frame index<br />
| uint24le<br />
| only if reliable<br />
|-<br />
|colspan="2"| Sequenced frame index<br />
| uint24le<br />
| only if sequenced<br />
|-<br />
|rowspan="2"| Order<br />
| Ordered frame index<br />
| uint24le<br />
|rowspan="2"| only if ordered<br />
|-<br />
| Order channel<br />
| byte<br />
|-<br />
|rowspan="3"| Fragment<br />
| Compound size<br />
| int<br />
|rowspan="3"| only if fragmented<br />
|-<br />
| Compound ID<br />
| short<br />
|-<br />
| Index<br />
| int<br />
|-<br />
| Body<br />
| ceil(length/8) bytes<br />
|}<br />
<br />
The reliability types are as follows:<br />
<br />
{| class="wikitable"<br />
! style="text-align: center; font-weight: bold;" | ID<br />
! style="font-weight: bold;" | Name<br />
! style="text-align: center; font-weight: bold;" | Reliable<br />
! style="text-align: center; font-weight: bold;" | Ordered<br />
! style="text-align: center; font-weight: bold;" | Sequenced<br />
|-<br />
| style="text-align: center;" | 0<br />
| unreliable<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 1<br />
| unreliable sequenced<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
|-<br />
| style="text-align: center;" | 2<br />
| reliable<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 3<br />
| reliable ordered<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 4<br />
| reliable sequenced<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
|-<br />
| style="text-align: center;" | 5<br />
| unreliable (+ ACK receipt)<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 6<br />
| reliable (+ ACK receipt)<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 7<br />
| reliable ordered (+ ACK receipt)<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
|}<br />
<br />
Sequenced implies ordered.<br />
<br />
=== Game Packet ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x8e<br />
| Body<br />
| bytes<br />
| Single packet of the GAME protocol.<br />
|}<br />
<br />
=== NACK ===<br />
{| class="wikitable"<br />
! style="font-weight: bold;" | Packet ID<br />
! colspan="3" style="font-weight: bold;" | Field Name<br />
! style="font-weight: bold;" | Field Type<br />
! style="font-weight: bold;" | Notes<br />
|-<br />
| 0xa0<br />
| colspan="3" | Record count<br />
| short<br />
| <br />
|-<br />
| <br />
| rowspan="4" | Record<br />
| colspan="2" | Is Range?<br />
| byte<br />
| 0 for range, 1 for no range<br />
|-<br />
| <br />
| No Range<br />
| Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| rowspan="2" | Range<br />
| Start Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| End Index<br />
| uint24le<br />
| <br />
|}<br />
<br />
=== ACK ===<br />
{| class="wikitable"<br />
! style="font-weight: bold;" | Packet ID<br />
! colspan="3" style="font-weight: bold;" | Field Name<br />
! style="font-weight: bold;" | Field Type<br />
! style="font-weight: bold;" | Notes<br />
|-<br />
| 0xc0<br />
| colspan="3" | Record count<br />
| short<br />
| <br />
|-<br />
| <br />
| rowspan="4" | Record<br />
| colspan="2" | Is Range?<br />
| byte<br />
| 0 for range, 1 for no range<br />
|-<br />
| <br />
| No Range<br />
| Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| rowspan="2" | Range<br />
| Start Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| End Index<br />
| uint24le<br />
| <br />
|}</div>Orladoghttps://wiki.vg/index.php?title=Raknet_Protocol&diff=15817Raknet Protocol2020-06-09T09:52:07Z<p>Orladog: Add boolean data type</p>
<hr />
<div>:: '''Remember that this page is a WIP.''' Come back later to see a more complete page.<br />
----<br />
<br />
[http://www.jenkinssoftware.com/ RakNet] is a networking library used by Minecraft Bedrock Edition. You might want to also look at the documentation for the [[Bedrock Protocol]].<br />
<br />
This is based on the old [https://wiki.vg/Pocket_Edition_Protocol_Documentation#RakNet_protocol Pocket Edition Protocol Documentation] and may be incomplete or outdated.<br />
<br />
The source code for the RakNet Library can be found [https://github.com/OculusVR/RakNet/ here].<br />
<br />
<br />
'''NOTE:'''<br />
You may want to use an existing library if one exists for your language of choice.<br />
Here is an incomplete list. Not all of these are maintained or complete. If these are outdated you may need to change the protocol version to 9 before it can work. The protocol doesn't seem to have had any significant changes since the official implementation was discontinued in 2014, so as long as you bump the protocol version older libraries are likely to still work.<br />
<br />
{| class="wikitable sortable" style="width: auto; text-align: center;"<br />
|-style="background:#eee"<br />
! Name<br />
!class="unsortable"| Description<br />
! Language<br />
! License<br />
! Active development<br />
|-<br />
! [https://github.com/NukkitX/Network NukkitX Network]<br />
| Network components used within NukkitX, but with great support for general use as well<br />
| Java<br />
| Apache License<br />
| Yes<br />
|-<br />
! [https://github.com/JRakNet/JRakNet JRakNet]<br />
| JRakNet is a networking library for Java which implements the UDP based protocol RakNet<br />
| Java<br />
| MIT<br />
| Yes<br />
|-<br />
! [https://github.com/jython234/JRakLibPlus JRakLibPlus]<br />
| A library for easy creation of RakNet servers, based on RakLib and JRakLib.<br />
| Java<br />
| LGPL<br />
| No<br />
|-<br />
! [https://github.com/pmmp/RakLib RakLib]<br />
| RakNet server implementation written in PHP. This library is very lightweight on actual implementation - it provides the bare minimum to get a Minecraft Pocket Edition server functional. It only currently provides server functionality, and does not support most RakNet features.<br />
| PHP<br />
| GPL<br />
| Yes<br />
|-<br />
! [https://www.npmjs.com/package/raknet/ raknet]<br />
| UDP network library that follows the RakNet protocol for Node.js<br />
| node.js<br />
| MIT<br />
| No<br />
|-<br />
! [https://pypi.org/project/PyRakLib/ PyRakLib]<br />
| PyRakLib is a networking library that follows the RakNet protocol for MCPE. It is ported from the PHP library RakLib. <br />
| Python<br />
| GPL<br />
| No<br />
|-<br />
! [https://github.com/facebookarchive/RakNet Raknet] (official)<br />
| The official implementation. Outdated and mostly for reference purposes. May not work with the latest Bedrock.<br />
| C++<br />
| BSD<br />
| No<br />
|}<br />
<br />
== Data types ==<br />
<br />
{| class="wikitable"<br />
|-<br />
!<br />
! Size (Bytes)<br />
! Range<br />
! Notes<br />
|-<br />
! Byte<br />
| 1<br />
| 0 to 255<br />
|<br />
|-<br />
! Long<br />
| 8<br />
| -2^63 to 2^63-1<br />
| Signed 64-bit Integer<br />
|-<br />
! Magic<br />
| 16<br />
| <code>00ffff00fefefefefdfdfdfd12345678</code><br />
| Always those hex bytes, corresponding to RakNet's default OFFLINE_MESSAGE_DATA_ID<br />
|-<br />
! short<br />
| 2<br />
| -32768 to 32767<br />
| <br />
|-<br />
! unsigned short<br />
| 2<br />
| 0 to 65535<br />
| <br />
|-<br />
! string<br />
| unsigned short + string<br />
| N/A<br />
| class="col3" | Prefixed by a short containing the length of the string in characters. It appears that only the following ASCII characters can be displayed: !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~<br />
|-<br />
! byte<br />
| 1<br />
| 0 to 255<br />
|<br />
|-<br />
! boolean <br />
| 1<br />
| 0 to 1<br />
| True is encoded as <code>0x01</code>, false as <code>0x00</code>. <br />
|}<br />
<br />
== Packets ==<br />
<br />
=== Unconnected Ping ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x01, 0x02<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| MAGIC<br />
| magic<br />
| <br />
|-<br />
| Client GUID<br />
| Long<br />
| <br />
|}<br />
<br />
<code>0x02</code> is only replied to if there are open connections to the server. '''Note:''' as of 0.15.6 it seems that the game refreshes it's LAN world list every 4-5 seconds, however it seems the game will still ping in 1 second intervals.<br><br />
This packet should be responded to with unconnected Pong.<br />
<br />
=== Unconnected Pong ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x1c<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| MAGIC<br />
| magic<br />
| <br />
|-<br />
| Server ID string<br />
| string<br />
| Used for the MOTD. See below for details.<br />
|}<br />
<br />
'''Server ID string format'''<br />
<br />
For Minecraft Bedrock this is separated by semicolons and uses the following format:<br><br />
<code>Edition (MCPE or MCEE for Education Edition);MOTD line 1;Protocol Version;Version Name;Player Count;Max Player Count;Server Unique ID;MOTD line 2;Game mode;Game mode (numeric);Port (IPv4);Port (IPv6);</code><br><br />
Example:<br><br />
<code>MCPE;Dedicated Server;390;1.14.60;0;10;13253860892328930865;Bedrock level;Survival;1;19132;19133;</code><br><br />
Result:<br><br />
[[File:Server_ID_String_Example.png]]<br><br />
The Game mode and Game mode (numeric) values seem to not be used by the client.<br />
<br />
=== Connected Ping ===<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x00<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Connected Pong ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x03<br />
| Ping Time<br />
| Long<br />
| <br />
|-<br />
| Pong Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Offline Connection Request 1 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x05<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Protocol version<br />
| byte<br />
| Currently 9<br />
|-<br />
| MTU<br />
| Zero padding<br />
| The MTU sent in the response appears to be somewhere around the size of this padding + 46 (28 udp overhead, 1 packet id, 16 magic, 1 protocol version). This padding seems to be used to discover the maximum packet size the network can handle.<br />
|}<br />
<br />
The client sends these to the target server with ever decreasing MTU until the server responds. This is used to discover the MTU size for the connection. According to the official docs, "The MTU size is the maximum size of a packet RakNet will generate", and "if you set the MTU size larger than your or any router along the network path takes, then the network will split the packet at best, or drop it at worst", so this process of sending decreasingly padded packets (compensating for the size of the packet itself and UDP overhead, which together make 48 bytes) seem to be used to discover the maximum packet size the network can handle. See the [http://www.jenkinssoftware.com/raknet/manual/programmingtips.html official documentation page] for more info about the MTU size. If the RakNet protocol does not match your own, respond with the Incompatible protocol packet.<br><br><br />
You should always respond to the first of these packets that you receive with Offline Connection Response 1, containing an MTU size of the amount of padding you received in bytes plus 46.<br />
<br />
=== Offline Connection Response 1 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x06<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| Use security<br />
| boolean<br />
| Make sure this is false, it is vital for the login sequence to continue!<br />
|-<br />
| MTU<br />
| short<br />
| see Offline Connection Request 1<br />
|}<br />
<br />
=== Offline Connection Request 2 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x07<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server Address<br />
| address<br />
| <br />
|-<br />
| MTU<br />
| short<br />
| <br />
|-<br />
| Client GUID<br />
| Long<br />
| <br />
|}<br />
<br />
=== Offline Connection Response 2 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x08<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| Client Address<br />
| address<br />
| <br />
|-<br />
| MTU<br />
| short<br />
| <br />
|-<br />
| Encryption enabled?<br />
| byte<br />
| 0 for disabled.<br />
|}<br />
<br />
=== Online Connection Request ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x09<br />
| GUID<br />
| Long<br />
| <br />
|-<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Online Connection Request Accepted ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x10<br />
| Client address<br />
| address<br />
| <br />
|-<br />
| System index<br />
| short<br />
| Unknown what this does. 0 works as a value.<br />
|-<br />
| Internal IDs<br />
| 10x address<br />
| Unknown what these do. 255.255.255.255:19132 for all of them seems to work, any other address will probably work as well.<br />
|-<br />
| Request time<br />
| Long<br />
| <br />
|-<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Incompatible protocol ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x19<br />
| Protocol<br />
| byte<br />
| <br />
|-<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
|}<br />
<br />
=== Unconnected Ping ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x01, 0x02<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| GUID<br />
| Long<br />
| <br />
|}<br />
<br />
=== Frame Set Packet ===<br />
{| class="wikitable"<br />
! Packet ID<br />
!colspan="3"| Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="11"| 0x80..0x8d<br />
|colspan="3"| Frame Set index<br />
| uint24le<br />
| <br />
|-<br />
|rowspan="10"| Frames<br />
|colspan="2"| Flags<br />
| byte<br />
| Top 3 bits are reliability type, fourth bit is 1 when the frame is fragmented and part of a compound.<br />
|-<br />
|colspan="2"| Length IN BITS<br />
| short<br />
| Length of the body in bits.<br />
|-<br />
|colspan="2"| Reliable frame index<br />
| uint24le<br />
| only if reliable<br />
|-<br />
|colspan="2"| Sequenced frame index<br />
| uint24le<br />
| only if sequenced<br />
|-<br />
|rowspan="2"| Order<br />
| Ordered frame index<br />
| uint24le<br />
|rowspan="2"| only if ordered<br />
|-<br />
| Order channel<br />
| byte<br />
|-<br />
|rowspan="3"| Fragment<br />
| Compound size<br />
| int<br />
|rowspan="3"| only if fragmented<br />
|-<br />
| Compound ID<br />
| short<br />
|-<br />
| Index<br />
| int<br />
|-<br />
| Body<br />
| ceil(length/8) bytes<br />
|}<br />
<br />
The reliability types are as follows:<br />
<br />
{| class="wikitable"<br />
! style="text-align: center; font-weight: bold;" | ID<br />
! style="font-weight: bold;" | Name<br />
! style="text-align: center; font-weight: bold;" | Reliable<br />
! style="text-align: center; font-weight: bold;" | Ordered<br />
! style="text-align: center; font-weight: bold;" | Sequenced<br />
|-<br />
| style="text-align: center;" | 0<br />
| unreliable<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 1<br />
| unreliable sequenced<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
|-<br />
| style="text-align: center;" | 2<br />
| reliable<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 3<br />
| reliable ordered<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 4<br />
| reliable sequenced<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
|-<br />
| style="text-align: center;" | 5<br />
| unreliable (+ ACK receipt)<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 6<br />
| reliable (+ ACK receipt)<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 7<br />
| reliable ordered (+ ACK receipt)<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
|}<br />
<br />
Sequenced implies ordered.<br />
<br />
=== Game Packet ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x8e<br />
| Body<br />
| bytes<br />
| Single packet of the GAME protocol.<br />
|}<br />
<br />
=== NACK ===<br />
{| class="wikitable"<br />
! style="font-weight: bold;" | Packet ID<br />
! colspan="3" style="font-weight: bold;" | Field Name<br />
! style="font-weight: bold;" | Field Type<br />
! style="font-weight: bold;" | Notes<br />
|-<br />
| 0xa0<br />
| colspan="3" | Record count<br />
| short<br />
| <br />
|-<br />
| <br />
| rowspan="4" | Record<br />
| colspan="2" | Is Range?<br />
| byte<br />
| 0 for range, 1 for no range<br />
|-<br />
| <br />
| No Range<br />
| Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| rowspan="2" | Range<br />
| Start Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| End Index<br />
| uint24le<br />
| <br />
|}<br />
<br />
=== ACK ===<br />
{| class="wikitable"<br />
! style="font-weight: bold;" | Packet ID<br />
! colspan="3" style="font-weight: bold;" | Field Name<br />
! style="font-weight: bold;" | Field Type<br />
! style="font-weight: bold;" | Notes<br />
|-<br />
| 0xc0<br />
| colspan="3" | Record count<br />
| short<br />
| <br />
|-<br />
| <br />
| rowspan="4" | Record<br />
| colspan="2" | Is Range?<br />
| byte<br />
| 0 for range, 1 for no range<br />
|-<br />
| <br />
| No Range<br />
| Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| rowspan="2" | Range<br />
| Start Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| End Index<br />
| uint24le<br />
| <br />
|}</div>Orladoghttps://wiki.vg/index.php?title=Raknet_Protocol&diff=15816Raknet Protocol2020-06-09T09:33:01Z<p>Orladog: Undo revision 15815 by Orladog (talk) - Sorry, I was looking at the wrong packet</p>
<hr />
<div>:: '''Remember that this page is a WIP.''' Come back later to see a more complete page.<br />
----<br />
<br />
[http://www.jenkinssoftware.com/ RakNet] is a networking library used by Minecraft Bedrock Edition. You might want to also look at the documentation for the [[Bedrock Protocol]].<br />
<br />
This is based on the old [https://wiki.vg/Pocket_Edition_Protocol_Documentation#RakNet_protocol Pocket Edition Protocol Documentation] and may be incomplete or outdated.<br />
<br />
The source code for the RakNet Library can be found [https://github.com/OculusVR/RakNet/ here].<br />
<br />
<br />
'''NOTE:'''<br />
You may want to use an existing library if one exists for your language of choice.<br />
Here is an incomplete list. Not all of these are maintained or complete. If these are outdated you may need to change the protocol version to 9 before it can work. The protocol doesn't seem to have had any significant changes since the official implementation was discontinued in 2014, so as long as you bump the protocol version older libraries are likely to still work.<br />
<br />
{| class="wikitable sortable" style="width: auto; text-align: center;"<br />
|-style="background:#eee"<br />
! Name<br />
!class="unsortable"| Description<br />
! Language<br />
! License<br />
! Active development<br />
|-<br />
! [https://github.com/NukkitX/Network NukkitX Network]<br />
| Network components used within NukkitX, but with great support for general use as well<br />
| Java<br />
| Apache License<br />
| Yes<br />
|-<br />
! [https://github.com/JRakNet/JRakNet JRakNet]<br />
| JRakNet is a networking library for Java which implements the UDP based protocol RakNet<br />
| Java<br />
| MIT<br />
| Yes<br />
|-<br />
! [https://github.com/jython234/JRakLibPlus JRakLibPlus]<br />
| A library for easy creation of RakNet servers, based on RakLib and JRakLib.<br />
| Java<br />
| LGPL<br />
| No<br />
|-<br />
! [https://github.com/pmmp/RakLib RakLib]<br />
| RakNet server implementation written in PHP. This library is very lightweight on actual implementation - it provides the bare minimum to get a Minecraft Pocket Edition server functional. It only currently provides server functionality, and does not support most RakNet features.<br />
| PHP<br />
| GPL<br />
| Yes<br />
|-<br />
! [https://www.npmjs.com/package/raknet/ raknet]<br />
| UDP network library that follows the RakNet protocol for Node.js<br />
| node.js<br />
| MIT<br />
| No<br />
|-<br />
! [https://pypi.org/project/PyRakLib/ PyRakLib]<br />
| PyRakLib is a networking library that follows the RakNet protocol for MCPE. It is ported from the PHP library RakLib. <br />
| Python<br />
| GPL<br />
| No<br />
|-<br />
! [https://github.com/facebookarchive/RakNet Raknet] (official)<br />
| The official implementation. Outdated and mostly for reference purposes. May not work with the latest Bedrock.<br />
| C++<br />
| BSD<br />
| No<br />
|}<br />
<br />
== Data types ==<br />
<br />
{| class="wikitable"<br />
|-<br />
!<br />
! Size (Bytes)<br />
! Range<br />
! Notes<br />
|-<br />
! Byte<br />
| 1<br />
| 0 to 255<br />
|<br />
|-<br />
! Long<br />
| 8<br />
| -2^63 to 2^63-1<br />
| Signed 64-bit Integer<br />
|-<br />
! Magic<br />
| 16<br />
| <code>00ffff00fefefefefdfdfdfd12345678</code><br />
| Always those hex bytes, corresponding to RakNet's default OFFLINE_MESSAGE_DATA_ID<br />
|-<br />
! short<br />
| 2<br />
| -32768 to 32767<br />
| <br />
|-<br />
! unsigned short<br />
| 2<br />
| 0 to 65535<br />
| <br />
|-<br />
! string<br />
| unsigned short + string<br />
| N/A<br />
| class="col3" | Prefixed by a short containing the length of the string in characters. It appears that only the following ASCII characters can be displayed: !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~<br />
|-<br />
! byte<br />
| 1<br />
| 0 to 255<br />
|<br />
|}<br />
<br />
== Packets ==<br />
<br />
=== Unconnected Ping ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x01, 0x02<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| MAGIC<br />
| magic<br />
| <br />
|-<br />
| Client GUID<br />
| Long<br />
| <br />
|}<br />
<br />
<code>0x02</code> is only replied to if there are open connections to the server. '''Note:''' as of 0.15.6 it seems that the game refreshes it's LAN world list every 4-5 seconds, however it seems the game will still ping in 1 second intervals.<br><br />
This packet should be responded to with unconnected Pong.<br />
<br />
=== Unconnected Pong ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x1c<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| MAGIC<br />
| magic<br />
| <br />
|-<br />
| Server ID string<br />
| string<br />
| Used for the MOTD. See below for details.<br />
|}<br />
<br />
'''Server ID string format'''<br />
<br />
For Minecraft Bedrock this is separated by semicolons and uses the following format:<br><br />
<code>Edition (MCPE or MCEE for Education Edition);MOTD line 1;Protocol Version;Version Name;Player Count;Max Player Count;Server Unique ID;MOTD line 2;Game mode;Game mode (numeric);Port (IPv4);Port (IPv6);</code><br><br />
Example:<br><br />
<code>MCPE;Dedicated Server;390;1.14.60;0;10;13253860892328930865;Bedrock level;Survival;1;19132;19133;</code><br><br />
Result:<br><br />
[[File:Server_ID_String_Example.png]]<br><br />
The Game mode and Game mode (numeric) values seem to not be used by the client.<br />
<br />
=== Connected Ping ===<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x00<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Connected Pong ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x03<br />
| Ping Time<br />
| Long<br />
| <br />
|-<br />
| Pong Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Offline Connection Request 1 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x05<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Protocol version<br />
| byte<br />
| Currently 9<br />
|-<br />
| MTU<br />
| Zero padding<br />
| The MTU sent in the response appears to be somewhere around the size of this padding + 46 (28 udp overhead, 1 packet id, 16 magic, 1 protocol version). This padding seems to be used to discover the maximum packet size the network can handle.<br />
|}<br />
<br />
The client sends these to the target server with ever decreasing MTU until the server responds. This is used to discover the MTU size for the connection. According to the official docs, "The MTU size is the maximum size of a packet RakNet will generate", and "if you set the MTU size larger than your or any router along the network path takes, then the network will split the packet at best, or drop it at worst", so this process of sending decreasingly padded packets (compensating for the size of the packet itself and UDP overhead, which together make 48 bytes) seem to be used to discover the maximum packet size the network can handle. See the [http://www.jenkinssoftware.com/raknet/manual/programmingtips.html official documentation page] for more info about the MTU size. If the RakNet protocol does not match your own, respond with the Incompatible protocol packet.<br><br><br />
You should always respond to the first of these packets that you receive with Offline Connection Response 1, containing an MTU size of the amount of padding you received in bytes plus 46.<br />
<br />
=== Offline Connection Response 1 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x06<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| Use security<br />
| boolean<br />
| Make sure this is false, it is vital for the login sequence to continue!<br />
|-<br />
| MTU<br />
| short<br />
| see Offline Connection Request 1<br />
|}<br />
<br />
=== Offline Connection Request 2 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x07<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server Address<br />
| address<br />
| <br />
|-<br />
| MTU<br />
| short<br />
| <br />
|-<br />
| Client GUID<br />
| Long<br />
| <br />
|}<br />
<br />
=== Offline Connection Response 2 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x08<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| Client Address<br />
| address<br />
| <br />
|-<br />
| MTU<br />
| short<br />
| <br />
|-<br />
| Encryption enabled?<br />
| byte<br />
| 0 for disabled.<br />
|}<br />
<br />
=== Online Connection Request ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x09<br />
| GUID<br />
| Long<br />
| <br />
|-<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Online Connection Request Accepted ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x10<br />
| Client address<br />
| address<br />
| <br />
|-<br />
| System index<br />
| short<br />
| Unknown what this does. 0 works as a value.<br />
|-<br />
| Internal IDs<br />
| 10x address<br />
| Unknown what these do. 255.255.255.255:19132 for all of them seems to work, any other address will probably work as well.<br />
|-<br />
| Request time<br />
| Long<br />
| <br />
|-<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Incompatible protocol ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x19<br />
| Protocol<br />
| byte<br />
| <br />
|-<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
|}<br />
<br />
=== Unconnected Ping ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x01, 0x02<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| GUID<br />
| Long<br />
| <br />
|}<br />
<br />
=== Frame Set Packet ===<br />
{| class="wikitable"<br />
! Packet ID<br />
!colspan="3"| Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="11"| 0x80..0x8d<br />
|colspan="3"| Frame Set index<br />
| uint24le<br />
| <br />
|-<br />
|rowspan="10"| Frames<br />
|colspan="2"| Flags<br />
| byte<br />
| Top 3 bits are reliability type, fourth bit is 1 when the frame is fragmented and part of a compound.<br />
|-<br />
|colspan="2"| Length IN BITS<br />
| short<br />
| Length of the body in bits.<br />
|-<br />
|colspan="2"| Reliable frame index<br />
| uint24le<br />
| only if reliable<br />
|-<br />
|colspan="2"| Sequenced frame index<br />
| uint24le<br />
| only if sequenced<br />
|-<br />
|rowspan="2"| Order<br />
| Ordered frame index<br />
| uint24le<br />
|rowspan="2"| only if ordered<br />
|-<br />
| Order channel<br />
| byte<br />
|-<br />
|rowspan="3"| Fragment<br />
| Compound size<br />
| int<br />
|rowspan="3"| only if fragmented<br />
|-<br />
| Compound ID<br />
| short<br />
|-<br />
| Index<br />
| int<br />
|-<br />
| Body<br />
| ceil(length/8) bytes<br />
|}<br />
<br />
The reliability types are as follows:<br />
<br />
{| class="wikitable"<br />
! style="text-align: center; font-weight: bold;" | ID<br />
! style="font-weight: bold;" | Name<br />
! style="text-align: center; font-weight: bold;" | Reliable<br />
! style="text-align: center; font-weight: bold;" | Ordered<br />
! style="text-align: center; font-weight: bold;" | Sequenced<br />
|-<br />
| style="text-align: center;" | 0<br />
| unreliable<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 1<br />
| unreliable sequenced<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
|-<br />
| style="text-align: center;" | 2<br />
| reliable<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 3<br />
| reliable ordered<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 4<br />
| reliable sequenced<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
|-<br />
| style="text-align: center;" | 5<br />
| unreliable (+ ACK receipt)<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 6<br />
| reliable (+ ACK receipt)<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 7<br />
| reliable ordered (+ ACK receipt)<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
|}<br />
<br />
Sequenced implies ordered.<br />
<br />
=== Game Packet ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x8e<br />
| Body<br />
| bytes<br />
| Single packet of the GAME protocol.<br />
|}<br />
<br />
=== NACK ===<br />
{| class="wikitable"<br />
! style="font-weight: bold;" | Packet ID<br />
! colspan="3" style="font-weight: bold;" | Field Name<br />
! style="font-weight: bold;" | Field Type<br />
! style="font-weight: bold;" | Notes<br />
|-<br />
| 0xa0<br />
| colspan="3" | Record count<br />
| short<br />
| <br />
|-<br />
| <br />
| rowspan="4" | Record<br />
| colspan="2" | Is Range?<br />
| byte<br />
| 0 for range, 1 for no range<br />
|-<br />
| <br />
| No Range<br />
| Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| rowspan="2" | Range<br />
| Start Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| End Index<br />
| uint24le<br />
| <br />
|}<br />
<br />
=== ACK ===<br />
{| class="wikitable"<br />
! style="font-weight: bold;" | Packet ID<br />
! colspan="3" style="font-weight: bold;" | Field Name<br />
! style="font-weight: bold;" | Field Type<br />
! style="font-weight: bold;" | Notes<br />
|-<br />
| 0xc0<br />
| colspan="3" | Record count<br />
| short<br />
| <br />
|-<br />
| <br />
| rowspan="4" | Record<br />
| colspan="2" | Is Range?<br />
| byte<br />
| 0 for range, 1 for no range<br />
|-<br />
| <br />
| No Range<br />
| Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| rowspan="2" | Range<br />
| Start Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| End Index<br />
| uint24le<br />
| <br />
|}</div>Orladoghttps://wiki.vg/index.php?title=Raknet_Protocol&diff=15815Raknet Protocol2020-06-09T09:32:23Z<p>Orladog: Fix field in Offline Connection Request 2</p>
<hr />
<div>:: '''Remember that this page is a WIP.''' Come back later to see a more complete page.<br />
----<br />
<br />
[http://www.jenkinssoftware.com/ RakNet] is a networking library used by Minecraft Bedrock Edition. You might want to also look at the documentation for the [[Bedrock Protocol]].<br />
<br />
This is based on the old [https://wiki.vg/Pocket_Edition_Protocol_Documentation#RakNet_protocol Pocket Edition Protocol Documentation] and may be incomplete or outdated.<br />
<br />
The source code for the RakNet Library can be found [https://github.com/OculusVR/RakNet/ here].<br />
<br />
<br />
'''NOTE:'''<br />
You may want to use an existing library if one exists for your language of choice.<br />
Here is an incomplete list. Not all of these are maintained or complete. If these are outdated you may need to change the protocol version to 9 before it can work. The protocol doesn't seem to have had any significant changes since the official implementation was discontinued in 2014, so as long as you bump the protocol version older libraries are likely to still work.<br />
<br />
{| class="wikitable sortable" style="width: auto; text-align: center;"<br />
|-style="background:#eee"<br />
! Name<br />
!class="unsortable"| Description<br />
! Language<br />
! License<br />
! Active development<br />
|-<br />
! [https://github.com/NukkitX/Network NukkitX Network]<br />
| Network components used within NukkitX, but with great support for general use as well<br />
| Java<br />
| Apache License<br />
| Yes<br />
|-<br />
! [https://github.com/JRakNet/JRakNet JRakNet]<br />
| JRakNet is a networking library for Java which implements the UDP based protocol RakNet<br />
| Java<br />
| MIT<br />
| Yes<br />
|-<br />
! [https://github.com/jython234/JRakLibPlus JRakLibPlus]<br />
| A library for easy creation of RakNet servers, based on RakLib and JRakLib.<br />
| Java<br />
| LGPL<br />
| No<br />
|-<br />
! [https://github.com/pmmp/RakLib RakLib]<br />
| RakNet server implementation written in PHP. This library is very lightweight on actual implementation - it provides the bare minimum to get a Minecraft Pocket Edition server functional. It only currently provides server functionality, and does not support most RakNet features.<br />
| PHP<br />
| GPL<br />
| Yes<br />
|-<br />
! [https://www.npmjs.com/package/raknet/ raknet]<br />
| UDP network library that follows the RakNet protocol for Node.js<br />
| node.js<br />
| MIT<br />
| No<br />
|-<br />
! [https://pypi.org/project/PyRakLib/ PyRakLib]<br />
| PyRakLib is a networking library that follows the RakNet protocol for MCPE. It is ported from the PHP library RakLib. <br />
| Python<br />
| GPL<br />
| No<br />
|-<br />
! [https://github.com/facebookarchive/RakNet Raknet] (official)<br />
| The official implementation. Outdated and mostly for reference purposes. May not work with the latest Bedrock.<br />
| C++<br />
| BSD<br />
| No<br />
|}<br />
<br />
== Data types ==<br />
<br />
{| class="wikitable"<br />
|-<br />
!<br />
! Size (Bytes)<br />
! Range<br />
! Notes<br />
|-<br />
! Byte<br />
| 1<br />
| 0 to 255<br />
|<br />
|-<br />
! Long<br />
| 8<br />
| -2^63 to 2^63-1<br />
| Signed 64-bit Integer<br />
|-<br />
! Magic<br />
| 16<br />
| <code>00ffff00fefefefefdfdfdfd12345678</code><br />
| Always those hex bytes, corresponding to RakNet's default OFFLINE_MESSAGE_DATA_ID<br />
|-<br />
! short<br />
| 2<br />
| -32768 to 32767<br />
| <br />
|-<br />
! unsigned short<br />
| 2<br />
| 0 to 65535<br />
| <br />
|-<br />
! string<br />
| unsigned short + string<br />
| N/A<br />
| class="col3" | Prefixed by a short containing the length of the string in characters. It appears that only the following ASCII characters can be displayed: !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~<br />
|-<br />
! byte<br />
| 1<br />
| 0 to 255<br />
|<br />
|}<br />
<br />
== Packets ==<br />
<br />
=== Unconnected Ping ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x01, 0x02<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| MAGIC<br />
| magic<br />
| <br />
|-<br />
| Client GUID<br />
| Long<br />
| <br />
|}<br />
<br />
<code>0x02</code> is only replied to if there are open connections to the server. '''Note:''' as of 0.15.6 it seems that the game refreshes it's LAN world list every 4-5 seconds, however it seems the game will still ping in 1 second intervals.<br><br />
This packet should be responded to with unconnected Pong.<br />
<br />
=== Unconnected Pong ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x1c<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| MAGIC<br />
| magic<br />
| <br />
|-<br />
| Server ID string<br />
| string<br />
| Used for the MOTD. See below for details.<br />
|}<br />
<br />
'''Server ID string format'''<br />
<br />
For Minecraft Bedrock this is separated by semicolons and uses the following format:<br><br />
<code>Edition (MCPE or MCEE for Education Edition);MOTD line 1;Protocol Version;Version Name;Player Count;Max Player Count;Server Unique ID;MOTD line 2;Game mode;Game mode (numeric);Port (IPv4);Port (IPv6);</code><br><br />
Example:<br><br />
<code>MCPE;Dedicated Server;390;1.14.60;0;10;13253860892328930865;Bedrock level;Survival;1;19132;19133;</code><br><br />
Result:<br><br />
[[File:Server_ID_String_Example.png]]<br><br />
The Game mode and Game mode (numeric) values seem to not be used by the client.<br />
<br />
=== Connected Ping ===<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x00<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Connected Pong ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x03<br />
| Ping Time<br />
| Long<br />
| <br />
|-<br />
| Pong Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Offline Connection Request 1 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x05<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Protocol version<br />
| byte<br />
| Currently 9<br />
|-<br />
| MTU<br />
| Zero padding<br />
| The MTU sent in the response appears to be somewhere around the size of this padding + 46 (28 udp overhead, 1 packet id, 16 magic, 1 protocol version). This padding seems to be used to discover the maximum packet size the network can handle.<br />
|}<br />
<br />
The client sends these to the target server with ever decreasing MTU until the server responds. This is used to discover the MTU size for the connection. According to the official docs, "The MTU size is the maximum size of a packet RakNet will generate", and "if you set the MTU size larger than your or any router along the network path takes, then the network will split the packet at best, or drop it at worst", so this process of sending decreasingly padded packets (compensating for the size of the packet itself and UDP overhead, which together make 48 bytes) seem to be used to discover the maximum packet size the network can handle. See the [http://www.jenkinssoftware.com/raknet/manual/programmingtips.html official documentation page] for more info about the MTU size. If the RakNet protocol does not match your own, respond with the Incompatible protocol packet.<br><br><br />
You should always respond to the first of these packets that you receive with Offline Connection Response 1, containing an MTU size of the amount of padding you received in bytes plus 46.<br />
<br />
=== Offline Connection Response 1 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x06<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| Use security<br />
| boolean<br />
| Make sure this is false, it is vital for the login sequence to continue!<br />
|-<br />
| MTU<br />
| short<br />
| see Offline Connection Request 1<br />
|}<br />
<br />
=== Offline Connection Request 2 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x07<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| MTU<br />
| short<br />
| <br />
|-<br />
| Client GUID<br />
| Long<br />
| <br />
|}<br />
<br />
=== Offline Connection Response 2 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x08<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| Client Address<br />
| address<br />
| <br />
|-<br />
| MTU<br />
| short<br />
| <br />
|-<br />
| Encryption enabled?<br />
| byte<br />
| 0 for disabled.<br />
|}<br />
<br />
=== Online Connection Request ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x09<br />
| GUID<br />
| Long<br />
| <br />
|-<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Online Connection Request Accepted ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x10<br />
| Client address<br />
| address<br />
| <br />
|-<br />
| System index<br />
| short<br />
| Unknown what this does. 0 works as a value.<br />
|-<br />
| Internal IDs<br />
| 10x address<br />
| Unknown what these do. 255.255.255.255:19132 for all of them seems to work, any other address will probably work as well.<br />
|-<br />
| Request time<br />
| Long<br />
| <br />
|-<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Incompatible protocol ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x19<br />
| Protocol<br />
| byte<br />
| <br />
|-<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
|}<br />
<br />
=== Unconnected Ping ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x01, 0x02<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| GUID<br />
| Long<br />
| <br />
|}<br />
<br />
=== Frame Set Packet ===<br />
{| class="wikitable"<br />
! Packet ID<br />
!colspan="3"| Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="11"| 0x80..0x8d<br />
|colspan="3"| Frame Set index<br />
| uint24le<br />
| <br />
|-<br />
|rowspan="10"| Frames<br />
|colspan="2"| Flags<br />
| byte<br />
| Top 3 bits are reliability type, fourth bit is 1 when the frame is fragmented and part of a compound.<br />
|-<br />
|colspan="2"| Length IN BITS<br />
| short<br />
| Length of the body in bits.<br />
|-<br />
|colspan="2"| Reliable frame index<br />
| uint24le<br />
| only if reliable<br />
|-<br />
|colspan="2"| Sequenced frame index<br />
| uint24le<br />
| only if sequenced<br />
|-<br />
|rowspan="2"| Order<br />
| Ordered frame index<br />
| uint24le<br />
|rowspan="2"| only if ordered<br />
|-<br />
| Order channel<br />
| byte<br />
|-<br />
|rowspan="3"| Fragment<br />
| Compound size<br />
| int<br />
|rowspan="3"| only if fragmented<br />
|-<br />
| Compound ID<br />
| short<br />
|-<br />
| Index<br />
| int<br />
|-<br />
| Body<br />
| ceil(length/8) bytes<br />
|}<br />
<br />
The reliability types are as follows:<br />
<br />
{| class="wikitable"<br />
! style="text-align: center; font-weight: bold;" | ID<br />
! style="font-weight: bold;" | Name<br />
! style="text-align: center; font-weight: bold;" | Reliable<br />
! style="text-align: center; font-weight: bold;" | Ordered<br />
! style="text-align: center; font-weight: bold;" | Sequenced<br />
|-<br />
| style="text-align: center;" | 0<br />
| unreliable<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 1<br />
| unreliable sequenced<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
|-<br />
| style="text-align: center;" | 2<br />
| reliable<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 3<br />
| reliable ordered<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 4<br />
| reliable sequenced<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
|-<br />
| style="text-align: center;" | 5<br />
| unreliable (+ ACK receipt)<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 6<br />
| reliable (+ ACK receipt)<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 7<br />
| reliable ordered (+ ACK receipt)<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
|}<br />
<br />
Sequenced implies ordered.<br />
<br />
=== Game Packet ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x8e<br />
| Body<br />
| bytes<br />
| Single packet of the GAME protocol.<br />
|}<br />
<br />
=== NACK ===<br />
{| class="wikitable"<br />
! style="font-weight: bold;" | Packet ID<br />
! colspan="3" style="font-weight: bold;" | Field Name<br />
! style="font-weight: bold;" | Field Type<br />
! style="font-weight: bold;" | Notes<br />
|-<br />
| 0xa0<br />
| colspan="3" | Record count<br />
| short<br />
| <br />
|-<br />
| <br />
| rowspan="4" | Record<br />
| colspan="2" | Is Range?<br />
| byte<br />
| 0 for range, 1 for no range<br />
|-<br />
| <br />
| No Range<br />
| Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| rowspan="2" | Range<br />
| Start Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| End Index<br />
| uint24le<br />
| <br />
|}<br />
<br />
=== ACK ===<br />
{| class="wikitable"<br />
! style="font-weight: bold;" | Packet ID<br />
! colspan="3" style="font-weight: bold;" | Field Name<br />
! style="font-weight: bold;" | Field Type<br />
! style="font-weight: bold;" | Notes<br />
|-<br />
| 0xc0<br />
| colspan="3" | Record count<br />
| short<br />
| <br />
|-<br />
| <br />
| rowspan="4" | Record<br />
| colspan="2" | Is Range?<br />
| byte<br />
| 0 for range, 1 for no range<br />
|-<br />
| <br />
| No Range<br />
| Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| rowspan="2" | Range<br />
| Start Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| End Index<br />
| uint24le<br />
| <br />
|}</div>Orladoghttps://wiki.vg/index.php?title=Raknet_Protocol&diff=15814Raknet Protocol2020-06-09T09:30:53Z<p>Orladog: Add info to Offline Connection Request 1</p>
<hr />
<div>:: '''Remember that this page is a WIP.''' Come back later to see a more complete page.<br />
----<br />
<br />
[http://www.jenkinssoftware.com/ RakNet] is a networking library used by Minecraft Bedrock Edition. You might want to also look at the documentation for the [[Bedrock Protocol]].<br />
<br />
This is based on the old [https://wiki.vg/Pocket_Edition_Protocol_Documentation#RakNet_protocol Pocket Edition Protocol Documentation] and may be incomplete or outdated.<br />
<br />
The source code for the RakNet Library can be found [https://github.com/OculusVR/RakNet/ here].<br />
<br />
<br />
'''NOTE:'''<br />
You may want to use an existing library if one exists for your language of choice.<br />
Here is an incomplete list. Not all of these are maintained or complete. If these are outdated you may need to change the protocol version to 9 before it can work. The protocol doesn't seem to have had any significant changes since the official implementation was discontinued in 2014, so as long as you bump the protocol version older libraries are likely to still work.<br />
<br />
{| class="wikitable sortable" style="width: auto; text-align: center;"<br />
|-style="background:#eee"<br />
! Name<br />
!class="unsortable"| Description<br />
! Language<br />
! License<br />
! Active development<br />
|-<br />
! [https://github.com/NukkitX/Network NukkitX Network]<br />
| Network components used within NukkitX, but with great support for general use as well<br />
| Java<br />
| Apache License<br />
| Yes<br />
|-<br />
! [https://github.com/JRakNet/JRakNet JRakNet]<br />
| JRakNet is a networking library for Java which implements the UDP based protocol RakNet<br />
| Java<br />
| MIT<br />
| Yes<br />
|-<br />
! [https://github.com/jython234/JRakLibPlus JRakLibPlus]<br />
| A library for easy creation of RakNet servers, based on RakLib and JRakLib.<br />
| Java<br />
| LGPL<br />
| No<br />
|-<br />
! [https://github.com/pmmp/RakLib RakLib]<br />
| RakNet server implementation written in PHP. This library is very lightweight on actual implementation - it provides the bare minimum to get a Minecraft Pocket Edition server functional. It only currently provides server functionality, and does not support most RakNet features.<br />
| PHP<br />
| GPL<br />
| Yes<br />
|-<br />
! [https://www.npmjs.com/package/raknet/ raknet]<br />
| UDP network library that follows the RakNet protocol for Node.js<br />
| node.js<br />
| MIT<br />
| No<br />
|-<br />
! [https://pypi.org/project/PyRakLib/ PyRakLib]<br />
| PyRakLib is a networking library that follows the RakNet protocol for MCPE. It is ported from the PHP library RakLib. <br />
| Python<br />
| GPL<br />
| No<br />
|-<br />
! [https://github.com/facebookarchive/RakNet Raknet] (official)<br />
| The official implementation. Outdated and mostly for reference purposes. May not work with the latest Bedrock.<br />
| C++<br />
| BSD<br />
| No<br />
|}<br />
<br />
== Data types ==<br />
<br />
{| class="wikitable"<br />
|-<br />
!<br />
! Size (Bytes)<br />
! Range<br />
! Notes<br />
|-<br />
! Byte<br />
| 1<br />
| 0 to 255<br />
|<br />
|-<br />
! Long<br />
| 8<br />
| -2^63 to 2^63-1<br />
| Signed 64-bit Integer<br />
|-<br />
! Magic<br />
| 16<br />
| <code>00ffff00fefefefefdfdfdfd12345678</code><br />
| Always those hex bytes, corresponding to RakNet's default OFFLINE_MESSAGE_DATA_ID<br />
|-<br />
! short<br />
| 2<br />
| -32768 to 32767<br />
| <br />
|-<br />
! unsigned short<br />
| 2<br />
| 0 to 65535<br />
| <br />
|-<br />
! string<br />
| unsigned short + string<br />
| N/A<br />
| class="col3" | Prefixed by a short containing the length of the string in characters. It appears that only the following ASCII characters can be displayed: !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~<br />
|-<br />
! byte<br />
| 1<br />
| 0 to 255<br />
|<br />
|}<br />
<br />
== Packets ==<br />
<br />
=== Unconnected Ping ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x01, 0x02<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| MAGIC<br />
| magic<br />
| <br />
|-<br />
| Client GUID<br />
| Long<br />
| <br />
|}<br />
<br />
<code>0x02</code> is only replied to if there are open connections to the server. '''Note:''' as of 0.15.6 it seems that the game refreshes it's LAN world list every 4-5 seconds, however it seems the game will still ping in 1 second intervals.<br><br />
This packet should be responded to with unconnected Pong.<br />
<br />
=== Unconnected Pong ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x1c<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| MAGIC<br />
| magic<br />
| <br />
|-<br />
| Server ID string<br />
| string<br />
| Used for the MOTD. See below for details.<br />
|}<br />
<br />
'''Server ID string format'''<br />
<br />
For Minecraft Bedrock this is separated by semicolons and uses the following format:<br><br />
<code>Edition (MCPE or MCEE for Education Edition);MOTD line 1;Protocol Version;Version Name;Player Count;Max Player Count;Server Unique ID;MOTD line 2;Game mode;Game mode (numeric);Port (IPv4);Port (IPv6);</code><br><br />
Example:<br><br />
<code>MCPE;Dedicated Server;390;1.14.60;0;10;13253860892328930865;Bedrock level;Survival;1;19132;19133;</code><br><br />
Result:<br><br />
[[File:Server_ID_String_Example.png]]<br><br />
The Game mode and Game mode (numeric) values seem to not be used by the client.<br />
<br />
=== Connected Ping ===<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x00<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Connected Pong ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x03<br />
| Ping Time<br />
| Long<br />
| <br />
|-<br />
| Pong Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Offline Connection Request 1 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x05<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Protocol version<br />
| byte<br />
| Currently 9<br />
|-<br />
| MTU<br />
| Zero padding<br />
| The MTU sent in the response appears to be somewhere around the size of this padding + 46 (28 udp overhead, 1 packet id, 16 magic, 1 protocol version). This padding seems to be used to discover the maximum packet size the network can handle.<br />
|}<br />
<br />
The client sends these to the target server with ever decreasing MTU until the server responds. This is used to discover the MTU size for the connection. According to the official docs, "The MTU size is the maximum size of a packet RakNet will generate", and "if you set the MTU size larger than your or any router along the network path takes, then the network will split the packet at best, or drop it at worst", so this process of sending decreasingly padded packets (compensating for the size of the packet itself and UDP overhead, which together make 48 bytes) seem to be used to discover the maximum packet size the network can handle. See the [http://www.jenkinssoftware.com/raknet/manual/programmingtips.html official documentation page] for more info about the MTU size. If the RakNet protocol does not match your own, respond with the Incompatible protocol packet.<br><br><br />
You should always respond to the first of these packets that you receive with Offline Connection Response 1, containing an MTU size of the amount of padding you received in bytes plus 46.<br />
<br />
=== Offline Connection Response 1 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x06<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| Use security<br />
| boolean<br />
| Make sure this is false, it is vital for the login sequence to continue!<br />
|-<br />
| MTU<br />
| short<br />
| see Offline Connection Request 1<br />
|}<br />
<br />
=== Offline Connection Request 2 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x07<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server Address<br />
| address<br />
| <br />
|-<br />
| MTU<br />
| short<br />
| <br />
|-<br />
| Client GUID<br />
| Long<br />
| <br />
|}<br />
<br />
=== Offline Connection Response 2 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x08<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| Client Address<br />
| address<br />
| <br />
|-<br />
| MTU<br />
| short<br />
| <br />
|-<br />
| Encryption enabled?<br />
| byte<br />
| 0 for disabled.<br />
|}<br />
<br />
=== Online Connection Request ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x09<br />
| GUID<br />
| Long<br />
| <br />
|-<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Online Connection Request Accepted ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x10<br />
| Client address<br />
| address<br />
| <br />
|-<br />
| System index<br />
| short<br />
| Unknown what this does. 0 works as a value.<br />
|-<br />
| Internal IDs<br />
| 10x address<br />
| Unknown what these do. 255.255.255.255:19132 for all of them seems to work, any other address will probably work as well.<br />
|-<br />
| Request time<br />
| Long<br />
| <br />
|-<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Incompatible protocol ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x19<br />
| Protocol<br />
| byte<br />
| <br />
|-<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
|}<br />
<br />
=== Unconnected Ping ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x01, 0x02<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| GUID<br />
| Long<br />
| <br />
|}<br />
<br />
=== Frame Set Packet ===<br />
{| class="wikitable"<br />
! Packet ID<br />
!colspan="3"| Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="11"| 0x80..0x8d<br />
|colspan="3"| Frame Set index<br />
| uint24le<br />
| <br />
|-<br />
|rowspan="10"| Frames<br />
|colspan="2"| Flags<br />
| byte<br />
| Top 3 bits are reliability type, fourth bit is 1 when the frame is fragmented and part of a compound.<br />
|-<br />
|colspan="2"| Length IN BITS<br />
| short<br />
| Length of the body in bits.<br />
|-<br />
|colspan="2"| Reliable frame index<br />
| uint24le<br />
| only if reliable<br />
|-<br />
|colspan="2"| Sequenced frame index<br />
| uint24le<br />
| only if sequenced<br />
|-<br />
|rowspan="2"| Order<br />
| Ordered frame index<br />
| uint24le<br />
|rowspan="2"| only if ordered<br />
|-<br />
| Order channel<br />
| byte<br />
|-<br />
|rowspan="3"| Fragment<br />
| Compound size<br />
| int<br />
|rowspan="3"| only if fragmented<br />
|-<br />
| Compound ID<br />
| short<br />
|-<br />
| Index<br />
| int<br />
|-<br />
| Body<br />
| ceil(length/8) bytes<br />
|}<br />
<br />
The reliability types are as follows:<br />
<br />
{| class="wikitable"<br />
! style="text-align: center; font-weight: bold;" | ID<br />
! style="font-weight: bold;" | Name<br />
! style="text-align: center; font-weight: bold;" | Reliable<br />
! style="text-align: center; font-weight: bold;" | Ordered<br />
! style="text-align: center; font-weight: bold;" | Sequenced<br />
|-<br />
| style="text-align: center;" | 0<br />
| unreliable<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 1<br />
| unreliable sequenced<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
|-<br />
| style="text-align: center;" | 2<br />
| reliable<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 3<br />
| reliable ordered<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 4<br />
| reliable sequenced<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
|-<br />
| style="text-align: center;" | 5<br />
| unreliable (+ ACK receipt)<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 6<br />
| reliable (+ ACK receipt)<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 7<br />
| reliable ordered (+ ACK receipt)<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
|}<br />
<br />
Sequenced implies ordered.<br />
<br />
=== Game Packet ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x8e<br />
| Body<br />
| bytes<br />
| Single packet of the GAME protocol.<br />
|}<br />
<br />
=== NACK ===<br />
{| class="wikitable"<br />
! style="font-weight: bold;" | Packet ID<br />
! colspan="3" style="font-weight: bold;" | Field Name<br />
! style="font-weight: bold;" | Field Type<br />
! style="font-weight: bold;" | Notes<br />
|-<br />
| 0xa0<br />
| colspan="3" | Record count<br />
| short<br />
| <br />
|-<br />
| <br />
| rowspan="4" | Record<br />
| colspan="2" | Is Range?<br />
| byte<br />
| 0 for range, 1 for no range<br />
|-<br />
| <br />
| No Range<br />
| Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| rowspan="2" | Range<br />
| Start Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| End Index<br />
| uint24le<br />
| <br />
|}<br />
<br />
=== ACK ===<br />
{| class="wikitable"<br />
! style="font-weight: bold;" | Packet ID<br />
! colspan="3" style="font-weight: bold;" | Field Name<br />
! style="font-weight: bold;" | Field Type<br />
! style="font-weight: bold;" | Notes<br />
|-<br />
| 0xc0<br />
| colspan="3" | Record count<br />
| short<br />
| <br />
|-<br />
| <br />
| rowspan="4" | Record<br />
| colspan="2" | Is Range?<br />
| byte<br />
| 0 for range, 1 for no range<br />
|-<br />
| <br />
| No Range<br />
| Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| rowspan="2" | Range<br />
| Start Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| End Index<br />
| uint24le<br />
| <br />
|}</div>Orladoghttps://wiki.vg/index.php?title=Raknet_Protocol&diff=15813Raknet Protocol2020-06-09T09:29:22Z<p>Orladog: Fix formatting for Offline Connection Response 1</p>
<hr />
<div>:: '''Remember that this page is a WIP.''' Come back later to see a more complete page.<br />
----<br />
<br />
[http://www.jenkinssoftware.com/ RakNet] is a networking library used by Minecraft Bedrock Edition. You might want to also look at the documentation for the [[Bedrock Protocol]].<br />
<br />
This is based on the old [https://wiki.vg/Pocket_Edition_Protocol_Documentation#RakNet_protocol Pocket Edition Protocol Documentation] and may be incomplete or outdated.<br />
<br />
The source code for the RakNet Library can be found [https://github.com/OculusVR/RakNet/ here].<br />
<br />
<br />
'''NOTE:'''<br />
You may want to use an existing library if one exists for your language of choice.<br />
Here is an incomplete list. Not all of these are maintained or complete. If these are outdated you may need to change the protocol version to 9 before it can work. The protocol doesn't seem to have had any significant changes since the official implementation was discontinued in 2014, so as long as you bump the protocol version older libraries are likely to still work.<br />
<br />
{| class="wikitable sortable" style="width: auto; text-align: center;"<br />
|-style="background:#eee"<br />
! Name<br />
!class="unsortable"| Description<br />
! Language<br />
! License<br />
! Active development<br />
|-<br />
! [https://github.com/NukkitX/Network NukkitX Network]<br />
| Network components used within NukkitX, but with great support for general use as well<br />
| Java<br />
| Apache License<br />
| Yes<br />
|-<br />
! [https://github.com/JRakNet/JRakNet JRakNet]<br />
| JRakNet is a networking library for Java which implements the UDP based protocol RakNet<br />
| Java<br />
| MIT<br />
| Yes<br />
|-<br />
! [https://github.com/jython234/JRakLibPlus JRakLibPlus]<br />
| A library for easy creation of RakNet servers, based on RakLib and JRakLib.<br />
| Java<br />
| LGPL<br />
| No<br />
|-<br />
! [https://github.com/pmmp/RakLib RakLib]<br />
| RakNet server implementation written in PHP. This library is very lightweight on actual implementation - it provides the bare minimum to get a Minecraft Pocket Edition server functional. It only currently provides server functionality, and does not support most RakNet features.<br />
| PHP<br />
| GPL<br />
| Yes<br />
|-<br />
! [https://www.npmjs.com/package/raknet/ raknet]<br />
| UDP network library that follows the RakNet protocol for Node.js<br />
| node.js<br />
| MIT<br />
| No<br />
|-<br />
! [https://pypi.org/project/PyRakLib/ PyRakLib]<br />
| PyRakLib is a networking library that follows the RakNet protocol for MCPE. It is ported from the PHP library RakLib. <br />
| Python<br />
| GPL<br />
| No<br />
|-<br />
! [https://github.com/facebookarchive/RakNet Raknet] (official)<br />
| The official implementation. Outdated and mostly for reference purposes. May not work with the latest Bedrock.<br />
| C++<br />
| BSD<br />
| No<br />
|}<br />
<br />
== Data types ==<br />
<br />
{| class="wikitable"<br />
|-<br />
!<br />
! Size (Bytes)<br />
! Range<br />
! Notes<br />
|-<br />
! Byte<br />
| 1<br />
| 0 to 255<br />
|<br />
|-<br />
! Long<br />
| 8<br />
| -2^63 to 2^63-1<br />
| Signed 64-bit Integer<br />
|-<br />
! Magic<br />
| 16<br />
| <code>00ffff00fefefefefdfdfdfd12345678</code><br />
| Always those hex bytes, corresponding to RakNet's default OFFLINE_MESSAGE_DATA_ID<br />
|-<br />
! short<br />
| 2<br />
| -32768 to 32767<br />
| <br />
|-<br />
! unsigned short<br />
| 2<br />
| 0 to 65535<br />
| <br />
|-<br />
! string<br />
| unsigned short + string<br />
| N/A<br />
| class="col3" | Prefixed by a short containing the length of the string in characters. It appears that only the following ASCII characters can be displayed: !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~<br />
|-<br />
! byte<br />
| 1<br />
| 0 to 255<br />
|<br />
|}<br />
<br />
== Packets ==<br />
<br />
=== Unconnected Ping ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x01, 0x02<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| MAGIC<br />
| magic<br />
| <br />
|-<br />
| Client GUID<br />
| Long<br />
| <br />
|}<br />
<br />
<code>0x02</code> is only replied to if there are open connections to the server. '''Note:''' as of 0.15.6 it seems that the game refreshes it's LAN world list every 4-5 seconds, however it seems the game will still ping in 1 second intervals.<br><br />
This packet should be responded to with unconnected Pong.<br />
<br />
=== Unconnected Pong ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x1c<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| MAGIC<br />
| magic<br />
| <br />
|-<br />
| Server ID string<br />
| string<br />
| Used for the MOTD. See below for details.<br />
|}<br />
<br />
'''Server ID string format'''<br />
<br />
For Minecraft Bedrock this is separated by semicolons and uses the following format:<br><br />
<code>Edition (MCPE or MCEE for Education Edition);MOTD line 1;Protocol Version;Version Name;Player Count;Max Player Count;Server Unique ID;MOTD line 2;Game mode;Game mode (numeric);Port (IPv4);Port (IPv6);</code><br><br />
Example:<br><br />
<code>MCPE;Dedicated Server;390;1.14.60;0;10;13253860892328930865;Bedrock level;Survival;1;19132;19133;</code><br><br />
Result:<br><br />
[[File:Server_ID_String_Example.png]]<br><br />
The Game mode and Game mode (numeric) values seem to not be used by the client.<br />
<br />
=== Connected Ping ===<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x00<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Connected Pong ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x03<br />
| Ping Time<br />
| Long<br />
| <br />
|-<br />
| Pong Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Offline Connection Request 1 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x05<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Protocol version<br />
| byte<br />
| Currently 9<br />
|-<br />
| MTU<br />
| Zero padding<br />
| The MTU sent in the response appears to be somewhere around the size of this padding + 46 (28 udp overhead, 1 packet id, 16 magic, 1 protocol version). This padding seems to be used to discover the maximum packet size the network can handle.<br />
|}<br />
<br />
The client sends these to the target server with ever decreasing MTU until the server responds. This is used to discover the MTU size for the connection. You should always respond to the first of these packets that you receive. According to the official docs, "The MTU size is the maximum size of a packet RakNet will generate", and "if you set the MTU size larger than your or any router along the network path takes, then the network will split the packet at best, or drop it at worst", so this process of sending decreasingly padded packets (compensating for the size of the packet itself and UDP overhead, which together make 48 bytes) seem to be used to discover the maximum packet size the network can handle. See the [http://www.jenkinssoftware.com/raknet/manual/programmingtips.html official documentation page] for more info about the MTU size. If the RakNet protocol does not match your own, respond with the Incompatible protocol packet.<br />
<br />
=== Offline Connection Response 1 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x06<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| Use security<br />
| boolean<br />
| Make sure this is false, it is vital for the login sequence to continue!<br />
|-<br />
| MTU<br />
| short<br />
| see Offline Connection Request 1<br />
|}<br />
<br />
=== Offline Connection Request 2 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x07<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server Address<br />
| address<br />
| <br />
|-<br />
| MTU<br />
| short<br />
| <br />
|-<br />
| Client GUID<br />
| Long<br />
| <br />
|}<br />
<br />
=== Offline Connection Response 2 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x08<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| Client Address<br />
| address<br />
| <br />
|-<br />
| MTU<br />
| short<br />
| <br />
|-<br />
| Encryption enabled?<br />
| byte<br />
| 0 for disabled.<br />
|}<br />
<br />
=== Online Connection Request ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x09<br />
| GUID<br />
| Long<br />
| <br />
|-<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Online Connection Request Accepted ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x10<br />
| Client address<br />
| address<br />
| <br />
|-<br />
| System index<br />
| short<br />
| Unknown what this does. 0 works as a value.<br />
|-<br />
| Internal IDs<br />
| 10x address<br />
| Unknown what these do. 255.255.255.255:19132 for all of them seems to work, any other address will probably work as well.<br />
|-<br />
| Request time<br />
| Long<br />
| <br />
|-<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Incompatible protocol ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x19<br />
| Protocol<br />
| byte<br />
| <br />
|-<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
|}<br />
<br />
=== Unconnected Ping ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x01, 0x02<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| GUID<br />
| Long<br />
| <br />
|}<br />
<br />
=== Frame Set Packet ===<br />
{| class="wikitable"<br />
! Packet ID<br />
!colspan="3"| Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="11"| 0x80..0x8d<br />
|colspan="3"| Frame Set index<br />
| uint24le<br />
| <br />
|-<br />
|rowspan="10"| Frames<br />
|colspan="2"| Flags<br />
| byte<br />
| Top 3 bits are reliability type, fourth bit is 1 when the frame is fragmented and part of a compound.<br />
|-<br />
|colspan="2"| Length IN BITS<br />
| short<br />
| Length of the body in bits.<br />
|-<br />
|colspan="2"| Reliable frame index<br />
| uint24le<br />
| only if reliable<br />
|-<br />
|colspan="2"| Sequenced frame index<br />
| uint24le<br />
| only if sequenced<br />
|-<br />
|rowspan="2"| Order<br />
| Ordered frame index<br />
| uint24le<br />
|rowspan="2"| only if ordered<br />
|-<br />
| Order channel<br />
| byte<br />
|-<br />
|rowspan="3"| Fragment<br />
| Compound size<br />
| int<br />
|rowspan="3"| only if fragmented<br />
|-<br />
| Compound ID<br />
| short<br />
|-<br />
| Index<br />
| int<br />
|-<br />
| Body<br />
| ceil(length/8) bytes<br />
|}<br />
<br />
The reliability types are as follows:<br />
<br />
{| class="wikitable"<br />
! style="text-align: center; font-weight: bold;" | ID<br />
! style="font-weight: bold;" | Name<br />
! style="text-align: center; font-weight: bold;" | Reliable<br />
! style="text-align: center; font-weight: bold;" | Ordered<br />
! style="text-align: center; font-weight: bold;" | Sequenced<br />
|-<br />
| style="text-align: center;" | 0<br />
| unreliable<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 1<br />
| unreliable sequenced<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
|-<br />
| style="text-align: center;" | 2<br />
| reliable<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 3<br />
| reliable ordered<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 4<br />
| reliable sequenced<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
|-<br />
| style="text-align: center;" | 5<br />
| unreliable (+ ACK receipt)<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 6<br />
| reliable (+ ACK receipt)<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 7<br />
| reliable ordered (+ ACK receipt)<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
|}<br />
<br />
Sequenced implies ordered.<br />
<br />
=== Game Packet ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x8e<br />
| Body<br />
| bytes<br />
| Single packet of the GAME protocol.<br />
|}<br />
<br />
=== NACK ===<br />
{| class="wikitable"<br />
! style="font-weight: bold;" | Packet ID<br />
! colspan="3" style="font-weight: bold;" | Field Name<br />
! style="font-weight: bold;" | Field Type<br />
! style="font-weight: bold;" | Notes<br />
|-<br />
| 0xa0<br />
| colspan="3" | Record count<br />
| short<br />
| <br />
|-<br />
| <br />
| rowspan="4" | Record<br />
| colspan="2" | Is Range?<br />
| byte<br />
| 0 for range, 1 for no range<br />
|-<br />
| <br />
| No Range<br />
| Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| rowspan="2" | Range<br />
| Start Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| End Index<br />
| uint24le<br />
| <br />
|}<br />
<br />
=== ACK ===<br />
{| class="wikitable"<br />
! style="font-weight: bold;" | Packet ID<br />
! colspan="3" style="font-weight: bold;" | Field Name<br />
! style="font-weight: bold;" | Field Type<br />
! style="font-weight: bold;" | Notes<br />
|-<br />
| 0xc0<br />
| colspan="3" | Record count<br />
| short<br />
| <br />
|-<br />
| <br />
| rowspan="4" | Record<br />
| colspan="2" | Is Range?<br />
| byte<br />
| 0 for range, 1 for no range<br />
|-<br />
| <br />
| No Range<br />
| Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| rowspan="2" | Range<br />
| Start Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| End Index<br />
| uint24le<br />
| <br />
|}</div>Orladoghttps://wiki.vg/index.php?title=Raknet_Protocol&diff=15812Raknet Protocol2020-06-09T09:23:07Z<p>Orladog: Finish a sentence</p>
<hr />
<div>:: '''Remember that this page is a WIP.''' Come back later to see a more complete page.<br />
----<br />
<br />
[http://www.jenkinssoftware.com/ RakNet] is a networking library used by Minecraft Bedrock Edition. You might want to also look at the documentation for the [[Bedrock Protocol]].<br />
<br />
This is based on the old [https://wiki.vg/Pocket_Edition_Protocol_Documentation#RakNet_protocol Pocket Edition Protocol Documentation] and may be incomplete or outdated.<br />
<br />
The source code for the RakNet Library can be found [https://github.com/OculusVR/RakNet/ here].<br />
<br />
<br />
'''NOTE:'''<br />
You may want to use an existing library if one exists for your language of choice.<br />
Here is an incomplete list. Not all of these are maintained or complete. If these are outdated you may need to change the protocol version to 9 before it can work. The protocol doesn't seem to have had any significant changes since the official implementation was discontinued in 2014, so as long as you bump the protocol version older libraries are likely to still work.<br />
<br />
{| class="wikitable sortable" style="width: auto; text-align: center;"<br />
|-style="background:#eee"<br />
! Name<br />
!class="unsortable"| Description<br />
! Language<br />
! License<br />
! Active development<br />
|-<br />
! [https://github.com/NukkitX/Network NukkitX Network]<br />
| Network components used within NukkitX, but with great support for general use as well<br />
| Java<br />
| Apache License<br />
| Yes<br />
|-<br />
! [https://github.com/JRakNet/JRakNet JRakNet]<br />
| JRakNet is a networking library for Java which implements the UDP based protocol RakNet<br />
| Java<br />
| MIT<br />
| Yes<br />
|-<br />
! [https://github.com/jython234/JRakLibPlus JRakLibPlus]<br />
| A library for easy creation of RakNet servers, based on RakLib and JRakLib.<br />
| Java<br />
| LGPL<br />
| No<br />
|-<br />
! [https://github.com/pmmp/RakLib RakLib]<br />
| RakNet server implementation written in PHP. This library is very lightweight on actual implementation - it provides the bare minimum to get a Minecraft Pocket Edition server functional. It only currently provides server functionality, and does not support most RakNet features.<br />
| PHP<br />
| GPL<br />
| Yes<br />
|-<br />
! [https://www.npmjs.com/package/raknet/ raknet]<br />
| UDP network library that follows the RakNet protocol for Node.js<br />
| node.js<br />
| MIT<br />
| No<br />
|-<br />
! [https://pypi.org/project/PyRakLib/ PyRakLib]<br />
| PyRakLib is a networking library that follows the RakNet protocol for MCPE. It is ported from the PHP library RakLib. <br />
| Python<br />
| GPL<br />
| No<br />
|-<br />
! [https://github.com/facebookarchive/RakNet Raknet] (official)<br />
| The official implementation. Outdated and mostly for reference purposes. May not work with the latest Bedrock.<br />
| C++<br />
| BSD<br />
| No<br />
|}<br />
<br />
== Data types ==<br />
<br />
{| class="wikitable"<br />
|-<br />
!<br />
! Size (Bytes)<br />
! Range<br />
! Notes<br />
|-<br />
! Byte<br />
| 1<br />
| 0 to 255<br />
|<br />
|-<br />
! Long<br />
| 8<br />
| -2^63 to 2^63-1<br />
| Signed 64-bit Integer<br />
|-<br />
! Magic<br />
| 16<br />
| <code>00ffff00fefefefefdfdfdfd12345678</code><br />
| Always those hex bytes, corresponding to RakNet's default OFFLINE_MESSAGE_DATA_ID<br />
|-<br />
! short<br />
| 2<br />
| -32768 to 32767<br />
| <br />
|-<br />
! unsigned short<br />
| 2<br />
| 0 to 65535<br />
| <br />
|-<br />
! string<br />
| unsigned short + string<br />
| N/A<br />
| class="col3" | Prefixed by a short containing the length of the string in characters. It appears that only the following ASCII characters can be displayed: !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~<br />
|-<br />
! byte<br />
| 1<br />
| 0 to 255<br />
|<br />
|}<br />
<br />
== Packets ==<br />
<br />
=== Unconnected Ping ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x01, 0x02<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| MAGIC<br />
| magic<br />
| <br />
|-<br />
| Client GUID<br />
| Long<br />
| <br />
|}<br />
<br />
<code>0x02</code> is only replied to if there are open connections to the server. '''Note:''' as of 0.15.6 it seems that the game refreshes it's LAN world list every 4-5 seconds, however it seems the game will still ping in 1 second intervals.<br><br />
This packet should be responded to with unconnected Pong.<br />
<br />
=== Unconnected Pong ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x1c<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| MAGIC<br />
| magic<br />
| <br />
|-<br />
| Server ID string<br />
| string<br />
| Used for the MOTD. See below for details.<br />
|}<br />
<br />
'''Server ID string format'''<br />
<br />
For Minecraft Bedrock this is separated by semicolons and uses the following format:<br><br />
<code>Edition (MCPE or MCEE for Education Edition);MOTD line 1;Protocol Version;Version Name;Player Count;Max Player Count;Server Unique ID;MOTD line 2;Game mode;Game mode (numeric);Port (IPv4);Port (IPv6);</code><br><br />
Example:<br><br />
<code>MCPE;Dedicated Server;390;1.14.60;0;10;13253860892328930865;Bedrock level;Survival;1;19132;19133;</code><br><br />
Result:<br><br />
[[File:Server_ID_String_Example.png]]<br><br />
The Game mode and Game mode (numeric) values seem to not be used by the client.<br />
<br />
=== Connected Ping ===<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x00<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Connected Pong ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x03<br />
| Ping Time<br />
| Long<br />
| <br />
|-<br />
| Pong Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Offline Connection Request 1 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x05<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Protocol version<br />
| byte<br />
| Currently 9<br />
|-<br />
| MTU<br />
| Zero padding<br />
| The MTU sent in the response appears to be somewhere around the size of this padding + 46 (28 udp overhead, 1 packet id, 16 magic, 1 protocol version). This padding seems to be used to discover the maximum packet size the network can handle.<br />
|}<br />
<br />
The client sends these to the target server with ever decreasing MTU until the server responds. This is used to discover the MTU size for the connection. You should always respond to the first of these packets that you receive. According to the official docs, "The MTU size is the maximum size of a packet RakNet will generate", and "if you set the MTU size larger than your or any router along the network path takes, then the network will split the packet at best, or drop it at worst", so this process of sending decreasingly padded packets (compensating for the size of the packet itself and UDP overhead, which together make 48 bytes) seem to be used to discover the maximum packet size the network can handle. See the [http://www.jenkinssoftware.com/raknet/manual/programmingtips.html official documentation page] for more info about the MTU size. If the RakNet protocol does not match your own, respond with the Incompatible protocol packet.<br />
<br />
=== Offline Connection Response 1 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x06<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| Use security<br />
| boolean<br />
| Make sure this is false, it is vital for the login sequence to continue!<br />
|<br />
|-<br />
| MTU<br />
| short<br />
| see Offline Connection Request 1<br />
|}<br />
<br />
=== Offline Connection Request 2 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x07<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server Address<br />
| address<br />
| <br />
|-<br />
| MTU<br />
| short<br />
| <br />
|-<br />
| Client GUID<br />
| Long<br />
| <br />
|}<br />
<br />
=== Offline Connection Response 2 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x08<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| Client Address<br />
| address<br />
| <br />
|-<br />
| MTU<br />
| short<br />
| <br />
|-<br />
| Encryption enabled?<br />
| byte<br />
| 0 for disabled.<br />
|}<br />
<br />
=== Online Connection Request ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x09<br />
| GUID<br />
| Long<br />
| <br />
|-<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Online Connection Request Accepted ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x10<br />
| Client address<br />
| address<br />
| <br />
|-<br />
| System index<br />
| short<br />
| Unknown what this does. 0 works as a value.<br />
|-<br />
| Internal IDs<br />
| 10x address<br />
| Unknown what these do. 255.255.255.255:19132 for all of them seems to work, any other address will probably work as well.<br />
|-<br />
| Request time<br />
| Long<br />
| <br />
|-<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Incompatible protocol ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x19<br />
| Protocol<br />
| byte<br />
| <br />
|-<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
|}<br />
<br />
=== Unconnected Ping ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x01, 0x02<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| GUID<br />
| Long<br />
| <br />
|}<br />
<br />
=== Frame Set Packet ===<br />
{| class="wikitable"<br />
! Packet ID<br />
!colspan="3"| Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="11"| 0x80..0x8d<br />
|colspan="3"| Frame Set index<br />
| uint24le<br />
| <br />
|-<br />
|rowspan="10"| Frames<br />
|colspan="2"| Flags<br />
| byte<br />
| Top 3 bits are reliability type, fourth bit is 1 when the frame is fragmented and part of a compound.<br />
|-<br />
|colspan="2"| Length IN BITS<br />
| short<br />
| Length of the body in bits.<br />
|-<br />
|colspan="2"| Reliable frame index<br />
| uint24le<br />
| only if reliable<br />
|-<br />
|colspan="2"| Sequenced frame index<br />
| uint24le<br />
| only if sequenced<br />
|-<br />
|rowspan="2"| Order<br />
| Ordered frame index<br />
| uint24le<br />
|rowspan="2"| only if ordered<br />
|-<br />
| Order channel<br />
| byte<br />
|-<br />
|rowspan="3"| Fragment<br />
| Compound size<br />
| int<br />
|rowspan="3"| only if fragmented<br />
|-<br />
| Compound ID<br />
| short<br />
|-<br />
| Index<br />
| int<br />
|-<br />
| Body<br />
| ceil(length/8) bytes<br />
|}<br />
<br />
The reliability types are as follows:<br />
<br />
{| class="wikitable"<br />
! style="text-align: center; font-weight: bold;" | ID<br />
! style="font-weight: bold;" | Name<br />
! style="text-align: center; font-weight: bold;" | Reliable<br />
! style="text-align: center; font-weight: bold;" | Ordered<br />
! style="text-align: center; font-weight: bold;" | Sequenced<br />
|-<br />
| style="text-align: center;" | 0<br />
| unreliable<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 1<br />
| unreliable sequenced<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
|-<br />
| style="text-align: center;" | 2<br />
| reliable<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 3<br />
| reliable ordered<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 4<br />
| reliable sequenced<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
|-<br />
| style="text-align: center;" | 5<br />
| unreliable (+ ACK receipt)<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 6<br />
| reliable (+ ACK receipt)<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 7<br />
| reliable ordered (+ ACK receipt)<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
|}<br />
<br />
Sequenced implies ordered.<br />
<br />
=== Game Packet ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x8e<br />
| Body<br />
| bytes<br />
| Single packet of the GAME protocol.<br />
|}<br />
<br />
=== NACK ===<br />
{| class="wikitable"<br />
! style="font-weight: bold;" | Packet ID<br />
! colspan="3" style="font-weight: bold;" | Field Name<br />
! style="font-weight: bold;" | Field Type<br />
! style="font-weight: bold;" | Notes<br />
|-<br />
| 0xa0<br />
| colspan="3" | Record count<br />
| short<br />
| <br />
|-<br />
| <br />
| rowspan="4" | Record<br />
| colspan="2" | Is Range?<br />
| byte<br />
| 0 for range, 1 for no range<br />
|-<br />
| <br />
| No Range<br />
| Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| rowspan="2" | Range<br />
| Start Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| End Index<br />
| uint24le<br />
| <br />
|}<br />
<br />
=== ACK ===<br />
{| class="wikitable"<br />
! style="font-weight: bold;" | Packet ID<br />
! colspan="3" style="font-weight: bold;" | Field Name<br />
! style="font-weight: bold;" | Field Type<br />
! style="font-weight: bold;" | Notes<br />
|-<br />
| 0xc0<br />
| colspan="3" | Record count<br />
| short<br />
| <br />
|-<br />
| <br />
| rowspan="4" | Record<br />
| colspan="2" | Is Range?<br />
| byte<br />
| 0 for range, 1 for no range<br />
|-<br />
| <br />
| No Range<br />
| Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| rowspan="2" | Range<br />
| Start Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| End Index<br />
| uint24le<br />
| <br />
|}</div>Orladoghttps://wiki.vg/index.php?title=Raknet_Protocol&diff=15811Raknet Protocol2020-06-09T09:22:13Z<p>Orladog: Add my best guesses about MTU size</p>
<hr />
<div>:: '''Remember that this page is a WIP.''' Come back later to see a more complete page.<br />
----<br />
<br />
[http://www.jenkinssoftware.com/ RakNet] is a networking library used by Minecraft Bedrock Edition. You might want to also look at the documentation for the [[Bedrock Protocol]].<br />
<br />
This is based on the old [https://wiki.vg/Pocket_Edition_Protocol_Documentation#RakNet_protocol Pocket Edition Protocol Documentation] and may be incomplete or outdated.<br />
<br />
The source code for the RakNet Library can be found [https://github.com/OculusVR/RakNet/ here].<br />
<br />
<br />
'''NOTE:'''<br />
You may want to use an existing library if one exists for your language of choice.<br />
Here is an incomplete list. Not all of these are maintained or complete. If these are outdated you may need to change the protocol version to 9 before it can work. The protocol doesn't seem to have had any significant changes since the official implementation was discontinued in 2014, so as long as you bump the protocol version older libraries are likely to still work.<br />
<br />
{| class="wikitable sortable" style="width: auto; text-align: center;"<br />
|-style="background:#eee"<br />
! Name<br />
!class="unsortable"| Description<br />
! Language<br />
! License<br />
! Active development<br />
|-<br />
! [https://github.com/NukkitX/Network NukkitX Network]<br />
| Network components used within NukkitX, but with great support for general use as well<br />
| Java<br />
| Apache License<br />
| Yes<br />
|-<br />
! [https://github.com/JRakNet/JRakNet JRakNet]<br />
| JRakNet is a networking library for Java which implements the UDP based protocol RakNet<br />
| Java<br />
| MIT<br />
| Yes<br />
|-<br />
! [https://github.com/jython234/JRakLibPlus JRakLibPlus]<br />
| A library for easy creation of RakNet servers, based on RakLib and JRakLib.<br />
| Java<br />
| LGPL<br />
| No<br />
|-<br />
! [https://github.com/pmmp/RakLib RakLib]<br />
| RakNet server implementation written in PHP. This library is very lightweight on actual implementation - it provides the bare minimum to get a Minecraft Pocket Edition server functional. It only currently provides server functionality, and does not support most RakNet features.<br />
| PHP<br />
| GPL<br />
| Yes<br />
|-<br />
! [https://www.npmjs.com/package/raknet/ raknet]<br />
| UDP network library that follows the RakNet protocol for Node.js<br />
| node.js<br />
| MIT<br />
| No<br />
|-<br />
! [https://pypi.org/project/PyRakLib/ PyRakLib]<br />
| PyRakLib is a networking library that follows the RakNet protocol for MCPE. It is ported from the PHP library RakLib. <br />
| Python<br />
| GPL<br />
| No<br />
|-<br />
! [https://github.com/facebookarchive/RakNet Raknet] (official)<br />
| The official implementation. Outdated and mostly for reference purposes. May not work with the latest Bedrock.<br />
| C++<br />
| BSD<br />
| No<br />
|}<br />
<br />
== Data types ==<br />
<br />
{| class="wikitable"<br />
|-<br />
!<br />
! Size (Bytes)<br />
! Range<br />
! Notes<br />
|-<br />
! Byte<br />
| 1<br />
| 0 to 255<br />
|<br />
|-<br />
! Long<br />
| 8<br />
| -2^63 to 2^63-1<br />
| Signed 64-bit Integer<br />
|-<br />
! Magic<br />
| 16<br />
| <code>00ffff00fefefefefdfdfdfd12345678</code><br />
| Always those hex bytes, corresponding to RakNet's default OFFLINE_MESSAGE_DATA_ID<br />
|-<br />
! short<br />
| 2<br />
| -32768 to 32767<br />
| <br />
|-<br />
! unsigned short<br />
| 2<br />
| 0 to 65535<br />
| <br />
|-<br />
! string<br />
| unsigned short + string<br />
| N/A<br />
| class="col3" | Prefixed by a short containing the length of the string in characters. It appears that only the following ASCII characters can be displayed: !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~<br />
|-<br />
! byte<br />
| 1<br />
| 0 to 255<br />
|<br />
|}<br />
<br />
== Packets ==<br />
<br />
=== Unconnected Ping ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x01, 0x02<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| MAGIC<br />
| magic<br />
| <br />
|-<br />
| Client GUID<br />
| Long<br />
| <br />
|}<br />
<br />
<code>0x02</code> is only replied to if there are open connections to the server. '''Note:''' as of 0.15.6 it seems that the game refreshes it's LAN world list every 4-5 seconds, however it seems the game will still ping in 1 second intervals.<br><br />
This packet should be responded to with unconnected Pong.<br />
<br />
=== Unconnected Pong ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x1c<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| MAGIC<br />
| magic<br />
| <br />
|-<br />
| Server ID string<br />
| string<br />
| Used for the MOTD. See below for details.<br />
|}<br />
<br />
'''Server ID string format'''<br />
<br />
For Minecraft Bedrock this is separated by semicolons and uses the following format:<br><br />
<code>Edition (MCPE or MCEE for Education Edition);MOTD line 1;Protocol Version;Version Name;Player Count;Max Player Count;Server Unique ID;MOTD line 2;Game mode;Game mode (numeric);Port (IPv4);Port (IPv6);</code><br><br />
Example:<br><br />
<code>MCPE;Dedicated Server;390;1.14.60;0;10;13253860892328930865;Bedrock level;Survival;1;19132;19133;</code><br><br />
Result:<br><br />
[[File:Server_ID_String_Example.png]]<br><br />
The Game mode and Game mode (numeric) values seem to not be used by the client.<br />
<br />
=== Connected Ping ===<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x00<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Connected Pong ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x03<br />
| Ping Time<br />
| Long<br />
| <br />
|-<br />
| Pong Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Offline Connection Request 1 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x05<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Protocol version<br />
| byte<br />
| Currently 9<br />
|-<br />
| MTU<br />
| Zero padding<br />
| The MTU sent in the response appears to be somewhere around the size of this padding + 46 (28 udp overhead, 1 packet id, 16 magic, 1 protocol version). This padding seems to be used to discover the maximum packet size the network can handle.<br />
|}<br />
<br />
The client sends these to the target server with ever decreasing MTU until the server responds. This is used to discover the MTU size for the connection. You should always respond to the first of these packets that you receive. According to the official docs, "The MTU size is the maximum size of a packet RakNet will generate", and "if you set the MTU size larger than your or any router along the network path takes, then the network will split the packet at best, or drop it at worst", so this process of sending decreasingly padded packets (compensating for the size of the packet itself and UDP overhead, which together make 48 bytes). See the [http://www.jenkinssoftware.com/raknet/manual/programmingtips.html official documentation page] for more info about the MTU size. If the RakNet protocol does not match your own, respond with the Incompatible protocol packet.<br />
<br />
=== Offline Connection Response 1 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x06<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| Use security<br />
| boolean<br />
| Make sure this is false, it is vital for the login sequence to continue!<br />
|<br />
|-<br />
| MTU<br />
| short<br />
| see Offline Connection Request 1<br />
|}<br />
<br />
=== Offline Connection Request 2 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x07<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server Address<br />
| address<br />
| <br />
|-<br />
| MTU<br />
| short<br />
| <br />
|-<br />
| Client GUID<br />
| Long<br />
| <br />
|}<br />
<br />
=== Offline Connection Response 2 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x08<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| Client Address<br />
| address<br />
| <br />
|-<br />
| MTU<br />
| short<br />
| <br />
|-<br />
| Encryption enabled?<br />
| byte<br />
| 0 for disabled.<br />
|}<br />
<br />
=== Online Connection Request ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x09<br />
| GUID<br />
| Long<br />
| <br />
|-<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Online Connection Request Accepted ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x10<br />
| Client address<br />
| address<br />
| <br />
|-<br />
| System index<br />
| short<br />
| Unknown what this does. 0 works as a value.<br />
|-<br />
| Internal IDs<br />
| 10x address<br />
| Unknown what these do. 255.255.255.255:19132 for all of them seems to work, any other address will probably work as well.<br />
|-<br />
| Request time<br />
| Long<br />
| <br />
|-<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Incompatible protocol ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x19<br />
| Protocol<br />
| byte<br />
| <br />
|-<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
|}<br />
<br />
=== Unconnected Ping ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x01, 0x02<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| GUID<br />
| Long<br />
| <br />
|}<br />
<br />
=== Frame Set Packet ===<br />
{| class="wikitable"<br />
! Packet ID<br />
!colspan="3"| Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="11"| 0x80..0x8d<br />
|colspan="3"| Frame Set index<br />
| uint24le<br />
| <br />
|-<br />
|rowspan="10"| Frames<br />
|colspan="2"| Flags<br />
| byte<br />
| Top 3 bits are reliability type, fourth bit is 1 when the frame is fragmented and part of a compound.<br />
|-<br />
|colspan="2"| Length IN BITS<br />
| short<br />
| Length of the body in bits.<br />
|-<br />
|colspan="2"| Reliable frame index<br />
| uint24le<br />
| only if reliable<br />
|-<br />
|colspan="2"| Sequenced frame index<br />
| uint24le<br />
| only if sequenced<br />
|-<br />
|rowspan="2"| Order<br />
| Ordered frame index<br />
| uint24le<br />
|rowspan="2"| only if ordered<br />
|-<br />
| Order channel<br />
| byte<br />
|-<br />
|rowspan="3"| Fragment<br />
| Compound size<br />
| int<br />
|rowspan="3"| only if fragmented<br />
|-<br />
| Compound ID<br />
| short<br />
|-<br />
| Index<br />
| int<br />
|-<br />
| Body<br />
| ceil(length/8) bytes<br />
|}<br />
<br />
The reliability types are as follows:<br />
<br />
{| class="wikitable"<br />
! style="text-align: center; font-weight: bold;" | ID<br />
! style="font-weight: bold;" | Name<br />
! style="text-align: center; font-weight: bold;" | Reliable<br />
! style="text-align: center; font-weight: bold;" | Ordered<br />
! style="text-align: center; font-weight: bold;" | Sequenced<br />
|-<br />
| style="text-align: center;" | 0<br />
| unreliable<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 1<br />
| unreliable sequenced<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
|-<br />
| style="text-align: center;" | 2<br />
| reliable<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 3<br />
| reliable ordered<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 4<br />
| reliable sequenced<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
|-<br />
| style="text-align: center;" | 5<br />
| unreliable (+ ACK receipt)<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 6<br />
| reliable (+ ACK receipt)<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 7<br />
| reliable ordered (+ ACK receipt)<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
|}<br />
<br />
Sequenced implies ordered.<br />
<br />
=== Game Packet ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x8e<br />
| Body<br />
| bytes<br />
| Single packet of the GAME protocol.<br />
|}<br />
<br />
=== NACK ===<br />
{| class="wikitable"<br />
! style="font-weight: bold;" | Packet ID<br />
! colspan="3" style="font-weight: bold;" | Field Name<br />
! style="font-weight: bold;" | Field Type<br />
! style="font-weight: bold;" | Notes<br />
|-<br />
| 0xa0<br />
| colspan="3" | Record count<br />
| short<br />
| <br />
|-<br />
| <br />
| rowspan="4" | Record<br />
| colspan="2" | Is Range?<br />
| byte<br />
| 0 for range, 1 for no range<br />
|-<br />
| <br />
| No Range<br />
| Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| rowspan="2" | Range<br />
| Start Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| End Index<br />
| uint24le<br />
| <br />
|}<br />
<br />
=== ACK ===<br />
{| class="wikitable"<br />
! style="font-weight: bold;" | Packet ID<br />
! colspan="3" style="font-weight: bold;" | Field Name<br />
! style="font-weight: bold;" | Field Type<br />
! style="font-weight: bold;" | Notes<br />
|-<br />
| 0xc0<br />
| colspan="3" | Record count<br />
| short<br />
| <br />
|-<br />
| <br />
| rowspan="4" | Record<br />
| colspan="2" | Is Range?<br />
| byte<br />
| 0 for range, 1 for no range<br />
|-<br />
| <br />
| No Range<br />
| Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| rowspan="2" | Range<br />
| Start Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| End Index<br />
| uint24le<br />
| <br />
|}</div>Orladoghttps://wiki.vg/index.php?title=Raknet_Protocol&diff=15810Raknet Protocol2020-06-09T08:57:43Z<p>Orladog: Add RakLib</p>
<hr />
<div>:: '''Remember that this page is a WIP.''' Come back later to see a more complete page.<br />
----<br />
<br />
[http://www.jenkinssoftware.com/ RakNet] is a networking library used by Minecraft Bedrock Edition. You might want to also look at the documentation for the [[Bedrock Protocol]].<br />
<br />
This is based on the old [https://wiki.vg/Pocket_Edition_Protocol_Documentation#RakNet_protocol Pocket Edition Protocol Documentation] and may be incomplete or outdated.<br />
<br />
The source code for the RakNet Library can be found [https://github.com/OculusVR/RakNet/ here].<br />
<br />
<br />
'''NOTE:'''<br />
You may want to use an existing library if one exists for your language of choice.<br />
Here is an incomplete list. Not all of these are maintained or complete. If these are outdated you may need to change the protocol version to 9 before it can work. The protocol doesn't seem to have had any significant changes since the official implementation was discontinued in 2014, so as long as you bump the protocol version older libraries are likely to still work.<br />
<br />
{| class="wikitable sortable" style="width: auto; text-align: center;"<br />
|-style="background:#eee"<br />
! Name<br />
!class="unsortable"| Description<br />
! Language<br />
! License<br />
! Active development<br />
|-<br />
! [https://github.com/NukkitX/Network NukkitX Network]<br />
| Network components used within NukkitX, but with great support for general use as well<br />
| Java<br />
| Apache License<br />
| Yes<br />
|-<br />
! [https://github.com/JRakNet/JRakNet JRakNet]<br />
| JRakNet is a networking library for Java which implements the UDP based protocol RakNet<br />
| Java<br />
| MIT<br />
| Yes<br />
|-<br />
! [https://github.com/jython234/JRakLibPlus JRakLibPlus]<br />
| A library for easy creation of RakNet servers, based on RakLib and JRakLib.<br />
| Java<br />
| LGPL<br />
| No<br />
|-<br />
! [https://github.com/pmmp/RakLib RakLib]<br />
| RakNet server implementation written in PHP. This library is very lightweight on actual implementation - it provides the bare minimum to get a Minecraft Pocket Edition server functional. It only currently provides server functionality, and does not support most RakNet features.<br />
| PHP<br />
| GPL<br />
| Yes<br />
|-<br />
! [https://www.npmjs.com/package/raknet/ raknet]<br />
| UDP network library that follows the RakNet protocol for Node.js<br />
| node.js<br />
| MIT<br />
| No<br />
|-<br />
! [https://pypi.org/project/PyRakLib/ PyRakLib]<br />
| PyRakLib is a networking library that follows the RakNet protocol for MCPE. It is ported from the PHP library RakLib. <br />
| Python<br />
| GPL<br />
| No<br />
|-<br />
! [https://github.com/facebookarchive/RakNet Raknet] (official)<br />
| The official implementation. Outdated and mostly for reference purposes. May not work with the latest Bedrock.<br />
| C++<br />
| BSD<br />
| No<br />
|}<br />
<br />
== Data types ==<br />
<br />
{| class="wikitable"<br />
|-<br />
!<br />
! Size (Bytes)<br />
! Range<br />
! Notes<br />
|-<br />
! Byte<br />
| 1<br />
| 0 to 255<br />
|<br />
|-<br />
! Long<br />
| 8<br />
| -2^63 to 2^63-1<br />
| Signed 64-bit Integer<br />
|-<br />
! Magic<br />
| 16<br />
| <code>00ffff00fefefefefdfdfdfd12345678</code><br />
| Always those hex bytes, corresponding to RakNet's default OFFLINE_MESSAGE_DATA_ID<br />
|-<br />
! short<br />
| 2<br />
| -32768 to 32767<br />
| <br />
|-<br />
! unsigned short<br />
| 2<br />
| 0 to 65535<br />
| <br />
|-<br />
! string<br />
| unsigned short + string<br />
| N/A<br />
| class="col3" | Prefixed by a short containing the length of the string in characters. It appears that only the following ASCII characters can be displayed: !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~<br />
|-<br />
! byte<br />
| 1<br />
| 0 to 255<br />
|<br />
|}<br />
<br />
== Packets ==<br />
<br />
=== Unconnected Ping ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x01, 0x02<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| MAGIC<br />
| magic<br />
| <br />
|-<br />
| Client GUID<br />
| Long<br />
| <br />
|}<br />
<br />
<code>0x02</code> is only replied to if there are open connections to the server. '''Note:''' as of 0.15.6 it seems that the game refreshes it's LAN world list every 4-5 seconds, however it seems the game will still ping in 1 second intervals.<br><br />
This packet should be responded to with unconnected Pong.<br />
<br />
=== Unconnected Pong ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x1c<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| MAGIC<br />
| magic<br />
| <br />
|-<br />
| Server ID string<br />
| string<br />
| Used for the MOTD. See below for details.<br />
|}<br />
<br />
'''Server ID string format'''<br />
<br />
For Minecraft Bedrock this is separated by semicolons and uses the following format:<br><br />
<code>Edition (MCPE or MCEE for Education Edition);MOTD line 1;Protocol Version;Version Name;Player Count;Max Player Count;Server Unique ID;MOTD line 2;Game mode;Game mode (numeric);Port (IPv4);Port (IPv6);</code><br><br />
Example:<br><br />
<code>MCPE;Dedicated Server;390;1.14.60;0;10;13253860892328930865;Bedrock level;Survival;1;19132;19133;</code><br><br />
Result:<br><br />
[[File:Server_ID_String_Example.png]]<br><br />
The Game mode and Game mode (numeric) values seem to not be used by the client.<br />
<br />
=== Connected Ping ===<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x00<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Connected Pong ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x03<br />
| Ping Time<br />
| Long<br />
| <br />
|-<br />
| Pong Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Offline Connection Request 1 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x05<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Protocol version<br />
| byte<br />
| Currently 9<br />
|-<br />
| MTU<br />
| mtu-46 zero bytes<br />
| The MTU sent in the response appears to be somewhere around the size of this padding + 46 (28 udp overhead, 1 packet id, 16 magic, 1 protocol version)<br />
|}<br />
<br />
The client sends these to the target server with ever decreasing MTU until the server responds. This is used to discover the MTU size for the connection. See the [http://www.jenkinssoftware.com/raknet/manual/programmingtips.html official documentation page] for more info about the MTU size. If the RakNet protocol does not match your own, respond with the Incompatible protocol packet<br />
<br />
=== Offline Connection Response 1 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x06<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| Use security<br />
| boolean<br />
| Make sure this is false, it is vital for the login sequence to continue!<br />
|<br />
|-<br />
| MTU<br />
| short<br />
| see Offline Connection Request 1<br />
|}<br />
<br />
=== Offline Connection Request 2 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x07<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server Address<br />
| address<br />
| <br />
|-<br />
| MTU<br />
| short<br />
| <br />
|-<br />
| Client GUID<br />
| Long<br />
| <br />
|}<br />
<br />
=== Offline Connection Response 2 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x08<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| Client Address<br />
| address<br />
| <br />
|-<br />
| MTU<br />
| short<br />
| <br />
|-<br />
| Encryption enabled?<br />
| byte<br />
| 0 for disabled.<br />
|}<br />
<br />
=== Online Connection Request ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x09<br />
| GUID<br />
| Long<br />
| <br />
|-<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Online Connection Request Accepted ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x10<br />
| Client address<br />
| address<br />
| <br />
|-<br />
| System index<br />
| short<br />
| Unknown what this does. 0 works as a value.<br />
|-<br />
| Internal IDs<br />
| 10x address<br />
| Unknown what these do. 255.255.255.255:19132 for all of them seems to work, any other address will probably work as well.<br />
|-<br />
| Request time<br />
| Long<br />
| <br />
|-<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Incompatible protocol ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x19<br />
| Protocol<br />
| byte<br />
| <br />
|-<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
|}<br />
<br />
=== Unconnected Ping ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x01, 0x02<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| GUID<br />
| Long<br />
| <br />
|}<br />
<br />
=== Frame Set Packet ===<br />
{| class="wikitable"<br />
! Packet ID<br />
!colspan="3"| Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="11"| 0x80..0x8d<br />
|colspan="3"| Frame Set index<br />
| uint24le<br />
| <br />
|-<br />
|rowspan="10"| Frames<br />
|colspan="2"| Flags<br />
| byte<br />
| Top 3 bits are reliability type, fourth bit is 1 when the frame is fragmented and part of a compound.<br />
|-<br />
|colspan="2"| Length IN BITS<br />
| short<br />
| Length of the body in bits.<br />
|-<br />
|colspan="2"| Reliable frame index<br />
| uint24le<br />
| only if reliable<br />
|-<br />
|colspan="2"| Sequenced frame index<br />
| uint24le<br />
| only if sequenced<br />
|-<br />
|rowspan="2"| Order<br />
| Ordered frame index<br />
| uint24le<br />
|rowspan="2"| only if ordered<br />
|-<br />
| Order channel<br />
| byte<br />
|-<br />
|rowspan="3"| Fragment<br />
| Compound size<br />
| int<br />
|rowspan="3"| only if fragmented<br />
|-<br />
| Compound ID<br />
| short<br />
|-<br />
| Index<br />
| int<br />
|-<br />
| Body<br />
| ceil(length/8) bytes<br />
|}<br />
<br />
The reliability types are as follows:<br />
<br />
{| class="wikitable"<br />
! style="text-align: center; font-weight: bold;" | ID<br />
! style="font-weight: bold;" | Name<br />
! style="text-align: center; font-weight: bold;" | Reliable<br />
! style="text-align: center; font-weight: bold;" | Ordered<br />
! style="text-align: center; font-weight: bold;" | Sequenced<br />
|-<br />
| style="text-align: center;" | 0<br />
| unreliable<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 1<br />
| unreliable sequenced<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
|-<br />
| style="text-align: center;" | 2<br />
| reliable<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 3<br />
| reliable ordered<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 4<br />
| reliable sequenced<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
|-<br />
| style="text-align: center;" | 5<br />
| unreliable (+ ACK receipt)<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 6<br />
| reliable (+ ACK receipt)<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 7<br />
| reliable ordered (+ ACK receipt)<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
|}<br />
<br />
Sequenced implies ordered.<br />
<br />
=== Game Packet ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x8e<br />
| Body<br />
| bytes<br />
| Single packet of the GAME protocol.<br />
|}<br />
<br />
=== NACK ===<br />
{| class="wikitable"<br />
! style="font-weight: bold;" | Packet ID<br />
! colspan="3" style="font-weight: bold;" | Field Name<br />
! style="font-weight: bold;" | Field Type<br />
! style="font-weight: bold;" | Notes<br />
|-<br />
| 0xa0<br />
| colspan="3" | Record count<br />
| short<br />
| <br />
|-<br />
| <br />
| rowspan="4" | Record<br />
| colspan="2" | Is Range?<br />
| byte<br />
| 0 for range, 1 for no range<br />
|-<br />
| <br />
| No Range<br />
| Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| rowspan="2" | Range<br />
| Start Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| End Index<br />
| uint24le<br />
| <br />
|}<br />
<br />
=== ACK ===<br />
{| class="wikitable"<br />
! style="font-weight: bold;" | Packet ID<br />
! colspan="3" style="font-weight: bold;" | Field Name<br />
! style="font-weight: bold;" | Field Type<br />
! style="font-weight: bold;" | Notes<br />
|-<br />
| 0xc0<br />
| colspan="3" | Record count<br />
| short<br />
| <br />
|-<br />
| <br />
| rowspan="4" | Record<br />
| colspan="2" | Is Range?<br />
| byte<br />
| 0 for range, 1 for no range<br />
|-<br />
| <br />
| No Range<br />
| Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| rowspan="2" | Range<br />
| Start Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| End Index<br />
| uint24le<br />
| <br />
|}</div>Orladoghttps://wiki.vg/index.php?title=Raknet_Protocol&diff=15809Raknet Protocol2020-06-08T20:56:36Z<p>Orladog: Add link to docs page</p>
<hr />
<div>:: '''Remember that this page is a WIP.''' Come back later to see a more complete page.<br />
----<br />
<br />
[http://www.jenkinssoftware.com/ RakNet] is a networking library used by Minecraft Bedrock Edition. You might want to also look at the documentation for the [[Bedrock Protocol]].<br />
<br />
This is based on the old [https://wiki.vg/Pocket_Edition_Protocol_Documentation#RakNet_protocol Pocket Edition Protocol Documentation] and may be incomplete or outdated.<br />
<br />
The source code for the RakNet Library can be found [https://github.com/OculusVR/RakNet/ here].<br />
<br />
<br />
'''NOTE:'''<br />
You may want to use an existing library if one exists for your language of choice.<br />
Here is an incomplete list. Not all of these are maintained or complete. If these are outdated you may need to change the protocol version to 9 before it can work. The protocol doesn't seem to have had any significant changes since the official implementation was discontinued in 2014, so as long as you bump the protocol version older libraries are likely to still work.<br />
<br />
{| class="wikitable sortable" style="width: auto; text-align: center;"<br />
|-style="background:#eee"<br />
! Name<br />
!class="unsortable"| Description<br />
! Language<br />
! License<br />
! Active development<br />
|-<br />
! [https://github.com/NukkitX/Network NukkitX Network]<br />
| Network components used within NukkitX, but with great support for general use as well<br />
| Java<br />
| Apache License<br />
| Yes<br />
|-<br />
! [https://github.com/JRakNet/JRakNet JRakNet]<br />
| JRakNet is a networking library for Java which implements the UDP based protocol RakNet<br />
| Java<br />
| MIT<br />
| Yes<br />
|-<br />
! [https://github.com/jython234/JRakLibPlus JRakLibPlus]<br />
| A library for easy creation of RakNet servers, based on RakLib and JRakLib.<br />
| Java<br />
| LGPL<br />
| No<br />
|-<br />
! [https://www.npmjs.com/package/raknet/ raknet]<br />
| UDP network library that follows the RakNet protocol for Node.js<br />
| node.js<br />
| MIT<br />
| No<br />
|-<br />
! [https://pypi.org/project/PyRakLib/ PyRakLib]<br />
| PyRakLib is a networking library that follows the RakNet protocol for MCPE. It is ported from the PHP library: RakLib. <br />
| Python<br />
| GPL<br />
| No<br />
|-<br />
! [https://github.com/facebookarchive/RakNet Raknet] (official)<br />
| The official implementation. Outdated and mostly for reference purposes. May not work with the latest Bedrock.<br />
| C++<br />
| BSD<br />
| No<br />
|}<br />
<br />
== Data types ==<br />
<br />
{| class="wikitable"<br />
|-<br />
!<br />
! Size (Bytes)<br />
! Range<br />
! Notes<br />
|-<br />
! Byte<br />
| 1<br />
| 0 to 255<br />
|<br />
|-<br />
! Long<br />
| 8<br />
| -2^63 to 2^63-1<br />
| Signed 64-bit Integer<br />
|-<br />
! Magic<br />
| 16<br />
| <code>00ffff00fefefefefdfdfdfd12345678</code><br />
| Always those hex bytes, corresponding to RakNet's default OFFLINE_MESSAGE_DATA_ID<br />
|-<br />
! short<br />
| 2<br />
| -32768 to 32767<br />
| <br />
|-<br />
! unsigned short<br />
| 2<br />
| 0 to 65535<br />
| <br />
|-<br />
! string<br />
| unsigned short + string<br />
| N/A<br />
| class="col3" | Prefixed by a short containing the length of the string in characters. It appears that only the following ASCII characters can be displayed: !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~<br />
|-<br />
! byte<br />
| 1<br />
| 0 to 255<br />
|<br />
|}<br />
<br />
== Packets ==<br />
<br />
=== Unconnected Ping ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x01, 0x02<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| MAGIC<br />
| magic<br />
| <br />
|-<br />
| Client GUID<br />
| Long<br />
| <br />
|}<br />
<br />
<code>0x02</code> is only replied to if there are open connections to the server. '''Note:''' as of 0.15.6 it seems that the game refreshes it's LAN world list every 4-5 seconds, however it seems the game will still ping in 1 second intervals.<br><br />
This packet should be responded to with unconnected Pong.<br />
<br />
=== Unconnected Pong ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x1c<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| MAGIC<br />
| magic<br />
| <br />
|-<br />
| Server ID string<br />
| string<br />
| Used for the MOTD. See below for details.<br />
|}<br />
<br />
'''Server ID string format'''<br />
<br />
For Minecraft Bedrock this is separated by semicolons and uses the following format:<br><br />
<code>Edition (MCPE or MCEE for Education Edition);MOTD line 1;Protocol Version;Version Name;Player Count;Max Player Count;Server Unique ID;MOTD line 2;Game mode;Game mode (numeric);Port (IPv4);Port (IPv6);</code><br><br />
Example:<br><br />
<code>MCPE;Dedicated Server;390;1.14.60;0;10;13253860892328930865;Bedrock level;Survival;1;19132;19133;</code><br><br />
Result:<br><br />
[[File:Server_ID_String_Example.png]]<br><br />
The Game mode and Game mode (numeric) values seem to not be used by the client.<br />
<br />
=== Connected Ping ===<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x00<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Connected Pong ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x03<br />
| Ping Time<br />
| Long<br />
| <br />
|-<br />
| Pong Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Offline Connection Request 1 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x05<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Protocol version<br />
| byte<br />
| Currently 9<br />
|-<br />
| MTU<br />
| mtu-46 zero bytes<br />
| The MTU sent in the response appears to be somewhere around the size of this padding + 46 (28 udp overhead, 1 packet id, 16 magic, 1 protocol version)<br />
|}<br />
<br />
The client sends these to the target server with ever decreasing MTU until the server responds. This is used to discover the MTU size for the connection. See the [http://www.jenkinssoftware.com/raknet/manual/programmingtips.html official documentation page] for more info about the MTU size. If the RakNet protocol does not match your own, respond with the Incompatible protocol packet<br />
<br />
=== Offline Connection Response 1 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x06<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| Use security<br />
| boolean<br />
| Make sure this is false, it is vital for the login sequence to continue!<br />
|<br />
|-<br />
| MTU<br />
| short<br />
| see Offline Connection Request 1<br />
|}<br />
<br />
=== Offline Connection Request 2 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x07<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server Address<br />
| address<br />
| <br />
|-<br />
| MTU<br />
| short<br />
| <br />
|-<br />
| Client GUID<br />
| Long<br />
| <br />
|}<br />
<br />
=== Offline Connection Response 2 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x08<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| Client Address<br />
| address<br />
| <br />
|-<br />
| MTU<br />
| short<br />
| <br />
|-<br />
| Encryption enabled?<br />
| byte<br />
| 0 for disabled.<br />
|}<br />
<br />
=== Online Connection Request ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x09<br />
| GUID<br />
| Long<br />
| <br />
|-<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Online Connection Request Accepted ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x10<br />
| Client address<br />
| address<br />
| <br />
|-<br />
| System index<br />
| short<br />
| Unknown what this does. 0 works as a value.<br />
|-<br />
| Internal IDs<br />
| 10x address<br />
| Unknown what these do. 255.255.255.255:19132 for all of them seems to work, any other address will probably work as well.<br />
|-<br />
| Request time<br />
| Long<br />
| <br />
|-<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Incompatible protocol ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x19<br />
| Protocol<br />
| byte<br />
| <br />
|-<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
|}<br />
<br />
=== Unconnected Ping ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x01, 0x02<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| GUID<br />
| Long<br />
| <br />
|}<br />
<br />
=== Frame Set Packet ===<br />
{| class="wikitable"<br />
! Packet ID<br />
!colspan="3"| Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="11"| 0x80..0x8d<br />
|colspan="3"| Frame Set index<br />
| uint24le<br />
| <br />
|-<br />
|rowspan="10"| Frames<br />
|colspan="2"| Flags<br />
| byte<br />
| Top 3 bits are reliability type, fourth bit is 1 when the frame is fragmented and part of a compound.<br />
|-<br />
|colspan="2"| Length IN BITS<br />
| short<br />
| Length of the body in bits.<br />
|-<br />
|colspan="2"| Reliable frame index<br />
| uint24le<br />
| only if reliable<br />
|-<br />
|colspan="2"| Sequenced frame index<br />
| uint24le<br />
| only if sequenced<br />
|-<br />
|rowspan="2"| Order<br />
| Ordered frame index<br />
| uint24le<br />
|rowspan="2"| only if ordered<br />
|-<br />
| Order channel<br />
| byte<br />
|-<br />
|rowspan="3"| Fragment<br />
| Compound size<br />
| int<br />
|rowspan="3"| only if fragmented<br />
|-<br />
| Compound ID<br />
| short<br />
|-<br />
| Index<br />
| int<br />
|-<br />
| Body<br />
| ceil(length/8) bytes<br />
|}<br />
<br />
The reliability types are as follows:<br />
<br />
{| class="wikitable"<br />
! style="text-align: center; font-weight: bold;" | ID<br />
! style="font-weight: bold;" | Name<br />
! style="text-align: center; font-weight: bold;" | Reliable<br />
! style="text-align: center; font-weight: bold;" | Ordered<br />
! style="text-align: center; font-weight: bold;" | Sequenced<br />
|-<br />
| style="text-align: center;" | 0<br />
| unreliable<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 1<br />
| unreliable sequenced<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
|-<br />
| style="text-align: center;" | 2<br />
| reliable<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 3<br />
| reliable ordered<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 4<br />
| reliable sequenced<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
|-<br />
| style="text-align: center;" | 5<br />
| unreliable (+ ACK receipt)<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 6<br />
| reliable (+ ACK receipt)<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 7<br />
| reliable ordered (+ ACK receipt)<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
|}<br />
<br />
Sequenced implies ordered.<br />
<br />
=== Game Packet ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x8e<br />
| Body<br />
| bytes<br />
| Single packet of the GAME protocol.<br />
|}<br />
<br />
=== NACK ===<br />
{| class="wikitable"<br />
! style="font-weight: bold;" | Packet ID<br />
! colspan="3" style="font-weight: bold;" | Field Name<br />
! style="font-weight: bold;" | Field Type<br />
! style="font-weight: bold;" | Notes<br />
|-<br />
| 0xa0<br />
| colspan="3" | Record count<br />
| short<br />
| <br />
|-<br />
| <br />
| rowspan="4" | Record<br />
| colspan="2" | Is Range?<br />
| byte<br />
| 0 for range, 1 for no range<br />
|-<br />
| <br />
| No Range<br />
| Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| rowspan="2" | Range<br />
| Start Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| End Index<br />
| uint24le<br />
| <br />
|}<br />
<br />
=== ACK ===<br />
{| class="wikitable"<br />
! style="font-weight: bold;" | Packet ID<br />
! colspan="3" style="font-weight: bold;" | Field Name<br />
! style="font-weight: bold;" | Field Type<br />
! style="font-weight: bold;" | Notes<br />
|-<br />
| 0xc0<br />
| colspan="3" | Record count<br />
| short<br />
| <br />
|-<br />
| <br />
| rowspan="4" | Record<br />
| colspan="2" | Is Range?<br />
| byte<br />
| 0 for range, 1 for no range<br />
|-<br />
| <br />
| No Range<br />
| Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| rowspan="2" | Range<br />
| Start Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| End Index<br />
| uint24le<br />
| <br />
|}</div>Orladoghttps://wiki.vg/index.php?title=Raknet_Protocol&diff=15806Raknet Protocol2020-06-08T15:19:30Z<p>Orladog: Fix formatting of Data types */</p>
<hr />
<div>:: '''Remember that this page is a WIP.''' Come back later to see a more complete page.<br />
----<br />
<br />
[http://www.jenkinssoftware.com/ RakNet] is a networking library used by Minecraft Bedrock Edition. You might want to also look at the documentation for the [[Bedrock Protocol]].<br />
<br />
This is based on the old [https://wiki.vg/Pocket_Edition_Protocol_Documentation#RakNet_protocol Pocket Edition Protocol Documentation] and may be incomplete or outdated.<br />
<br />
The source code for the RakNet Library can be found [https://github.com/OculusVR/RakNet/ here].<br />
<br />
<br />
'''NOTE:'''<br />
You may want to use an existing library if one exists for your language of choice.<br />
Here is an incomplete list. Not all of these are maintained or complete. If these are outdated you may need to change the protocol version to 9 before it can work. The protocol doesn't seem to have had any significant changes since the official implementation was discontinued in 2014, so as long as you bump the protocol version older libraries are likely to still work.<br />
<br />
{| class="wikitable sortable" style="width: auto; text-align: center;"<br />
|-style="background:#eee"<br />
! Name<br />
!class="unsortable"| Description<br />
! Language<br />
! License<br />
! Active development<br />
|-<br />
! [https://github.com/NukkitX/Network NukkitX Network]<br />
| Network components used within NukkitX, but with great support for general use as well<br />
| Java<br />
| Apache License<br />
| Yes<br />
|-<br />
! [https://github.com/JRakNet/JRakNet JRakNet]<br />
| JRakNet is a networking library for Java which implements the UDP based protocol RakNet<br />
| Java<br />
| MIT<br />
| Yes<br />
|-<br />
! [https://github.com/jython234/JRakLibPlus JRakLibPlus]<br />
| A library for easy creation of RakNet servers, based on RakLib and JRakLib.<br />
| Java<br />
| LGPL<br />
| No<br />
|-<br />
! [https://www.npmjs.com/package/raknet/ raknet]<br />
| UDP network library that follows the RakNet protocol for Node.js<br />
| node.js<br />
| MIT<br />
| No<br />
|-<br />
! [https://pypi.org/project/PyRakLib/ PyRakLib]<br />
| PyRakLib is a networking library that follows the RakNet protocol for MCPE. It is ported from the PHP library: RakLib. <br />
| Python<br />
| GPL<br />
| No<br />
|-<br />
! [https://github.com/facebookarchive/RakNet Raknet] (official)<br />
| The official implementation. Outdated and mostly for reference purposes. May not work with the latest Bedrock.<br />
| C++<br />
| BSD<br />
| No<br />
|}<br />
<br />
== Data types ==<br />
<br />
{| class="wikitable"<br />
|-<br />
!<br />
! Size (Bytes)<br />
! Range<br />
! Notes<br />
|-<br />
! Byte<br />
| 1<br />
| 0 to 255<br />
|<br />
|-<br />
! Long<br />
| 8<br />
| -2^63 to 2^63-1<br />
| Signed 64-bit Integer<br />
|-<br />
! Magic<br />
| 16<br />
| <code>00ffff00fefefefefdfdfdfd12345678</code><br />
| Always those hex bytes, corresponding to RakNet's default OFFLINE_MESSAGE_DATA_ID<br />
|-<br />
! short<br />
| 2<br />
| -32768 to 32767<br />
| <br />
|-<br />
! unsigned short<br />
| 2<br />
| 0 to 65535<br />
| <br />
|-<br />
! string<br />
| unsigned short + string<br />
| N/A<br />
| class="col3" | Prefixed by a short containing the length of the string in characters. It appears that only the following ASCII characters can be displayed: !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~<br />
|-<br />
! byte<br />
| 1<br />
| 0 to 255<br />
|<br />
|}<br />
<br />
== Packets ==<br />
<br />
=== Unconnected Ping ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x01, 0x02<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| MAGIC<br />
| magic<br />
| <br />
|-<br />
| Client GUID<br />
| Long<br />
| <br />
|}<br />
<br />
<code>0x02</code> is only replied to if there are open connections to the server. '''Note:''' as of 0.15.6 it seems that the game refreshes it's LAN world list every 4-5 seconds, however it seems the game will still ping in 1 second intervals.<br><br />
This packet should be responded to with unconnected Pong.<br />
<br />
=== Unconnected Pong ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x1c<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| MAGIC<br />
| magic<br />
| <br />
|-<br />
| Server ID string<br />
| string<br />
| Used for the MOTD. See below for details.<br />
|}<br />
<br />
'''Server ID string format'''<br />
<br />
For Minecraft Bedrock this is separated by semicolons and uses the following format:<br><br />
<code>Edition (MCPE or MCEE for Education Edition);MOTD line 1;Protocol Version;Version Name;Player Count;Max Player Count;Server Unique ID;MOTD line 2;Game mode;Game mode (numeric);Port (IPv4);Port (IPv6);</code><br><br />
Example:<br><br />
<code>MCPE;Dedicated Server;390;1.14.60;0;10;13253860892328930865;Bedrock level;Survival;1;19132;19133;</code><br><br />
Result:<br><br />
[[File:Server_ID_String_Example.png]]<br><br />
The Game mode and Game mode (numeric) values seem to not be used by the client.<br />
<br />
=== Connected Ping ===<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x00<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Connected Pong ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x03<br />
| Ping Time<br />
| Long<br />
| <br />
|-<br />
| Pong Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Offline Connection Request 1 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x05<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Protocol version<br />
| byte<br />
| Currently 9<br />
|-<br />
| MTU<br />
| mtu-46 zero bytes<br />
| The MTU sent in the response appears to be somewhere around the size of this padding + 46 (28 udp overhead, 1 packet id, 16 magic, 1 protocol version)<br />
|}<br />
<br />
The client sends these to the target server with ever decreasing MTU until the server responds. This is used to discover the MTU size for the connection. If the RakNet protocol does not match your own, respond with the Incompatible protocol packet<br />
<br />
=== Offline Connection Response 1 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x06<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| Use security<br />
| boolean<br />
| Make sure this is false, it is vital for the login sequence to continue!<br />
|<br />
|-<br />
| MTU<br />
| short<br />
| see Offline Connection Request 1<br />
|}<br />
<br />
=== Offline Connection Request 2 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x07<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server Address<br />
| address<br />
| <br />
|-<br />
| MTU<br />
| short<br />
| <br />
|-<br />
| Client GUID<br />
| Long<br />
| <br />
|}<br />
<br />
=== Offline Connection Response 2 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x08<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| Client Address<br />
| address<br />
| <br />
|-<br />
| MTU<br />
| short<br />
| <br />
|-<br />
| Encryption enabled?<br />
| byte<br />
| 0 for disabled.<br />
|}<br />
<br />
=== Online Connection Request ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x09<br />
| GUID<br />
| Long<br />
| <br />
|-<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Online Connection Request Accepted ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x10<br />
| Client address<br />
| address<br />
| <br />
|-<br />
| System index<br />
| short<br />
| Unknown what this does. 0 works as a value.<br />
|-<br />
| Internal IDs<br />
| 10x address<br />
| Unknown what these do. 255.255.255.255:19132 for all of them seems to work, any other address will probably work as well.<br />
|-<br />
| Request time<br />
| Long<br />
| <br />
|-<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Incompatible protocol ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x19<br />
| Protocol<br />
| byte<br />
| <br />
|-<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
|}<br />
<br />
=== Unconnected Ping ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x01, 0x02<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| GUID<br />
| Long<br />
| <br />
|}<br />
<br />
=== Frame Set Packet ===<br />
{| class="wikitable"<br />
! Packet ID<br />
!colspan="3"| Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="11"| 0x80..0x8d<br />
|colspan="3"| Frame Set index<br />
| uint24le<br />
| <br />
|-<br />
|rowspan="10"| Frames<br />
|colspan="2"| Flags<br />
| byte<br />
| Top 3 bits are reliability type, fourth bit is 1 when the frame is fragmented and part of a compound.<br />
|-<br />
|colspan="2"| Length IN BITS<br />
| short<br />
| Length of the body in bits.<br />
|-<br />
|colspan="2"| Reliable frame index<br />
| uint24le<br />
| only if reliable<br />
|-<br />
|colspan="2"| Sequenced frame index<br />
| uint24le<br />
| only if sequenced<br />
|-<br />
|rowspan="2"| Order<br />
| Ordered frame index<br />
| uint24le<br />
|rowspan="2"| only if ordered<br />
|-<br />
| Order channel<br />
| byte<br />
|-<br />
|rowspan="3"| Fragment<br />
| Compound size<br />
| int<br />
|rowspan="3"| only if fragmented<br />
|-<br />
| Compound ID<br />
| short<br />
|-<br />
| Index<br />
| int<br />
|-<br />
| Body<br />
| ceil(length/8) bytes<br />
|}<br />
<br />
The reliability types are as follows:<br />
<br />
{| class="wikitable"<br />
! style="text-align: center; font-weight: bold;" | ID<br />
! style="font-weight: bold;" | Name<br />
! style="text-align: center; font-weight: bold;" | Reliable<br />
! style="text-align: center; font-weight: bold;" | Ordered<br />
! style="text-align: center; font-weight: bold;" | Sequenced<br />
|-<br />
| style="text-align: center;" | 0<br />
| unreliable<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 1<br />
| unreliable sequenced<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
|-<br />
| style="text-align: center;" | 2<br />
| reliable<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 3<br />
| reliable ordered<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 4<br />
| reliable sequenced<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
|-<br />
| style="text-align: center;" | 5<br />
| unreliable (+ ACK receipt)<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 6<br />
| reliable (+ ACK receipt)<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 7<br />
| reliable ordered (+ ACK receipt)<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
|}<br />
<br />
Sequenced implies ordered.<br />
<br />
=== Game Packet ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x8e<br />
| Body<br />
| bytes<br />
| Single packet of the GAME protocol.<br />
|}<br />
<br />
=== NACK ===<br />
{| class="wikitable"<br />
! style="font-weight: bold;" | Packet ID<br />
! colspan="3" style="font-weight: bold;" | Field Name<br />
! style="font-weight: bold;" | Field Type<br />
! style="font-weight: bold;" | Notes<br />
|-<br />
| 0xa0<br />
| colspan="3" | Record count<br />
| short<br />
| <br />
|-<br />
| <br />
| rowspan="4" | Record<br />
| colspan="2" | Is Range?<br />
| byte<br />
| 0 for range, 1 for no range<br />
|-<br />
| <br />
| No Range<br />
| Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| rowspan="2" | Range<br />
| Start Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| End Index<br />
| uint24le<br />
| <br />
|}<br />
<br />
=== ACK ===<br />
{| class="wikitable"<br />
! style="font-weight: bold;" | Packet ID<br />
! colspan="3" style="font-weight: bold;" | Field Name<br />
! style="font-weight: bold;" | Field Type<br />
! style="font-weight: bold;" | Notes<br />
|-<br />
| 0xc0<br />
| colspan="3" | Record count<br />
| short<br />
| <br />
|-<br />
| <br />
| rowspan="4" | Record<br />
| colspan="2" | Is Range?<br />
| byte<br />
| 0 for range, 1 for no range<br />
|-<br />
| <br />
| No Range<br />
| Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| rowspan="2" | Range<br />
| Start Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| End Index<br />
| uint24le<br />
| <br />
|}</div>Orladoghttps://wiki.vg/index.php?title=Raknet_Protocol&diff=15805Raknet Protocol2020-06-08T15:18:49Z<p>Orladog: Add byte to Data types</p>
<hr />
<div>:: '''Remember that this page is a WIP.''' Come back later to see a more complete page.<br />
----<br />
<br />
[http://www.jenkinssoftware.com/ RakNet] is a networking library used by Minecraft Bedrock Edition. You might want to also look at the documentation for the [[Bedrock Protocol]].<br />
<br />
This is based on the old [https://wiki.vg/Pocket_Edition_Protocol_Documentation#RakNet_protocol Pocket Edition Protocol Documentation] and may be incomplete or outdated.<br />
<br />
The source code for the RakNet Library can be found [https://github.com/OculusVR/RakNet/ here].<br />
<br />
<br />
'''NOTE:'''<br />
You may want to use an existing library if one exists for your language of choice.<br />
Here is an incomplete list. Not all of these are maintained or complete. If these are outdated you may need to change the protocol version to 9 before it can work. The protocol doesn't seem to have had any significant changes since the official implementation was discontinued in 2014, so as long as you bump the protocol version older libraries are likely to still work.<br />
<br />
{| class="wikitable sortable" style="width: auto; text-align: center;"<br />
|-style="background:#eee"<br />
! Name<br />
!class="unsortable"| Description<br />
! Language<br />
! License<br />
! Active development<br />
|-<br />
! [https://github.com/NukkitX/Network NukkitX Network]<br />
| Network components used within NukkitX, but with great support for general use as well<br />
| Java<br />
| Apache License<br />
| Yes<br />
|-<br />
! [https://github.com/JRakNet/JRakNet JRakNet]<br />
| JRakNet is a networking library for Java which implements the UDP based protocol RakNet<br />
| Java<br />
| MIT<br />
| Yes<br />
|-<br />
! [https://github.com/jython234/JRakLibPlus JRakLibPlus]<br />
| A library for easy creation of RakNet servers, based on RakLib and JRakLib.<br />
| Java<br />
| LGPL<br />
| No<br />
|-<br />
! [https://www.npmjs.com/package/raknet/ raknet]<br />
| UDP network library that follows the RakNet protocol for Node.js<br />
| node.js<br />
| MIT<br />
| No<br />
|-<br />
! [https://pypi.org/project/PyRakLib/ PyRakLib]<br />
| PyRakLib is a networking library that follows the RakNet protocol for MCPE. It is ported from the PHP library: RakLib. <br />
| Python<br />
| GPL<br />
| No<br />
|-<br />
! [https://github.com/facebookarchive/RakNet Raknet] (official)<br />
| The official implementation. Outdated and mostly for reference purposes. May not work with the latest Bedrock.<br />
| C++<br />
| BSD<br />
| No<br />
|}<br />
<br />
== Data types ==<br />
<br />
{| class="wikitable"<br />
|-<br />
!<br />
! Size (Bytes)<br />
! Range<br />
! Notes<br />
|-<br />
! Byte<br />
| 1<br />
| 0 to 255<br />
|<br />
|-<br />
! Long<br />
| 8<br />
| -2^63 to 2^63-1<br />
| Signed 64-bit Integer<br />
|-<br />
! Magic<br />
| 16<br />
| <code>00ffff00fefefefefdfdfdfd12345678</code><br />
| Always those hex bytes, corresponding to RakNet's default OFFLINE_MESSAGE_DATA_ID<br />
|-<br />
! short<br />
| 2<br />
| -32768 to 32767<br />
| <br />
|-<br />
! unsigned short<br />
| 2<br />
| 0 to 65535<br />
| <br />
|-<br />
! string<br />
| unsigned short + string<br />
| N/A<br />
| class="col3" | Prefixed by a short containing the length of the string in characters. It appears that only the following ASCII characters can be displayed: !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~<br />
| -<br />
! byte<br />
| 1<br />
| 0 to 255<br />
|<br />
|}<br />
<br />
== Packets ==<br />
<br />
=== Unconnected Ping ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x01, 0x02<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| MAGIC<br />
| magic<br />
| <br />
|-<br />
| Client GUID<br />
| Long<br />
| <br />
|}<br />
<br />
<code>0x02</code> is only replied to if there are open connections to the server. '''Note:''' as of 0.15.6 it seems that the game refreshes it's LAN world list every 4-5 seconds, however it seems the game will still ping in 1 second intervals.<br><br />
This packet should be responded to with unconnected Pong.<br />
<br />
=== Unconnected Pong ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x1c<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| MAGIC<br />
| magic<br />
| <br />
|-<br />
| Server ID string<br />
| string<br />
| Used for the MOTD. See below for details.<br />
|}<br />
<br />
'''Server ID string format'''<br />
<br />
For Minecraft Bedrock this is separated by semicolons and uses the following format:<br><br />
<code>Edition (MCPE or MCEE for Education Edition);MOTD line 1;Protocol Version;Version Name;Player Count;Max Player Count;Server Unique ID;MOTD line 2;Game mode;Game mode (numeric);Port (IPv4);Port (IPv6);</code><br><br />
Example:<br><br />
<code>MCPE;Dedicated Server;390;1.14.60;0;10;13253860892328930865;Bedrock level;Survival;1;19132;19133;</code><br><br />
Result:<br><br />
[[File:Server_ID_String_Example.png]]<br><br />
The Game mode and Game mode (numeric) values seem to not be used by the client.<br />
<br />
=== Connected Ping ===<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x00<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Connected Pong ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x03<br />
| Ping Time<br />
| Long<br />
| <br />
|-<br />
| Pong Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Offline Connection Request 1 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x05<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Protocol version<br />
| byte<br />
| Currently 9<br />
|-<br />
| MTU<br />
| mtu-46 zero bytes<br />
| The MTU sent in the response appears to be somewhere around the size of this padding + 46 (28 udp overhead, 1 packet id, 16 magic, 1 protocol version)<br />
|}<br />
<br />
The client sends these to the target server with ever decreasing MTU until the server responds. This is used to discover the MTU size for the connection. If the RakNet protocol does not match your own, respond with the Incompatible protocol packet<br />
<br />
=== Offline Connection Response 1 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x06<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| Use security<br />
| boolean<br />
| Make sure this is false, it is vital for the login sequence to continue!<br />
|<br />
|-<br />
| MTU<br />
| short<br />
| see Offline Connection Request 1<br />
|}<br />
<br />
=== Offline Connection Request 2 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x07<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server Address<br />
| address<br />
| <br />
|-<br />
| MTU<br />
| short<br />
| <br />
|-<br />
| Client GUID<br />
| Long<br />
| <br />
|}<br />
<br />
=== Offline Connection Response 2 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x08<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| Client Address<br />
| address<br />
| <br />
|-<br />
| MTU<br />
| short<br />
| <br />
|-<br />
| Encryption enabled?<br />
| byte<br />
| 0 for disabled.<br />
|}<br />
<br />
=== Online Connection Request ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x09<br />
| GUID<br />
| Long<br />
| <br />
|-<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Online Connection Request Accepted ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x10<br />
| Client address<br />
| address<br />
| <br />
|-<br />
| System index<br />
| short<br />
| Unknown what this does. 0 works as a value.<br />
|-<br />
| Internal IDs<br />
| 10x address<br />
| Unknown what these do. 255.255.255.255:19132 for all of them seems to work, any other address will probably work as well.<br />
|-<br />
| Request time<br />
| Long<br />
| <br />
|-<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Incompatible protocol ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x19<br />
| Protocol<br />
| byte<br />
| <br />
|-<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
|}<br />
<br />
=== Unconnected Ping ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x01, 0x02<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| GUID<br />
| Long<br />
| <br />
|}<br />
<br />
=== Frame Set Packet ===<br />
{| class="wikitable"<br />
! Packet ID<br />
!colspan="3"| Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="11"| 0x80..0x8d<br />
|colspan="3"| Frame Set index<br />
| uint24le<br />
| <br />
|-<br />
|rowspan="10"| Frames<br />
|colspan="2"| Flags<br />
| byte<br />
| Top 3 bits are reliability type, fourth bit is 1 when the frame is fragmented and part of a compound.<br />
|-<br />
|colspan="2"| Length IN BITS<br />
| short<br />
| Length of the body in bits.<br />
|-<br />
|colspan="2"| Reliable frame index<br />
| uint24le<br />
| only if reliable<br />
|-<br />
|colspan="2"| Sequenced frame index<br />
| uint24le<br />
| only if sequenced<br />
|-<br />
|rowspan="2"| Order<br />
| Ordered frame index<br />
| uint24le<br />
|rowspan="2"| only if ordered<br />
|-<br />
| Order channel<br />
| byte<br />
|-<br />
|rowspan="3"| Fragment<br />
| Compound size<br />
| int<br />
|rowspan="3"| only if fragmented<br />
|-<br />
| Compound ID<br />
| short<br />
|-<br />
| Index<br />
| int<br />
|-<br />
| Body<br />
| ceil(length/8) bytes<br />
|}<br />
<br />
The reliability types are as follows:<br />
<br />
{| class="wikitable"<br />
! style="text-align: center; font-weight: bold;" | ID<br />
! style="font-weight: bold;" | Name<br />
! style="text-align: center; font-weight: bold;" | Reliable<br />
! style="text-align: center; font-weight: bold;" | Ordered<br />
! style="text-align: center; font-weight: bold;" | Sequenced<br />
|-<br />
| style="text-align: center;" | 0<br />
| unreliable<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 1<br />
| unreliable sequenced<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
|-<br />
| style="text-align: center;" | 2<br />
| reliable<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 3<br />
| reliable ordered<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 4<br />
| reliable sequenced<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
|-<br />
| style="text-align: center;" | 5<br />
| unreliable (+ ACK receipt)<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 6<br />
| reliable (+ ACK receipt)<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 7<br />
| reliable ordered (+ ACK receipt)<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
|}<br />
<br />
Sequenced implies ordered.<br />
<br />
=== Game Packet ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x8e<br />
| Body<br />
| bytes<br />
| Single packet of the GAME protocol.<br />
|}<br />
<br />
=== NACK ===<br />
{| class="wikitable"<br />
! style="font-weight: bold;" | Packet ID<br />
! colspan="3" style="font-weight: bold;" | Field Name<br />
! style="font-weight: bold;" | Field Type<br />
! style="font-weight: bold;" | Notes<br />
|-<br />
| 0xa0<br />
| colspan="3" | Record count<br />
| short<br />
| <br />
|-<br />
| <br />
| rowspan="4" | Record<br />
| colspan="2" | Is Range?<br />
| byte<br />
| 0 for range, 1 for no range<br />
|-<br />
| <br />
| No Range<br />
| Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| rowspan="2" | Range<br />
| Start Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| End Index<br />
| uint24le<br />
| <br />
|}<br />
<br />
=== ACK ===<br />
{| class="wikitable"<br />
! style="font-weight: bold;" | Packet ID<br />
! colspan="3" style="font-weight: bold;" | Field Name<br />
! style="font-weight: bold;" | Field Type<br />
! style="font-weight: bold;" | Notes<br />
|-<br />
| 0xc0<br />
| colspan="3" | Record count<br />
| short<br />
| <br />
|-<br />
| <br />
| rowspan="4" | Record<br />
| colspan="2" | Is Range?<br />
| byte<br />
| 0 for range, 1 for no range<br />
|-<br />
| <br />
| No Range<br />
| Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| rowspan="2" | Range<br />
| Start Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| End Index<br />
| uint24le<br />
| <br />
|}</div>Orladoghttps://wiki.vg/index.php?title=Raknet_Protocol&diff=15804Raknet Protocol2020-06-08T13:23:47Z<p>Orladog: Add info about Game Mode to Unconnected Pong</p>
<hr />
<div>:: '''Remember that this page is a WIP.''' Come back later to see a more complete page.<br />
----<br />
<br />
[http://www.jenkinssoftware.com/ RakNet] is a networking library used by Minecraft Bedrock Edition. You might want to also look at the documentation for the [[Bedrock Protocol]].<br />
<br />
This is based on the old [https://wiki.vg/Pocket_Edition_Protocol_Documentation#RakNet_protocol Pocket Edition Protocol Documentation] and may be incomplete or outdated.<br />
<br />
The source code for the RakNet Library can be found [https://github.com/OculusVR/RakNet/ here].<br />
<br />
<br />
'''NOTE:'''<br />
You may want to use an existing library if one exists for your language of choice.<br />
Here is an incomplete list. Not all of these are maintained or complete. If these are outdated you may need to change the protocol version to 9 before it can work. The protocol doesn't seem to have had any significant changes since the official implementation was discontinued in 2014, so as long as you bump the protocol version older libraries are likely to still work.<br />
<br />
{| class="wikitable sortable" style="width: auto; text-align: center;"<br />
|-style="background:#eee"<br />
! Name<br />
!class="unsortable"| Description<br />
! Language<br />
! License<br />
! Active development<br />
|-<br />
! [https://github.com/NukkitX/Network NukkitX Network]<br />
| Network components used within NukkitX, but with great support for general use as well<br />
| Java<br />
| Apache License<br />
| Yes<br />
|-<br />
! [https://github.com/JRakNet/JRakNet JRakNet]<br />
| JRakNet is a networking library for Java which implements the UDP based protocol RakNet<br />
| Java<br />
| MIT<br />
| Yes<br />
|-<br />
! [https://github.com/jython234/JRakLibPlus JRakLibPlus]<br />
| A library for easy creation of RakNet servers, based on RakLib and JRakLib.<br />
| Java<br />
| LGPL<br />
| No<br />
|-<br />
! [https://www.npmjs.com/package/raknet/ raknet]<br />
| UDP network library that follows the RakNet protocol for Node.js<br />
| node.js<br />
| MIT<br />
| No<br />
|-<br />
! [https://pypi.org/project/PyRakLib/ PyRakLib]<br />
| PyRakLib is a networking library that follows the RakNet protocol for MCPE. It is ported from the PHP library: RakLib. <br />
| Python<br />
| GPL<br />
| No<br />
|-<br />
! [https://github.com/facebookarchive/RakNet Raknet] (official)<br />
| The official implementation. Outdated and mostly for reference purposes. May not work with the latest Bedrock.<br />
| C++<br />
| BSD<br />
| No<br />
|}<br />
<br />
== Data types ==<br />
<br />
{| class="wikitable"<br />
|-<br />
!<br />
! Size (Bytes)<br />
! Range<br />
! Notes<br />
|-<br />
! Byte<br />
| 1<br />
| 0 to 255<br />
|<br />
|-<br />
! Long<br />
| 8<br />
| -2^63 to 2^63-1<br />
| Signed 64-bit Integer<br />
|-<br />
! Magic<br />
| 16<br />
| <code>00ffff00fefefefefdfdfdfd12345678</code><br />
| Always those hex bytes, corresponding to RakNet's default OFFLINE_MESSAGE_DATA_ID<br />
|-<br />
! short<br />
| 2<br />
| -32768 to 32767<br />
| <br />
|-<br />
! unsigned short<br />
| 2<br />
| 0 to 65535<br />
| <br />
|-<br />
! string<br />
| unsigned short + string<br />
| N/A<br />
| class="col3" | Prefixed by a short containing the length of the string in characters. It appears that only the following ASCII characters can be displayed: !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~<br />
|}<br />
<br />
== Packets ==<br />
<br />
=== Unconnected Ping ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x01, 0x02<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| MAGIC<br />
| magic<br />
| <br />
|-<br />
| Client GUID<br />
| Long<br />
| <br />
|}<br />
<br />
<code>0x02</code> is only replied to if there are open connections to the server. '''Note:''' as of 0.15.6 it seems that the game refreshes it's LAN world list every 4-5 seconds, however it seems the game will still ping in 1 second intervals.<br><br />
This packet should be responded to with unconnected Pong.<br />
<br />
=== Unconnected Pong ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x1c<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| MAGIC<br />
| magic<br />
| <br />
|-<br />
| Server ID string<br />
| string<br />
| Used for the MOTD. See below for details.<br />
|}<br />
<br />
'''Server ID string format'''<br />
<br />
For Minecraft Bedrock this is separated by semicolons and uses the following format:<br><br />
<code>Edition (MCPE or MCEE for Education Edition);MOTD line 1;Protocol Version;Version Name;Player Count;Max Player Count;Server Unique ID;MOTD line 2;Game mode;Game mode (numeric);Port (IPv4);Port (IPv6);</code><br><br />
Example:<br><br />
<code>MCPE;Dedicated Server;390;1.14.60;0;10;13253860892328930865;Bedrock level;Survival;1;19132;19133;</code><br><br />
Result:<br><br />
[[File:Server_ID_String_Example.png]]<br><br />
The Game mode and Game mode (numeric) values seem to not be used by the client.<br />
<br />
=== Connected Ping ===<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x00<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Connected Pong ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x03<br />
| Ping Time<br />
| Long<br />
| <br />
|-<br />
| Pong Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Offline Connection Request 1 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x05<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Protocol version<br />
| byte<br />
| Currently 9<br />
|-<br />
| MTU<br />
| mtu-46 zero bytes<br />
| The MTU sent in the response appears to be somewhere around the size of this padding + 46 (28 udp overhead, 1 packet id, 16 magic, 1 protocol version)<br />
|}<br />
<br />
The client sends these to the target server with ever decreasing MTU until the server responds. This is used to discover the MTU size for the connection. If the RakNet protocol does not match your own, respond with the Incompatible protocol packet<br />
<br />
=== Offline Connection Response 1 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x06<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| Use security<br />
| boolean<br />
| Make sure this is false, it is vital for the login sequence to continue!<br />
|<br />
|-<br />
| MTU<br />
| short<br />
| see Offline Connection Request 1<br />
|}<br />
<br />
=== Offline Connection Request 2 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x07<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server Address<br />
| address<br />
| <br />
|-<br />
| MTU<br />
| short<br />
| <br />
|-<br />
| Client GUID<br />
| Long<br />
| <br />
|}<br />
<br />
=== Offline Connection Response 2 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x08<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| Client Address<br />
| address<br />
| <br />
|-<br />
| MTU<br />
| short<br />
| <br />
|-<br />
| Encryption enabled?<br />
| byte<br />
| 0 for disabled.<br />
|}<br />
<br />
=== Online Connection Request ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x09<br />
| GUID<br />
| Long<br />
| <br />
|-<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Online Connection Request Accepted ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x10<br />
| Client address<br />
| address<br />
| <br />
|-<br />
| System index<br />
| short<br />
| Unknown what this does. 0 works as a value.<br />
|-<br />
| Internal IDs<br />
| 10x address<br />
| Unknown what these do. 255.255.255.255:19132 for all of them seems to work, any other address will probably work as well.<br />
|-<br />
| Request time<br />
| Long<br />
| <br />
|-<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Incompatible protocol ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x19<br />
| Protocol<br />
| byte<br />
| <br />
|-<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
|}<br />
<br />
=== Unconnected Ping ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x01, 0x02<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| GUID<br />
| Long<br />
| <br />
|}<br />
<br />
=== Frame Set Packet ===<br />
{| class="wikitable"<br />
! Packet ID<br />
!colspan="3"| Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="11"| 0x80..0x8d<br />
|colspan="3"| Frame Set index<br />
| uint24le<br />
| <br />
|-<br />
|rowspan="10"| Frames<br />
|colspan="2"| Flags<br />
| byte<br />
| Top 3 bits are reliability type, fourth bit is 1 when the frame is fragmented and part of a compound.<br />
|-<br />
|colspan="2"| Length IN BITS<br />
| short<br />
| Length of the body in bits.<br />
|-<br />
|colspan="2"| Reliable frame index<br />
| uint24le<br />
| only if reliable<br />
|-<br />
|colspan="2"| Sequenced frame index<br />
| uint24le<br />
| only if sequenced<br />
|-<br />
|rowspan="2"| Order<br />
| Ordered frame index<br />
| uint24le<br />
|rowspan="2"| only if ordered<br />
|-<br />
| Order channel<br />
| byte<br />
|-<br />
|rowspan="3"| Fragment<br />
| Compound size<br />
| int<br />
|rowspan="3"| only if fragmented<br />
|-<br />
| Compound ID<br />
| short<br />
|-<br />
| Index<br />
| int<br />
|-<br />
| Body<br />
| ceil(length/8) bytes<br />
|}<br />
<br />
The reliability types are as follows:<br />
<br />
{| class="wikitable"<br />
! style="text-align: center; font-weight: bold;" | ID<br />
! style="font-weight: bold;" | Name<br />
! style="text-align: center; font-weight: bold;" | Reliable<br />
! style="text-align: center; font-weight: bold;" | Ordered<br />
! style="text-align: center; font-weight: bold;" | Sequenced<br />
|-<br />
| style="text-align: center;" | 0<br />
| unreliable<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 1<br />
| unreliable sequenced<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
|-<br />
| style="text-align: center;" | 2<br />
| reliable<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 3<br />
| reliable ordered<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 4<br />
| reliable sequenced<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
|-<br />
| style="text-align: center;" | 5<br />
| unreliable (+ ACK receipt)<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 6<br />
| reliable (+ ACK receipt)<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 7<br />
| reliable ordered (+ ACK receipt)<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
|}<br />
<br />
Sequenced implies ordered.<br />
<br />
=== Game Packet ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x8e<br />
| Body<br />
| bytes<br />
| Single packet of the GAME protocol.<br />
|}<br />
<br />
=== NACK ===<br />
{| class="wikitable"<br />
! style="font-weight: bold;" | Packet ID<br />
! colspan="3" style="font-weight: bold;" | Field Name<br />
! style="font-weight: bold;" | Field Type<br />
! style="font-weight: bold;" | Notes<br />
|-<br />
| 0xa0<br />
| colspan="3" | Record count<br />
| short<br />
| <br />
|-<br />
| <br />
| rowspan="4" | Record<br />
| colspan="2" | Is Range?<br />
| byte<br />
| 0 for range, 1 for no range<br />
|-<br />
| <br />
| No Range<br />
| Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| rowspan="2" | Range<br />
| Start Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| End Index<br />
| uint24le<br />
| <br />
|}<br />
<br />
=== ACK ===<br />
{| class="wikitable"<br />
! style="font-weight: bold;" | Packet ID<br />
! colspan="3" style="font-weight: bold;" | Field Name<br />
! style="font-weight: bold;" | Field Type<br />
! style="font-weight: bold;" | Notes<br />
|-<br />
| 0xc0<br />
| colspan="3" | Record count<br />
| short<br />
| <br />
|-<br />
| <br />
| rowspan="4" | Record<br />
| colspan="2" | Is Range?<br />
| byte<br />
| 0 for range, 1 for no range<br />
|-<br />
| <br />
| No Range<br />
| Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| rowspan="2" | Range<br />
| Start Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| End Index<br />
| uint24le<br />
| <br />
|}</div>Orladoghttps://wiki.vg/index.php?title=Raknet_Protocol&diff=15803Raknet Protocol2020-06-08T13:22:30Z<p>Orladog: Fix unknown value in Unconnected Pong</p>
<hr />
<div>:: '''Remember that this page is a WIP.''' Come back later to see a more complete page.<br />
----<br />
<br />
[http://www.jenkinssoftware.com/ RakNet] is a networking library used by Minecraft Bedrock Edition. You might want to also look at the documentation for the [[Bedrock Protocol]].<br />
<br />
This is based on the old [https://wiki.vg/Pocket_Edition_Protocol_Documentation#RakNet_protocol Pocket Edition Protocol Documentation] and may be incomplete or outdated.<br />
<br />
The source code for the RakNet Library can be found [https://github.com/OculusVR/RakNet/ here].<br />
<br />
<br />
'''NOTE:'''<br />
You may want to use an existing library if one exists for your language of choice.<br />
Here is an incomplete list. Not all of these are maintained or complete. If these are outdated you may need to change the protocol version to 9 before it can work. The protocol doesn't seem to have had any significant changes since the official implementation was discontinued in 2014, so as long as you bump the protocol version older libraries are likely to still work.<br />
<br />
{| class="wikitable sortable" style="width: auto; text-align: center;"<br />
|-style="background:#eee"<br />
! Name<br />
!class="unsortable"| Description<br />
! Language<br />
! License<br />
! Active development<br />
|-<br />
! [https://github.com/NukkitX/Network NukkitX Network]<br />
| Network components used within NukkitX, but with great support for general use as well<br />
| Java<br />
| Apache License<br />
| Yes<br />
|-<br />
! [https://github.com/JRakNet/JRakNet JRakNet]<br />
| JRakNet is a networking library for Java which implements the UDP based protocol RakNet<br />
| Java<br />
| MIT<br />
| Yes<br />
|-<br />
! [https://github.com/jython234/JRakLibPlus JRakLibPlus]<br />
| A library for easy creation of RakNet servers, based on RakLib and JRakLib.<br />
| Java<br />
| LGPL<br />
| No<br />
|-<br />
! [https://www.npmjs.com/package/raknet/ raknet]<br />
| UDP network library that follows the RakNet protocol for Node.js<br />
| node.js<br />
| MIT<br />
| No<br />
|-<br />
! [https://pypi.org/project/PyRakLib/ PyRakLib]<br />
| PyRakLib is a networking library that follows the RakNet protocol for MCPE. It is ported from the PHP library: RakLib. <br />
| Python<br />
| GPL<br />
| No<br />
|-<br />
! [https://github.com/facebookarchive/RakNet Raknet] (official)<br />
| The official implementation. Outdated and mostly for reference purposes. May not work with the latest Bedrock.<br />
| C++<br />
| BSD<br />
| No<br />
|}<br />
<br />
== Data types ==<br />
<br />
{| class="wikitable"<br />
|-<br />
!<br />
! Size (Bytes)<br />
! Range<br />
! Notes<br />
|-<br />
! Byte<br />
| 1<br />
| 0 to 255<br />
|<br />
|-<br />
! Long<br />
| 8<br />
| -2^63 to 2^63-1<br />
| Signed 64-bit Integer<br />
|-<br />
! Magic<br />
| 16<br />
| <code>00ffff00fefefefefdfdfdfd12345678</code><br />
| Always those hex bytes, corresponding to RakNet's default OFFLINE_MESSAGE_DATA_ID<br />
|-<br />
! short<br />
| 2<br />
| -32768 to 32767<br />
| <br />
|-<br />
! unsigned short<br />
| 2<br />
| 0 to 65535<br />
| <br />
|-<br />
! string<br />
| unsigned short + string<br />
| N/A<br />
| class="col3" | Prefixed by a short containing the length of the string in characters. It appears that only the following ASCII characters can be displayed: !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~<br />
|}<br />
<br />
== Packets ==<br />
<br />
=== Unconnected Ping ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x01, 0x02<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| MAGIC<br />
| magic<br />
| <br />
|-<br />
| Client GUID<br />
| Long<br />
| <br />
|}<br />
<br />
<code>0x02</code> is only replied to if there are open connections to the server. '''Note:''' as of 0.15.6 it seems that the game refreshes it's LAN world list every 4-5 seconds, however it seems the game will still ping in 1 second intervals.<br><br />
This packet should be responded to with unconnected Pong.<br />
<br />
=== Unconnected Pong ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x1c<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| MAGIC<br />
| magic<br />
| <br />
|-<br />
| Server ID string<br />
| string<br />
| Used for the MOTD. See below for details.<br />
|}<br />
<br />
'''Server ID string format'''<br />
<br />
For Minecraft Bedrock this is separated by semicolons and uses the following format:<br><br />
<code>Edition (MCPE or MCEE for Education Edition);MOTD line 1;Protocol Version;Version Name;Player Count;Max Player Count;Server Unique ID;MOTD line 2;Gamemode;Gamemode (numeric);Port (IPv4);Port (IPv6);</code><br><br />
Example:<br><br />
<code>MCPE;Dedicated Server;390;1.14.60;0;10;13253860892328930865;Bedrock level;Survival;1;19132;19133;</code><br><br />
Result:<br><br />
[[File:Server_ID_String_Example.png]]<br />
<br />
=== Connected Ping ===<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x00<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Connected Pong ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x03<br />
| Ping Time<br />
| Long<br />
| <br />
|-<br />
| Pong Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Offline Connection Request 1 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x05<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Protocol version<br />
| byte<br />
| Currently 9<br />
|-<br />
| MTU<br />
| mtu-46 zero bytes<br />
| The MTU sent in the response appears to be somewhere around the size of this padding + 46 (28 udp overhead, 1 packet id, 16 magic, 1 protocol version)<br />
|}<br />
<br />
The client sends these to the target server with ever decreasing MTU until the server responds. This is used to discover the MTU size for the connection. If the RakNet protocol does not match your own, respond with the Incompatible protocol packet<br />
<br />
=== Offline Connection Response 1 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x06<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| Use security<br />
| boolean<br />
| Make sure this is false, it is vital for the login sequence to continue!<br />
|<br />
|-<br />
| MTU<br />
| short<br />
| see Offline Connection Request 1<br />
|}<br />
<br />
=== Offline Connection Request 2 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x07<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server Address<br />
| address<br />
| <br />
|-<br />
| MTU<br />
| short<br />
| <br />
|-<br />
| Client GUID<br />
| Long<br />
| <br />
|}<br />
<br />
=== Offline Connection Response 2 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x08<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| Client Address<br />
| address<br />
| <br />
|-<br />
| MTU<br />
| short<br />
| <br />
|-<br />
| Encryption enabled?<br />
| byte<br />
| 0 for disabled.<br />
|}<br />
<br />
=== Online Connection Request ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x09<br />
| GUID<br />
| Long<br />
| <br />
|-<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Online Connection Request Accepted ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x10<br />
| Client address<br />
| address<br />
| <br />
|-<br />
| System index<br />
| short<br />
| Unknown what this does. 0 works as a value.<br />
|-<br />
| Internal IDs<br />
| 10x address<br />
| Unknown what these do. 255.255.255.255:19132 for all of them seems to work, any other address will probably work as well.<br />
|-<br />
| Request time<br />
| Long<br />
| <br />
|-<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Incompatible protocol ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x19<br />
| Protocol<br />
| byte<br />
| <br />
|-<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
|}<br />
<br />
=== Unconnected Ping ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x01, 0x02<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| GUID<br />
| Long<br />
| <br />
|}<br />
<br />
=== Frame Set Packet ===<br />
{| class="wikitable"<br />
! Packet ID<br />
!colspan="3"| Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="11"| 0x80..0x8d<br />
|colspan="3"| Frame Set index<br />
| uint24le<br />
| <br />
|-<br />
|rowspan="10"| Frames<br />
|colspan="2"| Flags<br />
| byte<br />
| Top 3 bits are reliability type, fourth bit is 1 when the frame is fragmented and part of a compound.<br />
|-<br />
|colspan="2"| Length IN BITS<br />
| short<br />
| Length of the body in bits.<br />
|-<br />
|colspan="2"| Reliable frame index<br />
| uint24le<br />
| only if reliable<br />
|-<br />
|colspan="2"| Sequenced frame index<br />
| uint24le<br />
| only if sequenced<br />
|-<br />
|rowspan="2"| Order<br />
| Ordered frame index<br />
| uint24le<br />
|rowspan="2"| only if ordered<br />
|-<br />
| Order channel<br />
| byte<br />
|-<br />
|rowspan="3"| Fragment<br />
| Compound size<br />
| int<br />
|rowspan="3"| only if fragmented<br />
|-<br />
| Compound ID<br />
| short<br />
|-<br />
| Index<br />
| int<br />
|-<br />
| Body<br />
| ceil(length/8) bytes<br />
|}<br />
<br />
The reliability types are as follows:<br />
<br />
{| class="wikitable"<br />
! style="text-align: center; font-weight: bold;" | ID<br />
! style="font-weight: bold;" | Name<br />
! style="text-align: center; font-weight: bold;" | Reliable<br />
! style="text-align: center; font-weight: bold;" | Ordered<br />
! style="text-align: center; font-weight: bold;" | Sequenced<br />
|-<br />
| style="text-align: center;" | 0<br />
| unreliable<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 1<br />
| unreliable sequenced<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
|-<br />
| style="text-align: center;" | 2<br />
| reliable<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 3<br />
| reliable ordered<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 4<br />
| reliable sequenced<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
|-<br />
| style="text-align: center;" | 5<br />
| unreliable (+ ACK receipt)<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 6<br />
| reliable (+ ACK receipt)<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 7<br />
| reliable ordered (+ ACK receipt)<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
|}<br />
<br />
Sequenced implies ordered.<br />
<br />
=== Game Packet ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x8e<br />
| Body<br />
| bytes<br />
| Single packet of the GAME protocol.<br />
|}<br />
<br />
=== NACK ===<br />
{| class="wikitable"<br />
! style="font-weight: bold;" | Packet ID<br />
! colspan="3" style="font-weight: bold;" | Field Name<br />
! style="font-weight: bold;" | Field Type<br />
! style="font-weight: bold;" | Notes<br />
|-<br />
| 0xa0<br />
| colspan="3" | Record count<br />
| short<br />
| <br />
|-<br />
| <br />
| rowspan="4" | Record<br />
| colspan="2" | Is Range?<br />
| byte<br />
| 0 for range, 1 for no range<br />
|-<br />
| <br />
| No Range<br />
| Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| rowspan="2" | Range<br />
| Start Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| End Index<br />
| uint24le<br />
| <br />
|}<br />
<br />
=== ACK ===<br />
{| class="wikitable"<br />
! style="font-weight: bold;" | Packet ID<br />
! colspan="3" style="font-weight: bold;" | Field Name<br />
! style="font-weight: bold;" | Field Type<br />
! style="font-weight: bold;" | Notes<br />
|-<br />
| 0xc0<br />
| colspan="3" | Record count<br />
| short<br />
| <br />
|-<br />
| <br />
| rowspan="4" | Record<br />
| colspan="2" | Is Range?<br />
| byte<br />
| 0 for range, 1 for no range<br />
|-<br />
| <br />
| No Range<br />
| Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| rowspan="2" | Range<br />
| Start Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| End Index<br />
| uint24le<br />
| <br />
|}</div>Orladoghttps://wiki.vg/index.php?title=Raknet_Protocol&diff=15802Raknet Protocol2020-06-08T13:11:53Z<p>Orladog: Change "abandoned" to "discontinued"</p>
<hr />
<div>:: '''Remember that this page is a WIP.''' Come back later to see a more complete page.<br />
----<br />
<br />
[http://www.jenkinssoftware.com/ RakNet] is a networking library used by Minecraft Bedrock Edition. You might want to also look at the documentation for the [[Bedrock Protocol]].<br />
<br />
This is based on the old [https://wiki.vg/Pocket_Edition_Protocol_Documentation#RakNet_protocol Pocket Edition Protocol Documentation] and may be incomplete or outdated.<br />
<br />
The source code for the RakNet Library can be found [https://github.com/OculusVR/RakNet/ here].<br />
<br />
<br />
'''NOTE:'''<br />
You may want to use an existing library if one exists for your language of choice.<br />
Here is an incomplete list. Not all of these are maintained or complete. If these are outdated you may need to change the protocol version to 9 before it can work. The protocol doesn't seem to have had any significant changes since the official implementation was discontinued in 2014, so as long as you bump the protocol version older libraries are likely to still work.<br />
<br />
{| class="wikitable sortable" style="width: auto; text-align: center;"<br />
|-style="background:#eee"<br />
! Name<br />
!class="unsortable"| Description<br />
! Language<br />
! License<br />
! Active development<br />
|-<br />
! [https://github.com/NukkitX/Network NukkitX Network]<br />
| Network components used within NukkitX, but with great support for general use as well<br />
| Java<br />
| Apache License<br />
| Yes<br />
|-<br />
! [https://github.com/JRakNet/JRakNet JRakNet]<br />
| JRakNet is a networking library for Java which implements the UDP based protocol RakNet<br />
| Java<br />
| MIT<br />
| Yes<br />
|-<br />
! [https://github.com/jython234/JRakLibPlus JRakLibPlus]<br />
| A library for easy creation of RakNet servers, based on RakLib and JRakLib.<br />
| Java<br />
| LGPL<br />
| No<br />
|-<br />
! [https://www.npmjs.com/package/raknet/ raknet]<br />
| UDP network library that follows the RakNet protocol for Node.js<br />
| node.js<br />
| MIT<br />
| No<br />
|-<br />
! [https://pypi.org/project/PyRakLib/ PyRakLib]<br />
| PyRakLib is a networking library that follows the RakNet protocol for MCPE. It is ported from the PHP library: RakLib. <br />
| Python<br />
| GPL<br />
| No<br />
|-<br />
! [https://github.com/facebookarchive/RakNet Raknet] (official)<br />
| The official implementation. Outdated and mostly for reference purposes. May not work with the latest Bedrock.<br />
| C++<br />
| BSD<br />
| No<br />
|}<br />
<br />
== Data types ==<br />
<br />
{| class="wikitable"<br />
|-<br />
!<br />
! Size (Bytes)<br />
! Range<br />
! Notes<br />
|-<br />
! Byte<br />
| 1<br />
| 0 to 255<br />
|<br />
|-<br />
! Long<br />
| 8<br />
| -2^63 to 2^63-1<br />
| Signed 64-bit Integer<br />
|-<br />
! Magic<br />
| 16<br />
| <code>00ffff00fefefefefdfdfdfd12345678</code><br />
| Always those hex bytes, corresponding to RakNet's default OFFLINE_MESSAGE_DATA_ID<br />
|-<br />
! short<br />
| 2<br />
| -32768 to 32767<br />
| <br />
|-<br />
! unsigned short<br />
| 2<br />
| 0 to 65535<br />
| <br />
|-<br />
! string<br />
| unsigned short + string<br />
| N/A<br />
| class="col3" | Prefixed by a short containing the length of the string in characters. It appears that only the following ASCII characters can be displayed: !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~<br />
|}<br />
<br />
== Packets ==<br />
<br />
=== Unconnected Ping ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x01, 0x02<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| MAGIC<br />
| magic<br />
| <br />
|-<br />
| Client GUID<br />
| Long<br />
| <br />
|}<br />
<br />
<code>0x02</code> is only replied to if there are open connections to the server. '''Note:''' as of 0.15.6 it seems that the game refreshes it's LAN world list every 4-5 seconds, however it seems the game will still ping in 1 second intervals.<br><br />
This packet should be responded to with unconnected Pong.<br />
<br />
=== Unconnected Pong ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x1c<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| MAGIC<br />
| magic<br />
| <br />
|-<br />
| Server ID string<br />
| string<br />
| Used for the MOTD. See below for details.<br />
|}<br />
<br />
'''Server ID string format'''<br />
<br />
For Minecraft Bedrock this is separated by semicolons and uses the following format:<br><br />
<code>Edition (MCPE or MCEE for Education Edition);MOTD line 1;Protocol Version;Version Name;Player Count;Max Player Count;Server Unique ID;MOTD line 2;Gamemode;Unknown;Port (IPv4);Port (IPv6);</code><br><br />
Example:<br><br />
<code>MCPE;Dedicated Server;390;1.14.60;0;10;13253860892328930865;Bedrock level;Survival;1;19132;19133;</code><br><br />
Result:<br><br />
[[File:Server_ID_String_Example.png]]<br />
<br />
=== Connected Ping ===<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x00<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Connected Pong ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x03<br />
| Ping Time<br />
| Long<br />
| <br />
|-<br />
| Pong Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Offline Connection Request 1 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x05<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Protocol version<br />
| byte<br />
| Currently 9<br />
|-<br />
| MTU<br />
| mtu-46 zero bytes<br />
| The MTU sent in the response appears to be somewhere around the size of this padding + 46 (28 udp overhead, 1 packet id, 16 magic, 1 protocol version)<br />
|}<br />
<br />
The client sends these to the target server with ever decreasing MTU until the server responds. This is used to discover the MTU size for the connection. If the RakNet protocol does not match your own, respond with the Incompatible protocol packet<br />
<br />
=== Offline Connection Response 1 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x06<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| Use security<br />
| boolean<br />
| Make sure this is false, it is vital for the login sequence to continue!<br />
|<br />
|-<br />
| MTU<br />
| short<br />
| see Offline Connection Request 1<br />
|}<br />
<br />
=== Offline Connection Request 2 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x07<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server Address<br />
| address<br />
| <br />
|-<br />
| MTU<br />
| short<br />
| <br />
|-<br />
| Client GUID<br />
| Long<br />
| <br />
|}<br />
<br />
=== Offline Connection Response 2 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x08<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| Client Address<br />
| address<br />
| <br />
|-<br />
| MTU<br />
| short<br />
| <br />
|-<br />
| Encryption enabled?<br />
| byte<br />
| 0 for disabled.<br />
|}<br />
<br />
=== Online Connection Request ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x09<br />
| GUID<br />
| Long<br />
| <br />
|-<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Online Connection Request Accepted ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x10<br />
| Client address<br />
| address<br />
| <br />
|-<br />
| System index<br />
| short<br />
| Unknown what this does. 0 works as a value.<br />
|-<br />
| Internal IDs<br />
| 10x address<br />
| Unknown what these do. 255.255.255.255:19132 for all of them seems to work, any other address will probably work as well.<br />
|-<br />
| Request time<br />
| Long<br />
| <br />
|-<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Incompatible protocol ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x19<br />
| Protocol<br />
| byte<br />
| <br />
|-<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
|}<br />
<br />
=== Unconnected Ping ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x01, 0x02<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| GUID<br />
| Long<br />
| <br />
|}<br />
<br />
=== Frame Set Packet ===<br />
{| class="wikitable"<br />
! Packet ID<br />
!colspan="3"| Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="11"| 0x80..0x8d<br />
|colspan="3"| Frame Set index<br />
| uint24le<br />
| <br />
|-<br />
|rowspan="10"| Frames<br />
|colspan="2"| Flags<br />
| byte<br />
| Top 3 bits are reliability type, fourth bit is 1 when the frame is fragmented and part of a compound.<br />
|-<br />
|colspan="2"| Length IN BITS<br />
| short<br />
| Length of the body in bits.<br />
|-<br />
|colspan="2"| Reliable frame index<br />
| uint24le<br />
| only if reliable<br />
|-<br />
|colspan="2"| Sequenced frame index<br />
| uint24le<br />
| only if sequenced<br />
|-<br />
|rowspan="2"| Order<br />
| Ordered frame index<br />
| uint24le<br />
|rowspan="2"| only if ordered<br />
|-<br />
| Order channel<br />
| byte<br />
|-<br />
|rowspan="3"| Fragment<br />
| Compound size<br />
| int<br />
|rowspan="3"| only if fragmented<br />
|-<br />
| Compound ID<br />
| short<br />
|-<br />
| Index<br />
| int<br />
|-<br />
| Body<br />
| ceil(length/8) bytes<br />
|}<br />
<br />
The reliability types are as follows:<br />
<br />
{| class="wikitable"<br />
! style="text-align: center; font-weight: bold;" | ID<br />
! style="font-weight: bold;" | Name<br />
! style="text-align: center; font-weight: bold;" | Reliable<br />
! style="text-align: center; font-weight: bold;" | Ordered<br />
! style="text-align: center; font-weight: bold;" | Sequenced<br />
|-<br />
| style="text-align: center;" | 0<br />
| unreliable<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 1<br />
| unreliable sequenced<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
|-<br />
| style="text-align: center;" | 2<br />
| reliable<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 3<br />
| reliable ordered<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 4<br />
| reliable sequenced<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
|-<br />
| style="text-align: center;" | 5<br />
| unreliable (+ ACK receipt)<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 6<br />
| reliable (+ ACK receipt)<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 7<br />
| reliable ordered (+ ACK receipt)<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
|}<br />
<br />
Sequenced implies ordered.<br />
<br />
=== Game Packet ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x8e<br />
| Body<br />
| bytes<br />
| Single packet of the GAME protocol.<br />
|}<br />
<br />
=== NACK ===<br />
{| class="wikitable"<br />
! style="font-weight: bold;" | Packet ID<br />
! colspan="3" style="font-weight: bold;" | Field Name<br />
! style="font-weight: bold;" | Field Type<br />
! style="font-weight: bold;" | Notes<br />
|-<br />
| 0xa0<br />
| colspan="3" | Record count<br />
| short<br />
| <br />
|-<br />
| <br />
| rowspan="4" | Record<br />
| colspan="2" | Is Range?<br />
| byte<br />
| 0 for range, 1 for no range<br />
|-<br />
| <br />
| No Range<br />
| Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| rowspan="2" | Range<br />
| Start Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| End Index<br />
| uint24le<br />
| <br />
|}<br />
<br />
=== ACK ===<br />
{| class="wikitable"<br />
! style="font-weight: bold;" | Packet ID<br />
! colspan="3" style="font-weight: bold;" | Field Name<br />
! style="font-weight: bold;" | Field Type<br />
! style="font-weight: bold;" | Notes<br />
|-<br />
| 0xc0<br />
| colspan="3" | Record count<br />
| short<br />
| <br />
|-<br />
| <br />
| rowspan="4" | Record<br />
| colspan="2" | Is Range?<br />
| byte<br />
| 0 for range, 1 for no range<br />
|-<br />
| <br />
| No Range<br />
| Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| rowspan="2" | Range<br />
| Start Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| End Index<br />
| uint24le<br />
| <br />
|}</div>Orladoghttps://wiki.vg/index.php?title=Raknet_Protocol&diff=15801Raknet Protocol2020-06-08T13:06:24Z<p>Orladog: </p>
<hr />
<div>:: '''Remember that this page is a WIP.''' Come back later to see a more complete page.<br />
----<br />
<br />
[http://www.jenkinssoftware.com/ RakNet] is a networking library used by Minecraft Bedrock Edition. You might want to also look at the documentation for the [[Bedrock Protocol]].<br />
<br />
This is based on the old [https://wiki.vg/Pocket_Edition_Protocol_Documentation#RakNet_protocol Pocket Edition Protocol Documentation] and may be incomplete or outdated.<br />
<br />
The source code for the RakNet Library can be found [https://github.com/OculusVR/RakNet/ here].<br />
<br />
<br />
'''NOTE:'''<br />
You may want to use an existing library if one exists for your language of choice.<br />
Here is an incomplete list. Not all of these are maintained or complete. If these are outdated you may need to change the protocol version to 9 before it can work. The protocol doesn't seem to have had any significant changes since the official implementation was abandoned in 2014, so as long as you bump the protocol version older libraries are likely to still work.<br />
<br />
{| class="wikitable sortable" style="width: auto; text-align: center;"<br />
|-style="background:#eee"<br />
! Name<br />
!class="unsortable"| Description<br />
! Language<br />
! License<br />
! Active development<br />
|-<br />
! [https://github.com/NukkitX/Network NukkitX Network]<br />
| Network components used within NukkitX, but with great support for general use as well<br />
| Java<br />
| Apache License<br />
| Yes<br />
|-<br />
! [https://github.com/JRakNet/JRakNet JRakNet]<br />
| JRakNet is a networking library for Java which implements the UDP based protocol RakNet<br />
| Java<br />
| MIT<br />
| Yes<br />
|-<br />
! [https://github.com/jython234/JRakLibPlus JRakLibPlus]<br />
| A library for easy creation of RakNet servers, based on RakLib and JRakLib.<br />
| Java<br />
| LGPL<br />
| No<br />
|-<br />
! [https://www.npmjs.com/package/raknet/ raknet]<br />
| UDP network library that follows the RakNet protocol for Node.js<br />
| node.js<br />
| MIT<br />
| No<br />
|-<br />
! [https://pypi.org/project/PyRakLib/ PyRakLib]<br />
| PyRakLib is a networking library that follows the RakNet protocol for MCPE. It is ported from the PHP library: RakLib. <br />
| Python<br />
| GPL<br />
| No<br />
|-<br />
! [https://github.com/facebookarchive/RakNet Raknet] (official)<br />
| The official implementation. Outdated and mostly for reference purposes. May not work with the latest Bedrock.<br />
| C++<br />
| BSD<br />
| No<br />
|}<br />
<br />
== Data types ==<br />
<br />
{| class="wikitable"<br />
|-<br />
!<br />
! Size (Bytes)<br />
! Range<br />
! Notes<br />
|-<br />
! Byte<br />
| 1<br />
| 0 to 255<br />
|<br />
|-<br />
! Long<br />
| 8<br />
| -2^63 to 2^63-1<br />
| Signed 64-bit Integer<br />
|-<br />
! Magic<br />
| 16<br />
| <code>00ffff00fefefefefdfdfdfd12345678</code><br />
| Always those hex bytes, corresponding to RakNet's default OFFLINE_MESSAGE_DATA_ID<br />
|-<br />
! short<br />
| 2<br />
| -32768 to 32767<br />
| <br />
|-<br />
! unsigned short<br />
| 2<br />
| 0 to 65535<br />
| <br />
|-<br />
! string<br />
| unsigned short + string<br />
| N/A<br />
| class="col3" | Prefixed by a short containing the length of the string in characters. It appears that only the following ASCII characters can be displayed: !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~<br />
|}<br />
<br />
== Packets ==<br />
<br />
=== Unconnected Ping ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x01, 0x02<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| MAGIC<br />
| magic<br />
| <br />
|-<br />
| Client GUID<br />
| Long<br />
| <br />
|}<br />
<br />
<code>0x02</code> is only replied to if there are open connections to the server. '''Note:''' as of 0.15.6 it seems that the game refreshes it's LAN world list every 4-5 seconds, however it seems the game will still ping in 1 second intervals.<br><br />
This packet should be responded to with unconnected Pong.<br />
<br />
=== Unconnected Pong ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x1c<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| MAGIC<br />
| magic<br />
| <br />
|-<br />
| Server ID string<br />
| string<br />
| Used for the MOTD. See below for details.<br />
|}<br />
<br />
'''Server ID string format'''<br />
<br />
For Minecraft Bedrock this is separated by semicolons and uses the following format:<br><br />
<code>Edition (MCPE or MCEE for Education Edition);MOTD line 1;Protocol Version;Version Name;Player Count;Max Player Count;Server Unique ID;MOTD line 2;Gamemode;Unknown;Port (IPv4);Port (IPv6);</code><br><br />
Example:<br><br />
<code>MCPE;Dedicated Server;390;1.14.60;0;10;13253860892328930865;Bedrock level;Survival;1;19132;19133;</code><br><br />
Result:<br><br />
[[File:Server_ID_String_Example.png]]<br />
<br />
=== Connected Ping ===<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x00<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Connected Pong ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x03<br />
| Ping Time<br />
| Long<br />
| <br />
|-<br />
| Pong Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Offline Connection Request 1 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x05<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Protocol version<br />
| byte<br />
| Currently 9<br />
|-<br />
| MTU<br />
| mtu-46 zero bytes<br />
| The MTU sent in the response appears to be somewhere around the size of this padding + 46 (28 udp overhead, 1 packet id, 16 magic, 1 protocol version)<br />
|}<br />
<br />
The client sends these to the target server with ever decreasing MTU until the server responds. This is used to discover the MTU size for the connection. If the RakNet protocol does not match your own, respond with the Incompatible protocol packet<br />
<br />
=== Offline Connection Response 1 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x06<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| Use security<br />
| boolean<br />
| Make sure this is false, it is vital for the login sequence to continue!<br />
|<br />
|-<br />
| MTU<br />
| short<br />
| see Offline Connection Request 1<br />
|}<br />
<br />
=== Offline Connection Request 2 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x07<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server Address<br />
| address<br />
| <br />
|-<br />
| MTU<br />
| short<br />
| <br />
|-<br />
| Client GUID<br />
| Long<br />
| <br />
|}<br />
<br />
=== Offline Connection Response 2 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x08<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| Client Address<br />
| address<br />
| <br />
|-<br />
| MTU<br />
| short<br />
| <br />
|-<br />
| Encryption enabled?<br />
| byte<br />
| 0 for disabled.<br />
|}<br />
<br />
=== Online Connection Request ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x09<br />
| GUID<br />
| Long<br />
| <br />
|-<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Online Connection Request Accepted ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x10<br />
| Client address<br />
| address<br />
| <br />
|-<br />
| System index<br />
| short<br />
| Unknown what this does. 0 works as a value.<br />
|-<br />
| Internal IDs<br />
| 10x address<br />
| Unknown what these do. 255.255.255.255:19132 for all of them seems to work, any other address will probably work as well.<br />
|-<br />
| Request time<br />
| Long<br />
| <br />
|-<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Incompatible protocol ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x19<br />
| Protocol<br />
| byte<br />
| <br />
|-<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
|}<br />
<br />
=== Unconnected Ping ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x01, 0x02<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| GUID<br />
| Long<br />
| <br />
|}<br />
<br />
=== Frame Set Packet ===<br />
{| class="wikitable"<br />
! Packet ID<br />
!colspan="3"| Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="11"| 0x80..0x8d<br />
|colspan="3"| Frame Set index<br />
| uint24le<br />
| <br />
|-<br />
|rowspan="10"| Frames<br />
|colspan="2"| Flags<br />
| byte<br />
| Top 3 bits are reliability type, fourth bit is 1 when the frame is fragmented and part of a compound.<br />
|-<br />
|colspan="2"| Length IN BITS<br />
| short<br />
| Length of the body in bits.<br />
|-<br />
|colspan="2"| Reliable frame index<br />
| uint24le<br />
| only if reliable<br />
|-<br />
|colspan="2"| Sequenced frame index<br />
| uint24le<br />
| only if sequenced<br />
|-<br />
|rowspan="2"| Order<br />
| Ordered frame index<br />
| uint24le<br />
|rowspan="2"| only if ordered<br />
|-<br />
| Order channel<br />
| byte<br />
|-<br />
|rowspan="3"| Fragment<br />
| Compound size<br />
| int<br />
|rowspan="3"| only if fragmented<br />
|-<br />
| Compound ID<br />
| short<br />
|-<br />
| Index<br />
| int<br />
|-<br />
| Body<br />
| ceil(length/8) bytes<br />
|}<br />
<br />
The reliability types are as follows:<br />
<br />
{| class="wikitable"<br />
! style="text-align: center; font-weight: bold;" | ID<br />
! style="font-weight: bold;" | Name<br />
! style="text-align: center; font-weight: bold;" | Reliable<br />
! style="text-align: center; font-weight: bold;" | Ordered<br />
! style="text-align: center; font-weight: bold;" | Sequenced<br />
|-<br />
| style="text-align: center;" | 0<br />
| unreliable<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 1<br />
| unreliable sequenced<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
|-<br />
| style="text-align: center;" | 2<br />
| reliable<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 3<br />
| reliable ordered<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 4<br />
| reliable sequenced<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
|-<br />
| style="text-align: center;" | 5<br />
| unreliable (+ ACK receipt)<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 6<br />
| reliable (+ ACK receipt)<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 7<br />
| reliable ordered (+ ACK receipt)<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
|}<br />
<br />
Sequenced implies ordered.<br />
<br />
=== Game Packet ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x8e<br />
| Body<br />
| bytes<br />
| Single packet of the GAME protocol.<br />
|}<br />
<br />
=== NACK ===<br />
{| class="wikitable"<br />
! style="font-weight: bold;" | Packet ID<br />
! colspan="3" style="font-weight: bold;" | Field Name<br />
! style="font-weight: bold;" | Field Type<br />
! style="font-weight: bold;" | Notes<br />
|-<br />
| 0xa0<br />
| colspan="3" | Record count<br />
| short<br />
| <br />
|-<br />
| <br />
| rowspan="4" | Record<br />
| colspan="2" | Is Range?<br />
| byte<br />
| 0 for range, 1 for no range<br />
|-<br />
| <br />
| No Range<br />
| Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| rowspan="2" | Range<br />
| Start Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| End Index<br />
| uint24le<br />
| <br />
|}<br />
<br />
=== ACK ===<br />
{| class="wikitable"<br />
! style="font-weight: bold;" | Packet ID<br />
! colspan="3" style="font-weight: bold;" | Field Name<br />
! style="font-weight: bold;" | Field Type<br />
! style="font-weight: bold;" | Notes<br />
|-<br />
| 0xc0<br />
| colspan="3" | Record count<br />
| short<br />
| <br />
|-<br />
| <br />
| rowspan="4" | Record<br />
| colspan="2" | Is Range?<br />
| byte<br />
| 0 for range, 1 for no range<br />
|-<br />
| <br />
| No Range<br />
| Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| rowspan="2" | Range<br />
| Start Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| End Index<br />
| uint24le<br />
| <br />
|}</div>Orladoghttps://wiki.vg/index.php?title=Raknet_Protocol&diff=15799Raknet Protocol2020-06-08T13:03:34Z<p>Orladog: Put NukkitX Network first</p>
<hr />
<div>:: '''Remember that this page is a WIP.''' Come back later to see a more complete page.<br />
----<br />
<br />
[http://www.jenkinssoftware.com/ RakNet] is a networking library used by Minecraft Bedrock Edition. You might want to also look at the documentation for the [[Bedrock Protocol]].<br />
<br />
This is based on the old [https://wiki.vg/Pocket_Edition_Protocol_Documentation#RakNet_protocol Pocket Edition Protocol Documentation] and may be incomplete or outdated.<br />
<br />
The source code for the RakNet Library can be found [https://github.com/OculusVR/RakNet/ here].<br />
<br />
You may want to use an existing library if one exists for your language of choice.<br />
Here is an incomplete list. Not all of these are maintained or complete. If these are outdated you may need to change the protocol version to 9 before it can work.<br />
<br />
{| class="wikitable sortable" style="width: auto; text-align: center;"<br />
|-style="background:#eee"<br />
! Name<br />
!class="unsortable"| Description<br />
! Language<br />
! License<br />
! Active development<br />
|-<br />
! [https://github.com/NukkitX/Network NukkitX Network]<br />
| Network components used within NukkitX.<br />
| Java<br />
| Apache License<br />
| Yes<br />
|-<br />
! [https://github.com/JRakNet/JRakNet JRakNet]<br />
| JRakNet is a networking library for Java which implements the UDP based protocol RakNet<br />
| Java<br />
| MIT<br />
| Yes<br />
|-<br />
! [https://github.com/jython234/JRakLibPlus JRakLibPlus]<br />
| A library for easy creation of RakNet servers, based on RakLib and JRakLib.<br />
| Java<br />
| LGPL<br />
| No<br />
|-<br />
! [https://www.npmjs.com/package/raknet/ raknet]<br />
| UDP network library that follows the RakNet protocol for Node.js<br />
| node.js<br />
| MIT<br />
| No<br />
|-<br />
! [https://pypi.org/project/PyRakLib/ PyRakLib]<br />
| PyRakLib is a networking library that follows the RakNet protocol for MCPE. It is ported from the PHP library: RakLib. <br />
| Python<br />
| GPL<br />
| No<br />
|-<br />
! [https://github.com/facebookarchive/RakNet Raknet] (official)<br />
| The official implementation. Outdated and mostly for reference purposes. May not work with the latest Bedrock.<br />
| C++<br />
| BSD<br />
| No<br />
|}<br />
<br />
== Data types ==<br />
<br />
{| class="wikitable"<br />
|-<br />
!<br />
! Size (Bytes)<br />
! Range<br />
! Notes<br />
|-<br />
! Byte<br />
| 1<br />
| 0 to 255<br />
|<br />
|-<br />
! Long<br />
| 8<br />
| -2^63 to 2^63-1<br />
| Signed 64-bit Integer<br />
|-<br />
! Magic<br />
| 16<br />
| <code>00ffff00fefefefefdfdfdfd12345678</code><br />
| Always those hex bytes, corresponding to RakNet's default OFFLINE_MESSAGE_DATA_ID<br />
|-<br />
! short<br />
| 2<br />
| -32768 to 32767<br />
| <br />
|-<br />
! unsigned short<br />
| 2<br />
| 0 to 65535<br />
| <br />
|-<br />
! string<br />
| unsigned short + string<br />
| N/A<br />
| class="col3" | Prefixed by a short containing the length of the string in characters. It appears that only the following ASCII characters can be displayed: !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~<br />
|}<br />
<br />
== Packets ==<br />
<br />
=== Unconnected Ping ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x01, 0x02<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| MAGIC<br />
| magic<br />
| <br />
|-<br />
| Client GUID<br />
| Long<br />
| <br />
|}<br />
<br />
<code>0x02</code> is only replied to if there are open connections to the server. '''Note:''' as of 0.15.6 it seems that the game refreshes it's LAN world list every 4-5 seconds, however it seems the game will still ping in 1 second intervals.<br><br />
This packet should be responded to with unconnected Pong.<br />
<br />
=== Unconnected Pong ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x1c<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| MAGIC<br />
| magic<br />
| <br />
|-<br />
| Server ID string<br />
| string<br />
| Used for the MOTD. See below for details.<br />
|}<br />
<br />
'''Server ID string format'''<br />
<br />
For Minecraft Bedrock this is separated by semicolons and uses the following format:<br><br />
<code>Edition (MCPE or MCEE for Education Edition);MOTD line 1;Protocol Version;Version Name;Player Count;Max Player Count;Server Unique ID;MOTD line 2;Gamemode;Unknown;Port (IPv4);Port (IPv6);</code><br><br />
Example:<br><br />
<code>MCPE;Dedicated Server;390;1.14.60;0;10;13253860892328930865;Bedrock level;Survival;1;19132;19133;</code><br><br />
Result:<br><br />
[[File:Server_ID_String_Example.png]]<br />
<br />
=== Connected Ping ===<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x00<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Connected Pong ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x03<br />
| Ping Time<br />
| Long<br />
| <br />
|-<br />
| Pong Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Offline Connection Request 1 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x05<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Protocol version<br />
| byte<br />
| Currently 9<br />
|-<br />
| MTU<br />
| mtu-46 zero bytes<br />
| The MTU sent in the response appears to be somewhere around the size of this padding + 46 (28 udp overhead, 1 packet id, 16 magic, 1 protocol version)<br />
|}<br />
<br />
The client sends these to the target server with ever decreasing MTU until the server responds. This is used to discover the MTU size for the connection. If the RakNet protocol does not match your own, respond with the Incompatible protocol packet<br />
<br />
=== Offline Connection Response 1 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x06<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| Use security<br />
| boolean<br />
| Make sure this is false, it is vital for the login sequence to continue!<br />
|<br />
|-<br />
| MTU<br />
| short<br />
| see Offline Connection Request 1<br />
|}<br />
<br />
=== Offline Connection Request 2 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x07<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server Address<br />
| address<br />
| <br />
|-<br />
| MTU<br />
| short<br />
| <br />
|-<br />
| Client GUID<br />
| Long<br />
| <br />
|}<br />
<br />
=== Offline Connection Response 2 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x08<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| Client Address<br />
| address<br />
| <br />
|-<br />
| MTU<br />
| short<br />
| <br />
|-<br />
| Encryption enabled?<br />
| byte<br />
| 0 for disabled.<br />
|}<br />
<br />
=== Online Connection Request ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x09<br />
| GUID<br />
| Long<br />
| <br />
|-<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Online Connection Request Accepted ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x10<br />
| Client address<br />
| address<br />
| <br />
|-<br />
| System index<br />
| short<br />
| Unknown what this does. 0 works as a value.<br />
|-<br />
| Internal IDs<br />
| 10x address<br />
| Unknown what these do. 255.255.255.255:19132 for all of them seems to work, any other address will probably work as well.<br />
|-<br />
| Request time<br />
| Long<br />
| <br />
|-<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Incompatible protocol ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x19<br />
| Protocol<br />
| byte<br />
| <br />
|-<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
|}<br />
<br />
=== Unconnected Ping ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x01, 0x02<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| GUID<br />
| Long<br />
| <br />
|}<br />
<br />
=== Frame Set Packet ===<br />
{| class="wikitable"<br />
! Packet ID<br />
!colspan="3"| Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="11"| 0x80..0x8d<br />
|colspan="3"| Frame Set index<br />
| uint24le<br />
| <br />
|-<br />
|rowspan="10"| Frames<br />
|colspan="2"| Flags<br />
| byte<br />
| Top 3 bits are reliability type, fourth bit is 1 when the frame is fragmented and part of a compound.<br />
|-<br />
|colspan="2"| Length IN BITS<br />
| short<br />
| Length of the body in bits.<br />
|-<br />
|colspan="2"| Reliable frame index<br />
| uint24le<br />
| only if reliable<br />
|-<br />
|colspan="2"| Sequenced frame index<br />
| uint24le<br />
| only if sequenced<br />
|-<br />
|rowspan="2"| Order<br />
| Ordered frame index<br />
| uint24le<br />
|rowspan="2"| only if ordered<br />
|-<br />
| Order channel<br />
| byte<br />
|-<br />
|rowspan="3"| Fragment<br />
| Compound size<br />
| int<br />
|rowspan="3"| only if fragmented<br />
|-<br />
| Compound ID<br />
| short<br />
|-<br />
| Index<br />
| int<br />
|-<br />
| Body<br />
| ceil(length/8) bytes<br />
|}<br />
<br />
The reliability types are as follows:<br />
<br />
{| class="wikitable"<br />
! style="text-align: center; font-weight: bold;" | ID<br />
! style="font-weight: bold;" | Name<br />
! style="text-align: center; font-weight: bold;" | Reliable<br />
! style="text-align: center; font-weight: bold;" | Ordered<br />
! style="text-align: center; font-weight: bold;" | Sequenced<br />
|-<br />
| style="text-align: center;" | 0<br />
| unreliable<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 1<br />
| unreliable sequenced<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
|-<br />
| style="text-align: center;" | 2<br />
| reliable<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 3<br />
| reliable ordered<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 4<br />
| reliable sequenced<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
|-<br />
| style="text-align: center;" | 5<br />
| unreliable (+ ACK receipt)<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 6<br />
| reliable (+ ACK receipt)<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 7<br />
| reliable ordered (+ ACK receipt)<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
|}<br />
<br />
Sequenced implies ordered.<br />
<br />
=== Game Packet ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x8e<br />
| Body<br />
| bytes<br />
| Single packet of the GAME protocol.<br />
|}<br />
<br />
=== NACK ===<br />
{| class="wikitable"<br />
! style="font-weight: bold;" | Packet ID<br />
! colspan="3" style="font-weight: bold;" | Field Name<br />
! style="font-weight: bold;" | Field Type<br />
! style="font-weight: bold;" | Notes<br />
|-<br />
| 0xa0<br />
| colspan="3" | Record count<br />
| short<br />
| <br />
|-<br />
| <br />
| rowspan="4" | Record<br />
| colspan="2" | Is Range?<br />
| byte<br />
| 0 for range, 1 for no range<br />
|-<br />
| <br />
| No Range<br />
| Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| rowspan="2" | Range<br />
| Start Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| End Index<br />
| uint24le<br />
| <br />
|}<br />
<br />
=== ACK ===<br />
{| class="wikitable"<br />
! style="font-weight: bold;" | Packet ID<br />
! colspan="3" style="font-weight: bold;" | Field Name<br />
! style="font-weight: bold;" | Field Type<br />
! style="font-weight: bold;" | Notes<br />
|-<br />
| 0xc0<br />
| colspan="3" | Record count<br />
| short<br />
| <br />
|-<br />
| <br />
| rowspan="4" | Record<br />
| colspan="2" | Is Range?<br />
| byte<br />
| 0 for range, 1 for no range<br />
|-<br />
| <br />
| No Range<br />
| Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| rowspan="2" | Range<br />
| Start Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| End Index<br />
| uint24le<br />
| <br />
|}</div>Orladoghttps://wiki.vg/index.php?title=Raknet_Protocol&diff=15798Raknet Protocol2020-06-08T13:00:08Z<p>Orladog: </p>
<hr />
<div>:: '''Remember that this page is a WIP.''' Come back later to see a more complete page.<br />
----<br />
<br />
[http://www.jenkinssoftware.com/ RakNet] is a networking library used by Minecraft Bedrock Edition. You might want to also look at the documentation for the [[Bedrock Protocol]].<br />
<br />
This is based on the old [https://wiki.vg/Pocket_Edition_Protocol_Documentation#RakNet_protocol Pocket Edition Protocol Documentation] and may be incomplete or outdated.<br />
<br />
The source code for the RakNet Library can be found [https://github.com/OculusVR/RakNet/ here].<br />
<br />
You may want to use an existing library if one exists for your language of choice.<br />
Here is an incomplete list. Not all of these are maintained or complete. If these are outdated you may need to change the protocol version to 9 before it can work.<br />
<br />
{| class="wikitable sortable" style="width: auto; text-align: center;"<br />
|-style="background:#eee"<br />
! Name<br />
!class="unsortable"| Description<br />
! Language<br />
! License<br />
! Active development<br />
|-<br />
! [https://github.com/JRakNet/JRakNet JRakNet]<br />
| JRakNet is a networking library for Java which implements the UDP based protocol RakNet<br />
| Java<br />
| MIT<br />
| Yes<br />
|-<br />
! [https://github.com/NukkitX/Network NukkitX Network]<br />
| Network components used within NukkitX.<br />
| Java<br />
| Apache License<br />
| Yes<br />
|-<br />
! [https://github.com/jython234/JRakLibPlus JRakLibPlus]<br />
| A library for easy creation of RakNet servers, based on RakLib and JRakLib.<br />
| Java<br />
| LGPL<br />
| No<br />
|-<br />
! [https://www.npmjs.com/package/raknet/ raknet]<br />
| UDP network library that follows the RakNet protocol for Node.js<br />
| node.js<br />
| MIT<br />
| No<br />
|-<br />
! [https://pypi.org/project/PyRakLib/ PyRakLib]<br />
| PyRakLib is a networking library that follows the RakNet protocol for MCPE. It is ported from the PHP library: RakLib. <br />
| Python<br />
| GPL<br />
| No<br />
|-<br />
! [https://github.com/facebookarchive/RakNet Raknet] (official)<br />
| The official implementation. Outdated and mostly for reference purposes. May not work with the latest Bedrock.<br />
| C++<br />
| BSD<br />
| No<br />
|}<br />
<br />
== Data types ==<br />
<br />
{| class="wikitable"<br />
|-<br />
!<br />
! Size (Bytes)<br />
! Range<br />
! Notes<br />
|-<br />
! Byte<br />
| 1<br />
| 0 to 255<br />
|<br />
|-<br />
! Long<br />
| 8<br />
| -2^63 to 2^63-1<br />
| Signed 64-bit Integer<br />
|-<br />
! Magic<br />
| 16<br />
| <code>00ffff00fefefefefdfdfdfd12345678</code><br />
| Always those hex bytes, corresponding to RakNet's default OFFLINE_MESSAGE_DATA_ID<br />
|-<br />
! short<br />
| 2<br />
| -32768 to 32767<br />
| <br />
|-<br />
! unsigned short<br />
| 2<br />
| 0 to 65535<br />
| <br />
|-<br />
! string<br />
| unsigned short + string<br />
| N/A<br />
| class="col3" | Prefixed by a short containing the length of the string in characters. It appears that only the following ASCII characters can be displayed: !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~<br />
|}<br />
<br />
== Packets ==<br />
<br />
=== Unconnected Ping ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x01, 0x02<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| MAGIC<br />
| magic<br />
| <br />
|-<br />
| Client GUID<br />
| Long<br />
| <br />
|}<br />
<br />
<code>0x02</code> is only replied to if there are open connections to the server. '''Note:''' as of 0.15.6 it seems that the game refreshes it's LAN world list every 4-5 seconds, however it seems the game will still ping in 1 second intervals.<br><br />
This packet should be responded to with unconnected Pong.<br />
<br />
=== Unconnected Pong ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x1c<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| MAGIC<br />
| magic<br />
| <br />
|-<br />
| Server ID string<br />
| string<br />
| Used for the MOTD. See below for details.<br />
|}<br />
<br />
'''Server ID string format'''<br />
<br />
For Minecraft Bedrock this is separated by semicolons and uses the following format:<br><br />
<code>Edition (MCPE or MCEE for Education Edition);MOTD line 1;Protocol Version;Version Name;Player Count;Max Player Count;Server Unique ID;MOTD line 2;Gamemode;Unknown;Port (IPv4);Port (IPv6);</code><br><br />
Example:<br><br />
<code>MCPE;Dedicated Server;390;1.14.60;0;10;13253860892328930865;Bedrock level;Survival;1;19132;19133;</code><br><br />
Result:<br><br />
[[File:Server_ID_String_Example.png]]<br />
<br />
=== Connected Ping ===<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x00<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Connected Pong ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x03<br />
| Ping Time<br />
| Long<br />
| <br />
|-<br />
| Pong Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Offline Connection Request 1 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="3"| 0x05<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Protocol version<br />
| byte<br />
| Currently 9<br />
|-<br />
| MTU<br />
| mtu-46 zero bytes<br />
| The MTU sent in the response appears to be somewhere around the size of this padding + 46 (28 udp overhead, 1 packet id, 16 magic, 1 protocol version)<br />
|}<br />
<br />
The client sends these to the target server with ever decreasing MTU until the server responds. This is used to discover the MTU size for the connection. If the RakNet protocol does not match your own, respond with the Incompatible protocol packet<br />
<br />
=== Offline Connection Response 1 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x06<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| Use security<br />
| boolean<br />
| Make sure this is false, it is vital for the login sequence to continue!<br />
|<br />
|-<br />
| MTU<br />
| short<br />
| see Offline Connection Request 1<br />
|}<br />
<br />
=== Offline Connection Request 2 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x07<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server Address<br />
| address<br />
| <br />
|-<br />
| MTU<br />
| short<br />
| <br />
|-<br />
| Client GUID<br />
| Long<br />
| <br />
|}<br />
<br />
=== Offline Connection Response 2 ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x08<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
| Client Address<br />
| address<br />
| <br />
|-<br />
| MTU<br />
| short<br />
| <br />
|-<br />
| Encryption enabled?<br />
| byte<br />
| 0 for disabled.<br />
|}<br />
<br />
=== Online Connection Request ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x09<br />
| GUID<br />
| Long<br />
| <br />
|-<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Online Connection Request Accepted ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="5"| 0x10<br />
| Client address<br />
| address<br />
| <br />
|-<br />
| System index<br />
| short<br />
| Unknown what this does. 0 works as a value.<br />
|-<br />
| Internal IDs<br />
| 10x address<br />
| Unknown what these do. 255.255.255.255:19132 for all of them seems to work, any other address will probably work as well.<br />
|-<br />
| Request time<br />
| Long<br />
| <br />
|-<br />
| Time<br />
| Long<br />
| <br />
|}<br />
<br />
=== Incompatible protocol ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x19<br />
| Protocol<br />
| byte<br />
| <br />
|-<br />
| Magic<br />
| MAGIC<br />
| <br />
|-<br />
| Server GUID<br />
| Long<br />
| <br />
|-<br />
|}<br />
<br />
=== Unconnected Ping ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="2"| 0x01, 0x02<br />
| Time<br />
| Long<br />
| <br />
|-<br />
| GUID<br />
| Long<br />
| <br />
|}<br />
<br />
=== Frame Set Packet ===<br />
{| class="wikitable"<br />
! Packet ID<br />
!colspan="3"| Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="11"| 0x80..0x8d<br />
|colspan="3"| Frame Set index<br />
| uint24le<br />
| <br />
|-<br />
|rowspan="10"| Frames<br />
|colspan="2"| Flags<br />
| byte<br />
| Top 3 bits are reliability type, fourth bit is 1 when the frame is fragmented and part of a compound.<br />
|-<br />
|colspan="2"| Length IN BITS<br />
| short<br />
| Length of the body in bits.<br />
|-<br />
|colspan="2"| Reliable frame index<br />
| uint24le<br />
| only if reliable<br />
|-<br />
|colspan="2"| Sequenced frame index<br />
| uint24le<br />
| only if sequenced<br />
|-<br />
|rowspan="2"| Order<br />
| Ordered frame index<br />
| uint24le<br />
|rowspan="2"| only if ordered<br />
|-<br />
| Order channel<br />
| byte<br />
|-<br />
|rowspan="3"| Fragment<br />
| Compound size<br />
| int<br />
|rowspan="3"| only if fragmented<br />
|-<br />
| Compound ID<br />
| short<br />
|-<br />
| Index<br />
| int<br />
|-<br />
| Body<br />
| ceil(length/8) bytes<br />
|}<br />
<br />
The reliability types are as follows:<br />
<br />
{| class="wikitable"<br />
! style="text-align: center; font-weight: bold;" | ID<br />
! style="font-weight: bold;" | Name<br />
! style="text-align: center; font-weight: bold;" | Reliable<br />
! style="text-align: center; font-weight: bold;" | Ordered<br />
! style="text-align: center; font-weight: bold;" | Sequenced<br />
|-<br />
| style="text-align: center;" | 0<br />
| unreliable<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 1<br />
| unreliable sequenced<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
|-<br />
| style="text-align: center;" | 2<br />
| reliable<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 3<br />
| reliable ordered<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 4<br />
| reliable sequenced<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
|-<br />
| style="text-align: center;" | 5<br />
| unreliable (+ ACK receipt)<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 6<br />
| reliable (+ ACK receipt)<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
| style="text-align: center;" | <br />
|-<br />
| style="text-align: center;" | 7<br />
| reliable ordered (+ ACK receipt)<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | x<br />
| style="text-align: center;" | <br />
|}<br />
<br />
Sequenced implies ordered.<br />
<br />
=== Game Packet ===<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x8e<br />
| Body<br />
| bytes<br />
| Single packet of the GAME protocol.<br />
|}<br />
<br />
=== NACK ===<br />
{| class="wikitable"<br />
! style="font-weight: bold;" | Packet ID<br />
! colspan="3" style="font-weight: bold;" | Field Name<br />
! style="font-weight: bold;" | Field Type<br />
! style="font-weight: bold;" | Notes<br />
|-<br />
| 0xa0<br />
| colspan="3" | Record count<br />
| short<br />
| <br />
|-<br />
| <br />
| rowspan="4" | Record<br />
| colspan="2" | Is Range?<br />
| byte<br />
| 0 for range, 1 for no range<br />
|-<br />
| <br />
| No Range<br />
| Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| rowspan="2" | Range<br />
| Start Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| End Index<br />
| uint24le<br />
| <br />
|}<br />
<br />
=== ACK ===<br />
{| class="wikitable"<br />
! style="font-weight: bold;" | Packet ID<br />
! colspan="3" style="font-weight: bold;" | Field Name<br />
! style="font-weight: bold;" | Field Type<br />
! style="font-weight: bold;" | Notes<br />
|-<br />
| 0xc0<br />
| colspan="3" | Record count<br />
| short<br />
| <br />
|-<br />
| <br />
| rowspan="4" | Record<br />
| colspan="2" | Is Range?<br />
| byte<br />
| 0 for range, 1 for no range<br />
|-<br />
| <br />
| No Range<br />
| Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| rowspan="2" | Range<br />
| Start Index<br />
| uint24le<br />
| <br />
|-<br />
| <br />
| End Index<br />
| uint24le<br />
| <br />
|}</div>Orladog