Skip to content

Commit 4204a7c

Browse files
authored
Merge pull request #12 from Mojang/r/21_u2
Protocol for r/21_u2 NetworkProtocolVersion 712
2 parents e8b16c2 + f6912f5 commit 4204a7c

File tree

371 files changed

+10665
-9182
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

371 files changed

+10665
-9182
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
We share our Network Protocol with server partners so they can write their own Minecraft servers with their own code. This documentation compiles a series of tree diagrams that define the structure of the packets used by the Protocol, as well as related classes and enums.
44
Protocol is subject to change release over release.
55

6-
Current Release - r/21
6+
Current Release - r/21_u2

changelog_712_7_16_24.md

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# Minecraft Network Protocol Docs 07/16/2024
2+
For r21u2, Network Protocol Version 712
3+
4+
5+
## New Packets
6+
7+
CurrentStructureFeaturePacket:
8+
* Added mCurrentStructureFeature (string)
9+
ServerboundDiagnosticsPacket:
10+
* Added mTelemetry.mAvgFps (float)
11+
* Added mTelemetry.mAvgServerSimTickTimeMS (float)
12+
* Added mTelemetry.mAvgClientSimTickTimeMS (float)
13+
* Added mTelemetry.mAvgBeginFrameTimeMS (float)
14+
* Added mTelemetry.mAvgInputTimeMS (float)
15+
* Added mTelemetry.mAvgRenderTimeMS (float)
16+
* Added mTelemetry.mAvgEndFrameTimeMS (float)
17+
* Added mTelemetry.mAvgRemainderTimePercent (float)
18+
* Added mTelemetry.mAvgUnaccountedTimePercent (float)
19+
20+
21+
## Packet Changes
22+
23+
InventoryContentPacket:
24+
* Added mDynamicContainerId (uint32_t)
25+
InventorySlotPacket:
26+
* Added mDynamicContainerId (uint32_t)
27+
ResourcePacksInfoPacket:
28+
* Added pack.mIsAddonPack (bool) under mData.mBehaviorPacks
29+
* Added pack.mIsAddonPack (bool) under mData.mResourcePacks
30+
31+
32+
## Additional Types Added
33+
34+
FullContainerName:
35+
* Added containerName.mName (enum ContainerEnumName)
36+
* Added containerName.mDynamicId.mData (uint32_t)
37+
TargetInstruction:
38+
* Added mTargetCenterOffset (brstd::optional<Vec3>)
39+
* Added mTargetActorId (int64_t)
40+
41+
42+
## Additional Types Changed
43+
44+
CameraInstruction:
45+
* Added mTarget (brstd::optional<TargetInstruction>)
46+
* Added mRemoveTarget (brstd::optional<bool>)
47+
ItemStackRequestSlotInfo:
48+
* Removed mOpenContainerNetId
49+
* Added mFullContainerName (FullContainerName)
50+
ItemUseInventoryTransaction:
51+
* Added mTriggerType (enum ItemUseInventoryTransaction::TriggerType) [description below]
52+
53+
54+
## New Enums
55+
56+
ItemUseInventoryTransaction::TriggerType:
57+
* Added Unknown(0)
58+
* Added PlayerInput(1)
59+
* Added SimulationTick(2)
60+
61+
62+
## Enum Changes
63+
64+
ActorEvent:
65+
* Added DEPRECATED_UPDATE_STRUCTURE_FEATURE(66)
66+
* Removed UPDATE_STRUCTURE_FEATURE
67+
68+
Connection::DisconnectFailReason:
69+
* Added SubClientLoginDisabled(116)
70+
71+
ContainerEnumName:
72+
* Added DynamicContainer(63)
73+
74+
MinecraftPacketIds:
75+
* Added CurrentStructureFeaturePacket(314)
76+
* Added ServerboundDiagnosticsPacket(315)
77+
* Displaced EndId

dot/ActorLink.dot

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ rankdir = LR
1111
117 -> 118
1212
110 -> 119
1313
119 -> 120
14+
110 -> 121
15+
121 -> 122
1416

