From 37e288067964e403c29d1d2f72a4acc9a5b7ba52 Mon Sep 17 00:00:00 2001 From: extremeheat Date: Mon, 25 Dec 2023 14:26:44 -0500 Subject: [PATCH] 1.20.2 protocol: nbt data can have different root data types (#807) * 1.20.2 protocol: nbt data can have different root data types * Update protocol.json fix entityMetadataItem --- data/pc/1.20.2/protocol.json | 34 +++++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/data/pc/1.20.2/protocol.json b/data/pc/1.20.2/protocol.json index 334b578f0..302440de8 100644 --- a/data/pc/1.20.2/protocol.json +++ b/data/pc/1.20.2/protocol.json @@ -28,6 +28,18 @@ "restBuffer": "native", "nbt": "native", "optionalNbt": "native", + "nbtRoot": [ + "nbt", + { + "tagType": "anonymousNbt" + } + ], + "optionalNbtRoot": [ + "optionalNbt", + { + "tagType": "anonymousNbt" + } + ], "string": [ "pstring", { @@ -117,7 +129,7 @@ }, { "name": "nbtData", - "type": "optionalNbt" + "type": "optionalNbtRoot" } ] ] @@ -420,7 +432,7 @@ ], "block_state": "varint", "optional_block_state": "optvarint", - "compound_tag": "nbt", + "compound_tag": "nbtRoot", "particle": "particle", "villager_data": [ "container", @@ -611,7 +623,7 @@ }, { "name": "nbtData", - "type": "optionalNbt" + "type": "optionalNbtRoot" } ] ], @@ -1707,7 +1719,7 @@ [ { "name": "codec", - "type": "nbt" + "type": "nbtRoot" } ] ], @@ -2299,7 +2311,7 @@ }, { "name": "nbtData", - "type": "optionalNbt" + "type": "optionalNbtRoot" } ] ], @@ -2572,7 +2584,7 @@ }, { "name": "nbt", - "type": "optionalNbt" + "type": "optionalNbtRoot" } ] ], @@ -2947,7 +2959,7 @@ }, { "name": "heightmaps", - "type": "nbt" + "type": "nbtRoot" }, { "name": "chunkData", @@ -5138,7 +5150,7 @@ "name": "factorCodec", "type": [ "option", - "nbt" + "nbtRoot" ] } ] @@ -5674,7 +5686,7 @@ "0x0a": "boss_bar", "0x0b": "difficulty", "0x0c": "chunk_batch_finished", - "0x0d": "chunk_batch_start", + "0x0d": "chunk_batch_start", "0x0e": "chunk_biomes", "0x0f": "clear_titles", "0x10": "tab_complete", @@ -6946,8 +6958,8 @@ "container", [ { - "name":"id", - "type": "i64" + "name": "id", + "type": "i64" } ] ],