Skip to content

Commit

Permalink
1.20.2 Protocol fixes (#812)
Browse files Browse the repository at this point in the history
* Fix Chunk Batch Start

All other new and changed packets now match up to MC source for 1.20.2

* Fix Chunk Unload packet coord ordering

* Fix chunk_biomes packet.

Seems this packet has been incorrect since 1.19.4 when it was introduced.

* update packet_chunk_biomes

* fix

---------

Co-authored-by: extremeheat <[email protected]>
  • Loading branch information
wgaylord and extremeheat committed Dec 27, 2023
1 parent 78cc4b4 commit d4c6ab3
Show file tree
Hide file tree
Showing 4 changed files with 125 additions and 19 deletions.
22 changes: 20 additions & 2 deletions data/pc/1.19.3/protocol.json
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,24 @@
}
]
],
"soundSource": [
"mapper",
{
"type": "varint",
"mappings": {
"0": "master",
"1": "music",
"2": "record",
"3": "weather",
"4": "block",
"5": "hostile",
"6": "neutral",
"7": "player",
"8": "ambient",
"9": "voice"
}
}
],
"previousMessages": [
"array",
{
Expand Down Expand Up @@ -4412,7 +4430,7 @@
},
{
"name": "soundCategory",
"type": "varint"
"type": "soundSource"
},
{
"name": "entityId",
Expand Down Expand Up @@ -4506,7 +4524,7 @@
},
{
"name": "soundCategory",
"type": "varint"
"type": "soundSource"
},
{
"name": "x",
Expand Down
37 changes: 34 additions & 3 deletions data/pc/1.19.4/protocol.json
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,37 @@
}
]
],
"packedChunkPos": [
"container",
[
{
"name": "z",
"type": "i32"
},
{
"name": "x",
"type": "i32"
}
]
],
"soundSource": [
"mapper",
{
"type": "varint",
"mappings": {
"0": "master",
"1": "music",
"2": "record",
"3": "weather",
"4": "block",
"5": "hostile",
"6": "neutral",
"7": "player",
"8": "ambient",
"9": "voice"
}
}
],
"previousMessages": [
"array",
{
Expand Down Expand Up @@ -4600,7 +4631,7 @@
},
{
"name": "soundCategory",
"type": "varint"
"type": "soundSource"
},
{
"name": "entityId",
Expand Down Expand Up @@ -4694,7 +4725,7 @@
},
{
"name": "soundCategory",
"type": "varint"
"type": "soundSource"
},
{
"name": "x",
Expand Down Expand Up @@ -5355,7 +5386,7 @@
[
{
"name": "position",
"type": "position"
"type": "packedChunkPos"
},
{
"name": "data",
Expand Down
48 changes: 37 additions & 11 deletions data/pc/1.20.2/protocol.json
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,37 @@
}
]
],
"soundSource": [
"mapper",
{
"type": "varint",
"mappings": {
"0": "master",
"1": "music",
"2": "record",
"3": "weather",
"4": "block",
"5": "hostile",
"6": "neutral",
"7": "player",
"8": "ambient",
"9": "voice"
}
}
],
"packedChunkPos": [
"container",
[
{
"name": "z",
"type": "i32"
},
{
"name": "x",
"type": "i32"
}
]
],
"previousMessages": [
"array",
{
Expand Down Expand Up @@ -2444,12 +2475,7 @@
],
"packet_chunk_batch_start": [
"container",
[
{
"name": "batchSize",
"type": "varint"
}
]
[]
],
"packet_tab_complete": [
"container",
Expand Down Expand Up @@ -2886,11 +2912,11 @@
"container",
[
{
"name": "chunkX",
"name": "chunkZ",
"type": "i32"
},
{
"name": "chunkZ",
"name": "chunkX",
"type": "i32"
}
]
Expand Down Expand Up @@ -4856,7 +4882,7 @@
},
{
"name": "soundCategory",
"type": "varint"
"type": "soundSource"
},
{
"name": "entityId",
Expand Down Expand Up @@ -4950,7 +4976,7 @@
},
{
"name": "soundCategory",
"type": "varint"
"type": "soundSource"
},
{
"name": "x",
Expand Down Expand Up @@ -5588,7 +5614,7 @@
[
{
"name": "position",
"type": "position"
"type": "packedChunkPos"
},
{
"name": "data",
Expand Down
37 changes: 34 additions & 3 deletions data/pc/1.20/protocol.json
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,37 @@
}
]
],
"packedChunkPos": [
"container",
[
{
"name": "z",
"type": "i32"
},
{
"name": "x",
"type": "i32"
}
]
],
"soundSource": [
"mapper",
{
"type": "varint",
"mappings": {
"0": "master",
"1": "music",
"2": "record",
"3": "weather",
"4": "block",
"5": "hostile",
"6": "neutral",
"7": "player",
"8": "ambient",
"9": "voice"
}
}
],
"previousMessages": [
"array",
{
Expand Down Expand Up @@ -4596,7 +4627,7 @@
},
{
"name": "soundCategory",
"type": "varint"
"type": "soundSource"
},
{
"name": "entityId",
Expand Down Expand Up @@ -4690,7 +4721,7 @@
},
{
"name": "soundCategory",
"type": "varint"
"type": "soundSource"
},
{
"name": "x",
Expand Down Expand Up @@ -5334,7 +5365,7 @@
[
{
"name": "position",
"type": "position"
"type": "packedChunkPos"
},
{
"name": "data",
Expand Down

0 comments on commit d4c6ab3

Please sign in to comment.