1517
110 [label="ActorLink",comment="name: \"ActorLink\", typeName: \"\", id: 110, branchId: 0, recurseId: -1, attributes: 0, notes: \"\""];
1618
111 [label="Actor Unique ID - A",comment="name: \"Actor Unique ID - A\", typeName: \"ActorUniqueID\", id: 111, branchId: 0, recurseId: -1, attributes: 256, notes: \"\""];
@@ -23,6 +25,8 @@ rankdir = LR
2325
118 [label="bool",comment="name: \"bool\", typeName: \"\", id: 118, branchId: 0, recurseId: -1, attributes: 512, notes: \"\""];
2426
119 [label="Passenger Initiated",comment="name: \"Passenger Initiated\", typeName: \"\", id: 119, branchId: 0, recurseId: -1, attributes: 0, notes: \"Whether the link was changed by the passenger\""];
2527
120 [label="bool",comment="name: \"bool\", typeName: \"\", id: 120, branchId: 0, recurseId: -1, attributes: 512, notes: \"\""];
26-
{ rank = max;112;114;116;118;120}
28+
121 [label="Vehicle Angular Velocity",comment="name: \"Vehicle Angular Velocity\", typeName: \"\", id: 121, branchId: 0, recurseId: -1, attributes: 0, notes: \"\""];
29+
122 [label="float",comment="name: \"float\", typeName: \"\", id: 122, branchId: 0, recurseId: -1, attributes: 512, notes: \"\""];
30+
{ rank = max;112;114;116;118;120;122}
2731

2832
}

dot/AddPlayerPacket.dot

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ rankdir = LR
3737
106 -> 107
3838
105 -> 108
3939
108 -> 109
40-
109 -> 121
41-
0 -> 122
42-
122 -> 123
40+
109 -> 123
4341
0 -> 124
4442
124 -> 125
43+
0 -> 126
44+
126 -> 127
4545

4646
0 [label="AddPlayerPacket",comment="name: \"AddPlayerPacket\", typeName: \"\", id: 0, branchId: 12, recurseId: -1, attributes: 0, notes: \"\""];
4747
1 [label="UUID",comment="name: \"UUID\", typeName: \"mce::UUID\", id: 1, branchId: 0, recurseId: -1, attributes: 256, notes: \"\""];
@@ -80,11 +80,11 @@ rankdir = LR
8080
107 [label="unsigned varint",comment="name: \"unsigned varint\", typeName: \"\", id: 107, branchId: 0, recurseId: -1, attributes: 512, notes: \"\""];
8181
108 [label="example element",style=dotted,comment="name: \"example element\", typeName: \"\", id: 108, branchId: 0, recurseId: -1, attributes: 16, notes: \"\""];
8282
109 [label="Link",comment="name: \"Link\", typeName: \"ActorLink\", id: 109, branchId: 0, recurseId: -1, attributes: 256, notes: \"\""];
83-
121 [label="ActorLink",comment="name: \"ActorLink\", typeName: \"\", id: 121, branchId: 0, recurseId: -1, attributes: 512, notes: \"\""];
84-
122 [label="Device Id",comment="name: \"Device Id\", typeName: \"\", id: 122, branchId: 0, recurseId: -1, attributes: 0, notes: \"A unique device id obtained from the connection request.\""];
85-
123 [label="string",comment="name: \"string\", typeName: \"\", id: 123, branchId: 0, recurseId: -1, attributes: 512, notes: \"\""];
86-
124 [label="Build Platform",comment="name: \"Build Platform\", typeName: \"\", id: 124, branchId: 0, recurseId: -1, attributes: 0, notes: \"\""];
87-
125 [label="int",comment="name: \"int\", typeName: \"\", id: 125, branchId: 0, recurseId: -1, attributes: 512, notes: \"\""];
88-
{ rank = max;2;4;6;8;10;12;14;16;45;47;56;59;78;104;107;121;123;125}
83+
123 [label="ActorLink",comment="name: \"ActorLink\", typeName: \"\", id: 123, branchId: 0, recurseId: -1, attributes: 512, notes: \"\""];
84+
124 [label="Device Id",comment="name: \"Device Id\", typeName: \"\", id: 124, branchId: 0, recurseId: -1, attributes: 0, notes: \"A unique device id obtained from the connection request.\""];
85+
125 [label="string",comment="name: \"string\", typeName: \"\", id: 125, branchId: 0, recurseId: -1, attributes: 512, notes: \"\""];
86+
126 [label="Build Platform",comment="name: \"Build Platform\", typeName: \"\", id: 126, branchId: 0, recurseId: -1, attributes: 0, notes: \"\""];
87+
127 [label="int",comment="name: \"int\", typeName: \"\", id: 127, branchId: 0, recurseId: -1, attributes: 512, notes: \"\""];
88+
{ rank = max;2;4;6;8;10;12;14;16;45;47;56;59;78;104;107;123;125;127}
8989

