From 565ae4583dc671e0387a796d7c0aa71e536bc48e Mon Sep 17 00:00:00 2001 From: extremeheat Date: Fri, 18 Jun 2021 14:47:55 -0400 Subject: [PATCH] Protocol updates to sync with minecraft-data --- data/1.16.201/protocol.json | 10 ++++++++-- data/1.16.210/protocol.json | 10 ++++++++-- data/1.16.220/protocol.json | 10 ++++++++-- data/1.17.0/protocol.json | 19 ++++++++++++------- data/latest/proto.yml | 19 ++++++++++++------- data/latest/types.yaml | 6 +++--- 6 files changed, 51 insertions(+), 23 deletions(-) diff --git a/data/1.16.201/protocol.json b/data/1.16.201/protocol.json index a62a5ed..d82e626 100644 --- a/data/1.16.201/protocol.json +++ b/data/1.16.201/protocol.json @@ -1,13 +1,19 @@ { "types": { "varint32": "varint", - "bool": "native", + "varint64": "native", "zigzag32": "native", "zigzag64": "native", "uuid": "native", "byterot": "native", - "MapInfo": "native", + "bitflags": "native", + "restBuffer": "native", + "encapsulated": "native", "nbt": "native", + "lnbt": "native", + "nbtLoop": "native", + "enum_size_based_on_values_len": "native", + "MapInfo": "native", "BehaviourPackInfos": [ "array", { diff --git a/data/1.16.210/protocol.json b/data/1.16.210/protocol.json index 1010531..96a88ca 100644 --- a/data/1.16.210/protocol.json +++ b/data/1.16.210/protocol.json @@ -1,13 +1,19 @@ { "types": { "varint32": "varint", - "bool": "native", + "varint64": "native", "zigzag32": "native", "zigzag64": "native", "uuid": "native", "byterot": "native", - "MapInfo": "native", + "bitflags": "native", + "restBuffer": "native", + "encapsulated": "native", "nbt": "native", + "lnbt": "native", + "nbtLoop": "native", + "enum_size_based_on_values_len": "native", + "MapInfo": "native", "BehaviourPackInfos": [ "array", { diff --git a/data/1.16.220/protocol.json b/data/1.16.220/protocol.json index b49072a..eaebb08 100644 --- a/data/1.16.220/protocol.json +++ b/data/1.16.220/protocol.json @@ -1,13 +1,19 @@ { "types": { "varint32": "varint", - "bool": "native", + "varint64": "native", "zigzag32": "native", "zigzag64": "native", "uuid": "native", "byterot": "native", - "MapInfo": "native", + "bitflags": "native", + "restBuffer": "native", + "encapsulated": "native", "nbt": "native", + "lnbt": "native", + "nbtLoop": "native", + "enum_size_based_on_values_len": "native", + "MapInfo": "native", "BehaviourPackInfos": [ "array", { diff --git a/data/1.17.0/protocol.json b/data/1.17.0/protocol.json index 941c0e5..68efe51 100644 --- a/data/1.17.0/protocol.json +++ b/data/1.17.0/protocol.json @@ -1,13 +1,18 @@ { "types": { - "varint32": "varint", - "bool": "native", + "varint64": "native", "zigzag32": "native", "zigzag64": "native", "uuid": "native", "byterot": "native", - "MapInfo": "native", + "bitflags": "native", + "restBuffer": "native", + "encapsulated": "native", "nbt": "native", + "lnbt": "native", + "nbtLoop": "native", + "enum_size_based_on_values_len": "native", + "MapInfo": "native", "BehaviourPackInfos": [ "array", { @@ -2259,7 +2264,7 @@ [ { "name": "item_id", - "type": "varint32" + "type": "varint" } ] ], @@ -2340,7 +2345,7 @@ }, { "name": "request_id", - "type": "varint32" + "type": "varint" }, { "anon": true, @@ -2388,7 +2393,7 @@ }, { "name": "item_stack_id", - "type": "varint32" + "type": "varint" }, { "name": "custom_name", @@ -5433,7 +5438,7 @@ "type": [ "mapper", { - "type": "varint32", + "type": "varint", "mappings": { "0": "normal", "1": "operator", diff --git a/data/latest/proto.yml b/data/latest/proto.yml index 585c33c..bb2237d 100644 --- a/data/latest/proto.yml +++ b/data/latest/proto.yml @@ -4,21 +4,26 @@ !version: 1.17.0 # Some ProtoDef aliases -string: ["pstring",{"countType":"varint"}] +string: ["pstring",{"countType":"varint"}] # String / array types ByteArray: ["buffer",{"countType":"varint"}] SignedByteArray: ["buffer",{"countType":"zigzag32"}] LittleString: ["pstring",{"countType":"li32"}] ShortArray: ["buffer",{"countType":"li16"}] -varint32: varint -bool: native +varint64: native # Some primitives zigzag32: native zigzag64: native -uuid: native +uuid: native # Data types & special handling byterot: native +bitflags: native +restBuffer: native +encapsulated: native +nbt: native # NBT +lnbt: native +nbtLoop: native +enum_size_based_on_values_len: native # Packet-specific custom logic MapInfo: native -nbt: native -# load the packet map file +# load the packet map file (auto-generated) !import: packet_map.yml !StartDocs: Packets @@ -1088,7 +1093,7 @@ packet_adventure_settings: flags: AdventureFlags # CommandPermissionLevel is a permission level that specifies the kind of commands that the player is # allowed to use. - command_permission: varint32 => + command_permission: varint => 0: normal 1: operator 2: host diff --git a/data/latest/types.yaml b/data/latest/types.yaml index b18a577..b474e56 100644 --- a/data/latest/types.yaml +++ b/data/latest/types.yaml @@ -892,7 +892,7 @@ ItemStackRequest: if craft_creative: # The stack ID of the creative item that is being created. This is one of the # creative item stack IDs sent in the CreativeContent packet. - item_id: varint32 + item_id: varint if optional: # For the cartography table, if a certain MULTI recipe is being called, this points to the network ID that was assigned. recipe_network_id: varint @@ -918,7 +918,7 @@ ItemStackResponses: []varint 1: error # RequestID is the unique ID of the request that this response is in reaction to. If rejected, the client # will undo the actions from the request with this ID. - request_id: varint32 + request_id: varint _: status ? if ok: # ContainerInfo holds information on the containers that had their contents changed as a result of the @@ -939,7 +939,7 @@ ItemStackResponses: []varint # sent to the client. count: u8 # StackNetworkID is the network ID of the new stack at a specific slot. - item_stack_id: varint32 + item_stack_id: varint # CustomName is the custom name of the item stack. It is used in relation to text filtering. custom_name: string # DurabilityCorrection is the current durability of the item stack. This durability will be shown