diff --git a/data/pc/1.10-pre1/proto.yml b/data/pc/1.10-pre1/proto.yml index a558db344..053f179ba 100644 --- a/data/pc/1.10-pre1/proto.yml +++ b/data/pc/1.10-pre1/proto.yml @@ -60,65 +60,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: i8 => + - 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 01ebc9d33..87655a580 100644 --- a/data/pc/1.10-pre1/protocol.json +++ b/data/pc/1.10-pre1/protocol.json @@ -112,83 +112,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": "i8", + "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 767b8f51b..5cffba35c 100644 --- a/data/pc/1.10/proto.yml +++ b/data/pc/1.10/proto.yml @@ -60,65 +60,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: i8 => + - 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 01ebc9d33..87655a580 100644 --- a/data/pc/1.10/protocol.json +++ b/data/pc/1.10/protocol.json @@ -112,83 +112,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": "i8", + "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 acfc12644..bb5dc1abe 100644 --- a/data/pc/1.11/proto.yml +++ b/data/pc/1.11/proto.yml @@ -60,65 +60,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: i8 => + - 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 7b2d648cb..39ad6c10d 100644 --- a/data/pc/1.11/protocol.json +++ b/data/pc/1.11/protocol.json @@ -112,83 +112,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": "i8", + "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 3fc5a4f97..e2e9b4beb 100644 --- a/data/pc/1.12-pre4/proto.yml +++ b/data/pc/1.12-pre4/proto.yml @@ -60,66 +60,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: i8 => + - 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 79c1a895a..d3cfef0cc 100644 --- a/data/pc/1.12-pre4/protocol.json +++ b/data/pc/1.12-pre4/protocol.json @@ -112,84 +112,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": "i8", + "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 6eeefb377..a3d19f23e 100644 --- a/data/pc/1.12.1/proto.yml +++ b/data/pc/1.12.1/proto.yml @@ -60,66 +60,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: i8 => + - 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 34a18e253..0ccbf4d67 100644 --- a/data/pc/1.12.1/protocol.json +++ b/data/pc/1.12.1/protocol.json @@ -112,84 +112,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": "i8", + "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 065fc4573..15896a8d0 100644 --- a/data/pc/1.12.2/proto.yml +++ b/data/pc/1.12.2/proto.yml @@ -60,66 +60,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: i8 => + - 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 927c8032c..1c5dba3f5 100644 --- a/data/pc/1.12.2/protocol.json +++ b/data/pc/1.12.2/protocol.json @@ -112,84 +112,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": "i8", + "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 df2b7cde4..560ec95a7 100644 --- a/data/pc/1.12/proto.yml +++ b/data/pc/1.12/proto.yml @@ -60,66 +60,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: i8 => + - 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 cd9d65648..9fe5eba1a 100644 --- a/data/pc/1.12/protocol.json +++ b/data/pc/1.12/protocol.json @@ -112,84 +112,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": "i8", + "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 25ee1881e..491450b9b 100644 --- a/data/pc/1.13.1/proto.yml +++ b/data/pc/1.13.1/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.1/protocol.json b/data/pc/1.13.1/protocol.json index 717f48c22..7e6b7129a 100644 --- a/data/pc/1.13.1/protocol.json +++ b/data/pc/1.13.1/protocol.json @@ -190,89 +190,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 7d4a012d3..9dad1a8f9 100644 --- a/data/pc/1.13.2-pre1/proto.yml +++ b/data/pc/1.13.2-pre1/proto.yml @@ -82,71 +82,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 538490790..fac47d4fe 100644 --- a/data/pc/1.13.2-pre1/protocol.json +++ b/data/pc/1.13.2-pre1/protocol.json @@ -194,89 +194,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 1728e2f3a..34fd0bfb7 100644 --- a/data/pc/1.13.2-pre2/proto.yml +++ b/data/pc/1.13.2-pre2/proto.yml @@ -82,71 +82,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 538490790..fac47d4fe 100644 --- a/data/pc/1.13.2-pre2/protocol.json +++ b/data/pc/1.13.2-pre2/protocol.json @@ -194,89 +194,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 741bd0a57..758136b70 100644 --- a/data/pc/1.13.2/proto.yml +++ b/data/pc/1.13.2/proto.yml @@ -82,71 +82,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 1798dca7e..63eb97068 100644 --- a/data/pc/1.13.2/protocol.json +++ b/data/pc/1.13.2/protocol.json @@ -194,89 +194,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 768e557d6..a89a6dd01 100644 --- a/data/pc/1.13/proto.yml +++ b/data/pc/1.13/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/protocol.json b/data/pc/1.13/protocol.json index 1dda4850b..36bdc0eb9 100644 --- a/data/pc/1.13/protocol.json +++ b/data/pc/1.13/protocol.json @@ -190,89 +190,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 e5a27b4e4..6b705618a 100644 --- a/data/pc/1.14.1/proto.yml +++ b/data/pc/1.14.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.14.1/protocol.json b/data/pc/1.14.1/protocol.json index 1b400c31d..83d05e25f 100644 --- a/data/pc/1.14.1/protocol.json +++ b/data/pc/1.14.1/protocol.json @@ -195,108 +195,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 e00e7c470..4536e8975 100644 --- a/data/pc/1.14.3/proto.yml +++ b/data/pc/1.14.3/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.14.3/protocol.json b/data/pc/1.14.3/protocol.json index 2e51ff1aa..2493de696 100644 --- a/data/pc/1.14.3/protocol.json +++ b/data/pc/1.14.3/protocol.json @@ -195,108 +195,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 a5ea14dcf..eafe62477 100644 --- a/data/pc/1.14.4/proto.yml +++ b/data/pc/1.14.4/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.14.4/protocol.json b/data/pc/1.14.4/protocol.json index 0406bd839..ac6f426d4 100644 --- a/data/pc/1.14.4/protocol.json +++ b/data/pc/1.14.4/protocol.json @@ -195,108 +195,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 6829a6005..e0b673ded 100644 --- a/data/pc/1.14/proto.yml +++ b/data/pc/1.14/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.14/protocol.json b/data/pc/1.14/protocol.json index 1b400c31d..83d05e25f 100644 --- a/data/pc/1.14/protocol.json +++ b/data/pc/1.14/protocol.json @@ -195,108 +195,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 d87689fdb..49fe31652 100644 --- a/data/pc/1.15.1/proto.yml +++ b/data/pc/1.15.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.15.1/protocol.json b/data/pc/1.15.1/protocol.json index 3d4acadaa..c2fabeeb1 100644 --- a/data/pc/1.15.1/protocol.json +++ b/data/pc/1.15.1/protocol.json @@ -195,108 +195,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 757bf4cc3..0b7845814 100644 --- a/data/pc/1.15.2/proto.yml +++ b/data/pc/1.15.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.15.2/protocol.json b/data/pc/1.15.2/protocol.json index 3d4acadaa..c2fabeeb1 100644 --- a/data/pc/1.15.2/protocol.json +++ b/data/pc/1.15.2/protocol.json @@ -195,108 +195,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 8f7df309a..d4f12b6cb 100644 --- a/data/pc/1.15/proto.yml +++ b/data/pc/1.15/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.15/protocol.json b/data/pc/1.15/protocol.json index 3d4acadaa..c2fabeeb1 100644 --- a/data/pc/1.15/protocol.json +++ b/data/pc/1.15/protocol.json @@ -195,108 +195,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 bbdfb98bc..3413c2bba 100644 --- a/data/pc/1.16-rc1/proto.yml +++ b/data/pc/1.16-rc1/proto.yml @@ -84,77 +84,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 8ed97db39..6e37cce23 100644 --- a/data/pc/1.16-rc1/protocol.json +++ b/data/pc/1.16-rc1/protocol.json @@ -196,108 +196,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 470f71460..e084d70ca 100644 --- a/data/pc/1.16.1/proto.yml +++ b/data/pc/1.16.1/proto.yml @@ -84,77 +84,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 8ed97db39..6e37cce23 100644 --- a/data/pc/1.16.1/protocol.json +++ b/data/pc/1.16.1/protocol.json @@ -196,108 +196,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 ed79e86fe..9e89f691b 100644 --- a/data/pc/1.16.2/proto.yml +++ b/data/pc/1.16.2/proto.yml @@ -84,77 +84,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 80106885a..3084f6fd6 100644 --- a/data/pc/1.16.2/protocol.json +++ b/data/pc/1.16.2/protocol.json @@ -196,108 +196,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 582bf34c5..b1a30fa52 100644 --- a/data/pc/1.16/proto.yml +++ b/data/pc/1.16/proto.yml @@ -84,77 +84,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 8ed97db39..6e37cce23 100644 --- a/data/pc/1.16/protocol.json +++ b/data/pc/1.16/protocol.json @@ -196,108 +196,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 31e0ac90b..b74c81344 100644 --- a/data/pc/1.17.1/proto.yml +++ b/data/pc/1.17.1/proto.yml @@ -99,77 +99,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 4c969b284..f71da6ba2 100644 --- a/data/pc/1.17.1/protocol.json +++ b/data/pc/1.17.1/protocol.json @@ -259,108 +259,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 794026bea..e633d90c9 100644 --- a/data/pc/1.17/proto.yml +++ b/data/pc/1.17/proto.yml @@ -99,77 +99,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 24b10f09d..d431c3afb 100644 --- a/data/pc/1.17/protocol.json +++ b/data/pc/1.17/protocol.json @@ -259,108 +259,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 2efaead48..ab756b757 100644 --- a/data/pc/1.18.2/proto.yml +++ b/data/pc/1.18.2/proto.yml @@ -103,77 +103,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 80e52f078..5efe49f02 100644 --- a/data/pc/1.18.2/protocol.json +++ b/data/pc/1.18.2/protocol.json @@ -270,108 +270,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 aa75dfd1e..acd8649e1 100644 --- a/data/pc/1.18/proto.yml +++ b/data/pc/1.18/proto.yml @@ -103,77 +103,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 ac4905db8..b2768e8ee 100644 --- a/data/pc/1.18/protocol.json +++ b/data/pc/1.18/protocol.json @@ -270,108 +270,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 cefa2c18f..528be9451 100644 --- a/data/pc/1.19.2/proto.yml +++ b/data/pc/1.19.2/proto.yml @@ -119,84 +119,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 0a7d5e1e5..20cddd396 100644 --- a/data/pc/1.19.2/protocol.json +++ b/data/pc/1.19.2/protocol.json @@ -333,115 +333,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 a956094f2..c2183b91b 100644 --- a/data/pc/1.19.3/proto.yml +++ b/data/pc/1.19.3/proto.yml @@ -142,85 +142,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 8c42ed922..35322c559 100644 --- a/data/pc/1.19.3/protocol.json +++ b/data/pc/1.19.3/protocol.json @@ -389,116 +389,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 96ca54f1f..704adb4f1 100644 --- a/data/pc/1.19.4/proto.yml +++ b/data/pc/1.19.4/proto.yml @@ -158,116 +158,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 ec3186576..6a71dbed4 100644 --- a/data/pc/1.19.4/protocol.json +++ b/data/pc/1.19.4/protocol.json @@ -457,147 +457,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 b0d60b985..886c51b3c 100644 --- a/data/pc/1.19/proto.yml +++ b/data/pc/1.19/proto.yml @@ -111,77 +111,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 4f3384ebe..346be7e65 100644 --- a/data/pc/1.19/protocol.json +++ b/data/pc/1.19/protocol.json @@ -309,108 +309,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 14b3ce7e0..e0ebb2a77 100644 --- a/data/pc/1.20.2/proto.yml +++ b/data/pc/1.20.2/proto.yml @@ -158,116 +158,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 3ffee3eb9..287fa0b1b 100644 --- a/data/pc/1.20.2/protocol.json +++ b/data/pc/1.20.2/protocol.json @@ -457,147 +457,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 7fd0c7629..2833e729f 100644 --- a/data/pc/1.20.3/proto.yml +++ b/data/pc/1.20.3/proto.yml @@ -264,116 +264,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 cb6240a81..d4bd26886 100644 --- a/data/pc/1.20.3/protocol.json +++ b/data/pc/1.20.3/protocol.json @@ -564,147 +564,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 d18d1421a..ef660d661 100644 --- a/data/pc/1.20/proto.yml +++ b/data/pc/1.20/proto.yml @@ -158,116 +158,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 7b8ab214e..8bacd8a73 100644 --- a/data/pc/1.20/protocol.json +++ b/data/pc/1.20/protocol.json @@ -457,147 +457,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.9.1-pre2/proto.yml b/data/pc/1.9.1-pre2/proto.yml index cc5003910..e6d608844 100644 --- a/data/pc/1.9.1-pre2/proto.yml +++ b/data/pc/1.9.1-pre2/proto.yml @@ -60,65 +60,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: i8 => + - 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 cdd0a73d0..fcccad88e 100644 --- a/data/pc/1.9.1-pre2/protocol.json +++ b/data/pc/1.9.1-pre2/protocol.json @@ -112,83 +112,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": "i8", + "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 e790a0f4f..53fbd6586 100644 --- a/data/pc/1.9.2/proto.yml +++ b/data/pc/1.9.2/proto.yml @@ -60,65 +60,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: i8 => + - 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 cdd0a73d0..fcccad88e 100644 --- a/data/pc/1.9.2/protocol.json +++ b/data/pc/1.9.2/protocol.json @@ -112,83 +112,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": "i8", + "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 51ebd2bc4..c289bd424 100644 --- a/data/pc/1.9.4/proto.yml +++ b/data/pc/1.9.4/proto.yml @@ -60,65 +60,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: i8 => + - 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 bccdb3522..cd9634f36 100644 --- a/data/pc/1.9.4/protocol.json +++ b/data/pc/1.9.4/protocol.json @@ -112,83 +112,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": "i8", + "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 520202b58..0d7d7c995 100644 --- a/data/pc/1.9/proto.yml +++ b/data/pc/1.9/proto.yml @@ -60,65 +60,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: i8 => + - 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 640171d3a..95d8dfe33 100644 --- a/data/pc/1.9/protocol.json +++ b/data/pc/1.9/protocol.json @@ -112,83 +112,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": "i8", + "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 ea1798006..e76355b42 100644 --- a/data/pc/15w40b/proto.yml +++ b/data/pc/15w40b/proto.yml @@ -60,65 +60,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: i8 => + - 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 2b5f6d4a0..3122025de 100644 --- a/data/pc/15w40b/protocol.json +++ b/data/pc/15w40b/protocol.json @@ -112,83 +112,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": "i8", + "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 7e73b3eb1..ed4aef23d 100644 --- a/data/pc/16w20a/proto.yml +++ b/data/pc/16w20a/proto.yml @@ -60,65 +60,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: i8 => + - 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 1dd5da6bf..c728c8329 100644 --- a/data/pc/16w20a/protocol.json +++ b/data/pc/16w20a/protocol.json @@ -112,83 +112,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": "i8", + "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 f489a6080..887498e9d 100644 --- a/data/pc/16w35a/proto.yml +++ b/data/pc/16w35a/proto.yml @@ -60,65 +60,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: i8 => + - 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 894e869a8..e6067647c 100644 --- a/data/pc/16w35a/protocol.json +++ b/data/pc/16w35a/protocol.json @@ -112,83 +112,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": "i8", + "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 b9f61cdce..d83425424 100644 --- a/data/pc/17w15a/proto.yml +++ b/data/pc/17w15a/proto.yml @@ -60,66 +60,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: i8 => + - 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 b827b8f06..2a2a42843 100644 --- a/data/pc/17w15a/protocol.json +++ b/data/pc/17w15a/protocol.json @@ -112,84 +112,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": "i8", + "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 808a69d10..69a1ebe2c 100644 --- a/data/pc/17w18b/proto.yml +++ b/data/pc/17w18b/proto.yml @@ -60,66 +60,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: i8 => + - 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 3065237ff..162c2d9e9 100644 --- a/data/pc/17w18b/protocol.json +++ b/data/pc/17w18b/protocol.json @@ -112,84 +112,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": "i8", + "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 aa9df90e7..1f5b4eb61 100644 --- a/data/pc/17w50a/proto.yml +++ b/data/pc/17w50a/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: i8 => + - 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 7c73e11e2..365dbec60 100644 --- a/data/pc/17w50a/protocol.json +++ b/data/pc/17w50a/protocol.json @@ -108,84 +108,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": "i8", + "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 cdafcd034..45bf7b982 100644 --- a/data/pc/20w13b/proto.yml +++ b/data/pc/20w13b/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/20w13b/protocol.json b/data/pc/20w13b/protocol.json index 66fdb8b50..a7f1315e1 100644 --- a/data/pc/20w13b/protocol.json +++ b/data/pc/20w13b/protocol.json @@ -195,108 +195,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 b4d2f2177..fe4aa4581 100644 --- a/data/pc/21w07a/proto.yml +++ b/data/pc/21w07a/proto.yml @@ -84,77 +84,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 5175e145e..21106d4cf 100644 --- a/data/pc/21w07a/protocol.json +++ b/data/pc/21w07a/protocol.json @@ -196,108 +196,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": [