9090
}

dot/CameraInstruction.dot

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ rankdir = LR
77
8 -> 9
88
2 -> 10
99
10 -> 14
10+
2 -> 15
11+
15 -> 19
12+
2 -> 20
13+
20 -> 21
1014

1115
2 [label="CameraInstruction",comment="name: \"CameraInstruction\", typeName: \"\", id: 2, branchId: 0, recurseId: -1, attributes: 0, notes: \"\""];
1216
3 [label="Set",comment="name: \"Set\", typeName: \"std::optional<struct CameraInstruction::SetInstruction>\", id: 3, branchId: 0, recurseId: -1, attributes: 256, notes: \"\""];
@@ -15,6 +19,10 @@ rankdir = LR
1519
9 [label="std::optional<bool>",comment="name: \"std::optional<bool>\", typeName: \"\", id: 9, branchId: 0, recurseId: -1, attributes: 512, notes: \"\""];
1620
10 [label="Fade",comment="name: \"Fade\", typeName: \"std::optional<struct CameraInstruction::FadeInstruction>\", id: 10, branchId: 0, recurseId: -1, attributes: 256, notes: \"\""];
1721
14 [label="std::optional<struct CameraInstruction::FadeInstruction>",comment="name: \"std::optional<struct CameraInstruction::FadeInstruction>\", typeName: \"\", id: 14, branchId: 0, recurseId: -1, attributes: 512, notes: \"\""];
18-
{ rank = max;7;9;14}
22+
15 [label="Target",comment="name: \"Target\", typeName: \"std::optional<struct CameraInstruction::TargetInstruction>\", id: 15, branchId: 0, recurseId: -1, attributes: 256, notes: \"\""];
23+
19 [label="std::optional<struct CameraInstruction::TargetInstruction>",comment="name: \"std::optional<struct CameraInstruction::TargetInstruction>\", typeName: \"\", id: 19, branchId: 0, recurseId: -1, attributes: 512, notes: \"\""];
24+
20 [label="RemoveTarget",comment="name: \"RemoveTarget\", typeName: \"std::optional<bool>\", id: 20, branchId: 0, recurseId: -1, attributes: 256, notes: \"\""];
25+
21 [label="std::optional<bool>",comment="name: \"std::optional<bool>\", typeName: \"\", id: 21, branchId: 0, recurseId: -1, attributes: 512, notes: \"\""];
26+
{ rank = max;7;9;14;19;21}
1927

2028
}

dot/CameraInstructionPacket.dot

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ digraph "CameraInstructionPacket" {
22
rankdir = LR
33
0
44
0 -> 1
5-
1 -> 15
5+
1 -> 22
66

77
0 [label="CameraInstructionPacket",comment="name: \"CameraInstructionPacket\", typeName: \"\", id: 0, branchId: 300, recurseId: -1, attributes: 0, notes: \"\""];
88
1 [label="Camera Instruction",comment="name: \"Camera Instruction\", typeName: \"CameraInstruction\", id: 1, branchId: 0, recurseId: -1, attributes: 256, notes: \"\""];
9-
15 [label="CameraInstruction",comment="name: \"CameraInstruction\", typeName: \"\", id: 15, branchId: 0, recurseId: -1, attributes: 512, notes: \"\""];
10-
{ rank = max;15}
9+
22 [label="CameraInstruction",comment="name: \"CameraInstruction\", typeName: \"\", id: 22, branchId: 0, recurseId: -1, attributes: 512, notes: \"\""];
10+
{ rank = max;22}
1111

1212
}

dot/CameraPreset.dot

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@ rankdir = LR
1818
8 -> 26
1919
26 -> 30
2020
8 -> 31
21-
31 -> 35
21+
31 -> 32
22+
8 -> 33
23+
33 -> 37
24+
8 -> 38
25+
38 -> 42
2226

