From fbc6e60f7eb13eec7386c8248fd228f02c8fc802 Mon Sep 17 00:00:00 2001 From: SuperGamerTron Date: Tue, 18 Feb 2025 17:01:38 -0700 Subject: [PATCH 1/4] backport entity metadata --- data/pc/1.10-pre1/proto.yml | 93 ++++------- data/pc/1.10-pre1/protocol.json | 147 +++++++++-------- data/pc/1.10/proto.yml | 93 ++++------- data/pc/1.10/protocol.json | 147 +++++++++-------- data/pc/1.11/proto.yml | 93 ++++------- data/pc/1.11/protocol.json | 147 +++++++++-------- data/pc/1.12-pre4/proto.yml | 96 +++++------ data/pc/1.12-pre4/protocol.json | 150 +++++++++-------- data/pc/1.12.1/proto.yml | 96 +++++------ data/pc/1.12.1/protocol.json | 150 +++++++++-------- data/pc/1.12.2/proto.yml | 96 +++++------ data/pc/1.12.2/protocol.json | 150 +++++++++-------- data/pc/1.12/proto.yml | 96 +++++------ data/pc/1.12/protocol.json | 150 +++++++++-------- data/pc/1.13.1/proto.yml | 105 +++++------- data/pc/1.13.1/protocol.json | 162 ++++++++++--------- data/pc/1.13.2-pre1/proto.yml | 105 +++++------- data/pc/1.13.2-pre1/protocol.json | 162 ++++++++++--------- data/pc/1.13.2-pre2/proto.yml | 105 +++++------- data/pc/1.13.2-pre2/protocol.json | 162 ++++++++++--------- data/pc/1.13.2/proto.yml | 105 +++++------- data/pc/1.13.2/protocol.json | 162 ++++++++++--------- data/pc/1.13/proto.yml | 105 +++++------- data/pc/1.13/protocol.json | 162 ++++++++++--------- data/pc/1.14.1/proto.yml | 120 ++++++-------- data/pc/1.14.1/protocol.json | 201 ++++++++++++----------- data/pc/1.14.3/proto.yml | 120 ++++++-------- data/pc/1.14.3/protocol.json | 201 ++++++++++++----------- data/pc/1.14.4/proto.yml | 120 ++++++-------- data/pc/1.14.4/protocol.json | 201 ++++++++++++----------- data/pc/1.14/proto.yml | 120 ++++++-------- data/pc/1.14/protocol.json | 201 ++++++++++++----------- data/pc/1.15.1/proto.yml | 120 ++++++-------- data/pc/1.15.1/protocol.json | 201 ++++++++++++----------- data/pc/1.15.2/proto.yml | 120 ++++++-------- data/pc/1.15.2/protocol.json | 201 ++++++++++++----------- data/pc/1.15/proto.yml | 120 ++++++-------- data/pc/1.15/protocol.json | 201 ++++++++++++----------- data/pc/1.16-rc1/proto.yml | 120 ++++++-------- data/pc/1.16-rc1/protocol.json | 201 ++++++++++++----------- data/pc/1.16.1/proto.yml | 120 ++++++-------- data/pc/1.16.1/protocol.json | 201 ++++++++++++----------- data/pc/1.16.2/proto.yml | 120 ++++++-------- data/pc/1.16.2/protocol.json | 201 ++++++++++++----------- data/pc/1.16/proto.yml | 120 ++++++-------- data/pc/1.16/protocol.json | 201 ++++++++++++----------- data/pc/1.17.1/proto.yml | 120 ++++++-------- data/pc/1.17.1/protocol.json | 201 ++++++++++++----------- data/pc/1.17/proto.yml | 120 ++++++-------- data/pc/1.17/protocol.json | 201 ++++++++++++----------- data/pc/1.18.2/proto.yml | 120 ++++++-------- data/pc/1.18.2/protocol.json | 201 ++++++++++++----------- data/pc/1.18/proto.yml | 120 ++++++-------- data/pc/1.18/protocol.json | 201 ++++++++++++----------- data/pc/1.19.2/proto.yml | 135 +++++++--------- data/pc/1.19.2/protocol.json | 219 +++++++++++++------------ data/pc/1.19.3/proto.yml | 138 +++++++--------- data/pc/1.19.3/protocol.json | 222 +++++++++++++------------ data/pc/1.19.4/proto.yml | 177 ++++++++------------ data/pc/1.19.4/protocol.json | 261 +++++++++++++++--------------- data/pc/1.19/proto.yml | 120 ++++++-------- data/pc/1.19/protocol.json | 201 ++++++++++++----------- data/pc/1.20.2/proto.yml | 177 ++++++++------------ data/pc/1.20.2/protocol.json | 261 +++++++++++++++--------------- data/pc/1.20.3/proto.yml | 177 ++++++++------------ data/pc/1.20.3/protocol.json | 261 +++++++++++++++--------------- data/pc/1.20/proto.yml | 177 ++++++++------------ data/pc/1.20/protocol.json | 261 +++++++++++++++--------------- data/pc/1.7/proto.yml | 80 ++++----- data/pc/1.7/protocol.json | 150 ++++++++--------- data/pc/1.8/proto.yml | 80 ++++----- data/pc/1.8/protocol.json | 150 ++++++++--------- data/pc/1.9.1-pre2/proto.yml | 93 ++++------- data/pc/1.9.1-pre2/protocol.json | 147 +++++++++-------- data/pc/1.9.2/proto.yml | 93 ++++------- data/pc/1.9.2/protocol.json | 147 +++++++++-------- data/pc/1.9.4/proto.yml | 93 ++++------- data/pc/1.9.4/protocol.json | 147 +++++++++-------- data/pc/1.9/proto.yml | 93 ++++------- data/pc/1.9/protocol.json | 147 +++++++++-------- data/pc/15w40b/proto.yml | 93 ++++------- data/pc/15w40b/protocol.json | 147 +++++++++-------- data/pc/16w20a/proto.yml | 93 ++++------- data/pc/16w20a/protocol.json | 147 +++++++++-------- data/pc/16w35a/proto.yml | 93 ++++------- data/pc/16w35a/protocol.json | 147 +++++++++-------- data/pc/17w15a/proto.yml | 96 +++++------ data/pc/17w15a/protocol.json | 150 +++++++++-------- data/pc/17w18b/proto.yml | 96 +++++------ data/pc/17w18b/protocol.json | 150 +++++++++-------- data/pc/17w50a/proto.yml | 96 +++++------ data/pc/17w50a/protocol.json | 150 +++++++++-------- data/pc/20w13b/proto.yml | 120 ++++++-------- data/pc/20w13b/protocol.json | 201 ++++++++++++----------- data/pc/21w07a/proto.yml | 120 ++++++-------- data/pc/21w07a/protocol.json | 201 ++++++++++++----------- 96 files changed, 6691 insertions(+), 7470 deletions(-) diff --git a/data/pc/1.10-pre1/proto.yml b/data/pc/1.10-pre1/proto.yml index efd8b0587..ce1a45cc6 100644 --- a/data/pc/1.10-pre1/proto.yml +++ b/data/pc/1.10-pre1/proto.yml @@ -59,65 +59,40 @@ } ] ] - entityMetadataItem: $compareTo ? - if 0: i8 - if 1: varint - if 2: f32 - if 3: string - if 4: string - if 5: slot - if 6: bool - if 7: - pitch: f32 - yaw: f32 - roll: f32 - if 8: position - if 9: [ - "option", - "position" - ] - if 10: varint - if 11: [ - "option", - "UUID" - ] - if 12: varint - entityMetadata: [ - "entityMetadataLoop", - { - "endVal": 255, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": "i8" - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] - } - ] + entityMetadataEntry: + key: u8 + type: varint => + - byte + - int + - float + - string + - component + - item_stack + - boolean + - rotations + - block_pos + - optional_block_pos + - direction + - optional_uuid + - block_state + value: type ? + if byte: i8 + if int: varint + if float: f32 + if string: string + if component: string + if item_stack: slot + if boolean: bool + if rotations: + pitch: f32 + yaw: f32 + roll: f32 + if block_pos: position + if optional_block_pos: ["option", "position"] + if direction: varint + if optional_uuid: ["option", "UUID"] + if block_state: varint + entityMetadata: ["entityMetadataLoop", { "endVal": 255, "type": "entityMetadataEntry" }] ^handshaking.toClient.types: packet: diff --git a/data/pc/1.10-pre1/protocol.json b/data/pc/1.10-pre1/protocol.json index 2a5f2ae98..0970621e6 100644 --- a/data/pc/1.10-pre1/protocol.json +++ b/data/pc/1.10-pre1/protocol.json @@ -88,83 +88,90 @@ } ] ], - "entityMetadataItem": [ - "switch", - { - "compareTo": "$compareTo", - "fields": { - "0": "i8", - "1": "varint", - "2": "f32", - "3": "string", - "4": "string", - "5": "slot", - "6": "bool", - "7": [ - "container", - [ - { - "name": "pitch", - "type": "f32" - }, - { - "name": "yaw", - "type": "f32" - }, - { - "name": "roll", - "type": "f32" + "entityMetadataEntry": [ + "container", + [ + { + "name": "key", + "type": "u8" + }, + { + "name": "type", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "byte", + "1": "int", + "2": "float", + "3": "string", + "4": "component", + "5": "item_stack", + "6": "boolean", + "7": "rotations", + "8": "block_pos", + "9": "optional_block_pos", + "10": "direction", + "11": "optional_uuid", + "12": "block_state" } - ] - ], - "8": "position", - "9": [ - "option", - "position" - ], - "10": "varint", - "11": [ - "option", - "UUID" - ], - "12": "varint" + } + ] + }, + { + "name": "value", + "type": [ + "switch", + { + "compareTo": "type", + "fields": { + "byte": "i8", + "int": "varint", + "float": "f32", + "string": "string", + "component": "string", + "item_stack": "slot", + "boolean": "bool", + "rotations": [ + "container", + [ + { + "name": "pitch", + "type": "f32" + }, + { + "name": "yaw", + "type": "f32" + }, + { + "name": "roll", + "type": "f32" + } + ] + ], + "block_pos": "position", + "optional_block_pos": [ + "option", + "position" + ], + "direction": "varint", + "optional_uuid": [ + "option", + "UUID" + ], + "block_state": "varint" + } + } + ] } - } + ] ], "entityMetadata": [ "entityMetadataLoop", { "endVal": 255, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": "i8" - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] + "type": "entityMetadataEntry" } ] }, diff --git a/data/pc/1.10/proto.yml b/data/pc/1.10/proto.yml index 8c1da5d65..6165eca8d 100644 --- a/data/pc/1.10/proto.yml +++ b/data/pc/1.10/proto.yml @@ -59,65 +59,40 @@ } ] ] - entityMetadataItem: $compareTo ? - if 0: i8 - if 1: varint - if 2: f32 - if 3: string - if 4: string - if 5: slot - if 6: bool - if 7: - pitch: f32 - yaw: f32 - roll: f32 - if 8: position - if 9: [ - "option", - "position" - ] - if 10: varint - if 11: [ - "option", - "UUID" - ] - if 12: varint - entityMetadata: [ - "entityMetadataLoop", - { - "endVal": 255, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": "i8" - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] - } - ] + entityMetadataEntry: + key: u8 + type: varint => + - byte + - int + - float + - string + - component + - item_stack + - boolean + - rotations + - block_pos + - optional_block_pos + - direction + - optional_uuid + - block_state + value: type ? + if byte: i8 + if int: varint + if float: f32 + if string: string + if component: string + if item_stack: slot + if boolean: bool + if rotations: + pitch: f32 + yaw: f32 + roll: f32 + if block_pos: position + if optional_block_pos: ["option", "position"] + if direction: varint + if optional_uuid: ["option", "UUID"] + if block_state: varint + entityMetadata: ["entityMetadataLoop", { "endVal": 255, "type": "entityMetadataEntry" }] ^handshaking.toClient.types: packet: diff --git a/data/pc/1.10/protocol.json b/data/pc/1.10/protocol.json index 2a5f2ae98..0970621e6 100644 --- a/data/pc/1.10/protocol.json +++ b/data/pc/1.10/protocol.json @@ -88,83 +88,90 @@ } ] ], - "entityMetadataItem": [ - "switch", - { - "compareTo": "$compareTo", - "fields": { - "0": "i8", - "1": "varint", - "2": "f32", - "3": "string", - "4": "string", - "5": "slot", - "6": "bool", - "7": [ - "container", - [ - { - "name": "pitch", - "type": "f32" - }, - { - "name": "yaw", - "type": "f32" - }, - { - "name": "roll", - "type": "f32" + "entityMetadataEntry": [ + "container", + [ + { + "name": "key", + "type": "u8" + }, + { + "name": "type", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "byte", + "1": "int", + "2": "float", + "3": "string", + "4": "component", + "5": "item_stack", + "6": "boolean", + "7": "rotations", + "8": "block_pos", + "9": "optional_block_pos", + "10": "direction", + "11": "optional_uuid", + "12": "block_state" } - ] - ], - "8": "position", - "9": [ - "option", - "position" - ], - "10": "varint", - "11": [ - "option", - "UUID" - ], - "12": "varint" + } + ] + }, + { + "name": "value", + "type": [ + "switch", + { + "compareTo": "type", + "fields": { + "byte": "i8", + "int": "varint", + "float": "f32", + "string": "string", + "component": "string", + "item_stack": "slot", + "boolean": "bool", + "rotations": [ + "container", + [ + { + "name": "pitch", + "type": "f32" + }, + { + "name": "yaw", + "type": "f32" + }, + { + "name": "roll", + "type": "f32" + } + ] + ], + "block_pos": "position", + "optional_block_pos": [ + "option", + "position" + ], + "direction": "varint", + "optional_uuid": [ + "option", + "UUID" + ], + "block_state": "varint" + } + } + ] } - } + ] ], "entityMetadata": [ "entityMetadataLoop", { "endVal": 255, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": "i8" - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] + "type": "entityMetadataEntry" } ] }, diff --git a/data/pc/1.11/proto.yml b/data/pc/1.11/proto.yml index 65d21db96..b2630a4d5 100644 --- a/data/pc/1.11/proto.yml +++ b/data/pc/1.11/proto.yml @@ -59,65 +59,40 @@ } ] ] - entityMetadataItem: $compareTo ? - if 0: i8 - if 1: varint - if 2: f32 - if 3: string - if 4: string - if 5: slot - if 6: bool - if 7: - pitch: f32 - yaw: f32 - roll: f32 - if 8: position - if 9: [ - "option", - "position" - ] - if 10: varint - if 11: [ - "option", - "UUID" - ] - if 12: varint - entityMetadata: [ - "entityMetadataLoop", - { - "endVal": 255, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": "i8" - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] - } - ] + entityMetadataEntry: + key: u8 + type: varint => + - byte + - int + - float + - string + - component + - item_stack + - boolean + - rotations + - block_pos + - optional_block_pos + - direction + - optional_uuid + - block_state + value: type ? + if byte: i8 + if int: varint + if float: f32 + if string: string + if component: string + if item_stack: slot + if boolean: bool + if rotations: + pitch: f32 + yaw: f32 + roll: f32 + if block_pos: position + if optional_block_pos: ["option", "position"] + if direction: varint + if optional_uuid: ["option", "UUID"] + if block_state: varint + entityMetadata: ["entityMetadataLoop", { "endVal": 255, "type": "entityMetadataEntry" }] ^handshaking.toClient.types: packet: diff --git a/data/pc/1.11/protocol.json b/data/pc/1.11/protocol.json index 1a207ea1c..ce50e0d93 100644 --- a/data/pc/1.11/protocol.json +++ b/data/pc/1.11/protocol.json @@ -88,83 +88,90 @@ } ] ], - "entityMetadataItem": [ - "switch", - { - "compareTo": "$compareTo", - "fields": { - "0": "i8", - "1": "varint", - "2": "f32", - "3": "string", - "4": "string", - "5": "slot", - "6": "bool", - "7": [ - "container", - [ - { - "name": "pitch", - "type": "f32" - }, - { - "name": "yaw", - "type": "f32" - }, - { - "name": "roll", - "type": "f32" + "entityMetadataEntry": [ + "container", + [ + { + "name": "key", + "type": "u8" + }, + { + "name": "type", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "byte", + "1": "int", + "2": "float", + "3": "string", + "4": "component", + "5": "item_stack", + "6": "boolean", + "7": "rotations", + "8": "block_pos", + "9": "optional_block_pos", + "10": "direction", + "11": "optional_uuid", + "12": "block_state" } - ] - ], - "8": "position", - "9": [ - "option", - "position" - ], - "10": "varint", - "11": [ - "option", - "UUID" - ], - "12": "varint" + } + ] + }, + { + "name": "value", + "type": [ + "switch", + { + "compareTo": "type", + "fields": { + "byte": "i8", + "int": "varint", + "float": "f32", + "string": "string", + "component": "string", + "item_stack": "slot", + "boolean": "bool", + "rotations": [ + "container", + [ + { + "name": "pitch", + "type": "f32" + }, + { + "name": "yaw", + "type": "f32" + }, + { + "name": "roll", + "type": "f32" + } + ] + ], + "block_pos": "position", + "optional_block_pos": [ + "option", + "position" + ], + "direction": "varint", + "optional_uuid": [ + "option", + "UUID" + ], + "block_state": "varint" + } + } + ] } - } + ] ], "entityMetadata": [ "entityMetadataLoop", { "endVal": 255, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": "i8" - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] + "type": "entityMetadataEntry" } ] }, diff --git a/data/pc/1.12-pre4/proto.yml b/data/pc/1.12-pre4/proto.yml index 08c29a450..e3694440d 100644 --- a/data/pc/1.12-pre4/proto.yml +++ b/data/pc/1.12-pre4/proto.yml @@ -59,66 +59,42 @@ } ] ] - entityMetadataItem: $compareTo ? - if 0: i8 - if 1: varint - if 2: f32 - if 3: string - if 4: string - if 5: slot - if 6: bool - if 7: - pitch: f32 - yaw: f32 - roll: f32 - if 8: position - if 9: [ - "option", - "position" - ] - if 10: varint - if 11: [ - "option", - "UUID" - ] - if 12: varint - if 13: nbt - entityMetadata: [ - "entityMetadataLoop", - { - "endVal": 255, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": "i8" - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] - } - ] + entityMetadataEntry: + key: u8 + type: varint => + - byte + - int + - float + - string + - component + - item_stack + - boolean + - rotations + - block_pos + - optional_block_pos + - direction + - optional_uuid + - block_state + - compound_tag + value: type ? + if byte: i8 + if int: varint + if float: f32 + if string: string + if component: string + if item_stack: slot + if boolean: bool + if rotations: + pitch: f32 + yaw: f32 + roll: f32 + if block_pos: position + if optional_block_pos: ["option", "position"] + if direction: varint + if optional_uuid: ["option", "UUID"] + if block_state: varint + if compound_tag: nbt + entityMetadata: ["entityMetadataLoop", { "endVal": 255, "type": "entityMetadataEntry" }] ^handshaking.toClient.types: packet: diff --git a/data/pc/1.12-pre4/protocol.json b/data/pc/1.12-pre4/protocol.json index db4aed95f..0c23603c2 100644 --- a/data/pc/1.12-pre4/protocol.json +++ b/data/pc/1.12-pre4/protocol.json @@ -88,84 +88,92 @@ } ] ], - "entityMetadataItem": [ - "switch", - { - "compareTo": "$compareTo", - "fields": { - "0": "i8", - "1": "varint", - "2": "f32", - "3": "string", - "4": "string", - "5": "slot", - "6": "bool", - "7": [ - "container", - [ - { - "name": "pitch", - "type": "f32" - }, - { - "name": "yaw", - "type": "f32" - }, - { - "name": "roll", - "type": "f32" + "entityMetadataEntry": [ + "container", + [ + { + "name": "key", + "type": "u8" + }, + { + "name": "type", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "byte", + "1": "int", + "2": "float", + "3": "string", + "4": "component", + "5": "item_stack", + "6": "boolean", + "7": "rotations", + "8": "block_pos", + "9": "optional_block_pos", + "10": "direction", + "11": "optional_uuid", + "12": "block_state", + "13": "compound_tag" + } + } + ] + }, + { + "name": "value", + "type": [ + "switch", + { + "compareTo": "type", + "fields": { + "byte": "i8", + "int": "varint", + "float": "f32", + "string": "string", + "component": "string", + "item_stack": "slot", + "boolean": "bool", + "rotations": [ + "container", + [ + { + "name": "pitch", + "type": "f32" + }, + { + "name": "yaw", + "type": "f32" + }, + { + "name": "roll", + "type": "f32" + } + ] + ], + "block_pos": "position", + "optional_block_pos": [ + "option", + "position" + ], + "direction": "varint", + "optional_uuid": [ + "option", + "UUID" + ], + "block_state": "varint", + "compound_tag": "nbt" } - ] - ], - "8": "position", - "9": [ - "option", - "position" - ], - "10": "varint", - "11": [ - "option", - "UUID" - ], - "12": "varint", - "13": "nbt" + } + ] } - } + ] ], "entityMetadata": [ "entityMetadataLoop", { "endVal": 255, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": "i8" - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] + "type": "entityMetadataEntry" } ] }, diff --git a/data/pc/1.12.1/proto.yml b/data/pc/1.12.1/proto.yml index 0fde289ca..1334e7439 100644 --- a/data/pc/1.12.1/proto.yml +++ b/data/pc/1.12.1/proto.yml @@ -59,66 +59,42 @@ } ] ] - entityMetadataItem: $compareTo ? - if 0: i8 - if 1: varint - if 2: f32 - if 3: string - if 4: string - if 5: slot - if 6: bool - if 7: - pitch: f32 - yaw: f32 - roll: f32 - if 8: position - if 9: [ - "option", - "position" - ] - if 10: varint - if 11: [ - "option", - "UUID" - ] - if 12: varint - if 13: nbt - entityMetadata: [ - "entityMetadataLoop", - { - "endVal": 255, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": "i8" - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] - } - ] + entityMetadataEntry: + key: u8 + type: varint => + - byte + - int + - float + - string + - component + - item_stack + - boolean + - rotations + - block_pos + - optional_block_pos + - direction + - optional_uuid + - block_state + - compound_tag + value: type ? + if byte: i8 + if int: varint + if float: f32 + if string: string + if component: string + if item_stack: slot + if boolean: bool + if rotations: + pitch: f32 + yaw: f32 + roll: f32 + if block_pos: position + if optional_block_pos: ["option", "position"] + if direction: varint + if optional_uuid: ["option", "UUID"] + if block_state: varint + if compound_tag: nbt + entityMetadata: ["entityMetadataLoop", { "endVal": 255, "type": "entityMetadataEntry" }] ^handshaking.toClient.types: packet: diff --git a/data/pc/1.12.1/protocol.json b/data/pc/1.12.1/protocol.json index 5a72cc94d..c9671d94e 100644 --- a/data/pc/1.12.1/protocol.json +++ b/data/pc/1.12.1/protocol.json @@ -88,84 +88,92 @@ } ] ], - "entityMetadataItem": [ - "switch", - { - "compareTo": "$compareTo", - "fields": { - "0": "i8", - "1": "varint", - "2": "f32", - "3": "string", - "4": "string", - "5": "slot", - "6": "bool", - "7": [ - "container", - [ - { - "name": "pitch", - "type": "f32" - }, - { - "name": "yaw", - "type": "f32" - }, - { - "name": "roll", - "type": "f32" + "entityMetadataEntry": [ + "container", + [ + { + "name": "key", + "type": "u8" + }, + { + "name": "type", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "byte", + "1": "int", + "2": "float", + "3": "string", + "4": "component", + "5": "item_stack", + "6": "boolean", + "7": "rotations", + "8": "block_pos", + "9": "optional_block_pos", + "10": "direction", + "11": "optional_uuid", + "12": "block_state", + "13": "compound_tag" + } + } + ] + }, + { + "name": "value", + "type": [ + "switch", + { + "compareTo": "type", + "fields": { + "byte": "i8", + "int": "varint", + "float": "f32", + "string": "string", + "component": "string", + "item_stack": "slot", + "boolean": "bool", + "rotations": [ + "container", + [ + { + "name": "pitch", + "type": "f32" + }, + { + "name": "yaw", + "type": "f32" + }, + { + "name": "roll", + "type": "f32" + } + ] + ], + "block_pos": "position", + "optional_block_pos": [ + "option", + "position" + ], + "direction": "varint", + "optional_uuid": [ + "option", + "UUID" + ], + "block_state": "varint", + "compound_tag": "nbt" } - ] - ], - "8": "position", - "9": [ - "option", - "position" - ], - "10": "varint", - "11": [ - "option", - "UUID" - ], - "12": "varint", - "13": "nbt" + } + ] } - } + ] ], "entityMetadata": [ "entityMetadataLoop", { "endVal": 255, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": "i8" - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] + "type": "entityMetadataEntry" } ] }, diff --git a/data/pc/1.12.2/proto.yml b/data/pc/1.12.2/proto.yml index 2f7d36b8b..db5c38f67 100644 --- a/data/pc/1.12.2/proto.yml +++ b/data/pc/1.12.2/proto.yml @@ -59,66 +59,42 @@ } ] ] - entityMetadataItem: $compareTo ? - if 0: i8 - if 1: varint - if 2: f32 - if 3: string - if 4: string - if 5: slot - if 6: bool - if 7: - pitch: f32 - yaw: f32 - roll: f32 - if 8: position - if 9: [ - "option", - "position" - ] - if 10: varint - if 11: [ - "option", - "UUID" - ] - if 12: varint - if 13: nbt - entityMetadata: [ - "entityMetadataLoop", - { - "endVal": 255, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": "i8" - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] - } - ] + entityMetadataEntry: + key: u8 + type: varint => + - byte + - int + - float + - string + - component + - item_stack + - boolean + - rotations + - block_pos + - optional_block_pos + - direction + - optional_uuid + - block_state + - compound_tag + value: type ? + if byte: i8 + if int: varint + if float: f32 + if string: string + if component: string + if item_stack: slot + if boolean: bool + if rotations: + pitch: f32 + yaw: f32 + roll: f32 + if block_pos: position + if optional_block_pos: ["option", "position"] + if direction: varint + if optional_uuid: ["option", "UUID"] + if block_state: varint + if compound_tag: nbt + entityMetadata: ["entityMetadataLoop", { "endVal": 255, "type": "entityMetadataEntry" }] ^handshaking.toClient.types: packet: diff --git a/data/pc/1.12.2/protocol.json b/data/pc/1.12.2/protocol.json index 72198fef9..693af32e2 100644 --- a/data/pc/1.12.2/protocol.json +++ b/data/pc/1.12.2/protocol.json @@ -88,84 +88,92 @@ } ] ], - "entityMetadataItem": [ - "switch", - { - "compareTo": "$compareTo", - "fields": { - "0": "i8", - "1": "varint", - "2": "f32", - "3": "string", - "4": "string", - "5": "slot", - "6": "bool", - "7": [ - "container", - [ - { - "name": "pitch", - "type": "f32" - }, - { - "name": "yaw", - "type": "f32" - }, - { - "name": "roll", - "type": "f32" + "entityMetadataEntry": [ + "container", + [ + { + "name": "key", + "type": "u8" + }, + { + "name": "type", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "byte", + "1": "int", + "2": "float", + "3": "string", + "4": "component", + "5": "item_stack", + "6": "boolean", + "7": "rotations", + "8": "block_pos", + "9": "optional_block_pos", + "10": "direction", + "11": "optional_uuid", + "12": "block_state", + "13": "compound_tag" + } + } + ] + }, + { + "name": "value", + "type": [ + "switch", + { + "compareTo": "type", + "fields": { + "byte": "i8", + "int": "varint", + "float": "f32", + "string": "string", + "component": "string", + "item_stack": "slot", + "boolean": "bool", + "rotations": [ + "container", + [ + { + "name": "pitch", + "type": "f32" + }, + { + "name": "yaw", + "type": "f32" + }, + { + "name": "roll", + "type": "f32" + } + ] + ], + "block_pos": "position", + "optional_block_pos": [ + "option", + "position" + ], + "direction": "varint", + "optional_uuid": [ + "option", + "UUID" + ], + "block_state": "varint", + "compound_tag": "nbt" } - ] - ], - "8": "position", - "9": [ - "option", - "position" - ], - "10": "varint", - "11": [ - "option", - "UUID" - ], - "12": "varint", - "13": "nbt" + } + ] } - } + ] ], "entityMetadata": [ "entityMetadataLoop", { "endVal": 255, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": "i8" - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] + "type": "entityMetadataEntry" } ] }, diff --git a/data/pc/1.12/proto.yml b/data/pc/1.12/proto.yml index f48805d6a..f71c3b449 100644 --- a/data/pc/1.12/proto.yml +++ b/data/pc/1.12/proto.yml @@ -59,66 +59,42 @@ } ] ] - entityMetadataItem: $compareTo ? - if 0: i8 - if 1: varint - if 2: f32 - if 3: string - if 4: string - if 5: slot - if 6: bool - if 7: - pitch: f32 - yaw: f32 - roll: f32 - if 8: position - if 9: [ - "option", - "position" - ] - if 10: varint - if 11: [ - "option", - "UUID" - ] - if 12: varint - if 13: nbt - entityMetadata: [ - "entityMetadataLoop", - { - "endVal": 255, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": "i8" - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] - } - ] + entityMetadataEntry: + key: u8 + type: varint => + - byte + - int + - float + - string + - component + - item_stack + - boolean + - rotations + - block_pos + - optional_block_pos + - direction + - optional_uuid + - block_state + - compound_tag + value: type ? + if byte: i8 + if int: varint + if float: f32 + if string: string + if component: string + if item_stack: slot + if boolean: bool + if rotations: + pitch: f32 + yaw: f32 + roll: f32 + if block_pos: position + if optional_block_pos: ["option", "position"] + if direction: varint + if optional_uuid: ["option", "UUID"] + if block_state: varint + if compound_tag: nbt + entityMetadata: ["entityMetadataLoop", { "endVal": 255, "type": "entityMetadataEntry" }] ^handshaking.toClient.types: packet: diff --git a/data/pc/1.12/protocol.json b/data/pc/1.12/protocol.json index dddd3c0ad..267c607bf 100644 --- a/data/pc/1.12/protocol.json +++ b/data/pc/1.12/protocol.json @@ -88,84 +88,92 @@ } ] ], - "entityMetadataItem": [ - "switch", - { - "compareTo": "$compareTo", - "fields": { - "0": "i8", - "1": "varint", - "2": "f32", - "3": "string", - "4": "string", - "5": "slot", - "6": "bool", - "7": [ - "container", - [ - { - "name": "pitch", - "type": "f32" - }, - { - "name": "yaw", - "type": "f32" - }, - { - "name": "roll", - "type": "f32" + "entityMetadataEntry": [ + "container", + [ + { + "name": "key", + "type": "u8" + }, + { + "name": "type", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "byte", + "1": "int", + "2": "float", + "3": "string", + "4": "component", + "5": "item_stack", + "6": "boolean", + "7": "rotations", + "8": "block_pos", + "9": "optional_block_pos", + "10": "direction", + "11": "optional_uuid", + "12": "block_state", + "13": "compound_tag" + } + } + ] + }, + { + "name": "value", + "type": [ + "switch", + { + "compareTo": "type", + "fields": { + "byte": "i8", + "int": "varint", + "float": "f32", + "string": "string", + "component": "string", + "item_stack": "slot", + "boolean": "bool", + "rotations": [ + "container", + [ + { + "name": "pitch", + "type": "f32" + }, + { + "name": "yaw", + "type": "f32" + }, + { + "name": "roll", + "type": "f32" + } + ] + ], + "block_pos": "position", + "optional_block_pos": [ + "option", + "position" + ], + "direction": "varint", + "optional_uuid": [ + "option", + "UUID" + ], + "block_state": "varint", + "compound_tag": "nbt" } - ] - ], - "8": "position", - "9": [ - "option", - "position" - ], - "10": "varint", - "11": [ - "option", - "UUID" - ], - "12": "varint", - "13": "nbt" + } + ] } - } + ] ], "entityMetadata": [ "entityMetadataLoop", { "endVal": 255, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": "i8" - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] + "type": "entityMetadataEntry" } ] }, diff --git a/data/pc/1.13.1/proto.yml b/data/pc/1.13.1/proto.yml index c1954ea7c..03a41324a 100644 --- a/data/pc/1.13.1/proto.yml +++ b/data/pc/1.13.1/proto.yml @@ -80,71 +80,46 @@ } ] ] - entityMetadataItem: $compareTo ? - if 0: i8 - if 1: varint - if 2: f32 - if 3: string - if 4: string - if 5: [ - "option", - "string" - ] - if 6: slot - if 7: bool - if 8: - pitch: f32 - yaw: f32 - roll: f32 - if 9: position - if 10: [ - "option", - "position" - ] - if 11: varint - if 12: [ - "option", - "UUID" - ] - if 13: varint - if 14: nbt - if 15: particle - entityMetadata: [ - "entityMetadataLoop", - { - "endVal": 255, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": "varint" - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] - } - ] + entityMetadataEntry: + key: u8 + type: varint => + - byte + - int + - float + - string + - component + - optional_component + - item_stack + - boolean + - rotations + - block_pos + - optional_block_pos + - direction + - optional_uuid + - block_state + - compound_tag + - particle + value: type ? + if byte: i8 + if int: varint + if float: f32 + if string: string + if component: string + if optional_component: ["option", "string"] + if item_stack: slot + if boolean: bool + if rotations: + pitch: f32 + yaw: f32 + roll: f32 + if block_pos: position + if optional_block_pos: ["option", "position"] + if direction: varint + if optional_uuid: ["option", "UUID"] + if block_state: varint + if compound_tag: nbt + if particle: particle + entityMetadata: ["entityMetadataLoop", { "endVal": 255, "type": "entityMetadataEntry" }] command_node: flags: [ "bitfield", diff --git a/data/pc/1.13.1/protocol.json b/data/pc/1.13.1/protocol.json index f9ed0647c..ac6f71f5d 100644 --- a/data/pc/1.13.1/protocol.json +++ b/data/pc/1.13.1/protocol.json @@ -166,89 +166,99 @@ } ] ], - "entityMetadataItem": [ - "switch", - { - "compareTo": "$compareTo", - "fields": { - "0": "i8", - "1": "varint", - "2": "f32", - "3": "string", - "4": "string", - "5": [ - "option", - "string" - ], - "6": "slot", - "7": "bool", - "8": [ - "container", - [ - { - "name": "pitch", - "type": "f32" - }, - { - "name": "yaw", - "type": "f32" - }, - { - "name": "roll", - "type": "f32" + "entityMetadataEntry": [ + "container", + [ + { + "name": "key", + "type": "u8" + }, + { + "name": "type", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "byte", + "1": "int", + "2": "float", + "3": "string", + "4": "component", + "5": "optional_component", + "6": "item_stack", + "7": "boolean", + "8": "rotations", + "9": "block_pos", + "10": "optional_block_pos", + "11": "direction", + "12": "optional_uuid", + "13": "block_state", + "14": "compound_tag", + "15": "particle" } - ] - ], - "9": "position", - "10": [ - "option", - "position" - ], - "11": "varint", - "12": [ - "option", - "UUID" - ], - "13": "varint", - "14": "nbt", - "15": "particle" + } + ] + }, + { + "name": "value", + "type": [ + "switch", + { + "compareTo": "type", + "fields": { + "byte": "i8", + "int": "varint", + "float": "f32", + "string": "string", + "component": "string", + "optional_component": [ + "option", + "string" + ], + "item_stack": "slot", + "boolean": "bool", + "rotations": [ + "container", + [ + { + "name": "pitch", + "type": "f32" + }, + { + "name": "yaw", + "type": "f32" + }, + { + "name": "roll", + "type": "f32" + } + ] + ], + "block_pos": "position", + "optional_block_pos": [ + "option", + "position" + ], + "direction": "varint", + "optional_uuid": [ + "option", + "UUID" + ], + "block_state": "varint", + "compound_tag": "nbt", + "particle": "particle" + } + } + ] } - } + ] ], "entityMetadata": [ "entityMetadataLoop", { "endVal": 255, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": "varint" - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] + "type": "entityMetadataEntry" } ], "command_node": [ diff --git a/data/pc/1.13.2-pre1/proto.yml b/data/pc/1.13.2-pre1/proto.yml index 588322bbf..62a010f82 100644 --- a/data/pc/1.13.2-pre1/proto.yml +++ b/data/pc/1.13.2-pre1/proto.yml @@ -81,71 +81,46 @@ } ] ] - entityMetadataItem: $compareTo ? - if 0: i8 - if 1: varint - if 2: f32 - if 3: string - if 4: string - if 5: [ - "option", - "string" - ] - if 6: slot - if 7: bool - if 8: - pitch: f32 - yaw: f32 - roll: f32 - if 9: position - if 10: [ - "option", - "position" - ] - if 11: varint - if 12: [ - "option", - "UUID" - ] - if 13: varint - if 14: nbt - if 15: particle - entityMetadata: [ - "entityMetadataLoop", - { - "endVal": 255, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": "varint" - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] - } - ] + entityMetadataEntry: + key: u8 + type: varint => + - byte + - int + - float + - string + - component + - optional_component + - item_stack + - boolean + - rotations + - block_pos + - optional_block_pos + - direction + - optional_uuid + - block_state + - compound_tag + - particle + value: type ? + if byte: i8 + if int: varint + if float: f32 + if string: string + if component: string + if optional_component: ["option", "string"] + if item_stack: slot + if boolean: bool + if rotations: + pitch: f32 + yaw: f32 + roll: f32 + if block_pos: position + if optional_block_pos: ["option", "position"] + if direction: varint + if optional_uuid: ["option", "UUID"] + if block_state: varint + if compound_tag: nbt + if particle: particle + entityMetadata: ["entityMetadataLoop", { "endVal": 255, "type": "entityMetadataEntry" }] command_node: flags: [ "bitfield", diff --git a/data/pc/1.13.2-pre1/protocol.json b/data/pc/1.13.2-pre1/protocol.json index 4caaf5f43..ee38f3d72 100644 --- a/data/pc/1.13.2-pre1/protocol.json +++ b/data/pc/1.13.2-pre1/protocol.json @@ -170,89 +170,99 @@ } ] ], - "entityMetadataItem": [ - "switch", - { - "compareTo": "$compareTo", - "fields": { - "0": "i8", - "1": "varint", - "2": "f32", - "3": "string", - "4": "string", - "5": [ - "option", - "string" - ], - "6": "slot", - "7": "bool", - "8": [ - "container", - [ - { - "name": "pitch", - "type": "f32" - }, - { - "name": "yaw", - "type": "f32" - }, - { - "name": "roll", - "type": "f32" + "entityMetadataEntry": [ + "container", + [ + { + "name": "key", + "type": "u8" + }, + { + "name": "type", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "byte", + "1": "int", + "2": "float", + "3": "string", + "4": "component", + "5": "optional_component", + "6": "item_stack", + "7": "boolean", + "8": "rotations", + "9": "block_pos", + "10": "optional_block_pos", + "11": "direction", + "12": "optional_uuid", + "13": "block_state", + "14": "compound_tag", + "15": "particle" } - ] - ], - "9": "position", - "10": [ - "option", - "position" - ], - "11": "varint", - "12": [ - "option", - "UUID" - ], - "13": "varint", - "14": "nbt", - "15": "particle" + } + ] + }, + { + "name": "value", + "type": [ + "switch", + { + "compareTo": "type", + "fields": { + "byte": "i8", + "int": "varint", + "float": "f32", + "string": "string", + "component": "string", + "optional_component": [ + "option", + "string" + ], + "item_stack": "slot", + "boolean": "bool", + "rotations": [ + "container", + [ + { + "name": "pitch", + "type": "f32" + }, + { + "name": "yaw", + "type": "f32" + }, + { + "name": "roll", + "type": "f32" + } + ] + ], + "block_pos": "position", + "optional_block_pos": [ + "option", + "position" + ], + "direction": "varint", + "optional_uuid": [ + "option", + "UUID" + ], + "block_state": "varint", + "compound_tag": "nbt", + "particle": "particle" + } + } + ] } - } + ] ], "entityMetadata": [ "entityMetadataLoop", { "endVal": 255, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": "varint" - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] + "type": "entityMetadataEntry" } ], "command_node": [ diff --git a/data/pc/1.13.2-pre2/proto.yml b/data/pc/1.13.2-pre2/proto.yml index c5d06e821..2def30454 100644 --- a/data/pc/1.13.2-pre2/proto.yml +++ b/data/pc/1.13.2-pre2/proto.yml @@ -81,71 +81,46 @@ } ] ] - entityMetadataItem: $compareTo ? - if 0: i8 - if 1: varint - if 2: f32 - if 3: string - if 4: string - if 5: [ - "option", - "string" - ] - if 6: slot - if 7: bool - if 8: - pitch: f32 - yaw: f32 - roll: f32 - if 9: position - if 10: [ - "option", - "position" - ] - if 11: varint - if 12: [ - "option", - "UUID" - ] - if 13: varint - if 14: nbt - if 15: particle - entityMetadata: [ - "entityMetadataLoop", - { - "endVal": 255, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": "varint" - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] - } - ] + entityMetadataEntry: + key: u8 + type: varint => + - byte + - int + - float + - string + - component + - optional_component + - item_stack + - boolean + - rotations + - block_pos + - optional_block_pos + - direction + - optional_uuid + - block_state + - compound_tag + - particle + value: type ? + if byte: i8 + if int: varint + if float: f32 + if string: string + if component: string + if optional_component: ["option", "string"] + if item_stack: slot + if boolean: bool + if rotations: + pitch: f32 + yaw: f32 + roll: f32 + if block_pos: position + if optional_block_pos: ["option", "position"] + if direction: varint + if optional_uuid: ["option", "UUID"] + if block_state: varint + if compound_tag: nbt + if particle: particle + entityMetadata: ["entityMetadataLoop", { "endVal": 255, "type": "entityMetadataEntry" }] command_node: flags: [ "bitfield", diff --git a/data/pc/1.13.2-pre2/protocol.json b/data/pc/1.13.2-pre2/protocol.json index 4caaf5f43..ee38f3d72 100644 --- a/data/pc/1.13.2-pre2/protocol.json +++ b/data/pc/1.13.2-pre2/protocol.json @@ -170,89 +170,99 @@ } ] ], - "entityMetadataItem": [ - "switch", - { - "compareTo": "$compareTo", - "fields": { - "0": "i8", - "1": "varint", - "2": "f32", - "3": "string", - "4": "string", - "5": [ - "option", - "string" - ], - "6": "slot", - "7": "bool", - "8": [ - "container", - [ - { - "name": "pitch", - "type": "f32" - }, - { - "name": "yaw", - "type": "f32" - }, - { - "name": "roll", - "type": "f32" + "entityMetadataEntry": [ + "container", + [ + { + "name": "key", + "type": "u8" + }, + { + "name": "type", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "byte", + "1": "int", + "2": "float", + "3": "string", + "4": "component", + "5": "optional_component", + "6": "item_stack", + "7": "boolean", + "8": "rotations", + "9": "block_pos", + "10": "optional_block_pos", + "11": "direction", + "12": "optional_uuid", + "13": "block_state", + "14": "compound_tag", + "15": "particle" } - ] - ], - "9": "position", - "10": [ - "option", - "position" - ], - "11": "varint", - "12": [ - "option", - "UUID" - ], - "13": "varint", - "14": "nbt", - "15": "particle" + } + ] + }, + { + "name": "value", + "type": [ + "switch", + { + "compareTo": "type", + "fields": { + "byte": "i8", + "int": "varint", + "float": "f32", + "string": "string", + "component": "string", + "optional_component": [ + "option", + "string" + ], + "item_stack": "slot", + "boolean": "bool", + "rotations": [ + "container", + [ + { + "name": "pitch", + "type": "f32" + }, + { + "name": "yaw", + "type": "f32" + }, + { + "name": "roll", + "type": "f32" + } + ] + ], + "block_pos": "position", + "optional_block_pos": [ + "option", + "position" + ], + "direction": "varint", + "optional_uuid": [ + "option", + "UUID" + ], + "block_state": "varint", + "compound_tag": "nbt", + "particle": "particle" + } + } + ] } - } + ] ], "entityMetadata": [ "entityMetadataLoop", { "endVal": 255, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": "varint" - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] + "type": "entityMetadataEntry" } ], "command_node": [ diff --git a/data/pc/1.13.2/proto.yml b/data/pc/1.13.2/proto.yml index 36920058e..4d9196c82 100644 --- a/data/pc/1.13.2/proto.yml +++ b/data/pc/1.13.2/proto.yml @@ -81,71 +81,46 @@ } ] ] - entityMetadataItem: $compareTo ? - if 0: i8 - if 1: varint - if 2: f32 - if 3: string - if 4: string - if 5: [ - "option", - "string" - ] - if 6: slot - if 7: bool - if 8: - pitch: f32 - yaw: f32 - roll: f32 - if 9: position - if 10: [ - "option", - "position" - ] - if 11: varint - if 12: [ - "option", - "UUID" - ] - if 13: varint - if 14: nbt - if 15: particle - entityMetadata: [ - "entityMetadataLoop", - { - "endVal": 255, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": "varint" - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] - } - ] + entityMetadataEntry: + key: u8 + type: varint => + - byte + - int + - float + - string + - component + - optional_component + - item_stack + - boolean + - rotations + - block_pos + - optional_block_pos + - direction + - optional_uuid + - block_state + - compound_tag + - particle + value: type ? + if byte: i8 + if int: varint + if float: f32 + if string: string + if component: string + if optional_component: ["option", "string"] + if item_stack: slot + if boolean: bool + if rotations: + pitch: f32 + yaw: f32 + roll: f32 + if block_pos: position + if optional_block_pos: ["option", "position"] + if direction: varint + if optional_uuid: ["option", "UUID"] + if block_state: varint + if compound_tag: nbt + if particle: particle + entityMetadata: ["entityMetadataLoop", { "endVal": 255, "type": "entityMetadataEntry" }] command_node: flags: [ "bitfield", diff --git a/data/pc/1.13.2/protocol.json b/data/pc/1.13.2/protocol.json index e7a32e704..6c62b7edd 100644 --- a/data/pc/1.13.2/protocol.json +++ b/data/pc/1.13.2/protocol.json @@ -170,89 +170,99 @@ } ] ], - "entityMetadataItem": [ - "switch", - { - "compareTo": "$compareTo", - "fields": { - "0": "i8", - "1": "varint", - "2": "f32", - "3": "string", - "4": "string", - "5": [ - "option", - "string" - ], - "6": "slot", - "7": "bool", - "8": [ - "container", - [ - { - "name": "pitch", - "type": "f32" - }, - { - "name": "yaw", - "type": "f32" - }, - { - "name": "roll", - "type": "f32" + "entityMetadataEntry": [ + "container", + [ + { + "name": "key", + "type": "u8" + }, + { + "name": "type", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "byte", + "1": "int", + "2": "float", + "3": "string", + "4": "component", + "5": "optional_component", + "6": "item_stack", + "7": "boolean", + "8": "rotations", + "9": "block_pos", + "10": "optional_block_pos", + "11": "direction", + "12": "optional_uuid", + "13": "block_state", + "14": "compound_tag", + "15": "particle" } - ] - ], - "9": "position", - "10": [ - "option", - "position" - ], - "11": "varint", - "12": [ - "option", - "UUID" - ], - "13": "varint", - "14": "nbt", - "15": "particle" + } + ] + }, + { + "name": "value", + "type": [ + "switch", + { + "compareTo": "type", + "fields": { + "byte": "i8", + "int": "varint", + "float": "f32", + "string": "string", + "component": "string", + "optional_component": [ + "option", + "string" + ], + "item_stack": "slot", + "boolean": "bool", + "rotations": [ + "container", + [ + { + "name": "pitch", + "type": "f32" + }, + { + "name": "yaw", + "type": "f32" + }, + { + "name": "roll", + "type": "f32" + } + ] + ], + "block_pos": "position", + "optional_block_pos": [ + "option", + "position" + ], + "direction": "varint", + "optional_uuid": [ + "option", + "UUID" + ], + "block_state": "varint", + "compound_tag": "nbt", + "particle": "particle" + } + } + ] } - } + ] ], "entityMetadata": [ "entityMetadataLoop", { "endVal": 255, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": "varint" - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] + "type": "entityMetadataEntry" } ], "command_node": [ diff --git a/data/pc/1.13/proto.yml b/data/pc/1.13/proto.yml index 1441ae7a1..08d4217db 100644 --- a/data/pc/1.13/proto.yml +++ b/data/pc/1.13/proto.yml @@ -80,71 +80,46 @@ } ] ] - entityMetadataItem: $compareTo ? - if 0: i8 - if 1: varint - if 2: f32 - if 3: string - if 4: string - if 5: [ - "option", - "string" - ] - if 6: slot - if 7: bool - if 8: - pitch: f32 - yaw: f32 - roll: f32 - if 9: position - if 10: [ - "option", - "position" - ] - if 11: varint - if 12: [ - "option", - "UUID" - ] - if 13: varint - if 14: nbt - if 15: particle - entityMetadata: [ - "entityMetadataLoop", - { - "endVal": 255, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": "varint" - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] - } - ] + entityMetadataEntry: + key: u8 + type: varint => + - byte + - int + - float + - string + - component + - optional_component + - item_stack + - boolean + - rotations + - block_pos + - optional_block_pos + - direction + - optional_uuid + - block_state + - compound_tag + - particle + value: type ? + if byte: i8 + if int: varint + if float: f32 + if string: string + if component: string + if optional_component: ["option", "string"] + if item_stack: slot + if boolean: bool + if rotations: + pitch: f32 + yaw: f32 + roll: f32 + if block_pos: position + if optional_block_pos: ["option", "position"] + if direction: varint + if optional_uuid: ["option", "UUID"] + if block_state: varint + if compound_tag: nbt + if particle: particle + entityMetadata: ["entityMetadataLoop", { "endVal": 255, "type": "entityMetadataEntry" }] command_node: flags: [ "bitfield", diff --git a/data/pc/1.13/protocol.json b/data/pc/1.13/protocol.json index 89e0e5cea..5f8b1948a 100644 --- a/data/pc/1.13/protocol.json +++ b/data/pc/1.13/protocol.json @@ -166,89 +166,99 @@ } ] ], - "entityMetadataItem": [ - "switch", - { - "compareTo": "$compareTo", - "fields": { - "0": "i8", - "1": "varint", - "2": "f32", - "3": "string", - "4": "string", - "5": [ - "option", - "string" - ], - "6": "slot", - "7": "bool", - "8": [ - "container", - [ - { - "name": "pitch", - "type": "f32" - }, - { - "name": "yaw", - "type": "f32" - }, - { - "name": "roll", - "type": "f32" + "entityMetadataEntry": [ + "container", + [ + { + "name": "key", + "type": "u8" + }, + { + "name": "type", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "byte", + "1": "int", + "2": "float", + "3": "string", + "4": "component", + "5": "optional_component", + "6": "item_stack", + "7": "boolean", + "8": "rotations", + "9": "block_pos", + "10": "optional_block_pos", + "11": "direction", + "12": "optional_uuid", + "13": "block_state", + "14": "compound_tag", + "15": "particle" } - ] - ], - "9": "position", - "10": [ - "option", - "position" - ], - "11": "varint", - "12": [ - "option", - "UUID" - ], - "13": "varint", - "14": "nbt", - "15": "particle" + } + ] + }, + { + "name": "value", + "type": [ + "switch", + { + "compareTo": "type", + "fields": { + "byte": "i8", + "int": "varint", + "float": "f32", + "string": "string", + "component": "string", + "optional_component": [ + "option", + "string" + ], + "item_stack": "slot", + "boolean": "bool", + "rotations": [ + "container", + [ + { + "name": "pitch", + "type": "f32" + }, + { + "name": "yaw", + "type": "f32" + }, + { + "name": "roll", + "type": "f32" + } + ] + ], + "block_pos": "position", + "optional_block_pos": [ + "option", + "position" + ], + "direction": "varint", + "optional_uuid": [ + "option", + "UUID" + ], + "block_state": "varint", + "compound_tag": "nbt", + "particle": "particle" + } + } + ] } - } + ] ], "entityMetadata": [ "entityMetadataLoop", { "endVal": 255, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": "varint" - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] + "type": "entityMetadataEntry" } ], "command_node": [ diff --git a/data/pc/1.14.1/proto.yml b/data/pc/1.14.1/proto.yml index 69a4e84b4..bb8d65684 100644 --- a/data/pc/1.14.1/proto.yml +++ b/data/pc/1.14.1/proto.yml @@ -82,77 +82,55 @@ } ] ] - entityMetadataItem: $compareTo ? - if 0: i8 - if 1: varint - if 2: f32 - if 3: string - if 4: string - if 5: [ - "option", - "string" - ] - if 6: slot - if 7: bool - if 8: - pitch: f32 - yaw: f32 - roll: f32 - if 9: position - if 10: [ - "option", - "position" - ] - if 11: varint - if 12: [ - "option", - "UUID" - ] - if 13: varint - if 14: nbt - if 15: particle - if 16: - villagerType: varint - villagerProfession: varint - level: varint - if 17: optvarint - if 18: varint - entityMetadata: [ - "entityMetadataLoop", - { - "endVal": 255, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": "varint" - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] - } - ] + entityMetadataEntry: + key: u8 + type: varint => + - byte + - int + - float + - string + - component + - optional_component + - item_stack + - boolean + - rotations + - block_pos + - optional_block_pos + - direction + - optional_uuid + - block_state + - compound_tag + - particle + - villager_data + - optional_unsigned_int + - pose + value: type ? + if byte: i8 + if int: varint + if float: f32 + if string: string + if component: string + if optional_component: ["option", "string"] + if item_stack: slot + if boolean: bool + if rotations: + pitch: f32 + yaw: f32 + roll: f32 + if block_pos: position + if optional_block_pos: ["option", "position"] + if direction: varint + if optional_uuid: ["option", "UUID"] + if block_state: varint + if compound_tag: nbt + if particle: particle + if villager_data: + villagerType: varint + villagerProfession: varint + level: varint + if optional_unsigned_int: optvarint + if pose: varint + entityMetadata: ["entityMetadataLoop", { "endVal": 255, "type": "entityMetadataEntry" }] minecraft_smelting_format: group: string ingredient: ingredient diff --git a/data/pc/1.14.1/protocol.json b/data/pc/1.14.1/protocol.json index aba909139..042f9d486 100644 --- a/data/pc/1.14.1/protocol.json +++ b/data/pc/1.14.1/protocol.json @@ -171,108 +171,121 @@ } ] ], - "entityMetadataItem": [ - "switch", - { - "compareTo": "$compareTo", - "fields": { - "0": "i8", - "1": "varint", - "2": "f32", - "3": "string", - "4": "string", - "5": [ - "option", - "string" - ], - "6": "slot", - "7": "bool", - "8": [ - "container", - [ - { - "name": "pitch", - "type": "f32" - }, - { - "name": "yaw", - "type": "f32" - }, - { - "name": "roll", - "type": "f32" + "entityMetadataEntry": [ + "container", + [ + { + "name": "key", + "type": "u8" + }, + { + "name": "type", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "byte", + "1": "int", + "2": "float", + "3": "string", + "4": "component", + "5": "optional_component", + "6": "item_stack", + "7": "boolean", + "8": "rotations", + "9": "block_pos", + "10": "optional_block_pos", + "11": "direction", + "12": "optional_uuid", + "13": "block_state", + "14": "compound_tag", + "15": "particle", + "16": "villager_data", + "17": "optional_unsigned_int", + "18": "pose" } - ] - ], - "9": "position", - "10": [ - "option", - "position" - ], - "11": "varint", - "12": [ - "option", - "UUID" - ], - "13": "varint", - "14": "nbt", - "15": "particle", - "16": [ - "container", - [ - { - "name": "villagerType", - "type": "varint" - }, - { - "name": "villagerProfession", - "type": "varint" - }, - { - "name": "level", - "type": "varint" + } + ] + }, + { + "name": "value", + "type": [ + "switch", + { + "compareTo": "type", + "fields": { + "byte": "i8", + "int": "varint", + "float": "f32", + "string": "string", + "component": "string", + "optional_component": [ + "option", + "string" + ], + "item_stack": "slot", + "boolean": "bool", + "rotations": [ + "container", + [ + { + "name": "pitch", + "type": "f32" + }, + { + "name": "yaw", + "type": "f32" + }, + { + "name": "roll", + "type": "f32" + } + ] + ], + "block_pos": "position", + "optional_block_pos": [ + "option", + "position" + ], + "direction": "varint", + "optional_uuid": [ + "option", + "UUID" + ], + "block_state": "varint", + "compound_tag": "nbt", + "particle": "particle", + "villager_data": [ + "container", + [ + { + "name": "villagerType", + "type": "varint" + }, + { + "name": "villagerProfession", + "type": "varint" + }, + { + "name": "level", + "type": "varint" + } + ] + ], + "optional_unsigned_int": "optvarint", + "pose": "varint" } - ] - ], - "17": "optvarint", - "18": "varint" + } + ] } - } + ] ], "entityMetadata": [ "entityMetadataLoop", { "endVal": 255, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": "varint" - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] + "type": "entityMetadataEntry" } ], "minecraft_smelting_format": [ diff --git a/data/pc/1.14.3/proto.yml b/data/pc/1.14.3/proto.yml index 07ca626c6..63e1bbc24 100644 --- a/data/pc/1.14.3/proto.yml +++ b/data/pc/1.14.3/proto.yml @@ -82,77 +82,55 @@ } ] ] - entityMetadataItem: $compareTo ? - if 0: i8 - if 1: varint - if 2: f32 - if 3: string - if 4: string - if 5: [ - "option", - "string" - ] - if 6: slot - if 7: bool - if 8: - pitch: f32 - yaw: f32 - roll: f32 - if 9: position - if 10: [ - "option", - "position" - ] - if 11: varint - if 12: [ - "option", - "UUID" - ] - if 13: varint - if 14: nbt - if 15: particle - if 16: - villagerType: varint - villagerProfession: varint - level: varint - if 17: optvarint - if 18: varint - entityMetadata: [ - "entityMetadataLoop", - { - "endVal": 255, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": "varint" - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] - } - ] + entityMetadataEntry: + key: u8 + type: varint => + - byte + - int + - float + - string + - component + - optional_component + - item_stack + - boolean + - rotations + - block_pos + - optional_block_pos + - direction + - optional_uuid + - block_state + - compound_tag + - particle + - villager_data + - optional_unsigned_int + - pose + value: type ? + if byte: i8 + if int: varint + if float: f32 + if string: string + if component: string + if optional_component: ["option", "string"] + if item_stack: slot + if boolean: bool + if rotations: + pitch: f32 + yaw: f32 + roll: f32 + if block_pos: position + if optional_block_pos: ["option", "position"] + if direction: varint + if optional_uuid: ["option", "UUID"] + if block_state: varint + if compound_tag: nbt + if particle: particle + if villager_data: + villagerType: varint + villagerProfession: varint + level: varint + if optional_unsigned_int: optvarint + if pose: varint + entityMetadata: ["entityMetadataLoop", { "endVal": 255, "type": "entityMetadataEntry" }] minecraft_smelting_format: group: string ingredient: ingredient diff --git a/data/pc/1.14.3/protocol.json b/data/pc/1.14.3/protocol.json index ab214f573..4ee656a62 100644 --- a/data/pc/1.14.3/protocol.json +++ b/data/pc/1.14.3/protocol.json @@ -171,108 +171,121 @@ } ] ], - "entityMetadataItem": [ - "switch", - { - "compareTo": "$compareTo", - "fields": { - "0": "i8", - "1": "varint", - "2": "f32", - "3": "string", - "4": "string", - "5": [ - "option", - "string" - ], - "6": "slot", - "7": "bool", - "8": [ - "container", - [ - { - "name": "pitch", - "type": "f32" - }, - { - "name": "yaw", - "type": "f32" - }, - { - "name": "roll", - "type": "f32" + "entityMetadataEntry": [ + "container", + [ + { + "name": "key", + "type": "u8" + }, + { + "name": "type", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "byte", + "1": "int", + "2": "float", + "3": "string", + "4": "component", + "5": "optional_component", + "6": "item_stack", + "7": "boolean", + "8": "rotations", + "9": "block_pos", + "10": "optional_block_pos", + "11": "direction", + "12": "optional_uuid", + "13": "block_state", + "14": "compound_tag", + "15": "particle", + "16": "villager_data", + "17": "optional_unsigned_int", + "18": "pose" } - ] - ], - "9": "position", - "10": [ - "option", - "position" - ], - "11": "varint", - "12": [ - "option", - "UUID" - ], - "13": "varint", - "14": "nbt", - "15": "particle", - "16": [ - "container", - [ - { - "name": "villagerType", - "type": "varint" - }, - { - "name": "villagerProfession", - "type": "varint" - }, - { - "name": "level", - "type": "varint" + } + ] + }, + { + "name": "value", + "type": [ + "switch", + { + "compareTo": "type", + "fields": { + "byte": "i8", + "int": "varint", + "float": "f32", + "string": "string", + "component": "string", + "optional_component": [ + "option", + "string" + ], + "item_stack": "slot", + "boolean": "bool", + "rotations": [ + "container", + [ + { + "name": "pitch", + "type": "f32" + }, + { + "name": "yaw", + "type": "f32" + }, + { + "name": "roll", + "type": "f32" + } + ] + ], + "block_pos": "position", + "optional_block_pos": [ + "option", + "position" + ], + "direction": "varint", + "optional_uuid": [ + "option", + "UUID" + ], + "block_state": "varint", + "compound_tag": "nbt", + "particle": "particle", + "villager_data": [ + "container", + [ + { + "name": "villagerType", + "type": "varint" + }, + { + "name": "villagerProfession", + "type": "varint" + }, + { + "name": "level", + "type": "varint" + } + ] + ], + "optional_unsigned_int": "optvarint", + "pose": "varint" } - ] - ], - "17": "optvarint", - "18": "varint" + } + ] } - } + ] ], "entityMetadata": [ "entityMetadataLoop", { "endVal": 255, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": "varint" - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] + "type": "entityMetadataEntry" } ], "minecraft_smelting_format": [ diff --git a/data/pc/1.14.4/proto.yml b/data/pc/1.14.4/proto.yml index 19121e7c7..a8a336c4a 100644 --- a/data/pc/1.14.4/proto.yml +++ b/data/pc/1.14.4/proto.yml @@ -82,77 +82,55 @@ } ] ] - entityMetadataItem: $compareTo ? - if 0: i8 - if 1: varint - if 2: f32 - if 3: string - if 4: string - if 5: [ - "option", - "string" - ] - if 6: slot - if 7: bool - if 8: - pitch: f32 - yaw: f32 - roll: f32 - if 9: position - if 10: [ - "option", - "position" - ] - if 11: varint - if 12: [ - "option", - "UUID" - ] - if 13: varint - if 14: nbt - if 15: particle - if 16: - villagerType: varint - villagerProfession: varint - level: varint - if 17: optvarint - if 18: varint - entityMetadata: [ - "entityMetadataLoop", - { - "endVal": 255, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": "varint" - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] - } - ] + entityMetadataEntry: + key: u8 + type: varint => + - byte + - int + - float + - string + - component + - optional_component + - item_stack + - boolean + - rotations + - block_pos + - optional_block_pos + - direction + - optional_uuid + - block_state + - compound_tag + - particle + - villager_data + - optional_unsigned_int + - pose + value: type ? + if byte: i8 + if int: varint + if float: f32 + if string: string + if component: string + if optional_component: ["option", "string"] + if item_stack: slot + if boolean: bool + if rotations: + pitch: f32 + yaw: f32 + roll: f32 + if block_pos: position + if optional_block_pos: ["option", "position"] + if direction: varint + if optional_uuid: ["option", "UUID"] + if block_state: varint + if compound_tag: nbt + if particle: particle + if villager_data: + villagerType: varint + villagerProfession: varint + level: varint + if optional_unsigned_int: optvarint + if pose: varint + entityMetadata: ["entityMetadataLoop", { "endVal": 255, "type": "entityMetadataEntry" }] minecraft_smelting_format: group: string ingredient: ingredient diff --git a/data/pc/1.14.4/protocol.json b/data/pc/1.14.4/protocol.json index 736f79f2e..4da2a666d 100644 --- a/data/pc/1.14.4/protocol.json +++ b/data/pc/1.14.4/protocol.json @@ -171,108 +171,121 @@ } ] ], - "entityMetadataItem": [ - "switch", - { - "compareTo": "$compareTo", - "fields": { - "0": "i8", - "1": "varint", - "2": "f32", - "3": "string", - "4": "string", - "5": [ - "option", - "string" - ], - "6": "slot", - "7": "bool", - "8": [ - "container", - [ - { - "name": "pitch", - "type": "f32" - }, - { - "name": "yaw", - "type": "f32" - }, - { - "name": "roll", - "type": "f32" + "entityMetadataEntry": [ + "container", + [ + { + "name": "key", + "type": "u8" + }, + { + "name": "type", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "byte", + "1": "int", + "2": "float", + "3": "string", + "4": "component", + "5": "optional_component", + "6": "item_stack", + "7": "boolean", + "8": "rotations", + "9": "block_pos", + "10": "optional_block_pos", + "11": "direction", + "12": "optional_uuid", + "13": "block_state", + "14": "compound_tag", + "15": "particle", + "16": "villager_data", + "17": "optional_unsigned_int", + "18": "pose" } - ] - ], - "9": "position", - "10": [ - "option", - "position" - ], - "11": "varint", - "12": [ - "option", - "UUID" - ], - "13": "varint", - "14": "nbt", - "15": "particle", - "16": [ - "container", - [ - { - "name": "villagerType", - "type": "varint" - }, - { - "name": "villagerProfession", - "type": "varint" - }, - { - "name": "level", - "type": "varint" + } + ] + }, + { + "name": "value", + "type": [ + "switch", + { + "compareTo": "type", + "fields": { + "byte": "i8", + "int": "varint", + "float": "f32", + "string": "string", + "component": "string", + "optional_component": [ + "option", + "string" + ], + "item_stack": "slot", + "boolean": "bool", + "rotations": [ + "container", + [ + { + "name": "pitch", + "type": "f32" + }, + { + "name": "yaw", + "type": "f32" + }, + { + "name": "roll", + "type": "f32" + } + ] + ], + "block_pos": "position", + "optional_block_pos": [ + "option", + "position" + ], + "direction": "varint", + "optional_uuid": [ + "option", + "UUID" + ], + "block_state": "varint", + "compound_tag": "nbt", + "particle": "particle", + "villager_data": [ + "container", + [ + { + "name": "villagerType", + "type": "varint" + }, + { + "name": "villagerProfession", + "type": "varint" + }, + { + "name": "level", + "type": "varint" + } + ] + ], + "optional_unsigned_int": "optvarint", + "pose": "varint" } - ] - ], - "17": "optvarint", - "18": "varint" + } + ] } - } + ] ], "entityMetadata": [ "entityMetadataLoop", { "endVal": 255, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": "varint" - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] + "type": "entityMetadataEntry" } ], "minecraft_smelting_format": [ diff --git a/data/pc/1.14/proto.yml b/data/pc/1.14/proto.yml index 51dfcc386..92dc27e3d 100644 --- a/data/pc/1.14/proto.yml +++ b/data/pc/1.14/proto.yml @@ -82,77 +82,55 @@ } ] ] - entityMetadataItem: $compareTo ? - if 0: i8 - if 1: varint - if 2: f32 - if 3: string - if 4: string - if 5: [ - "option", - "string" - ] - if 6: slot - if 7: bool - if 8: - pitch: f32 - yaw: f32 - roll: f32 - if 9: position - if 10: [ - "option", - "position" - ] - if 11: varint - if 12: [ - "option", - "UUID" - ] - if 13: varint - if 14: nbt - if 15: particle - if 16: - villagerType: varint - villagerProfession: varint - level: varint - if 17: optvarint - if 18: varint - entityMetadata: [ - "entityMetadataLoop", - { - "endVal": 255, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": "varint" - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] - } - ] + entityMetadataEntry: + key: u8 + type: varint => + - byte + - int + - float + - string + - component + - optional_component + - item_stack + - boolean + - rotations + - block_pos + - optional_block_pos + - direction + - optional_uuid + - block_state + - compound_tag + - particle + - villager_data + - optional_unsigned_int + - pose + value: type ? + if byte: i8 + if int: varint + if float: f32 + if string: string + if component: string + if optional_component: ["option", "string"] + if item_stack: slot + if boolean: bool + if rotations: + pitch: f32 + yaw: f32 + roll: f32 + if block_pos: position + if optional_block_pos: ["option", "position"] + if direction: varint + if optional_uuid: ["option", "UUID"] + if block_state: varint + if compound_tag: nbt + if particle: particle + if villager_data: + villagerType: varint + villagerProfession: varint + level: varint + if optional_unsigned_int: optvarint + if pose: varint + entityMetadata: ["entityMetadataLoop", { "endVal": 255, "type": "entityMetadataEntry" }] minecraft_smelting_format: group: string ingredient: ingredient diff --git a/data/pc/1.14/protocol.json b/data/pc/1.14/protocol.json index aba909139..042f9d486 100644 --- a/data/pc/1.14/protocol.json +++ b/data/pc/1.14/protocol.json @@ -171,108 +171,121 @@ } ] ], - "entityMetadataItem": [ - "switch", - { - "compareTo": "$compareTo", - "fields": { - "0": "i8", - "1": "varint", - "2": "f32", - "3": "string", - "4": "string", - "5": [ - "option", - "string" - ], - "6": "slot", - "7": "bool", - "8": [ - "container", - [ - { - "name": "pitch", - "type": "f32" - }, - { - "name": "yaw", - "type": "f32" - }, - { - "name": "roll", - "type": "f32" + "entityMetadataEntry": [ + "container", + [ + { + "name": "key", + "type": "u8" + }, + { + "name": "type", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "byte", + "1": "int", + "2": "float", + "3": "string", + "4": "component", + "5": "optional_component", + "6": "item_stack", + "7": "boolean", + "8": "rotations", + "9": "block_pos", + "10": "optional_block_pos", + "11": "direction", + "12": "optional_uuid", + "13": "block_state", + "14": "compound_tag", + "15": "particle", + "16": "villager_data", + "17": "optional_unsigned_int", + "18": "pose" } - ] - ], - "9": "position", - "10": [ - "option", - "position" - ], - "11": "varint", - "12": [ - "option", - "UUID" - ], - "13": "varint", - "14": "nbt", - "15": "particle", - "16": [ - "container", - [ - { - "name": "villagerType", - "type": "varint" - }, - { - "name": "villagerProfession", - "type": "varint" - }, - { - "name": "level", - "type": "varint" + } + ] + }, + { + "name": "value", + "type": [ + "switch", + { + "compareTo": "type", + "fields": { + "byte": "i8", + "int": "varint", + "float": "f32", + "string": "string", + "component": "string", + "optional_component": [ + "option", + "string" + ], + "item_stack": "slot", + "boolean": "bool", + "rotations": [ + "container", + [ + { + "name": "pitch", + "type": "f32" + }, + { + "name": "yaw", + "type": "f32" + }, + { + "name": "roll", + "type": "f32" + } + ] + ], + "block_pos": "position", + "optional_block_pos": [ + "option", + "position" + ], + "direction": "varint", + "optional_uuid": [ + "option", + "UUID" + ], + "block_state": "varint", + "compound_tag": "nbt", + "particle": "particle", + "villager_data": [ + "container", + [ + { + "name": "villagerType", + "type": "varint" + }, + { + "name": "villagerProfession", + "type": "varint" + }, + { + "name": "level", + "type": "varint" + } + ] + ], + "optional_unsigned_int": "optvarint", + "pose": "varint" } - ] - ], - "17": "optvarint", - "18": "varint" + } + ] } - } + ] ], "entityMetadata": [ "entityMetadataLoop", { "endVal": 255, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": "varint" - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] + "type": "entityMetadataEntry" } ], "minecraft_smelting_format": [ diff --git a/data/pc/1.15.1/proto.yml b/data/pc/1.15.1/proto.yml index 0b3851abd..ab65a36f3 100644 --- a/data/pc/1.15.1/proto.yml +++ b/data/pc/1.15.1/proto.yml @@ -82,77 +82,55 @@ } ] ] - entityMetadataItem: $compareTo ? - if 0: i8 - if 1: varint - if 2: f32 - if 3: string - if 4: string - if 5: [ - "option", - "string" - ] - if 6: slot - if 7: bool - if 8: - pitch: f32 - yaw: f32 - roll: f32 - if 9: position - if 10: [ - "option", - "position" - ] - if 11: varint - if 12: [ - "option", - "UUID" - ] - if 13: varint - if 14: nbt - if 15: particle - if 16: - villagerType: varint - villagerProfession: varint - level: varint - if 17: optvarint - if 18: varint - entityMetadata: [ - "entityMetadataLoop", - { - "endVal": 255, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": "varint" - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] - } - ] + entityMetadataEntry: + key: u8 + type: varint => + - byte + - int + - float + - string + - component + - optional_component + - item_stack + - boolean + - rotations + - block_pos + - optional_block_pos + - direction + - optional_uuid + - block_state + - compound_tag + - particle + - villager_data + - optional_unsigned_int + - pose + value: type ? + if byte: i8 + if int: varint + if float: f32 + if string: string + if component: string + if optional_component: ["option", "string"] + if item_stack: slot + if boolean: bool + if rotations: + pitch: f32 + yaw: f32 + roll: f32 + if block_pos: position + if optional_block_pos: ["option", "position"] + if direction: varint + if optional_uuid: ["option", "UUID"] + if block_state: varint + if compound_tag: nbt + if particle: particle + if villager_data: + villagerType: varint + villagerProfession: varint + level: varint + if optional_unsigned_int: optvarint + if pose: varint + entityMetadata: ["entityMetadataLoop", { "endVal": 255, "type": "entityMetadataEntry" }] minecraft_smelting_format: group: string ingredient: ingredient diff --git a/data/pc/1.15.1/protocol.json b/data/pc/1.15.1/protocol.json index 8182d6e4f..eb4f29c84 100644 --- a/data/pc/1.15.1/protocol.json +++ b/data/pc/1.15.1/protocol.json @@ -171,108 +171,121 @@ } ] ], - "entityMetadataItem": [ - "switch", - { - "compareTo": "$compareTo", - "fields": { - "0": "i8", - "1": "varint", - "2": "f32", - "3": "string", - "4": "string", - "5": [ - "option", - "string" - ], - "6": "slot", - "7": "bool", - "8": [ - "container", - [ - { - "name": "pitch", - "type": "f32" - }, - { - "name": "yaw", - "type": "f32" - }, - { - "name": "roll", - "type": "f32" + "entityMetadataEntry": [ + "container", + [ + { + "name": "key", + "type": "u8" + }, + { + "name": "type", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "byte", + "1": "int", + "2": "float", + "3": "string", + "4": "component", + "5": "optional_component", + "6": "item_stack", + "7": "boolean", + "8": "rotations", + "9": "block_pos", + "10": "optional_block_pos", + "11": "direction", + "12": "optional_uuid", + "13": "block_state", + "14": "compound_tag", + "15": "particle", + "16": "villager_data", + "17": "optional_unsigned_int", + "18": "pose" } - ] - ], - "9": "position", - "10": [ - "option", - "position" - ], - "11": "varint", - "12": [ - "option", - "UUID" - ], - "13": "varint", - "14": "nbt", - "15": "particle", - "16": [ - "container", - [ - { - "name": "villagerType", - "type": "varint" - }, - { - "name": "villagerProfession", - "type": "varint" - }, - { - "name": "level", - "type": "varint" + } + ] + }, + { + "name": "value", + "type": [ + "switch", + { + "compareTo": "type", + "fields": { + "byte": "i8", + "int": "varint", + "float": "f32", + "string": "string", + "component": "string", + "optional_component": [ + "option", + "string" + ], + "item_stack": "slot", + "boolean": "bool", + "rotations": [ + "container", + [ + { + "name": "pitch", + "type": "f32" + }, + { + "name": "yaw", + "type": "f32" + }, + { + "name": "roll", + "type": "f32" + } + ] + ], + "block_pos": "position", + "optional_block_pos": [ + "option", + "position" + ], + "direction": "varint", + "optional_uuid": [ + "option", + "UUID" + ], + "block_state": "varint", + "compound_tag": "nbt", + "particle": "particle", + "villager_data": [ + "container", + [ + { + "name": "villagerType", + "type": "varint" + }, + { + "name": "villagerProfession", + "type": "varint" + }, + { + "name": "level", + "type": "varint" + } + ] + ], + "optional_unsigned_int": "optvarint", + "pose": "varint" } - ] - ], - "17": "optvarint", - "18": "varint" + } + ] } - } + ] ], "entityMetadata": [ "entityMetadataLoop", { "endVal": 255, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": "varint" - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] + "type": "entityMetadataEntry" } ], "minecraft_smelting_format": [ diff --git a/data/pc/1.15.2/proto.yml b/data/pc/1.15.2/proto.yml index be1f3edcd..783fc0f6a 100644 --- a/data/pc/1.15.2/proto.yml +++ b/data/pc/1.15.2/proto.yml @@ -82,77 +82,55 @@ } ] ] - entityMetadataItem: $compareTo ? - if 0: i8 - if 1: varint - if 2: f32 - if 3: string - if 4: string - if 5: [ - "option", - "string" - ] - if 6: slot - if 7: bool - if 8: - pitch: f32 - yaw: f32 - roll: f32 - if 9: position - if 10: [ - "option", - "position" - ] - if 11: varint - if 12: [ - "option", - "UUID" - ] - if 13: varint - if 14: nbt - if 15: particle - if 16: - villagerType: varint - villagerProfession: varint - level: varint - if 17: optvarint - if 18: varint - entityMetadata: [ - "entityMetadataLoop", - { - "endVal": 255, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": "varint" - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] - } - ] + entityMetadataEntry: + key: u8 + type: varint => + - byte + - int + - float + - string + - component + - optional_component + - item_stack + - boolean + - rotations + - block_pos + - optional_block_pos + - direction + - optional_uuid + - block_state + - compound_tag + - particle + - villager_data + - optional_unsigned_int + - pose + value: type ? + if byte: i8 + if int: varint + if float: f32 + if string: string + if component: string + if optional_component: ["option", "string"] + if item_stack: slot + if boolean: bool + if rotations: + pitch: f32 + yaw: f32 + roll: f32 + if block_pos: position + if optional_block_pos: ["option", "position"] + if direction: varint + if optional_uuid: ["option", "UUID"] + if block_state: varint + if compound_tag: nbt + if particle: particle + if villager_data: + villagerType: varint + villagerProfession: varint + level: varint + if optional_unsigned_int: optvarint + if pose: varint + entityMetadata: ["entityMetadataLoop", { "endVal": 255, "type": "entityMetadataEntry" }] minecraft_smelting_format: group: string ingredient: ingredient diff --git a/data/pc/1.15.2/protocol.json b/data/pc/1.15.2/protocol.json index 8182d6e4f..eb4f29c84 100644 --- a/data/pc/1.15.2/protocol.json +++ b/data/pc/1.15.2/protocol.json @@ -171,108 +171,121 @@ } ] ], - "entityMetadataItem": [ - "switch", - { - "compareTo": "$compareTo", - "fields": { - "0": "i8", - "1": "varint", - "2": "f32", - "3": "string", - "4": "string", - "5": [ - "option", - "string" - ], - "6": "slot", - "7": "bool", - "8": [ - "container", - [ - { - "name": "pitch", - "type": "f32" - }, - { - "name": "yaw", - "type": "f32" - }, - { - "name": "roll", - "type": "f32" + "entityMetadataEntry": [ + "container", + [ + { + "name": "key", + "type": "u8" + }, + { + "name": "type", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "byte", + "1": "int", + "2": "float", + "3": "string", + "4": "component", + "5": "optional_component", + "6": "item_stack", + "7": "boolean", + "8": "rotations", + "9": "block_pos", + "10": "optional_block_pos", + "11": "direction", + "12": "optional_uuid", + "13": "block_state", + "14": "compound_tag", + "15": "particle", + "16": "villager_data", + "17": "optional_unsigned_int", + "18": "pose" } - ] - ], - "9": "position", - "10": [ - "option", - "position" - ], - "11": "varint", - "12": [ - "option", - "UUID" - ], - "13": "varint", - "14": "nbt", - "15": "particle", - "16": [ - "container", - [ - { - "name": "villagerType", - "type": "varint" - }, - { - "name": "villagerProfession", - "type": "varint" - }, - { - "name": "level", - "type": "varint" + } + ] + }, + { + "name": "value", + "type": [ + "switch", + { + "compareTo": "type", + "fields": { + "byte": "i8", + "int": "varint", + "float": "f32", + "string": "string", + "component": "string", + "optional_component": [ + "option", + "string" + ], + "item_stack": "slot", + "boolean": "bool", + "rotations": [ + "container", + [ + { + "name": "pitch", + "type": "f32" + }, + { + "name": "yaw", + "type": "f32" + }, + { + "name": "roll", + "type": "f32" + } + ] + ], + "block_pos": "position", + "optional_block_pos": [ + "option", + "position" + ], + "direction": "varint", + "optional_uuid": [ + "option", + "UUID" + ], + "block_state": "varint", + "compound_tag": "nbt", + "particle": "particle", + "villager_data": [ + "container", + [ + { + "name": "villagerType", + "type": "varint" + }, + { + "name": "villagerProfession", + "type": "varint" + }, + { + "name": "level", + "type": "varint" + } + ] + ], + "optional_unsigned_int": "optvarint", + "pose": "varint" } - ] - ], - "17": "optvarint", - "18": "varint" + } + ] } - } + ] ], "entityMetadata": [ "entityMetadataLoop", { "endVal": 255, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": "varint" - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] + "type": "entityMetadataEntry" } ], "minecraft_smelting_format": [ diff --git a/data/pc/1.15/proto.yml b/data/pc/1.15/proto.yml index a9d99ca34..35f98e84d 100644 --- a/data/pc/1.15/proto.yml +++ b/data/pc/1.15/proto.yml @@ -82,77 +82,55 @@ } ] ] - entityMetadataItem: $compareTo ? - if 0: i8 - if 1: varint - if 2: f32 - if 3: string - if 4: string - if 5: [ - "option", - "string" - ] - if 6: slot - if 7: bool - if 8: - pitch: f32 - yaw: f32 - roll: f32 - if 9: position - if 10: [ - "option", - "position" - ] - if 11: varint - if 12: [ - "option", - "UUID" - ] - if 13: varint - if 14: nbt - if 15: particle - if 16: - villagerType: varint - villagerProfession: varint - level: varint - if 17: optvarint - if 18: varint - entityMetadata: [ - "entityMetadataLoop", - { - "endVal": 255, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": "varint" - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] - } - ] + entityMetadataEntry: + key: u8 + type: varint => + - byte + - int + - float + - string + - component + - optional_component + - item_stack + - boolean + - rotations + - block_pos + - optional_block_pos + - direction + - optional_uuid + - block_state + - compound_tag + - particle + - villager_data + - optional_unsigned_int + - pose + value: type ? + if byte: i8 + if int: varint + if float: f32 + if string: string + if component: string + if optional_component: ["option", "string"] + if item_stack: slot + if boolean: bool + if rotations: + pitch: f32 + yaw: f32 + roll: f32 + if block_pos: position + if optional_block_pos: ["option", "position"] + if direction: varint + if optional_uuid: ["option", "UUID"] + if block_state: varint + if compound_tag: nbt + if particle: particle + if villager_data: + villagerType: varint + villagerProfession: varint + level: varint + if optional_unsigned_int: optvarint + if pose: varint + entityMetadata: ["entityMetadataLoop", { "endVal": 255, "type": "entityMetadataEntry" }] minecraft_smelting_format: group: string ingredient: ingredient diff --git a/data/pc/1.15/protocol.json b/data/pc/1.15/protocol.json index 8182d6e4f..eb4f29c84 100644 --- a/data/pc/1.15/protocol.json +++ b/data/pc/1.15/protocol.json @@ -171,108 +171,121 @@ } ] ], - "entityMetadataItem": [ - "switch", - { - "compareTo": "$compareTo", - "fields": { - "0": "i8", - "1": "varint", - "2": "f32", - "3": "string", - "4": "string", - "5": [ - "option", - "string" - ], - "6": "slot", - "7": "bool", - "8": [ - "container", - [ - { - "name": "pitch", - "type": "f32" - }, - { - "name": "yaw", - "type": "f32" - }, - { - "name": "roll", - "type": "f32" + "entityMetadataEntry": [ + "container", + [ + { + "name": "key", + "type": "u8" + }, + { + "name": "type", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "byte", + "1": "int", + "2": "float", + "3": "string", + "4": "component", + "5": "optional_component", + "6": "item_stack", + "7": "boolean", + "8": "rotations", + "9": "block_pos", + "10": "optional_block_pos", + "11": "direction", + "12": "optional_uuid", + "13": "block_state", + "14": "compound_tag", + "15": "particle", + "16": "villager_data", + "17": "optional_unsigned_int", + "18": "pose" } - ] - ], - "9": "position", - "10": [ - "option", - "position" - ], - "11": "varint", - "12": [ - "option", - "UUID" - ], - "13": "varint", - "14": "nbt", - "15": "particle", - "16": [ - "container", - [ - { - "name": "villagerType", - "type": "varint" - }, - { - "name": "villagerProfession", - "type": "varint" - }, - { - "name": "level", - "type": "varint" + } + ] + }, + { + "name": "value", + "type": [ + "switch", + { + "compareTo": "type", + "fields": { + "byte": "i8", + "int": "varint", + "float": "f32", + "string": "string", + "component": "string", + "optional_component": [ + "option", + "string" + ], + "item_stack": "slot", + "boolean": "bool", + "rotations": [ + "container", + [ + { + "name": "pitch", + "type": "f32" + }, + { + "name": "yaw", + "type": "f32" + }, + { + "name": "roll", + "type": "f32" + } + ] + ], + "block_pos": "position", + "optional_block_pos": [ + "option", + "position" + ], + "direction": "varint", + "optional_uuid": [ + "option", + "UUID" + ], + "block_state": "varint", + "compound_tag": "nbt", + "particle": "particle", + "villager_data": [ + "container", + [ + { + "name": "villagerType", + "type": "varint" + }, + { + "name": "villagerProfession", + "type": "varint" + }, + { + "name": "level", + "type": "varint" + } + ] + ], + "optional_unsigned_int": "optvarint", + "pose": "varint" } - ] - ], - "17": "optvarint", - "18": "varint" + } + ] } - } + ] ], "entityMetadata": [ "entityMetadataLoop", { "endVal": 255, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": "varint" - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] + "type": "entityMetadataEntry" } ], "minecraft_smelting_format": [ diff --git a/data/pc/1.16-rc1/proto.yml b/data/pc/1.16-rc1/proto.yml index 90e688a07..7e4cea6cd 100644 --- a/data/pc/1.16-rc1/proto.yml +++ b/data/pc/1.16-rc1/proto.yml @@ -83,77 +83,55 @@ } ] ] - entityMetadataItem: $compareTo ? - if 0: i8 - if 1: varint - if 2: f32 - if 3: string - if 4: string - if 5: [ - "option", - "string" - ] - if 6: slot - if 7: bool - if 8: - pitch: f32 - yaw: f32 - roll: f32 - if 9: position - if 10: [ - "option", - "position" - ] - if 11: varint - if 12: [ - "option", - "UUID" - ] - if 13: varint - if 14: nbt - if 15: particle - if 16: - villagerType: varint - villagerProfession: varint - level: varint - if 17: optvarint - if 18: varint - entityMetadata: [ - "entityMetadataLoop", - { - "endVal": 255, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": "varint" - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] - } - ] + entityMetadataEntry: + key: u8 + type: varint => + - byte + - int + - float + - string + - component + - optional_component + - item_stack + - boolean + - rotations + - block_pos + - optional_block_pos + - direction + - optional_uuid + - block_state + - compound_tag + - particle + - villager_data + - optional_unsigned_int + - pose + value: type ? + if byte: i8 + if int: varint + if float: f32 + if string: string + if component: string + if optional_component: ["option", "string"] + if item_stack: slot + if boolean: bool + if rotations: + pitch: f32 + yaw: f32 + roll: f32 + if block_pos: position + if optional_block_pos: ["option", "position"] + if direction: varint + if optional_uuid: ["option", "UUID"] + if block_state: varint + if compound_tag: nbt + if particle: particle + if villager_data: + villagerType: varint + villagerProfession: varint + level: varint + if optional_unsigned_int: optvarint + if pose: varint + entityMetadata: ["entityMetadataLoop", { "endVal": 255, "type": "entityMetadataEntry" }] minecraft_smelting_format: group: string ingredient: ingredient diff --git a/data/pc/1.16-rc1/protocol.json b/data/pc/1.16-rc1/protocol.json index e416ef513..42e6262b0 100644 --- a/data/pc/1.16-rc1/protocol.json +++ b/data/pc/1.16-rc1/protocol.json @@ -172,108 +172,121 @@ } ] ], - "entityMetadataItem": [ - "switch", - { - "compareTo": "$compareTo", - "fields": { - "0": "i8", - "1": "varint", - "2": "f32", - "3": "string", - "4": "string", - "5": [ - "option", - "string" - ], - "6": "slot", - "7": "bool", - "8": [ - "container", - [ - { - "name": "pitch", - "type": "f32" - }, - { - "name": "yaw", - "type": "f32" - }, - { - "name": "roll", - "type": "f32" + "entityMetadataEntry": [ + "container", + [ + { + "name": "key", + "type": "u8" + }, + { + "name": "type", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "byte", + "1": "int", + "2": "float", + "3": "string", + "4": "component", + "5": "optional_component", + "6": "item_stack", + "7": "boolean", + "8": "rotations", + "9": "block_pos", + "10": "optional_block_pos", + "11": "direction", + "12": "optional_uuid", + "13": "block_state", + "14": "compound_tag", + "15": "particle", + "16": "villager_data", + "17": "optional_unsigned_int", + "18": "pose" } - ] - ], - "9": "position", - "10": [ - "option", - "position" - ], - "11": "varint", - "12": [ - "option", - "UUID" - ], - "13": "varint", - "14": "nbt", - "15": "particle", - "16": [ - "container", - [ - { - "name": "villagerType", - "type": "varint" - }, - { - "name": "villagerProfession", - "type": "varint" - }, - { - "name": "level", - "type": "varint" + } + ] + }, + { + "name": "value", + "type": [ + "switch", + { + "compareTo": "type", + "fields": { + "byte": "i8", + "int": "varint", + "float": "f32", + "string": "string", + "component": "string", + "optional_component": [ + "option", + "string" + ], + "item_stack": "slot", + "boolean": "bool", + "rotations": [ + "container", + [ + { + "name": "pitch", + "type": "f32" + }, + { + "name": "yaw", + "type": "f32" + }, + { + "name": "roll", + "type": "f32" + } + ] + ], + "block_pos": "position", + "optional_block_pos": [ + "option", + "position" + ], + "direction": "varint", + "optional_uuid": [ + "option", + "UUID" + ], + "block_state": "varint", + "compound_tag": "nbt", + "particle": "particle", + "villager_data": [ + "container", + [ + { + "name": "villagerType", + "type": "varint" + }, + { + "name": "villagerProfession", + "type": "varint" + }, + { + "name": "level", + "type": "varint" + } + ] + ], + "optional_unsigned_int": "optvarint", + "pose": "varint" } - ] - ], - "17": "optvarint", - "18": "varint" + } + ] } - } + ] ], "entityMetadata": [ "entityMetadataLoop", { "endVal": 255, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": "varint" - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] + "type": "entityMetadataEntry" } ], "minecraft_smelting_format": [ diff --git a/data/pc/1.16.1/proto.yml b/data/pc/1.16.1/proto.yml index 2a880026b..91975cc74 100644 --- a/data/pc/1.16.1/proto.yml +++ b/data/pc/1.16.1/proto.yml @@ -83,77 +83,55 @@ } ] ] - entityMetadataItem: $compareTo ? - if 0: i8 - if 1: varint - if 2: f32 - if 3: string - if 4: string - if 5: [ - "option", - "string" - ] - if 6: slot - if 7: bool - if 8: - pitch: f32 - yaw: f32 - roll: f32 - if 9: position - if 10: [ - "option", - "position" - ] - if 11: varint - if 12: [ - "option", - "UUID" - ] - if 13: varint - if 14: nbt - if 15: particle - if 16: - villagerType: varint - villagerProfession: varint - level: varint - if 17: optvarint - if 18: varint - entityMetadata: [ - "entityMetadataLoop", - { - "endVal": 255, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": "varint" - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] - } - ] + entityMetadataEntry: + key: u8 + type: varint => + - byte + - int + - float + - string + - component + - optional_component + - item_stack + - boolean + - rotations + - block_pos + - optional_block_pos + - direction + - optional_uuid + - block_state + - compound_tag + - particle + - villager_data + - optional_unsigned_int + - pose + value: type ? + if byte: i8 + if int: varint + if float: f32 + if string: string + if component: string + if optional_component: ["option", "string"] + if item_stack: slot + if boolean: bool + if rotations: + pitch: f32 + yaw: f32 + roll: f32 + if block_pos: position + if optional_block_pos: ["option", "position"] + if direction: varint + if optional_uuid: ["option", "UUID"] + if block_state: varint + if compound_tag: nbt + if particle: particle + if villager_data: + villagerType: varint + villagerProfession: varint + level: varint + if optional_unsigned_int: optvarint + if pose: varint + entityMetadata: ["entityMetadataLoop", { "endVal": 255, "type": "entityMetadataEntry" }] minecraft_smelting_format: group: string ingredient: ingredient diff --git a/data/pc/1.16.1/protocol.json b/data/pc/1.16.1/protocol.json index e416ef513..42e6262b0 100644 --- a/data/pc/1.16.1/protocol.json +++ b/data/pc/1.16.1/protocol.json @@ -172,108 +172,121 @@ } ] ], - "entityMetadataItem": [ - "switch", - { - "compareTo": "$compareTo", - "fields": { - "0": "i8", - "1": "varint", - "2": "f32", - "3": "string", - "4": "string", - "5": [ - "option", - "string" - ], - "6": "slot", - "7": "bool", - "8": [ - "container", - [ - { - "name": "pitch", - "type": "f32" - }, - { - "name": "yaw", - "type": "f32" - }, - { - "name": "roll", - "type": "f32" + "entityMetadataEntry": [ + "container", + [ + { + "name": "key", + "type": "u8" + }, + { + "name": "type", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "byte", + "1": "int", + "2": "float", + "3": "string", + "4": "component", + "5": "optional_component", + "6": "item_stack", + "7": "boolean", + "8": "rotations", + "9": "block_pos", + "10": "optional_block_pos", + "11": "direction", + "12": "optional_uuid", + "13": "block_state", + "14": "compound_tag", + "15": "particle", + "16": "villager_data", + "17": "optional_unsigned_int", + "18": "pose" } - ] - ], - "9": "position", - "10": [ - "option", - "position" - ], - "11": "varint", - "12": [ - "option", - "UUID" - ], - "13": "varint", - "14": "nbt", - "15": "particle", - "16": [ - "container", - [ - { - "name": "villagerType", - "type": "varint" - }, - { - "name": "villagerProfession", - "type": "varint" - }, - { - "name": "level", - "type": "varint" + } + ] + }, + { + "name": "value", + "type": [ + "switch", + { + "compareTo": "type", + "fields": { + "byte": "i8", + "int": "varint", + "float": "f32", + "string": "string", + "component": "string", + "optional_component": [ + "option", + "string" + ], + "item_stack": "slot", + "boolean": "bool", + "rotations": [ + "container", + [ + { + "name": "pitch", + "type": "f32" + }, + { + "name": "yaw", + "type": "f32" + }, + { + "name": "roll", + "type": "f32" + } + ] + ], + "block_pos": "position", + "optional_block_pos": [ + "option", + "position" + ], + "direction": "varint", + "optional_uuid": [ + "option", + "UUID" + ], + "block_state": "varint", + "compound_tag": "nbt", + "particle": "particle", + "villager_data": [ + "container", + [ + { + "name": "villagerType", + "type": "varint" + }, + { + "name": "villagerProfession", + "type": "varint" + }, + { + "name": "level", + "type": "varint" + } + ] + ], + "optional_unsigned_int": "optvarint", + "pose": "varint" } - ] - ], - "17": "optvarint", - "18": "varint" + } + ] } - } + ] ], "entityMetadata": [ "entityMetadataLoop", { "endVal": 255, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": "varint" - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] + "type": "entityMetadataEntry" } ], "minecraft_smelting_format": [ diff --git a/data/pc/1.16.2/proto.yml b/data/pc/1.16.2/proto.yml index 524b6c12f..b6c5ae6a8 100644 --- a/data/pc/1.16.2/proto.yml +++ b/data/pc/1.16.2/proto.yml @@ -83,77 +83,55 @@ } ] ] - entityMetadataItem: $compareTo ? - if 0: i8 - if 1: varint - if 2: f32 - if 3: string - if 4: string - if 5: [ - "option", - "string" - ] - if 6: slot - if 7: bool - if 8: - pitch: f32 - yaw: f32 - roll: f32 - if 9: position - if 10: [ - "option", - "position" - ] - if 11: varint - if 12: [ - "option", - "UUID" - ] - if 13: varint - if 14: nbt - if 15: particle - if 16: - villagerType: varint - villagerProfession: varint - level: varint - if 17: optvarint - if 18: varint - entityMetadata: [ - "entityMetadataLoop", - { - "endVal": 255, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": "varint" - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] - } - ] + entityMetadataEntry: + key: u8 + type: varint => + - byte + - int + - float + - string + - component + - optional_component + - item_stack + - boolean + - rotations + - block_pos + - optional_block_pos + - direction + - optional_uuid + - block_state + - compound_tag + - particle + - villager_data + - optional_unsigned_int + - pose + value: type ? + if byte: i8 + if int: varint + if float: f32 + if string: string + if component: string + if optional_component: ["option", "string"] + if item_stack: slot + if boolean: bool + if rotations: + pitch: f32 + yaw: f32 + roll: f32 + if block_pos: position + if optional_block_pos: ["option", "position"] + if direction: varint + if optional_uuid: ["option", "UUID"] + if block_state: varint + if compound_tag: nbt + if particle: particle + if villager_data: + villagerType: varint + villagerProfession: varint + level: varint + if optional_unsigned_int: optvarint + if pose: varint + entityMetadata: ["entityMetadataLoop", { "endVal": 255, "type": "entityMetadataEntry" }] minecraft_smelting_format: group: string ingredient: ingredient diff --git a/data/pc/1.16.2/protocol.json b/data/pc/1.16.2/protocol.json index 846fe620f..fb5d67320 100644 --- a/data/pc/1.16.2/protocol.json +++ b/data/pc/1.16.2/protocol.json @@ -172,108 +172,121 @@ } ] ], - "entityMetadataItem": [ - "switch", - { - "compareTo": "$compareTo", - "fields": { - "0": "i8", - "1": "varint", - "2": "f32", - "3": "string", - "4": "string", - "5": [ - "option", - "string" - ], - "6": "slot", - "7": "bool", - "8": [ - "container", - [ - { - "name": "pitch", - "type": "f32" - }, - { - "name": "yaw", - "type": "f32" - }, - { - "name": "roll", - "type": "f32" + "entityMetadataEntry": [ + "container", + [ + { + "name": "key", + "type": "u8" + }, + { + "name": "type", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "byte", + "1": "int", + "2": "float", + "3": "string", + "4": "component", + "5": "optional_component", + "6": "item_stack", + "7": "boolean", + "8": "rotations", + "9": "block_pos", + "10": "optional_block_pos", + "11": "direction", + "12": "optional_uuid", + "13": "block_state", + "14": "compound_tag", + "15": "particle", + "16": "villager_data", + "17": "optional_unsigned_int", + "18": "pose" } - ] - ], - "9": "position", - "10": [ - "option", - "position" - ], - "11": "varint", - "12": [ - "option", - "UUID" - ], - "13": "varint", - "14": "nbt", - "15": "particle", - "16": [ - "container", - [ - { - "name": "villagerType", - "type": "varint" - }, - { - "name": "villagerProfession", - "type": "varint" - }, - { - "name": "level", - "type": "varint" + } + ] + }, + { + "name": "value", + "type": [ + "switch", + { + "compareTo": "type", + "fields": { + "byte": "i8", + "int": "varint", + "float": "f32", + "string": "string", + "component": "string", + "optional_component": [ + "option", + "string" + ], + "item_stack": "slot", + "boolean": "bool", + "rotations": [ + "container", + [ + { + "name": "pitch", + "type": "f32" + }, + { + "name": "yaw", + "type": "f32" + }, + { + "name": "roll", + "type": "f32" + } + ] + ], + "block_pos": "position", + "optional_block_pos": [ + "option", + "position" + ], + "direction": "varint", + "optional_uuid": [ + "option", + "UUID" + ], + "block_state": "varint", + "compound_tag": "nbt", + "particle": "particle", + "villager_data": [ + "container", + [ + { + "name": "villagerType", + "type": "varint" + }, + { + "name": "villagerProfession", + "type": "varint" + }, + { + "name": "level", + "type": "varint" + } + ] + ], + "optional_unsigned_int": "optvarint", + "pose": "varint" } - ] - ], - "17": "optvarint", - "18": "varint" + } + ] } - } + ] ], "entityMetadata": [ "entityMetadataLoop", { "endVal": 255, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": "varint" - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] + "type": "entityMetadataEntry" } ], "minecraft_smelting_format": [ diff --git a/data/pc/1.16/proto.yml b/data/pc/1.16/proto.yml index a20e9c43e..4b9144eda 100644 --- a/data/pc/1.16/proto.yml +++ b/data/pc/1.16/proto.yml @@ -83,77 +83,55 @@ } ] ] - entityMetadataItem: $compareTo ? - if 0: i8 - if 1: varint - if 2: f32 - if 3: string - if 4: string - if 5: [ - "option", - "string" - ] - if 6: slot - if 7: bool - if 8: - pitch: f32 - yaw: f32 - roll: f32 - if 9: position - if 10: [ - "option", - "position" - ] - if 11: varint - if 12: [ - "option", - "UUID" - ] - if 13: varint - if 14: nbt - if 15: particle - if 16: - villagerType: varint - villagerProfession: varint - level: varint - if 17: optvarint - if 18: varint - entityMetadata: [ - "entityMetadataLoop", - { - "endVal": 255, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": "varint" - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] - } - ] + entityMetadataEntry: + key: u8 + type: varint => + - byte + - int + - float + - string + - component + - optional_component + - item_stack + - boolean + - rotations + - block_pos + - optional_block_pos + - direction + - optional_uuid + - block_state + - compound_tag + - particle + - villager_data + - optional_unsigned_int + - pose + value: type ? + if byte: i8 + if int: varint + if float: f32 + if string: string + if component: string + if optional_component: ["option", "string"] + if item_stack: slot + if boolean: bool + if rotations: + pitch: f32 + yaw: f32 + roll: f32 + if block_pos: position + if optional_block_pos: ["option", "position"] + if direction: varint + if optional_uuid: ["option", "UUID"] + if block_state: varint + if compound_tag: nbt + if particle: particle + if villager_data: + villagerType: varint + villagerProfession: varint + level: varint + if optional_unsigned_int: optvarint + if pose: varint + entityMetadata: ["entityMetadataLoop", { "endVal": 255, "type": "entityMetadataEntry" }] minecraft_smelting_format: group: string ingredient: ingredient diff --git a/data/pc/1.16/protocol.json b/data/pc/1.16/protocol.json index e416ef513..42e6262b0 100644 --- a/data/pc/1.16/protocol.json +++ b/data/pc/1.16/protocol.json @@ -172,108 +172,121 @@ } ] ], - "entityMetadataItem": [ - "switch", - { - "compareTo": "$compareTo", - "fields": { - "0": "i8", - "1": "varint", - "2": "f32", - "3": "string", - "4": "string", - "5": [ - "option", - "string" - ], - "6": "slot", - "7": "bool", - "8": [ - "container", - [ - { - "name": "pitch", - "type": "f32" - }, - { - "name": "yaw", - "type": "f32" - }, - { - "name": "roll", - "type": "f32" + "entityMetadataEntry": [ + "container", + [ + { + "name": "key", + "type": "u8" + }, + { + "name": "type", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "byte", + "1": "int", + "2": "float", + "3": "string", + "4": "component", + "5": "optional_component", + "6": "item_stack", + "7": "boolean", + "8": "rotations", + "9": "block_pos", + "10": "optional_block_pos", + "11": "direction", + "12": "optional_uuid", + "13": "block_state", + "14": "compound_tag", + "15": "particle", + "16": "villager_data", + "17": "optional_unsigned_int", + "18": "pose" } - ] - ], - "9": "position", - "10": [ - "option", - "position" - ], - "11": "varint", - "12": [ - "option", - "UUID" - ], - "13": "varint", - "14": "nbt", - "15": "particle", - "16": [ - "container", - [ - { - "name": "villagerType", - "type": "varint" - }, - { - "name": "villagerProfession", - "type": "varint" - }, - { - "name": "level", - "type": "varint" + } + ] + }, + { + "name": "value", + "type": [ + "switch", + { + "compareTo": "type", + "fields": { + "byte": "i8", + "int": "varint", + "float": "f32", + "string": "string", + "component": "string", + "optional_component": [ + "option", + "string" + ], + "item_stack": "slot", + "boolean": "bool", + "rotations": [ + "container", + [ + { + "name": "pitch", + "type": "f32" + }, + { + "name": "yaw", + "type": "f32" + }, + { + "name": "roll", + "type": "f32" + } + ] + ], + "block_pos": "position", + "optional_block_pos": [ + "option", + "position" + ], + "direction": "varint", + "optional_uuid": [ + "option", + "UUID" + ], + "block_state": "varint", + "compound_tag": "nbt", + "particle": "particle", + "villager_data": [ + "container", + [ + { + "name": "villagerType", + "type": "varint" + }, + { + "name": "villagerProfession", + "type": "varint" + }, + { + "name": "level", + "type": "varint" + } + ] + ], + "optional_unsigned_int": "optvarint", + "pose": "varint" } - ] - ], - "17": "optvarint", - "18": "varint" + } + ] } - } + ] ], "entityMetadata": [ "entityMetadataLoop", { "endVal": 255, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": "varint" - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] + "type": "entityMetadataEntry" } ], "minecraft_smelting_format": [ diff --git a/data/pc/1.17.1/proto.yml b/data/pc/1.17.1/proto.yml index ab746a71d..4d3f78114 100644 --- a/data/pc/1.17.1/proto.yml +++ b/data/pc/1.17.1/proto.yml @@ -98,77 +98,55 @@ } ] ] - entityMetadataItem: $compareTo ? - if 0: i8 - if 1: varint - if 2: f32 - if 3: string - if 4: string - if 5: [ - "option", - "string" - ] - if 6: slot - if 7: bool - if 8: - pitch: f32 - yaw: f32 - roll: f32 - if 9: position - if 10: [ - "option", - "position" - ] - if 11: varint - if 12: [ - "option", - "UUID" - ] - if 13: varint - if 14: nbt - if 15: particle - if 16: - villagerType: varint - villagerProfession: varint - level: varint - if 17: optvarint - if 18: varint - entityMetadata: [ - "entityMetadataLoop", - { - "endVal": 255, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": "varint" - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] - } - ] + entityMetadataEntry: + key: u8 + type: varint => + - byte + - int + - float + - string + - component + - optional_component + - item_stack + - boolean + - rotations + - block_pos + - optional_block_pos + - direction + - optional_uuid + - block_state + - compound_tag + - particle + - villager_data + - optional_unsigned_int + - pose + value: type ? + if byte: i8 + if int: varint + if float: f32 + if string: string + if component: string + if optional_component: ["option", "string"] + if item_stack: slot + if boolean: bool + if rotations: + pitch: f32 + yaw: f32 + roll: f32 + if block_pos: position + if optional_block_pos: ["option", "position"] + if direction: varint + if optional_uuid: ["option", "UUID"] + if block_state: varint + if compound_tag: nbt + if particle: particle + if villager_data: + villagerType: varint + villagerProfession: varint + level: varint + if optional_unsigned_int: optvarint + if pose: varint + entityMetadata: ["entityMetadataLoop", { "endVal": 255, "type": "entityMetadataEntry" }] minecraft_smelting_format: group: string ingredient: ingredient diff --git a/data/pc/1.17.1/protocol.json b/data/pc/1.17.1/protocol.json index 3ec58d2a4..6ae755d16 100644 --- a/data/pc/1.17.1/protocol.json +++ b/data/pc/1.17.1/protocol.json @@ -235,108 +235,121 @@ } ] ], - "entityMetadataItem": [ - "switch", - { - "compareTo": "$compareTo", - "fields": { - "0": "i8", - "1": "varint", - "2": "f32", - "3": "string", - "4": "string", - "5": [ - "option", - "string" - ], - "6": "slot", - "7": "bool", - "8": [ - "container", - [ - { - "name": "pitch", - "type": "f32" - }, - { - "name": "yaw", - "type": "f32" - }, - { - "name": "roll", - "type": "f32" + "entityMetadataEntry": [ + "container", + [ + { + "name": "key", + "type": "u8" + }, + { + "name": "type", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "byte", + "1": "int", + "2": "float", + "3": "string", + "4": "component", + "5": "optional_component", + "6": "item_stack", + "7": "boolean", + "8": "rotations", + "9": "block_pos", + "10": "optional_block_pos", + "11": "direction", + "12": "optional_uuid", + "13": "block_state", + "14": "compound_tag", + "15": "particle", + "16": "villager_data", + "17": "optional_unsigned_int", + "18": "pose" } - ] - ], - "9": "position", - "10": [ - "option", - "position" - ], - "11": "varint", - "12": [ - "option", - "UUID" - ], - "13": "varint", - "14": "nbt", - "15": "particle", - "16": [ - "container", - [ - { - "name": "villagerType", - "type": "varint" - }, - { - "name": "villagerProfession", - "type": "varint" - }, - { - "name": "level", - "type": "varint" + } + ] + }, + { + "name": "value", + "type": [ + "switch", + { + "compareTo": "type", + "fields": { + "byte": "i8", + "int": "varint", + "float": "f32", + "string": "string", + "component": "string", + "optional_component": [ + "option", + "string" + ], + "item_stack": "slot", + "boolean": "bool", + "rotations": [ + "container", + [ + { + "name": "pitch", + "type": "f32" + }, + { + "name": "yaw", + "type": "f32" + }, + { + "name": "roll", + "type": "f32" + } + ] + ], + "block_pos": "position", + "optional_block_pos": [ + "option", + "position" + ], + "direction": "varint", + "optional_uuid": [ + "option", + "UUID" + ], + "block_state": "varint", + "compound_tag": "nbt", + "particle": "particle", + "villager_data": [ + "container", + [ + { + "name": "villagerType", + "type": "varint" + }, + { + "name": "villagerProfession", + "type": "varint" + }, + { + "name": "level", + "type": "varint" + } + ] + ], + "optional_unsigned_int": "optvarint", + "pose": "varint" } - ] - ], - "17": "optvarint", - "18": "varint" + } + ] } - } + ] ], "entityMetadata": [ "entityMetadataLoop", { "endVal": 255, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": "varint" - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] + "type": "entityMetadataEntry" } ], "minecraft_smelting_format": [ diff --git a/data/pc/1.17/proto.yml b/data/pc/1.17/proto.yml index 724869ca4..2ee1aa1b4 100644 --- a/data/pc/1.17/proto.yml +++ b/data/pc/1.17/proto.yml @@ -98,77 +98,55 @@ } ] ] - entityMetadataItem: $compareTo ? - if 0: i8 - if 1: varint - if 2: f32 - if 3: string - if 4: string - if 5: [ - "option", - "string" - ] - if 6: slot - if 7: bool - if 8: - pitch: f32 - yaw: f32 - roll: f32 - if 9: position - if 10: [ - "option", - "position" - ] - if 11: varint - if 12: [ - "option", - "UUID" - ] - if 13: varint - if 14: nbt - if 15: particle - if 16: - villagerType: varint - villagerProfession: varint - level: varint - if 17: optvarint - if 18: varint - entityMetadata: [ - "entityMetadataLoop", - { - "endVal": 255, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": "varint" - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] - } - ] + entityMetadataEntry: + key: u8 + type: varint => + - byte + - int + - float + - string + - component + - optional_component + - item_stack + - boolean + - rotations + - block_pos + - optional_block_pos + - direction + - optional_uuid + - block_state + - compound_tag + - particle + - villager_data + - optional_unsigned_int + - pose + value: type ? + if byte: i8 + if int: varint + if float: f32 + if string: string + if component: string + if optional_component: ["option", "string"] + if item_stack: slot + if boolean: bool + if rotations: + pitch: f32 + yaw: f32 + roll: f32 + if block_pos: position + if optional_block_pos: ["option", "position"] + if direction: varint + if optional_uuid: ["option", "UUID"] + if block_state: varint + if compound_tag: nbt + if particle: particle + if villager_data: + villagerType: varint + villagerProfession: varint + level: varint + if optional_unsigned_int: optvarint + if pose: varint + entityMetadata: ["entityMetadataLoop", { "endVal": 255, "type": "entityMetadataEntry" }] minecraft_smelting_format: group: string ingredient: ingredient diff --git a/data/pc/1.17/protocol.json b/data/pc/1.17/protocol.json index 801891cc6..d260af95e 100644 --- a/data/pc/1.17/protocol.json +++ b/data/pc/1.17/protocol.json @@ -235,108 +235,121 @@ } ] ], - "entityMetadataItem": [ - "switch", - { - "compareTo": "$compareTo", - "fields": { - "0": "i8", - "1": "varint", - "2": "f32", - "3": "string", - "4": "string", - "5": [ - "option", - "string" - ], - "6": "slot", - "7": "bool", - "8": [ - "container", - [ - { - "name": "pitch", - "type": "f32" - }, - { - "name": "yaw", - "type": "f32" - }, - { - "name": "roll", - "type": "f32" + "entityMetadataEntry": [ + "container", + [ + { + "name": "key", + "type": "u8" + }, + { + "name": "type", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "byte", + "1": "int", + "2": "float", + "3": "string", + "4": "component", + "5": "optional_component", + "6": "item_stack", + "7": "boolean", + "8": "rotations", + "9": "block_pos", + "10": "optional_block_pos", + "11": "direction", + "12": "optional_uuid", + "13": "block_state", + "14": "compound_tag", + "15": "particle", + "16": "villager_data", + "17": "optional_unsigned_int", + "18": "pose" } - ] - ], - "9": "position", - "10": [ - "option", - "position" - ], - "11": "varint", - "12": [ - "option", - "UUID" - ], - "13": "varint", - "14": "nbt", - "15": "particle", - "16": [ - "container", - [ - { - "name": "villagerType", - "type": "varint" - }, - { - "name": "villagerProfession", - "type": "varint" - }, - { - "name": "level", - "type": "varint" + } + ] + }, + { + "name": "value", + "type": [ + "switch", + { + "compareTo": "type", + "fields": { + "byte": "i8", + "int": "varint", + "float": "f32", + "string": "string", + "component": "string", + "optional_component": [ + "option", + "string" + ], + "item_stack": "slot", + "boolean": "bool", + "rotations": [ + "container", + [ + { + "name": "pitch", + "type": "f32" + }, + { + "name": "yaw", + "type": "f32" + }, + { + "name": "roll", + "type": "f32" + } + ] + ], + "block_pos": "position", + "optional_block_pos": [ + "option", + "position" + ], + "direction": "varint", + "optional_uuid": [ + "option", + "UUID" + ], + "block_state": "varint", + "compound_tag": "nbt", + "particle": "particle", + "villager_data": [ + "container", + [ + { + "name": "villagerType", + "type": "varint" + }, + { + "name": "villagerProfession", + "type": "varint" + }, + { + "name": "level", + "type": "varint" + } + ] + ], + "optional_unsigned_int": "optvarint", + "pose": "varint" } - ] - ], - "17": "optvarint", - "18": "varint" + } + ] } - } + ] ], "entityMetadata": [ "entityMetadataLoop", { "endVal": 255, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": "varint" - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] + "type": "entityMetadataEntry" } ], "minecraft_smelting_format": [ diff --git a/data/pc/1.18.2/proto.yml b/data/pc/1.18.2/proto.yml index 20a6acfc3..709536024 100644 --- a/data/pc/1.18.2/proto.yml +++ b/data/pc/1.18.2/proto.yml @@ -102,77 +102,55 @@ } ] ] - entityMetadataItem: $compareTo ? - if 0: i8 - if 1: varint - if 2: f32 - if 3: string - if 4: string - if 5: [ - "option", - "string" - ] - if 6: slot - if 7: bool - if 8: - pitch: f32 - yaw: f32 - roll: f32 - if 9: position - if 10: [ - "option", - "position" - ] - if 11: varint - if 12: [ - "option", - "UUID" - ] - if 13: varint - if 14: nbt - if 15: particle - if 16: - villagerType: varint - villagerProfession: varint - level: varint - if 17: optvarint - if 18: varint - entityMetadata: [ - "entityMetadataLoop", - { - "endVal": 255, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": "varint" - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] - } - ] + entityMetadataEntry: + key: u8 + type: varint => + - byte + - int + - float + - string + - component + - optional_component + - item_stack + - boolean + - rotations + - block_pos + - optional_block_pos + - direction + - optional_uuid + - block_state + - compound_tag + - particle + - villager_data + - optional_unsigned_int + - pose + value: type ? + if byte: i8 + if int: varint + if float: f32 + if string: string + if component: string + if optional_component: ["option", "string"] + if item_stack: slot + if boolean: bool + if rotations: + pitch: f32 + yaw: f32 + roll: f32 + if block_pos: position + if optional_block_pos: ["option", "position"] + if direction: varint + if optional_uuid: ["option", "UUID"] + if block_state: varint + if compound_tag: nbt + if particle: particle + if villager_data: + villagerType: varint + villagerProfession: varint + level: varint + if optional_unsigned_int: optvarint + if pose: varint + entityMetadata: ["entityMetadataLoop", { "endVal": 255, "type": "entityMetadataEntry" }] minecraft_smelting_format: group: string ingredient: ingredient diff --git a/data/pc/1.18.2/protocol.json b/data/pc/1.18.2/protocol.json index 433e1fb7e..c1a5fa8f2 100644 --- a/data/pc/1.18.2/protocol.json +++ b/data/pc/1.18.2/protocol.json @@ -246,108 +246,121 @@ } ] ], - "entityMetadataItem": [ - "switch", - { - "compareTo": "$compareTo", - "fields": { - "0": "i8", - "1": "varint", - "2": "f32", - "3": "string", - "4": "string", - "5": [ - "option", - "string" - ], - "6": "slot", - "7": "bool", - "8": [ - "container", - [ - { - "name": "pitch", - "type": "f32" - }, - { - "name": "yaw", - "type": "f32" - }, - { - "name": "roll", - "type": "f32" + "entityMetadataEntry": [ + "container", + [ + { + "name": "key", + "type": "u8" + }, + { + "name": "type", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "byte", + "1": "int", + "2": "float", + "3": "string", + "4": "component", + "5": "optional_component", + "6": "item_stack", + "7": "boolean", + "8": "rotations", + "9": "block_pos", + "10": "optional_block_pos", + "11": "direction", + "12": "optional_uuid", + "13": "block_state", + "14": "compound_tag", + "15": "particle", + "16": "villager_data", + "17": "optional_unsigned_int", + "18": "pose" } - ] - ], - "9": "position", - "10": [ - "option", - "position" - ], - "11": "varint", - "12": [ - "option", - "UUID" - ], - "13": "varint", - "14": "nbt", - "15": "particle", - "16": [ - "container", - [ - { - "name": "villagerType", - "type": "varint" - }, - { - "name": "villagerProfession", - "type": "varint" - }, - { - "name": "level", - "type": "varint" + } + ] + }, + { + "name": "value", + "type": [ + "switch", + { + "compareTo": "type", + "fields": { + "byte": "i8", + "int": "varint", + "float": "f32", + "string": "string", + "component": "string", + "optional_component": [ + "option", + "string" + ], + "item_stack": "slot", + "boolean": "bool", + "rotations": [ + "container", + [ + { + "name": "pitch", + "type": "f32" + }, + { + "name": "yaw", + "type": "f32" + }, + { + "name": "roll", + "type": "f32" + } + ] + ], + "block_pos": "position", + "optional_block_pos": [ + "option", + "position" + ], + "direction": "varint", + "optional_uuid": [ + "option", + "UUID" + ], + "block_state": "varint", + "compound_tag": "nbt", + "particle": "particle", + "villager_data": [ + "container", + [ + { + "name": "villagerType", + "type": "varint" + }, + { + "name": "villagerProfession", + "type": "varint" + }, + { + "name": "level", + "type": "varint" + } + ] + ], + "optional_unsigned_int": "optvarint", + "pose": "varint" } - ] - ], - "17": "optvarint", - "18": "varint" + } + ] } - } + ] ], "entityMetadata": [ "entityMetadataLoop", { "endVal": 255, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": "varint" - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] + "type": "entityMetadataEntry" } ], "minecraft_smelting_format": [ diff --git a/data/pc/1.18/proto.yml b/data/pc/1.18/proto.yml index 03513b47c..f888f1b78 100644 --- a/data/pc/1.18/proto.yml +++ b/data/pc/1.18/proto.yml @@ -102,77 +102,55 @@ } ] ] - entityMetadataItem: $compareTo ? - if 0: i8 - if 1: varint - if 2: f32 - if 3: string - if 4: string - if 5: [ - "option", - "string" - ] - if 6: slot - if 7: bool - if 8: - pitch: f32 - yaw: f32 - roll: f32 - if 9: position - if 10: [ - "option", - "position" - ] - if 11: varint - if 12: [ - "option", - "UUID" - ] - if 13: varint - if 14: nbt - if 15: particle - if 16: - villagerType: varint - villagerProfession: varint - level: varint - if 17: optvarint - if 18: varint - entityMetadata: [ - "entityMetadataLoop", - { - "endVal": 255, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": "varint" - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] - } - ] + entityMetadataEntry: + key: u8 + type: varint => + - byte + - int + - float + - string + - component + - optional_component + - item_stack + - boolean + - rotations + - block_pos + - optional_block_pos + - direction + - optional_uuid + - block_state + - compound_tag + - particle + - villager_data + - optional_unsigned_int + - pose + value: type ? + if byte: i8 + if int: varint + if float: f32 + if string: string + if component: string + if optional_component: ["option", "string"] + if item_stack: slot + if boolean: bool + if rotations: + pitch: f32 + yaw: f32 + roll: f32 + if block_pos: position + if optional_block_pos: ["option", "position"] + if direction: varint + if optional_uuid: ["option", "UUID"] + if block_state: varint + if compound_tag: nbt + if particle: particle + if villager_data: + villagerType: varint + villagerProfession: varint + level: varint + if optional_unsigned_int: optvarint + if pose: varint + entityMetadata: ["entityMetadataLoop", { "endVal": 255, "type": "entityMetadataEntry" }] minecraft_smelting_format: group: string ingredient: ingredient diff --git a/data/pc/1.18/protocol.json b/data/pc/1.18/protocol.json index acf6b8a7e..a84f36895 100644 --- a/data/pc/1.18/protocol.json +++ b/data/pc/1.18/protocol.json @@ -246,108 +246,121 @@ } ] ], - "entityMetadataItem": [ - "switch", - { - "compareTo": "$compareTo", - "fields": { - "0": "i8", - "1": "varint", - "2": "f32", - "3": "string", - "4": "string", - "5": [ - "option", - "string" - ], - "6": "slot", - "7": "bool", - "8": [ - "container", - [ - { - "name": "pitch", - "type": "f32" - }, - { - "name": "yaw", - "type": "f32" - }, - { - "name": "roll", - "type": "f32" + "entityMetadataEntry": [ + "container", + [ + { + "name": "key", + "type": "u8" + }, + { + "name": "type", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "byte", + "1": "int", + "2": "float", + "3": "string", + "4": "component", + "5": "optional_component", + "6": "item_stack", + "7": "boolean", + "8": "rotations", + "9": "block_pos", + "10": "optional_block_pos", + "11": "direction", + "12": "optional_uuid", + "13": "block_state", + "14": "compound_tag", + "15": "particle", + "16": "villager_data", + "17": "optional_unsigned_int", + "18": "pose" } - ] - ], - "9": "position", - "10": [ - "option", - "position" - ], - "11": "varint", - "12": [ - "option", - "UUID" - ], - "13": "varint", - "14": "nbt", - "15": "particle", - "16": [ - "container", - [ - { - "name": "villagerType", - "type": "varint" - }, - { - "name": "villagerProfession", - "type": "varint" - }, - { - "name": "level", - "type": "varint" + } + ] + }, + { + "name": "value", + "type": [ + "switch", + { + "compareTo": "type", + "fields": { + "byte": "i8", + "int": "varint", + "float": "f32", + "string": "string", + "component": "string", + "optional_component": [ + "option", + "string" + ], + "item_stack": "slot", + "boolean": "bool", + "rotations": [ + "container", + [ + { + "name": "pitch", + "type": "f32" + }, + { + "name": "yaw", + "type": "f32" + }, + { + "name": "roll", + "type": "f32" + } + ] + ], + "block_pos": "position", + "optional_block_pos": [ + "option", + "position" + ], + "direction": "varint", + "optional_uuid": [ + "option", + "UUID" + ], + "block_state": "varint", + "compound_tag": "nbt", + "particle": "particle", + "villager_data": [ + "container", + [ + { + "name": "villagerType", + "type": "varint" + }, + { + "name": "villagerProfession", + "type": "varint" + }, + { + "name": "level", + "type": "varint" + } + ] + ], + "optional_unsigned_int": "optvarint", + "pose": "varint" } - ] - ], - "17": "optvarint", - "18": "varint" + } + ] } - } + ] ], "entityMetadata": [ "entityMetadataLoop", { "endVal": 255, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": "varint" - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] + "type": "entityMetadataEntry" } ], "minecraft_smelting_format": [ diff --git a/data/pc/1.19.2/proto.yml b/data/pc/1.19.2/proto.yml index 762f32239..455415aae 100644 --- a/data/pc/1.19.2/proto.yml +++ b/data/pc/1.19.2/proto.yml @@ -118,84 +118,63 @@ "countType": "varint" } ] - entityMetadataItem: $compareTo ? - if 0: i8 - if 1: varint - if 2: f32 - if 3: string - if 4: string - if 5: [ - "option", - "string" - ] - if 6: slot - if 7: bool - if 8: - pitch: f32 - yaw: f32 - roll: f32 - if 9: position - if 10: [ - "option", - "position" - ] - if 11: varint - if 12: [ - "option", - "UUID" - ] - if 13: varint - if 14: nbt - if 15: particle - if 16: - villagerType: varint - villagerProfession: varint - level: varint - if 17: optvarint - if 18: varint - if 19: varint - if 20: varint - if 21: [ - "option", - "string" - ] - if 22: varint - entityMetadata: [ - "entityMetadataLoop", - { - "endVal": 255, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": "varint" - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] - } - ] + entityMetadataEntry: + key: u8 + type: varint => + - byte + - int + - float + - string + - component + - optional_component + - item_stack + - boolean + - rotations + - block_pos + - optional_block_pos + - direction + - optional_uuid + - block_state + - compound_tag + - particle + - villager_data + - optional_unsigned_int + - pose + - cat_variant + - frog_variant + - optional_global_pos + - painting_variant + value: type ? + if byte: i8 + if int: varint + if float: f32 + if string: string + if component: string + if optional_component: ["option", "string"] + if item_stack: slot + if boolean: bool + if rotations: + pitch: f32 + yaw: f32 + roll: f32 + if block_pos: position + if optional_block_pos: ["option", "position"] + if direction: varint + if optional_uuid: ["option", "UUID"] + if block_state: varint + if compound_tag: nbt + if particle: particle + if villager_data: + villagerType: varint + villagerProfession: varint + level: varint + if optional_unsigned_int: optvarint + if pose: varint + if cat_variant: varint + if frog_variant: varint + if optional_global_pos: ["option", "string"] + if painting_variant: varint + entityMetadata: ["entityMetadataLoop", { "endVal": 255, "type": "entityMetadataEntry" }] minecraft_smelting_format: group: string ingredient: ingredient diff --git a/data/pc/1.19.2/protocol.json b/data/pc/1.19.2/protocol.json index eb8eb57c9..ffeab5f9a 100644 --- a/data/pc/1.19.2/protocol.json +++ b/data/pc/1.19.2/protocol.json @@ -309,115 +309,132 @@ ] } ], - "entityMetadataItem": [ - "switch", - { - "compareTo": "$compareTo", - "fields": { - "0": "i8", - "1": "varint", - "2": "f32", - "3": "string", - "4": "string", - "5": [ - "option", - "string" - ], - "6": "slot", - "7": "bool", - "8": [ - "container", - [ - { - "name": "pitch", - "type": "f32" - }, - { - "name": "yaw", - "type": "f32" - }, - { - "name": "roll", - "type": "f32" + "entityMetadataEntry": [ + "container", + [ + { + "name": "key", + "type": "u8" + }, + { + "name": "type", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "byte", + "1": "int", + "2": "float", + "3": "string", + "4": "component", + "5": "optional_component", + "6": "item_stack", + "7": "boolean", + "8": "rotations", + "9": "block_pos", + "10": "optional_block_pos", + "11": "direction", + "12": "optional_uuid", + "13": "block_state", + "14": "compound_tag", + "15": "particle", + "16": "villager_data", + "17": "optional_unsigned_int", + "18": "pose", + "19": "cat_variant", + "20": "frog_variant", + "21": "optional_global_pos", + "22": "painting_variant" } - ] - ], - "9": "position", - "10": [ - "option", - "position" - ], - "11": "varint", - "12": [ - "option", - "UUID" - ], - "13": "varint", - "14": "nbt", - "15": "particle", - "16": [ - "container", - [ - { - "name": "villagerType", - "type": "varint" - }, - { - "name": "villagerProfession", - "type": "varint" - }, - { - "name": "level", - "type": "varint" + } + ] + }, + { + "name": "value", + "type": [ + "switch", + { + "compareTo": "type", + "fields": { + "byte": "i8", + "int": "varint", + "float": "f32", + "string": "string", + "component": "string", + "optional_component": [ + "option", + "string" + ], + "item_stack": "slot", + "boolean": "bool", + "rotations": [ + "container", + [ + { + "name": "pitch", + "type": "f32" + }, + { + "name": "yaw", + "type": "f32" + }, + { + "name": "roll", + "type": "f32" + } + ] + ], + "block_pos": "position", + "optional_block_pos": [ + "option", + "position" + ], + "direction": "varint", + "optional_uuid": [ + "option", + "UUID" + ], + "block_state": "varint", + "compound_tag": "nbt", + "particle": "particle", + "villager_data": [ + "container", + [ + { + "name": "villagerType", + "type": "varint" + }, + { + "name": "villagerProfession", + "type": "varint" + }, + { + "name": "level", + "type": "varint" + } + ] + ], + "optional_unsigned_int": "optvarint", + "pose": "varint", + "cat_variant": "varint", + "frog_variant": "varint", + "optional_global_pos": [ + "option", + "string" + ], + "painting_variant": "varint" } - ] - ], - "17": "optvarint", - "18": "varint", - "19": "varint", - "20": "varint", - "21": [ - "option", - "string" - ], - "22": "varint" + } + ] } - } + ] ], "entityMetadata": [ "entityMetadataLoop", { "endVal": 255, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": "varint" - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] + "type": "entityMetadataEntry" } ], "minecraft_smelting_format": [ diff --git a/data/pc/1.19.3/proto.yml b/data/pc/1.19.3/proto.yml index 8fb3db655..c84999fe0 100644 --- a/data/pc/1.19.3/proto.yml +++ b/data/pc/1.19.3/proto.yml @@ -132,85 +132,65 @@ } ] default: void - entityMetadataItem: $compareTo ? - if 0: i8 - if 1: varint - if 2: varlong - if 3: f32 - if 4: string - if 5: string - if 6: [ - "option", - "string" - ] - if 7: slot - if 8: bool - if 9: - pitch: f32 - yaw: f32 - roll: f32 - if 10: position - if 11: [ - "option", - "position" - ] - if 12: varint - if 13: [ - "option", - "UUID" - ] - if 14: varint - if 15: nbt - if 16: particle - if 17: - villagerType: varint - villagerProfession: varint - level: varint - if 18: optvarint - if 19: varint - if 20: varint - if 21: varint - if 22: [ - "option", - "string" - ] - if 23: varint - entityMetadata: [ - "entityMetadataLoop", - { - "endVal": 255, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": "varint" - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] - } - ] + entityMetadataEntry: + key: u8 + type: varint => + - byte + - int + - long + - float + - string + - component + - optional_component + - item_stack + - boolean + - rotations + - block_pos + - optional_block_pos + - direction + - optional_uuid + - block_state + - compound_tag + - particle + - villager_data + - optional_unsigned_int + - pose + - cat_variant + - frog_variant + - optional_global_pos + - painting_variant + value: type ? + if byte: i8 + if int: varint + if long: varlong + if float: f32 + if string: string + if component: string + if optional_component: ["option", "string"] + if item_stack: slot + if boolean: bool + if rotations: + pitch: f32 + yaw: f32 + roll: f32 + if block_pos: position + if optional_block_pos: ["option", "position"] + if direction: varint + if optional_uuid: ["option", "UUID"] + if block_state: varint + if compound_tag: nbt + if particle: particle + if villager_data: + villagerType: varint + villagerProfession: varint + level: varint + if optional_unsigned_int: optvarint + if pose: varint + if cat_variant: varint + if frog_variant: varint + if optional_global_pos: ["option", "string"] + if painting_variant: varint + entityMetadata: ["entityMetadataLoop", { "endVal": 255, "type": "entityMetadataEntry" }] minecraft_simple_recipe_format: category: varint minecraft_smelting_format: diff --git a/data/pc/1.19.3/protocol.json b/data/pc/1.19.3/protocol.json index 9bfafdbd2..7ca07b00f 100644 --- a/data/pc/1.19.3/protocol.json +++ b/data/pc/1.19.3/protocol.json @@ -337,116 +337,134 @@ ] } ], - "entityMetadataItem": [ - "switch", - { - "compareTo": "$compareTo", - "fields": { - "0": "i8", - "1": "varint", - "2": "varlong", - "3": "f32", - "4": "string", - "5": "string", - "6": [ - "option", - "string" - ], - "7": "slot", - "8": "bool", - "9": [ - "container", - [ - { - "name": "pitch", - "type": "f32" - }, - { - "name": "yaw", - "type": "f32" - }, - { - "name": "roll", - "type": "f32" + "entityMetadataEntry": [ + "container", + [ + { + "name": "key", + "type": "u8" + }, + { + "name": "type", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "byte", + "1": "int", + "2": "long", + "3": "float", + "4": "string", + "5": "component", + "6": "optional_component", + "7": "item_stack", + "8": "boolean", + "9": "rotations", + "10": "block_pos", + "11": "optional_block_pos", + "12": "direction", + "13": "optional_uuid", + "14": "block_state", + "15": "compound_tag", + "16": "particle", + "17": "villager_data", + "18": "optional_unsigned_int", + "19": "pose", + "20": "cat_variant", + "21": "frog_variant", + "22": "optional_global_pos", + "23": "painting_variant" } - ] - ], - "10": "position", - "11": [ - "option", - "position" - ], - "12": "varint", - "13": [ - "option", - "UUID" - ], - "14": "varint", - "15": "nbt", - "16": "particle", - "17": [ - "container", - [ - { - "name": "villagerType", - "type": "varint" - }, - { - "name": "villagerProfession", - "type": "varint" - }, - { - "name": "level", - "type": "varint" + } + ] + }, + { + "name": "value", + "type": [ + "switch", + { + "compareTo": "type", + "fields": { + "byte": "i8", + "int": "varint", + "long": "varlong", + "float": "f32", + "string": "string", + "component": "string", + "optional_component": [ + "option", + "string" + ], + "item_stack": "slot", + "boolean": "bool", + "rotations": [ + "container", + [ + { + "name": "pitch", + "type": "f32" + }, + { + "name": "yaw", + "type": "f32" + }, + { + "name": "roll", + "type": "f32" + } + ] + ], + "block_pos": "position", + "optional_block_pos": [ + "option", + "position" + ], + "direction": "varint", + "optional_uuid": [ + "option", + "UUID" + ], + "block_state": "varint", + "compound_tag": "nbt", + "particle": "particle", + "villager_data": [ + "container", + [ + { + "name": "villagerType", + "type": "varint" + }, + { + "name": "villagerProfession", + "type": "varint" + }, + { + "name": "level", + "type": "varint" + } + ] + ], + "optional_unsigned_int": "optvarint", + "pose": "varint", + "cat_variant": "varint", + "frog_variant": "varint", + "optional_global_pos": [ + "option", + "string" + ], + "painting_variant": "varint" } - ] - ], - "18": "optvarint", - "19": "varint", - "20": "varint", - "21": "varint", - "22": [ - "option", - "string" - ], - "23": "varint" + } + ] } - } + ] ], "entityMetadata": [ "entityMetadataLoop", { "endVal": 255, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": "varint" - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] + "type": "entityMetadataEntry" } ], "minecraft_simple_recipe_format": [ diff --git a/data/pc/1.19.4/proto.yml b/data/pc/1.19.4/proto.yml index 4bb8bc525..618eaf3b5 100644 --- a/data/pc/1.19.4/proto.yml +++ b/data/pc/1.19.4/proto.yml @@ -148,116 +148,73 @@ } ] default: void - entityMetadataItem: $compareTo ? - if byte: i8 - if int: varint - if long: varlong - if float: f32 - if string: string - if component: string - if optional_component: [ - "option", - "string" - ] - if item_stack: slot - if boolean: bool - if rotations: - pitch: f32 - yaw: f32 - roll: f32 - if block_pos: position - if optional_block_pos: [ - "option", - "position" - ] - if direction: varint - if optional_uuid: [ - "option", - "UUID" - ] - if block_state: varint - if optional_block_state: optvarint - if compound_tag: nbt - if particle: particle - if villager_data: - villagerType: varint - villagerProfession: varint - level: varint - if optional_unsigned_int: optvarint - if pose: varint - if cat_variant: varint - if frog_variant: varint - if optional_global_pos: [ - "option", - "string" - ] - if painting_variant: varint - if sniffer_state: varint - if vector3: vec3f - if quaternion: vec4f - entityMetadata: [ - "entityMetadataLoop", - { - "endVal": 255, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "0": "byte", - "1": "int", - "2": "long", - "3": "float", - "4": "string", - "5": "component", - "6": "optional_component", - "7": "item_stack", - "8": "boolean", - "9": "rotations", - "10": "block_pos", - "11": "optional_block_pos", - "12": "direction", - "13": "optional_uuid", - "14": "block_state", - "15": "optional_block_state", - "16": "compound_tag", - "17": "particle", - "18": "villager_data", - "19": "optional_unsigned_int", - "20": "pose", - "21": "cat_variant", - "22": "frog_variant", - "23": "optional_global_pos", - "24": "painting_variant", - "25": "sniffer_state", - "26": "vector3", - "27": "quaternion" - } - } - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] - } - ] + entityMetadataEntry: + key: u8 + type: varint => + - byte + - int + - long + - float + - string + - component + - optional_component + - item_stack + - boolean + - rotations + - block_pos + - optional_block_pos + - direction + - optional_uuid + - block_state + - optional_block_state + - compound_tag + - particle + - villager_data + - optional_unsigned_int + - pose + - cat_variant + - frog_variant + - optional_global_pos + - painting_variant + - sniffer_state + - vector3 + - quaternion + value: type ? + if byte: i8 + if int: varint + if long: varlong + if float: f32 + if string: string + if component: string + if optional_component: ["option", "string"] + if item_stack: slot + if boolean: bool + if rotations: + pitch: f32 + yaw: f32 + roll: f32 + if block_pos: position + if optional_block_pos: ["option", "position"] + if direction: varint + if optional_uuid: ["option", "UUID"] + if block_state: varint + if optional_block_state: optvarint + if compound_tag: nbt + if particle: particle + if villager_data: + villagerType: varint + villagerProfession: varint + level: varint + if optional_unsigned_int: optvarint + if pose: varint + if cat_variant: varint + if frog_variant: varint + if optional_global_pos: ["option", "string"] + if painting_variant: varint + if sniffer_state: varint + if vector3: vec3f + if quaternion: vec4f + entityMetadata: ["entityMetadataLoop", { "endVal": 255, "type": "entityMetadataEntry" }] minecraft_simple_recipe_format: category: varint minecraft_smelting_format: diff --git a/data/pc/1.19.4/protocol.json b/data/pc/1.19.4/protocol.json index ecd0cf60f..33638fca1 100644 --- a/data/pc/1.19.4/protocol.json +++ b/data/pc/1.19.4/protocol.json @@ -405,147 +405,142 @@ ] } ], - "entityMetadataItem": [ - "switch", - { - "compareTo": "$compareTo", - "fields": { - "byte": "i8", - "int": "varint", - "long": "varlong", - "float": "f32", - "string": "string", - "component": "string", - "optional_component": [ - "option", - "string" - ], - "item_stack": "slot", - "boolean": "bool", - "rotations": [ - "container", - [ - { - "name": "pitch", - "type": "f32" - }, - { - "name": "yaw", - "type": "f32" - }, - { - "name": "roll", - "type": "f32" + "entityMetadataEntry": [ + "container", + [ + { + "name": "key", + "type": "u8" + }, + { + "name": "type", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "byte", + "1": "int", + "2": "long", + "3": "float", + "4": "string", + "5": "component", + "6": "optional_component", + "7": "item_stack", + "8": "boolean", + "9": "rotations", + "10": "block_pos", + "11": "optional_block_pos", + "12": "direction", + "13": "optional_uuid", + "14": "block_state", + "15": "optional_block_state", + "16": "compound_tag", + "17": "particle", + "18": "villager_data", + "19": "optional_unsigned_int", + "20": "pose", + "21": "cat_variant", + "22": "frog_variant", + "23": "optional_global_pos", + "24": "painting_variant", + "25": "sniffer_state", + "26": "vector3", + "27": "quaternion" } - ] - ], - "block_pos": "position", - "optional_block_pos": [ - "option", - "position" - ], - "direction": "varint", - "optional_uuid": [ - "option", - "UUID" - ], - "block_state": "varint", - "optional_block_state": "optvarint", - "compound_tag": "nbt", - "particle": "particle", - "villager_data": [ - "container", - [ - { - "name": "villagerType", - "type": "varint" - }, - { - "name": "villagerProfession", - "type": "varint" - }, - { - "name": "level", - "type": "varint" + } + ] + }, + { + "name": "value", + "type": [ + "switch", + { + "compareTo": "type", + "fields": { + "byte": "i8", + "int": "varint", + "long": "varlong", + "float": "f32", + "string": "string", + "component": "string", + "optional_component": [ + "option", + "string" + ], + "item_stack": "slot", + "boolean": "bool", + "rotations": [ + "container", + [ + { + "name": "pitch", + "type": "f32" + }, + { + "name": "yaw", + "type": "f32" + }, + { + "name": "roll", + "type": "f32" + } + ] + ], + "block_pos": "position", + "optional_block_pos": [ + "option", + "position" + ], + "direction": "varint", + "optional_uuid": [ + "option", + "UUID" + ], + "block_state": "varint", + "optional_block_state": "optvarint", + "compound_tag": "nbt", + "particle": "particle", + "villager_data": [ + "container", + [ + { + "name": "villagerType", + "type": "varint" + }, + { + "name": "villagerProfession", + "type": "varint" + }, + { + "name": "level", + "type": "varint" + } + ] + ], + "optional_unsigned_int": "optvarint", + "pose": "varint", + "cat_variant": "varint", + "frog_variant": "varint", + "optional_global_pos": [ + "option", + "string" + ], + "painting_variant": "varint", + "sniffer_state": "varint", + "vector3": "vec3f", + "quaternion": "vec4f" } - ] - ], - "optional_unsigned_int": "optvarint", - "pose": "varint", - "cat_variant": "varint", - "frog_variant": "varint", - "optional_global_pos": [ - "option", - "string" - ], - "painting_variant": "varint", - "sniffer_state": "varint", - "vector3": "vec3f", - "quaternion": "vec4f" + } + ] } - } + ] ], "entityMetadata": [ "entityMetadataLoop", { "endVal": 255, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "0": "byte", - "1": "int", - "2": "long", - "3": "float", - "4": "string", - "5": "component", - "6": "optional_component", - "7": "item_stack", - "8": "boolean", - "9": "rotations", - "10": "block_pos", - "11": "optional_block_pos", - "12": "direction", - "13": "optional_uuid", - "14": "block_state", - "15": "optional_block_state", - "16": "compound_tag", - "17": "particle", - "18": "villager_data", - "19": "optional_unsigned_int", - "20": "pose", - "21": "cat_variant", - "22": "frog_variant", - "23": "optional_global_pos", - "24": "painting_variant", - "25": "sniffer_state", - "26": "vector3", - "27": "quaternion" - } - } - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] + "type": "entityMetadataEntry" } ], "minecraft_simple_recipe_format": [ diff --git a/data/pc/1.19/proto.yml b/data/pc/1.19/proto.yml index 01a11e392..4473bbba7 100644 --- a/data/pc/1.19/proto.yml +++ b/data/pc/1.19/proto.yml @@ -110,77 +110,55 @@ } ] ] - entityMetadataItem: $compareTo ? - if 0: i8 - if 1: varint - if 2: f32 - if 3: string - if 4: string - if 5: [ - "option", - "string" - ] - if 6: slot - if 7: bool - if 8: - pitch: f32 - yaw: f32 - roll: f32 - if 9: position - if 10: [ - "option", - "position" - ] - if 11: varint - if 12: [ - "option", - "UUID" - ] - if 13: varint - if 14: nbt - if 15: particle - if 16: - villagerType: varint - villagerProfession: varint - level: varint - if 17: optvarint - if 18: varint - entityMetadata: [ - "entityMetadataLoop", - { - "endVal": 255, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": "varint" - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] - } - ] + entityMetadataEntry: + key: u8 + type: varint => + - byte + - int + - float + - string + - component + - optional_component + - item_stack + - boolean + - rotations + - block_pos + - optional_block_pos + - direction + - optional_uuid + - block_state + - compound_tag + - particle + - villager_data + - optional_unsigned_int + - pose + value: type ? + if byte: i8 + if int: varint + if float: f32 + if string: string + if component: string + if optional_component: ["option", "string"] + if item_stack: slot + if boolean: bool + if rotations: + pitch: f32 + yaw: f32 + roll: f32 + if block_pos: position + if optional_block_pos: ["option", "position"] + if direction: varint + if optional_uuid: ["option", "UUID"] + if block_state: varint + if compound_tag: nbt + if particle: particle + if villager_data: + villagerType: varint + villagerProfession: varint + level: varint + if optional_unsigned_int: optvarint + if pose: varint + entityMetadata: ["entityMetadataLoop", { "endVal": 255, "type": "entityMetadataEntry" }] minecraft_smelting_format: group: string ingredient: ingredient diff --git a/data/pc/1.19/protocol.json b/data/pc/1.19/protocol.json index caa52038f..5b4c8c515 100644 --- a/data/pc/1.19/protocol.json +++ b/data/pc/1.19/protocol.json @@ -285,108 +285,121 @@ } ] ], - "entityMetadataItem": [ - "switch", - { - "compareTo": "$compareTo", - "fields": { - "0": "i8", - "1": "varint", - "2": "f32", - "3": "string", - "4": "string", - "5": [ - "option", - "string" - ], - "6": "slot", - "7": "bool", - "8": [ - "container", - [ - { - "name": "pitch", - "type": "f32" - }, - { - "name": "yaw", - "type": "f32" - }, - { - "name": "roll", - "type": "f32" + "entityMetadataEntry": [ + "container", + [ + { + "name": "key", + "type": "u8" + }, + { + "name": "type", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "byte", + "1": "int", + "2": "float", + "3": "string", + "4": "component", + "5": "optional_component", + "6": "item_stack", + "7": "boolean", + "8": "rotations", + "9": "block_pos", + "10": "optional_block_pos", + "11": "direction", + "12": "optional_uuid", + "13": "block_state", + "14": "compound_tag", + "15": "particle", + "16": "villager_data", + "17": "optional_unsigned_int", + "18": "pose" } - ] - ], - "9": "position", - "10": [ - "option", - "position" - ], - "11": "varint", - "12": [ - "option", - "UUID" - ], - "13": "varint", - "14": "nbt", - "15": "particle", - "16": [ - "container", - [ - { - "name": "villagerType", - "type": "varint" - }, - { - "name": "villagerProfession", - "type": "varint" - }, - { - "name": "level", - "type": "varint" + } + ] + }, + { + "name": "value", + "type": [ + "switch", + { + "compareTo": "type", + "fields": { + "byte": "i8", + "int": "varint", + "float": "f32", + "string": "string", + "component": "string", + "optional_component": [ + "option", + "string" + ], + "item_stack": "slot", + "boolean": "bool", + "rotations": [ + "container", + [ + { + "name": "pitch", + "type": "f32" + }, + { + "name": "yaw", + "type": "f32" + }, + { + "name": "roll", + "type": "f32" + } + ] + ], + "block_pos": "position", + "optional_block_pos": [ + "option", + "position" + ], + "direction": "varint", + "optional_uuid": [ + "option", + "UUID" + ], + "block_state": "varint", + "compound_tag": "nbt", + "particle": "particle", + "villager_data": [ + "container", + [ + { + "name": "villagerType", + "type": "varint" + }, + { + "name": "villagerProfession", + "type": "varint" + }, + { + "name": "level", + "type": "varint" + } + ] + ], + "optional_unsigned_int": "optvarint", + "pose": "varint" } - ] - ], - "17": "optvarint", - "18": "varint" + } + ] } - } + ] ], "entityMetadata": [ "entityMetadataLoop", { "endVal": 255, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": "varint" - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] + "type": "entityMetadataEntry" } ], "minecraft_smelting_format": [ diff --git a/data/pc/1.20.2/proto.yml b/data/pc/1.20.2/proto.yml index b6a9178e6..ddf45024b 100644 --- a/data/pc/1.20.2/proto.yml +++ b/data/pc/1.20.2/proto.yml @@ -148,116 +148,73 @@ } ] default: void - entityMetadataItem: $compareTo ? - if byte: i8 - if int: varint - if long: varlong - if float: f32 - if string: string - if component: string - if optional_component: [ - "option", - "string" - ] - if item_stack: slot - if boolean: bool - if rotations: - pitch: f32 - yaw: f32 - roll: f32 - if block_pos: position - if optional_block_pos: [ - "option", - "position" - ] - if direction: varint - if optional_uuid: [ - "option", - "UUID" - ] - if block_state: varint - if optional_block_state: optvarint - if compound_tag: anonymousNbt - if particle: particle - if villager_data: - villagerType: varint - villagerProfession: varint - level: varint - if optional_unsigned_int: optvarint - if pose: varint - if cat_variant: varint - if frog_variant: varint - if optional_global_pos: [ - "option", - "string" - ] - if painting_variant: varint - if sniffer_state: varint - if vector3: vec3f - if quaternion: vec4f - entityMetadata: [ - "entityMetadataLoop", - { - "endVal": 255, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "0": "byte", - "1": "int", - "2": "long", - "3": "float", - "4": "string", - "5": "component", - "6": "optional_component", - "7": "item_stack", - "8": "boolean", - "9": "rotations", - "10": "block_pos", - "11": "optional_block_pos", - "12": "direction", - "13": "optional_uuid", - "14": "block_state", - "15": "optional_block_state", - "16": "compound_tag", - "17": "particle", - "18": "villager_data", - "19": "optional_unsigned_int", - "20": "pose", - "21": "cat_variant", - "22": "frog_variant", - "23": "optional_global_pos", - "24": "painting_variant", - "25": "sniffer_state", - "26": "vector3", - "27": "quaternion" - } - } - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] - } - ] + entityMetadataEntry: + key: u8 + type: varint => + - byte + - int + - long + - float + - string + - component + - optional_component + - item_stack + - boolean + - rotations + - block_pos + - optional_block_pos + - direction + - optional_uuid + - block_state + - optional_block_state + - compound_tag + - particle + - villager_data + - optional_unsigned_int + - pose + - cat_variant + - frog_variant + - optional_global_pos + - painting_variant + - sniffer_state + - vector3 + - quaternion + value: type ? + if byte: i8 + if int: varint + if long: varlong + if float: f32 + if string: string + if component: string + if optional_component: ["option", "string"] + if item_stack: slot + if boolean: bool + if rotations: + pitch: f32 + yaw: f32 + roll: f32 + if block_pos: position + if optional_block_pos: ["option", "position"] + if direction: varint + if optional_uuid: ["option", "UUID"] + if block_state: varint + if optional_block_state: optvarint + if compound_tag: anonymousNbt + if particle: particle + if villager_data: + villagerType: varint + villagerProfession: varint + level: varint + if optional_unsigned_int: optvarint + if pose: varint + if cat_variant: varint + if frog_variant: varint + if optional_global_pos: ["option", "string"] + if painting_variant: varint + if sniffer_state: varint + if vector3: vec3f + if quaternion: vec4f + entityMetadata: ["entityMetadataLoop", { "endVal": 255, "type": "entityMetadataEntry" }] minecraft_simple_recipe_format: category: varint minecraft_smelting_format: diff --git a/data/pc/1.20.2/protocol.json b/data/pc/1.20.2/protocol.json index dcdb1a049..a04c821bb 100644 --- a/data/pc/1.20.2/protocol.json +++ b/data/pc/1.20.2/protocol.json @@ -405,147 +405,142 @@ ] } ], - "entityMetadataItem": [ - "switch", - { - "compareTo": "$compareTo", - "fields": { - "byte": "i8", - "int": "varint", - "long": "varlong", - "float": "f32", - "string": "string", - "component": "string", - "optional_component": [ - "option", - "string" - ], - "item_stack": "slot", - "boolean": "bool", - "rotations": [ - "container", - [ - { - "name": "pitch", - "type": "f32" - }, - { - "name": "yaw", - "type": "f32" - }, - { - "name": "roll", - "type": "f32" + "entityMetadataEntry": [ + "container", + [ + { + "name": "key", + "type": "u8" + }, + { + "name": "type", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "byte", + "1": "int", + "2": "long", + "3": "float", + "4": "string", + "5": "component", + "6": "optional_component", + "7": "item_stack", + "8": "boolean", + "9": "rotations", + "10": "block_pos", + "11": "optional_block_pos", + "12": "direction", + "13": "optional_uuid", + "14": "block_state", + "15": "optional_block_state", + "16": "compound_tag", + "17": "particle", + "18": "villager_data", + "19": "optional_unsigned_int", + "20": "pose", + "21": "cat_variant", + "22": "frog_variant", + "23": "optional_global_pos", + "24": "painting_variant", + "25": "sniffer_state", + "26": "vector3", + "27": "quaternion" } - ] - ], - "block_pos": "position", - "optional_block_pos": [ - "option", - "position" - ], - "direction": "varint", - "optional_uuid": [ - "option", - "UUID" - ], - "block_state": "varint", - "optional_block_state": "optvarint", - "compound_tag": "anonymousNbt", - "particle": "particle", - "villager_data": [ - "container", - [ - { - "name": "villagerType", - "type": "varint" - }, - { - "name": "villagerProfession", - "type": "varint" - }, - { - "name": "level", - "type": "varint" + } + ] + }, + { + "name": "value", + "type": [ + "switch", + { + "compareTo": "type", + "fields": { + "byte": "i8", + "int": "varint", + "long": "varlong", + "float": "f32", + "string": "string", + "component": "string", + "optional_component": [ + "option", + "string" + ], + "item_stack": "slot", + "boolean": "bool", + "rotations": [ + "container", + [ + { + "name": "pitch", + "type": "f32" + }, + { + "name": "yaw", + "type": "f32" + }, + { + "name": "roll", + "type": "f32" + } + ] + ], + "block_pos": "position", + "optional_block_pos": [ + "option", + "position" + ], + "direction": "varint", + "optional_uuid": [ + "option", + "UUID" + ], + "block_state": "varint", + "optional_block_state": "optvarint", + "compound_tag": "anonymousNbt", + "particle": "particle", + "villager_data": [ + "container", + [ + { + "name": "villagerType", + "type": "varint" + }, + { + "name": "villagerProfession", + "type": "varint" + }, + { + "name": "level", + "type": "varint" + } + ] + ], + "optional_unsigned_int": "optvarint", + "pose": "varint", + "cat_variant": "varint", + "frog_variant": "varint", + "optional_global_pos": [ + "option", + "string" + ], + "painting_variant": "varint", + "sniffer_state": "varint", + "vector3": "vec3f", + "quaternion": "vec4f" } - ] - ], - "optional_unsigned_int": "optvarint", - "pose": "varint", - "cat_variant": "varint", - "frog_variant": "varint", - "optional_global_pos": [ - "option", - "string" - ], - "painting_variant": "varint", - "sniffer_state": "varint", - "vector3": "vec3f", - "quaternion": "vec4f" + } + ] } - } + ] ], "entityMetadata": [ "entityMetadataLoop", { "endVal": 255, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "0": "byte", - "1": "int", - "2": "long", - "3": "float", - "4": "string", - "5": "component", - "6": "optional_component", - "7": "item_stack", - "8": "boolean", - "9": "rotations", - "10": "block_pos", - "11": "optional_block_pos", - "12": "direction", - "13": "optional_uuid", - "14": "block_state", - "15": "optional_block_state", - "16": "compound_tag", - "17": "particle", - "18": "villager_data", - "19": "optional_unsigned_int", - "20": "pose", - "21": "cat_variant", - "22": "frog_variant", - "23": "optional_global_pos", - "24": "painting_variant", - "25": "sniffer_state", - "26": "vector3", - "27": "quaternion" - } - } - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] + "type": "entityMetadataEntry" } ], "minecraft_simple_recipe_format": [ diff --git a/data/pc/1.20.3/proto.yml b/data/pc/1.20.3/proto.yml index 2bc102013..fc8317f90 100644 --- a/data/pc/1.20.3/proto.yml +++ b/data/pc/1.20.3/proto.yml @@ -149,116 +149,73 @@ } ] default: void - entityMetadataItem: $compareTo ? - if byte: i8 - if int: varint - if long: varlong - if float: f32 - if string: string - if component: anonymousNbt - if optional_component: [ - "option", - "anonymousNbt" - ] - if item_stack: slot - if boolean: bool - if rotations: - pitch: f32 - yaw: f32 - roll: f32 - if block_pos: position - if optional_block_pos: [ - "option", - "position" - ] - if direction: varint - if optional_uuid: [ - "option", - "UUID" - ] - if block_state: varint - if optional_block_state: optvarint - if compound_tag: anonymousNbt - if particle: particle - if villager_data: - villagerType: varint - villagerProfession: varint - level: varint - if optional_unsigned_int: optvarint - if pose: varint - if cat_variant: varint - if frog_variant: varint - if optional_global_pos: [ - "option", - "string" - ] - if painting_variant: varint - if sniffer_state: varint - if vector3: vec3f - if quaternion: vec4f - entityMetadata: [ - "entityMetadataLoop", - { - "endVal": 255, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "0": "byte", - "1": "int", - "2": "long", - "3": "float", - "4": "string", - "5": "component", - "6": "optional_component", - "7": "item_stack", - "8": "boolean", - "9": "rotations", - "10": "block_pos", - "11": "optional_block_pos", - "12": "direction", - "13": "optional_uuid", - "14": "block_state", - "15": "optional_block_state", - "16": "compound_tag", - "17": "particle", - "18": "villager_data", - "19": "optional_unsigned_int", - "20": "pose", - "21": "cat_variant", - "22": "frog_variant", - "23": "optional_global_pos", - "24": "painting_variant", - "25": "sniffer_state", - "26": "vector3", - "27": "quaternion" - } - } - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] - } - ] + entityMetadataEntry: + key: u8 + type: varint => + - byte + - int + - long + - float + - string + - component + - optional_component + - item_stack + - boolean + - rotations + - block_pos + - optional_block_pos + - direction + - optional_uuid + - block_state + - optional_block_state + - compound_tag + - particle + - villager_data + - optional_unsigned_int + - pose + - cat_variant + - frog_variant + - optional_global_pos + - painting_variant + - sniffer_state + - vector3 + - quaternion + value: type ? + if byte: i8 + if int: varint + if long: varlong + if float: f32 + if string: string + if component: anonymousNbt + if optional_component: ["option", "anonymousNbt"] + if item_stack: slot + if boolean: bool + if rotations: + pitch: f32 + yaw: f32 + roll: f32 + if block_pos: position + if optional_block_pos: ["option", "position"] + if direction: varint + if optional_uuid: ["option", "UUID"] + if block_state: varint + if optional_block_state: optvarint + if compound_tag: anonymousNbt + if particle: particle + if villager_data: + villagerType: varint + villagerProfession: varint + level: varint + if optional_unsigned_int: optvarint + if pose: varint + if cat_variant: varint + if frog_variant: varint + if optional_global_pos: ["option", "string"] + if painting_variant: varint + if sniffer_state: varint + if vector3: vec3f + if quaternion: vec4f + entityMetadata: ["entityMetadataLoop", { "endVal": 255, "type": "entityMetadataEntry" }] minecraft_simple_recipe_format: category: varint minecraft_smelting_format: diff --git a/data/pc/1.20.3/protocol.json b/data/pc/1.20.3/protocol.json index b3310b22c..4a8292e4e 100644 --- a/data/pc/1.20.3/protocol.json +++ b/data/pc/1.20.3/protocol.json @@ -405,147 +405,142 @@ ] } ], - "entityMetadataItem": [ - "switch", - { - "compareTo": "$compareTo", - "fields": { - "byte": "i8", - "int": "varint", - "long": "varlong", - "float": "f32", - "string": "string", - "component": "anonymousNbt", - "optional_component": [ - "option", - "anonymousNbt" - ], - "item_stack": "slot", - "boolean": "bool", - "rotations": [ - "container", - [ - { - "name": "pitch", - "type": "f32" - }, - { - "name": "yaw", - "type": "f32" - }, - { - "name": "roll", - "type": "f32" + "entityMetadataEntry": [ + "container", + [ + { + "name": "key", + "type": "u8" + }, + { + "name": "type", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "byte", + "1": "int", + "2": "long", + "3": "float", + "4": "string", + "5": "component", + "6": "optional_component", + "7": "item_stack", + "8": "boolean", + "9": "rotations", + "10": "block_pos", + "11": "optional_block_pos", + "12": "direction", + "13": "optional_uuid", + "14": "block_state", + "15": "optional_block_state", + "16": "compound_tag", + "17": "particle", + "18": "villager_data", + "19": "optional_unsigned_int", + "20": "pose", + "21": "cat_variant", + "22": "frog_variant", + "23": "optional_global_pos", + "24": "painting_variant", + "25": "sniffer_state", + "26": "vector3", + "27": "quaternion" } - ] - ], - "block_pos": "position", - "optional_block_pos": [ - "option", - "position" - ], - "direction": "varint", - "optional_uuid": [ - "option", - "UUID" - ], - "block_state": "varint", - "optional_block_state": "optvarint", - "compound_tag": "anonymousNbt", - "particle": "particle", - "villager_data": [ - "container", - [ - { - "name": "villagerType", - "type": "varint" - }, - { - "name": "villagerProfession", - "type": "varint" - }, - { - "name": "level", - "type": "varint" + } + ] + }, + { + "name": "value", + "type": [ + "switch", + { + "compareTo": "type", + "fields": { + "byte": "i8", + "int": "varint", + "long": "varlong", + "float": "f32", + "string": "string", + "component": "anonymousNbt", + "optional_component": [ + "option", + "anonymousNbt" + ], + "item_stack": "slot", + "boolean": "bool", + "rotations": [ + "container", + [ + { + "name": "pitch", + "type": "f32" + }, + { + "name": "yaw", + "type": "f32" + }, + { + "name": "roll", + "type": "f32" + } + ] + ], + "block_pos": "position", + "optional_block_pos": [ + "option", + "position" + ], + "direction": "varint", + "optional_uuid": [ + "option", + "UUID" + ], + "block_state": "varint", + "optional_block_state": "optvarint", + "compound_tag": "anonymousNbt", + "particle": "particle", + "villager_data": [ + "container", + [ + { + "name": "villagerType", + "type": "varint" + }, + { + "name": "villagerProfession", + "type": "varint" + }, + { + "name": "level", + "type": "varint" + } + ] + ], + "optional_unsigned_int": "optvarint", + "pose": "varint", + "cat_variant": "varint", + "frog_variant": "varint", + "optional_global_pos": [ + "option", + "string" + ], + "painting_variant": "varint", + "sniffer_state": "varint", + "vector3": "vec3f", + "quaternion": "vec4f" } - ] - ], - "optional_unsigned_int": "optvarint", - "pose": "varint", - "cat_variant": "varint", - "frog_variant": "varint", - "optional_global_pos": [ - "option", - "string" - ], - "painting_variant": "varint", - "sniffer_state": "varint", - "vector3": "vec3f", - "quaternion": "vec4f" + } + ] } - } + ] ], "entityMetadata": [ "entityMetadataLoop", { "endVal": 255, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "0": "byte", - "1": "int", - "2": "long", - "3": "float", - "4": "string", - "5": "component", - "6": "optional_component", - "7": "item_stack", - "8": "boolean", - "9": "rotations", - "10": "block_pos", - "11": "optional_block_pos", - "12": "direction", - "13": "optional_uuid", - "14": "block_state", - "15": "optional_block_state", - "16": "compound_tag", - "17": "particle", - "18": "villager_data", - "19": "optional_unsigned_int", - "20": "pose", - "21": "cat_variant", - "22": "frog_variant", - "23": "optional_global_pos", - "24": "painting_variant", - "25": "sniffer_state", - "26": "vector3", - "27": "quaternion" - } - } - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] + "type": "entityMetadataEntry" } ], "minecraft_simple_recipe_format": [ diff --git a/data/pc/1.20/proto.yml b/data/pc/1.20/proto.yml index 3f83117d1..f061a66a5 100644 --- a/data/pc/1.20/proto.yml +++ b/data/pc/1.20/proto.yml @@ -148,116 +148,73 @@ } ] default: void - entityMetadataItem: $compareTo ? - if byte: i8 - if int: varint - if long: varlong - if float: f32 - if string: string - if component: string - if optional_component: [ - "option", - "string" - ] - if item_stack: slot - if boolean: bool - if rotations: - pitch: f32 - yaw: f32 - roll: f32 - if block_pos: position - if optional_block_pos: [ - "option", - "position" - ] - if direction: varint - if optional_uuid: [ - "option", - "UUID" - ] - if block_state: varint - if optional_block_state: optvarint - if compound_tag: nbt - if particle: particle - if villager_data: - villagerType: varint - villagerProfession: varint - level: varint - if optional_unsigned_int: optvarint - if pose: varint - if cat_variant: varint - if frog_variant: varint - if optional_global_pos: [ - "option", - "string" - ] - if painting_variant: varint - if sniffer_state: varint - if vector3: vec3f - if quaternion: vec4f - entityMetadata: [ - "entityMetadataLoop", - { - "endVal": 255, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "0": "byte", - "1": "int", - "2": "long", - "3": "float", - "4": "string", - "5": "component", - "6": "optional_component", - "7": "item_stack", - "8": "boolean", - "9": "rotations", - "10": "block_pos", - "11": "optional_block_pos", - "12": "direction", - "13": "optional_uuid", - "14": "block_state", - "15": "optional_block_state", - "16": "compound_tag", - "17": "particle", - "18": "villager_data", - "19": "optional_unsigned_int", - "20": "pose", - "21": "cat_variant", - "22": "frog_variant", - "23": "optional_global_pos", - "24": "painting_variant", - "25": "sniffer_state", - "26": "vector3", - "27": "quaternion" - } - } - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] - } - ] + entityMetadataEntry: + key: u8 + type: varint => + - byte + - int + - long + - float + - string + - component + - optional_component + - item_stack + - boolean + - rotations + - block_pos + - optional_block_pos + - direction + - optional_uuid + - block_state + - optional_block_state + - compound_tag + - particle + - villager_data + - optional_unsigned_int + - pose + - cat_variant + - frog_variant + - optional_global_pos + - painting_variant + - sniffer_state + - vector3 + - quaternion + value: type ? + if byte: i8 + if int: varint + if long: varlong + if float: f32 + if string: string + if component: string + if optional_component: ["option", "string"] + if item_stack: slot + if boolean: bool + if rotations: + pitch: f32 + yaw: f32 + roll: f32 + if block_pos: position + if optional_block_pos: ["option", "position"] + if direction: varint + if optional_uuid: ["option", "UUID"] + if block_state: varint + if optional_block_state: optvarint + if compound_tag: nbt + if particle: particle + if villager_data: + villagerType: varint + villagerProfession: varint + level: varint + if optional_unsigned_int: optvarint + if pose: varint + if cat_variant: varint + if frog_variant: varint + if optional_global_pos: ["option", "string"] + if painting_variant: varint + if sniffer_state: varint + if vector3: vec3f + if quaternion: vec4f + entityMetadata: ["entityMetadataLoop", { "endVal": 255, "type": "entityMetadataEntry" }] minecraft_simple_recipe_format: category: varint minecraft_smelting_format: diff --git a/data/pc/1.20/protocol.json b/data/pc/1.20/protocol.json index 044c84b28..d471f645d 100644 --- a/data/pc/1.20/protocol.json +++ b/data/pc/1.20/protocol.json @@ -405,147 +405,142 @@ ] } ], - "entityMetadataItem": [ - "switch", - { - "compareTo": "$compareTo", - "fields": { - "byte": "i8", - "int": "varint", - "long": "varlong", - "float": "f32", - "string": "string", - "component": "string", - "optional_component": [ - "option", - "string" - ], - "item_stack": "slot", - "boolean": "bool", - "rotations": [ - "container", - [ - { - "name": "pitch", - "type": "f32" - }, - { - "name": "yaw", - "type": "f32" - }, - { - "name": "roll", - "type": "f32" + "entityMetadataEntry": [ + "container", + [ + { + "name": "key", + "type": "u8" + }, + { + "name": "type", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "byte", + "1": "int", + "2": "long", + "3": "float", + "4": "string", + "5": "component", + "6": "optional_component", + "7": "item_stack", + "8": "boolean", + "9": "rotations", + "10": "block_pos", + "11": "optional_block_pos", + "12": "direction", + "13": "optional_uuid", + "14": "block_state", + "15": "optional_block_state", + "16": "compound_tag", + "17": "particle", + "18": "villager_data", + "19": "optional_unsigned_int", + "20": "pose", + "21": "cat_variant", + "22": "frog_variant", + "23": "optional_global_pos", + "24": "painting_variant", + "25": "sniffer_state", + "26": "vector3", + "27": "quaternion" } - ] - ], - "block_pos": "position", - "optional_block_pos": [ - "option", - "position" - ], - "direction": "varint", - "optional_uuid": [ - "option", - "UUID" - ], - "block_state": "varint", - "optional_block_state": "optvarint", - "compound_tag": "nbt", - "particle": "particle", - "villager_data": [ - "container", - [ - { - "name": "villagerType", - "type": "varint" - }, - { - "name": "villagerProfession", - "type": "varint" - }, - { - "name": "level", - "type": "varint" + } + ] + }, + { + "name": "value", + "type": [ + "switch", + { + "compareTo": "type", + "fields": { + "byte": "i8", + "int": "varint", + "long": "varlong", + "float": "f32", + "string": "string", + "component": "string", + "optional_component": [ + "option", + "string" + ], + "item_stack": "slot", + "boolean": "bool", + "rotations": [ + "container", + [ + { + "name": "pitch", + "type": "f32" + }, + { + "name": "yaw", + "type": "f32" + }, + { + "name": "roll", + "type": "f32" + } + ] + ], + "block_pos": "position", + "optional_block_pos": [ + "option", + "position" + ], + "direction": "varint", + "optional_uuid": [ + "option", + "UUID" + ], + "block_state": "varint", + "optional_block_state": "optvarint", + "compound_tag": "nbt", + "particle": "particle", + "villager_data": [ + "container", + [ + { + "name": "villagerType", + "type": "varint" + }, + { + "name": "villagerProfession", + "type": "varint" + }, + { + "name": "level", + "type": "varint" + } + ] + ], + "optional_unsigned_int": "optvarint", + "pose": "varint", + "cat_variant": "varint", + "frog_variant": "varint", + "optional_global_pos": [ + "option", + "string" + ], + "painting_variant": "varint", + "sniffer_state": "varint", + "vector3": "vec3f", + "quaternion": "vec4f" } - ] - ], - "optional_unsigned_int": "optvarint", - "pose": "varint", - "cat_variant": "varint", - "frog_variant": "varint", - "optional_global_pos": [ - "option", - "string" - ], - "painting_variant": "varint", - "sniffer_state": "varint", - "vector3": "vec3f", - "quaternion": "vec4f" + } + ] } - } + ] ], "entityMetadata": [ "entityMetadataLoop", { "endVal": 255, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "0": "byte", - "1": "int", - "2": "long", - "3": "float", - "4": "string", - "5": "component", - "6": "optional_component", - "7": "item_stack", - "8": "boolean", - "9": "rotations", - "10": "block_pos", - "11": "optional_block_pos", - "12": "direction", - "13": "optional_uuid", - "14": "block_state", - "15": "optional_block_state", - "16": "compound_tag", - "17": "particle", - "18": "villager_data", - "19": "optional_unsigned_int", - "20": "pose", - "21": "cat_variant", - "22": "frog_variant", - "23": "optional_global_pos", - "24": "painting_variant", - "25": "sniffer_state", - "26": "vector3", - "27": "quaternion" - } - } - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] + "type": "entityMetadataEntry" } ], "minecraft_simple_recipe_format": [ diff --git a/data/pc/1.7/proto.yml b/data/pc/1.7/proto.yml index bfdea925c..059a908c4 100644 --- a/data/pc/1.7/proto.yml +++ b/data/pc/1.7/proto.yml @@ -50,59 +50,33 @@ x: i32 y: u8 z: i32 - entityMetadataItem: $compareTo ? - if 0: i8 - if 1: i16 - if 2: i32 - if 3: f32 - if 4: string - if 5: slot - if 6: - x: i32 - y: i32 - z: i32 - if 7: - pitch: f32 - yaw: f32 - roll: f32 - entityMetadata: [ - "entityMetadataLoop", - { - "endVal": 127, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "bitfield", - [ - { - "name": "type", - "size": 3, - "signed": false - }, - { - "name": "key", - "size": 5, - "signed": false - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] - } - ] + entityMetadataEntry: + key: u8 + type: varint => + - byte + - short + - int + - float + - string + - item_stack + - position + - rotations + value: type ? + if byte: i8 + if short: i16 + if int: i32 + if float: f32 + if string: string + if item_stack: slot + if position: + x: i32 + y: i32 + z: i32 + if rotations: + pitch: f32 + yaw: f32 + roll: f32 + entityMetadata: ["entityMetadataLoop", { "endVal": 127, "type": "entityMetadataEntry" }] ^handshaking.toClient.types: packet: diff --git a/data/pc/1.7/protocol.json b/data/pc/1.7/protocol.json index 925b4616c..4abf4084d 100644 --- a/data/pc/1.7/protocol.json +++ b/data/pc/1.7/protocol.json @@ -118,90 +118,90 @@ } ] ], - "entityMetadataItem": [ - "switch", - { - "compareTo": "$compareTo", - "fields": { - "0": "i8", - "1": "i16", - "2": "i32", - "3": "f32", - "4": "string", - "5": "slot", - "6": [ - "container", - [ - { - "name": "x", - "type": "i32" - }, - { - "name": "y", - "type": "i32" - }, - { - "name": "z", - "type": "i32" + "entityMetadataEntry": [ + "container", + [ + { + "name": "key", + "type": "u8" + }, + { + "name": "type", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "byte", + "1": "short", + "2": "int", + "3": "float", + "4": "string", + "5": "item_stack", + "6": "position", + "7": "rotations" } - ] - ], - "7": [ - "container", - [ - { - "name": "pitch", - "type": "f32" - }, - { - "name": "yaw", - "type": "f32" - }, - { - "name": "roll", - "type": "f32" + } + ] + }, + { + "name": "value", + "type": [ + "switch", + { + "compareTo": "type", + "fields": { + "byte": "i8", + "short": "i16", + "int": "i32", + "float": "f32", + "string": "string", + "item_stack": "slot", + "position": [ + "container", + [ + { + "name": "x", + "type": "i32" + }, + { + "name": "y", + "type": "i32" + }, + { + "name": "z", + "type": "i32" + } + ] + ], + "rotations": [ + "container", + [ + { + "name": "pitch", + "type": "f32" + }, + { + "name": "yaw", + "type": "f32" + }, + { + "name": "roll", + "type": "f32" + } + ] + ] } - ] + } ] } - } + ] ], "entityMetadata": [ "entityMetadataLoop", { "endVal": 127, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "bitfield", - [ - { - "name": "type", - "size": 3, - "signed": false - }, - { - "name": "key", - "size": 5, - "signed": false - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] + "type": "entityMetadataEntry" } ] }, diff --git a/data/pc/1.8/proto.yml b/data/pc/1.8/proto.yml index 384ad4b74..a14348d18 100644 --- a/data/pc/1.8/proto.yml +++ b/data/pc/1.8/proto.yml @@ -59,59 +59,33 @@ } ] ] - entityMetadataItem: $compareTo ? - if 0: i8 - if 1: i16 - if 2: i32 - if 3: f32 - if 4: string - if 5: slot - if 6: - x: i32 - y: i32 - z: i32 - if 7: - pitch: f32 - yaw: f32 - roll: f32 - entityMetadata: [ - "entityMetadataLoop", - { - "endVal": 127, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "bitfield", - [ - { - "name": "type", - "size": 3, - "signed": false - }, - { - "name": "key", - "size": 5, - "signed": false - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] - } - ] + entityMetadataEntry: + key: u8 + type: varint => + - byte + - short + - int + - float + - string + - item_stack + - position + - rotations + value: type ? + if byte: i8 + if short: i16 + if int: i32 + if float: f32 + if string: string + if item_stack: slot + if position: + x: i32 + y: i32 + z: i32 + if rotations: + pitch: f32 + yaw: f32 + roll: f32 + entityMetadata: ["entityMetadataLoop", { "endVal": 127, "type": "entityMetadataEntry" }] ^handshaking.toClient.types: packet: diff --git a/data/pc/1.8/protocol.json b/data/pc/1.8/protocol.json index 733701a1a..84fbdd34d 100644 --- a/data/pc/1.8/protocol.json +++ b/data/pc/1.8/protocol.json @@ -88,90 +88,90 @@ } ] ], - "entityMetadataItem": [ - "switch", - { - "compareTo": "$compareTo", - "fields": { - "0": "i8", - "1": "i16", - "2": "i32", - "3": "f32", - "4": "string", - "5": "slot", - "6": [ - "container", - [ - { - "name": "x", - "type": "i32" - }, - { - "name": "y", - "type": "i32" - }, - { - "name": "z", - "type": "i32" + "entityMetadataEntry": [ + "container", + [ + { + "name": "key", + "type": "u8" + }, + { + "name": "type", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "byte", + "1": "short", + "2": "int", + "3": "float", + "4": "string", + "5": "item_stack", + "6": "position", + "7": "rotations" } - ] - ], - "7": [ - "container", - [ - { - "name": "pitch", - "type": "f32" - }, - { - "name": "yaw", - "type": "f32" - }, - { - "name": "roll", - "type": "f32" + } + ] + }, + { + "name": "value", + "type": [ + "switch", + { + "compareTo": "type", + "fields": { + "byte": "i8", + "short": "i16", + "int": "i32", + "float": "f32", + "string": "string", + "item_stack": "slot", + "position": [ + "container", + [ + { + "name": "x", + "type": "i32" + }, + { + "name": "y", + "type": "i32" + }, + { + "name": "z", + "type": "i32" + } + ] + ], + "rotations": [ + "container", + [ + { + "name": "pitch", + "type": "f32" + }, + { + "name": "yaw", + "type": "f32" + }, + { + "name": "roll", + "type": "f32" + } + ] + ] } - ] + } ] } - } + ] ], "entityMetadata": [ "entityMetadataLoop", { "endVal": 127, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "bitfield", - [ - { - "name": "type", - "size": 3, - "signed": false - }, - { - "name": "key", - "size": 5, - "signed": false - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] + "type": "entityMetadataEntry" } ] }, diff --git a/data/pc/1.9.1-pre2/proto.yml b/data/pc/1.9.1-pre2/proto.yml index 37c4caa5c..2dc4fa80b 100644 --- a/data/pc/1.9.1-pre2/proto.yml +++ b/data/pc/1.9.1-pre2/proto.yml @@ -59,65 +59,40 @@ } ] ] - entityMetadataItem: $compareTo ? - if 0: i8 - if 1: varint - if 2: f32 - if 3: string - if 4: string - if 5: slot - if 6: bool - if 7: - pitch: f32 - yaw: f32 - roll: f32 - if 8: position - if 9: [ - "option", - "position" - ] - if 10: varint - if 11: [ - "option", - "UUID" - ] - if 12: varint - entityMetadata: [ - "entityMetadataLoop", - { - "endVal": 255, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": "i8" - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] - } - ] + entityMetadataEntry: + key: u8 + type: varint => + - byte + - int + - float + - string + - component + - item_stack + - boolean + - rotations + - block_pos + - optional_block_pos + - direction + - optional_uuid + - block_state + value: type ? + if byte: i8 + if int: varint + if float: f32 + if string: string + if component: string + if item_stack: slot + if boolean: bool + if rotations: + pitch: f32 + yaw: f32 + roll: f32 + if block_pos: position + if optional_block_pos: ["option", "position"] + if direction: varint + if optional_uuid: ["option", "UUID"] + if block_state: varint + entityMetadata: ["entityMetadataLoop", { "endVal": 255, "type": "entityMetadataEntry" }] ^handshaking.toClient.types: packet: diff --git a/data/pc/1.9.1-pre2/protocol.json b/data/pc/1.9.1-pre2/protocol.json index ed9618932..8eaea8730 100644 --- a/data/pc/1.9.1-pre2/protocol.json +++ b/data/pc/1.9.1-pre2/protocol.json @@ -88,83 +88,90 @@ } ] ], - "entityMetadataItem": [ - "switch", - { - "compareTo": "$compareTo", - "fields": { - "0": "i8", - "1": "varint", - "2": "f32", - "3": "string", - "4": "string", - "5": "slot", - "6": "bool", - "7": [ - "container", - [ - { - "name": "pitch", - "type": "f32" - }, - { - "name": "yaw", - "type": "f32" - }, - { - "name": "roll", - "type": "f32" + "entityMetadataEntry": [ + "container", + [ + { + "name": "key", + "type": "u8" + }, + { + "name": "type", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "byte", + "1": "int", + "2": "float", + "3": "string", + "4": "component", + "5": "item_stack", + "6": "boolean", + "7": "rotations", + "8": "block_pos", + "9": "optional_block_pos", + "10": "direction", + "11": "optional_uuid", + "12": "block_state" } - ] - ], - "8": "position", - "9": [ - "option", - "position" - ], - "10": "varint", - "11": [ - "option", - "UUID" - ], - "12": "varint" + } + ] + }, + { + "name": "value", + "type": [ + "switch", + { + "compareTo": "type", + "fields": { + "byte": "i8", + "int": "varint", + "float": "f32", + "string": "string", + "component": "string", + "item_stack": "slot", + "boolean": "bool", + "rotations": [ + "container", + [ + { + "name": "pitch", + "type": "f32" + }, + { + "name": "yaw", + "type": "f32" + }, + { + "name": "roll", + "type": "f32" + } + ] + ], + "block_pos": "position", + "optional_block_pos": [ + "option", + "position" + ], + "direction": "varint", + "optional_uuid": [ + "option", + "UUID" + ], + "block_state": "varint" + } + } + ] } - } + ] ], "entityMetadata": [ "entityMetadataLoop", { "endVal": 255, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": "i8" - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] + "type": "entityMetadataEntry" } ] }, diff --git a/data/pc/1.9.2/proto.yml b/data/pc/1.9.2/proto.yml index d152ef208..3e7673ebb 100644 --- a/data/pc/1.9.2/proto.yml +++ b/data/pc/1.9.2/proto.yml @@ -59,65 +59,40 @@ } ] ] - entityMetadataItem: $compareTo ? - if 0: i8 - if 1: varint - if 2: f32 - if 3: string - if 4: string - if 5: slot - if 6: bool - if 7: - pitch: f32 - yaw: f32 - roll: f32 - if 8: position - if 9: [ - "option", - "position" - ] - if 10: varint - if 11: [ - "option", - "UUID" - ] - if 12: varint - entityMetadata: [ - "entityMetadataLoop", - { - "endVal": 255, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": "i8" - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] - } - ] + entityMetadataEntry: + key: u8 + type: varint => + - byte + - int + - float + - string + - component + - item_stack + - boolean + - rotations + - block_pos + - optional_block_pos + - direction + - optional_uuid + - block_state + value: type ? + if byte: i8 + if int: varint + if float: f32 + if string: string + if component: string + if item_stack: slot + if boolean: bool + if rotations: + pitch: f32 + yaw: f32 + roll: f32 + if block_pos: position + if optional_block_pos: ["option", "position"] + if direction: varint + if optional_uuid: ["option", "UUID"] + if block_state: varint + entityMetadata: ["entityMetadataLoop", { "endVal": 255, "type": "entityMetadataEntry" }] ^handshaking.toClient.types: packet: diff --git a/data/pc/1.9.2/protocol.json b/data/pc/1.9.2/protocol.json index ed9618932..8eaea8730 100644 --- a/data/pc/1.9.2/protocol.json +++ b/data/pc/1.9.2/protocol.json @@ -88,83 +88,90 @@ } ] ], - "entityMetadataItem": [ - "switch", - { - "compareTo": "$compareTo", - "fields": { - "0": "i8", - "1": "varint", - "2": "f32", - "3": "string", - "4": "string", - "5": "slot", - "6": "bool", - "7": [ - "container", - [ - { - "name": "pitch", - "type": "f32" - }, - { - "name": "yaw", - "type": "f32" - }, - { - "name": "roll", - "type": "f32" + "entityMetadataEntry": [ + "container", + [ + { + "name": "key", + "type": "u8" + }, + { + "name": "type", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "byte", + "1": "int", + "2": "float", + "3": "string", + "4": "component", + "5": "item_stack", + "6": "boolean", + "7": "rotations", + "8": "block_pos", + "9": "optional_block_pos", + "10": "direction", + "11": "optional_uuid", + "12": "block_state" } - ] - ], - "8": "position", - "9": [ - "option", - "position" - ], - "10": "varint", - "11": [ - "option", - "UUID" - ], - "12": "varint" + } + ] + }, + { + "name": "value", + "type": [ + "switch", + { + "compareTo": "type", + "fields": { + "byte": "i8", + "int": "varint", + "float": "f32", + "string": "string", + "component": "string", + "item_stack": "slot", + "boolean": "bool", + "rotations": [ + "container", + [ + { + "name": "pitch", + "type": "f32" + }, + { + "name": "yaw", + "type": "f32" + }, + { + "name": "roll", + "type": "f32" + } + ] + ], + "block_pos": "position", + "optional_block_pos": [ + "option", + "position" + ], + "direction": "varint", + "optional_uuid": [ + "option", + "UUID" + ], + "block_state": "varint" + } + } + ] } - } + ] ], "entityMetadata": [ "entityMetadataLoop", { "endVal": 255, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": "i8" - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] + "type": "entityMetadataEntry" } ] }, diff --git a/data/pc/1.9.4/proto.yml b/data/pc/1.9.4/proto.yml index ac07cba4e..839fa0329 100644 --- a/data/pc/1.9.4/proto.yml +++ b/data/pc/1.9.4/proto.yml @@ -59,65 +59,40 @@ } ] ] - entityMetadataItem: $compareTo ? - if 0: i8 - if 1: varint - if 2: f32 - if 3: string - if 4: string - if 5: slot - if 6: bool - if 7: - pitch: f32 - yaw: f32 - roll: f32 - if 8: position - if 9: [ - "option", - "position" - ] - if 10: varint - if 11: [ - "option", - "UUID" - ] - if 12: varint - entityMetadata: [ - "entityMetadataLoop", - { - "endVal": 255, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": "i8" - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] - } - ] + entityMetadataEntry: + key: u8 + type: varint => + - byte + - int + - float + - string + - component + - item_stack + - boolean + - rotations + - block_pos + - optional_block_pos + - direction + - optional_uuid + - block_state + value: type ? + if byte: i8 + if int: varint + if float: f32 + if string: string + if component: string + if item_stack: slot + if boolean: bool + if rotations: + pitch: f32 + yaw: f32 + roll: f32 + if block_pos: position + if optional_block_pos: ["option", "position"] + if direction: varint + if optional_uuid: ["option", "UUID"] + if block_state: varint + entityMetadata: ["entityMetadataLoop", { "endVal": 255, "type": "entityMetadataEntry" }] ^handshaking.toClient.types: packet: diff --git a/data/pc/1.9.4/protocol.json b/data/pc/1.9.4/protocol.json index c17c9127f..740f849d9 100644 --- a/data/pc/1.9.4/protocol.json +++ b/data/pc/1.9.4/protocol.json @@ -88,83 +88,90 @@ } ] ], - "entityMetadataItem": [ - "switch", - { - "compareTo": "$compareTo", - "fields": { - "0": "i8", - "1": "varint", - "2": "f32", - "3": "string", - "4": "string", - "5": "slot", - "6": "bool", - "7": [ - "container", - [ - { - "name": "pitch", - "type": "f32" - }, - { - "name": "yaw", - "type": "f32" - }, - { - "name": "roll", - "type": "f32" + "entityMetadataEntry": [ + "container", + [ + { + "name": "key", + "type": "u8" + }, + { + "name": "type", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "byte", + "1": "int", + "2": "float", + "3": "string", + "4": "component", + "5": "item_stack", + "6": "boolean", + "7": "rotations", + "8": "block_pos", + "9": "optional_block_pos", + "10": "direction", + "11": "optional_uuid", + "12": "block_state" } - ] - ], - "8": "position", - "9": [ - "option", - "position" - ], - "10": "varint", - "11": [ - "option", - "UUID" - ], - "12": "varint" + } + ] + }, + { + "name": "value", + "type": [ + "switch", + { + "compareTo": "type", + "fields": { + "byte": "i8", + "int": "varint", + "float": "f32", + "string": "string", + "component": "string", + "item_stack": "slot", + "boolean": "bool", + "rotations": [ + "container", + [ + { + "name": "pitch", + "type": "f32" + }, + { + "name": "yaw", + "type": "f32" + }, + { + "name": "roll", + "type": "f32" + } + ] + ], + "block_pos": "position", + "optional_block_pos": [ + "option", + "position" + ], + "direction": "varint", + "optional_uuid": [ + "option", + "UUID" + ], + "block_state": "varint" + } + } + ] } - } + ] ], "entityMetadata": [ "entityMetadataLoop", { "endVal": 255, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": "i8" - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] + "type": "entityMetadataEntry" } ] }, diff --git a/data/pc/1.9/proto.yml b/data/pc/1.9/proto.yml index a7db93447..9dfe59602 100644 --- a/data/pc/1.9/proto.yml +++ b/data/pc/1.9/proto.yml @@ -59,65 +59,40 @@ } ] ] - entityMetadataItem: $compareTo ? - if 0: i8 - if 1: varint - if 2: f32 - if 3: string - if 4: string - if 5: slot - if 6: bool - if 7: - pitch: f32 - yaw: f32 - roll: f32 - if 8: position - if 9: [ - "option", - "position" - ] - if 10: varint - if 11: [ - "option", - "UUID" - ] - if 12: varint - entityMetadata: [ - "entityMetadataLoop", - { - "endVal": 255, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": "i8" - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] - } - ] + entityMetadataEntry: + key: u8 + type: varint => + - byte + - int + - float + - string + - component + - item_stack + - boolean + - rotations + - block_pos + - optional_block_pos + - direction + - optional_uuid + - block_state + value: type ? + if byte: i8 + if int: varint + if float: f32 + if string: string + if component: string + if item_stack: slot + if boolean: bool + if rotations: + pitch: f32 + yaw: f32 + roll: f32 + if block_pos: position + if optional_block_pos: ["option", "position"] + if direction: varint + if optional_uuid: ["option", "UUID"] + if block_state: varint + entityMetadata: ["entityMetadataLoop", { "endVal": 255, "type": "entityMetadataEntry" }] ^handshaking.toClient.types: packet: diff --git a/data/pc/1.9/protocol.json b/data/pc/1.9/protocol.json index 5a6fcdae3..5f19c9f8b 100644 --- a/data/pc/1.9/protocol.json +++ b/data/pc/1.9/protocol.json @@ -88,83 +88,90 @@ } ] ], - "entityMetadataItem": [ - "switch", - { - "compareTo": "$compareTo", - "fields": { - "0": "i8", - "1": "varint", - "2": "f32", - "3": "string", - "4": "string", - "5": "slot", - "6": "bool", - "7": [ - "container", - [ - { - "name": "pitch", - "type": "f32" - }, - { - "name": "yaw", - "type": "f32" - }, - { - "name": "roll", - "type": "f32" + "entityMetadataEntry": [ + "container", + [ + { + "name": "key", + "type": "u8" + }, + { + "name": "type", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "byte", + "1": "int", + "2": "float", + "3": "string", + "4": "component", + "5": "item_stack", + "6": "boolean", + "7": "rotations", + "8": "block_pos", + "9": "optional_block_pos", + "10": "direction", + "11": "optional_uuid", + "12": "block_state" } - ] - ], - "8": "position", - "9": [ - "option", - "position" - ], - "10": "varint", - "11": [ - "option", - "UUID" - ], - "12": "varint" + } + ] + }, + { + "name": "value", + "type": [ + "switch", + { + "compareTo": "type", + "fields": { + "byte": "i8", + "int": "varint", + "float": "f32", + "string": "string", + "component": "string", + "item_stack": "slot", + "boolean": "bool", + "rotations": [ + "container", + [ + { + "name": "pitch", + "type": "f32" + }, + { + "name": "yaw", + "type": "f32" + }, + { + "name": "roll", + "type": "f32" + } + ] + ], + "block_pos": "position", + "optional_block_pos": [ + "option", + "position" + ], + "direction": "varint", + "optional_uuid": [ + "option", + "UUID" + ], + "block_state": "varint" + } + } + ] } - } + ] ], "entityMetadata": [ "entityMetadataLoop", { "endVal": 255, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": "i8" - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] + "type": "entityMetadataEntry" } ] }, diff --git a/data/pc/15w40b/proto.yml b/data/pc/15w40b/proto.yml index 904243242..73917df34 100644 --- a/data/pc/15w40b/proto.yml +++ b/data/pc/15w40b/proto.yml @@ -59,65 +59,40 @@ } ] ] - entityMetadataItem: $compareTo ? - if 0: i8 - if 1: varint - if 2: f32 - if 3: string - if 4: string - if 5: slot - if 6: bool - if 7: - pitch: f32 - yaw: f32 - roll: f32 - if 8: position - if 9: [ - "option", - "position" - ] - if 10: varint - if 11: [ - "option", - "UUID" - ] - if 12: varint - entityMetadata: [ - "entityMetadataLoop", - { - "endVal": 255, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": "i8" - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] - } - ] + entityMetadataEntry: + key: u8 + type: varint => + - byte + - int + - float + - string + - component + - item_stack + - boolean + - rotations + - block_pos + - optional_block_pos + - direction + - optional_uuid + - block_state + value: type ? + if byte: i8 + if int: varint + if float: f32 + if string: string + if component: string + if item_stack: slot + if boolean: bool + if rotations: + pitch: f32 + yaw: f32 + roll: f32 + if block_pos: position + if optional_block_pos: ["option", "position"] + if direction: varint + if optional_uuid: ["option", "UUID"] + if block_state: varint + entityMetadata: ["entityMetadataLoop", { "endVal": 255, "type": "entityMetadataEntry" }] ^handshaking.toClient.types: packet: diff --git a/data/pc/15w40b/protocol.json b/data/pc/15w40b/protocol.json index 6b2b44ca2..5db84500d 100644 --- a/data/pc/15w40b/protocol.json +++ b/data/pc/15w40b/protocol.json @@ -88,83 +88,90 @@ } ] ], - "entityMetadataItem": [ - "switch", - { - "compareTo": "$compareTo", - "fields": { - "0": "i8", - "1": "varint", - "2": "f32", - "3": "string", - "4": "string", - "5": "slot", - "6": "bool", - "7": [ - "container", - [ - { - "name": "pitch", - "type": "f32" - }, - { - "name": "yaw", - "type": "f32" - }, - { - "name": "roll", - "type": "f32" + "entityMetadataEntry": [ + "container", + [ + { + "name": "key", + "type": "u8" + }, + { + "name": "type", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "byte", + "1": "int", + "2": "float", + "3": "string", + "4": "component", + "5": "item_stack", + "6": "boolean", + "7": "rotations", + "8": "block_pos", + "9": "optional_block_pos", + "10": "direction", + "11": "optional_uuid", + "12": "block_state" } - ] - ], - "8": "position", - "9": [ - "option", - "position" - ], - "10": "varint", - "11": [ - "option", - "UUID" - ], - "12": "varint" + } + ] + }, + { + "name": "value", + "type": [ + "switch", + { + "compareTo": "type", + "fields": { + "byte": "i8", + "int": "varint", + "float": "f32", + "string": "string", + "component": "string", + "item_stack": "slot", + "boolean": "bool", + "rotations": [ + "container", + [ + { + "name": "pitch", + "type": "f32" + }, + { + "name": "yaw", + "type": "f32" + }, + { + "name": "roll", + "type": "f32" + } + ] + ], + "block_pos": "position", + "optional_block_pos": [ + "option", + "position" + ], + "direction": "varint", + "optional_uuid": [ + "option", + "UUID" + ], + "block_state": "varint" + } + } + ] } - } + ] ], "entityMetadata": [ "entityMetadataLoop", { "endVal": 255, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": "i8" - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] + "type": "entityMetadataEntry" } ] }, diff --git a/data/pc/16w20a/proto.yml b/data/pc/16w20a/proto.yml index cb7d84342..e0bac46ad 100644 --- a/data/pc/16w20a/proto.yml +++ b/data/pc/16w20a/proto.yml @@ -59,65 +59,40 @@ } ] ] - entityMetadataItem: $compareTo ? - if 0: i8 - if 1: varint - if 2: f32 - if 3: string - if 4: string - if 5: slot - if 6: bool - if 7: - pitch: f32 - yaw: f32 - roll: f32 - if 8: position - if 9: [ - "option", - "position" - ] - if 10: varint - if 11: [ - "option", - "UUID" - ] - if 12: varint - entityMetadata: [ - "entityMetadataLoop", - { - "endVal": 255, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": "i8" - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] - } - ] + entityMetadataEntry: + key: u8 + type: varint => + - byte + - int + - float + - string + - component + - item_stack + - boolean + - rotations + - block_pos + - optional_block_pos + - direction + - optional_uuid + - block_state + value: type ? + if byte: i8 + if int: varint + if float: f32 + if string: string + if component: string + if item_stack: slot + if boolean: bool + if rotations: + pitch: f32 + yaw: f32 + roll: f32 + if block_pos: position + if optional_block_pos: ["option", "position"] + if direction: varint + if optional_uuid: ["option", "UUID"] + if block_state: varint + entityMetadata: ["entityMetadataLoop", { "endVal": 255, "type": "entityMetadataEntry" }] ^handshaking.toClient.types: packet: diff --git a/data/pc/16w20a/protocol.json b/data/pc/16w20a/protocol.json index 955e88dfb..26935d1f9 100644 --- a/data/pc/16w20a/protocol.json +++ b/data/pc/16w20a/protocol.json @@ -88,83 +88,90 @@ } ] ], - "entityMetadataItem": [ - "switch", - { - "compareTo": "$compareTo", - "fields": { - "0": "i8", - "1": "varint", - "2": "f32", - "3": "string", - "4": "string", - "5": "slot", - "6": "bool", - "7": [ - "container", - [ - { - "name": "pitch", - "type": "f32" - }, - { - "name": "yaw", - "type": "f32" - }, - { - "name": "roll", - "type": "f32" + "entityMetadataEntry": [ + "container", + [ + { + "name": "key", + "type": "u8" + }, + { + "name": "type", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "byte", + "1": "int", + "2": "float", + "3": "string", + "4": "component", + "5": "item_stack", + "6": "boolean", + "7": "rotations", + "8": "block_pos", + "9": "optional_block_pos", + "10": "direction", + "11": "optional_uuid", + "12": "block_state" } - ] - ], - "8": "position", - "9": [ - "option", - "position" - ], - "10": "varint", - "11": [ - "option", - "UUID" - ], - "12": "varint" + } + ] + }, + { + "name": "value", + "type": [ + "switch", + { + "compareTo": "type", + "fields": { + "byte": "i8", + "int": "varint", + "float": "f32", + "string": "string", + "component": "string", + "item_stack": "slot", + "boolean": "bool", + "rotations": [ + "container", + [ + { + "name": "pitch", + "type": "f32" + }, + { + "name": "yaw", + "type": "f32" + }, + { + "name": "roll", + "type": "f32" + } + ] + ], + "block_pos": "position", + "optional_block_pos": [ + "option", + "position" + ], + "direction": "varint", + "optional_uuid": [ + "option", + "UUID" + ], + "block_state": "varint" + } + } + ] } - } + ] ], "entityMetadata": [ "entityMetadataLoop", { "endVal": 255, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": "i8" - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] + "type": "entityMetadataEntry" } ] }, diff --git a/data/pc/16w35a/proto.yml b/data/pc/16w35a/proto.yml index dae685bab..9f75001a0 100644 --- a/data/pc/16w35a/proto.yml +++ b/data/pc/16w35a/proto.yml @@ -59,65 +59,40 @@ } ] ] - entityMetadataItem: $compareTo ? - if 0: i8 - if 1: varint - if 2: f32 - if 3: string - if 4: string - if 5: slot - if 6: bool - if 7: - pitch: f32 - yaw: f32 - roll: f32 - if 8: position - if 9: [ - "option", - "position" - ] - if 10: varint - if 11: [ - "option", - "UUID" - ] - if 12: varint - entityMetadata: [ - "entityMetadataLoop", - { - "endVal": 255, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": "i8" - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] - } - ] + entityMetadataEntry: + key: u8 + type: varint => + - byte + - int + - float + - string + - component + - item_stack + - boolean + - rotations + - block_pos + - optional_block_pos + - direction + - optional_uuid + - block_state + value: type ? + if byte: i8 + if int: varint + if float: f32 + if string: string + if component: string + if item_stack: slot + if boolean: bool + if rotations: + pitch: f32 + yaw: f32 + roll: f32 + if block_pos: position + if optional_block_pos: ["option", "position"] + if direction: varint + if optional_uuid: ["option", "UUID"] + if block_state: varint + entityMetadata: ["entityMetadataLoop", { "endVal": 255, "type": "entityMetadataEntry" }] ^handshaking.toClient.types: packet: diff --git a/data/pc/16w35a/protocol.json b/data/pc/16w35a/protocol.json index 8781eafe3..ef1615c33 100644 --- a/data/pc/16w35a/protocol.json +++ b/data/pc/16w35a/protocol.json @@ -88,83 +88,90 @@ } ] ], - "entityMetadataItem": [ - "switch", - { - "compareTo": "$compareTo", - "fields": { - "0": "i8", - "1": "varint", - "2": "f32", - "3": "string", - "4": "string", - "5": "slot", - "6": "bool", - "7": [ - "container", - [ - { - "name": "pitch", - "type": "f32" - }, - { - "name": "yaw", - "type": "f32" - }, - { - "name": "roll", - "type": "f32" + "entityMetadataEntry": [ + "container", + [ + { + "name": "key", + "type": "u8" + }, + { + "name": "type", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "byte", + "1": "int", + "2": "float", + "3": "string", + "4": "component", + "5": "item_stack", + "6": "boolean", + "7": "rotations", + "8": "block_pos", + "9": "optional_block_pos", + "10": "direction", + "11": "optional_uuid", + "12": "block_state" } - ] - ], - "8": "position", - "9": [ - "option", - "position" - ], - "10": "varint", - "11": [ - "option", - "UUID" - ], - "12": "varint" + } + ] + }, + { + "name": "value", + "type": [ + "switch", + { + "compareTo": "type", + "fields": { + "byte": "i8", + "int": "varint", + "float": "f32", + "string": "string", + "component": "string", + "item_stack": "slot", + "boolean": "bool", + "rotations": [ + "container", + [ + { + "name": "pitch", + "type": "f32" + }, + { + "name": "yaw", + "type": "f32" + }, + { + "name": "roll", + "type": "f32" + } + ] + ], + "block_pos": "position", + "optional_block_pos": [ + "option", + "position" + ], + "direction": "varint", + "optional_uuid": [ + "option", + "UUID" + ], + "block_state": "varint" + } + } + ] } - } + ] ], "entityMetadata": [ "entityMetadataLoop", { "endVal": 255, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": "i8" - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] + "type": "entityMetadataEntry" } ] }, diff --git a/data/pc/17w15a/proto.yml b/data/pc/17w15a/proto.yml index 6b52f141f..9431b027f 100644 --- a/data/pc/17w15a/proto.yml +++ b/data/pc/17w15a/proto.yml @@ -59,66 +59,42 @@ } ] ] - entityMetadataItem: $compareTo ? - if 0: i8 - if 1: varint - if 2: f32 - if 3: string - if 4: string - if 5: slot - if 6: bool - if 7: - pitch: f32 - yaw: f32 - roll: f32 - if 8: position - if 9: [ - "option", - "position" - ] - if 10: varint - if 11: [ - "option", - "UUID" - ] - if 12: varint - if 13: nbt - entityMetadata: [ - "entityMetadataLoop", - { - "endVal": 255, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": "i8" - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] - } - ] + entityMetadataEntry: + key: u8 + type: varint => + - byte + - int + - float + - string + - component + - item_stack + - boolean + - rotations + - block_pos + - optional_block_pos + - direction + - optional_uuid + - block_state + - compound_tag + value: type ? + if byte: i8 + if int: varint + if float: f32 + if string: string + if component: string + if item_stack: slot + if boolean: bool + if rotations: + pitch: f32 + yaw: f32 + roll: f32 + if block_pos: position + if optional_block_pos: ["option", "position"] + if direction: varint + if optional_uuid: ["option", "UUID"] + if block_state: varint + if compound_tag: nbt + entityMetadata: ["entityMetadataLoop", { "endVal": 255, "type": "entityMetadataEntry" }] ^handshaking.toClient.types: packet: diff --git a/data/pc/17w15a/protocol.json b/data/pc/17w15a/protocol.json index f2745ac78..112c0c8b7 100644 --- a/data/pc/17w15a/protocol.json +++ b/data/pc/17w15a/protocol.json @@ -88,84 +88,92 @@ } ] ], - "entityMetadataItem": [ - "switch", - { - "compareTo": "$compareTo", - "fields": { - "0": "i8", - "1": "varint", - "2": "f32", - "3": "string", - "4": "string", - "5": "slot", - "6": "bool", - "7": [ - "container", - [ - { - "name": "pitch", - "type": "f32" - }, - { - "name": "yaw", - "type": "f32" - }, - { - "name": "roll", - "type": "f32" + "entityMetadataEntry": [ + "container", + [ + { + "name": "key", + "type": "u8" + }, + { + "name": "type", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "byte", + "1": "int", + "2": "float", + "3": "string", + "4": "component", + "5": "item_stack", + "6": "boolean", + "7": "rotations", + "8": "block_pos", + "9": "optional_block_pos", + "10": "direction", + "11": "optional_uuid", + "12": "block_state", + "13": "compound_tag" + } + } + ] + }, + { + "name": "value", + "type": [ + "switch", + { + "compareTo": "type", + "fields": { + "byte": "i8", + "int": "varint", + "float": "f32", + "string": "string", + "component": "string", + "item_stack": "slot", + "boolean": "bool", + "rotations": [ + "container", + [ + { + "name": "pitch", + "type": "f32" + }, + { + "name": "yaw", + "type": "f32" + }, + { + "name": "roll", + "type": "f32" + } + ] + ], + "block_pos": "position", + "optional_block_pos": [ + "option", + "position" + ], + "direction": "varint", + "optional_uuid": [ + "option", + "UUID" + ], + "block_state": "varint", + "compound_tag": "nbt" } - ] - ], - "8": "position", - "9": [ - "option", - "position" - ], - "10": "varint", - "11": [ - "option", - "UUID" - ], - "12": "varint", - "13": "nbt" + } + ] } - } + ] ], "entityMetadata": [ "entityMetadataLoop", { "endVal": 255, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": "i8" - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] + "type": "entityMetadataEntry" } ] }, diff --git a/data/pc/17w18b/proto.yml b/data/pc/17w18b/proto.yml index e20259efe..07c17e743 100644 --- a/data/pc/17w18b/proto.yml +++ b/data/pc/17w18b/proto.yml @@ -59,66 +59,42 @@ } ] ] - entityMetadataItem: $compareTo ? - if 0: i8 - if 1: varint - if 2: f32 - if 3: string - if 4: string - if 5: slot - if 6: bool - if 7: - pitch: f32 - yaw: f32 - roll: f32 - if 8: position - if 9: [ - "option", - "position" - ] - if 10: varint - if 11: [ - "option", - "UUID" - ] - if 12: varint - if 13: nbt - entityMetadata: [ - "entityMetadataLoop", - { - "endVal": 255, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": "i8" - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] - } - ] + entityMetadataEntry: + key: u8 + type: varint => + - byte + - int + - float + - string + - component + - item_stack + - boolean + - rotations + - block_pos + - optional_block_pos + - direction + - optional_uuid + - block_state + - compound_tag + value: type ? + if byte: i8 + if int: varint + if float: f32 + if string: string + if component: string + if item_stack: slot + if boolean: bool + if rotations: + pitch: f32 + yaw: f32 + roll: f32 + if block_pos: position + if optional_block_pos: ["option", "position"] + if direction: varint + if optional_uuid: ["option", "UUID"] + if block_state: varint + if compound_tag: nbt + entityMetadata: ["entityMetadataLoop", { "endVal": 255, "type": "entityMetadataEntry" }] ^handshaking.toClient.types: packet: diff --git a/data/pc/17w18b/protocol.json b/data/pc/17w18b/protocol.json index 59bf9cd97..b195c8209 100644 --- a/data/pc/17w18b/protocol.json +++ b/data/pc/17w18b/protocol.json @@ -88,84 +88,92 @@ } ] ], - "entityMetadataItem": [ - "switch", - { - "compareTo": "$compareTo", - "fields": { - "0": "i8", - "1": "varint", - "2": "f32", - "3": "string", - "4": "string", - "5": "slot", - "6": "bool", - "7": [ - "container", - [ - { - "name": "pitch", - "type": "f32" - }, - { - "name": "yaw", - "type": "f32" - }, - { - "name": "roll", - "type": "f32" + "entityMetadataEntry": [ + "container", + [ + { + "name": "key", + "type": "u8" + }, + { + "name": "type", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "byte", + "1": "int", + "2": "float", + "3": "string", + "4": "component", + "5": "item_stack", + "6": "boolean", + "7": "rotations", + "8": "block_pos", + "9": "optional_block_pos", + "10": "direction", + "11": "optional_uuid", + "12": "block_state", + "13": "compound_tag" + } + } + ] + }, + { + "name": "value", + "type": [ + "switch", + { + "compareTo": "type", + "fields": { + "byte": "i8", + "int": "varint", + "float": "f32", + "string": "string", + "component": "string", + "item_stack": "slot", + "boolean": "bool", + "rotations": [ + "container", + [ + { + "name": "pitch", + "type": "f32" + }, + { + "name": "yaw", + "type": "f32" + }, + { + "name": "roll", + "type": "f32" + } + ] + ], + "block_pos": "position", + "optional_block_pos": [ + "option", + "position" + ], + "direction": "varint", + "optional_uuid": [ + "option", + "UUID" + ], + "block_state": "varint", + "compound_tag": "nbt" } - ] - ], - "8": "position", - "9": [ - "option", - "position" - ], - "10": "varint", - "11": [ - "option", - "UUID" - ], - "12": "varint", - "13": "nbt" + } + ] } - } + ] ], "entityMetadata": [ "entityMetadataLoop", { "endVal": 255, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": "i8" - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] + "type": "entityMetadataEntry" } ] }, diff --git a/data/pc/17w50a/proto.yml b/data/pc/17w50a/proto.yml index dfb95ce35..73b08a820 100644 --- a/data/pc/17w50a/proto.yml +++ b/data/pc/17w50a/proto.yml @@ -58,66 +58,42 @@ } ] ] - entityMetadataItem: $compareTo ? - if 0: i8 - if 1: varint - if 2: f32 - if 3: string - if 4: string - if 5: slot - if 6: bool - if 7: - pitch: f32 - yaw: f32 - roll: f32 - if 8: position - if 9: [ - "option", - "position" - ] - if 10: varint - if 11: [ - "option", - "UUID" - ] - if 12: varint - if 13: nbt - entityMetadata: [ - "entityMetadataLoop", - { - "endVal": 255, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": "i8" - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] - } - ] + entityMetadataEntry: + key: u8 + type: varint => + - byte + - int + - float + - string + - component + - item_stack + - boolean + - rotations + - block_pos + - optional_block_pos + - direction + - optional_uuid + - block_state + - compound_tag + value: type ? + if byte: i8 + if int: varint + if float: f32 + if string: string + if component: string + if item_stack: slot + if boolean: bool + if rotations: + pitch: f32 + yaw: f32 + roll: f32 + if block_pos: position + if optional_block_pos: ["option", "position"] + if direction: varint + if optional_uuid: ["option", "UUID"] + if block_state: varint + if compound_tag: nbt + entityMetadata: ["entityMetadataLoop", { "endVal": 255, "type": "entityMetadataEntry" }] ^handshaking.toClient.types: packet: diff --git a/data/pc/17w50a/protocol.json b/data/pc/17w50a/protocol.json index 4c4472348..689ca72bb 100644 --- a/data/pc/17w50a/protocol.json +++ b/data/pc/17w50a/protocol.json @@ -84,84 +84,92 @@ } ] ], - "entityMetadataItem": [ - "switch", - { - "compareTo": "$compareTo", - "fields": { - "0": "i8", - "1": "varint", - "2": "f32", - "3": "string", - "4": "string", - "5": "slot", - "6": "bool", - "7": [ - "container", - [ - { - "name": "pitch", - "type": "f32" - }, - { - "name": "yaw", - "type": "f32" - }, - { - "name": "roll", - "type": "f32" + "entityMetadataEntry": [ + "container", + [ + { + "name": "key", + "type": "u8" + }, + { + "name": "type", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "byte", + "1": "int", + "2": "float", + "3": "string", + "4": "component", + "5": "item_stack", + "6": "boolean", + "7": "rotations", + "8": "block_pos", + "9": "optional_block_pos", + "10": "direction", + "11": "optional_uuid", + "12": "block_state", + "13": "compound_tag" } - ] - ], - "8": "position", - "9": [ - "option", - "position" - ], - "10": "varint", - "11": [ - "option", - "UUID" - ], - "12": "varint", - "13": "nbt" + } + ] + }, + { + "name": "value", + "type": [ + "switch", + { + "compareTo": "type", + "fields": { + "byte": "i8", + "int": "varint", + "float": "f32", + "string": "string", + "component": "string", + "item_stack": "slot", + "boolean": "bool", + "rotations": [ + "container", + [ + { + "name": "pitch", + "type": "f32" + }, + { + "name": "yaw", + "type": "f32" + }, + { + "name": "roll", + "type": "f32" + } + ] + ], + "block_pos": "position", + "optional_block_pos": [ + "option", + "position" + ], + "direction": "varint", + "optional_uuid": [ + "option", + "UUID" + ], + "block_state": "varint", + "compound_tag": "nbt" + } + } + ] } - } + ] ], "entityMetadata": [ "entityMetadataLoop", { "endVal": 255, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": "i8" - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] + "type": "entityMetadataEntry" } ] }, diff --git a/data/pc/20w13b/proto.yml b/data/pc/20w13b/proto.yml index ef293938f..f142216dc 100644 --- a/data/pc/20w13b/proto.yml +++ b/data/pc/20w13b/proto.yml @@ -82,77 +82,55 @@ } ] ] - entityMetadataItem: $compareTo ? - if 0: i8 - if 1: varint - if 2: f32 - if 3: string - if 4: string - if 5: [ - "option", - "string" - ] - if 6: slot - if 7: bool - if 8: - pitch: f32 - yaw: f32 - roll: f32 - if 9: position - if 10: [ - "option", - "position" - ] - if 11: varint - if 12: [ - "option", - "UUID" - ] - if 13: varint - if 14: nbt - if 15: particle - if 16: - villagerType: varint - villagerProfession: varint - level: varint - if 17: optvarint - if 18: varint - entityMetadata: [ - "entityMetadataLoop", - { - "endVal": 255, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": "varint" - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] - } - ] + entityMetadataEntry: + key: u8 + type: varint => + - byte + - int + - float + - string + - component + - optional_component + - item_stack + - boolean + - rotations + - block_pos + - optional_block_pos + - direction + - optional_uuid + - block_state + - compound_tag + - particle + - villager_data + - optional_unsigned_int + - pose + value: type ? + if byte: i8 + if int: varint + if float: f32 + if string: string + if component: string + if optional_component: ["option", "string"] + if item_stack: slot + if boolean: bool + if rotations: + pitch: f32 + yaw: f32 + roll: f32 + if block_pos: position + if optional_block_pos: ["option", "position"] + if direction: varint + if optional_uuid: ["option", "UUID"] + if block_state: varint + if compound_tag: nbt + if particle: particle + if villager_data: + villagerType: varint + villagerProfession: varint + level: varint + if optional_unsigned_int: optvarint + if pose: varint + entityMetadata: ["entityMetadataLoop", { "endVal": 255, "type": "entityMetadataEntry" }] command_node: flags: [ "bitfield", diff --git a/data/pc/20w13b/protocol.json b/data/pc/20w13b/protocol.json index 32b85f226..a72d11478 100644 --- a/data/pc/20w13b/protocol.json +++ b/data/pc/20w13b/protocol.json @@ -171,108 +171,121 @@ } ] ], - "entityMetadataItem": [ - "switch", - { - "compareTo": "$compareTo", - "fields": { - "0": "i8", - "1": "varint", - "2": "f32", - "3": "string", - "4": "string", - "5": [ - "option", - "string" - ], - "6": "slot", - "7": "bool", - "8": [ - "container", - [ - { - "name": "pitch", - "type": "f32" - }, - { - "name": "yaw", - "type": "f32" - }, - { - "name": "roll", - "type": "f32" + "entityMetadataEntry": [ + "container", + [ + { + "name": "key", + "type": "u8" + }, + { + "name": "type", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "byte", + "1": "int", + "2": "float", + "3": "string", + "4": "component", + "5": "optional_component", + "6": "item_stack", + "7": "boolean", + "8": "rotations", + "9": "block_pos", + "10": "optional_block_pos", + "11": "direction", + "12": "optional_uuid", + "13": "block_state", + "14": "compound_tag", + "15": "particle", + "16": "villager_data", + "17": "optional_unsigned_int", + "18": "pose" } - ] - ], - "9": "position", - "10": [ - "option", - "position" - ], - "11": "varint", - "12": [ - "option", - "UUID" - ], - "13": "varint", - "14": "nbt", - "15": "particle", - "16": [ - "container", - [ - { - "name": "villagerType", - "type": "varint" - }, - { - "name": "villagerProfession", - "type": "varint" - }, - { - "name": "level", - "type": "varint" + } + ] + }, + { + "name": "value", + "type": [ + "switch", + { + "compareTo": "type", + "fields": { + "byte": "i8", + "int": "varint", + "float": "f32", + "string": "string", + "component": "string", + "optional_component": [ + "option", + "string" + ], + "item_stack": "slot", + "boolean": "bool", + "rotations": [ + "container", + [ + { + "name": "pitch", + "type": "f32" + }, + { + "name": "yaw", + "type": "f32" + }, + { + "name": "roll", + "type": "f32" + } + ] + ], + "block_pos": "position", + "optional_block_pos": [ + "option", + "position" + ], + "direction": "varint", + "optional_uuid": [ + "option", + "UUID" + ], + "block_state": "varint", + "compound_tag": "nbt", + "particle": "particle", + "villager_data": [ + "container", + [ + { + "name": "villagerType", + "type": "varint" + }, + { + "name": "villagerProfession", + "type": "varint" + }, + { + "name": "level", + "type": "varint" + } + ] + ], + "optional_unsigned_int": "optvarint", + "pose": "varint" } - ] - ], - "17": "optvarint", - "18": "varint" + } + ] } - } + ] ], "entityMetadata": [ "entityMetadataLoop", { "endVal": 255, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": "varint" - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] + "type": "entityMetadataEntry" } ], "command_node": [ diff --git a/data/pc/21w07a/proto.yml b/data/pc/21w07a/proto.yml index 1a19c0ffd..0496358cb 100644 --- a/data/pc/21w07a/proto.yml +++ b/data/pc/21w07a/proto.yml @@ -83,77 +83,55 @@ } ] ] - entityMetadataItem: $compareTo ? - if 0: i8 - if 1: varint - if 2: f32 - if 3: string - if 4: string - if 5: [ - "option", - "string" - ] - if 6: slot - if 7: bool - if 8: - pitch: f32 - yaw: f32 - roll: f32 - if 9: position - if 10: [ - "option", - "position" - ] - if 11: varint - if 12: [ - "option", - "UUID" - ] - if 13: varint - if 14: nbt - if 15: particle - if 16: - villagerType: varint - villagerProfession: varint - level: varint - if 17: optvarint - if 18: varint - entityMetadata: [ - "entityMetadataLoop", - { - "endVal": 255, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": "varint" - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] - } - ] + entityMetadataEntry: + key: u8 + type: varint => + - byte + - int + - float + - string + - component + - optional_component + - item_stack + - boolean + - rotations + - block_pos + - optional_block_pos + - direction + - optional_uuid + - block_state + - compound_tag + - particle + - villager_data + - optional_unsigned_int + - pose + value: type ? + if byte: i8 + if int: varint + if float: f32 + if string: string + if component: string + if optional_component: ["option", "string"] + if item_stack: slot + if boolean: bool + if rotations: + pitch: f32 + yaw: f32 + roll: f32 + if block_pos: position + if optional_block_pos: ["option", "position"] + if direction: varint + if optional_uuid: ["option", "UUID"] + if block_state: varint + if compound_tag: nbt + if particle: particle + if villager_data: + villagerType: varint + villagerProfession: varint + level: varint + if optional_unsigned_int: optvarint + if pose: varint + entityMetadata: ["entityMetadataLoop", { "endVal": 255, "type": "entityMetadataEntry" }] command_node: flags: [ "bitfield", diff --git a/data/pc/21w07a/protocol.json b/data/pc/21w07a/protocol.json index 4b0c78505..85dcd360e 100644 --- a/data/pc/21w07a/protocol.json +++ b/data/pc/21w07a/protocol.json @@ -172,108 +172,121 @@ } ] ], - "entityMetadataItem": [ - "switch", - { - "compareTo": "$compareTo", - "fields": { - "0": "i8", - "1": "varint", - "2": "f32", - "3": "string", - "4": "string", - "5": [ - "option", - "string" - ], - "6": "slot", - "7": "bool", - "8": [ - "container", - [ - { - "name": "pitch", - "type": "f32" - }, - { - "name": "yaw", - "type": "f32" - }, - { - "name": "roll", - "type": "f32" + "entityMetadataEntry": [ + "container", + [ + { + "name": "key", + "type": "u8" + }, + { + "name": "type", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "byte", + "1": "int", + "2": "float", + "3": "string", + "4": "component", + "5": "optional_component", + "6": "item_stack", + "7": "boolean", + "8": "rotations", + "9": "block_pos", + "10": "optional_block_pos", + "11": "direction", + "12": "optional_uuid", + "13": "block_state", + "14": "compound_tag", + "15": "particle", + "16": "villager_data", + "17": "optional_unsigned_int", + "18": "pose" } - ] - ], - "9": "position", - "10": [ - "option", - "position" - ], - "11": "varint", - "12": [ - "option", - "UUID" - ], - "13": "varint", - "14": "nbt", - "15": "particle", - "16": [ - "container", - [ - { - "name": "villagerType", - "type": "varint" - }, - { - "name": "villagerProfession", - "type": "varint" - }, - { - "name": "level", - "type": "varint" + } + ] + }, + { + "name": "value", + "type": [ + "switch", + { + "compareTo": "type", + "fields": { + "byte": "i8", + "int": "varint", + "float": "f32", + "string": "string", + "component": "string", + "optional_component": [ + "option", + "string" + ], + "item_stack": "slot", + "boolean": "bool", + "rotations": [ + "container", + [ + { + "name": "pitch", + "type": "f32" + }, + { + "name": "yaw", + "type": "f32" + }, + { + "name": "roll", + "type": "f32" + } + ] + ], + "block_pos": "position", + "optional_block_pos": [ + "option", + "position" + ], + "direction": "varint", + "optional_uuid": [ + "option", + "UUID" + ], + "block_state": "varint", + "compound_tag": "nbt", + "particle": "particle", + "villager_data": [ + "container", + [ + { + "name": "villagerType", + "type": "varint" + }, + { + "name": "villagerProfession", + "type": "varint" + }, + { + "name": "level", + "type": "varint" + } + ] + ], + "optional_unsigned_int": "optvarint", + "pose": "varint" } - ] - ], - "17": "optvarint", - "18": "varint" + } + ] } - } + ] ], "entityMetadata": [ "entityMetadataLoop", { "endVal": 255, - "type": [ - "container", - [ - { - "anon": true, - "type": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": "varint" - } - ] - ] - }, - { - "name": "value", - "type": [ - "entityMetadataItem", - { - "compareTo": "type" - } - ] - } - ] - ] + "type": "entityMetadataEntry" } ], "command_node": [ From edc898d7e8625a7695989ac96d45fa3ab529a163 Mon Sep 17 00:00:00 2001 From: SuperGamerTron Date: Thu, 27 Feb 2025 00:08:23 -0700 Subject: [PATCH 2/4] Fix incorrect mapper type from 1.7-1.12 --- data/pc/1.10-pre1/proto.yml | 2 +- data/pc/1.10-pre1/protocol.json | 2 +- data/pc/1.10/proto.yml | 2 +- data/pc/1.10/protocol.json | 2 +- data/pc/1.11/proto.yml | 2 +- data/pc/1.11/protocol.json | 2 +- data/pc/1.12-pre4/proto.yml | 2 +- data/pc/1.12-pre4/protocol.json | 2 +- data/pc/1.12.1/proto.yml | 2 +- data/pc/1.12.1/protocol.json | 2 +- data/pc/1.12.2/proto.yml | 2 +- data/pc/1.12.2/protocol.json | 2 +- data/pc/1.12/proto.yml | 2 +- data/pc/1.12/protocol.json | 2 +- data/pc/1.7/proto.yml | 2 +- data/pc/1.7/protocol.json | 2 +- data/pc/1.8/proto.yml | 2 +- data/pc/1.8/protocol.json | 2 +- data/pc/1.9.1-pre2/proto.yml | 2 +- data/pc/1.9.1-pre2/protocol.json | 2 +- data/pc/1.9.2/proto.yml | 2 +- data/pc/1.9.2/protocol.json | 2 +- data/pc/1.9.4/proto.yml | 2 +- data/pc/1.9.4/protocol.json | 2 +- data/pc/1.9/proto.yml | 2 +- data/pc/1.9/protocol.json | 2 +- data/pc/15w40b/proto.yml | 2 +- data/pc/15w40b/protocol.json | 2 +- data/pc/16w20a/proto.yml | 2 +- data/pc/16w20a/protocol.json | 2 +- data/pc/16w35a/proto.yml | 2 +- data/pc/16w35a/protocol.json | 2 +- data/pc/17w15a/proto.yml | 2 +- data/pc/17w15a/protocol.json | 2 +- data/pc/17w18b/proto.yml | 2 +- data/pc/17w18b/protocol.json | 2 +- data/pc/17w50a/proto.yml | 2 +- data/pc/17w50a/protocol.json | 2 +- 38 files changed, 38 insertions(+), 38 deletions(-) diff --git a/data/pc/1.10-pre1/proto.yml b/data/pc/1.10-pre1/proto.yml index ce1a45cc6..949b435db 100644 --- a/data/pc/1.10-pre1/proto.yml +++ b/data/pc/1.10-pre1/proto.yml @@ -61,7 +61,7 @@ ] entityMetadataEntry: key: u8 - type: varint => + type: i8 => - byte - int - float diff --git a/data/pc/1.10-pre1/protocol.json b/data/pc/1.10-pre1/protocol.json index 0970621e6..7eac9fa86 100644 --- a/data/pc/1.10-pre1/protocol.json +++ b/data/pc/1.10-pre1/protocol.json @@ -100,7 +100,7 @@ "type": [ "mapper", { - "type": "varint", + "type": "i8", "mappings": { "0": "byte", "1": "int", diff --git a/data/pc/1.10/proto.yml b/data/pc/1.10/proto.yml index 6165eca8d..ebeeab42c 100644 --- a/data/pc/1.10/proto.yml +++ b/data/pc/1.10/proto.yml @@ -61,7 +61,7 @@ ] entityMetadataEntry: key: u8 - type: varint => + type: i8 => - byte - int - float diff --git a/data/pc/1.10/protocol.json b/data/pc/1.10/protocol.json index 0970621e6..7eac9fa86 100644 --- a/data/pc/1.10/protocol.json +++ b/data/pc/1.10/protocol.json @@ -100,7 +100,7 @@ "type": [ "mapper", { - "type": "varint", + "type": "i8", "mappings": { "0": "byte", "1": "int", diff --git a/data/pc/1.11/proto.yml b/data/pc/1.11/proto.yml index b2630a4d5..8936bdfd1 100644 --- a/data/pc/1.11/proto.yml +++ b/data/pc/1.11/proto.yml @@ -61,7 +61,7 @@ ] entityMetadataEntry: key: u8 - type: varint => + type: i8 => - byte - int - float diff --git a/data/pc/1.11/protocol.json b/data/pc/1.11/protocol.json index ce50e0d93..d28a194cf 100644 --- a/data/pc/1.11/protocol.json +++ b/data/pc/1.11/protocol.json @@ -100,7 +100,7 @@ "type": [ "mapper", { - "type": "varint", + "type": "i8", "mappings": { "0": "byte", "1": "int", diff --git a/data/pc/1.12-pre4/proto.yml b/data/pc/1.12-pre4/proto.yml index e3694440d..97f235a56 100644 --- a/data/pc/1.12-pre4/proto.yml +++ b/data/pc/1.12-pre4/proto.yml @@ -61,7 +61,7 @@ ] entityMetadataEntry: key: u8 - type: varint => + type: i8 => - byte - int - float diff --git a/data/pc/1.12-pre4/protocol.json b/data/pc/1.12-pre4/protocol.json index 0c23603c2..16646c585 100644 --- a/data/pc/1.12-pre4/protocol.json +++ b/data/pc/1.12-pre4/protocol.json @@ -100,7 +100,7 @@ "type": [ "mapper", { - "type": "varint", + "type": "i8", "mappings": { "0": "byte", "1": "int", diff --git a/data/pc/1.12.1/proto.yml b/data/pc/1.12.1/proto.yml index 1334e7439..e2084446e 100644 --- a/data/pc/1.12.1/proto.yml +++ b/data/pc/1.12.1/proto.yml @@ -61,7 +61,7 @@ ] entityMetadataEntry: key: u8 - type: varint => + type: i8 => - byte - int - float diff --git a/data/pc/1.12.1/protocol.json b/data/pc/1.12.1/protocol.json index c9671d94e..0e1d1c359 100644 --- a/data/pc/1.12.1/protocol.json +++ b/data/pc/1.12.1/protocol.json @@ -100,7 +100,7 @@ "type": [ "mapper", { - "type": "varint", + "type": "i8", "mappings": { "0": "byte", "1": "int", diff --git a/data/pc/1.12.2/proto.yml b/data/pc/1.12.2/proto.yml index db5c38f67..d98514c4a 100644 --- a/data/pc/1.12.2/proto.yml +++ b/data/pc/1.12.2/proto.yml @@ -61,7 +61,7 @@ ] entityMetadataEntry: key: u8 - type: varint => + type: i8 => - byte - int - float diff --git a/data/pc/1.12.2/protocol.json b/data/pc/1.12.2/protocol.json index 693af32e2..7570a925d 100644 --- a/data/pc/1.12.2/protocol.json +++ b/data/pc/1.12.2/protocol.json @@ -100,7 +100,7 @@ "type": [ "mapper", { - "type": "varint", + "type": "i8", "mappings": { "0": "byte", "1": "int", diff --git a/data/pc/1.12/proto.yml b/data/pc/1.12/proto.yml index f71c3b449..22d7dcd8c 100644 --- a/data/pc/1.12/proto.yml +++ b/data/pc/1.12/proto.yml @@ -61,7 +61,7 @@ ] entityMetadataEntry: key: u8 - type: varint => + type: i8 => - byte - int - float diff --git a/data/pc/1.12/protocol.json b/data/pc/1.12/protocol.json index 267c607bf..a09617d72 100644 --- a/data/pc/1.12/protocol.json +++ b/data/pc/1.12/protocol.json @@ -100,7 +100,7 @@ "type": [ "mapper", { - "type": "varint", + "type": "i8", "mappings": { "0": "byte", "1": "int", diff --git a/data/pc/1.7/proto.yml b/data/pc/1.7/proto.yml index 059a908c4..4067247e3 100644 --- a/data/pc/1.7/proto.yml +++ b/data/pc/1.7/proto.yml @@ -52,7 +52,7 @@ z: i32 entityMetadataEntry: key: u8 - type: varint => + type: i8 => - byte - short - int diff --git a/data/pc/1.7/protocol.json b/data/pc/1.7/protocol.json index 4abf4084d..ec303b457 100644 --- a/data/pc/1.7/protocol.json +++ b/data/pc/1.7/protocol.json @@ -130,7 +130,7 @@ "type": [ "mapper", { - "type": "varint", + "type": "i8", "mappings": { "0": "byte", "1": "short", diff --git a/data/pc/1.8/proto.yml b/data/pc/1.8/proto.yml index a14348d18..2d51065b8 100644 --- a/data/pc/1.8/proto.yml +++ b/data/pc/1.8/proto.yml @@ -61,7 +61,7 @@ ] entityMetadataEntry: key: u8 - type: varint => + type: i8 => - byte - short - int diff --git a/data/pc/1.8/protocol.json b/data/pc/1.8/protocol.json index 84fbdd34d..2e0943802 100644 --- a/data/pc/1.8/protocol.json +++ b/data/pc/1.8/protocol.json @@ -100,7 +100,7 @@ "type": [ "mapper", { - "type": "varint", + "type": "i8", "mappings": { "0": "byte", "1": "short", diff --git a/data/pc/1.9.1-pre2/proto.yml b/data/pc/1.9.1-pre2/proto.yml index 2dc4fa80b..4d61b4561 100644 --- a/data/pc/1.9.1-pre2/proto.yml +++ b/data/pc/1.9.1-pre2/proto.yml @@ -61,7 +61,7 @@ ] entityMetadataEntry: key: u8 - type: varint => + type: i8 => - byte - int - float diff --git a/data/pc/1.9.1-pre2/protocol.json b/data/pc/1.9.1-pre2/protocol.json index 8eaea8730..2f3762769 100644 --- a/data/pc/1.9.1-pre2/protocol.json +++ b/data/pc/1.9.1-pre2/protocol.json @@ -100,7 +100,7 @@ "type": [ "mapper", { - "type": "varint", + "type": "i8", "mappings": { "0": "byte", "1": "int", diff --git a/data/pc/1.9.2/proto.yml b/data/pc/1.9.2/proto.yml index 3e7673ebb..3c9ec1009 100644 --- a/data/pc/1.9.2/proto.yml +++ b/data/pc/1.9.2/proto.yml @@ -61,7 +61,7 @@ ] entityMetadataEntry: key: u8 - type: varint => + type: i8 => - byte - int - float diff --git a/data/pc/1.9.2/protocol.json b/data/pc/1.9.2/protocol.json index 8eaea8730..2f3762769 100644 --- a/data/pc/1.9.2/protocol.json +++ b/data/pc/1.9.2/protocol.json @@ -100,7 +100,7 @@ "type": [ "mapper", { - "type": "varint", + "type": "i8", "mappings": { "0": "byte", "1": "int", diff --git a/data/pc/1.9.4/proto.yml b/data/pc/1.9.4/proto.yml index 839fa0329..474d18a1a 100644 --- a/data/pc/1.9.4/proto.yml +++ b/data/pc/1.9.4/proto.yml @@ -61,7 +61,7 @@ ] entityMetadataEntry: key: u8 - type: varint => + type: i8 => - byte - int - float diff --git a/data/pc/1.9.4/protocol.json b/data/pc/1.9.4/protocol.json index 740f849d9..003f8bde3 100644 --- a/data/pc/1.9.4/protocol.json +++ b/data/pc/1.9.4/protocol.json @@ -100,7 +100,7 @@ "type": [ "mapper", { - "type": "varint", + "type": "i8", "mappings": { "0": "byte", "1": "int", diff --git a/data/pc/1.9/proto.yml b/data/pc/1.9/proto.yml index 9dfe59602..eea1666a8 100644 --- a/data/pc/1.9/proto.yml +++ b/data/pc/1.9/proto.yml @@ -61,7 +61,7 @@ ] entityMetadataEntry: key: u8 - type: varint => + type: i8 => - byte - int - float diff --git a/data/pc/1.9/protocol.json b/data/pc/1.9/protocol.json index 5f19c9f8b..14b826290 100644 --- a/data/pc/1.9/protocol.json +++ b/data/pc/1.9/protocol.json @@ -100,7 +100,7 @@ "type": [ "mapper", { - "type": "varint", + "type": "i8", "mappings": { "0": "byte", "1": "int", diff --git a/data/pc/15w40b/proto.yml b/data/pc/15w40b/proto.yml index 73917df34..ce8068b05 100644 --- a/data/pc/15w40b/proto.yml +++ b/data/pc/15w40b/proto.yml @@ -61,7 +61,7 @@ ] entityMetadataEntry: key: u8 - type: varint => + type: i8 => - byte - int - float diff --git a/data/pc/15w40b/protocol.json b/data/pc/15w40b/protocol.json index 5db84500d..76a525bd3 100644 --- a/data/pc/15w40b/protocol.json +++ b/data/pc/15w40b/protocol.json @@ -100,7 +100,7 @@ "type": [ "mapper", { - "type": "varint", + "type": "i8", "mappings": { "0": "byte", "1": "int", diff --git a/data/pc/16w20a/proto.yml b/data/pc/16w20a/proto.yml index e0bac46ad..4c90a509d 100644 --- a/data/pc/16w20a/proto.yml +++ b/data/pc/16w20a/proto.yml @@ -61,7 +61,7 @@ ] entityMetadataEntry: key: u8 - type: varint => + type: i8 => - byte - int - float diff --git a/data/pc/16w20a/protocol.json b/data/pc/16w20a/protocol.json index 26935d1f9..a27a18ea3 100644 --- a/data/pc/16w20a/protocol.json +++ b/data/pc/16w20a/protocol.json @@ -100,7 +100,7 @@ "type": [ "mapper", { - "type": "varint", + "type": "i8", "mappings": { "0": "byte", "1": "int", diff --git a/data/pc/16w35a/proto.yml b/data/pc/16w35a/proto.yml index 9f75001a0..ac37a1536 100644 --- a/data/pc/16w35a/proto.yml +++ b/data/pc/16w35a/proto.yml @@ -61,7 +61,7 @@ ] entityMetadataEntry: key: u8 - type: varint => + type: i8 => - byte - int - float diff --git a/data/pc/16w35a/protocol.json b/data/pc/16w35a/protocol.json index ef1615c33..e0200ebd8 100644 --- a/data/pc/16w35a/protocol.json +++ b/data/pc/16w35a/protocol.json @@ -100,7 +100,7 @@ "type": [ "mapper", { - "type": "varint", + "type": "i8", "mappings": { "0": "byte", "1": "int", diff --git a/data/pc/17w15a/proto.yml b/data/pc/17w15a/proto.yml index 9431b027f..9029d9287 100644 --- a/data/pc/17w15a/proto.yml +++ b/data/pc/17w15a/proto.yml @@ -61,7 +61,7 @@ ] entityMetadataEntry: key: u8 - type: varint => + type: i8 => - byte - int - float diff --git a/data/pc/17w15a/protocol.json b/data/pc/17w15a/protocol.json index 112c0c8b7..dd73cdd1a 100644 --- a/data/pc/17w15a/protocol.json +++ b/data/pc/17w15a/protocol.json @@ -100,7 +100,7 @@ "type": [ "mapper", { - "type": "varint", + "type": "i8", "mappings": { "0": "byte", "1": "int", diff --git a/data/pc/17w18b/proto.yml b/data/pc/17w18b/proto.yml index 07c17e743..870422a3a 100644 --- a/data/pc/17w18b/proto.yml +++ b/data/pc/17w18b/proto.yml @@ -61,7 +61,7 @@ ] entityMetadataEntry: key: u8 - type: varint => + type: i8 => - byte - int - float diff --git a/data/pc/17w18b/protocol.json b/data/pc/17w18b/protocol.json index b195c8209..96ed54db7 100644 --- a/data/pc/17w18b/protocol.json +++ b/data/pc/17w18b/protocol.json @@ -100,7 +100,7 @@ "type": [ "mapper", { - "type": "varint", + "type": "i8", "mappings": { "0": "byte", "1": "int", diff --git a/data/pc/17w50a/proto.yml b/data/pc/17w50a/proto.yml index 73b08a820..830959a55 100644 --- a/data/pc/17w50a/proto.yml +++ b/data/pc/17w50a/proto.yml @@ -60,7 +60,7 @@ ] entityMetadataEntry: key: u8 - type: varint => + type: i8 => - byte - int - float diff --git a/data/pc/17w50a/protocol.json b/data/pc/17w50a/protocol.json index 689ca72bb..99ea52d76 100644 --- a/data/pc/17w50a/protocol.json +++ b/data/pc/17w50a/protocol.json @@ -96,7 +96,7 @@ "type": [ "mapper", { - "type": "varint", + "type": "i8", "mappings": { "0": "byte", "1": "int", From a05fe9889f4f141061d3426f8c61949aa4945a82 Mon Sep 17 00:00:00 2001 From: SuperGamerTron Date: Thu, 27 Feb 2025 00:16:29 -0700 Subject: [PATCH 3/4] Add missing bitfield in 1.7 & 1.8 --- data/pc/1.7/proto.yml | 34 +++++++++++++++++++++++++++++++++- data/pc/1.7/protocol.json | 28 +++++++++++++++++++++++++++- data/pc/1.8/proto.yml | 34 +++++++++++++++++++++++++++++++++- data/pc/1.8/protocol.json | 28 +++++++++++++++++++++++++++- 4 files changed, 120 insertions(+), 4 deletions(-) diff --git a/data/pc/1.7/proto.yml b/data/pc/1.7/proto.yml index 4067247e3..8b6c4e329 100644 --- a/data/pc/1.7/proto.yml +++ b/data/pc/1.7/proto.yml @@ -76,7 +76,39 @@ pitch: f32 yaw: f32 roll: f32 - entityMetadata: ["entityMetadataLoop", { "endVal": 127, "type": "entityMetadataEntry" }] + entityMetadata: [ + "entityMetadataLoop", + { + "endVal": 127, + "type": [ + "container", + [ + { + "anon": true, + "type": [ + "bitfield", + [ + { + "name": "type", + "size": 3, + "signed": false + }, + { + "name": "key", + "size": 5, + "signed": false + } + ] + ] + }, + { + "name": "value", + "type": "entityMetadataEntry" + } + ] + ] + } + ] ^handshaking.toClient.types: packet: diff --git a/data/pc/1.7/protocol.json b/data/pc/1.7/protocol.json index ec303b457..1ef17aa68 100644 --- a/data/pc/1.7/protocol.json +++ b/data/pc/1.7/protocol.json @@ -201,7 +201,33 @@ "entityMetadataLoop", { "endVal": 127, - "type": "entityMetadataEntry" + "type": [ + "container", + [ + { + "anon": true, + "type": [ + "bitfield", + [ + { + "name": "type", + "size": 3, + "signed": false + }, + { + "name": "key", + "size": 5, + "signed": false + } + ] + ] + }, + { + "name": "value", + "type": "entityMetadataEntry" + } + ] + ] } ] }, diff --git a/data/pc/1.8/proto.yml b/data/pc/1.8/proto.yml index 2d51065b8..8620c210d 100644 --- a/data/pc/1.8/proto.yml +++ b/data/pc/1.8/proto.yml @@ -85,7 +85,39 @@ pitch: f32 yaw: f32 roll: f32 - entityMetadata: ["entityMetadataLoop", { "endVal": 127, "type": "entityMetadataEntry" }] + entityMetadata: [ + "entityMetadataLoop", + { + "endVal": 127, + "type": [ + "container", + [ + { + "anon": true, + "type": [ + "bitfield", + [ + { + "name": "type", + "size": 3, + "signed": false + }, + { + "name": "key", + "size": 5, + "signed": false + } + ] + ] + }, + { + "name": "value", + "type": "entityMetadataEntry" + } + ] + ] + } + ] ^handshaking.toClient.types: packet: diff --git a/data/pc/1.8/protocol.json b/data/pc/1.8/protocol.json index 2e0943802..6ffe79db8 100644 --- a/data/pc/1.8/protocol.json +++ b/data/pc/1.8/protocol.json @@ -171,7 +171,33 @@ "entityMetadataLoop", { "endVal": 127, - "type": "entityMetadataEntry" + "type": [ + "container", + [ + { + "anon": true, + "type": [ + "bitfield", + [ + { + "name": "type", + "size": 3, + "signed": false + }, + { + "name": "key", + "size": 5, + "signed": false + } + ] + ] + }, + { + "name": "value", + "type": "entityMetadataEntry" + } + ] + ] } ] }, From 7b978e2e849a5614ae7f10596defdb8f98290b9a Mon Sep 17 00:00:00 2001 From: SuperGamerTron Date: Sun, 16 Mar 2025 10:10:47 -0600 Subject: [PATCH 4/4] Revert 1.7/1.8 changes --- data/pc/1.7/proto.yml | 48 +++++++-------- data/pc/1.7/protocol.json | 124 +++++++++++++++----------------------- data/pc/1.8/proto.yml | 48 +++++++-------- data/pc/1.8/protocol.json | 124 +++++++++++++++----------------------- 4 files changed, 140 insertions(+), 204 deletions(-) diff --git a/data/pc/1.7/proto.yml b/data/pc/1.7/proto.yml index 8b6c4e329..bfdea925c 100644 --- a/data/pc/1.7/proto.yml +++ b/data/pc/1.7/proto.yml @@ -50,32 +50,21 @@ x: i32 y: u8 z: i32 - entityMetadataEntry: - key: u8 - type: i8 => - - byte - - short - - int - - float - - string - - item_stack - - position - - rotations - value: type ? - if byte: i8 - if short: i16 - if int: i32 - if float: f32 - if string: string - if item_stack: slot - if position: - x: i32 - y: i32 - z: i32 - if rotations: - pitch: f32 - yaw: f32 - roll: f32 + entityMetadataItem: $compareTo ? + if 0: i8 + if 1: i16 + if 2: i32 + if 3: f32 + if 4: string + if 5: slot + if 6: + x: i32 + y: i32 + z: i32 + if 7: + pitch: f32 + yaw: f32 + roll: f32 entityMetadata: [ "entityMetadataLoop", { @@ -103,7 +92,12 @@ }, { "name": "value", - "type": "entityMetadataEntry" + "type": [ + "entityMetadataItem", + { + "compareTo": "type" + } + ] } ] ] diff --git a/data/pc/1.7/protocol.json b/data/pc/1.7/protocol.json index 1ef17aa68..925b4616c 100644 --- a/data/pc/1.7/protocol.json +++ b/data/pc/1.7/protocol.json @@ -118,84 +118,53 @@ } ] ], - "entityMetadataEntry": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": [ - "mapper", - { - "type": "i8", - "mappings": { - "0": "byte", - "1": "short", - "2": "int", - "3": "float", - "4": "string", - "5": "item_stack", - "6": "position", - "7": "rotations" + "entityMetadataItem": [ + "switch", + { + "compareTo": "$compareTo", + "fields": { + "0": "i8", + "1": "i16", + "2": "i32", + "3": "f32", + "4": "string", + "5": "slot", + "6": [ + "container", + [ + { + "name": "x", + "type": "i32" + }, + { + "name": "y", + "type": "i32" + }, + { + "name": "z", + "type": "i32" } - } - ] - }, - { - "name": "value", - "type": [ - "switch", - { - "compareTo": "type", - "fields": { - "byte": "i8", - "short": "i16", - "int": "i32", - "float": "f32", - "string": "string", - "item_stack": "slot", - "position": [ - "container", - [ - { - "name": "x", - "type": "i32" - }, - { - "name": "y", - "type": "i32" - }, - { - "name": "z", - "type": "i32" - } - ] - ], - "rotations": [ - "container", - [ - { - "name": "pitch", - "type": "f32" - }, - { - "name": "yaw", - "type": "f32" - }, - { - "name": "roll", - "type": "f32" - } - ] - ] + ] + ], + "7": [ + "container", + [ + { + "name": "pitch", + "type": "f32" + }, + { + "name": "yaw", + "type": "f32" + }, + { + "name": "roll", + "type": "f32" } - } + ] ] } - ] + } ], "entityMetadata": [ "entityMetadataLoop", @@ -224,7 +193,12 @@ }, { "name": "value", - "type": "entityMetadataEntry" + "type": [ + "entityMetadataItem", + { + "compareTo": "type" + } + ] } ] ] diff --git a/data/pc/1.8/proto.yml b/data/pc/1.8/proto.yml index 8620c210d..384ad4b74 100644 --- a/data/pc/1.8/proto.yml +++ b/data/pc/1.8/proto.yml @@ -59,32 +59,21 @@ } ] ] - entityMetadataEntry: - key: u8 - type: i8 => - - byte - - short - - int - - float - - string - - item_stack - - position - - rotations - value: type ? - if byte: i8 - if short: i16 - if int: i32 - if float: f32 - if string: string - if item_stack: slot - if position: - x: i32 - y: i32 - z: i32 - if rotations: - pitch: f32 - yaw: f32 - roll: f32 + entityMetadataItem: $compareTo ? + if 0: i8 + if 1: i16 + if 2: i32 + if 3: f32 + if 4: string + if 5: slot + if 6: + x: i32 + y: i32 + z: i32 + if 7: + pitch: f32 + yaw: f32 + roll: f32 entityMetadata: [ "entityMetadataLoop", { @@ -112,7 +101,12 @@ }, { "name": "value", - "type": "entityMetadataEntry" + "type": [ + "entityMetadataItem", + { + "compareTo": "type" + } + ] } ] ] diff --git a/data/pc/1.8/protocol.json b/data/pc/1.8/protocol.json index 6ffe79db8..733701a1a 100644 --- a/data/pc/1.8/protocol.json +++ b/data/pc/1.8/protocol.json @@ -88,84 +88,53 @@ } ] ], - "entityMetadataEntry": [ - "container", - [ - { - "name": "key", - "type": "u8" - }, - { - "name": "type", - "type": [ - "mapper", - { - "type": "i8", - "mappings": { - "0": "byte", - "1": "short", - "2": "int", - "3": "float", - "4": "string", - "5": "item_stack", - "6": "position", - "7": "rotations" + "entityMetadataItem": [ + "switch", + { + "compareTo": "$compareTo", + "fields": { + "0": "i8", + "1": "i16", + "2": "i32", + "3": "f32", + "4": "string", + "5": "slot", + "6": [ + "container", + [ + { + "name": "x", + "type": "i32" + }, + { + "name": "y", + "type": "i32" + }, + { + "name": "z", + "type": "i32" } - } - ] - }, - { - "name": "value", - "type": [ - "switch", - { - "compareTo": "type", - "fields": { - "byte": "i8", - "short": "i16", - "int": "i32", - "float": "f32", - "string": "string", - "item_stack": "slot", - "position": [ - "container", - [ - { - "name": "x", - "type": "i32" - }, - { - "name": "y", - "type": "i32" - }, - { - "name": "z", - "type": "i32" - } - ] - ], - "rotations": [ - "container", - [ - { - "name": "pitch", - "type": "f32" - }, - { - "name": "yaw", - "type": "f32" - }, - { - "name": "roll", - "type": "f32" - } - ] - ] + ] + ], + "7": [ + "container", + [ + { + "name": "pitch", + "type": "f32" + }, + { + "name": "yaw", + "type": "f32" + }, + { + "name": "roll", + "type": "f32" } - } + ] ] } - ] + } ], "entityMetadata": [ "entityMetadataLoop", @@ -194,7 +163,12 @@ }, { "name": "value", - "type": "entityMetadataEntry" + "type": [ + "entityMetadataItem", + { + "compareTo": "type" + } + ] } ] ]