2327
8 [label="CameraPreset",comment="name: \"CameraPreset\", typeName: \"\", id: 8, branchId: 0, recurseId: -1, attributes: 0, notes: \"\""];
2428
9 [label="Name",comment="name: \"Name\", typeName: \"\", id: 9, branchId: 0, recurseId: -1, attributes: 0, notes: \"\""];
@@ -35,10 +39,14 @@ rankdir = LR
3539
23 [label="std::optional<float>",comment="name: \"std::optional<float>\", typeName: \"\", id: 23, branchId: 0, recurseId: -1, attributes: 512, notes: \"\""];
3640
24 [label="Rot Y",comment="name: \"Rot Y\", typeName: \"std::optional<float>\", id: 24, branchId: 0, recurseId: -1, attributes: 256, notes: \"\""];
3741
25 [label="std::optional<float>",comment="name: \"std::optional<float>\", typeName: \"\", id: 25, branchId: 0, recurseId: -1, attributes: 512, notes: \"\""];
38-
26 [label="Listener",comment="name: \"Listener\", typeName: \"std::optional<enum CameraPreset::AudioListener>\", id: 26, branchId: 0, recurseId: -1, attributes: 256, notes: \"\""];
39-
30 [label="std::optional<enum CameraPreset::AudioListener>",comment="name: \"std::optional<enum CameraPreset::AudioListener>\", typeName: \"\", id: 30, branchId: 0, recurseId: -1, attributes: 512, notes: \"\""];
40-
31 [label="Player Effects",comment="name: \"Player Effects\", typeName: \"std::optional<bool>\", id: 31, branchId: 0, recurseId: -1, attributes: 256, notes: \"\""];
41-
35 [label="std::optional<bool>",comment="name: \"std::optional<bool>\", typeName: \"\", id: 35, branchId: 0, recurseId: -1, attributes: 512, notes: \"\""];
42-
{ rank = max;10;12;17;19;21;23;25;30;35}
42+
26 [label="View Offset",comment="name: \"View Offset\", typeName: \"std::optional<class Vec2>\", id: 26, branchId: 0, recurseId: -1, attributes: 256, notes: \"\""];
43+
30 [label="std::optional<class Vec2>",comment="name: \"std::optional<class Vec2>\", typeName: \"\", id: 30, branchId: 0, recurseId: -1, attributes: 512, notes: \"\""];
44+
31 [label="Radius",comment="name: \"Radius\", typeName: \"std::optional<float>\", id: 31, branchId: 0, recurseId: -1, attributes: 256, notes: \"\""];
45+
32 [label="std::optional<float>",comment="name: \"std::optional<float>\", typeName: \"\", id: 32, branchId: 0, recurseId: -1, attributes: 512, notes: \"\""];
46+
33 [label="Listener",comment="name: \"Listener\", typeName: \"std::optional<enum CameraPreset::AudioListener>\", id: 33, branchId: 0, recurseId: -1, attributes: 256, notes: \"\""];
47+
37 [label="std::optional<enum CameraPreset::AudioListener>",comment="name: \"std::optional<enum CameraPreset::AudioListener>\", typeName: \"\", id: 37, branchId: 0, recurseId: -1, attributes: 512, notes: \"\""];
48+
38 [label="Player Effects",comment="name: \"Player Effects\", typeName: \"std::optional<bool>\", id: 38, branchId: 0, recurseId: -1, attributes: 256, notes: \"\""];
49+
42 [label="std::optional<bool>",comment="name: \"std::optional<bool>\", typeName: \"\", id: 42, branchId: 0, recurseId: -1, attributes: 512, notes: \"\""];
50+
{ rank = max;10;12;17;19;21;23;25;30;32;37;42}
4351

4452
}

dot/CameraPresets.dot

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ rankdir = LR
66
4 -> 5
77
3 -> 6
88
6 -> 7
9-
7 -> 36
9+
7 -> 43
1010

1111
2 [label="CameraPresets",comment="name: \"CameraPresets\", typeName: \"\", id: 2, branchId: 0, recurseId: -1, attributes: 0, notes: \"\""];
1212
3 [label="Presets",comment="name: \"Presets\", typeName: \"\", id: 3, branchId: 0, recurseId: -1, attributes: 8, notes: \"\""];
1313
4 [label="Array Size",comment="name: \"Array Size\", typeName: \"\", id: 4, branchId: 0, recurseId: -1, attributes: 0, notes: \"\""];
1414
5 [label="unsigned varint",comment="name: \"unsigned varint\", typeName: \"\", id: 5, branchId: 0, recurseId: -1, attributes: 512, notes: \"\""];
1515
6 [label="example element",style=dotted,comment="name: \"example element\", typeName: \"\", id: 6, branchId: 0, recurseId: -1, attributes: 16, notes: \"\""];
1616
7 [label="Camera Preset",comment="name: \"Camera Preset\", typeName: \"CameraPreset\", id: 7, branchId: 0, recurseId: -1, attributes: 256, notes: \"\""];
17-
36 [label="CameraPreset",comment="name: \"CameraPreset\", typeName: \"\", id: 36, branchId: 0, recurseId: -1, attributes: 512, notes: \"\""];
18-
{ rank = max;5;36}
17+
43 [label="CameraPreset",comment="name: \"CameraPreset\", typeName: \"\", id: 43, branchId: 0, recurseId: -1, attributes: 512, notes: \"\""];
18+
{ rank = max;5;43}
1919

2020
}

dot/CameraPresetsPacket.dot

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ digraph "CameraPresetsPacket" {
22
rankdir = LR
33
0
44
0 -> 1
5-
1 -> 37
5+
1 -> 44
66

77
0 [label="CameraPresetsPacket",comment="name: \"CameraPresetsPacket\", typeName: \"\", id: 0, branchId: 198, recurseId: -1, attributes: 0, notes: \"\""];
88
1 [label="Camera Presets",comment="name: \"Camera Presets\", typeName: \"CameraPresets\", id: 1, branchId: 0, recurseId: -1, attributes: 256, notes: \"\""];
9-
37 [label="CameraPresets",comment="name: \"CameraPresets\", typeName: \"\", id: 37, branchId: 0, recurseId: -1, attributes: 512, notes: \"\""];
10-
{ rank = max;37}
9+
44 [label="CameraPresets",comment="name: \"CameraPresets\", typeName: \"\", id: 44, branchId: 0, recurseId: -1, attributes: 512, notes: \"\""];
10+
{ rank = max;44}
1111

1212
}

dot/ChangeDimensionPacket.dot

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ rankdir = LR
77
3 -> 4
88
0 -> 5
99
5 -> 6
10+
0 -> 7
11+
7 -> 11
1012

1113
0 [label="ChangeDimensionPacket",comment="name: \"ChangeDimensionPacket\", typeName: \"\", id: 0, branchId: 61, recurseId: -1, attributes: 0, notes: \"\""];
1214
1 [label="Dimension ID",comment="name: \"Dimension ID\", typeName: \"\", id: 1, branchId: 0, recurseId: -1, attributes: 0, notes: \"Currently supported: (0 -> Overworld, 1 -> Nether, 2 -> The End, 3 -> Undefined)\""];
@@ -15,6 +17,8 @@ rankdir = LR
1517
4 [label="Vec3",comment="name: \"Vec3\", typeName: \"\", id: 4, branchId: 0, recurseId: -1, attributes: 512, notes: \"\""];
1618
5 [label="Respawn",comment="name: \"Respawn\", typeName: \"\", id: 5, branchId: 0, recurseId: -1, attributes: 0, notes: \"\""];
1719
6 [label="bool",comment="name: \"bool\", typeName: \"\", id: 6, branchId: 0, recurseId: -1, attributes: 512, notes: \"\""];
18-
{ rank = max;2;4;6}
20+
7 [label="Loading Screen Id",comment="name: \"Loading Screen Id\", typeName: \"std::optional<unsigned int>\", id: 7, branchId: 0, recurseId: -1, attributes: 256, notes: \"Leave empty if there is no loading screen expected on the client. This id needs to be unique and not conflict with any other active loading screens. This is implemented with an unsigned integer incrementing forever, and that is expected to not have collisions when it wraps around back to 0 if that could be a possibility.\""];
21+
11 [label="std::optional<unsigned int>",comment="name: \"std::optional<unsigned int>\", typeName: \"\", id: 11, branchId: 0, recurseId: -1, attributes: 512, notes: \"\""];
22+
{ rank = max;2;4;6;11}
1923

2024
}

0 commit comments

Comments
 (0)