From 6a7ad6ab98f5a8317ae30d4fb3d8ceaeb71832d1 Mon Sep 17 00:00:00 2001 From: extremeheat Date: Wed, 26 May 2021 11:08:19 -0400 Subject: [PATCH 001/273] protocol: Fix position serialization --- data/1.16.220/protocol.json | 88 +++++++------------------------------ data/latest/proto.yml | 32 ++++---------- 2 files changed, 25 insertions(+), 95 deletions(-) diff --git a/data/1.16.220/protocol.json b/data/1.16.220/protocol.json index 4d0de82..0fb610a 100644 --- a/data/1.16.220/protocol.json +++ b/data/1.16.220/protocol.json @@ -4177,28 +4177,12 @@ "type": "string" }, { - "name": "x", - "type": "lf32" + "name": "position", + "type": "vec3f" }, { - "name": "y", - "type": "lf32" - }, - { - "name": "z", - "type": "lf32" - }, - { - "name": "speed_x", - "type": "lf32" - }, - { - "name": "speed_y", - "type": "lf32" - }, - { - "name": "speed_z", - "type": "lf32" + "name": "velocity", + "type": "vec3f" }, { "name": "pitch", @@ -4274,28 +4258,12 @@ "type": "string" }, { - "name": "x", - "type": "lf32" + "name": "position", + "type": "vec3f" }, { - "name": "y", - "type": "lf32" - }, - { - "name": "z", - "type": "lf32" - }, - { - "name": "speed_x", - "type": "lf32" - }, - { - "name": "speed_y", - "type": "lf32" - }, - { - "name": "speed_z", - "type": "lf32" + "name": "velocity", + "type": "vec3f" }, { "name": "pitch", @@ -4348,28 +4316,12 @@ "type": "Item" }, { - "name": "x", - "type": "lf32" + "name": "position", + "type": "vec3f" }, { - "name": "y", - "type": "lf32" - }, - { - "name": "z", - "type": "lf32" - }, - { - "name": "speed_x", - "type": "lf32" - }, - { - "name": "speed_y", - "type": "lf32" - }, - { - "name": "speed_z", - "type": "lf32" + "name": "velocity", + "type": "vec3f" }, { "name": "metadata", @@ -4547,7 +4499,7 @@ }, { "name": "coordinates", - "type": "BlockCoordinates" + "type": "vec3f" }, { "name": "direction", @@ -5137,16 +5089,8 @@ "container", [ { - "name": "x", - "type": "lf32" - }, - { - "name": "y", - "type": "lf32" - }, - { - "name": "z", - "type": "lf32" + "name": "position", + "type": "vec3f" }, { "name": "state", @@ -7192,7 +7136,7 @@ "container", [ { - "name": "dimension_id", + "name": "dimension", "type": "u8" }, { diff --git a/data/latest/proto.yml b/data/latest/proto.yml index 1513e1f..fc04f94 100644 --- a/data/latest/proto.yml +++ b/data/latest/proto.yml @@ -401,12 +401,8 @@ packet_add_player: # Nintendo Switch). It is otherwise an empty string, and is used to decide which players # are able to chat with each other. platform_chat_id: string - x: lf32 - y: lf32 - z: lf32 - speed_x: lf32 - speed_y: lf32 - speed_z: lf32 + position: vec3f + velocity: vec3f pitch: lf32 yaw: lf32 head_yaw: lf32 @@ -428,12 +424,8 @@ packet_add_entity: entity_id_self: zigzag64 runtime_entity_id: varint64 entity_type: string - x: lf32 - y: lf32 - z: lf32 - speed_x: lf32 - speed_y: lf32 - speed_z: lf32 + position: vec3f + velocity: vec3f pitch: lf32 yaw: lf32 head_yaw: lf32 @@ -452,12 +444,8 @@ packet_add_item_entity: entity_id_self: zigzag64 runtime_entity_id: varint64 item: Item - x: lf32 - y: lf32 - z: lf32 - speed_x: lf32 - speed_y: lf32 - speed_z: lf32 + position: vec3f + velocity: vec3f metadata: MetadataDictionary is_from_fishing: bool @@ -573,7 +561,7 @@ packet_add_painting: !bound: client entity_id_self: zigzag64 runtime_entity_id: varint64 - coordinates: BlockCoordinates + coordinates: vec3f direction: zigzag32 title: string @@ -937,9 +925,7 @@ packet_animate: packet_respawn: !id: 0x2d !bound: both - x: lf32 - y: lf32 - z: lf32 + position: vec3f state: u8 runtime_entity_id: varint64 @@ -2023,7 +2009,7 @@ packet_script_custom_event: packet_spawn_particle_effect: !id: 0x76 !bound: client - dimension_id: u8 + dimension: u8 entity_id: zigzag64 position: vec3f particle_name: string From 5af828bcb7aa0df4705702ae43ec2ef0875721a3 Mon Sep 17 00:00:00 2001 From: extremeheat Date: Sat, 29 May 2021 21:09:51 -0400 Subject: [PATCH 002/273] Update types, add `authTitle` option to relay, client renderDistance -> viewDistance --- .npmignore | 6 +++++- data/latest/proto.yml | 30 +++++++++++++++++++++++++++++- examples/createRelay.js | 7 +++++-- index.d.ts | 35 +++++++++++++++++++++++++++-------- src/createClient.js | 5 ++++- src/relay.js | 5 +++-- 6 files changed, 73 insertions(+), 15 deletions(-) diff --git a/.npmignore b/.npmignore index a085593..c80c616 100644 --- a/.npmignore +++ b/.npmignore @@ -4,4 +4,8 @@ __* src/**/*.json # Runtime generated data data/**/sample -tools/bds* \ No newline at end of file +tools/bds* +# Extra data +examples +test +.github \ No newline at end of file diff --git a/data/latest/proto.yml b/data/latest/proto.yml index fc04f94..079f2d3 100644 --- a/data/latest/proto.yml +++ b/data/latest/proto.yml @@ -1014,6 +1014,16 @@ packet_container_set_data: window_id: WindowID # Key is the key of the property. It is one of the constants that can be found above. Multiple properties # share the same key, but the functionality depends on the type of the container that the data is set to. + # IF FURNACE: + # 0: furnace_tick_count + # 1: furnace_lit_time + # 2: furnace_lit_duration + # 3: furnace_stored_xp + # 4: furnace_fuel_aux + # IF BREWING STAND: + # 0: brew_time + # 1: brew_fuel_amount + # 2: brew_fuel_total property: zigzag32 # Value is the value of the property. Its use differs per property. value: zigzag32 @@ -1329,14 +1339,24 @@ packet_map_info_request: !bound: both map_id: zigzag64 +# RequestChunkRadius is sent by the client to the server to update the server on the chunk view radius that +# it has set in the settings. The server may respond with a ChunkRadiusUpdated packet with either the chunk +# radius requested, or a different chunk radius if the server chooses so. packet_request_chunk_radius: !id: 0x45 !bound: both + # ChunkRadius is the requested chunk radius. This value is always the value set in the settings of the + # player. chunk_radius: zigzag32 +# ChunkRadiusUpdated is sent by the server in response to a RequestChunkRadius packet. It defines the chunk +# radius that the server allows the client to have. This may be lower than the chunk radius requested by the +# client in the RequestChunkRadius packet. packet_chunk_radius_update: !id: 0x46 !bound: client + # ChunkRadius is the final chunk radius that the client will adapt when it receives the packet. It does + # not have to be the same as the requested chunk radius. chunk_radius: zigzag32 packet_item_frame_drop_item: @@ -1994,11 +2014,19 @@ packet_update_soft_enum: !id: 0x72 !bound: client +# NetworkStackLatency is sent by the server (and the client, on development builds) to measure the latency +# over the entire Minecraft stack, rather than the RakNet latency. It has other usages too, such as the +# ability to be used as some kind of acknowledgement packet, to know when the client has received a certain +# other packet. packet_network_stack_latency: !id: 0x73 !bound: both + # Timestamp is the timestamp of the network stack latency packet. The client will, if NeedsResponse is + # set to true, send a NetworkStackLatency packet with this same timestamp packet in response. timestamp: lu64 - unknown_flag: u8 + # NeedsResponse specifies if the sending side of this packet wants a response to the packet, meaning that + # the other side should send a NetworkStackLatency packet back. + needs_response: u8 packet_script_custom_event: !id: 0x75 diff --git a/examples/createRelay.js b/examples/createRelay.js index 7209904..f99a0ee 100644 --- a/examples/createRelay.js +++ b/examples/createRelay.js @@ -1,4 +1,4 @@ -const { Relay } = require('../src/relay') +const { Relay, title } = require('bedrock-protocol') function createRelay () { console.log('Creating relay') @@ -7,10 +7,13 @@ function createRelay () { /* host and port for clients to listen to */ host: '0.0.0.0', port: 19130, + offline: false, + authTitle: title.MinecraftNintendoSwitch, /* Where to send upstream packets to */ destination: { host: '127.0.0.1', - port: 19132 + port: 19132, + offline: false } }) relay.conLog = console.debug diff --git a/index.d.ts b/index.d.ts index b08e207..e403471 100644 --- a/index.d.ts +++ b/index.d.ts @@ -7,15 +7,27 @@ declare module "bedrock-protocol" { export interface Options { // The string version to start the client or server as - version: number, + version: string // For the client, the host of the server to connect to (default: 127.0.0.1) // For the server, the host to bind to (default: 0.0.0.0) - host: string, + host: string // The port to connect or bind to, default: 19132 - port: number, - // The maximum number of players allowed on the server at any time. - maxPlayers: number, + port: number + // For the client, if we should login with Microsoft/Xbox Live. + // For the server, if we should verify client's authentication with Xbox Live. + offline: boolean + } + export interface ClientOptions extends Options { + // The view distance in chunks + viewDistance: number, + // Specifies which game edition to sign in as. Optional, but some servers verify this. + authTitle: title | string + } + + export interface ServerOptions extends Options { + // The maximum number of players allowed on the server at any time. + maxPlayers: number motd: { // The header for the MOTD shown in the server list. motd: string, @@ -109,12 +121,19 @@ declare module "bedrock-protocol" { port: number, // Toggle packet logging. logging: boolean, + // Skip authentication for connecting clients? + offline: false, + // Specifies which game edition to sign in as to the destination server. Optional, but some servers verify this. + authTitle: title | string // Where to proxy requests to. destination: { host: string, - port: number + port: number, + // Skip authentication connecting to the remote server? + offline: false, } } + export class Relay extends Server { constructor(options: RelayOptions) } @@ -132,8 +151,8 @@ declare module "bedrock-protocol" { serverId: string } - export function createClient(options: Options): Client - export function createServer(options: Options): Server + export function createClient(options: ClientOptions): Client + export function createServer(options: ServerOptions): Server export function ping({ host, port }) : ServerAdvertisement } \ No newline at end of file diff --git a/src/createClient.js b/src/createClient.js index 77b2fc9..34a07db 100644 --- a/src/createClient.js +++ b/src/createClient.js @@ -2,6 +2,7 @@ const { Client } = require('./client') const { RakClient } = require('./rak') const assert = require('assert') const advertisement = require('./server/advertisement') +const { sleep } = require('./datatypes/util') /** @param {{ version?: number, host: string, port?: number, connectTimeout?: number }} options */ function createClient (options) { @@ -37,11 +38,13 @@ function connect (client) { response_status: 'completed', resourcepackids: [] }) - client.queue('request_chunk_radius', { chunk_radius: client.renderDistance || 10 }) }) client.queue('client_cache_status', { enabled: false }) client.queue('tick_sync', { request_time: BigInt(Date.now()), response_time: 0n }) + if (client.viewDistance) { + sleep(500).then(() => client.queue('request_chunk_radius', { chunk_radius: client.viewDistance })) + } }) const KEEPALIVE_INTERVAL = 10 // Send tick sync packets every 10 ticks diff --git a/src/relay.js b/src/relay.js index d7aa98c..0a382b4 100644 --- a/src/relay.js +++ b/src/relay.js @@ -3,7 +3,7 @@ const { Server } = require('./server') const { Player } = require('./serverPlayer') const debug = globalThis.isElectron ? console.debug : require('debug')('minecraft-protocol') -const debugging = true // Do re-encoding tests +const debugging = false // Do re-encoding tests class RelayPlayer extends Player { constructor (server, conn) { @@ -154,7 +154,8 @@ class Relay extends Server { openUpstreamConnection (ds, clientAddr) { const client = new Client({ - offline: this.options.offline, + authTitle: this.options.authTitle, + offline: this.options.destination.offline ?? this.options.offline, username: this.options.offline ? ds.profile.name : null, version: this.options.version, host: this.options.destination.host, From e9098aa744584e7e2083aeb1fa5833cb7ff8867d Mon Sep 17 00:00:00 2001 From: extremeheat Date: Sat, 29 May 2021 23:56:33 -0400 Subject: [PATCH 003/273] test/proxy: extra debug logging --- data/1.16.220/protocol.json | 2 +- data/latest/types.yaml | 5 +++-- src/client.js | 6 +++--- test/proxy.js | 4 ++++ 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/data/1.16.220/protocol.json b/data/1.16.220/protocol.json index 0fb610a..b9e00f0 100644 --- a/data/1.16.220/protocol.json +++ b/data/1.16.220/protocol.json @@ -7114,7 +7114,7 @@ "type": "lu64" }, { - "name": "unknown_flag", + "name": "needs_response", "type": "u8" } ] diff --git a/data/latest/types.yaml b/data/latest/types.yaml index 9410467..5e05b31 100644 --- a/data/latest/types.yaml +++ b/data/latest/types.yaml @@ -1015,8 +1015,9 @@ MapDecoration: # automatically, whereas others may be changed. color_abgr: varint -# Some arbitrary definitions from CBMC, Window IDs are normally -# unique + sequential +# List of Window IDs. When a new container is opened (container_open), a new sequential Window ID is created. +# Below window IDs are hard-coded and created when the game starts and the server does not +# send a `container_open` for them. WindowID: i8 => -100: drop_contents -24: beacon diff --git a/src/client.js b/src/client.js index 0f82802..e675367 100644 --- a/src/client.js +++ b/src/client.js @@ -43,7 +43,7 @@ class Client extends Connection { this.on('session', this._connect) if (this.options.offline) { - console.debug('offline mode, not authenticating', this.options) + debug('offline mode, not authenticating', this.options) auth.createOfflineSession(this, this.options) } else { auth.authenticateDeviceCode(this, this.options) @@ -122,7 +122,7 @@ class Client extends Connection { } onDisconnectRequest (packet) { - console.warn(`C Server requested ${packet.hide_disconnect_reason ? 'silent disconnect' : 'disconnect'}: ${packet.message}`) + console.warn(`Server requested ${packet.hide_disconnect_reason ? 'silent disconnect' : 'disconnect'}: ${packet.message}`) this.emit('kick', packet) this.close() } @@ -140,7 +140,7 @@ class Client extends Connection { close () { if (this.status !== ClientStatus.Disconnected) { this.emit('close') // Emit close once - console.log('Client closed!') + debug('Client closed!') } clearInterval(this.loop) clearTimeout(this.connectTimeout) diff --git a/test/proxy.js b/test/proxy.js index 5c98785..2ea17b9 100644 --- a/test/proxy.js +++ b/test/proxy.js @@ -11,7 +11,9 @@ function proxyTest (version, timeout = 1000 * 40) { }) server.on('connect', client => { + console.debug('Client has connected') client.on('join', () => { // The client has joined the server. + console.debug('Client has authenticated') setTimeout(() => { client.disconnect('Hello world !') }, 1000) // allow some time for client to connect @@ -41,6 +43,8 @@ function proxyTest (version, timeout = 1000 * 40) { console.debug('Client started') + client.on('packet', console.log) + client.on('disconnect', packet => { console.assert(packet.message === 'Hello world !') From d981515a7540327c554e67b8cc3583c7debfaf2b Mon Sep 17 00:00:00 2001 From: extremeheat Date: Sun, 30 May 2021 00:09:33 -0400 Subject: [PATCH 004/273] Release 3.2.1 --- HISTORY.md | 12 ++++++++---- data/latest/types.yaml | 2 +- package.json | 2 +- src/createClient.js | 4 +--- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index d6f0347..b731bf8 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,10 +1,14 @@ +## 3.2.1 +* Add `authTitle` option to Relay proxy [#92](https://github.com/PrismarineJS/bedrock-protocol/pull/92) +* Protocol, type definition fixes + ## 3.2.0 -* Fix empty chunks on proxy spawn (#89) -* Send skin data to server (#88) -* Support xbox title + live.com auth (#86) +* Fix empty chunks on proxy spawn [#89](https://github.com/PrismarineJS/bedrock-protocol/pull/89) +* Send skin data to server [#88](https://github.com/PrismarineJS/bedrock-protocol/pull/88) +* Support xbox title + live.com auth [#86](https://github.com/PrismarineJS/bedrock-protocol/pull/86) * Protocol updates and fixes -* Fix third party servers, optional client encryption (#83) +* Fix third party servers, optional client encryption [#83](https://github.com/PrismarineJS/bedrock-protocol/pull/83) ## 3.1.0 * Add support for 1.16 diff --git a/data/latest/types.yaml b/data/latest/types.yaml index 5e05b31..95f395e 100644 --- a/data/latest/types.yaml +++ b/data/latest/types.yaml @@ -130,7 +130,7 @@ Item: # When server authoritative inventory is enabled, all allocated items have a unique ID used to identify # a specifc item instance. has_stack_id: u8 - # StackNetworkID is the network ID of the item stack. If the stack is empty, 0 is always written for this + # StackNetworkID is the network ID of this item *instance*. If the stack is empty, 0 is always written for this # field. If not, the field should be set to 1 if the server authoritative inventories are disabled in the # StartGame packet, or to a unique stack ID if it is enabled. stack_id: has_stack_id ? diff --git a/package.json b/package.json index 4f6280b..eb8a935 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bedrock-protocol", - "version": "3.2.0", + "version": "3.2.1", "description": "Minecraft Bedrock Edition protocol library", "main": "index.js", "scripts": { diff --git a/src/createClient.js b/src/createClient.js index 34a07db..50009be 100644 --- a/src/createClient.js +++ b/src/createClient.js @@ -42,9 +42,7 @@ function connect (client) { client.queue('client_cache_status', { enabled: false }) client.queue('tick_sync', { request_time: BigInt(Date.now()), response_time: 0n }) - if (client.viewDistance) { - sleep(500).then(() => client.queue('request_chunk_radius', { chunk_radius: client.viewDistance })) - } + sleep(500).then(() => client.queue('request_chunk_radius', { chunk_radius: client.viewDistance || 10 })) }) const KEEPALIVE_INTERVAL = 10 // Send tick sync packets every 10 ticks From 01575ecd6f84a3a2a41e27fe2776af82f42f9b19 Mon Sep 17 00:00:00 2001 From: extremeheat Date: Thu, 3 Jun 2021 04:25:47 +0000 Subject: [PATCH 005/273] temporary install fix --- package.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index eb8a935..eb3d8c2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bedrock-protocol", - "version": "3.2.1", + "version": "3.2.2", "description": "Minecraft Bedrock Edition protocol library", "main": "index.js", "scripts": { @@ -30,7 +30,7 @@ "minecraft-folder-path": "^1.1.0", "node-fetch": "^2.6.1", "prismarine-nbt": "^1.5.0", - "protodef": "github:extremeheat/node-protodef#vars", + "protodef": "npm:protodef-compiler-fix@latest", "smart-buffer": "^4.1.0", "uuid-1345": "^1.0.2" }, @@ -39,13 +39,13 @@ }, "devDependencies": { "@babel/eslint-parser": "^7.13.10", - "bedrock-provider": "^1.0.0", "babel-eslint": "^10.1.0", + "bedrock-protocol": "file:.", + "bedrock-provider": "^1.0.0", + "leveldb-zlib": "^0.0.26", "mocha": "^8.3.2", "protodef-yaml": "^1.1.0", - "standard": "^16.0.3", - "leveldb-zlib": "^0.0.26", - "bedrock-protocol": "file:." + "standard": "^16.0.3" }, "standard": { "parser": "babel-eslint" From 0f0d064b13de394ccf7aba7cd9228b2cd6da130a Mon Sep 17 00:00:00 2001 From: extremeheat Date: Thu, 3 Jun 2021 04:38:49 +0000 Subject: [PATCH 006/273] Revert "temporary install fix" This reverts commit 01575ecd6f84a3a2a41e27fe2776af82f42f9b19. --- package.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index eb3d8c2..eb8a935 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bedrock-protocol", - "version": "3.2.2", + "version": "3.2.1", "description": "Minecraft Bedrock Edition protocol library", "main": "index.js", "scripts": { @@ -30,7 +30,7 @@ "minecraft-folder-path": "^1.1.0", "node-fetch": "^2.6.1", "prismarine-nbt": "^1.5.0", - "protodef": "npm:protodef-compiler-fix@latest", + "protodef": "github:extremeheat/node-protodef#vars", "smart-buffer": "^4.1.0", "uuid-1345": "^1.0.2" }, @@ -39,13 +39,13 @@ }, "devDependencies": { "@babel/eslint-parser": "^7.13.10", - "babel-eslint": "^10.1.0", - "bedrock-protocol": "file:.", "bedrock-provider": "^1.0.0", - "leveldb-zlib": "^0.0.26", + "babel-eslint": "^10.1.0", "mocha": "^8.3.2", "protodef-yaml": "^1.1.0", - "standard": "^16.0.3" + "standard": "^16.0.3", + "leveldb-zlib": "^0.0.26", + "bedrock-protocol": "file:." }, "standard": { "parser": "babel-eslint" From 6da8a9b2fcfd2c810dce038d200eb3a61ee29597 Mon Sep 17 00:00:00 2001 From: extremeheat Date: Wed, 2 Jun 2021 19:38:08 -0400 Subject: [PATCH 007/273] Minor protocol fix for entity data --- data/1.16.220/protocol.json | 8 ++++++-- data/latest/types.yaml | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/data/1.16.220/protocol.json b/data/1.16.220/protocol.json index b9e00f0..5382c19 100644 --- a/data/1.16.220/protocol.json +++ b/data/1.16.220/protocol.json @@ -723,8 +723,12 @@ "117": "nearby_cured_discount_timestamp", "118": "hitbox", "119": "is_buoyant", - "120": "buoyancy_data", - "121": "goat_horn_count" + "120": "freezing_effect_strength", + "121": "buoyancy_data", + "122": "goat_horn_count", + "123": "base_runtime_id", + "124": "define_properties", + "125": "update_properties" } } ] diff --git a/data/latest/types.yaml b/data/latest/types.yaml index 95f395e..74898ca 100644 --- a/data/latest/types.yaml +++ b/data/latest/types.yaml @@ -283,8 +283,12 @@ MetadataDictionary: []varint 117: nearby_cured_discount_timestamp 118: hitbox 119: is_buoyant - 120: buoyancy_data - 121: goat_horn_count + 120: freezing_effect_strength + 121: buoyancy_data + 122: goat_horn_count + 123: base_runtime_id + 124: define_properties + 125: update_properties type: varint => 0: byte 1: short From ab70115bd876394d725ecf3bdccce6bac2e52729 Mon Sep 17 00:00:00 2001 From: extremeheat Date: Thu, 3 Jun 2021 16:33:33 -0400 Subject: [PATCH 008/273] Protocol updates for 1.16 * Login packet uses new Encapsulated type * Add missing packet schemas * Add more docs Breaking: revises some field names --- data/1.16.201/protocol.json | 21 +- data/1.16.210/protocol.json | 21 +- data/1.16.220/protocol.json | 487 +++++++++++++++++++++++++++++------- data/latest/proto.yml | 405 ++++++++++++++++++++++++++++-- data/latest/types.yaml | 38 ++- src/client.js | 8 +- src/serverPlayer.js | 5 +- 7 files changed, 850 insertions(+), 135 deletions(-) diff --git a/data/1.16.201/protocol.json b/data/1.16.201/protocol.json index 361d139..a62a5ed 100644 --- a/data/1.16.201/protocol.json +++ b/data/1.16.201/protocol.json @@ -2948,15 +2948,26 @@ "type": "i32" }, { - "name": "payload_size", - "type": "varint" - }, + "name": "tokens", + "type": [ + "encapsulated", + { + "lengthType": "varint", + "type": "LoginTokens" + } + ] + } + ] + ], + "LoginTokens": [ + "container", + [ { - "name": "chain", + "name": "identity", "type": "LittleString" }, { - "name": "client_data", + "name": "client", "type": "LittleString" } ] diff --git a/data/1.16.210/protocol.json b/data/1.16.210/protocol.json index 47043ad..1010531 100644 --- a/data/1.16.210/protocol.json +++ b/data/1.16.210/protocol.json @@ -3159,15 +3159,26 @@ "type": "i32" }, { - "name": "payload_size", - "type": "varint" - }, + "name": "tokens", + "type": [ + "encapsulated", + { + "lengthType": "varint", + "type": "LoginTokens" + } + ] + } + ] + ], + "LoginTokens": [ + "container", + [ { - "name": "chain", + "name": "identity", "type": "LittleString" }, { - "name": "client_data", + "name": "client", "type": "LittleString" } ] diff --git a/data/1.16.220/protocol.json b/data/1.16.220/protocol.json index 5382c19..b49072a 100644 --- a/data/1.16.220/protocol.json +++ b/data/1.16.220/protocol.json @@ -1950,62 +1950,56 @@ } ] ], - "EnchantOptions": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ + "EnchantOption": [ + "container", + [ + { + "name": "cost", + "type": "varint" + }, + { + "name": "slot_flags", + "type": "li32" + }, + { + "name": "equip_enchants", + "type": [ + "array", { - "name": "cost", - "type": "varint" - }, - { - "name": "slot_flags", - "type": "li32" - }, - { - "name": "equip_enchants", - "type": [ - "array", - { - "countType": "varint", - "type": "Enchant" - } - ] - }, - { - "name": "held_enchants", - "type": [ - "array", - { - "countType": "varint", - "type": "Enchant" - } - ] - }, - { - "name": "self_enchants", - "type": [ - "array", - { - "countType": "varint", - "type": "Enchant" - } - ] - }, - { - "name": "name", - "type": "string" - }, - { - "name": "option_id", - "type": "zigzag32" + "countType": "varint", + "type": "Enchant" } ] - ] - } + }, + { + "name": "held_enchants", + "type": [ + "array", + { + "countType": "varint", + "type": "Enchant" + } + ] + }, + { + "name": "self_enchants", + "type": [ + "array", + { + "countType": "varint", + "type": "Enchant" + } + ] + }, + { + "name": "name", + "type": "string" + }, + { + "name": "option_id", + "type": "zigzag32" + } + ] ], "Action": [ "mapper", @@ -2583,6 +2577,55 @@ } ] ], + "StructureBlockSettings": [ + "container", + [ + { + "name": "palette_name", + "type": "string" + }, + { + "name": "ignore_entities", + "type": "bool" + }, + { + "name": "ignore_blocks", + "type": "bool" + }, + { + "name": "size", + "type": "BlockCoordinates" + }, + { + "name": "structure_offset", + "type": "BlockCoordinates" + }, + { + "name": "last_editing_player_unique_id", + "type": "zigzag64" + }, + { + "name": "rotation", + "type": "u8" + }, + { + "name": "mirror", + "type": "u8" + }, + { + "name": "integrity", + "type": "lf32" + }, + { + "name": "seed", + "type": "lu32" + }, + { + "name": "pivot", + "type": "vec3f" + } + ] + ], "WindowID": [ "mapper", { @@ -3567,15 +3610,26 @@ "type": "i32" }, { - "name": "payload_size", - "type": "varint" - }, + "name": "tokens", + "type": [ + "encapsulated", + { + "lengthType": "varint", + "type": "LoginTokens" + } + ] + } + ] + ], + "LoginTokens": [ + "container", + [ { - "name": "chain", + "name": "identity", "type": "LittleString" }, { - "name": "client_data", + "name": "client", "type": "LittleString" } ] @@ -6170,6 +6224,81 @@ { "name": "is_block", "type": "bool" + }, + { + "anon": true, + "type": [ + "switch", + { + "compareTo": "is_block", + "fields": { + "true": [ + "container", + [ + { + "name": "position", + "type": "BlockCoordinates" + }, + { + "name": "mode", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "impulse", + "1": "repeat", + "2": "chain" + } + } + ] + }, + { + "name": "needs_redstone", + "type": "bool" + }, + { + "name": "conditional", + "type": "bool" + } + ] + ] + }, + "default": [ + "container", + [ + { + "name": "minecart_entity_runtime_id", + "type": "varint64" + } + ] + ] + } + ] + }, + { + "name": "command", + "type": "string" + }, + { + "name": "last_output", + "type": "string" + }, + { + "name": "name", + "type": "string" + }, + { + "name": "should_track_output", + "type": "bool" + }, + { + "name": "tick_delay", + "type": "li32" + }, + { + "name": "execute_on_first_tick", + "type": "bool" } ] ], @@ -6320,7 +6449,7 @@ "container", [ { - "name": "package_id", + "name": "pack_id", "type": "string" }, { @@ -6332,7 +6461,7 @@ "type": "lu32" }, { - "name": "compressed_package_size", + "name": "size", "type": "lu64" }, { @@ -6345,7 +6474,22 @@ }, { "name": "pack_type", - "type": "u8" + "type": [ + "mapper", + { + "type": "u8", + "mappings": { + "1": "addon", + "2": "cached", + "3": "copy_protected", + "4": "behavior", + "5": "persona_piece", + "6": "resources", + "7": "skins", + "8": "world_template" + } + } + ] } ] ], @@ -6353,7 +6497,7 @@ "container", [ { - "name": "package_id", + "name": "pack_id", "type": "string" }, { @@ -6374,7 +6518,7 @@ "container", [ { - "name": "package_id", + "name": "pack_id", "type": "string" }, { @@ -6482,24 +6626,72 @@ ], "packet_structure_block_update": [ "container", - [] + [ + { + "name": "position", + "type": "BlockCoordinates" + }, + { + "name": "structure_name", + "type": "string" + }, + { + "name": "data_field", + "type": "string" + }, + { + "name": "include_players", + "type": "bool" + }, + { + "name": "show_bounding_box", + "type": "bool" + }, + { + "name": "structure_block_type", + "type": "zigzag32" + }, + { + "name": "settings", + "type": "StructureBlockSettings" + }, + { + "name": "redstone_save_mode", + "type": "zigzag32" + }, + { + "name": "should_trigger", + "type": "bool" + } + ] ], "packet_show_store_offer": [ "container", [ { - "name": "unknown0", + "name": "offer_id", "type": "string" }, { - "name": "unknown1", + "name": "show_all", "type": "bool" } ] ], "packet_purchase_receipt": [ "container", - [] + [ + { + "name": "receipts", + "type": [ + "array", + { + "countType": "varint", + "type": "string" + } + ] + } + ] ], "packet_player_skin": [ "container", @@ -6528,7 +6720,18 @@ ], "packet_sub_client_login": [ "container", - [] + [ + { + "name": "tokens", + "type": [ + "encapsulated", + { + "lengthType": "varint", + "type": "LoginTokens" + } + ] + } + ] ], "packet_initiate_web_socket_connection": [ "container", @@ -6543,7 +6746,7 @@ "container", [ { - "name": "unknown", + "name": "entity_type", "type": "varint" } ] @@ -6666,15 +6869,28 @@ "type": "varint64" }, { - "name": "unknown0", - "type": "u8" + "name": "request_type", + "type": [ + "mapper", + { + "type": "u8", + "mappings": { + "0": "set_actions", + "1": "execute_action", + "2": "execute_closing_commands", + "3": "set_name", + "4": "set_skin", + "5": "set_interaction_text" + } + } + ] }, { - "name": "unknown1", + "name": "command", "type": "string" }, { - "name": "unknown2", + "name": "action_type", "type": "u8" } ] @@ -6683,7 +6899,7 @@ "container", [ { - "name": "file_name", + "name": "image_name", "type": "string" }, { @@ -6691,7 +6907,7 @@ "type": "string" }, { - "name": "unknown2", + "name": "book_id", "type": "string" } ] @@ -6897,20 +7113,21 @@ "container", [ { - "name": "useless_byte", - "type": "u8" + "name": "action_type", + "type": [ + "mapper", + { + "type": "u8", + "mappings": { + "0": "combine", + "1": "react" + } + } + ] }, { - "name": "lab_table_x", - "type": "varint" - }, - { - "name": "lab_table_y", - "type": "varint" - }, - { - "name": "lab_table_z", - "type": "varint" + "name": "position", + "type": "vec3u" }, { "name": "reaction_type", @@ -7229,7 +7446,7 @@ "type": "vec3f" }, { - "name": "block_id", + "name": "extra_data", "type": "zigzag32" }, { @@ -7334,19 +7551,95 @@ ], "packet_on_screen_texture_animation": [ "container", - [] + [ + { + "name": "animation_type", + "type": "lu32" + } + ] ], "packet_map_create_locked_copy": [ "container", - [] + [ + { + "name": "original_map_id", + "type": "zigzag64" + }, + { + "name": "new_map_id", + "type": "zigzag64" + } + ] ], "packet_structure_template_data_export_request": [ "container", - [] + [ + { + "name": "name", + "type": "string" + }, + { + "name": "position", + "type": "BlockCoordinates" + }, + { + "name": "settings", + "type": "StructureBlockSettings" + }, + { + "name": "request_type", + "type": [ + "mapper", + { + "type": "u8", + "mappings": { + "1": "export_from_save", + "2": "export_from_load", + "3": "query_saved_structure" + } + } + ] + } + ] ], "packet_structure_template_data_export_response": [ "container", - [] + [ + { + "name": "name", + "type": "string" + }, + { + "name": "success", + "type": "bool" + }, + { + "name": "nbt", + "type": [ + "switch", + { + "compareTo": "success", + "fields": { + "true": "nbt" + }, + "default": "void" + } + ] + }, + { + "name": "response_type", + "type": [ + "mapper", + { + "type": "u8", + "mappings": { + "1": "export", + "2": "query" + } + } + ] + } + ] ], "packet_update_block_properties": [ "container", @@ -7796,8 +8089,14 @@ "container", [ { - "name": "enchant_options", - "type": "EnchantOptions" + "name": "options", + "type": [ + "array", + { + "countType": "varint", + "type": "EnchantOption" + } + ] } ] ], diff --git a/data/latest/proto.yml b/data/latest/proto.yml index 079f2d3..50574a8 100644 --- a/data/latest/proto.yml +++ b/data/latest/proto.yml @@ -51,13 +51,14 @@ packet_login: !bound: server # Protocol version (Big Endian!) protocol_version: i32 - # The combined size of the `chain` and `client_data` - payload_size: varint + tokens: '["encapsulated", { "lengthType": "varint", "type": "LoginTokens" }]' + +LoginTokens: # JSON array of JWT data: contains the display name, UUID and XUID # It should be signed by the Mojang public key - chain: LittleString + identity: LittleString # Skin related data - client_data: LittleString + client: LittleString packet_play_status: !id: 0x02 @@ -1156,7 +1157,6 @@ packet_player_input: jumping: bool sneaking: bool - # LevelChunk is sent by the server to provide the client with a chunk of a world data (16xYx16 blocks). # Typically a certain amount of chunks is sent to the client before sending it the spawn PlayStatus packet, # so that the client spawns in a loaded world. @@ -1558,10 +1558,55 @@ packet_command_request: interval: bool +# CommandBlockUpdate is sent by the client to update a command block at a specific position. The command +# block may be either a physical block or an entity. packet_command_block_update: !id: 0x4e !bound: server + # Block specifies if the command block updated was an actual physical block. If false, the command block + # is in a minecart and has an entity runtime ID instead. is_block: bool + # Position is the position of the command block updated. It is only set if Block is set to true. Nothing + # happens if no command block is set at this position. + _: is_block ? + if true: + # Position is the position of the command block updated. It is only set if Block is set to true. Nothing + # happens if no command block is set at this position. + position: BlockCoordinates + # Mode is the mode of the command block. It is either CommandBlockImpulse, CommandBlockChain or + # CommandBlockRepeat. It is only set if Block is set to true. + mode: varint => + 0: impulse + 1: repeat + 2: chain + # NeedsRedstone specifies if the command block needs to be powered by redstone to be activated. If false, + # the command block is always active. The field is only set if Block is set to true. + needs_redstone: bool + # Conditional specifies the behaviour of the command block if the command block before it (the opposite + # side of the direction the arrow if facing) fails to execute. If set to false, it will activate at all + # times, whereas if set to true, it will activate only if the previous command block executed + # successfully. The field is only set if Block is set to true. + conditional: bool + default: + minecart_entity_runtime_id: varint64 + # Command is the command currently entered in the command block. This is the command that is executed + # when the command block is activated. + command: string + # LastOutput is the output of the last command executed by the command block. It may be left empty to + # show simply no output at all, in combination with setting ShouldTrackOutput to false. + last_output: string + # Name is the name of the command block updated. If not empty, it will show this name hovering above the + # command block when hovering over the block with the cursor. + name: string + # ShouldTrackOutput specifies if the command block tracks output. If set to false, the output box won't + # be shown within the command block. + should_track_output: bool + # TickDelay is the delay in ticks between executions of a command block, if it is a repeating command + # block. + tick_delay: li32 + # ExecuteOnFirstTick specifies if the command block should execute on the first tick, AKA as soon as the + # command block is enabled. + execute_on_first_tick: bool packet_command_output: !id: 0x4f @@ -1659,29 +1704,69 @@ packet_update_equipment: # make sure only saddles can be put in the saddle slot etc. inventory: nbt + +# ResourcePackDataInfo is sent by the server to the client to inform the client about the data contained in +# one of the resource packs that are about to be sent. packet_resource_pack_data_info: !id: 0x52 !bound: client - package_id: string + # UUID is the unique ID of the resource pack that the info concerns. + pack_id: string + # DataChunkSize is the maximum size in bytes of the chunks in which the total size of the resource pack + # to be sent will be divided. A size of 1MB (1024*1024) means that a resource pack of 15.5MB will be + # split into 16 data chunks. max_chunk_size: lu32 + # ChunkCount is the total amount of data chunks that the sent resource pack will exist out of. It is the + # total size of the resource pack divided by the DataChunkSize field. + # The client doesn't actually seem to use this field. Rather, it divides the size by the chunk size to + # calculate it itself. chunk_count: lu32 - compressed_package_size: lu64 + # Size is the total size in bytes that the resource pack occupies. This is the size of the compressed + # archive (zip) of the resource pack. + size: lu64 + # Hash is a SHA256 hash of the content of the resource pack. hash: ByteArray + # Premium specifies if the resource pack was a premium resource pack, meaning it was bought from the + # Minecraft store. is_premium: bool - pack_type: u8 + # PackType is the type of the resource pack. It is one of the resource pack types listed. + pack_type: u8 => + 1: addon + 2: cached + 3: copy_protected + 4: behavior + 5: persona_piece + 6: resources + 7: skins + 8: world_template +# ResourcePackChunkData is sent to the client so that the client can download the resource pack. Each packet +# holds a chunk of the compressed resource pack, of which the size is defined in the ResourcePackDataInfo +# packet sent before. packet_resource_pack_chunk_data: !id: 0x53 !bound: client - package_id: string + # UUID is the unique ID of the resource pack that the chunk of data is taken out of. + pack_id: string + # ChunkIndex is the current chunk index of the chunk. It is a number that starts at 0 and is incremented + # for each resource pack data chunk sent to the client. chunk_index: lu32 + # DataOffset is the current progress in bytes or offset in the data that the resource pack data chunk is + # taken from. progress: lu64 + # RawPayload is a byte slice containing a chunk of data from the resource pack. It must be of the same size or + # less than the DataChunkSize set in the ResourcePackDataInfo packet. payload: ByteArray +# ResourcePackChunkRequest is sent by the client to request a chunk of data from a particular resource pack, +# that it has obtained information about in a ResourcePackDataInfo packet. packet_resource_pack_chunk_request: !id: 0x54 !bound: server - package_id: string + # UUID is the unique ID of the resource pack that the chunk of data is requested from. + pack_id: string + # ChunkIndex is the requested chunk index of the chunk. It is a number that starts at 0 and is + # incremented for each resource pack data chunk requested. chunk_index: lu32 packet_transfer: @@ -1739,19 +1824,66 @@ packet_add_behavior_tree: !bound: client behaviortree: string +# StructureBlockUpdate is sent by the client when it updates a structure block using the in-game UI. The +# data it contains depends on the type of structure block that it is. In Minecraft Bedrock Edition v1.11, +# there is only the Export structure block type, but in v1.13 the ones present in Java Edition will, +# according to the wiki, be added too. packet_structure_block_update: !id: 0x5a !bound: client + # Position is the position of the structure block that is updated. + position: BlockCoordinates + # StructureName is the name of the structure that was set in the structure block's UI. This is the name + # used to export the structure to a file. + structure_name: string + # DataField is the name of a function to run, usually used during natural generation. A description can + # be found here: https://minecraft.gamepedia.com/Structure_Block#Data. + data_field: string + # IncludePlayers specifies if the 'Include Players' toggle has been enabled, meaning players are also + # exported by the structure block. + include_players: bool + # ShowBoundingBox specifies if the structure block should have its bounds outlined. A thin line will + # encapsulate the bounds of the structure if set to true. + show_bounding_box: bool + # StructureBlockType is the type of the structure block updated. A list of structure block types that + # will be used can be found in the constants above. + structure_block_type: zigzag32 + # Settings is a struct of settings that should be used for exporting the structure. These settings are + # identical to the last sent in the StructureBlockUpdate packet by the client. + settings: StructureBlockSettings + # RedstoneSaveMode is the mode that should be used to save the structure when used with redstone. In + # Java Edition, this is always stored in memory, but in Bedrock Edition it can be stored either to disk + # or memory. See the constants above for the options. + redstone_save_mode: zigzag32 + # ShouldTrigger specifies if the structure block should be triggered immediately after this packet + # reaches the server. + should_trigger: bool +# ShowStoreOffer is sent by the server to show a Marketplace store offer to a player. It opens a window +# client-side that displays the item. +# The ShowStoreOffer packet only works on the partnered servers: Servers that are not partnered will not have +# a store buttons show up in the in-game pause menu and will, as a result, not be able to open store offers +# on the client side. Sending the packet does therefore not work when using a proxy that is not connected to +# with the domain of one of the partnered servers. packet_show_store_offer: !id: 0x5b !bound: client - unknown0: string - unknown1: bool + # OfferID is a string that identifies the offer for which a window should be opened. While typically a + # UUID, the ID could be anything. + offer_id: string + # ShowAll specifies if all other offers of the same 'author' as the one of the offer associated with the + # OfferID should also be displayed, alongside the target offer. + show_all: bool + +# PurchaseReceipt is sent by the client to the server to notify the server it purchased an item from the +# Marketplace store that was offered by the server. The packet is only used for partnered servers. packet_purchase_receipt: !id: 0x5c !bound: server + # Receipts is a list of receipts, or proofs of purchases, for the offers that have been purchased by the + # player. + receipts: string[]varint packet_player_skin: !id: 0x5d @@ -1762,20 +1894,40 @@ packet_player_skin: old_skin_name: string is_verified: bool +# SubClientLogin is sent when a sub-client joins the server while another client is already connected to it. +# The packet is sent as a result of split-screen game play, and allows up to four players to play using the +# same network connection. After an initial Login packet from the 'main' client, each sub-client that +# connects sends a SubClientLogin to request their own login. packet_sub_client_login: !id: 0x5e !bound: client + # ConnectionRequest is a string containing information about the player and JWTs that may be used to + # verify if the player is connected to XBOX Live. The connection request also contains the necessary + # client public key to initiate encryption. + # The ConnectionRequest in this packet is identical to the one found in the Login packet. + tokens: '["encapsulated", { "lengthType": "varint", "type": "LoginTokens" }]' +# AutomationClientConnect is used to make the client connect to a websocket server. This websocket server has +# the ability to execute commands on the behalf of the client and it can listen for certain events fired by +# the client. packet_initiate_web_socket_connection: !id: 0x5f !bound: client + # ServerURI is the URI to make the client connect to. It can be, for example, 'localhost:8000/ws' to + # connect to a websocket server on the localhost at port 8000. server: string + +# SetLastHurtBy is sent by the server to let the client know what entity type it was last hurt by. At this +# moment, the packet is useless and should not be used. There is no behaviour that depends on if this +# packet is sent or not. packet_set_last_hurt_by: !id: 0x60 !bound: client - unknown: varint + entity_type: varint +# BookEdit is sent by the client when it edits a book. It is sent each time a modification was made and the +# player stops its typing 'session', rather than simply after closing the book. packet_book_edit: !id: 0x61 !bound: client @@ -1790,6 +1942,7 @@ packet_book_edit: if replace_page or add_page: page_number: u8 text: string + # Only available on Education Edition. photo_name: string if delete_page: page_number: u8 @@ -1802,46 +1955,103 @@ packet_book_edit: xuid: string +# NPCRequest is sent by the client when it interacts with an NPC. +# The packet is specifically made for Education Edition, where NPCs are available to use. packet_npc_request: !id: 0x62 !bound: both + # EntityRuntimeID is the runtime ID of the NPC entity that the player interacted with. It is the same + # as sent by the server when spawning the entity. runtime_entity_id: varint64 - unknown0: u8 - unknown1: string - unknown2: u8 + # RequestType is the type of the request, which depends on the permission that the player has. It will + # be either a type that indicates that the NPC should show its dialog, or that it should open the + # editing window. + request_type: u8 => + 0: set_actions + 1: execute_action + 2: execute_closing_commands + 3: set_name + 4: set_skin + 5: set_interaction_text + # CommandString is the command string set in the NPC. It may consist of multiple commands, depending on + # what the player set in it. + command: string + # ActionType is the type of the action to execute. + action_type: u8 +# PhotoTransfer is sent by the server to transfer a photo (image) file to the client. It is typically used +# to transfer photos so that the client can display it in a portfolio in Education Edition. +# While previously usable in the default Bedrock Edition, the displaying of photos in books was disabled and +# the packet now has little use anymore. packet_photo_transfer: !id: 0x63 !bound: server - file_name: string + # PhotoName is the name of the photo to transfer. It is the exact file name that the client will download + # the photo as, including the extension of the file. + image_name: string + # PhotoData is the raw data of the photo image. The format of this data may vary: Formats such as JPEG or + # PNG work, as long as PhotoName has the correct extension. image_data: string - unknown2: string + # BookID is the ID of the book that the photo is associated with. If the PhotoName in a book with this ID + # is set to PhotoName, it will display the photo (provided Education Edition is used). + # The photo image is downloaded to a sub-folder with this book ID. + book_id: string +# ModalFormRequest is sent by the server to make the client open a form. This form may be either a modal form +# which has two options, a menu form for a selection of options and a custom form for properties. packet_modal_form_request: !id: 0x64 !bound: client + # FormID is an ID used to identify the form. The ID is saved by the client and sent back when the player + # submits the form, so that the server can identify which form was submitted. form_id: varint + # FormData is a JSON encoded object of form data. The content of the object differs, depending on the + # type of the form sent, which is also set in the JSON. data: string +# ModalFormResponse is sent by the client in response to a ModalFormRequest, after the player has submitted +# the form sent. It contains the options/properties selected by the player, or a JSON encoded 'null' if +# the form was closed by clicking the X at the top right corner of the form. packet_modal_form_response: !id: 0x65 !bound: server + # FormID is the form ID of the form the client has responded to. It is the same as the ID sent in the + # ModalFormRequest, and may be used to identify which form was submitted. form_id: varint + # ResponseData is a JSON encoded value representing the response of the player. If the form was + # cancelled, a JSON encoded 'null' is in the response. For a modal form, the response is either true or + # false, for a menu form, the response is an integer specifying the index of the button clicked, and for + # a custom form, the response is an array containing a value for each element. data: string +# ServerSettingsRequest is sent by the client to request the settings specific to the server. These settings +# are shown in a separate tab client-side, and have the same structure as a custom form. +# ServerSettingsRequest has no fields. packet_server_settings_request: !id: 0x66 !bound: server +# ServerSettingsResponse is optionally sent by the server in response to a ServerSettingsRequest from the +# client. It is structured the same as a ModalFormRequest packet, and if filled out correctly, will show +# a specific tab for the server in the settings of the client. A ModalFormResponse packet is sent by the +# client in response to a ServerSettingsResponse, when the client fills out the settings and closes the +# settings again. packet_server_settings_response: !id: 0x67 !bound: client + # FormID is an ID used to identify the form. The ID is saved by the client and sent back when the player + # submits the form, so that the server can identify which form was submitted. form_id: varint + # FormData is a JSON encoded object of form data. The content of the object differs, depending on the + # type of the form sent, which is also set in the JSON. data: string +# ShowProfile is sent by the server to show the XBOX Live profile of one player to another. packet_show_profile: !id: 0x68 !bound: client + # XUID is the XBOX Live User ID of the player whose profile should be shown to the player. If it is not + # a valid XUID, the client ignores the packet. xuid: string # SetDefaultGameType is sent by the client when it toggles the default game type in the settings UI, and is @@ -1854,18 +2064,33 @@ packet_set_default_game_type: # game type. gamemode: GameMode +# RemoveObjective is sent by the server to remove a scoreboard objective. It is used to stop showing a +# scoreboard to a player. packet_remove_objective: !id: 0x6a !bound: client + # ObjectiveName is the name of the objective that the scoreboard currently active has. This name must + # be identical to the one sent in the SetDisplayObjective packet. objective_name: string +# SetDisplayObjective is sent by the server to display an object as a scoreboard to the player. Once sent, +# it should be followed up by a SetScore packet to set the lines of the packet. packet_set_display_objective: !id: 0x6b !bound: client + # DisplaySlot is the slot in which the scoreboard should be displayed. Available options can be found in + # the constants above. display_slot: string + # ObjectiveName is the name of the objective that the scoreboard displays. Filling out a random unique + # value for this field works: It is not displayed in the scoreboard. objective_name: string + # DisplayName is the name, or title, that is displayed at the top of the scoreboard. display_name: string + # CriteriaName is the name of the criteria that need to be fulfilled in order for the score to be + # increased. This can be any kind of string and does not show up client-side. criteria_name: string + # SortOrder is the order in which entries on the scoreboard should be sorted. It is one of the constants + # that may be found above. sort_order: zigzag32 # SetScore is sent by the server to send the contents of a scoreboard to the player. It may be used to either @@ -1895,13 +2120,22 @@ packet_set_score: custom_name: entry_type ? if fake_player: string +# LabTable is sent by the client to let the server know it started a chemical reaction in Education Edition, +# and is sent by the server to other clients to show the effects. +# The packet is only functional if Education features are enabled. packet_lab_table: !id: 0x6d !bound: both - useless_byte: u8 - lab_table_x: varint - lab_table_y: varint - lab_table_z: varint + # ActionType is the type of the action that was executed. It is one of the constants above. Typically, + # only LabTableActionCombine is sent by the client, whereas LabTableActionReact is sent by the server. + action_type: u8 => + 0: combine + 1: react + # Position is the position at which the lab table used was located. + position: vec3u + # ReactionType is the type of the reaction that took place as a result of the items put into the lab + # table. The reaction type can be either that of an item or a particle, depending on whatever the result + # was of the reaction. reaction_type: u8 # UpdateBlockSynced is sent by the server to synchronise the falling of a falling block entity with the @@ -2028,25 +2262,50 @@ packet_network_stack_latency: # the other side should send a NetworkStackLatency packet back. needs_response: u8 +# ScriptCustomEvent is sent by both the client and the server. It is a way to let scripts communicate with +# the server, so that the client can let the server know it triggered an event, or the other way around. +# It is essentially an RPC kind of system. packet_script_custom_event: !id: 0x75 !bound: both + # EventName is the name of the event. The script and the server will use this event name to identify the + # data that is sent. event_name: string + # EventData is the data of the event. This data is typically a JSON encoded string, that the script is + # able to encode and decode too. event_data: string +# SpawnParticleEffect is sent by the server to spawn a particle effect client-side. Unlike other packets that +# result in the appearing of particles, this packet can show particles that are not hardcoded in the client. +# They can be added and changed through behaviour packs to implement custom particles. packet_spawn_particle_effect: !id: 0x76 !bound: client + # Dimension is the dimension that the particle is spawned in. Its exact usage is not clear, as the + # dimension has no direct effect on the particle. dimension: u8 + # EntityUniqueID is the unique ID of the entity that the spawned particle may be attached to. If this ID + # is not -1, the Position below will be interpreted as relative to the position of the entity associated + # with this unique ID. entity_id: zigzag64 + # Position is the position that the particle should be spawned at. If the position is too far away from + # the player, it will not show up. + # If EntityUniqueID is not -1, the position will be relative to the position of the entity. position: vec3f + # ParticleName is the name of the particle that should be shown. This name may point to a particle effect + # that is built-in, or to one implemented by behaviour packs. particle_name: string +# AvailableActorIdentifiers is sent by the server at the start of the game to let the client know all +# entities that are available on the server. packet_available_entity_identifiers: !id: 0x77 !bound: client + # SerialisedEntityIdentifiers is a network NBT serialised compound of all entity identifiers that are + # available in the server. nbt: nbt +# Not used. Use `packet_level_sound_event`. packet_level_sound_event_v2: !id: 0x78 !bound: both @@ -2057,15 +2316,32 @@ packet_level_sound_event_v2: is_baby_mob: bool is_global: bool +# NetworkChunkPublisherUpdate is sent by the server to change the point around which chunks are and remain +# loaded. This is useful for mini-game servers, where only one area is ever loaded, in which case the +# NetworkChunkPublisherUpdate packet can be sent in the middle of it, so that no chunks ever need to be +# additionally sent during the course of the game. +# In reality, the packet is not extraordinarily useful, and most servers just send it constantly at the +# position of the player. +# If the packet is not sent at all, no chunks will be shown to the player, regardless of where they are sent. packet_network_chunk_publisher_update: !id: 0x79 !bound: client + # Position is the block position around which chunks loaded will remain shown to the client. Most servers + # set this position to the position of the player itself. coordinates: BlockCoordinates + # Radius is the radius in blocks around Position that chunks sent show up in and will remain loaded in. + # Unlike the RequestChunkRadius and ChunkRadiusUpdated packets, this radius is in blocks rather than + # chunks, so the chunk radius needs to be multiplied by 16. (Or shifted to the left by 4.) radius: varint +# BiomeDefinitionList is sent by the server to let the client know all biomes that are available and +# implemented on the server side. It is much like the AvailableActorIdentifiers packet, but instead +# functions for biomes. packet_biome_definition_list: !id: 0x7a !bound: client + # SerialisedBiomeDefinitions is a network NBT serialised compound of all definitions of biomes that are + # available on the server. nbt: nbt # LevelSoundEvent is sent by the server to make any kind of built-in sound heard to a player. It is sent to, @@ -2075,11 +2351,24 @@ packet_biome_definition_list: packet_level_sound_event: !id: 0x7b !bound: both + # SoundType is the type of the sound to play. Some of the sound types + # require additional data, which is set in the EventData field. sound_id: SoundType + # Position is the position of the sound event. The player will be able to hear the direction of the sound + # based on what position is sent here. position: vec3f - block_id: zigzag32 + # ExtraData is a packed integer that some sound types use to provide extra data. An example of this is + # the note sound, which is composed of a pitch and an instrument type. + extra_data: zigzag32 + # EntityType is the string entity type of the entity that emitted the sound, for example + # 'minecraft:skeleton'. Some sound types use this entity type for additional data. entity_type: string + # BabyMob specifies if the sound should be that of a baby mob. It is most notably used for parrot + # imitations, which will change based on if this field is set to true or not. is_baby_mob: bool + # DisableRelativeVolume specifies if the sound should be played relatively or not. If set to true, the + # sound will have full volume, regardless of where the Position is, whereas if set to false, the sound's + # volume will be based on the distance to Position. is_global: bool # LevelEventGeneric is sent by the server to send a 'generic' level event to the client. This packet sends an @@ -2113,6 +2402,7 @@ packet_lectern_update: # DropBook specifies if the book currently set on display in the lectern should be dropped server-side. drop_book: bool +# This packet was removed. packet_video_stream_connect: !id: 0x7e !bound: client @@ -2143,27 +2433,73 @@ packet_remove_ecs_entity: # EntityNetworkID is the network ID of the entity that should be removed. network_id: varint64 +# ClientCacheStatus is sent by the client to the server at the start of the game. It is sent to let the +# server know if it supports the client-side blob cache. Clients such as Nintendo Switch do not support the +# cache, and attempting to use it anyway will fail. packet_client_cache_status: !id: 0x81 !bound: both + # Enabled specifies if the blob cache is enabled. If false, the server should not attempt to use the + # blob cache. If true, it may do so, but it may also choose not to use it. enabled: bool +# OnScreenTextureAnimation is sent by the server to show a certain animation on the screen of the player. +# The packet is used, as an example, for when a raid is triggered and when a raid is defeated. packet_on_screen_texture_animation: !id: 0x82 !bound: client + # AnimationType is the type of the animation to show. The packet provides no further extra data to allow + # modifying the duration or other properties of the animation. + animation_type: lu32 + +# MapCreateLockedCopy is sent by the server to create a locked copy of one map into another map. In vanilla, +# it is used in the cartography table to create a map that is locked and cannot be modified. packet_map_create_locked_copy: !id: 0x83 !bound: client + # OriginalMapID is the ID of the map that is being copied. The locked copy will obtain all content that + # is visible on this map, except the content will not change. + original_map_id: zigzag64 + # NewMapID is the ID of the map that holds the locked copy of the map that OriginalMapID points to. Its + # contents will be impossible to change. + new_map_id: zigzag64 + +# StructureTemplateDataRequest is sent by the client to request data of a structure. packet_structure_template_data_export_request: !id: 0x84 !bound: client + # StructureName is the name of the structure that was set in the structure block's UI. This is the name + # used to export the structure to a file. + name: string + # Position is the position of the structure block that has its template data requested. + position: BlockCoordinates + # Settings is a struct of settings that should be used for exporting the structure. These settings are + # identical to the last sent in the StructureBlockUpdate packet by the client. + settings: StructureBlockSettings + # RequestType specifies the type of template data request that the player sent. + request_type: u8 => + 1: export_from_save + 2: export_from_load + 3: query_saved_structure +# StructureTemplateDataResponse is sent by the server to send data of a structure to the client in response +# to a StructureTemplateDataRequest packet. packet_structure_template_data_export_response: !id: 0x85 !bound: client + name: string + success: bool + nbt: success ? + if true: nbt + # ResponseType specifies the response type of the packet. This depends on the RequestType field sent in + # the StructureTemplateDataRequest packet and is one of the constants above. + response_type: u8 => + 1: export + 2: query +# No longer used. packet_update_block_properties: !id: 0x86 !bound: client @@ -2401,17 +2737,31 @@ InputFlag: [ "bitflags", { ] }] +# CreativeContent is a packet sent by the server to set the creative inventory's content for a player. +# Introduced in 1.16, this packet replaces the previous method - sending an InventoryContent packet with +# creative inventory window ID. +# As of v1.16.100, this packet must be sent during the login sequence. Not sending it will stop the client +# from joining the server. packet_creative_content: !id: 0x91 !bound: client + # Items is a list of the items that should be added to the creative inventory. items: []varint entry_id: varint item: ItemLegacy +# PlayerEnchantOptions is sent by the server to update the enchantment options displayed when the user opens +# the enchantment table and puts an item in. This packet was added in 1.16 and allows the server to decide on +# the enchantments that can be selected by the player. +# The PlayerEnchantOptions packet should be sent once for every slot update of the enchantment table. The +# vanilla server sends an empty PlayerEnchantOptions packet when the player opens the enchantment table +# (air is present in the enchantment table slot) and sends the packet with actual enchantments in it when +# items are put in that can have enchantments. packet_player_enchant_options: !id: 0x92 !bound: client - enchant_options: EnchantOptions + # Options is a list of possible enchantment options for the item that was put into the enchantment table. + options: EnchantOption[]varint # ItemStackRequest is sent by the client to change item stacks in an inventory. It is essentially a # replacement of the InventoryTransaction packet added in 1.16 for inventory specific actions, such as moving @@ -2422,9 +2772,16 @@ packet_item_stack_request: !bound: server requests: ItemStackRequest[]varint +# ItemStackResponse is sent by the server in response to an ItemStackRequest packet from the client. This +# packet is used to either approve or reject ItemStackRequests from the client. If a request is approved, the +# client will simply continue as normal. If rejected, the client will undo the actions so that the inventory +# should be in sync with the server again. packet_item_stack_response: !id: 0x94 !bound: client + # Responses is a list of responses to ItemStackRequests sent by the client before. Responses either + # approve or reject a request from the client. + # Vanilla limits the size of this slice to 4096. responses: ItemStackResponses # PlayerArmourDamage is sent by the server to damage the armour of a player. It is a very efficient packet, diff --git a/data/latest/types.yaml b/data/latest/types.yaml index 74898ca..f047936 100644 --- a/data/latest/types.yaml +++ b/data/latest/types.yaml @@ -719,7 +719,7 @@ Enchant: id: u8 level: u8 -EnchantOptions: []varint +EnchantOption: cost: varint slot_flags: li32 equip_enchants: Enchant[]varint @@ -1019,6 +1019,42 @@ MapDecoration: # automatically, whereas others may be changed. color_abgr: varint + +StructureBlockSettings: + # PaletteName is the name of the palette used in the structure. Currently, it seems that this field is + # always 'default'. + palette_name: string + # IgnoreEntities specifies if the structure should ignore entities or include them. If set to false, + # entities will also show up in the exported structure. + ignore_entities: bool + # IgnoreBlocks specifies if the structure should ignore blocks or include them. If set to false, blocks + # will show up in the exported structure. + ignore_blocks: bool + # Size is the size of the area that is about to be exported. The area exported will start at the + # Position + Offset, and will extend as far as Size specifies. + size: BlockCoordinates + # Offset is the offset position that was set in the structure block. The area exported is offset by this + # position. + # **TODO**: This will be renamed to offset soon + structure_offset: BlockCoordinates + # LastEditingPlayerUniqueID is the unique ID of the player that last edited the structure block that + # these settings concern. + last_editing_player_unique_id: zigzag64 + # Rotation is the rotation that the structure block should obtain. See the constants above for available + # options. + rotation: u8 + # Mirror specifies the way the structure should be mirrored. It is either no mirror at all, mirror on the + # x/z axis or both. + mirror: u8 + # Integrity is usually 1, but may be set to a number between 0 and 1 to omit blocks randomly, using + # the Seed that follows. + integrity: lf32 + # Seed is the seed used to omit blocks if Integrity is not equal to one. If the Seed is 0, a random + # seed is selected to omit blocks. + seed: lu32 + # Pivot is the pivot around which the structure may be rotated. + pivot: vec3f + # List of Window IDs. When a new container is opened (container_open), a new sequential Window ID is created. # Below window IDs are hard-coded and created when the game starts and the server does not # send a `container_open` for them. diff --git a/src/client.js b/src/client.js index e675367..26d8662 100644 --- a/src/client.js +++ b/src/client.js @@ -108,15 +108,15 @@ class Client extends Connection { ] const encodedChain = JSON.stringify({ chain }) - const bodyLength = this.clientUserChain.length + encodedChain.length + 8 debug('Auth chain', chain) this.write('login', { protocol_version: this.options.protocolVersion, - payload_size: bodyLength, - chain: encodedChain, - client_data: this.clientUserChain + tokens: { + identity: encodedChain, + client: this.clientUserChain + } }) this.emit('loggingIn') } diff --git a/src/serverPlayer.js b/src/serverPlayer.js index 7335d6d..7e638fe 100644 --- a/src/serverPlayer.js +++ b/src/serverPlayer.js @@ -47,8 +47,9 @@ class Player extends Connection { } // Parse login data - const authChain = JSON.parse(body.params.chain) - const skinChain = body.params.client_data + const tokens = body.params.tokens + const authChain = JSON.parse(tokens.identity) + const skinChain = tokens.client try { var { key, userData, skinData } = this.decodeLoginJWT(authChain.chain, skinChain) // eslint-disable-line From 69b7c5c9f4a8417ef2064904f367f5314bc850f8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 3 Jun 2021 04:40:39 +0000 Subject: [PATCH 009/273] Bump leveldb-zlib from 0.0.26 to 1.0.1 Bumps [leveldb-zlib](https://github.com/extremeheat/node-leveldb-zlib) from 0.0.26 to 1.0.1. - [Release notes](https://github.com/extremeheat/node-leveldb-zlib/releases) - [Changelog](https://github.com/extremeheat/node-leveldb-zlib/blob/master/HISTORY.md) - [Commits](https://github.com/extremeheat/node-leveldb-zlib/compare/v0.0.26...1.0.1) Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index eb8a935..0b24ec9 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "mocha": "^8.3.2", "protodef-yaml": "^1.1.0", "standard": "^16.0.3", - "leveldb-zlib": "^0.0.26", + "leveldb-zlib": "^1.0.1", "bedrock-protocol": "file:." }, "standard": { From 187e74b82320aa7a8f14ca583c91d930b4927d69 Mon Sep 17 00:00:00 2001 From: extremeheat Date: Fri, 4 Jun 2021 19:51:22 -0400 Subject: [PATCH 010/273] use protodef-compiler-fix to fix npm install --- package.json | 2 +- src/transforms/framer.js | 2 +- src/transforms/serializer.js | 6 +++--- tools/compileProtocol.js | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index eb8a935..e4aae9b 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ "minecraft-folder-path": "^1.1.0", "node-fetch": "^2.6.1", "prismarine-nbt": "^1.5.0", - "protodef": "github:extremeheat/node-protodef#vars", + "protodef-compiler-fix": "latest", "smart-buffer": "^4.1.0", "uuid-1345": "^1.0.2" }, diff --git a/src/transforms/framer.js b/src/transforms/framer.js index 77f41e9..aa1b496 100644 --- a/src/transforms/framer.js +++ b/src/transforms/framer.js @@ -1,4 +1,4 @@ -const [readVarInt, writeVarInt, sizeOfVarInt] = require('protodef').types.varint +const [readVarInt, writeVarInt, sizeOfVarInt] = require('protodef-compiler-fix').types.varint const zlib = require('zlib') // Concatenates packets into one batch packet, and adds length prefixs. diff --git a/src/transforms/serializer.js b/src/transforms/serializer.js index 4a6102f..2900cf3 100644 --- a/src/transforms/serializer.js +++ b/src/transforms/serializer.js @@ -1,5 +1,5 @@ -const { ProtoDefCompiler, CompiledProtodef } = require('protodef').Compiler -const { FullPacketParser, Serializer } = require('protodef') +const { ProtoDefCompiler, CompiledProtodef } = require('protodef-compiler-fix').Compiler +const { FullPacketParser, Serializer } = require('protodef-compiler-fix') const { join } = require('path') class Parser extends FullPacketParser { @@ -43,7 +43,7 @@ function getProtocol (version) { compiler.addTypes(require(join(__dirname, '../datatypes/compiler-minecraft'))) compiler.addTypes(require('prismarine-nbt/compiler-zigzag')) - global.PartialReadError = require('protodef/src/utils').PartialReadError + global.PartialReadError = require('protodef-compiler-fix/src/utils').PartialReadError const compile = (compiler, file) => require(file)(compiler.native) return new CompiledProtodef( diff --git a/tools/compileProtocol.js b/tools/compileProtocol.js index bed7b2c..c89cb28 100644 --- a/tools/compileProtocol.js +++ b/tools/compileProtocol.js @@ -6,7 +6,7 @@ * */ const fs = require('fs') -const { ProtoDefCompiler } = require('protodef').Compiler +const { ProtoDefCompiler } = require('protodef-compiler-fix').Compiler const { Versions } = require('../src/options') const { join } = require('path') From 700ee08e11e387b88b852ab83f4c316f874f1a30 Mon Sep 17 00:00:00 2001 From: extremeheat Date: Fri, 4 Jun 2021 19:52:09 -0400 Subject: [PATCH 011/273] correct type definitions --- index.d.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/index.d.ts b/index.d.ts index e403471..e501aed 100644 --- a/index.d.ts +++ b/index.d.ts @@ -7,22 +7,22 @@ declare module "bedrock-protocol" { export interface Options { // The string version to start the client or server as - version: string + version?: string // For the client, the host of the server to connect to (default: 127.0.0.1) // For the server, the host to bind to (default: 0.0.0.0) host: string // The port to connect or bind to, default: 19132 - port: number + port?: number // For the client, if we should login with Microsoft/Xbox Live. // For the server, if we should verify client's authentication with Xbox Live. - offline: boolean + offline?: boolean } export interface ClientOptions extends Options { // The view distance in chunks - viewDistance: number, + viewDistance?: number, // Specifies which game edition to sign in as. Optional, but some servers verify this. - authTitle: title | string + authTitle?: title | string } export interface ServerOptions extends Options { From 9aba6b436dc72bd6802aab5513114a6d293b5e47 Mon Sep 17 00:00:00 2001 From: extremeheat Date: Sat, 5 Jun 2021 06:40:55 -0400 Subject: [PATCH 012/273] Release 3.3.0 (#96) * Update package.json * Update HISTORY.md * Update package.json --- HISTORY.md | 4 ++++ package.json | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/HISTORY.md b/HISTORY.md index b731bf8..d731a86 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,3 +1,7 @@ +## 3.3.0 +* Protocol updates for 1.16, with some minor breaking changes to protocol fields [#95](https://github.com/PrismarineJS/bedrock-protocol/pull/95) +* Fix npm install issues + ## 3.2.1 * Add `authTitle` option to Relay proxy [#92](https://github.com/PrismarineJS/bedrock-protocol/pull/92) * Protocol, type definition fixes diff --git a/package.json b/package.json index 8d09d0f..ec3ffd9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bedrock-protocol", - "version": "3.2.1", + "version": "3.3.0", "description": "Minecraft Bedrock Edition protocol library", "main": "index.js", "scripts": { From e16e8381e56641817909d561a7e920f50604da1e Mon Sep 17 00:00:00 2001 From: JammSpread <61063879+JammSpread@users.noreply.github.com> Date: Tue, 8 Jun 2021 22:57:55 -0400 Subject: [PATCH 013/273] fix: ping types. (#100) * fix: ping types. Sets the TypeScript definition file to include more accurate types for the ping function. Signed-off-by: JK * fix: changed usage. Reverts the usage to the previous method of entering in ping options. This makes it so that the host and port can once again be entered by their order alone. Signed-off-by: JK --- index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.d.ts b/index.d.ts index e501aed..e1187ca 100644 --- a/index.d.ts +++ b/index.d.ts @@ -154,5 +154,5 @@ declare module "bedrock-protocol" { export function createClient(options: ClientOptions): Client export function createServer(options: ServerOptions): Server - export function ping({ host, port }) : ServerAdvertisement + export function ping({ host, port }: { host: string, port: number }): Promise } \ No newline at end of file From d02eb6c04160f528a74ec65a53ecb274db3731e6 Mon Sep 17 00:00:00 2001 From: u9g <43508353+u9g@users.noreply.github.com> Date: Wed, 9 Jun 2021 13:40:45 -0400 Subject: [PATCH 014/273] update connect version based on ping response & fix typings (#101) * update connect ver based on ping resp& add typings * Fixed and added extremeheat suggestion * Update API.md * Update createClient.js --- docs/API.md | 4 +--- index.d.ts | 4 +++- src/createClient.js | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/API.md b/docs/API.md index 23de8f1..a38da60 100644 --- a/docs/API.md +++ b/docs/API.md @@ -10,7 +10,7 @@ Returns a `Client` instance and connects to the server. | ----------- | ----------- |-| | host | **Required** | host to connect to, for example `127.0.0.1`. | | port | *optional* | port to connect to, default to **19132** | -| version | *optional* | Version to connect as.
(Future feature, see [#69][1]) If not specified, should automatically match server version.
(Current feature) Defaults to latest version. | +| version | *optional* | Version to connect as. If not specified, automatically match server version. | | offline | *optional* | default to **false**. Set this to true to disable Microsoft/Xbox auth. | | username | Conditional | Required if `offline` set to true : Username to connect to server as. | | authTitle | *optional* | The title ID to connect as, see the README for usage. | @@ -160,5 +160,3 @@ relay.on('connect', player => { ``` 'Relay' emits 'clientbound' and 'serverbound' events, along with the data for the outgoing packet that can be modified. You can send a packet to the client with `player.queue()` or to the backend server with `player.upstream.queue()`. - -[1]: https://github.com/PrismarineJS/bedrock-protocol/issues/69 diff --git a/index.d.ts b/index.d.ts index e1187ca..e47c35c 100644 --- a/index.d.ts +++ b/index.d.ts @@ -22,7 +22,9 @@ declare module "bedrock-protocol" { // The view distance in chunks viewDistance?: number, // Specifies which game edition to sign in as. Optional, but some servers verify this. - authTitle?: title | string + authTitle?: title | string, + // whether to skip initial ping and immediately connect + skipPing?: boolean } export interface ServerOptions extends Options { diff --git a/src/createClient.js b/src/createClient.js index 50009be..f8e205a 100644 --- a/src/createClient.js +++ b/src/createClient.js @@ -4,7 +4,7 @@ const assert = require('assert') const advertisement = require('./server/advertisement') const { sleep } = require('./datatypes/util') -/** @param {{ version?: number, host: string, port?: number, connectTimeout?: number }} options */ +/** @param {{ version?: number, host: string, port?: number, connectTimeout?: number, skipPing?: boolean }} options */ function createClient (options) { assert(options) const client = new Client({ port: 19132, ...options }) @@ -15,7 +15,7 @@ function createClient (options) { client.ping().then(data => { const advert = advertisement.fromServerName(data) console.log(`Connecting to server ${advert.motd} (${advert.name}), version ${advert.version}`) - // TODO: update connect version based on ping response + client.version = options.version ?? advert.version connect(client) }, client) } From 5f0adfab76699c1b78e4b265f9eea3beb43ada08 Mon Sep 17 00:00:00 2001 From: extremeheat Date: Wed, 9 Jun 2021 17:26:44 -0400 Subject: [PATCH 015/273] 1.17 support (#99) --- .gitignore | 4 +- README.md | 2 +- data/1.17.0/protocol.json | 8902 +++++++++++++++++++++++++++++++++++++ data/latest/proto.yml | 38 +- data/latest/types.yaml | 60 +- index.d.ts | 4 +- src/options.js | 3 +- test/internal.js | 3 +- tools/genPacketDumps.js | 2 +- types/Item.js | 6 +- 10 files changed, 8999 insertions(+), 25 deletions(-) create mode 100644 data/1.17.0/protocol.json diff --git a/.gitignore b/.gitignore index 8bdb3f2..e698980 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,6 @@ data/**/sample data/**/read.js data/**/write.js data/**/size.js -tools/bds* \ No newline at end of file +tools/bds* +tools/*/* +*.txt \ No newline at end of file diff --git a/README.md b/README.md index 124f1b2..1218f51 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ This is a work in progress. You can track the progress in https://github.com/Pri ## Features - - Supports Minecraft Bedrock version 1.16.201, 1.16.210, 1.16.220 + - Supports Minecraft Bedrock version 1.16.201, 1.16.210, 1.16.220, 1.17.0 - Parse and serialize packets as JavaScript objects - Automatically respond to keep-alive packets - [Proxy and mitm connections](docs/API.md) diff --git a/data/1.17.0/protocol.json b/data/1.17.0/protocol.json new file mode 100644 index 0000000..941c0e5 --- /dev/null +++ b/data/1.17.0/protocol.json @@ -0,0 +1,8902 @@ +{ + "types": { + "varint32": "varint", + "bool": "native", + "zigzag32": "native", + "zigzag64": "native", + "uuid": "native", + "byterot": "native", + "MapInfo": "native", + "nbt": "native", + "BehaviourPackInfos": [ + "array", + { + "countType": "li16", + "type": [ + "container", + [ + { + "name": "uuid", + "type": "string" + }, + { + "name": "version", + "type": "string" + }, + { + "name": "size", + "type": "lu64" + }, + { + "name": "content_key", + "type": "string" + }, + { + "name": "sub_pack_name", + "type": "string" + }, + { + "name": "content_identity", + "type": "string" + }, + { + "name": "has_scripts", + "type": "bool" + } + ] + ] + } + ], + "TexturePackInfos": [ + "array", + { + "countType": "li16", + "type": [ + "container", + [ + { + "name": "uuid", + "type": "string" + }, + { + "name": "version", + "type": "string" + }, + { + "name": "size", + "type": "lu64" + }, + { + "name": "content_key", + "type": "string" + }, + { + "name": "sub_pack_name", + "type": "string" + }, + { + "name": "content_identity", + "type": "string" + }, + { + "name": "has_scripts", + "type": "bool" + }, + { + "name": "rtx_enabled", + "type": "bool" + } + ] + ] + } + ], + "ResourcePackIdVersions": [ + "array", + { + "countType": "varint", + "type": [ + "container", + [ + { + "name": "uuid", + "type": "string" + }, + { + "name": "version", + "type": "string" + }, + { + "name": "name", + "type": "string" + } + ] + ] + } + ], + "ResourcePackIds": [ + "array", + { + "countType": "li16", + "type": "string" + } + ], + "Experiment": [ + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "enabled", + "type": "bool" + } + ] + ], + "Experiments": [ + "array", + { + "countType": "li32", + "type": "Experiment" + } + ], + "GameMode": [ + "mapper", + { + "type": "zigzag32", + "mappings": { + "0": "survival", + "1": "creative", + "2": "adventure", + "3": "survival_spectator", + "4": "creative_spectator", + "5": "fallback" + } + } + ], + "GameRule": [ + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "editable", + "type": "bool" + }, + { + "name": "type", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "1": "bool", + "2": "int", + "3": "float" + } + } + ] + }, + { + "name": "value", + "type": [ + "switch", + { + "compareTo": "type", + "fields": { + "bool": "bool", + "int": "zigzag32", + "float": "lf32" + }, + "default": "void" + } + ] + } + ] + ], + "GameRules": [ + "array", + { + "countType": "varint", + "type": "GameRule" + } + ], + "Blob": [ + "container", + [ + { + "name": "hash", + "type": "lu64" + }, + { + "name": "payload", + "type": "ByteArray" + } + ] + ], + "BlockProperties": [ + "array", + { + "countType": "varint", + "type": [ + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "state", + "type": "nbt" + } + ] + ] + } + ], + "Itemstates": [ + "array", + { + "countType": "varint", + "type": [ + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "runtime_id", + "type": "li16" + }, + { + "name": "component_based", + "type": "bool" + } + ] + ] + } + ], + "ItemExtraDataWithBlockingTick": [ + "container", + [ + { + "name": "has_nbt", + "type": [ + "mapper", + { + "type": "lu16", + "mappings": { + "0": "false", + "65535": "true" + } + } + ] + }, + { + "name": "nbt", + "type": [ + "switch", + { + "compareTo": "has_nbt", + "fields": { + "true": [ + "container", + [ + { + "name": "version", + "type": "u8" + }, + { + "name": "nbt", + "type": "lnbt" + } + ] + ] + }, + "default": "void" + } + ] + }, + { + "name": "can_place_on", + "type": [ + "array", + { + "countType": "li32", + "type": "ShortArray" + } + ] + }, + { + "name": "can_destroy", + "type": [ + "array", + { + "countType": "li32", + "type": "ShortArray" + } + ] + }, + { + "name": "blocking_tick", + "type": "li64" + } + ] + ], + "ItemExtraDataWithoutBlockingTick": [ + "container", + [ + { + "name": "has_nbt", + "type": [ + "mapper", + { + "type": "lu16", + "mappings": { + "0": "false", + "65535": "true" + } + } + ] + }, + { + "name": "nbt", + "type": [ + "switch", + { + "compareTo": "has_nbt", + "fields": { + "true": [ + "container", + [ + { + "name": "version", + "type": "u8" + }, + { + "name": "nbt", + "type": "lnbt" + } + ] + ] + }, + "default": "void" + } + ] + }, + { + "name": "can_place_on", + "type": [ + "array", + { + "countType": "li32", + "type": "ShortArray" + } + ] + }, + { + "name": "can_destroy", + "type": [ + "array", + { + "countType": "li32", + "type": "ShortArray" + } + ] + } + ] + ], + "ItemLegacy": [ + "container", + [ + { + "name": "network_id", + "type": "zigzag32" + }, + { + "anon": true, + "type": [ + "switch", + { + "compareTo": "network_id", + "fields": { + "0": "void" + }, + "default": [ + "container", + [ + { + "name": "count", + "type": "lu16" + }, + { + "name": "metadata", + "type": "varint" + }, + { + "name": "block_runtime_id", + "type": "zigzag32" + }, + { + "name": "extra", + "type": [ + "switch", + { + "compareTo": "network_id", + "fields": { + "/ShieldItemID": [ + "encapsulated", + { + "lengthType": "varint", + "type": "ItemExtraDataWithBlockingTick" + } + ] + }, + "default": [ + "encapsulated", + { + "lengthType": "varint", + "type": "ItemExtraDataWithoutBlockingTick" + } + ] + } + ] + } + ] + ] + } + ] + } + ] + ], + "Item": [ + "container", + [ + { + "name": "network_id", + "type": "zigzag32" + }, + { + "anon": true, + "type": [ + "switch", + { + "compareTo": "network_id", + "fields": { + "0": "void" + }, + "default": [ + "container", + [ + { + "name": "count", + "type": "lu16" + }, + { + "name": "metadata", + "type": "varint" + }, + { + "name": "has_stack_id", + "type": "u8" + }, + { + "name": "stack_id", + "type": [ + "switch", + { + "compareTo": "has_stack_id", + "fields": { + "0": "void" + }, + "default": "zigzag32" + } + ] + }, + { + "name": "block_runtime_id", + "type": "zigzag32" + }, + { + "name": "extra", + "type": [ + "switch", + { + "compareTo": "network_id", + "fields": { + "/ShieldItemID": [ + "encapsulated", + { + "lengthType": "varint", + "type": "ItemExtraDataWithBlockingTick" + } + ] + }, + "default": [ + "encapsulated", + { + "lengthType": "varint", + "type": "ItemExtraDataWithoutBlockingTick" + } + ] + } + ] + } + ] + ] + } + ] + } + ] + ], + "vec3i": [ + "container", + [ + { + "name": "x", + "type": "zigzag32" + }, + { + "name": "y", + "type": "zigzag32" + }, + { + "name": "z", + "type": "zigzag32" + } + ] + ], + "vec3u": [ + "container", + [ + { + "name": "x", + "type": "varint" + }, + { + "name": "y", + "type": "varint" + }, + { + "name": "z", + "type": "varint" + } + ] + ], + "vec3f": [ + "container", + [ + { + "name": "x", + "type": "lf32" + }, + { + "name": "y", + "type": "lf32" + }, + { + "name": "z", + "type": "lf32" + } + ] + ], + "vec2f": [ + "container", + [ + { + "name": "x", + "type": "lf32" + }, + { + "name": "z", + "type": "lf32" + } + ] + ], + "MetadataDictionary": [ + "array", + { + "countType": "varint", + "type": [ + "container", + [ + { + "name": "key", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "flags", + "1": "health", + "2": "variant", + "3": "color", + "4": "nametag", + "5": "owner_eid", + "6": "target_eid", + "7": "air", + "8": "potion_color", + "9": "potion_ambient", + "10": "jump_duration", + "11": "hurt_time", + "12": "hurt_direction", + "13": "paddle_time_left", + "14": "paddle_time_right", + "15": "experience_value", + "16": "minecart_display_block", + "17": "minecart_display_offset", + "18": "minecart_has_display", + "20": "old_swell", + "21": "swell_dir", + "22": "charge_amount", + "23": "enderman_held_runtime_id", + "24": "entity_age", + "26": "player_flags", + "27": "player_index", + "28": "player_bed_position", + "29": "fireball_power_x", + "30": "fireball_power_y", + "31": "fireball_power_z", + "32": "aux_power", + "33": "fish_x", + "34": "fish_z", + "35": "fish_angle", + "36": "potion_aux_value", + "37": "lead_holder_eid", + "38": "scale", + "39": "interactive_tag", + "40": "npc_skin_id", + "41": "url_tag", + "42": "max_airdata_max_air", + "43": "mark_variant", + "44": "container_type", + "45": "container_base_size", + "46": "container_extra_slots_per_strength", + "47": "block_target", + "48": "wither_invulnerable_ticks", + "49": "wither_target_1", + "50": "wither_target_2", + "51": "wither_target_3", + "52": "aerial_attack", + "53": "boundingbox_width", + "54": "boundingbox_height", + "55": "fuse_length", + "56": "rider_seat_position", + "57": "rider_rotation_locked", + "58": "rider_max_rotation", + "59": "rider_min_rotation", + "60": "rider_rotation_offset", + "61": "area_effect_cloud_radius", + "62": "area_effect_cloud_waiting", + "63": "area_effect_cloud_particle_id", + "64": "shulker_peek_id", + "65": "shulker_attach_face", + "66": "shulker_attached", + "67": "shulker_attach_pos", + "68": "trading_player_eid", + "69": "trading_career", + "70": "has_command_block", + "71": "command_block_command", + "72": "command_block_last_output", + "73": "command_block_track_output", + "74": "controlling_rider_seat_number", + "75": "strength", + "76": "max_strength", + "77": "spell_casting_color", + "78": "limited_life", + "79": "armor_stand_pose_index", + "80": "ender_crystal_time_offset", + "81": "always_show_nametag", + "82": "color_2", + "83": "name_author", + "84": "score_tag", + "85": "balloon_attached_entity", + "86": "pufferfish_size", + "87": "bubble_time", + "88": "agent", + "89": "sitting_amount", + "90": "sitting_amount_previous", + "91": "eating_counter", + "92": "flags_extended", + "93": "laying_amount", + "94": "laying_amount_previous", + "95": "duration", + "96": "spawn_time", + "97": "change_rate", + "98": "change_on_pickup", + "99": "pickup_count", + "100": "interact_text", + "101": "trade_tier", + "102": "max_trade_tier", + "103": "trade_experience", + "104": "skin_id", + "105": "spawning_frames", + "106": "command_block_tick_delay", + "107": "command_block_execute_on_first_tick", + "108": "ambient_sound_interval", + "109": "ambient_sound_interval_range", + "110": "ambient_sound_event_name", + "111": "fall_damage_multiplier", + "112": "name_raw_text", + "113": "can_ride_target", + "114": "low_tier_cured_discount", + "115": "high_tier_cured_discount", + "116": "nearby_cured_discount", + "117": "nearby_cured_discount_timestamp", + "118": "hitbox", + "119": "is_buoyant", + "120": "base_runtime_id", + "121": "freezing_effect_strength", + "122": "buoyancy_data", + "123": "goat_horn_count", + "124": "update_properties" + } + } + ] + }, + { + "name": "type", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "byte", + "1": "short", + "2": "int", + "3": "float", + "4": "string", + "5": "compound", + "6": "vec3i", + "7": "long", + "8": "vec3f" + } + } + ] + }, + { + "name": "value", + "type": [ + "switch", + { + "compareTo": "key", + "fields": { + "flags": "MetadataFlags1", + "flags_extended": "MetadataFlags2" + }, + "default": [ + "switch", + { + "compareTo": "type", + "fields": { + "byte": "i8", + "short": "li16", + "int": "zigzag32", + "float": "lf32", + "string": "string", + "compound": "nbt", + "vec3i": "vec3i", + "long": "zigzag64", + "vec3f": "vec3f" + }, + "default": "void" + } + ] + } + ] + } + ] + ] + } + ], + "Link": [ + "container", + [ + { + "name": "ridden_entity_id", + "type": "zigzag64" + }, + { + "name": "rider_entity_id", + "type": "zigzag64" + }, + { + "name": "type", + "type": "u8" + }, + { + "name": "immediate", + "type": "bool" + }, + { + "name": "rider_initiated", + "type": "bool" + } + ] + ], + "Links": [ + "array", + { + "countType": "varint", + "type": "Link" + } + ], + "EntityAttributes": [ + "array", + { + "countType": "varint", + "type": [ + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "min", + "type": "lf32" + }, + { + "name": "value", + "type": "lf32" + }, + { + "name": "max", + "type": "lf32" + } + ] + ] + } + ], + "Rotation": [ + "container", + [ + { + "name": "yaw", + "type": "byterot" + }, + { + "name": "pitch", + "type": "byterot" + }, + { + "name": "head_yaw", + "type": "byterot" + } + ] + ], + "BlockCoordinates": [ + "container", + [ + { + "name": "x", + "type": "zigzag32" + }, + { + "name": "y", + "type": "varint" + }, + { + "name": "z", + "type": "zigzag32" + } + ] + ], + "PlayerAttributes": [ + "array", + { + "countType": "varint", + "type": [ + "container", + [ + { + "name": "min", + "type": "lf32" + }, + { + "name": "max", + "type": "lf32" + }, + { + "name": "current", + "type": "lf32" + }, + { + "name": "default", + "type": "lf32" + }, + { + "name": "name", + "type": "string" + } + ] + ] + } + ], + "TransactionUseItem": [ + "container", + [ + { + "name": "action_type", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "click_block", + "1": "click_air", + "2": "break_block" + } + } + ] + }, + { + "name": "block_position", + "type": "vec3i" + }, + { + "name": "face", + "type": "varint" + }, + { + "name": "hotbar_slot", + "type": "varint" + }, + { + "name": "held_item", + "type": "Item" + }, + { + "name": "player_pos", + "type": "vec3f" + }, + { + "name": "click_pos", + "type": "vec3f" + }, + { + "name": "block_runtime_id", + "type": "varint" + } + ] + ], + "TransactionActions": [ + "array", + { + "countType": "varint", + "type": [ + "container", + [ + { + "name": "source_type", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "container", + "1": "global", + "2": "world_interaction", + "3": "creative", + "100": "craft_slot", + "99999": "craft" + } + } + ] + }, + { + "anon": true, + "type": [ + "switch", + { + "compareTo": "source_type", + "fields": { + "container": [ + "container", + [ + { + "name": "inventory_id", + "type": "WindowIDVarint" + } + ] + ], + "craft": [ + "container", + [ + { + "name": "action", + "type": "varint" + } + ] + ], + "world_interaction": [ + "container", + [ + { + "name": "flags", + "type": "varint" + } + ] + ], + "craft_slot": [ + "container", + [ + { + "name": "action", + "type": "varint" + } + ] + ] + }, + "default": "void" + } + ] + }, + { + "name": "slot", + "type": "varint" + }, + { + "name": "old_item", + "type": "Item" + }, + { + "name": "new_item", + "type": "Item" + } + ] + ] + } + ], + "TransactionLegacy": [ + "container", + [ + { + "name": "legacy_request_id", + "type": "zigzag32" + }, + { + "name": "legacy_transactions", + "type": [ + "switch", + { + "compareTo": "legacy_request_id", + "fields": { + "0": "void" + }, + "default": [ + "array", + { + "countType": "varint", + "type": [ + "container", + [ + { + "name": "container_id", + "type": "u8" + }, + { + "name": "changed_slots", + "type": [ + "array", + { + "countType": "varint", + "type": [ + "container", + [ + { + "name": "slot_id", + "type": "u8" + } + ] + ] + } + ] + } + ] + ] + } + ] + } + ] + } + ] + ], + "Transaction": [ + "container", + [ + { + "name": "legacy", + "type": "TransactionLegacy" + }, + { + "name": "transaction_type", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "normal", + "1": "inventory_mismatch", + "2": "item_use", + "3": "item_use_on_entity", + "4": "item_release" + } + } + ] + }, + { + "name": "actions", + "type": "TransactionActions" + }, + { + "name": "transaction_data", + "type": [ + "switch", + { + "compareTo": "transaction_type", + "fields": { + "normal": "void", + "inventory_mismatch": "void", + "item_use": "TransactionUseItem", + "item_use_on_entity": [ + "container", + [ + { + "name": "entity_runtime_id", + "type": "varint64" + }, + { + "name": "action_type", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "interact", + "1": "attack" + } + } + ] + }, + { + "name": "hotbar_slot", + "type": "zigzag32" + }, + { + "name": "held_item", + "type": "Item" + }, + { + "name": "player_pos", + "type": "vec3f" + }, + { + "name": "click_pos", + "type": "vec3f" + } + ] + ], + "item_release": [ + "container", + [ + { + "name": "action_type", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "release", + "1": "consume" + } + } + ] + }, + { + "name": "hotbar_slot", + "type": "zigzag32" + }, + { + "name": "held_item", + "type": "Item" + }, + { + "name": "head_pos", + "type": "vec3f" + } + ] + ] + }, + "default": "void" + } + ] + } + ] + ], + "ItemStacks": [ + "array", + { + "countType": "varint", + "type": "Item" + } + ], + "RecipeIngredient": [ + "container", + [ + { + "name": "network_id", + "type": "zigzag32" + }, + { + "anon": true, + "type": [ + "switch", + { + "compareTo": "network_id", + "fields": { + "0": "void" + }, + "default": [ + "container", + [ + { + "name": "network_data", + "type": "zigzag32" + }, + { + "name": "count", + "type": "zigzag32" + } + ] + ] + } + ] + } + ] + ], + "PotionTypeRecipes": [ + "array", + { + "countType": "varint", + "type": [ + "container", + [ + { + "name": "input_item_id", + "type": "zigzag32" + }, + { + "name": "input_item_meta", + "type": "zigzag32" + }, + { + "name": "ingredient_id", + "type": "zigzag32" + }, + { + "name": "ingredient_meta", + "type": "zigzag32" + }, + { + "name": "output_item_id", + "type": "zigzag32" + }, + { + "name": "output_item_meta", + "type": "zigzag32" + } + ] + ] + } + ], + "PotionContainerChangeRecipes": [ + "array", + { + "countType": "varint", + "type": [ + "container", + [ + { + "name": "input_item_id", + "type": "zigzag32" + }, + { + "name": "ingredient_id", + "type": "zigzag32" + }, + { + "name": "output_item_id", + "type": "zigzag32" + } + ] + ] + } + ], + "Recipes": [ + "array", + { + "countType": "varint", + "type": [ + "container", + [ + { + "name": "type", + "type": [ + "mapper", + { + "type": "zigzag32", + "mappings": { + "0": "shapeless", + "1": "shaped", + "2": "furnace", + "3": "furnace_with_metadata", + "4": "multi", + "5": "shulker_box", + "6": "shapeless_chemistry", + "7": "shaped_chemistry" + } + } + ] + }, + { + "name": "recipe", + "type": [ + "switch", + { + "compareTo": "type", + "fields": { + "shapeless": [ + "container", + [ + { + "name": "recipe_id", + "type": "string" + }, + { + "name": "input", + "type": [ + "array", + { + "countType": "varint", + "type": "RecipeIngredient" + } + ] + }, + { + "name": "output", + "type": [ + "array", + { + "countType": "varint", + "type": "ItemLegacy" + } + ] + }, + { + "name": "uuid", + "type": "uuid" + }, + { + "name": "block", + "type": "string" + }, + { + "name": "priority", + "type": "zigzag32" + }, + { + "name": "network_id", + "type": "varint" + } + ] + ], + "shulker_box": [ + "container", + [ + { + "name": "recipe_id", + "type": "string" + }, + { + "name": "input", + "type": [ + "array", + { + "countType": "varint", + "type": "RecipeIngredient" + } + ] + }, + { + "name": "output", + "type": [ + "array", + { + "countType": "varint", + "type": "ItemLegacy" + } + ] + }, + { + "name": "uuid", + "type": "uuid" + }, + { + "name": "block", + "type": "string" + }, + { + "name": "priority", + "type": "zigzag32" + }, + { + "name": "network_id", + "type": "varint" + } + ] + ], + "shapeless_chemistry": [ + "container", + [ + { + "name": "recipe_id", + "type": "string" + }, + { + "name": "input", + "type": [ + "array", + { + "countType": "varint", + "type": "RecipeIngredient" + } + ] + }, + { + "name": "output", + "type": [ + "array", + { + "countType": "varint", + "type": "ItemLegacy" + } + ] + }, + { + "name": "uuid", + "type": "uuid" + }, + { + "name": "block", + "type": "string" + }, + { + "name": "priority", + "type": "zigzag32" + }, + { + "name": "network_id", + "type": "varint" + } + ] + ], + "shaped": [ + "container", + [ + { + "name": "recipe_id", + "type": "string" + }, + { + "name": "width", + "type": "zigzag32" + }, + { + "name": "height", + "type": "zigzag32" + }, + { + "name": "input", + "type": [ + "array", + { + "count": "width", + "type": [ + "array", + { + "count": "height", + "type": "RecipeIngredient" + } + ] + } + ] + }, + { + "name": "output", + "type": [ + "array", + { + "countType": "varint", + "type": "ItemLegacy" + } + ] + }, + { + "name": "uuid", + "type": "uuid" + }, + { + "name": "block", + "type": "string" + }, + { + "name": "priority", + "type": "zigzag32" + }, + { + "name": "network_id", + "type": "varint" + } + ] + ], + "shaped_chemistry": [ + "container", + [ + { + "name": "recipe_id", + "type": "string" + }, + { + "name": "width", + "type": "zigzag32" + }, + { + "name": "height", + "type": "zigzag32" + }, + { + "name": "input", + "type": [ + "array", + { + "count": "width", + "type": [ + "array", + { + "count": "height", + "type": "RecipeIngredient" + } + ] + } + ] + }, + { + "name": "output", + "type": [ + "array", + { + "countType": "varint", + "type": "ItemLegacy" + } + ] + }, + { + "name": "uuid", + "type": "uuid" + }, + { + "name": "block", + "type": "string" + }, + { + "name": "priority", + "type": "zigzag32" + }, + { + "name": "network_id", + "type": "varint" + } + ] + ], + "furnace": [ + "container", + [ + { + "name": "input_id", + "type": "zigzag32" + }, + { + "name": "output", + "type": "ItemLegacy" + }, + { + "name": "block", + "type": "string" + } + ] + ], + "furnace_with_metadata": [ + "container", + [ + { + "name": "input_id", + "type": "zigzag32" + }, + { + "name": "input_meta", + "type": "zigzag32" + }, + { + "name": "output", + "type": "ItemLegacy" + }, + { + "name": "block", + "type": "string" + } + ] + ], + "multi": [ + "container", + [ + { + "name": "uuid", + "type": "uuid" + }, + { + "name": "network_id", + "type": "varint" + } + ] + ] + }, + "default": "void" + } + ] + } + ] + ] + } + ], + "SkinImage": [ + "container", + [ + { + "name": "width", + "type": "li32" + }, + { + "name": "height", + "type": "li32" + }, + { + "name": "data", + "type": "ByteArray" + } + ] + ], + "Skin": [ + "container", + [ + { + "name": "skin_id", + "type": "string" + }, + { + "name": "play_fab_id", + "type": "string" + }, + { + "name": "skin_resource_pack", + "type": "string" + }, + { + "name": "skin_data", + "type": "SkinImage" + }, + { + "name": "animations", + "type": [ + "array", + { + "countType": "li32", + "type": [ + "container", + [ + { + "name": "skin_image", + "type": "SkinImage" + }, + { + "name": "animation_type", + "type": "li32" + }, + { + "name": "animation_frames", + "type": "lf32" + }, + { + "name": "expression_type", + "type": "lf32" + } + ] + ] + } + ] + }, + { + "name": "cape_data", + "type": "SkinImage" + }, + { + "name": "geometry_data", + "type": "string" + }, + { + "name": "animation_data", + "type": "string" + }, + { + "name": "premium", + "type": "bool" + }, + { + "name": "persona", + "type": "bool" + }, + { + "name": "cape_on_classic", + "type": "bool" + }, + { + "name": "cape_id", + "type": "string" + }, + { + "name": "full_skin_id", + "type": "string" + }, + { + "name": "arm_size", + "type": "string" + }, + { + "name": "skin_color", + "type": "string" + }, + { + "name": "personal_pieces", + "type": [ + "array", + { + "countType": "li32", + "type": [ + "container", + [ + { + "name": "piece_id", + "type": "string" + }, + { + "name": "piece_type", + "type": "string" + }, + { + "name": "pack_id", + "type": "string" + }, + { + "name": "is_default_piece", + "type": "bool" + }, + { + "name": "product_id", + "type": "string" + } + ] + ] + } + ] + }, + { + "name": "piece_tint_colors", + "type": [ + "array", + { + "countType": "li32", + "type": [ + "container", + [ + { + "name": "piece_type", + "type": "string" + }, + { + "name": "colors", + "type": [ + "array", + { + "countType": "li32", + "type": "string" + } + ] + } + ] + ] + } + ] + } + ] + ], + "PlayerRecords": [ + "container", + [ + { + "name": "type", + "type": [ + "mapper", + { + "type": "u8", + "mappings": { + "0": "add", + "1": "remove" + } + } + ] + }, + { + "name": "records_count", + "type": "varint" + }, + { + "name": "records", + "type": [ + "array", + { + "count": "records_count", + "type": [ + "switch", + { + "compareTo": "type", + "fields": { + "add": [ + "container", + [ + { + "name": "uuid", + "type": "uuid" + }, + { + "name": "entity_unique_id", + "type": "zigzag64" + }, + { + "name": "username", + "type": "string" + }, + { + "name": "xbox_user_id", + "type": "string" + }, + { + "name": "platform_chat_id", + "type": "string" + }, + { + "name": "build_platform", + "type": "li32" + }, + { + "name": "skin_data", + "type": "Skin" + }, + { + "name": "is_teacher", + "type": "bool" + }, + { + "name": "is_host", + "type": "bool" + } + ] + ], + "remove": [ + "container", + [ + { + "name": "uuid", + "type": "uuid" + } + ] + ] + }, + "default": "void" + } + ] + } + ] + }, + { + "name": "verified", + "type": [ + "switch", + { + "compareTo": "type", + "fields": { + "add": [ + "array", + { + "count": "records_count", + "type": "bool" + } + ] + }, + "default": "void" + } + ] + } + ] + ], + "Enchant": [ + "container", + [ + { + "name": "id", + "type": "u8" + }, + { + "name": "level", + "type": "u8" + } + ] + ], + "EnchantOption": [ + "container", + [ + { + "name": "cost", + "type": "varint" + }, + { + "name": "slot_flags", + "type": "li32" + }, + { + "name": "equip_enchants", + "type": [ + "array", + { + "countType": "varint", + "type": "Enchant" + } + ] + }, + { + "name": "held_enchants", + "type": [ + "array", + { + "countType": "varint", + "type": "Enchant" + } + ] + }, + { + "name": "self_enchants", + "type": [ + "array", + { + "countType": "varint", + "type": "Enchant" + } + ] + }, + { + "name": "name", + "type": "string" + }, + { + "name": "option_id", + "type": "zigzag32" + } + ] + ], + "Action": [ + "mapper", + { + "type": "zigzag32", + "mappings": { + "0": "start_break", + "1": "abort_break", + "2": "stop_break", + "3": "get_updated_block", + "4": "drop_item", + "5": "start_sleeping", + "6": "stop_sleeping", + "7": "respawn", + "8": "jump", + "9": "start_sprint", + "10": "stop_sprint", + "11": "start_sneak", + "12": "stop_sneak", + "13": "creative_player_destroy_block", + "14": "dimension_change_ack", + "15": "start_glide", + "16": "stop_glide", + "17": "build_denied", + "18": "crack_break", + "19": "change_skin", + "20": "set_enchatnment_seed", + "21": "swimming", + "22": "stop_swimming", + "23": "start_spin_attack", + "24": "stop_spin_attack", + "25": "interact_block", + "26": "predict_break", + "27": "continue_break" + } + } + ], + "StackRequestSlotInfo": [ + "container", + [ + { + "name": "slot_type", + "type": "ContainerSlotType" + }, + { + "name": "slot", + "type": "u8" + }, + { + "name": "stack_id", + "type": "zigzag32" + } + ] + ], + "ItemStackRequest": [ + "container", + [ + { + "name": "request_id", + "type": "varint" + }, + { + "name": "actions", + "type": [ + "array", + { + "countType": "varint", + "type": [ + "container", + [ + { + "name": "type_id", + "type": [ + "mapper", + { + "type": "u8", + "mappings": { + "0": "take", + "1": "place", + "2": "swap", + "3": "drop", + "4": "destroy", + "5": "consume", + "6": "create", + "7": "lab_table_combine", + "8": "beacon_payment", + "9": "mine_block", + "10": "craft_recipe", + "11": "craft_recipe_auto", + "12": "craft_creative", + "13": "optional", + "14": "non_implemented", + "15": "results_deprecated" + } + } + ] + }, + { + "anon": true, + "type": [ + "switch", + { + "compareTo": "type_id", + "fields": { + "take": [ + "container", + [ + { + "name": "count", + "type": "u8" + }, + { + "name": "source", + "type": "StackRequestSlotInfo" + }, + { + "name": "destination", + "type": "StackRequestSlotInfo" + } + ] + ], + "place": [ + "container", + [ + { + "name": "count", + "type": "u8" + }, + { + "name": "source", + "type": "StackRequestSlotInfo" + }, + { + "name": "destination", + "type": "StackRequestSlotInfo" + } + ] + ], + "swap": [ + "container", + [ + { + "name": "source", + "type": "StackRequestSlotInfo" + }, + { + "name": "destination", + "type": "StackRequestSlotInfo" + } + ] + ], + "drop": [ + "container", + [ + { + "name": "count", + "type": "u8" + }, + { + "name": "source", + "type": "StackRequestSlotInfo" + }, + { + "name": "randomly", + "type": "bool" + } + ] + ], + "destroy": [ + "container", + [ + { + "name": "count", + "type": "u8" + }, + { + "name": "source", + "type": "StackRequestSlotInfo" + } + ] + ], + "consume": [ + "container", + [ + { + "name": "count", + "type": "u8" + }, + { + "name": "source", + "type": "StackRequestSlotInfo" + } + ] + ], + "create": [ + "container", + [ + { + "name": "result_slot_id", + "type": "u8" + } + ] + ], + "beacon_payment": [ + "container", + [ + { + "name": "primary_effect", + "type": "zigzag32" + }, + { + "name": "secondary_effect", + "type": "zigzag32" + } + ] + ], + "mine_block": [ + "container", + [ + { + "name": "unknown1", + "type": "zigzag32" + }, + { + "name": "predicted_durability", + "type": "zigzag32" + }, + { + "name": "network_id", + "type": "zigzag32" + } + ] + ], + "craft_recipe": [ + "container", + [ + { + "name": "recipe_network_id", + "type": "varint" + } + ] + ], + "craft_recipe_auto": [ + "container", + [ + { + "name": "recipe_network_id", + "type": "varint" + } + ] + ], + "craft_creative": [ + "container", + [ + { + "name": "item_id", + "type": "varint32" + } + ] + ], + "optional": [ + "container", + [ + { + "name": "recipe_network_id", + "type": "varint" + }, + { + "name": "filtered_string_index", + "type": "li32" + } + ] + ], + "non_implemented": "void", + "results_deprecated": [ + "container", + [ + { + "name": "result_items", + "type": [ + "array", + { + "countType": "varint", + "type": "ItemLegacy" + } + ] + }, + { + "name": "times_crafted", + "type": "u8" + } + ] + ] + }, + "default": "void" + } + ] + } + ] + ] + } + ] + }, + { + "name": "custom_names", + "type": [ + "array", + { + "countType": "varint", + "type": "string" + } + ] + } + ] + ], + "ItemStackResponses": [ + "array", + { + "countType": "varint", + "type": [ + "container", + [ + { + "name": "status", + "type": [ + "mapper", + { + "type": "u8", + "mappings": { + "0": "ok", + "1": "error" + } + } + ] + }, + { + "name": "request_id", + "type": "varint32" + }, + { + "anon": true, + "type": [ + "switch", + { + "compareTo": "status", + "fields": { + "ok": [ + "container", + [ + { + "name": "containers", + "type": [ + "array", + { + "countType": "varint", + "type": [ + "container", + [ + { + "name": "slot_type", + "type": "ContainerSlotType" + }, + { + "name": "slots", + "type": [ + "array", + { + "countType": "varint", + "type": [ + "container", + [ + { + "name": "slot", + "type": "u8" + }, + { + "name": "hotbar_slot", + "type": "u8" + }, + { + "name": "count", + "type": "u8" + }, + { + "name": "item_stack_id", + "type": "varint32" + }, + { + "name": "custom_name", + "type": "string" + }, + { + "name": "durability_correction", + "type": "zigzag32" + } + ] + ] + } + ] + } + ] + ] + } + ] + } + ] + ] + }, + "default": "void" + } + ] + } + ] + ] + } + ], + "ItemComponentList": [ + "array", + { + "countType": "varint", + "type": [ + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "nbt", + "type": "nbt" + } + ] + ] + } + ], + "CommandOrigin": [ + "container", + [ + { + "name": "type", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "player", + "1": "block", + "2": "minecart_block", + "3": "dev_console", + "4": "test", + "5": "automation_player", + "6": "client_automation", + "7": "dedicated_server", + "8": "entity", + "9": "virtual", + "10": "game_argument", + "11": "entity_server", + "12": "precompiled", + "13": "game_director_entity_server", + "14": "script" + } + } + ] + }, + { + "name": "uuid", + "type": "uuid" + }, + { + "name": "request_id", + "type": "string" + }, + { + "name": "player_entity_id", + "type": [ + "switch", + { + "compareTo": "type", + "fields": { + "dev_console": [ + "container", + [ + { + "name": "player_entity_id", + "type": "zigzag64" + } + ] + ], + "test": [ + "container", + [ + { + "name": "player_entity_id", + "type": "zigzag64" + } + ] + ] + }, + "default": "void" + } + ] + } + ] + ], + "TrackedObject": [ + "container", + [ + { + "name": "type", + "type": [ + "mapper", + { + "type": "li32", + "mappings": { + "0": "entity", + "1": "block" + } + } + ] + }, + { + "name": "entity_unique_id", + "type": [ + "switch", + { + "compareTo": "type", + "fields": { + "entity": "zigzag64" + }, + "default": "void" + } + ] + }, + { + "name": "block_position", + "type": [ + "switch", + { + "compareTo": "type", + "fields": { + "block": "BlockCoordinates" + }, + "default": "void" + } + ] + } + ] + ], + "MapDecoration": [ + "container", + [ + { + "name": "type", + "type": "u8" + }, + { + "name": "rotation", + "type": "u8" + }, + { + "name": "x", + "type": "u8" + }, + { + "name": "y", + "type": "u8" + }, + { + "name": "label", + "type": "string" + }, + { + "name": "color_abgr", + "type": "varint" + } + ] + ], + "StructureBlockSettings": [ + "container", + [ + { + "name": "palette_name", + "type": "string" + }, + { + "name": "ignore_entities", + "type": "bool" + }, + { + "name": "ignore_blocks", + "type": "bool" + }, + { + "name": "size", + "type": "BlockCoordinates" + }, + { + "name": "structure_offset", + "type": "BlockCoordinates" + }, + { + "name": "last_editing_player_unique_id", + "type": "zigzag64" + }, + { + "name": "rotation", + "type": [ + "mapper", + { + "type": "u8", + "mappings": { + "0": "none", + "1": "90_deg", + "2": "180_deg", + "3": "270_deg" + } + } + ] + }, + { + "name": "mirror", + "type": [ + "mapper", + { + "type": "u8", + "mappings": { + "0": "none", + "1": "x_axis", + "2": "z_axis", + "3": "both_axes" + } + } + ] + }, + { + "name": "animation_mode", + "type": [ + "mapper", + { + "type": "u8", + "mappings": { + "0": "none", + "1": "layers", + "2": "blocks" + } + } + ] + }, + { + "name": "animation_duration", + "type": "lf32" + }, + { + "name": "integrity", + "type": "lf32" + }, + { + "name": "seed", + "type": "lu32" + }, + { + "name": "pivot", + "type": "vec3f" + } + ] + ], + "WindowID": [ + "mapper", + { + "type": "i8", + "mappings": { + "0": "inventory", + "1": "first", + "100": "last", + "119": "offhand", + "120": "armor", + "121": "creative", + "122": "hotbar", + "123": "fixed_inventory", + "124": "ui", + "-100": "drop_contents", + "-24": "beacon", + "-23": "trading_output", + "-22": "trading_use_inputs", + "-21": "trading_input_2", + "-20": "trading_input_1", + "-17": "enchant_output", + "-16": "enchant_material", + "-15": "enchant_input", + "-13": "anvil_output", + "-12": "anvil_result", + "-11": "anvil_material", + "-10": "container_input", + "-5": "crafting_use_ingredient", + "-4": "crafting_result", + "-3": "crafting_remove_ingredient", + "-2": "crafting_add_ingredient", + "-1": "none" + } + } + ], + "WindowIDVarint": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "inventory", + "1": "first", + "100": "last", + "119": "offhand", + "120": "armor", + "121": "creative", + "122": "hotbar", + "123": "fixed_inventory", + "124": "ui", + "-100": "drop_contents", + "-24": "beacon", + "-23": "trading_output", + "-22": "trading_use_inputs", + "-21": "trading_input_2", + "-20": "trading_input_1", + "-17": "enchant_output", + "-16": "enchant_material", + "-15": "enchant_input", + "-13": "anvil_output", + "-12": "anvil_result", + "-11": "anvil_material", + "-10": "container_input", + "-5": "crafting_use_ingredient", + "-4": "crafting_result", + "-3": "crafting_remove_ingredient", + "-2": "crafting_add_ingredient", + "-1": "none" + } + } + ], + "WindowType": [ + "mapper", + { + "type": "i8", + "mappings": { + "0": "container", + "1": "workbench", + "2": "furnace", + "3": "enchantment", + "4": "brewing_stand", + "5": "anvil", + "6": "dispenser", + "7": "dropper", + "8": "hopper", + "9": "cauldron", + "10": "minecart_chest", + "11": "minecart_hopper", + "12": "horse", + "13": "beacon", + "14": "structure_editor", + "15": "trading", + "16": "command_block", + "17": "jukebox", + "18": "armor", + "19": "hand", + "20": "compound_creator", + "21": "element_constructor", + "22": "material_reducer", + "23": "lab_table", + "24": "loom", + "25": "lectern", + "26": "grindstone", + "27": "blast_furnace", + "28": "smoker", + "29": "stonecutter", + "30": "cartography", + "31": "hud", + "32": "jigsaw_editor", + "33": "smithing_table", + "-9": "none", + "-1": "inventory" + } + } + ], + "ContainerSlotType": [ + "mapper", + { + "type": "u8", + "mappings": { + "0": "anvil_input", + "1": "anvil_material", + "2": "anvil_result", + "3": "smithing_table_input", + "4": "smithing_table_material", + "5": "smithing_table_result", + "6": "armor", + "7": "container", + "8": "beacon_payment", + "9": "brewing_input", + "10": "brewing_result", + "11": "brewing_fuel", + "12": "hotbar_and_inventory", + "13": "crafting_input", + "14": "crafting_output", + "15": "recipe_construction", + "16": "recipe_nature", + "17": "recipe_items", + "18": "recipe_search", + "19": "recipe_search_bar", + "20": "recipe_equipment", + "21": "enchanting_input", + "22": "enchanting_lapis", + "23": "furnace_fuel", + "24": "furnace_ingredient", + "25": "furnace_output", + "26": "horse_equip", + "27": "hotbar", + "28": "inventory", + "29": "shulker", + "30": "trade_ingredient1", + "31": "trade_ingredient2", + "32": "trade_result", + "33": "offhand", + "34": "compcreate_input", + "35": "compcreate_output", + "36": "elemconstruct_output", + "37": "matreduce_input", + "38": "matreduce_output", + "39": "labtable_input", + "40": "loom_input", + "41": "loom_dye", + "42": "loom_material", + "43": "loom_result", + "44": "blast_furnace_ingredient", + "45": "smoker_ingredient", + "46": "trade2_ingredient1", + "47": "trade2_ingredient2", + "48": "trade2_result", + "49": "grindstone_input", + "50": "grindstone_additional", + "51": "grindstone_result", + "52": "stonecutter_input", + "53": "stonecutter_result", + "54": "cartography_input", + "55": "cartography_additional", + "56": "cartography_result", + "57": "barrel", + "58": "cursor", + "59": "creative_output" + } + } + ], + "SoundType": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "ItemUseOn", + "1": "Hit", + "2": "Step", + "3": "Fly", + "4": "Jump", + "5": "Break", + "6": "Place", + "7": "HeavyStep", + "8": "Gallop", + "9": "Fall", + "10": "Ambient", + "11": "AmbientBaby", + "12": "AmbientInWater", + "13": "Breathe", + "14": "Death", + "15": "DeathInWater", + "16": "DeathToZombie", + "17": "Hurt", + "18": "HurtInWater", + "19": "Mad", + "20": "Boost", + "21": "Bow", + "22": "SquishBig", + "23": "SquishSmall", + "24": "FallBig", + "25": "FallSmall", + "26": "Splash", + "27": "Fizz", + "28": "Flap", + "29": "Swim", + "30": "Drink", + "31": "Eat", + "32": "Takeoff", + "33": "Shake", + "34": "Plop", + "35": "Land", + "36": "Saddle", + "37": "Armor", + "38": "MobArmorStandPlace", + "39": "AddChest", + "40": "Throw", + "41": "Attack", + "42": "AttackNoDamage", + "43": "AttackStrong", + "44": "Warn", + "45": "Shear", + "46": "Milk", + "47": "Thunder", + "48": "Explode", + "49": "Fire", + "50": "Ignite", + "51": "Fuse", + "52": "Stare", + "53": "Spawn", + "54": "Shoot", + "55": "BreakBlock", + "56": "Launch", + "57": "Blast", + "58": "LargeBlast", + "59": "Twinkle", + "60": "Remedy", + "61": "Infect", + "62": "LevelUp", + "63": "BowHit", + "64": "BulletHit", + "65": "ExtinguishFire", + "66": "ItemFizz", + "67": "ChestOpen", + "68": "ChestClosed", + "69": "ShulkerBoxOpen", + "70": "ShulkerBoxClosed", + "71": "EnderChestOpen", + "72": "EnderChestClosed", + "73": "PowerOn", + "74": "PowerOff", + "75": "Attach", + "76": "Detach", + "77": "Deny", + "78": "Tripod", + "79": "Pop", + "80": "DropSlot", + "81": "Note", + "82": "Thorns", + "83": "PistonIn", + "84": "PistonOut", + "85": "Portal", + "86": "Water", + "87": "LavaPop", + "88": "Lava", + "89": "Burp", + "90": "BucketFillWater", + "91": "BucketFillLava", + "92": "BucketEmptyWater", + "93": "BucketEmptyLava", + "94": "ArmorEquipChain", + "95": "ArmorEquipDiamond", + "96": "ArmorEquipGeneric", + "97": "ArmorEquipGold", + "98": "ArmorEquipIron", + "99": "ArmorEquipLeather", + "100": "ArmorEquipElytra", + "101": "Record13", + "102": "RecordCat", + "103": "RecordBlocks", + "104": "RecordChirp", + "105": "RecordFar", + "106": "RecordMall", + "107": "RecordMellohi", + "108": "RecordStal", + "109": "RecordStrad", + "110": "RecordWard", + "111": "Record11", + "112": "RecordWait", + "113": "unknown1", + "114": "Flop", + "115": "ElderGuardianCurse", + "116": "MobWarning", + "117": "MobWarningBaby", + "118": "Teleport", + "119": "ShulkerOpen", + "120": "ShulkerClose", + "121": "Haggle", + "122": "HaggleYes", + "123": "HaggleNo", + "124": "HaggleIdle", + "125": "ChorusGrow", + "126": "ChorusDeath", + "127": "Glass", + "128": "PotionBrewed", + "129": "CastSpell", + "130": "PrepareAttack", + "131": "PrepareSummon", + "132": "PrepareWololo", + "133": "Fang", + "134": "Charge", + "135": "CameraTakePicture", + "136": "LeashKnotPlace", + "137": "LeashKnotBreak", + "138": "Growl", + "139": "Whine", + "140": "Pant", + "141": "Purr", + "142": "Purreow", + "143": "DeathMinVolume", + "144": "DeathMidVolume", + "145": "unknown2", + "146": "ImitateCaveSpider", + "147": "ImitateCreeper", + "148": "ImitateElderGuardian", + "149": "ImitateEnderDragon", + "150": "ImitateEnderman", + "151": "unknown3", + "152": "ImitateEvocationIllager", + "153": "ImitateGhast", + "154": "ImitateHusk", + "155": "ImitateIllusionIllager", + "156": "ImitateMagmaCube", + "157": "ImitatePolarBear", + "158": "ImitateShulker", + "159": "ImitateSilverfish", + "160": "ImitateSkeleton", + "161": "ImitateSlime", + "162": "ImitateSpider", + "163": "ImitateStray", + "164": "ImitateVex", + "165": "ImitateVindicationIllager", + "166": "ImitateWitch", + "167": "ImitateWither", + "168": "ImitateWitherSkeleton", + "169": "ImitateWolf", + "170": "ImitateZombie", + "171": "ImitateZombiePigman", + "172": "ImitateZombieVillager", + "173": "BlockEndPortalFrameFill", + "174": "BlockEndPortalSpawn", + "175": "RandomAnvilUse", + "176": "BottleDragonBreath", + "177": "PortalTravel", + "178": "ItemTridentHit", + "179": "ItemTridentReturn", + "180": "ItemTridentRiptide1", + "181": "ItemTridentRiptide2", + "182": "ItemTridentRiptide3", + "183": "ItemTridentThrow", + "184": "ItemTridentThunder", + "185": "ItemTridentHitGround", + "186": "Default", + "187": "BlockFletchingTableUse", + "188": "ElemConstructOpen", + "189": "IceBombHit", + "190": "BalloonPop", + "191": "LtReactionIceBomb", + "192": "LtReactionBleach", + "193": "LtReactionEPaste", + "194": "LtReactionEPaste2", + "195": "LtReactionFertilizer", + "196": "LtReactionFireball", + "197": "LtReactionMgsalt", + "198": "LtReactionMiscfire", + "199": "LtReactionFire", + "200": "LtReactionMiscexplosion", + "201": "LtReactionMiscmystical", + "202": "LtReactionMiscmystical2", + "203": "LtReactionProduct", + "204": "SparklerUse", + "205": "GlowstickUse", + "206": "SparklerActive", + "207": "ConvertToDrowned", + "208": "BucketFillFish", + "209": "BucketEmptyFish", + "210": "BubbleUp", + "211": "BubbleDown", + "212": "BubblePop", + "213": "BubbleUpInside", + "214": "BubbleDownInside", + "215": "HurtBaby", + "216": "DeathBaby", + "217": "StepBaby", + "218": "BabySpawn", + "219": "Born", + "220": "BlockTurtleEggBreak", + "221": "BlockTurtleEggCrack", + "222": "BlockTurtleEggHatch", + "223": "TurtleLayEgg", + "224": "BlockTurtleEggAttack", + "225": "BeaconActivate", + "226": "BeaconAmbient", + "227": "BeaconDeactivate", + "228": "BeaconPower", + "229": "ConduitActivate", + "230": "ConduitAmbient", + "231": "ConduitAttack", + "232": "ConduitDeactivate", + "233": "ConduitShort", + "234": "Swoop", + "235": "BlockBambooSaplingPlace", + "236": "PreSneeze", + "237": "Sneeze", + "238": "AmbientTame", + "239": "Scared", + "240": "BlockScaffoldingClimb", + "241": "CrossbowLoadingStart", + "242": "CrossbowLoadingMiddle", + "243": "CrossbowLoadingEnd", + "244": "CrossbowShoot", + "245": "CrossbowQuickChargeStart", + "246": "CrossbowQuickChargeMiddle", + "247": "CrossbowQuickChargeEnd", + "248": "AmbientAggressive", + "249": "AmbientWorried", + "250": "CantBreed", + "251": "ItemShieldBlock", + "252": "ItemBookPut", + "253": "BlockGrindstoneUse", + "254": "BlockBellHit", + "255": "BlockCampfireCrackle", + "256": "Roar", + "257": "Stun", + "258": "BlockSweetBerryBushHurt", + "259": "BlockSweetBerryBushPick", + "260": "UICartographyTableTakeResult", + "261": "UIStoneCutterTakeResult", + "262": "BlockComposterEmpty", + "263": "BlockComposterFill", + "264": "BlockComposterFillSuccess", + "265": "BlockComposterReady", + "266": "BlockBarrelOpen", + "267": "BlockBarrelClose", + "268": "RaidHorn", + "269": "BlockLoomUse", + "270": "AmbientRaid", + "271": "UICartographyTableUse", + "272": "UIStoneCutterUse", + "273": "UILoomUse", + "274": "SmokerUse", + "275": "BlastFurnaceUse", + "276": "SmithingTableUse", + "277": "Screech", + "278": "Sleep", + "279": "FurnaceUse", + "280": "MooshroomConvert", + "281": "MilkSuspiciously", + "282": "Celebrate", + "283": "JumpPrevent", + "284": "AmbientPollinate", + "285": "BeeHiveDrip", + "286": "BeeHiveEnter", + "287": "BeeHiveExit", + "288": "BeeHiveWork", + "289": "BeeHiveShear", + "290": "HoneyBottleDrink", + "291": "AmbientCave", + "292": "Retreat", + "293": "ConvertToZombified", + "294": "Admire", + "295": "StepLava", + "296": "Tempt", + "297": "Panic", + "298": "Angry", + "299": "AmbientWarpedForest", + "300": "AmbientSoulsandValley", + "301": "AmbientNetherWastes", + "302": "AmbientBasaltDeltas", + "303": "AmbientCrimsonForest", + "304": "RespawnAnchorCharge", + "305": "RespawnAnchorDeplete", + "306": "RespawnAnchorSetSpawn", + "307": "RespawnAnchorAmbient", + "308": "SoulEscapeQuiet", + "309": "SoulEscapeLoud", + "310": "RecordPigstep", + "311": "LinkCompassToLodestone", + "312": "BlockSmithingTableUse", + "313": "EquipNetherite", + "314": "AmbientLoopWarpedForest", + "315": "AmbientLoopSoulsandValley", + "316": "AmbientLoopNetherWastes", + "317": "AmbientLoopBasaltDeltas", + "318": "AmbientLoopCrimsonForest", + "319": "AmbientAdditionWarpedForest", + "320": "AmbientAdditionSoulsandValley", + "321": "AmbientAdditionNetherWastes", + "322": "AmbientAdditionBasaltDeltas", + "323": "AmbientAdditionCrimsonForest", + "324": "SculkSensorPowerOn", + "325": "SculkSensorPowerOff", + "326": "BucketFillPowderSnow", + "327": "BucketEmptyPowderSnow", + "328": "PointedDripstoneCauldronDripWater", + "329": "PointedDripstoneCauldronDripLava", + "330": "PointedDripstoneDripWater", + "331": "PointedDripstoneDripLava", + "332": "CaveVinesPickBerries", + "333": "BigDripleafTiltDown", + "334": "BigDripleafTiltUp", + "335": "unknown335", + "336": "unknown336", + "337": "unknown337", + "338": "unknown338", + "339": "copper_wax_on", + "340": "copper_wax_off", + "341": "scrape", + "342": "player_hurt_drown", + "343": "player_hurt_on_fire", + "344": "player_hurt_freeze", + "345": "use_spyglass", + "346": "stop_using_spyglass", + "347": "amethyst_block_chime", + "348": "ambient_screamer", + "349": "hurt_screamer", + "350": "death_screamer", + "351": "milk_screamer", + "352": "jump_to_block", + "353": "pre_ram", + "354": "pre_ram_screamer", + "355": "ram_impact", + "356": "ram_impact_screamer", + "357": "squid_ink_squirt", + "358": "glow_squid_ink_squirt", + "359": "convert_to_stray", + "360": "Undefined" + } + } + ], + "LegacyEntityType": [ + "mapper", + { + "type": "li32", + "mappings": { + "10": "chicken", + "11": "cow", + "12": "pig", + "13": "sheep", + "14": "wolf", + "15": "villager", + "16": "mooshroom", + "17": "squid", + "18": "rabbit", + "19": "bat", + "20": "iron_golem", + "21": "snow_golem", + "22": "ocelot", + "23": "horse", + "24": "donkey", + "25": "mule", + "26": "skeleton_horse", + "27": "zombie_horse", + "28": "polar_bear", + "29": "llama", + "30": "parrot", + "31": "dolphin", + "32": "zombie", + "33": "creeper", + "34": "skeleton", + "35": "spider", + "36": "zombie_pigman", + "37": "slime", + "38": "enderman", + "39": "silverfish", + "40": "cave_spider", + "41": "ghast", + "42": "magma_cube", + "43": "blaze", + "44": "zombie_villager", + "45": "witch", + "46": "stray", + "47": "husk", + "48": "wither_skeleton", + "49": "guardian", + "50": "elder_guardian", + "51": "npc", + "52": "wither", + "53": "ender_dragon", + "54": "shulker", + "55": "endermite", + "56": "agent", + "57": "vindicator", + "58": "phantom", + "61": "armor_stand", + "62": "tripod_camera", + "63": "player", + "64": "item", + "65": "tnt", + "66": "falling_block", + "67": "moving_block", + "68": "xp_bottle", + "69": "xp_orb", + "70": "eye_of_ender_signal", + "71": "ender_crystal", + "72": "fireworks_rocket", + "73": "thrown_trident", + "74": "turtle", + "75": "cat", + "76": "shulker_bullet", + "77": "fishing_hook", + "78": "chalkboard", + "79": "dragon_fireball", + "80": "arrow", + "81": "snowball", + "82": "egg", + "83": "painting", + "84": "minecart", + "85": "fireball", + "86": "splash_potion", + "87": "ender_pearl", + "88": "leash_knot", + "89": "wither_skull", + "90": "boat", + "91": "wither_skull_dangerous", + "93": "lightning_bolt", + "94": "small_fireball", + "95": "area_effect_cloud", + "96": "hopper_minecart", + "97": "tnt_minecart", + "98": "chest_minecart", + "100": "command_block_minecart", + "101": "lingering_potion", + "102": "llama_spit", + "103": "evocation_fang", + "104": "evocation_illager", + "105": "vex", + "106": "ice_bomb", + "107": "balloon", + "108": "pufferfish", + "109": "salmon", + "110": "drowned", + "111": "tropicalfish", + "112": "cod", + "113": "panda" + } + } + ], + "mcpe_packet": [ + "container", + [ + { + "name": "name", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "1": "login", + "2": "play_status", + "3": "server_to_client_handshake", + "4": "client_to_server_handshake", + "5": "disconnect", + "6": "resource_packs_info", + "7": "resource_pack_stack", + "8": "resource_pack_client_response", + "9": "text", + "10": "set_time", + "11": "start_game", + "12": "add_player", + "13": "add_entity", + "14": "remove_entity", + "15": "add_item_entity", + "17": "take_item_entity", + "18": "move_entity", + "19": "move_player", + "20": "rider_jump", + "21": "update_block", + "22": "add_painting", + "23": "tick_sync", + "24": "level_sound_event_old", + "25": "level_event", + "26": "block_event", + "27": "entity_event", + "28": "mob_effect", + "29": "update_attributes", + "30": "inventory_transaction", + "31": "mob_equipment", + "32": "mob_armor_equipment", + "33": "interact", + "34": "block_pick_request", + "35": "entity_pick_request", + "36": "player_action", + "38": "hurt_armor", + "39": "set_entity_data", + "40": "set_entity_motion", + "41": "set_entity_link", + "42": "set_health", + "43": "set_spawn_position", + "44": "animate", + "45": "respawn", + "46": "container_open", + "47": "container_close", + "48": "player_hotbar", + "49": "inventory_content", + "50": "inventory_slot", + "51": "container_set_data", + "52": "crafting_data", + "53": "crafting_event", + "54": "gui_data_pick_item", + "55": "adventure_settings", + "56": "block_entity_data", + "57": "player_input", + "58": "level_chunk", + "59": "set_commands_enabled", + "60": "set_difficulty", + "61": "change_dimension", + "62": "set_player_game_type", + "63": "player_list", + "64": "simple_event", + "65": "event", + "66": "spawn_experience_orb", + "67": "clientbound_map_item_data", + "68": "map_info_request", + "69": "request_chunk_radius", + "70": "chunk_radius_update", + "71": "item_frame_drop_item", + "72": "game_rules_changed", + "73": "camera", + "74": "boss_event", + "75": "show_credits", + "76": "available_commands", + "77": "command_request", + "78": "command_block_update", + "79": "command_output", + "80": "update_trade", + "81": "update_equipment", + "82": "resource_pack_data_info", + "83": "resource_pack_chunk_data", + "84": "resource_pack_chunk_request", + "85": "transfer", + "86": "play_sound", + "87": "stop_sound", + "88": "set_title", + "89": "add_behavior_tree", + "90": "structure_block_update", + "91": "show_store_offer", + "92": "purchase_receipt", + "93": "player_skin", + "94": "sub_client_login", + "95": "initiate_web_socket_connection", + "96": "set_last_hurt_by", + "97": "book_edit", + "98": "npc_request", + "99": "photo_transfer", + "100": "modal_form_request", + "101": "modal_form_response", + "102": "server_settings_request", + "103": "server_settings_response", + "104": "show_profile", + "105": "set_default_game_type", + "106": "remove_objective", + "107": "set_display_objective", + "108": "set_score", + "109": "lab_table", + "110": "update_block_synced", + "111": "move_entity_delta", + "112": "set_scoreboard_identity", + "113": "set_local_player_as_initialized", + "114": "update_soft_enum", + "115": "network_stack_latency", + "117": "script_custom_event", + "118": "spawn_particle_effect", + "119": "available_entity_identifiers", + "120": "level_sound_event_v2", + "121": "network_chunk_publisher_update", + "122": "biome_definition_list", + "123": "level_sound_event", + "124": "level_event_generic", + "125": "lectern_update", + "126": "video_stream_connect", + "127": "add_ecs_entity", + "128": "remove_ecs_entity", + "129": "client_cache_status", + "130": "on_screen_texture_animation", + "131": "map_create_locked_copy", + "132": "structure_template_data_export_request", + "133": "structure_template_data_export_response", + "134": "update_block_properties", + "135": "client_cache_blob_status", + "136": "client_cache_miss_response", + "137": "education_settings", + "139": "multiplayer_settings", + "140": "settings_command", + "141": "anvil_damage", + "142": "completed_using_item", + "143": "network_settings", + "144": "player_auth_input", + "145": "creative_content", + "146": "player_enchant_options", + "147": "item_stack_request", + "148": "item_stack_response", + "149": "player_armor_damage", + "151": "update_player_game_type", + "153": "position_tracking_db_broadcast", + "154": "position_tracking_db_request", + "156": "packet_violation_warning", + "157": "motion_prediction_hints", + "158": "animate_entity", + "159": "camera_shake", + "160": "player_fog", + "161": "correct_player_move_prediction", + "162": "item_component", + "163": "filter_text_packet", + "164": "debug_renderer", + "165": "sync_entity_property", + "166": "add_volume_entity", + "167": "remove_volume_entity" + } + } + ] + }, + { + "name": "params", + "type": [ + "switch", + { + "compareTo": "name", + "fields": { + "login": "packet_login", + "play_status": "packet_play_status", + "server_to_client_handshake": "packet_server_to_client_handshake", + "client_to_server_handshake": "packet_client_to_server_handshake", + "disconnect": "packet_disconnect", + "resource_packs_info": "packet_resource_packs_info", + "resource_pack_stack": "packet_resource_pack_stack", + "resource_pack_client_response": "packet_resource_pack_client_response", + "text": "packet_text", + "set_time": "packet_set_time", + "start_game": "packet_start_game", + "add_player": "packet_add_player", + "add_entity": "packet_add_entity", + "remove_entity": "packet_remove_entity", + "add_item_entity": "packet_add_item_entity", + "take_item_entity": "packet_take_item_entity", + "move_entity": "packet_move_entity", + "move_player": "packet_move_player", + "rider_jump": "packet_rider_jump", + "update_block": "packet_update_block", + "add_painting": "packet_add_painting", + "tick_sync": "packet_tick_sync", + "level_sound_event_old": "packet_level_sound_event_old", + "level_event": "packet_level_event", + "block_event": "packet_block_event", + "entity_event": "packet_entity_event", + "mob_effect": "packet_mob_effect", + "update_attributes": "packet_update_attributes", + "inventory_transaction": "packet_inventory_transaction", + "mob_equipment": "packet_mob_equipment", + "mob_armor_equipment": "packet_mob_armor_equipment", + "interact": "packet_interact", + "block_pick_request": "packet_block_pick_request", + "entity_pick_request": "packet_entity_pick_request", + "player_action": "packet_player_action", + "hurt_armor": "packet_hurt_armor", + "set_entity_data": "packet_set_entity_data", + "set_entity_motion": "packet_set_entity_motion", + "set_entity_link": "packet_set_entity_link", + "set_health": "packet_set_health", + "set_spawn_position": "packet_set_spawn_position", + "animate": "packet_animate", + "respawn": "packet_respawn", + "container_open": "packet_container_open", + "container_close": "packet_container_close", + "player_hotbar": "packet_player_hotbar", + "inventory_content": "packet_inventory_content", + "inventory_slot": "packet_inventory_slot", + "container_set_data": "packet_container_set_data", + "crafting_data": "packet_crafting_data", + "crafting_event": "packet_crafting_event", + "gui_data_pick_item": "packet_gui_data_pick_item", + "adventure_settings": "packet_adventure_settings", + "block_entity_data": "packet_block_entity_data", + "player_input": "packet_player_input", + "level_chunk": "packet_level_chunk", + "set_commands_enabled": "packet_set_commands_enabled", + "set_difficulty": "packet_set_difficulty", + "change_dimension": "packet_change_dimension", + "set_player_game_type": "packet_set_player_game_type", + "player_list": "packet_player_list", + "simple_event": "packet_simple_event", + "event": "packet_event", + "spawn_experience_orb": "packet_spawn_experience_orb", + "clientbound_map_item_data": "packet_clientbound_map_item_data", + "map_info_request": "packet_map_info_request", + "request_chunk_radius": "packet_request_chunk_radius", + "chunk_radius_update": "packet_chunk_radius_update", + "item_frame_drop_item": "packet_item_frame_drop_item", + "game_rules_changed": "packet_game_rules_changed", + "camera": "packet_camera", + "boss_event": "packet_boss_event", + "show_credits": "packet_show_credits", + "available_commands": "packet_available_commands", + "command_request": "packet_command_request", + "command_block_update": "packet_command_block_update", + "command_output": "packet_command_output", + "update_trade": "packet_update_trade", + "update_equipment": "packet_update_equipment", + "resource_pack_data_info": "packet_resource_pack_data_info", + "resource_pack_chunk_data": "packet_resource_pack_chunk_data", + "resource_pack_chunk_request": "packet_resource_pack_chunk_request", + "transfer": "packet_transfer", + "play_sound": "packet_play_sound", + "stop_sound": "packet_stop_sound", + "set_title": "packet_set_title", + "add_behavior_tree": "packet_add_behavior_tree", + "structure_block_update": "packet_structure_block_update", + "show_store_offer": "packet_show_store_offer", + "purchase_receipt": "packet_purchase_receipt", + "player_skin": "packet_player_skin", + "sub_client_login": "packet_sub_client_login", + "initiate_web_socket_connection": "packet_initiate_web_socket_connection", + "set_last_hurt_by": "packet_set_last_hurt_by", + "book_edit": "packet_book_edit", + "npc_request": "packet_npc_request", + "photo_transfer": "packet_photo_transfer", + "modal_form_request": "packet_modal_form_request", + "modal_form_response": "packet_modal_form_response", + "server_settings_request": "packet_server_settings_request", + "server_settings_response": "packet_server_settings_response", + "show_profile": "packet_show_profile", + "set_default_game_type": "packet_set_default_game_type", + "remove_objective": "packet_remove_objective", + "set_display_objective": "packet_set_display_objective", + "set_score": "packet_set_score", + "lab_table": "packet_lab_table", + "update_block_synced": "packet_update_block_synced", + "move_entity_delta": "packet_move_entity_delta", + "set_scoreboard_identity": "packet_set_scoreboard_identity", + "set_local_player_as_initialized": "packet_set_local_player_as_initialized", + "update_soft_enum": "packet_update_soft_enum", + "network_stack_latency": "packet_network_stack_latency", + "script_custom_event": "packet_script_custom_event", + "spawn_particle_effect": "packet_spawn_particle_effect", + "available_entity_identifiers": "packet_available_entity_identifiers", + "level_sound_event_v2": "packet_level_sound_event_v2", + "network_chunk_publisher_update": "packet_network_chunk_publisher_update", + "biome_definition_list": "packet_biome_definition_list", + "level_sound_event": "packet_level_sound_event", + "level_event_generic": "packet_level_event_generic", + "lectern_update": "packet_lectern_update", + "video_stream_connect": "packet_video_stream_connect", + "add_ecs_entity": "packet_add_ecs_entity", + "remove_ecs_entity": "packet_remove_ecs_entity", + "client_cache_status": "packet_client_cache_status", + "on_screen_texture_animation": "packet_on_screen_texture_animation", + "map_create_locked_copy": "packet_map_create_locked_copy", + "structure_template_data_export_request": "packet_structure_template_data_export_request", + "structure_template_data_export_response": "packet_structure_template_data_export_response", + "update_block_properties": "packet_update_block_properties", + "client_cache_blob_status": "packet_client_cache_blob_status", + "client_cache_miss_response": "packet_client_cache_miss_response", + "education_settings": "packet_education_settings", + "multiplayer_settings": "packet_multiplayer_settings", + "settings_command": "packet_settings_command", + "anvil_damage": "packet_anvil_damage", + "completed_using_item": "packet_completed_using_item", + "network_settings": "packet_network_settings", + "player_auth_input": "packet_player_auth_input", + "creative_content": "packet_creative_content", + "player_enchant_options": "packet_player_enchant_options", + "item_stack_request": "packet_item_stack_request", + "item_stack_response": "packet_item_stack_response", + "player_armor_damage": "packet_player_armor_damage", + "update_player_game_type": "packet_update_player_game_type", + "position_tracking_db_request": "packet_position_tracking_db_request", + "position_tracking_db_broadcast": "packet_position_tracking_db_broadcast", + "packet_violation_warning": "packet_packet_violation_warning", + "motion_prediction_hints": "packet_motion_prediction_hints", + "animate_entity": "packet_animate_entity", + "camera_shake": "packet_camera_shake", + "player_fog": "packet_player_fog", + "correct_player_move_prediction": "packet_correct_player_move_prediction", + "item_component": "packet_item_component", + "filter_text_packet": "packet_filter_text_packet", + "debug_renderer": "packet_debug_renderer", + "sync_entity_property": "packet_sync_entity_property", + "add_volume_entity": "packet_add_volume_entity", + "remove_volume_entity": "packet_remove_volume_entity" + }, + "default": "void" + } + ] + } + ] + ], + "packet_login": [ + "container", + [ + { + "name": "protocol_version", + "type": "i32" + }, + { + "name": "tokens", + "type": [ + "encapsulated", + { + "lengthType": "varint", + "type": "LoginTokens" + } + ] + } + ] + ], + "LoginTokens": [ + "container", + [ + { + "name": "identity", + "type": "LittleString" + }, + { + "name": "client", + "type": "LittleString" + } + ] + ], + "packet_play_status": [ + "container", + [ + { + "name": "status", + "type": [ + "mapper", + { + "type": "i32", + "mappings": { + "0": "login_success", + "1": "failed_client", + "2": "failed_spawn", + "3": "player_spawn", + "4": "failed_invalid_tenant", + "5": "failed_vanilla_edu", + "6": "failed_edu_vanilla", + "7": "failed_server_full" + } + } + ] + } + ] + ], + "packet_server_to_client_handshake": [ + "container", + [ + { + "name": "token", + "type": "string" + } + ] + ], + "packet_client_to_server_handshake": [ + "container", + [] + ], + "packet_disconnect": [ + "container", + [ + { + "name": "hide_disconnect_reason", + "type": "bool" + }, + { + "name": "message", + "type": "string" + } + ] + ], + "packet_resource_packs_info": [ + "container", + [ + { + "name": "must_accept", + "type": "bool" + }, + { + "name": "has_scripts", + "type": "bool" + }, + { + "name": "behaviour_packs", + "type": "BehaviourPackInfos" + }, + { + "name": "texture_packs", + "type": "TexturePackInfos" + } + ] + ], + "packet_resource_pack_stack": [ + "container", + [ + { + "name": "must_accept", + "type": "bool" + }, + { + "name": "behavior_packs", + "type": "ResourcePackIdVersions" + }, + { + "name": "resource_packs", + "type": "ResourcePackIdVersions" + }, + { + "name": "game_version", + "type": "string" + }, + { + "name": "experiments", + "type": "Experiments" + }, + { + "name": "experiments_previously_used", + "type": "bool" + } + ] + ], + "packet_resource_pack_client_response": [ + "container", + [ + { + "name": "response_status", + "type": [ + "mapper", + { + "type": "u8", + "mappings": { + "0": "none", + "1": "refused", + "2": "send_packs", + "3": "have_all_packs", + "4": "completed" + } + } + ] + }, + { + "name": "resourcepackids", + "type": "ResourcePackIds" + } + ] + ], + "packet_text": [ + "container", + [ + { + "name": "type", + "type": [ + "mapper", + { + "type": "u8", + "mappings": { + "0": "raw", + "1": "chat", + "2": "translation", + "3": "popup", + "4": "jukebox_popup", + "5": "tip", + "6": "system", + "7": "whisper", + "8": "announcement", + "9": "json_whisper", + "10": "json" + } + } + ] + }, + { + "name": "needs_translation", + "type": "bool" + }, + { + "anon": true, + "type": [ + "switch", + { + "compareTo": "type", + "fields": { + "chat": [ + "container", + [ + { + "name": "source_name", + "type": "string" + }, + { + "name": "message", + "type": "string" + } + ] + ], + "whisper": [ + "container", + [ + { + "name": "source_name", + "type": "string" + }, + { + "name": "message", + "type": "string" + } + ] + ], + "announcement": [ + "container", + [ + { + "name": "source_name", + "type": "string" + }, + { + "name": "message", + "type": "string" + } + ] + ], + "raw": [ + "container", + [ + { + "name": "message", + "type": "string" + } + ] + ], + "tip": [ + "container", + [ + { + "name": "message", + "type": "string" + } + ] + ], + "system": [ + "container", + [ + { + "name": "message", + "type": "string" + } + ] + ], + "json_whisper": [ + "container", + [ + { + "name": "message", + "type": "string" + } + ] + ], + "json": [ + "container", + [ + { + "name": "message", + "type": "string" + } + ] + ], + "translation": [ + "container", + [ + { + "name": "message", + "type": "string" + }, + { + "name": "paramaters", + "type": [ + "array", + { + "countType": "varint", + "type": "string" + } + ] + } + ] + ], + "popup": [ + "container", + [ + { + "name": "message", + "type": "string" + }, + { + "name": "paramaters", + "type": [ + "array", + { + "countType": "varint", + "type": "string" + } + ] + } + ] + ], + "jukebox_popup": [ + "container", + [ + { + "name": "message", + "type": "string" + }, + { + "name": "paramaters", + "type": [ + "array", + { + "countType": "varint", + "type": "string" + } + ] + } + ] + ] + }, + "default": "void" + } + ] + }, + { + "name": "xuid", + "type": "string" + }, + { + "name": "platform_chat_id", + "type": "string" + } + ] + ], + "packet_set_time": [ + "container", + [ + { + "name": "time", + "type": "zigzag32" + } + ] + ], + "packet_start_game": [ + "container", + [ + { + "name": "entity_id", + "type": "zigzag64" + }, + { + "name": "runtime_entity_id", + "type": "varint64" + }, + { + "name": "player_gamemode", + "type": "GameMode" + }, + { + "name": "player_position", + "type": "vec3f" + }, + { + "name": "rotation", + "type": "vec2f" + }, + { + "name": "seed", + "type": "zigzag32" + }, + { + "name": "biome_type", + "type": "li16" + }, + { + "name": "biome_name", + "type": "string" + }, + { + "name": "dimension", + "type": "zigzag32" + }, + { + "name": "generator", + "type": "zigzag32" + }, + { + "name": "world_gamemode", + "type": "GameMode" + }, + { + "name": "difficulty", + "type": "zigzag32" + }, + { + "name": "spawn_position", + "type": "BlockCoordinates" + }, + { + "name": "achievements_disabled", + "type": "bool" + }, + { + "name": "day_cycle_stop_time", + "type": "zigzag32" + }, + { + "name": "edu_offer", + "type": "zigzag32" + }, + { + "name": "edu_features_enabled", + "type": "bool" + }, + { + "name": "edu_product_uuid", + "type": "string" + }, + { + "name": "rain_level", + "type": "lf32" + }, + { + "name": "lightning_level", + "type": "lf32" + }, + { + "name": "has_confirmed_platform_locked_content", + "type": "bool" + }, + { + "name": "is_multiplayer", + "type": "bool" + }, + { + "name": "broadcast_to_lan", + "type": "bool" + }, + { + "name": "xbox_live_broadcast_mode", + "type": "varint" + }, + { + "name": "platform_broadcast_mode", + "type": "varint" + }, + { + "name": "enable_commands", + "type": "bool" + }, + { + "name": "is_texturepacks_required", + "type": "bool" + }, + { + "name": "gamerules", + "type": "GameRules" + }, + { + "name": "experiments", + "type": "Experiments" + }, + { + "name": "experiments_previously_used", + "type": "bool" + }, + { + "name": "bonus_chest", + "type": "bool" + }, + { + "name": "map_enabled", + "type": "bool" + }, + { + "name": "permission_level", + "type": "zigzag32" + }, + { + "name": "server_chunk_tick_range", + "type": "li32" + }, + { + "name": "has_locked_behavior_pack", + "type": "bool" + }, + { + "name": "has_locked_resource_pack", + "type": "bool" + }, + { + "name": "is_from_locked_world_template", + "type": "bool" + }, + { + "name": "msa_gamertags_only", + "type": "bool" + }, + { + "name": "is_from_world_template", + "type": "bool" + }, + { + "name": "is_world_template_option_locked", + "type": "bool" + }, + { + "name": "only_spawn_v1_villagers", + "type": "bool" + }, + { + "name": "game_version", + "type": "string" + }, + { + "name": "limited_world_width", + "type": "li32" + }, + { + "name": "limited_world_length", + "type": "li32" + }, + { + "name": "is_new_nether", + "type": "bool" + }, + { + "name": "experimental_gameplay_override", + "type": "bool" + }, + { + "name": "level_id", + "type": "string" + }, + { + "name": "world_name", + "type": "string" + }, + { + "name": "premium_world_template_id", + "type": "string" + }, + { + "name": "is_trial", + "type": "bool" + }, + { + "name": "movement_authority", + "type": [ + "mapper", + { + "type": "zigzag32", + "mappings": { + "0": "client", + "1": "server", + "2": "server_with_rewind" + } + } + ] + }, + { + "name": "rewind_history_size", + "type": "zigzag32" + }, + { + "name": "server_authoritative_block_breaking", + "type": "bool" + }, + { + "name": "current_tick", + "type": "li64" + }, + { + "name": "enchantment_seed", + "type": "zigzag32" + }, + { + "name": "block_properties", + "type": "BlockProperties" + }, + { + "name": "itemstates", + "type": "Itemstates" + }, + { + "name": "multiplayer_correlation_id", + "type": "string" + }, + { + "name": "server_authoritative_inventory", + "type": "bool" + }, + { + "name": "engine", + "type": "string" + } + ] + ], + "packet_add_player": [ + "container", + [ + { + "name": "uuid", + "type": "uuid" + }, + { + "name": "username", + "type": "string" + }, + { + "name": "entity_id_self", + "type": "zigzag64" + }, + { + "name": "runtime_entity_id", + "type": "varint64" + }, + { + "name": "platform_chat_id", + "type": "string" + }, + { + "name": "position", + "type": "vec3f" + }, + { + "name": "velocity", + "type": "vec3f" + }, + { + "name": "pitch", + "type": "lf32" + }, + { + "name": "yaw", + "type": "lf32" + }, + { + "name": "head_yaw", + "type": "lf32" + }, + { + "name": "held_item", + "type": "Item" + }, + { + "name": "metadata", + "type": "MetadataDictionary" + }, + { + "name": "flags", + "type": "varint" + }, + { + "name": "command_permission", + "type": "varint" + }, + { + "name": "action_permissions", + "type": "varint" + }, + { + "name": "permission_level", + "type": "varint" + }, + { + "name": "custom_stored_permissions", + "type": "varint" + }, + { + "name": "user_id", + "type": "li64" + }, + { + "name": "links", + "type": "Links" + }, + { + "name": "device_id", + "type": "string" + }, + { + "name": "device_os", + "type": "li32" + } + ] + ], + "packet_add_entity": [ + "container", + [ + { + "name": "entity_id_self", + "type": "zigzag64" + }, + { + "name": "runtime_entity_id", + "type": "varint64" + }, + { + "name": "entity_type", + "type": "string" + }, + { + "name": "position", + "type": "vec3f" + }, + { + "name": "velocity", + "type": "vec3f" + }, + { + "name": "pitch", + "type": "lf32" + }, + { + "name": "yaw", + "type": "lf32" + }, + { + "name": "head_yaw", + "type": "lf32" + }, + { + "name": "attributes", + "type": "EntityAttributes" + }, + { + "name": "metadata", + "type": "MetadataDictionary" + }, + { + "name": "links", + "type": "Links" + } + ] + ], + "packet_remove_entity": [ + "container", + [ + { + "name": "entity_id_self", + "type": "zigzag64" + } + ] + ], + "packet_add_item_entity": [ + "container", + [ + { + "name": "entity_id_self", + "type": "zigzag64" + }, + { + "name": "runtime_entity_id", + "type": "varint64" + }, + { + "name": "item", + "type": "Item" + }, + { + "name": "position", + "type": "vec3f" + }, + { + "name": "velocity", + "type": "vec3f" + }, + { + "name": "metadata", + "type": "MetadataDictionary" + }, + { + "name": "is_from_fishing", + "type": "bool" + } + ] + ], + "packet_take_item_entity": [ + "container", + [ + { + "name": "runtime_entity_id", + "type": "varint64" + }, + { + "name": "target", + "type": "varint" + } + ] + ], + "packet_move_entity": [ + "container", + [ + { + "name": "runtime_entity_id", + "type": "varint64" + }, + { + "name": "flags", + "type": "u8" + }, + { + "name": "position", + "type": "vec3f" + }, + { + "name": "rotation", + "type": "Rotation" + } + ] + ], + "packet_move_player": [ + "container", + [ + { + "name": "runtime_id", + "type": "varint" + }, + { + "name": "position", + "type": "vec3f" + }, + { + "name": "pitch", + "type": "lf32" + }, + { + "name": "yaw", + "type": "lf32" + }, + { + "name": "head_yaw", + "type": "lf32" + }, + { + "name": "mode", + "type": [ + "mapper", + { + "type": "u8", + "mappings": { + "0": "normal", + "1": "reset", + "2": "teleport", + "3": "rotation" + } + } + ] + }, + { + "name": "on_ground", + "type": "bool" + }, + { + "name": "ridden_runtime_id", + "type": "varint" + }, + { + "name": "teleport", + "type": [ + "switch", + { + "compareTo": "mode", + "fields": { + "teleport": [ + "container", + [ + { + "name": "cause", + "type": [ + "mapper", + { + "type": "li32", + "mappings": { + "0": "unknown", + "1": "projectile", + "2": "chorus_fruit", + "3": "command", + "4": "behavior" + } + } + ] + }, + { + "name": "source_entity_type", + "type": "LegacyEntityType" + } + ] + ] + }, + "default": "void" + } + ] + }, + { + "name": "tick", + "type": "varint64" + } + ] + ], + "packet_rider_jump": [ + "container", + [ + { + "name": "jump_strength", + "type": "zigzag32" + } + ] + ], + "packet_update_block": [ + "container", + [ + { + "name": "position", + "type": "BlockCoordinates" + }, + { + "name": "block_runtime_id", + "type": "varint" + }, + { + "name": "flags", + "type": "UpdateBlockFlags" + }, + { + "name": "layer", + "type": "varint" + } + ] + ], + "packet_add_painting": [ + "container", + [ + { + "name": "entity_id_self", + "type": "zigzag64" + }, + { + "name": "runtime_entity_id", + "type": "varint64" + }, + { + "name": "coordinates", + "type": "vec3f" + }, + { + "name": "direction", + "type": "zigzag32" + }, + { + "name": "title", + "type": "string" + } + ] + ], + "packet_tick_sync": [ + "container", + [ + { + "name": "request_time", + "type": "li64" + }, + { + "name": "response_time", + "type": "li64" + } + ] + ], + "packet_level_sound_event_old": [ + "container", + [ + { + "name": "sound_id", + "type": "u8" + }, + { + "name": "position", + "type": "vec3f" + }, + { + "name": "block_id", + "type": "zigzag32" + }, + { + "name": "entity_type", + "type": "zigzag32" + }, + { + "name": "is_baby_mob", + "type": "bool" + }, + { + "name": "is_global", + "type": "bool" + } + ] + ], + "packet_level_event": [ + "container", + [ + { + "name": "event", + "type": [ + "mapper", + { + "type": "zigzag32", + "mappings": { + "1000": "sound_click", + "1001": "sound_click_fail", + "1002": "sound_shoot", + "1003": "sound_door", + "1004": "sound_fizz", + "1005": "sound_ignite", + "1007": "sound_ghast", + "1008": "sound_ghast_shoot", + "1009": "sound_blaze_shoot", + "1010": "sound_door_bump", + "1012": "sound_door_crash", + "1018": "sound_enderman_teleport", + "1020": "sound_anvil_break", + "1021": "sound_anvil_use", + "1022": "sound_anvil_fall", + "1030": "sound_pop", + "1032": "sound_portal", + "1040": "sound_itemframe_add_item", + "1041": "sound_itemframe_remove", + "1042": "sound_itemframe_place", + "1043": "sound_itemframe_remove_item", + "1044": "sound_itemframe_rotate_item", + "1050": "sound_camera", + "1051": "sound_orb", + "1052": "sound_totem", + "1060": "sound_armor_stand_break", + "1061": "sound_armor_stand_hit", + "1062": "sound_armor_stand_fall", + "1063": "sound_armor_stand_place", + "1064": "pointed_dripstone_land", + "1065": "dye_used", + "1066": "ink_sack_used", + "2000": "particle_shoot", + "2001": "particle_destroy", + "2002": "particle_splash", + "2003": "particle_eye_despawn", + "2004": "particle_spawn", + "2005": "particle_crop_growth", + "2006": "particle_guardian_curse", + "2007": "particle_death_smoke", + "2008": "particle_block_force_field", + "2009": "particle_projectile_hit", + "2010": "particle_dragon_egg_teleport", + "2011": "particle_crop_eaten", + "2012": "particle_critical", + "2013": "particle_enderman_teleport", + "2014": "particle_punch_block", + "2015": "particle_bubble", + "2016": "particle_evaporate", + "2017": "particle_destroy_armor_stand", + "2018": "particle_breaking_egg", + "2019": "particle_destroy_egg", + "2020": "particle_evaporate_water", + "2021": "particle_destroy_block_no_sound", + "2022": "particle_knockback_roar", + "2023": "particle_teleport_trail", + "2024": "particle_point_cloud", + "2025": "particle_explosion", + "2026": "particle_block_explosion", + "2027": "particle_vibration_signal", + "2028": "particle_dripstone_drip", + "2029": "particle_fizz_effect", + "2030": "particle_wax_on", + "2031": "particle_wax_off", + "2032": "particle_scrape", + "2033": "particle_electric_spark", + "3001": "start_rain", + "3002": "start_thunder", + "3003": "stop_rain", + "3004": "stop_thunder", + "3005": "pause_game", + "3006": "pause_game_no_screen", + "3007": "set_game_speed", + "3500": "redstone_trigger", + "3501": "cauldron_explode", + "3502": "cauldron_dye_armor", + "3503": "cauldron_clean_armor", + "3504": "cauldron_fill_potion", + "3505": "cauldron_take_potion", + "3506": "cauldron_fill_water", + "3507": "cauldron_take_water", + "3508": "cauldron_add_dye", + "3509": "cauldron_clean_banner", + "3600": "block_start_break", + "3601": "block_stop_break", + "4000": "set_data", + "9800": "players_sleeping", + "16384": "add_particle_mask" + } + } + ] + }, + { + "name": "position", + "type": "vec3f" + }, + { + "name": "data", + "type": "zigzag32" + } + ] + ], + "packet_block_event": [ + "container", + [ + { + "name": "position", + "type": "BlockCoordinates" + }, + { + "name": "type", + "type": [ + "mapper", + { + "type": "zigzag32", + "mappings": { + "0": "sound", + "1": "change_state" + } + } + ] + }, + { + "name": "data", + "type": "zigzag32" + } + ] + ], + "packet_entity_event": [ + "container", + [ + { + "name": "runtime_entity_id", + "type": "varint64" + }, + { + "name": "event_id", + "type": [ + "mapper", + { + "type": "u8", + "mappings": { + "1": "jump", + "2": "hurt_animation", + "3": "death_animation", + "4": "arm_swing", + "5": "stop_attack", + "6": "tame_fail", + "7": "tame_success", + "8": "shake_wet", + "9": "use_item", + "10": "eat_grass_animation", + "11": "fish_hook_bubble", + "12": "fish_hook_position", + "13": "fish_hook_hook", + "14": "fish_hook_tease", + "15": "squid_ink_cloud", + "16": "zombie_villager_cure", + "18": "respawn", + "19": "iron_golem_offer_flower", + "20": "iron_golem_withdraw_flower", + "21": "love_particles", + "22": "villager_angry", + "23": "villager_happy", + "24": "witch_spell_particles", + "25": "firework_particles", + "26": "in_love_particles", + "27": "silverfish_spawn_animation", + "28": "guardian_attack", + "29": "witch_drink_potion", + "30": "witch_throw_potion", + "31": "minecart_tnt_prime_fuse", + "32": "creeper_prime_fuse", + "33": "air_supply_expired", + "34": "player_add_xp_levels", + "35": "elder_guardian_curse", + "36": "agent_arm_swing", + "37": "ender_dragon_death", + "38": "dust_particles", + "39": "arrow_shake", + "57": "eating_item", + "60": "baby_animal_feed", + "61": "death_smoke_cloud", + "62": "complete_trade", + "63": "remove_leash", + "65": "consume_totem", + "66": "player_check_treasure_hunter_achievement", + "67": "entity_spawn", + "68": "dragon_puke", + "69": "item_entity_merge", + "70": "start_swim", + "71": "balloon_pop", + "72": "treasure_hunt", + "73": "agent_summon", + "74": "charged_crossbow", + "75": "fall" + } + } + ] + }, + { + "name": "data", + "type": "zigzag32" + } + ] + ], + "packet_mob_effect": [ + "container", + [ + { + "name": "runtime_entity_id", + "type": "varint64" + }, + { + "name": "event_id", + "type": "u8" + }, + { + "name": "effect_id", + "type": "zigzag32" + }, + { + "name": "amplifier", + "type": "zigzag32" + }, + { + "name": "particles", + "type": "bool" + }, + { + "name": "duration", + "type": "zigzag32" + } + ] + ], + "packet_update_attributes": [ + "container", + [ + { + "name": "runtime_entity_id", + "type": "varint64" + }, + { + "name": "attributes", + "type": "PlayerAttributes" + }, + { + "name": "tick", + "type": "varint64" + } + ] + ], + "packet_inventory_transaction": [ + "container", + [ + { + "name": "transaction", + "type": "Transaction" + } + ] + ], + "packet_mob_equipment": [ + "container", + [ + { + "name": "runtime_entity_id", + "type": "varint64" + }, + { + "name": "item", + "type": "Item" + }, + { + "name": "slot", + "type": "u8" + }, + { + "name": "selected_slot", + "type": "u8" + }, + { + "name": "window_id", + "type": "WindowID" + } + ] + ], + "packet_mob_armor_equipment": [ + "container", + [ + { + "name": "runtime_entity_id", + "type": "varint64" + }, + { + "name": "helmet", + "type": "Item" + }, + { + "name": "chestplate", + "type": "Item" + }, + { + "name": "leggings", + "type": "Item" + }, + { + "name": "boots", + "type": "Item" + } + ] + ], + "packet_interact": [ + "container", + [ + { + "name": "action_id", + "type": [ + "mapper", + { + "type": "u8", + "mappings": { + "3": "leave_vehicle", + "4": "mouse_over_entity", + "6": "open_inventory" + } + } + ] + }, + { + "name": "target_entity_id", + "type": "varint64" + }, + { + "name": "position", + "type": [ + "switch", + { + "compareTo": "action_id", + "fields": { + "mouse_over_entity": "vec3f", + "leave_vehicle": "vec3f" + }, + "default": "void" + } + ] + } + ] + ], + "packet_block_pick_request": [ + "container", + [ + { + "name": "x", + "type": "zigzag32" + }, + { + "name": "y", + "type": "zigzag32" + }, + { + "name": "z", + "type": "zigzag32" + }, + { + "name": "add_user_data", + "type": "bool" + }, + { + "name": "selected_slot", + "type": "u8" + } + ] + ], + "packet_entity_pick_request": [ + "container", + [ + { + "name": "runtime_entity_id", + "type": "lu64" + }, + { + "name": "selected_slot", + "type": "u8" + } + ] + ], + "packet_player_action": [ + "container", + [ + { + "name": "runtime_entity_id", + "type": "varint64" + }, + { + "name": "action", + "type": "Action" + }, + { + "name": "position", + "type": "BlockCoordinates" + }, + { + "name": "face", + "type": "zigzag32" + } + ] + ], + "packet_hurt_armor": [ + "container", + [ + { + "name": "health", + "type": "zigzag32" + } + ] + ], + "packet_set_entity_data": [ + "container", + [ + { + "name": "runtime_entity_id", + "type": "varint64" + }, + { + "name": "metadata", + "type": "MetadataDictionary" + }, + { + "name": "tick", + "type": "varint" + } + ] + ], + "packet_set_entity_motion": [ + "container", + [ + { + "name": "runtime_entity_id", + "type": "varint64" + }, + { + "name": "velocity", + "type": "vec3f" + } + ] + ], + "packet_set_entity_link": [ + "container", + [ + { + "name": "link", + "type": "Link" + } + ] + ], + "packet_set_health": [ + "container", + [ + { + "name": "health", + "type": "zigzag32" + } + ] + ], + "packet_set_spawn_position": [ + "container", + [ + { + "name": "spawn_type", + "type": [ + "mapper", + { + "type": "zigzag32", + "mappings": { + "0": "player", + "1": "world" + } + } + ] + }, + { + "name": "player_position", + "type": "BlockCoordinates" + }, + { + "name": "dimension", + "type": "zigzag32" + }, + { + "name": "world_position", + "type": "BlockCoordinates" + } + ] + ], + "packet_animate": [ + "container", + [ + { + "name": "action_id", + "type": [ + "mapper", + { + "type": "zigzag32", + "mappings": { + "0": "none", + "1": "swing_arm", + "2": "unknown", + "3": "wake_up", + "4": "critical_hit", + "5": "magic_critical_hit", + "6": "row_right", + "7": "row_left" + } + } + ] + }, + { + "name": "runtime_entity_id", + "type": "varint64" + } + ] + ], + "packet_respawn": [ + "container", + [ + { + "name": "position", + "type": "vec3f" + }, + { + "name": "state", + "type": "u8" + }, + { + "name": "runtime_entity_id", + "type": "varint64" + } + ] + ], + "packet_container_open": [ + "container", + [ + { + "name": "window_id", + "type": "WindowID" + }, + { + "name": "window_type", + "type": "WindowType" + }, + { + "name": "coordinates", + "type": "BlockCoordinates" + }, + { + "name": "runtime_entity_id", + "type": "zigzag64" + } + ] + ], + "packet_container_close": [ + "container", + [ + { + "name": "window_id", + "type": "WindowID" + }, + { + "name": "server", + "type": "bool" + } + ] + ], + "packet_player_hotbar": [ + "container", + [ + { + "name": "selected_slot", + "type": "varint" + }, + { + "name": "window_id", + "type": "WindowID" + }, + { + "name": "select_slot", + "type": "bool" + } + ] + ], + "packet_inventory_content": [ + "container", + [ + { + "name": "window_id", + "type": "WindowIDVarint" + }, + { + "name": "input", + "type": "ItemStacks" + } + ] + ], + "packet_inventory_slot": [ + "container", + [ + { + "name": "window_id", + "type": "WindowIDVarint" + }, + { + "name": "slot", + "type": "varint" + }, + { + "name": "item", + "type": "Item" + } + ] + ], + "packet_container_set_data": [ + "container", + [ + { + "name": "window_id", + "type": "WindowID" + }, + { + "name": "property", + "type": "zigzag32" + }, + { + "name": "value", + "type": "zigzag32" + } + ] + ], + "packet_crafting_data": [ + "container", + [ + { + "name": "recipes", + "type": "Recipes" + }, + { + "name": "potion_type_recipes", + "type": "PotionTypeRecipes" + }, + { + "name": "potion_container_recipes", + "type": "PotionContainerChangeRecipes" + }, + { + "name": "is_clean", + "type": "bool" + } + ] + ], + "packet_crafting_event": [ + "container", + [ + { + "name": "window_id", + "type": "WindowID" + }, + { + "name": "recipe_type", + "type": [ + "mapper", + { + "type": "zigzag32", + "mappings": { + "0": "inventory", + "1": "crafting", + "2": "workbench" + } + } + ] + }, + { + "name": "recipe_id", + "type": "uuid" + }, + { + "name": "input", + "type": [ + "array", + { + "countType": "varint", + "type": "Item" + } + ] + }, + { + "name": "result", + "type": [ + "array", + { + "countType": "varint", + "type": "Item" + } + ] + } + ] + ], + "packet_gui_data_pick_item": [ + "container", + [ + { + "name": "item_name", + "type": "string" + }, + { + "name": "item_effects", + "type": "string" + }, + { + "name": "hotbar_slot", + "type": "li32" + } + ] + ], + "packet_adventure_settings": [ + "container", + [ + { + "name": "flags", + "type": "AdventureFlags" + }, + { + "name": "command_permission", + "type": [ + "mapper", + { + "type": "varint32", + "mappings": { + "0": "normal", + "1": "operator", + "2": "host", + "3": "automation", + "4": "admin" + } + } + ] + }, + { + "name": "action_permissions", + "type": "ActionPermissions" + }, + { + "name": "permission_level", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "visitor", + "1": "member", + "2": "operator", + "3": "custom" + } + } + ] + }, + { + "name": "custom_stored_permissions", + "type": "varint" + }, + { + "name": "user_id", + "type": "li64" + } + ] + ], + "packet_block_entity_data": [ + "container", + [ + { + "name": "position", + "type": "BlockCoordinates" + }, + { + "name": "nbt", + "type": "nbt" + } + ] + ], + "packet_player_input": [ + "container", + [ + { + "name": "motion_x", + "type": "lf32" + }, + { + "name": "motion_z", + "type": "lf32" + }, + { + "name": "jumping", + "type": "bool" + }, + { + "name": "sneaking", + "type": "bool" + } + ] + ], + "packet_level_chunk": [ + "container", + [ + { + "name": "x", + "type": "zigzag32" + }, + { + "name": "z", + "type": "zigzag32" + }, + { + "name": "sub_chunk_count", + "type": "varint" + }, + { + "name": "cache_enabled", + "type": "bool" + }, + { + "name": "blobs", + "type": [ + "switch", + { + "compareTo": "cache_enabled", + "fields": { + "true": [ + "container", + [ + { + "name": "hashes", + "type": [ + "array", + { + "countType": "varint", + "type": "lu64" + } + ] + } + ] + ] + }, + "default": "void" + } + ] + }, + { + "name": "payload", + "type": "ByteArray" + } + ] + ], + "packet_set_commands_enabled": [ + "container", + [ + { + "name": "enabled", + "type": "bool" + } + ] + ], + "packet_set_difficulty": [ + "container", + [ + { + "name": "difficulty", + "type": "varint" + } + ] + ], + "packet_change_dimension": [ + "container", + [ + { + "name": "dimension", + "type": "zigzag32" + }, + { + "name": "position", + "type": "vec3f" + }, + { + "name": "respawn", + "type": "bool" + } + ] + ], + "packet_set_player_game_type": [ + "container", + [ + { + "name": "gamemode", + "type": "GameMode" + } + ] + ], + "packet_player_list": [ + "container", + [ + { + "name": "records", + "type": "PlayerRecords" + } + ] + ], + "packet_simple_event": [ + "container", + [ + { + "name": "event_type", + "type": "lu16" + } + ] + ], + "packet_event": [ + "container", + [ + { + "name": "runtime_id", + "type": "varint64" + }, + { + "name": "event_type", + "type": [ + "mapper", + { + "type": "zigzag32", + "mappings": { + "0": "achievement_awarded", + "1": "entity_interact", + "2": "portal_built", + "3": "portal_used", + "4": "mob_killed", + "5": "cauldron_used", + "6": "player_death", + "7": "boss_killed", + "8": "agent_command", + "9": "agent_created", + "10": "banner_pattern_removed", + "11": "commaned_executed", + "12": "fish_bucketed", + "13": "mob_born", + "14": "pet_died", + "15": "cauldron_block_used", + "16": "composter_block_used", + "17": "bell_block_used", + "18": "actor_definition", + "19": "raid_update", + "20": "player_movement_anomaly", + "21": "player_moement_corrected", + "22": "honey_harvested", + "23": "target_block_hit", + "24": "piglin_barter", + "25": "waxed_or_unwaxed_copper" + } + } + ] + }, + { + "name": "use_player_id", + "type": "u8" + }, + { + "name": "event_data", + "type": "restBuffer" + } + ] + ], + "packet_spawn_experience_orb": [ + "container", + [ + { + "name": "position", + "type": "vec3f" + }, + { + "name": "count", + "type": "zigzag32" + } + ] + ], + "packet_clientbound_map_item_data": [ + "container", + [ + { + "name": "map_id", + "type": "zigzag64" + }, + { + "name": "update_flags", + "type": "UpdateMapFlags" + }, + { + "name": "dimension", + "type": "u8" + }, + { + "name": "locked", + "type": "bool" + }, + { + "name": "included_in", + "type": [ + "switch", + { + "compareTo": "update_flags.initialisation", + "fields": { + "true": [ + "array", + { + "countType": "varint", + "type": "zigzag64" + } + ] + }, + "default": "void" + } + ] + }, + { + "name": "scale", + "type": [ + "switch", + { + "compareTo": "update_flags.initialisation || update_flags.decoration || update_flags.texture", + "fields": { + "true": "u8" + }, + "default": "void" + } + ] + }, + { + "name": "tracked", + "type": [ + "switch", + { + "compareTo": "update_flags.decoration", + "fields": { + "true": [ + "container", + [ + { + "name": "objects", + "type": [ + "array", + { + "countType": "varint", + "type": "TrackedObject" + } + ] + }, + { + "name": "decorations", + "type": [ + "array", + { + "countType": "varint", + "type": "MapDecoration" + } + ] + } + ] + ] + }, + "default": "void" + } + ] + }, + { + "name": "texture", + "type": [ + "switch", + { + "compareTo": "update_flags.texture", + "fields": { + "true": [ + "container", + [ + { + "name": "width", + "type": "zigzag32" + }, + { + "name": "height", + "type": "zigzag32" + }, + { + "name": "x_offset", + "type": "zigzag32" + }, + { + "name": "y_offset", + "type": "zigzag32" + }, + { + "name": "pixels", + "type": [ + "array", + { + "countType": "varint", + "type": "varint" + } + ] + } + ] + ] + }, + "default": "void" + } + ] + } + ] + ], + "packet_map_info_request": [ + "container", + [ + { + "name": "map_id", + "type": "zigzag64" + } + ] + ], + "packet_request_chunk_radius": [ + "container", + [ + { + "name": "chunk_radius", + "type": "zigzag32" + } + ] + ], + "packet_chunk_radius_update": [ + "container", + [ + { + "name": "chunk_radius", + "type": "zigzag32" + } + ] + ], + "packet_item_frame_drop_item": [ + "container", + [ + { + "name": "coordinates", + "type": "BlockCoordinates" + } + ] + ], + "packet_game_rules_changed": [ + "container", + [ + { + "name": "rules", + "type": "GameRules" + } + ] + ], + "packet_camera": [ + "container", + [ + { + "name": "camera_entity_unique_id", + "type": "zigzag64" + }, + { + "name": "target_player_unique_id", + "type": "zigzag64" + } + ] + ], + "packet_boss_event": [ + "container", + [ + { + "name": "boss_entity_id", + "type": "zigzag64" + }, + { + "name": "type", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "show_bar", + "1": "register_player", + "2": "hide_bar", + "3": "unregister_player", + "4": "set_bar_progress", + "5": "set_bar_title", + "6": "update_properties", + "7": "texture" + } + } + ] + }, + { + "anon": true, + "type": [ + "switch", + { + "compareTo": "type", + "fields": { + "show_bar": [ + "container", + [ + { + "name": "title", + "type": "string" + }, + { + "name": "progress", + "type": "lf32" + }, + { + "name": "screen_darkening", + "type": "li16" + }, + { + "name": "color", + "type": "varint" + }, + { + "name": "overlay", + "type": "varint" + } + ] + ], + "register_player": [ + "container", + [ + { + "name": "player_id", + "type": "zigzag64" + } + ] + ], + "unregister_player": [ + "container", + [ + { + "name": "player_id", + "type": "zigzag64" + } + ] + ], + "set_bar_progress": [ + "container", + [ + { + "name": "progress", + "type": "lf32" + } + ] + ], + "set_bar_title": [ + "container", + [ + { + "name": "title", + "type": "string" + } + ] + ], + "update_properties": [ + "container", + [ + { + "name": "screen_darkening", + "type": "li16" + }, + { + "name": "color", + "type": "varint" + }, + { + "name": "overlay", + "type": "varint" + } + ] + ], + "texture": [ + "container", + [ + { + "name": "color", + "type": "varint" + }, + { + "name": "overlay", + "type": "varint" + } + ] + ] + }, + "default": "void" + } + ] + } + ] + ], + "packet_show_credits": [ + "container", + [ + { + "name": "runtime_entity_id", + "type": "varint64" + }, + { + "name": "status", + "type": "zigzag32" + } + ] + ], + "packet_available_commands": [ + "container", + [ + { + "name": "values_len", + "type": "varint" + }, + { + "name": "_enum_type", + "type": [ + "enum_size_based_on_values_len" + ] + }, + { + "name": "enum_values", + "type": [ + "array", + { + "count": "values_len", + "type": "string" + } + ] + }, + { + "name": "suffixes", + "type": [ + "array", + { + "countType": "varint", + "type": "string" + } + ] + }, + { + "name": "enums", + "type": [ + "array", + { + "countType": "varint", + "type": [ + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "values", + "type": [ + "array", + { + "countType": "varint", + "type": [ + "switch", + { + "compareTo": "../_enum_type", + "fields": { + "byte": "u8", + "short": "lu16", + "int": "lu32" + }, + "default": "void" + } + ] + } + ] + } + ] + ] + } + ] + }, + { + "name": "command_data", + "type": [ + "array", + { + "countType": "varint", + "type": [ + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "description", + "type": "string" + }, + { + "name": "flags", + "type": "u8" + }, + { + "name": "permission_level", + "type": "u8" + }, + { + "name": "alias", + "type": "li32" + }, + { + "name": "overloads", + "type": [ + "array", + { + "countType": "varint", + "type": [ + "array", + { + "countType": "varint", + "type": [ + "container", + [ + { + "name": "paramater_name", + "type": "string" + }, + { + "name": "value_type", + "type": [ + "mapper", + { + "type": "lu16", + "mappings": { + "1": "int", + "2": "float", + "3": "value", + "4": "wildcard_int", + "5": "operator", + "6": "target", + "16": "file_path", + "32": "string", + "40": "position", + "44": "message", + "46": "raw_text", + "50": "json", + "63": "command" + } + } + ] + }, + { + "name": "enum_type", + "type": [ + "mapper", + { + "type": "lu16", + "mappings": { + "16": "valid", + "32": "enum", + "256": "suffixed", + "1024": "soft_enum" + } + } + ] + }, + { + "name": "optional", + "type": "bool" + }, + { + "name": "options", + "type": "CommandFlags" + } + ] + ] + } + ] + } + ] + } + ] + ] + } + ] + }, + { + "name": "dynamic_enums", + "type": [ + "array", + { + "countType": "varint", + "type": [ + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "values", + "type": [ + "array", + { + "countType": "varint", + "type": "string" + } + ] + } + ] + ] + } + ] + }, + { + "name": "enum_constraints", + "type": [ + "array", + { + "countType": "varint", + "type": [ + "container", + [ + { + "name": "value_index", + "type": "li32" + }, + { + "name": "enum_index", + "type": "li32" + }, + { + "name": "constraints", + "type": [ + "array", + { + "countType": "varint", + "type": [ + "container", + [ + { + "name": "constraint", + "type": [ + "mapper", + { + "type": "u8", + "mappings": { + "0": "cheats_enabled", + "1": "operator_permissions", + "2": "host_permissions" + } + } + ] + } + ] + ] + } + ] + } + ] + ] + } + ] + } + ] + ], + "packet_command_request": [ + "container", + [ + { + "name": "command", + "type": "string" + }, + { + "name": "origin", + "type": "CommandOrigin" + }, + { + "name": "interval", + "type": "bool" + } + ] + ], + "packet_command_block_update": [ + "container", + [ + { + "name": "is_block", + "type": "bool" + }, + { + "anon": true, + "type": [ + "switch", + { + "compareTo": "is_block", + "fields": { + "true": [ + "container", + [ + { + "name": "position", + "type": "BlockCoordinates" + }, + { + "name": "mode", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "impulse", + "1": "repeat", + "2": "chain" + } + } + ] + }, + { + "name": "needs_redstone", + "type": "bool" + }, + { + "name": "conditional", + "type": "bool" + } + ] + ] + }, + "default": [ + "container", + [ + { + "name": "minecart_entity_runtime_id", + "type": "varint64" + } + ] + ] + } + ] + }, + { + "name": "command", + "type": "string" + }, + { + "name": "last_output", + "type": "string" + }, + { + "name": "name", + "type": "string" + }, + { + "name": "should_track_output", + "type": "bool" + }, + { + "name": "tick_delay", + "type": "li32" + }, + { + "name": "execute_on_first_tick", + "type": "bool" + } + ] + ], + "packet_command_output": [ + "container", + [ + { + "name": "origin", + "type": "CommandOrigin" + }, + { + "name": "output_type", + "type": [ + "mapper", + { + "type": "i8", + "mappings": { + "1": "last", + "2": "silent", + "3": "all", + "4": "data_set" + } + } + ] + }, + { + "name": "success_count", + "type": "varint" + }, + { + "name": "output", + "type": [ + "array", + { + "countType": "varint", + "type": [ + "container", + [ + { + "name": "success", + "type": "bool" + }, + { + "name": "message_id", + "type": "string" + }, + { + "name": "paramaters", + "type": [ + "array", + { + "countType": "varint", + "type": "string" + } + ] + } + ] + ] + } + ] + }, + { + "name": "data_set", + "type": [ + "switch", + { + "compareTo": "output_type", + "fields": { + "data_set": "string" + }, + "default": "void" + } + ] + } + ] + ], + "packet_update_trade": [ + "container", + [ + { + "name": "window_id", + "type": "WindowID" + }, + { + "name": "window_type", + "type": "WindowType" + }, + { + "name": "size", + "type": "varint" + }, + { + "name": "trade_tier", + "type": "varint" + }, + { + "name": "villager_unique_id", + "type": "varint64" + }, + { + "name": "entity_unique_id", + "type": "varint64" + }, + { + "name": "display_name", + "type": "string" + }, + { + "name": "new_trading_ui", + "type": "bool" + }, + { + "name": "economic_trades", + "type": "bool" + }, + { + "name": "offers", + "type": "nbt" + } + ] + ], + "packet_update_equipment": [ + "container", + [ + { + "name": "window_id", + "type": "WindowID" + }, + { + "name": "window_type", + "type": "WindowType" + }, + { + "name": "size", + "type": "u8" + }, + { + "name": "entity_id", + "type": "zigzag64" + }, + { + "name": "inventory", + "type": "nbt" + } + ] + ], + "packet_resource_pack_data_info": [ + "container", + [ + { + "name": "pack_id", + "type": "string" + }, + { + "name": "max_chunk_size", + "type": "lu32" + }, + { + "name": "chunk_count", + "type": "lu32" + }, + { + "name": "size", + "type": "lu64" + }, + { + "name": "hash", + "type": "ByteArray" + }, + { + "name": "is_premium", + "type": "bool" + }, + { + "name": "pack_type", + "type": [ + "mapper", + { + "type": "u8", + "mappings": { + "1": "addon", + "2": "cached", + "3": "copy_protected", + "4": "behavior", + "5": "persona_piece", + "6": "resources", + "7": "skins", + "8": "world_template" + } + } + ] + } + ] + ], + "packet_resource_pack_chunk_data": [ + "container", + [ + { + "name": "pack_id", + "type": "string" + }, + { + "name": "chunk_index", + "type": "lu32" + }, + { + "name": "progress", + "type": "lu64" + }, + { + "name": "payload", + "type": "ByteArray" + } + ] + ], + "packet_resource_pack_chunk_request": [ + "container", + [ + { + "name": "pack_id", + "type": "string" + }, + { + "name": "chunk_index", + "type": "lu32" + } + ] + ], + "packet_transfer": [ + "container", + [ + { + "name": "server_address", + "type": "string" + }, + { + "name": "port", + "type": "lu16" + } + ] + ], + "packet_play_sound": [ + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "coordinates", + "type": "BlockCoordinates" + }, + { + "name": "volume", + "type": "lf32" + }, + { + "name": "pitch", + "type": "lf32" + } + ] + ], + "packet_stop_sound": [ + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "stop_all", + "type": "bool" + } + ] + ], + "packet_set_title": [ + "container", + [ + { + "name": "type", + "type": [ + "mapper", + { + "type": "zigzag32", + "mappings": { + "0": "clear", + "1": "reset", + "2": "set_title", + "3": "set_subtitle", + "4": "action_bar_message", + "5": "set_durations", + "6": "set_title_json", + "7": "set_subtitle_json", + "8": "action_bar_message_json" + } + } + ] + }, + { + "name": "text", + "type": "string" + }, + { + "name": "fade_in_time", + "type": "zigzag32" + }, + { + "name": "stay_time", + "type": "zigzag32" + }, + { + "name": "fade_out_time", + "type": "zigzag32" + } + ] + ], + "packet_add_behavior_tree": [ + "container", + [ + { + "name": "behaviortree", + "type": "string" + } + ] + ], + "packet_structure_block_update": [ + "container", + [ + { + "name": "position", + "type": "BlockCoordinates" + }, + { + "name": "structure_name", + "type": "string" + }, + { + "name": "data_field", + "type": "string" + }, + { + "name": "include_players", + "type": "bool" + }, + { + "name": "show_bounding_box", + "type": "bool" + }, + { + "name": "structure_block_type", + "type": "zigzag32" + }, + { + "name": "settings", + "type": "StructureBlockSettings" + }, + { + "name": "redstone_save_mode", + "type": "zigzag32" + }, + { + "name": "should_trigger", + "type": "bool" + } + ] + ], + "packet_show_store_offer": [ + "container", + [ + { + "name": "offer_id", + "type": "string" + }, + { + "name": "show_all", + "type": "bool" + } + ] + ], + "packet_purchase_receipt": [ + "container", + [ + { + "name": "receipts", + "type": [ + "array", + { + "countType": "varint", + "type": "string" + } + ] + } + ] + ], + "packet_player_skin": [ + "container", + [ + { + "name": "uuid", + "type": "uuid" + }, + { + "name": "skin", + "type": "Skin" + }, + { + "name": "skin_name", + "type": "string" + }, + { + "name": "old_skin_name", + "type": "string" + }, + { + "name": "is_verified", + "type": "bool" + } + ] + ], + "packet_sub_client_login": [ + "container", + [ + { + "name": "tokens", + "type": [ + "encapsulated", + { + "lengthType": "varint", + "type": "LoginTokens" + } + ] + } + ] + ], + "packet_initiate_web_socket_connection": [ + "container", + [ + { + "name": "server", + "type": "string" + } + ] + ], + "packet_set_last_hurt_by": [ + "container", + [ + { + "name": "entity_type", + "type": "varint" + } + ] + ], + "packet_book_edit": [ + "container", + [ + { + "name": "type", + "type": [ + "mapper", + { + "type": "u8", + "mappings": { + "0": "replace_page", + "1": "add_page", + "2": "delete_page", + "3": "swap_pages", + "4": "sign" + } + } + ] + }, + { + "name": "slot", + "type": "u8" + }, + { + "anon": true, + "type": [ + "switch", + { + "compareTo": "type", + "fields": { + "replace_page": [ + "container", + [ + { + "name": "page_number", + "type": "u8" + }, + { + "name": "text", + "type": "string" + }, + { + "name": "photo_name", + "type": "string" + } + ] + ], + "add_page": [ + "container", + [ + { + "name": "page_number", + "type": "u8" + }, + { + "name": "text", + "type": "string" + }, + { + "name": "photo_name", + "type": "string" + } + ] + ], + "delete_page": [ + "container", + [ + { + "name": "page_number", + "type": "u8" + } + ] + ], + "swap_pages": [ + "container", + [ + { + "name": "page1", + "type": "u8" + }, + { + "name": "page2", + "type": "u8" + } + ] + ], + "sign": [ + "container", + [ + { + "name": "title", + "type": "string" + }, + { + "name": "author", + "type": "string" + }, + { + "name": "xuid", + "type": "string" + } + ] + ] + }, + "default": "void" + } + ] + } + ] + ], + "packet_npc_request": [ + "container", + [ + { + "name": "runtime_entity_id", + "type": "varint64" + }, + { + "name": "request_type", + "type": [ + "mapper", + { + "type": "u8", + "mappings": { + "0": "set_actions", + "1": "execute_action", + "2": "execute_closing_commands", + "3": "set_name", + "4": "set_skin", + "5": "set_interaction_text" + } + } + ] + }, + { + "name": "command", + "type": "string" + }, + { + "name": "action_type", + "type": "u8" + } + ] + ], + "packet_photo_transfer": [ + "container", + [ + { + "name": "image_name", + "type": "string" + }, + { + "name": "image_data", + "type": "string" + }, + { + "name": "book_id", + "type": "string" + } + ] + ], + "packet_modal_form_request": [ + "container", + [ + { + "name": "form_id", + "type": "varint" + }, + { + "name": "data", + "type": "string" + } + ] + ], + "packet_modal_form_response": [ + "container", + [ + { + "name": "form_id", + "type": "varint" + }, + { + "name": "data", + "type": "string" + } + ] + ], + "packet_server_settings_request": [ + "container", + [] + ], + "packet_server_settings_response": [ + "container", + [ + { + "name": "form_id", + "type": "varint" + }, + { + "name": "data", + "type": "string" + } + ] + ], + "packet_show_profile": [ + "container", + [ + { + "name": "xuid", + "type": "string" + } + ] + ], + "packet_set_default_game_type": [ + "container", + [ + { + "name": "gamemode", + "type": "GameMode" + } + ] + ], + "packet_remove_objective": [ + "container", + [ + { + "name": "objective_name", + "type": "string" + } + ] + ], + "packet_set_display_objective": [ + "container", + [ + { + "name": "display_slot", + "type": "string" + }, + { + "name": "objective_name", + "type": "string" + }, + { + "name": "display_name", + "type": "string" + }, + { + "name": "criteria_name", + "type": "string" + }, + { + "name": "sort_order", + "type": "zigzag32" + } + ] + ], + "packet_set_score": [ + "container", + [ + { + "name": "action", + "type": [ + "mapper", + { + "type": "u8", + "mappings": { + "0": "change", + "1": "remove" + } + } + ] + }, + { + "name": "entries", + "type": [ + "array", + { + "countType": "varint", + "type": [ + "container", + [ + { + "name": "scoreboard_id", + "type": "zigzag64" + }, + { + "name": "objective_name", + "type": "string" + }, + { + "name": "score", + "type": "li32" + }, + { + "anon": true, + "type": [ + "switch", + { + "compareTo": "../action", + "fields": { + "change": [ + "container", + [ + { + "name": "entry_type", + "type": [ + "mapper", + { + "type": "i8", + "mappings": { + "1": "player", + "2": "entity", + "3": "fake_player" + } + } + ] + }, + { + "name": "entity_unique_id", + "type": [ + "switch", + { + "compareTo": "entry_type", + "fields": { + "player": "zigzag64", + "entity": "zigzag64" + }, + "default": "void" + } + ] + }, + { + "name": "custom_name", + "type": [ + "switch", + { + "compareTo": "entry_type", + "fields": { + "fake_player": "string" + }, + "default": "void" + } + ] + } + ] + ] + }, + "default": "void" + } + ] + } + ] + ] + } + ] + } + ] + ], + "packet_lab_table": [ + "container", + [ + { + "name": "action_type", + "type": [ + "mapper", + { + "type": "u8", + "mappings": { + "0": "combine", + "1": "react" + } + } + ] + }, + { + "name": "position", + "type": "vec3u" + }, + { + "name": "reaction_type", + "type": "u8" + } + ] + ], + "packet_update_block_synced": [ + "container", + [ + { + "name": "position", + "type": "BlockCoordinates" + }, + { + "name": "block_runtime_id", + "type": "varint" + }, + { + "name": "flags", + "type": "UpdateBlockFlags" + }, + { + "name": "layer", + "type": "varint" + }, + { + "name": "entity_unique_id", + "type": "zigzag64" + }, + { + "name": "transition_type", + "type": [ + "mapper", + { + "type": "varint64", + "mappings": { + "0": "entity", + "1": "create", + "2": "destroy" + } + } + ] + } + ] + ], + "packet_move_entity_delta": [ + "container", + [ + { + "name": "runtime_entity_id", + "type": "varint64" + }, + { + "name": "flags", + "type": "DeltaMoveFlags" + }, + { + "name": "x", + "type": [ + "switch", + { + "compareTo": "flags.has_x", + "fields": { + "true": "lf32" + }, + "default": "void" + } + ] + }, + { + "name": "y", + "type": [ + "switch", + { + "compareTo": "flags.has_y", + "fields": { + "true": "lf32" + }, + "default": "void" + } + ] + }, + { + "name": "z", + "type": [ + "switch", + { + "compareTo": "flags.has_z", + "fields": { + "true": "lf32" + }, + "default": "void" + } + ] + }, + { + "name": "rot_x", + "type": [ + "switch", + { + "compareTo": "flags.has_rot_x", + "fields": { + "true": "u8" + }, + "default": "void" + } + ] + }, + { + "name": "rot_y", + "type": [ + "switch", + { + "compareTo": "flags.has_rot_y", + "fields": { + "true": "u8" + }, + "default": "void" + } + ] + }, + { + "name": "rot_z", + "type": [ + "switch", + { + "compareTo": "flags.has_rot_z", + "fields": { + "true": "u8" + }, + "default": "void" + } + ] + } + ] + ], + "packet_set_scoreboard_identity": [ + "container", + [ + { + "name": "action", + "type": [ + "mapper", + { + "type": "i8", + "mappings": { + "0": "register_identity", + "1": "clear_identity" + } + } + ] + }, + { + "name": "entries", + "type": [ + "array", + { + "countType": "varint", + "type": [ + "container", + [ + { + "name": "scoreboard_id", + "type": "zigzag64" + }, + { + "name": "entity_unique_id", + "type": [ + "switch", + { + "compareTo": "../action", + "fields": { + "register_identity": "zigzag64" + }, + "default": "void" + } + ] + } + ] + ] + } + ] + } + ] + ], + "packet_set_local_player_as_initialized": [ + "container", + [ + { + "name": "runtime_entity_id", + "type": "varint64" + } + ] + ], + "packet_update_soft_enum": [ + "container", + [] + ], + "packet_network_stack_latency": [ + "container", + [ + { + "name": "timestamp", + "type": "lu64" + }, + { + "name": "needs_response", + "type": "u8" + } + ] + ], + "packet_script_custom_event": [ + "container", + [ + { + "name": "event_name", + "type": "string" + }, + { + "name": "event_data", + "type": "string" + } + ] + ], + "packet_spawn_particle_effect": [ + "container", + [ + { + "name": "dimension", + "type": "u8" + }, + { + "name": "entity_id", + "type": "zigzag64" + }, + { + "name": "position", + "type": "vec3f" + }, + { + "name": "particle_name", + "type": "string" + } + ] + ], + "packet_available_entity_identifiers": [ + "container", + [ + { + "name": "nbt", + "type": "nbt" + } + ] + ], + "packet_level_sound_event_v2": [ + "container", + [ + { + "name": "sound_id", + "type": "u8" + }, + { + "name": "position", + "type": "vec3f" + }, + { + "name": "block_id", + "type": "zigzag32" + }, + { + "name": "entity_type", + "type": "string" + }, + { + "name": "is_baby_mob", + "type": "bool" + }, + { + "name": "is_global", + "type": "bool" + } + ] + ], + "packet_network_chunk_publisher_update": [ + "container", + [ + { + "name": "coordinates", + "type": "BlockCoordinates" + }, + { + "name": "radius", + "type": "varint" + } + ] + ], + "packet_biome_definition_list": [ + "container", + [ + { + "name": "nbt", + "type": "nbt" + } + ] + ], + "packet_level_sound_event": [ + "container", + [ + { + "name": "sound_id", + "type": "SoundType" + }, + { + "name": "position", + "type": "vec3f" + }, + { + "name": "extra_data", + "type": "zigzag32" + }, + { + "name": "entity_type", + "type": "string" + }, + { + "name": "is_baby_mob", + "type": "bool" + }, + { + "name": "is_global", + "type": "bool" + } + ] + ], + "packet_level_event_generic": [ + "container", + [ + { + "name": "event_id", + "type": "varint" + }, + { + "name": "nbt", + "type": "nbtLoop" + } + ] + ], + "packet_lectern_update": [ + "container", + [ + { + "name": "page", + "type": "u8" + }, + { + "name": "page_count", + "type": "u8" + }, + { + "name": "position", + "type": "vec3i" + }, + { + "name": "drop_book", + "type": "bool" + } + ] + ], + "packet_video_stream_connect": [ + "container", + [ + { + "name": "server_uri", + "type": "string" + }, + { + "name": "frame_send_frequency", + "type": "lf32" + }, + { + "name": "action", + "type": "u8" + }, + { + "name": "resolution_x", + "type": "li32" + }, + { + "name": "resolution_y", + "type": "li32" + } + ] + ], + "packet_add_ecs_entity": [ + "container", + [ + { + "name": "network_id", + "type": "varint64" + } + ] + ], + "packet_remove_ecs_entity": [ + "container", + [ + { + "name": "network_id", + "type": "varint64" + } + ] + ], + "packet_client_cache_status": [ + "container", + [ + { + "name": "enabled", + "type": "bool" + } + ] + ], + "packet_on_screen_texture_animation": [ + "container", + [ + { + "name": "animation_type", + "type": "lu32" + } + ] + ], + "packet_map_create_locked_copy": [ + "container", + [ + { + "name": "original_map_id", + "type": "zigzag64" + }, + { + "name": "new_map_id", + "type": "zigzag64" + } + ] + ], + "packet_structure_template_data_export_request": [ + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "position", + "type": "BlockCoordinates" + }, + { + "name": "settings", + "type": "StructureBlockSettings" + }, + { + "name": "request_type", + "type": [ + "mapper", + { + "type": "u8", + "mappings": { + "1": "export_from_save", + "2": "export_from_load", + "3": "query_saved_structure" + } + } + ] + } + ] + ], + "packet_structure_template_data_export_response": [ + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "success", + "type": "bool" + }, + { + "name": "nbt", + "type": [ + "switch", + { + "compareTo": "success", + "fields": { + "true": "nbt" + }, + "default": "void" + } + ] + }, + { + "name": "response_type", + "type": [ + "mapper", + { + "type": "u8", + "mappings": { + "1": "export", + "2": "query" + } + } + ] + } + ] + ], + "packet_update_block_properties": [ + "container", + [ + { + "name": "nbt", + "type": "nbt" + } + ] + ], + "packet_client_cache_blob_status": [ + "container", + [ + { + "name": "misses", + "type": "varint" + }, + { + "name": "haves", + "type": "varint" + }, + { + "name": "missing", + "type": [ + "array", + { + "count": "misses", + "type": "lu64" + } + ] + }, + { + "name": "have", + "type": [ + "array", + { + "count": "haves", + "type": "lu64" + } + ] + } + ] + ], + "packet_client_cache_miss_response": [ + "container", + [ + { + "name": "blobs", + "type": [ + "array", + { + "countType": "varint", + "type": "Blob" + } + ] + } + ] + ], + "packet_education_settings": [ + "container", + [ + { + "name": "CodeBuilderDefaultURI", + "type": "string" + }, + { + "name": "CodeBuilderTitle", + "type": "string" + }, + { + "name": "CanResizeCodeBuilder", + "type": "bool" + }, + { + "name": "HasOverrideURI", + "type": "bool" + }, + { + "name": "OverrideURI", + "type": [ + "switch", + { + "compareTo": "HasOverrideURI", + "fields": { + "true": "string" + }, + "default": "void" + } + ] + }, + { + "name": "HasQuiz", + "type": "bool" + } + ] + ], + "packet_multiplayer_settings": [ + "container", + [ + { + "name": "action_type", + "type": [ + "mapper", + { + "type": "zigzag32", + "mappings": { + "0": "enable_multiplayer", + "1": "disable_multiplayer", + "2": "refresh_join_code" + } + } + ] + } + ] + ], + "packet_settings_command": [ + "container", + [ + { + "name": "command_line", + "type": "string" + }, + { + "name": "suppress_output", + "type": "bool" + } + ] + ], + "packet_anvil_damage": [ + "container", + [ + { + "name": "damage", + "type": "u8" + }, + { + "name": "position", + "type": "BlockCoordinates" + } + ] + ], + "packet_completed_using_item": [ + "container", + [ + { + "name": "used_item_id", + "type": "li16" + }, + { + "name": "use_method", + "type": [ + "mapper", + { + "type": "li32", + "mappings": { + "0": "equip_armor", + "1": "eat", + "2": "attack", + "3": "consume", + "4": "throw", + "5": "shoot", + "6": "place", + "7": "fill_bottle", + "8": "fill_bucket", + "9": "pour_bucket", + "10": "use_tool", + "11": "interact", + "12": "retrieved", + "13": "dyed", + "14": "traded" + } + } + ] + } + ] + ], + "packet_network_settings": [ + "container", + [ + { + "name": "compression_threshold", + "type": "u16" + } + ] + ], + "packet_player_auth_input": [ + "container", + [ + { + "name": "pitch", + "type": "lf32" + }, + { + "name": "yaw", + "type": "lf32" + }, + { + "name": "position", + "type": "vec3f" + }, + { + "name": "move_vector", + "type": "vec2f" + }, + { + "name": "head_yaw", + "type": "lf32" + }, + { + "name": "input_data", + "type": "InputFlag" + }, + { + "name": "input_mode", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "unknown", + "1": "mouse", + "2": "touch", + "3": "game_pad", + "4": "motion_controller" + } + } + ] + }, + { + "name": "play_mode", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "normal", + "1": "teaser", + "2": "screen", + "3": "viewer", + "4": "reality", + "5": "placement", + "6": "living_room", + "7": "exit_level", + "8": "exit_level_living_room", + "9": "num_modes" + } + } + ] + }, + { + "name": "gaze_direction", + "type": [ + "switch", + { + "compareTo": "play_mode", + "fields": { + "reality": "vec3f" + }, + "default": "void" + } + ] + }, + { + "name": "tick", + "type": "varint64" + }, + { + "name": "delta", + "type": "vec3f" + }, + { + "name": "transaction", + "type": [ + "switch", + { + "compareTo": "input_data.item_interact", + "fields": { + "true": [ + "container", + [ + { + "name": "legacy", + "type": "TransactionLegacy" + }, + { + "name": "actions", + "type": "TransactionActions" + }, + { + "name": "data", + "type": "TransactionUseItem" + } + ] + ] + }, + "default": "void" + } + ] + }, + { + "name": "item_stack_request", + "type": [ + "switch", + { + "compareTo": "input_data.item_stack_request", + "fields": { + "true": "ItemStackRequest" + }, + "default": "void" + } + ] + }, + { + "name": "block_action", + "type": [ + "switch", + { + "compareTo": "input_data.block_action", + "fields": { + "true": [ + "array", + { + "countType": "zigzag32", + "type": [ + "container", + [ + { + "name": "action", + "type": "Action" + }, + { + "anon": true, + "type": [ + "switch", + { + "compareTo": "action", + "fields": { + "start_break": [ + "container", + [ + { + "name": "position", + "type": "BlockCoordinates" + }, + { + "name": "face", + "type": "zigzag32" + } + ] + ], + "abort_break": [ + "container", + [ + { + "name": "position", + "type": "BlockCoordinates" + }, + { + "name": "face", + "type": "zigzag32" + } + ] + ], + "crack_break": [ + "container", + [ + { + "name": "position", + "type": "BlockCoordinates" + }, + { + "name": "face", + "type": "zigzag32" + } + ] + ], + "predict_break": [ + "container", + [ + { + "name": "position", + "type": "BlockCoordinates" + }, + { + "name": "face", + "type": "zigzag32" + } + ] + ], + "continue_break": [ + "container", + [ + { + "name": "position", + "type": "BlockCoordinates" + }, + { + "name": "face", + "type": "zigzag32" + } + ] + ] + }, + "default": "void" + } + ] + } + ] + ] + } + ] + }, + "default": "void" + } + ] + } + ] + ], + "packet_creative_content": [ + "container", + [ + { + "name": "items", + "type": [ + "array", + { + "countType": "varint", + "type": [ + "container", + [ + { + "name": "entry_id", + "type": "varint" + }, + { + "name": "item", + "type": "ItemLegacy" + } + ] + ] + } + ] + } + ] + ], + "packet_player_enchant_options": [ + "container", + [ + { + "name": "options", + "type": [ + "array", + { + "countType": "varint", + "type": "EnchantOption" + } + ] + } + ] + ], + "packet_item_stack_request": [ + "container", + [ + { + "name": "requests", + "type": [ + "array", + { + "countType": "varint", + "type": "ItemStackRequest" + } + ] + } + ] + ], + "packet_item_stack_response": [ + "container", + [ + { + "name": "responses", + "type": "ItemStackResponses" + } + ] + ], + "packet_player_armor_damage": [ + "container", + [ + { + "name": "type", + "type": "ArmorDamageType" + }, + { + "name": "helmet_damage", + "type": [ + "switch", + { + "compareTo": "type.head", + "fields": { + "true": "zigzag32" + }, + "default": "void" + } + ] + }, + { + "name": "chestplate_damage", + "type": [ + "switch", + { + "compareTo": "type.chest", + "fields": { + "true": "zigzag32" + }, + "default": "void" + } + ] + }, + { + "name": "leggings_damage", + "type": [ + "switch", + { + "compareTo": "type.legs", + "fields": { + "true": "zigzag32" + }, + "default": "void" + } + ] + }, + { + "name": "boots_damage", + "type": [ + "switch", + { + "compareTo": "type.feet", + "fields": { + "true": "zigzag32" + }, + "default": "void" + } + ] + } + ] + ], + "packet_update_player_game_type": [ + "container", + [ + { + "name": "gamemode", + "type": "GameMode" + }, + { + "name": "player_unique_id", + "type": "zigzag64" + } + ] + ], + "packet_position_tracking_db_request": [ + "container", + [ + { + "name": "action", + "type": [ + "mapper", + { + "type": "u8", + "mappings": { + "0": "query" + } + } + ] + }, + { + "name": "tracking_id", + "type": "zigzag32" + } + ] + ], + "packet_position_tracking_db_broadcast": [ + "container", + [ + { + "name": "broadcast_action", + "type": [ + "mapper", + { + "type": "u8", + "mappings": { + "0": "update", + "1": "destory", + "2": "not_found" + } + } + ] + }, + { + "name": "tracking_id", + "type": "zigzag32" + }, + { + "name": "nbt", + "type": "nbt" + } + ] + ], + "packet_packet_violation_warning": [ + "container", + [ + { + "name": "violation_type", + "type": [ + "mapper", + { + "type": "zigzag32", + "mappings": { + "0": "malformed" + } + } + ] + }, + { + "name": "severity", + "type": [ + "mapper", + { + "type": "zigzag32", + "mappings": { + "0": "warning", + "1": "final_warning", + "2": "terminating" + } + } + ] + }, + { + "name": "packet_id", + "type": "zigzag32" + }, + { + "name": "reason", + "type": "string" + } + ] + ], + "packet_motion_prediction_hints": [ + "container", + [ + { + "name": "entity_runtime_id", + "type": "varint64" + }, + { + "name": "velocity", + "type": "vec3f" + }, + { + "name": "on_ground", + "type": "bool" + } + ] + ], + "packet_animate_entity": [ + "container", + [ + { + "name": "animation", + "type": "string" + }, + { + "name": "next_state", + "type": "string" + }, + { + "name": "stop_condition", + "type": "string" + }, + { + "name": "controller", + "type": "string" + }, + { + "name": "blend_out_time", + "type": "lf32" + }, + { + "name": "runtime_entity_ids", + "type": [ + "array", + { + "countType": "varint", + "type": "varint64" + } + ] + } + ] + ], + "packet_camera_shake": [ + "container", + [ + { + "name": "intensity", + "type": "lf32" + }, + { + "name": "duration", + "type": "lf32" + }, + { + "name": "type", + "type": "u8" + }, + { + "name": "action", + "type": [ + "mapper", + { + "type": "u8", + "mappings": { + "0": "add", + "1": "stop" + } + } + ] + } + ] + ], + "packet_player_fog": [ + "container", + [ + { + "name": "stack", + "type": [ + "array", + { + "countType": "varint", + "type": "string" + } + ] + } + ] + ], + "packet_correct_player_move_prediction": [ + "container", + [ + { + "name": "position", + "type": "vec3f" + }, + { + "name": "delta", + "type": "vec3f" + }, + { + "name": "on_ground", + "type": "bool" + }, + { + "name": "tick", + "type": "varint64" + } + ] + ], + "packet_item_component": [ + "container", + [ + { + "name": "entries", + "type": "ItemComponentList" + } + ] + ], + "packet_filter_text_packet": [ + "container", + [ + { + "name": "text", + "type": "string" + }, + { + "name": "from_server", + "type": "bool" + } + ] + ], + "packet_debug_renderer": [ + "container", + [ + { + "name": "type", + "type": [ + "mapper", + { + "type": "li32", + "mappings": { + "1": "clear", + "2": "add_cube" + } + } + ] + }, + { + "anon": true, + "type": [ + "switch", + { + "compareTo": "type", + "fields": { + "clear": "void", + "add_cube": [ + "container", + [ + { + "name": "text", + "type": "string" + }, + { + "name": "position", + "type": "vec3f" + }, + { + "name": "red", + "type": "lf32" + }, + { + "name": "green", + "type": "lf32" + }, + { + "name": "blue", + "type": "lf32" + }, + { + "name": "alpha", + "type": "lf32" + }, + { + "name": "duration", + "type": "li64" + } + ] + ] + }, + "default": "void" + } + ] + } + ] + ], + "packet_sync_entity_property": [ + "container", + [ + { + "name": "nbt", + "type": "nbt" + } + ] + ], + "packet_add_volume_entity": [ + "container", + [ + { + "name": "entity_id", + "type": "varint64" + }, + { + "name": "nbt", + "type": "nbt" + } + ] + ], + "packet_remove_volume_entity": [ + "container", + [ + { + "name": "entity_id", + "type": "varint64" + } + ] + ], + "string": [ + "pstring", + { + "countType": "varint" + } + ], + "ByteArray": [ + "buffer", + { + "countType": "varint" + } + ], + "SignedByteArray": [ + "buffer", + { + "countType": "zigzag32" + } + ], + "LittleString": [ + "pstring", + { + "countType": "li32" + } + ], + "ShortArray": [ + "buffer", + { + "countType": "li16" + } + ], + "MetadataFlags1": [ + "bitflags", + { + "type": "zigzag64", + "big": true, + "flags": [ + "onfire", + "sneaking", + "riding", + "sprinting", + "action", + "invisible", + "tempted", + "inlove", + "saddled", + "powered", + "ignited", + "baby", + "converting", + "critical", + "can_show_nametag", + "always_show_nametag", + "no_ai", + "silent", + "wallclimbing", + "can_climb", + "swimmer", + "can_fly", + "walker", + "resting", + "sitting", + "angry", + "interested", + "charged", + "tamed", + "orphaned", + "leashed", + "sheared", + "gliding", + "elder", + "moving", + "breathing", + "chested", + "stackable", + "showbase", + "rearing", + "vibrating", + "idling", + "evoker_spell", + "charge_attack", + "wasd_controlled", + "can_power_jump", + "linger", + "has_collision", + "affected_by_gravity", + "fire_immune", + "dancing", + "enchanted", + "show_trident_rope", + "container_private", + "transforming", + "spin_attack", + "swimming", + "bribed", + "pregnant", + "laying_egg", + "rider_can_pick", + "transition_sitting", + "eating", + "laying_down" + ] + } + ], + "MetadataFlags2": [ + "bitflags", + { + "type": "zigzag64", + "big": true, + "flags": [ + "sneezing", + "trusting", + "rolling", + "scared", + "in_scaffolding", + "over_scaffolding", + "fall_through_scaffolding", + "blocking", + "transition_blocking", + "blocked_using_shield", + "blocked_using_damaged_shield", + "sleeping", + "wants_to_wake", + "trade_interest", + "door_breaker", + "breaking_obstruction", + "door_opener", + "illager_captain", + "stunned", + "roaring", + "delayed_attacking", + "avoiding_mobs", + "avoiding_block", + "facing_target_to_range_attack", + "hidden_when_invisible", + "is_in_ui", + "stalking", + "emoting", + "celebrating", + "admiring", + "celebrating_special", + "unknown95", + "ram_attack", + "playing_dead" + ] + } + ], + "UpdateBlockFlags": [ + "bitflags", + { + "type": "varint", + "flags": { + "neighbors": 1, + "network": 2, + "no_graphic": 4, + "unused": 8, + "priority": 16 + } + } + ], + "AdventureFlags": [ + "bitflags", + { + "type": "varint", + "flags": { + "world_immutable": 1, + "no_pvp": 2, + "auto_jump": 32, + "allow_flight": 64, + "no_clip": 128, + "world_builder": 256, + "flying": 512, + "muted": 1024 + } + } + ], + "ActionPermissions": [ + "bitflags", + { + "type": "varint", + "flags": { + "mine": 65537, + "doors_and_switches": 65538, + "open_containers": 65540, + "attack_players": 65544, + "attack_mobs": 65552, + "operator": 65568, + "teleport": 65664, + "build": 65792, + "default": 66048 + } + } + ], + "UpdateMapFlags": [ + "bitflags", + { + "type": "varint", + "flags": [ + "void", + "texture", + "decoration", + "initialisation" + ] + } + ], + "CommandFlags": [ + "bitfield", + [ + { + "name": "unused", + "size": 6, + "signed": false + }, + { + "name": "has_semantic_constraint", + "size": 1, + "signed": false + }, + { + "name": "collapse_enum", + "size": 1, + "signed": false + } + ] + ], + "DeltaMoveFlags": [ + "bitflags", + { + "type": "lu16", + "flags": { + "has_x": 1, + "has_y": 2, + "has_z": 4, + "has_rot_x": 8, + "has_rot_y": 16, + "has_rot_z": 32, + "on_ground": 64, + "teleport": 128, + "force_move": 256 + } + } + ], + "InputFlag": [ + "bitflags", + { + "type": "varint64", + "big": true, + "flags": [ + "ascend", + "descend", + "north_jump", + "jump_down", + "sprint_down", + "change_height", + "jumping", + "auto_jumping_in_water", + "sneaking", + "sneak_down", + "up", + "down", + "left", + "right", + "up_left", + "up_right", + "want_up", + "want_down", + "want_down_slow", + "want_up_slow", + "sprinting", + "ascend_scaffolding", + "descend_scaffolding", + "sneak_toggle_down", + "persist_sneak", + "start_sprinting", + "stop_sprinting", + "start_sneaking", + "stop_sneaking", + "start_swimming", + "stop_swimming", + "start_jumping", + "start_gliding", + "stop_gliding", + "item_interact", + "block_action", + "item_stack_request" + ] + } + ], + "ArmorDamageType": [ + "bitflags", + { + "type": "u8", + "flags": { + "head": 1, + "chest": 2, + "legs": 4, + "feet": 8 + } + } + ] + } +} \ No newline at end of file diff --git a/data/latest/proto.yml b/data/latest/proto.yml index 50574a8..585c33c 100644 --- a/data/latest/proto.yml +++ b/data/latest/proto.yml @@ -1,7 +1,7 @@ # Created from MiNET and gophertunnel docs # The version below is the latest version this protocol schema was updated for. # The output protocol.json will be in the folder for the version -!version: 1.16.220 +!version: 1.17.0 # Some ProtoDef aliases string: ["pstring",{"countType":"varint"}] @@ -379,7 +379,8 @@ packet_start_game: # is a new system introduced in 1.16. Backwards compatibility with the inventory transactions has to # some extent been preserved, but will eventually be removed. server_authoritative_inventory: bool - + # The server's engine version, used for telemetry + engine: string packet_add_player: !id: 0x0c @@ -629,8 +630,8 @@ packet_level_event: 1065: dye_used 1066: ink_sack_used 2000: particle_shoot #TODO: check 2000-2017 - 2001: particle_destroy - 2002: particle_splash + 2001: particle_destroy + 2002: particle_splash 2003: particle_eye_despawn 2004: particle_spawn 2005: particle_crop_growth @@ -683,7 +684,7 @@ packet_level_event: 3600: block_start_break 3601: block_stop_break 4000: set_data - 9800: players_sleeping + 9800: players_sleeping 0x4000: add_particle_mask position: vec3f data: zigzag32 @@ -1243,7 +1244,7 @@ packet_event: 9: agent_created 10: banner_pattern_removed 11: commaned_executed - 12: fish_bucketed + 12: fish_bucketed 13: mob_born 14: pet_died 15: cauldron_block_used @@ -1256,6 +1257,7 @@ packet_event: 22: honey_harvested 23: target_block_hit 24: piglin_barter + 25: waxed_or_unwaxed_copper use_player_id: u8 event_data: restBuffer # Unknown data, TODO: add @@ -3015,4 +3017,26 @@ packet_debug_renderer: # Alpha is the alpha value from the RGBA colour rendered on the debug. alpha: lf32 # Duration is how long the debug will last in the world for. It is measured in milliseconds. - duration: li64 \ No newline at end of file + duration: li64 + +# Sent by the server to synchronize/update entity properties as NBT, an alternative to Set Entity Data. +packet_sync_entity_property: + !id: 0xa5 + !bound: client + nbt: nbt + +# AddVolumeEntity sends a volume entity's definition and components from server to client. +packet_add_volume_entity: + !id: 0xa6 + !bound: client + # The Runtime Entity ID + entity_id: varint64 + nbt: nbt + +# RemoveVolumeEntity indicates a volume entity to be removed from server to client. +packet_remove_volume_entity: + !id: 0xa7 + !bound: client + # The Runtime Entity ID + entity_id: varint64 + diff --git a/data/latest/types.yaml b/data/latest/types.yaml index f047936..b18a577 100644 --- a/data/latest/types.yaml +++ b/data/latest/types.yaml @@ -45,6 +45,7 @@ GameMode: zigzag32 => GameRule: name: string + editable: bool type: varint => 1: bool 2: int @@ -283,12 +284,11 @@ MetadataDictionary: []varint 117: nearby_cured_discount_timestamp 118: hitbox 119: is_buoyant - 120: freezing_effect_strength - 121: buoyancy_data - 122: goat_horn_count - 123: base_runtime_id - 124: define_properties - 125: update_properties + 120: base_runtime_id + 121: freezing_effect_strength + 122: buoyancy_data + 123: goat_horn_count + 124: update_properties type: varint => 0: byte 1: short @@ -418,7 +418,10 @@ MetadataFlags2: [ "bitflags", { "emoting", "celebrating", "admiring", - "celebrating_special" + "celebrating_special", + "unknown95", # 95 + "ram_attack", + "playing_dead" ] }] @@ -1042,10 +1045,24 @@ StructureBlockSettings: last_editing_player_unique_id: zigzag64 # Rotation is the rotation that the structure block should obtain. See the constants above for available # options. - rotation: u8 + rotation: u8 => + 0: none + 1: 90_deg + 2: 180_deg + 3: 270_deg # Mirror specifies the way the structure should be mirrored. It is either no mirror at all, mirror on the # x/z axis or both. - mirror: u8 + mirror: u8 => + 0: none + 1: x_axis + 2: z_axis + 3: both_axes + animation_mode: u8 => + 0: none + 1: layers + 2: blocks + # How long the duration for this animation is + animation_duration: lf32 # Integrity is usually 1, but may be set to a number between 0 and 1 to omit blocks randomly, using # the Seed that follows. integrity: lf32 @@ -1553,6 +1570,31 @@ SoundType: varint => - CaveVinesPickBerries - BigDripleafTiltDown - BigDripleafTiltUp + - unknown335 + - unknown336 + - unknown337 + - unknown338 + - copper_wax_on + - copper_wax_off + - scrape + - player_hurt_drown + - player_hurt_on_fire + - player_hurt_freeze + - use_spyglass + - stop_using_spyglass + - amethyst_block_chime + - ambient_screamer + - hurt_screamer + - death_screamer + - milk_screamer + - jump_to_block + - pre_ram + - pre_ram_screamer + - ram_impact + - ram_impact_screamer + - squid_ink_squirt + - glow_squid_ink_squirt + - convert_to_stray - Undefined # TODO: remove? diff --git a/index.d.ts b/index.d.ts index e47c35c..34fee07 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,7 +1,7 @@ import EventEmitter from "events" declare module "bedrock-protocol" { - type Version = '1.16.220' | '1.16.210' | '1.16.201' + type Version = '1.17.0' | '1.16.220' | '1.16.210' | '1.16.201' enum title { MinecraftNintendoSwitch, MinecraftJava } @@ -157,4 +157,4 @@ declare module "bedrock-protocol" { export function createServer(options: ServerOptions): Server export function ping({ host, port }: { host: string, port: number }): Promise -} \ No newline at end of file +} diff --git a/src/options.js b/src/options.js index 8750697..4530548 100644 --- a/src/options.js +++ b/src/options.js @@ -1,9 +1,10 @@ // Minimum supported version (< will be kicked) const MIN_VERSION = '1.16.201' // Currently supported verson -const CURRENT_VERSION = '1.16.220' +const CURRENT_VERSION = '1.17.0' const Versions = { + '1.17.0': 440, '1.16.220': 431, '1.16.210': 428, '1.16.201': 422 diff --git a/test/internal.js b/test/internal.js index ff8cedf..ddfd025 100644 --- a/test/internal.js +++ b/test/internal.js @@ -2,6 +2,7 @@ const { Server, Client } = require('../') const { dumpPackets } = require('../tools/genPacketDumps') const DataProvider = require('../data/provider') const { ping } = require('../src/createClient') +const { CURRENT_VERSION } = require('../src/options') // First we need to dump some packets that a vanilla server would send a vanilla // client. Then we can replay those back in our custom server. @@ -9,7 +10,7 @@ function prepare (version) { return dumpPackets(version) } -async function startTest (version = '1.16.220', ok) { +async function startTest (version = CURRENT_VERSION, ok) { await prepare(version) const Item = require('../types/Item')(version) const port = 19130 diff --git a/tools/genPacketDumps.js b/tools/genPacketDumps.js index 39a1fce..a0a676f 100644 --- a/tools/genPacketDumps.js +++ b/tools/genPacketDumps.js @@ -23,7 +23,7 @@ async function dump (version, force = true) { const handle = await vanillaServer.startServerAndWait(version || CURRENT_VERSION, 1000 * 120, { 'server-port': port }) - console.log('Started dump server') + console.log('Started dump server', version) const client = new Client({ host: '127.0.0.1', port, diff --git a/types/Item.js b/types/Item.js index 123ceb4..5de23d2 100644 --- a/types/Item.js +++ b/types/Item.js @@ -1,3 +1,5 @@ +const { Versions } = require('../src/options') + module.exports = (version) => class Item { nbt @@ -11,7 +13,7 @@ module.exports = (version) => } static fromBedrock (obj) { - if (version === '1.16.220') { + if (Versions[version] >= Versions['1.16.220']) { return new Item({ networkId: obj.network_id, stackId: obj.stack_id, @@ -32,7 +34,7 @@ module.exports = (version) => } toBedrock () { - if (version === '1.16.220') { + if (Versions[version] >= Versions['1.16.220']) { return { network_id: this.networkId, count: this.count, From 6a03c9813c0e6dc856d2de5e03cfadd60d8d79a0 Mon Sep 17 00:00:00 2001 From: extremeheat Date: Wed, 9 Jun 2021 17:38:58 -0400 Subject: [PATCH 016/273] Release 3.4.0 --- HISTORY.md | 5 +++++ package.json | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/HISTORY.md b/HISTORY.md index d731a86..71c0f33 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,3 +1,8 @@ +## 3.4.0 +* Initial 1.17 support [#99](https://github.com/PrismarineJS/bedrock-protocol/pull/99) +* update connect version based on ping response & fix typings (u9g) [#101](https://github.com/PrismarineJS/bedrock-protocol/pull/101) +* fix: ping types. (JammSpread) [#100](https://github.com/PrismarineJS/bedrock-protocol/pull/100) + ## 3.3.0 * Protocol updates for 1.16, with some minor breaking changes to protocol fields [#95](https://github.com/PrismarineJS/bedrock-protocol/pull/95) * Fix npm install issues diff --git a/package.json b/package.json index ec3ffd9..f01299f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bedrock-protocol", - "version": "3.3.0", + "version": "3.4.0", "description": "Minecraft Bedrock Edition protocol library", "main": "index.js", "scripts": { From 90d12fa6969390ec47b27e0d719b317dcc04fa22 Mon Sep 17 00:00:00 2001 From: JammSpread <61063879+JammSpread@users.noreply.github.com> Date: Fri, 11 Jun 2021 18:45:54 -0400 Subject: [PATCH 017/273] fix: type definition errors found related to ServerAdvertisements. (#103) * fix: online/max player count type definition. Fixes the type definition of the online/max players to be an immediate child of the ServerAdvertisement class so that it can be accessed properly on TypeScript. Signed-off-by: JK * feat: implement advertisementFn type definition. Adds the type definition for the 'advertisementFn' server option. Signed-off-by: JK * fix: minor advertisementFn typo in API docs. Fixes a minor typo found in the API docs that misspells 'advertisementFn' as 'advertismentFn'. Signed-off-by: JK * feat: add skipPing to the API docs. Adds the 'skipPing' client option to the API docs. Signed-off-by: JK * feat: add connectTimeout type definition. Adds the 'connectTimeout' client option to the package type definitions. Signed-off-by: JK --- docs/API.md | 5 +++-- index.d.ts | 9 +++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/docs/API.md b/docs/API.md index a38da60..051ea09 100644 --- a/docs/API.md +++ b/docs/API.md @@ -17,7 +17,8 @@ Returns a `Client` instance and connects to the server. | connectTimeout | *optional* | default to **9000ms**. How long to wait in milliseconds while trying to connect to server. | | onMsaCode | *optional* | Callback called when signing in with a microsoft account with device code auth, `data` is an object documented [here](https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-device-code#device-authorization-response) | | profilesFolder | *optional* | Where to store cached authentication tokens. Defaults to .minecraft, or the node_modules folder if not found. | -| autoInitPlayer | optional | default to true, If we should send SetPlayerInitialized to the server after getting play_status spawn. | +| autoInitPlayer | *optional* | default to true, If we should send SetPlayerInitialized to the server after getting play_status spawn. | +| skipPing | *optional* | Whether pinging the server to check its version should be skipped. | ## be.createServer(options) : Server @@ -36,7 +37,7 @@ authenticated unless offline is set to true. | maxPlayers | *optional* | default to **3**. Set this to change the maximum number of players connected. | | kickTimeout | *[Future][1]* | How long to wait before kicking a unresponsive client. | | motd | *optional* | The "message of the day" for the server, the message shown to players in the server list. See usage below. | -| advertismentFn | *optional* | optional. Custom function to call that should return a ServerAdvertisement, used for setting the RakNet server PONG data. Overrides `motd`. | +| advertisementFn | *optional* | optional. Custom function to call that should return a ServerAdvertisement, used for setting the RakNet server PONG data. Overrides `motd`. | ## be.ping({ host, port }) : ServerAdvertisement diff --git a/index.d.ts b/index.d.ts index 34fee07..d59c8fd 100644 --- a/index.d.ts +++ b/index.d.ts @@ -23,6 +23,8 @@ declare module "bedrock-protocol" { viewDistance?: number, // Specifies which game edition to sign in as. Optional, but some servers verify this. authTitle?: title | string, + // How long to wait in milliseconds while trying to connect to the server. + connectTimeout?: number // whether to skip initial ping and immediately connect skipPing?: boolean } @@ -36,6 +38,7 @@ declare module "bedrock-protocol" { // The sub-header for the MOTD shown in the server list. levelName: string } + advertisementFn: () => ServerAdvertisement } enum ClientStatus { @@ -145,10 +148,8 @@ declare module "bedrock-protocol" { name: string protocol: number version: string - players: { - online: number, - max: number - } + playersOnline: number + playersMax: number gamemode: string serverId: string } From 565ae4583dc671e0387a796d7c0aa71e536bc48e Mon Sep 17 00:00:00 2001 From: extremeheat Date: Fri, 18 Jun 2021 14:47:55 -0400 Subject: [PATCH 018/273] Protocol updates to sync with minecraft-data --- data/1.16.201/protocol.json | 10 ++++++++-- data/1.16.210/protocol.json | 10 ++++++++-- data/1.16.220/protocol.json | 10 ++++++++-- data/1.17.0/protocol.json | 19 ++++++++++++------- data/latest/proto.yml | 19 ++++++++++++------- data/latest/types.yaml | 6 +++--- 6 files changed, 51 insertions(+), 23 deletions(-) diff --git a/data/1.16.201/protocol.json b/data/1.16.201/protocol.json index a62a5ed..d82e626 100644 --- a/data/1.16.201/protocol.json +++ b/data/1.16.201/protocol.json @@ -1,13 +1,19 @@ { "types": { "varint32": "varint", - "bool": "native", + "varint64": "native", "zigzag32": "native", "zigzag64": "native", "uuid": "native", "byterot": "native", - "MapInfo": "native", + "bitflags": "native", + "restBuffer": "native", + "encapsulated": "native", "nbt": "native", + "lnbt": "native", + "nbtLoop": "native", + "enum_size_based_on_values_len": "native", + "MapInfo": "native", "BehaviourPackInfos": [ "array", { diff --git a/data/1.16.210/protocol.json b/data/1.16.210/protocol.json index 1010531..96a88ca 100644 --- a/data/1.16.210/protocol.json +++ b/data/1.16.210/protocol.json @@ -1,13 +1,19 @@ { "types": { "varint32": "varint", - "bool": "native", + "varint64": "native", "zigzag32": "native", "zigzag64": "native", "uuid": "native", "byterot": "native", - "MapInfo": "native", + "bitflags": "native", + "restBuffer": "native", + "encapsulated": "native", "nbt": "native", + "lnbt": "native", + "nbtLoop": "native", + "enum_size_based_on_values_len": "native", + "MapInfo": "native", "BehaviourPackInfos": [ "array", { diff --git a/data/1.16.220/protocol.json b/data/1.16.220/protocol.json index b49072a..eaebb08 100644 --- a/data/1.16.220/protocol.json +++ b/data/1.16.220/protocol.json @@ -1,13 +1,19 @@ { "types": { "varint32": "varint", - "bool": "native", + "varint64": "native", "zigzag32": "native", "zigzag64": "native", "uuid": "native", "byterot": "native", - "MapInfo": "native", + "bitflags": "native", + "restBuffer": "native", + "encapsulated": "native", "nbt": "native", + "lnbt": "native", + "nbtLoop": "native", + "enum_size_based_on_values_len": "native", + "MapInfo": "native", "BehaviourPackInfos": [ "array", { diff --git a/data/1.17.0/protocol.json b/data/1.17.0/protocol.json index 941c0e5..68efe51 100644 --- a/data/1.17.0/protocol.json +++ b/data/1.17.0/protocol.json @@ -1,13 +1,18 @@ { "types": { - "varint32": "varint", - "bool": "native", + "varint64": "native", "zigzag32": "native", "zigzag64": "native", "uuid": "native", "byterot": "native", - "MapInfo": "native", + "bitflags": "native", + "restBuffer": "native", + "encapsulated": "native", "nbt": "native", + "lnbt": "native", + "nbtLoop": "native", + "enum_size_based_on_values_len": "native", + "MapInfo": "native", "BehaviourPackInfos": [ "array", { @@ -2259,7 +2264,7 @@ [ { "name": "item_id", - "type": "varint32" + "type": "varint" } ] ], @@ -2340,7 +2345,7 @@ }, { "name": "request_id", - "type": "varint32" + "type": "varint" }, { "anon": true, @@ -2388,7 +2393,7 @@ }, { "name": "item_stack_id", - "type": "varint32" + "type": "varint" }, { "name": "custom_name", @@ -5433,7 +5438,7 @@ "type": [ "mapper", { - "type": "varint32", + "type": "varint", "mappings": { "0": "normal", "1": "operator", diff --git a/data/latest/proto.yml b/data/latest/proto.yml index 585c33c..bb2237d 100644 --- a/data/latest/proto.yml +++ b/data/latest/proto.yml @@ -4,21 +4,26 @@ !version: 1.17.0 # Some ProtoDef aliases -string: ["pstring",{"countType":"varint"}] +string: ["pstring",{"countType":"varint"}] # String / array types ByteArray: ["buffer",{"countType":"varint"}] SignedByteArray: ["buffer",{"countType":"zigzag32"}] LittleString: ["pstring",{"countType":"li32"}] ShortArray: ["buffer",{"countType":"li16"}] -varint32: varint -bool: native +varint64: native # Some primitives zigzag32: native zigzag64: native -uuid: native +uuid: native # Data types & special handling byterot: native +bitflags: native +restBuffer: native +encapsulated: native +nbt: native # NBT +lnbt: native +nbtLoop: native +enum_size_based_on_values_len: native # Packet-specific custom logic MapInfo: native -nbt: native -# load the packet map file +# load the packet map file (auto-generated) !import: packet_map.yml !StartDocs: Packets @@ -1088,7 +1093,7 @@ packet_adventure_settings: flags: AdventureFlags # CommandPermissionLevel is a permission level that specifies the kind of commands that the player is # allowed to use. - command_permission: varint32 => + command_permission: varint => 0: normal 1: operator 2: host diff --git a/data/latest/types.yaml b/data/latest/types.yaml index b18a577..b474e56 100644 --- a/data/latest/types.yaml +++ b/data/latest/types.yaml @@ -892,7 +892,7 @@ ItemStackRequest: if craft_creative: # The stack ID of the creative item that is being created. This is one of the # creative item stack IDs sent in the CreativeContent packet. - item_id: varint32 + item_id: varint if optional: # For the cartography table, if a certain MULTI recipe is being called, this points to the network ID that was assigned. recipe_network_id: varint @@ -918,7 +918,7 @@ ItemStackResponses: []varint 1: error # RequestID is the unique ID of the request that this response is in reaction to. If rejected, the client # will undo the actions from the request with this ID. - request_id: varint32 + request_id: varint _: status ? if ok: # ContainerInfo holds information on the containers that had their contents changed as a result of the @@ -939,7 +939,7 @@ ItemStackResponses: []varint # sent to the client. count: u8 # StackNetworkID is the network ID of the new stack at a specific slot. - item_stack_id: varint32 + item_stack_id: varint # CustomName is the custom name of the item stack. It is used in relation to text filtering. custom_name: string # DurabilityCorrection is the current durability of the item stack. This durability will be shown From 3f5c4ad12ebba6ef46f274b4a4aece47350cef63 Mon Sep 17 00:00:00 2001 From: extremeheat Date: Fri, 18 Jun 2021 14:49:06 -0400 Subject: [PATCH 019/273] Relay proxy fixes, handle disconnect --- README.md | 4 +++- src/relay.js | 36 +++++++++++++----------------------- src/server.js | 2 +- src/serverPlayer.js | 4 +++- 4 files changed, 20 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index 1218f51..89fab28 100644 --- a/README.md +++ b/README.md @@ -38,13 +38,15 @@ Want to contribute on something important for PrismarineJS ? go to https://githu ### Client example +Example to connect to a server in offline mode, and relay chat messages back: + ```js const bedrock = require('bedrock-protocol') const client = bedrock.createClient({ host: 'localhost', // optional port: 19132, // optional, default 19132 username: 'Notch', // the username you want to join as, optional if online mode - offline: true // optional, default false. if true, do not login with Xbox Live. You will not be asked to sign-in if set to true. + offline: true, // optional, default false. if true, do not login with Xbox Live. You will not be asked to sign-in if set to true. // Optional for some servers which verify the title ID: // authTitle: bedrock.title.MinecraftNintendoSwitch }) diff --git a/src/relay.js b/src/relay.js index 0a382b4..de09353 100644 --- a/src/relay.js +++ b/src/relay.js @@ -37,13 +37,15 @@ class RelayPlayer extends Player { // Called when we get a packet from backend server (Backend -> PROXY -> Client) readUpstream (packet) { if (!this.startRelaying) { + this.upInLog('Client not ready, queueing packet until join') this.downQ.push(packet) return } - this.upInLog('->', packet) const des = this.server.deserializer.parsePacketBuffer(packet) const name = des.data.name const params = des.data.params + this.upInLog('->', name, params) + if (name === 'play_status' && params.status === 'login_success') return // We already sent this, this needs to be sent ASAP or client will disconnect if (debugging) { // some packet encode/decode testing stuff @@ -51,31 +53,12 @@ class RelayPlayer extends Player { } this.emit('clientbound', des.data) - - // If we're sending a chunk, but player isn't yet initialized, wait until it is. - // This is wrong and should not be an issue to send chunks before the client - // is in the world; need to investigate further, but for now it's fine. - if (this.status !== 3) { - if (name === 'level_chunk') { - this.chunkSendCache.push([name, params]) - return - } - if (name === 'respawn') this.respawnPacket.push([name, params]) - } else if (this.status === 3 && this.chunkSendCache.length) { - for (const chunk of this.chunkSendCache) { - this.queue(...chunk) - } - for (const rp of this.respawnPacket) { - this.queue(...rp) - } - this.chunkSendCache = [] - this.respawnPacket = [] - } this.queue(name, params) } // Send queued packets to the connected client flushDownQueue () { + this.downOutLog('Flushing downstream queue') for (const packet of this.downQ) { const des = this.server.deserializer.parsePacketBuffer(packet) this.write(des.data.name, des.data.params) @@ -85,10 +68,11 @@ class RelayPlayer extends Player { // Send queued packets to the backend upstream server from the client flushUpQueue () { + this.upOutLog('Flushing upstream queue') for (const e of this.upQ) { // Send the queue const des = this.server.deserializer.parsePacketBuffer(e) if (des.data.name === 'client_cache_status') { // Currently broken, force off the chunk cache - this.upstream.write('client_cache_status', { enabled: false }) + // this.upstream.write('client_cache_status', { enabled: false }) } else { this.upstream.write(des.data.name, des.data.params) } @@ -127,7 +111,7 @@ class RelayPlayer extends Player { break case 'set_local_player_as_initialized': this.status = 3 - break + // falls through default: // Emit the packet as-is back to the upstream server this.downInLog('Relaying', des.data) @@ -137,6 +121,11 @@ class RelayPlayer extends Player { super.readPacket(packet) } } + + close (reason) { + this.upstream.close(reason) + super.close(reason) + } } class Relay extends Server { @@ -196,6 +185,7 @@ class Relay extends Server { this.conLog('dropping connection as single client relay', conn) conn.close() } else { + this.clientCount++ const player = new this.RelayPlayer(this, conn) this.conLog('New connection from', conn.address) this.clients[conn.address] = player diff --git a/src/server.js b/src/server.js index b10abd8..f8d3c87 100644 --- a/src/server.js +++ b/src/server.js @@ -46,7 +46,7 @@ class Server extends EventEmitter { onCloseConnection = (inetAddr, reason) => { this.conLog('close connection', inetAddr?.address, reason) delete this.clients[inetAddr]?.connection // Prevent close loop - this.clients[inetAddr]?.close() + this.clients[inetAddr?.address ?? inetAddr]?.close() delete this.clients[inetAddr] this.clientCount-- } diff --git a/src/serverPlayer.js b/src/serverPlayer.js index 7e638fe..c4d1ada 100644 --- a/src/serverPlayer.js +++ b/src/serverPlayer.js @@ -2,6 +2,7 @@ const { ClientStatus, Connection } = require('./connection') const fs = require('fs') const Options = require('./options') const debug = require('debug')('minecraft-protocol') +// const { serialize } = require('./datatypes/util') const { KeyExchange } = require('./handshake/keyExchange') const Login = require('./handshake/login') @@ -110,7 +111,7 @@ class Player extends Connection { close (reason) { if (this.status !== ClientStatus.Disconnected) { this.emit('close') // Emit close once - if (!reason) console.trace('Client closed connection', this.connection?.address) + if (!reason) this.inLog('Client closed connection', this.connection?.address) } this.q = [] this.q2 = [] @@ -130,6 +131,7 @@ class Player extends Connection { return } + // this.inLog(des.data.name, serialize(des.data.params).slice(0, 200)) switch (des.data.name) { case 'login': this.onLogin(des) From b546cda89975f0455885d22be614109ac8e66dff Mon Sep 17 00:00:00 2001 From: extremeheat Date: Fri, 18 Jun 2021 15:23:12 -0400 Subject: [PATCH 020/273] Logging improvements --- src/client.js | 6 ++++-- src/client/authFlow.js | 1 - src/connection.js | 10 ++++------ src/handshake/keyExchange.js | 1 - src/relay.js | 18 ++++++++++++++---- src/server.js | 3 --- src/serverPlayer.js | 31 +++++++++++++++---------------- 7 files changed, 37 insertions(+), 33 deletions(-) diff --git a/src/client.js b/src/client.js index 26d8662..3bf263e 100644 --- a/src/client.js +++ b/src/client.js @@ -35,8 +35,10 @@ class Client extends Connection { this.startGameData = {} this.clientRuntimeId = null - this.inLog = (...args) => debug('C ->', ...args) - this.outLog = (...args) => debug('C <-', ...args) + if (process.env.DEBUG.includes('minecraft-protocol')) { + this.inLog = (...args) => debug('C ->', ...args) + this.outLog = (...args) => debug('C <-', ...args) + } } connect () { diff --git a/src/client/authFlow.js b/src/client/authFlow.js index 1f67aa2..16c6c68 100644 --- a/src/client/authFlow.js +++ b/src/client/authFlow.js @@ -145,7 +145,6 @@ class MsAuthFlow { const token = await this.mca.getAccessToken(publicKey, xsts) // If we want to auth with a title ID, make sure there's a TitleID in the response const body = JSON.parse(Buffer.from(token.chain[1].split('.')[1], 'base64').toString()) - console.log(this.options.authTitle) if (!body.extraData.titleId && this.options.authTitle) { throw Error('missing titleId in response') } diff --git a/src/connection.js b/src/connection.js index bf08245..ce15507 100644 --- a/src/connection.js +++ b/src/connection.js @@ -22,6 +22,7 @@ class Connection extends EventEmitter { set status (val) { debug('* new status', val) + this.emit('status', val) this.#status = val } @@ -35,7 +36,7 @@ class Connection extends EventEmitter { startEncryption (iv) { this.encryptionEnabled = true - this.inLog('Started encryption', this.sharedSecret, iv) + this.inLog?.('Started encryption', this.sharedSecret, iv) this.decrypt = cipher.createDecryptor(this, iv) this.encrypt = cipher.createEncryptor(this, iv) } @@ -57,7 +58,7 @@ class Connection extends EventEmitter { } write (name, params) { - this.outLog('sending', name, params) + this.outLog?.(name, params) if (name === 'start_game') this.updateItemPalette(params.itemstates) const batch = new Framer() const packet = this.serializer.createPacketBuffer({ name, params }) @@ -71,7 +72,7 @@ class Connection extends EventEmitter { } queue (name, params) { - this.outLog('Q <- ', name, params) + this.outLog?.('Q <- ', name, params) if (name === 'start_game') this.updateItemPalette(params.itemstates) const packet = this.serializer.createPacketBuffer({ name, params }) if (name === 'level_chunk') { @@ -88,7 +89,6 @@ class Connection extends EventEmitter { this.loop = setInterval(() => { if (this.sendQ.length) { const batch = new Framer() - this.outLog('<- Batch', this.sendIds) batch.addEncodedPackets(this.sendQ) this.sendQ = [] this.sendIds = [] @@ -140,7 +140,6 @@ class Connection extends EventEmitter { // These are callbacks called from encryption.js onEncryptedPacket = (buf) => { - this.outLog('Enc buf', buf) const packet = Buffer.concat([Buffer.from([0xfe]), buf]) // add header this.sendMCPE(packet) @@ -160,7 +159,6 @@ class Connection extends EventEmitter { this.decrypt(buffer.slice(1)) } else { Framer.decode(buffer, packets => { - this.inLog('Reading ', packets.length, 'packets') for (const packet of packets) { this.readPacket(packet) } diff --git a/src/handshake/keyExchange.js b/src/handshake/keyExchange.js index e4dfe54..a732dc8 100644 --- a/src/handshake/keyExchange.js +++ b/src/handshake/keyExchange.js @@ -13,7 +13,6 @@ function KeyExchange (client, server, options) { client.ecdhKeyPair = crypto.generateKeyPairSync('ec', { namedCurve: curve }) client.publicKeyDER = client.ecdhKeyPair.publicKey.export(der) client.privateKeyPEM = client.ecdhKeyPair.privateKey.export(pem) - console.log(client.publicKeyPEM) client.clientX509 = client.publicKeyDER.toString('base64') function startClientboundEncryption (publicKey) { diff --git a/src/relay.js b/src/relay.js index de09353..b78662f 100644 --- a/src/relay.js +++ b/src/relay.js @@ -46,7 +46,7 @@ class RelayPlayer extends Player { const params = des.data.params this.upInLog('->', name, params) - if (name === 'play_status' && params.status === 'login_success') return // We already sent this, this needs to be sent ASAP or client will disconnect + if (name === 'play_status' && params.status === 'login_success') return // Already sent this, this needs to be sent ASAP or client will disconnect if (debugging) { // some packet encode/decode testing stuff this.server.deserializer.verify(des, this.server.serializer) @@ -71,8 +71,8 @@ class RelayPlayer extends Player { this.upOutLog('Flushing upstream queue') for (const e of this.upQ) { // Send the queue const des = this.server.deserializer.parsePacketBuffer(e) - if (des.data.name === 'client_cache_status') { // Currently broken, force off the chunk cache - // this.upstream.write('client_cache_status', { enabled: false }) + if (des.data.name === 'client_cache_status') { + // Currently not working, force off the chunk cache } else { this.upstream.write(des.data.name, des.data.params) } @@ -141,6 +141,12 @@ class Relay extends Server { this.conLog = debug } + // Called after a new player joins our proxy. We first create a new Client to connect to + // the remote server. Then we listen to soem events and proxy them over. The queue and + // flushing logic is more of an accessory to make sure the server or client recieves + // a packet, no matter what state it's in. For example, if the client wants to send a + // packet to the server but it's not connected, it will add to the queue and send as soon + // as a connection with the server is established. openUpstreamConnection (ds, clientAddr) { const client = new Client({ authTitle: this.options.authTitle, @@ -157,7 +163,7 @@ class Relay extends Server { this.conLog('Connecting to', this.options.destination.host, this.options.destination.port) client.outLog = ds.upOutLog client.inLog = ds.upInLog - client.once('join', () => { // Intercept once handshaking done + client.once('join', () => { // Tell the server to disable chunk cache for this connection as a client. // Wait a bit for the server to ack and process, the continue with proxying // otherwise the player can get stuck in an empty world. @@ -172,6 +178,7 @@ class Relay extends Server { this.upstreams.set(clientAddr.hash, client) } + // Close a connection to a remote backend server. closeUpstreamConnection (clientAddr) { const up = this.upstreams.get(clientAddr.hash) if (!up) throw Error(`unable to close non-open connection ${clientAddr.hash}`) @@ -180,6 +187,8 @@ class Relay extends Server { this.conLog('closed upstream connection', clientAddr) } + // Called when a new player connects to our proxy server. Once the player has authenticted, + // we can open an upstream connection to the backend server. onOpenConnection = (conn) => { if (this.forceSingle && this.clientCount > 0) { this.conLog('dropping connection as single client relay', conn) @@ -196,6 +205,7 @@ class Relay extends Server { } } + // When our server is closed, make sure to kick all of the connected clients and run emitters. close (...a) { for (const [, v] of this.upstreams) { v.close(...a) diff --git a/src/server.js b/src/server.js index f8d3c87..eb40a4e 100644 --- a/src/server.js +++ b/src/server.js @@ -19,8 +19,6 @@ class Server extends EventEmitter { /** @type {Object} */ this.clients = {} this.clientCount = 0 - this.inLog = (...args) => debug('S ->', ...args) - this.outLog = (...args) => debug('S <-', ...args) this.conLog = debug } @@ -52,7 +50,6 @@ class Server extends EventEmitter { } onEncapsulated = (buffer, address) => { - // this.inLog('encapsulated', address, buffer) const client = this.clients[address] if (!client) { throw new Error(`packet from unknown inet addr: ${address}`) diff --git a/src/serverPlayer.js b/src/serverPlayer.js index c4d1ada..954e86f 100644 --- a/src/serverPlayer.js +++ b/src/serverPlayer.js @@ -1,12 +1,11 @@ const { ClientStatus, Connection } = require('./connection') -const fs = require('fs') const Options = require('./options') -const debug = require('debug')('minecraft-protocol') -// const { serialize } = require('./datatypes/util') - +const { serialize } = require('./datatypes/util') const { KeyExchange } = require('./handshake/keyExchange') const Login = require('./handshake/login') const LoginVerify = require('./handshake/loginVerify') +const fs = require('fs') +const debug = require('debug')('minecraft-protocol') class Player extends Connection { constructor (server, connection) { @@ -23,8 +22,11 @@ class Player extends Connection { this.startQueue() this.status = ClientStatus.Authenticating - this.inLog = (...args) => debug('S ->', ...args) - this.outLog = (...args) => debug('S <-', ...args) + + if (process.env.DEBUG.includes('minecraft-protocol')) { + this.inLog = (...args) => debug('S ->', ...args) + this.outLog = (...args) => debug('S <-', ...args) + } } getUserData () { @@ -33,7 +35,6 @@ class Player extends Connection { onLogin (packet) { const body = packet.data - // debug('Login body', body) this.emit('loggingIn', body) const clientVer = body.protocol_version @@ -60,7 +61,6 @@ class Player extends Connection { this.disconnect('Server authentication error') return } - debug('Verified user pub key', key, userData) this.emit('server.client_handshake', { key }) // internal so we start encryption @@ -101,7 +101,6 @@ class Player extends Connection { // After sending Server to Client Handshake, this handles the client's // Client to Server handshake response. This indicates successful encryption onHandshake () { - // this.outLog('Sending login success!', this.status) // https://wiki.vg/Bedrock_Protocol#Play_Status this.write('play_status', { status: 'login_success' }) this.status = ClientStatus.Initializing @@ -111,7 +110,7 @@ class Player extends Connection { close (reason) { if (this.status !== ClientStatus.Disconnected) { this.emit('close') // Emit close once - if (!reason) this.inLog('Client closed connection', this.connection?.address) + if (!reason) this.inLog?.('Client closed connection', this.connection?.address) } this.q = [] this.q2 = [] @@ -126,12 +125,12 @@ class Player extends Connection { var des = this.server.deserializer.parsePacketBuffer(packet) // eslint-disable-line } catch (e) { this.disconnect('Server error') - console.warn('Packet parsing failed! Writing dump to ./packetdump.bin') - fs.writeFile('packetdump.bin', packet) + fs.writeFile(`packetdump_${this.connection.address}_${Date.now()}.bin`, packet) return } - // this.inLog(des.data.name, serialize(des.data.params).slice(0, 200)) + this.inLog?.(des.data.name, serialize(des.data.params).slice(0, 200)) + switch (des.data.name) { case 'login': this.onLogin(des) @@ -142,13 +141,13 @@ class Player extends Connection { break case 'set_local_player_as_initialized': this.status = ClientStatus.Initialized - this.inLog('Server client spawned') + this.inLog?.('Server client spawned') // Emit the 'spawn' event this.emit('spawn') break default: if (this.status === ClientStatus.Disconnected || this.status === ClientStatus.Authenticating) { - this.inLog('ignoring', des.data.name) + this.inLog?.('ignoring', des.data.name) return } } @@ -156,4 +155,4 @@ class Player extends Connection { } } -module.exports = { Player, ClientStatus } +module.exports = { Player } From 1cdb0e4c554d45c152f362858f79e07d27c672ed Mon Sep 17 00:00:00 2001 From: extremeheat Date: Sun, 20 Jun 2021 17:12:22 -0400 Subject: [PATCH 021/273] Update protodef version --- package.json | 2 +- src/client.js | 11 ++++++----- src/datatypes/util.js | 4 +++- src/serverPlayer.js | 4 ++-- src/transforms/framer.js | 2 +- src/transforms/serializer.js | 6 +++--- tools/compileProtocol.js | 2 +- 7 files changed, 17 insertions(+), 14 deletions(-) diff --git a/package.json b/package.json index f01299f..50e85f4 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ "minecraft-folder-path": "^1.1.0", "node-fetch": "^2.6.1", "prismarine-nbt": "^1.5.0", - "protodef-compiler-fix": "latest", + "protodef": "^1.14.0", "smart-buffer": "^4.1.0", "uuid-1345": "^1.0.2" }, diff --git a/src/client.js b/src/client.js index 3bf263e..068dce5 100644 --- a/src/client.js +++ b/src/client.js @@ -1,7 +1,7 @@ const { ClientStatus, Connection } = require('./connection') const { createDeserializer, createSerializer } = require('./transforms/serializer') const { RakClient } = require('./rak') -const { serialize } = require('./datatypes/util') +const { serialize, isDebug } = require('./datatypes/util') const debug = require('debug')('minecraft-protocol') const Options = require('./options') const auth = require('./client/auth') @@ -35,7 +35,7 @@ class Client extends Connection { this.startGameData = {} this.clientRuntimeId = null - if (process.env.DEBUG.includes('minecraft-protocol')) { + if (isDebug) { this.inLog = (...args) => debug('C ->', ...args) this.outLog = (...args) => debug('C <-', ...args) } @@ -156,7 +156,7 @@ class Client extends Connection { readPacket (packet) { const des = this.deserializer.parsePacketBuffer(packet) const pakData = { name: des.data.name, params: des.data.params } - this.inLog('-> C', pakData.name, this.options.loggging ? serialize(pakData.params) : '') + this.inLog?.('-> C', pakData.name, this.options.loggging ? serialize(pakData.params) : '') this.emit('packet', des) if (debugging) { @@ -186,7 +186,7 @@ class Client extends Connection { break case 'play_status': if (this.status === ClientStatus.Authenticating) { - this.inLog('Server wants to skip encryption') + this.inLog?.('Server wants to skip encryption') this.emit('join') this.status = ClientStatus.Initializing } @@ -194,7 +194,8 @@ class Client extends Connection { break default: if (this.status !== ClientStatus.Initializing && this.status !== ClientStatus.Initialized) { - this.inLog(`Can't accept ${des.data.name}, client not yet authenticated : ${this.status}`) + // TODO: standardjs bug happens here with ?.(`something ${des.data.name}`) + if (this.inLog) this.inLog(`Can't accept ${des.data.name}, client not yet authenticated : ${this.status}`) return } } diff --git a/src/datatypes/util.js b/src/datatypes/util.js index b080577..4b29d57 100644 --- a/src/datatypes/util.js +++ b/src/datatypes/util.js @@ -43,4 +43,6 @@ function nextUUID () { return uuidFrom(Date.now().toString()) } -module.exports = { getFiles, sleep, waitFor, serialize, uuidFrom, nextUUID } +const isDebug = process.env.DEBUG?.includes('minecraft-protocol') + +module.exports = { getFiles, sleep, waitFor, serialize, uuidFrom, nextUUID, isDebug } diff --git a/src/serverPlayer.js b/src/serverPlayer.js index 954e86f..52693b8 100644 --- a/src/serverPlayer.js +++ b/src/serverPlayer.js @@ -1,6 +1,6 @@ const { ClientStatus, Connection } = require('./connection') const Options = require('./options') -const { serialize } = require('./datatypes/util') +const { serialize, isDebug } = require('./datatypes/util') const { KeyExchange } = require('./handshake/keyExchange') const Login = require('./handshake/login') const LoginVerify = require('./handshake/loginVerify') @@ -23,7 +23,7 @@ class Player extends Connection { this.startQueue() this.status = ClientStatus.Authenticating - if (process.env.DEBUG.includes('minecraft-protocol')) { + if (isDebug) { this.inLog = (...args) => debug('S ->', ...args) this.outLog = (...args) => debug('S <-', ...args) } diff --git a/src/transforms/framer.js b/src/transforms/framer.js index aa1b496..77f41e9 100644 --- a/src/transforms/framer.js +++ b/src/transforms/framer.js @@ -1,4 +1,4 @@ -const [readVarInt, writeVarInt, sizeOfVarInt] = require('protodef-compiler-fix').types.varint +const [readVarInt, writeVarInt, sizeOfVarInt] = require('protodef').types.varint const zlib = require('zlib') // Concatenates packets into one batch packet, and adds length prefixs. diff --git a/src/transforms/serializer.js b/src/transforms/serializer.js index 2900cf3..4a6102f 100644 --- a/src/transforms/serializer.js +++ b/src/transforms/serializer.js @@ -1,5 +1,5 @@ -const { ProtoDefCompiler, CompiledProtodef } = require('protodef-compiler-fix').Compiler -const { FullPacketParser, Serializer } = require('protodef-compiler-fix') +const { ProtoDefCompiler, CompiledProtodef } = require('protodef').Compiler +const { FullPacketParser, Serializer } = require('protodef') const { join } = require('path') class Parser extends FullPacketParser { @@ -43,7 +43,7 @@ function getProtocol (version) { compiler.addTypes(require(join(__dirname, '../datatypes/compiler-minecraft'))) compiler.addTypes(require('prismarine-nbt/compiler-zigzag')) - global.PartialReadError = require('protodef-compiler-fix/src/utils').PartialReadError + global.PartialReadError = require('protodef/src/utils').PartialReadError const compile = (compiler, file) => require(file)(compiler.native) return new CompiledProtodef( diff --git a/tools/compileProtocol.js b/tools/compileProtocol.js index c89cb28..bed7b2c 100644 --- a/tools/compileProtocol.js +++ b/tools/compileProtocol.js @@ -6,7 +6,7 @@ * */ const fs = require('fs') -const { ProtoDefCompiler } = require('protodef-compiler-fix').Compiler +const { ProtoDefCompiler } = require('protodef').Compiler const { Versions } = require('../src/options') const { join } = require('path') From 987bf43987b021dcee216f31e3ee5709f4800b09 Mon Sep 17 00:00:00 2001 From: extremeheat Date: Wed, 14 Jul 2021 17:30:10 -0400 Subject: [PATCH 022/273] 1.17.10 protocol support (#109) * 1.17.10 support * add protocol.json * add extra particle IDs --- README.md | 4 +- data/1.17.10/protocol.json | 9081 +++++++++++++++++++++++++++++++ data/latest/proto.yml | 134 +- data/latest/types.yaml | 2 + examples/serverReadmeExample.js | 2 +- src/options.js | 3 +- 6 files changed, 9217 insertions(+), 9 deletions(-) create mode 100644 data/1.17.10/protocol.json diff --git a/README.md b/README.md index 89fab28..765491a 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ This is a work in progress. You can track the progress in https://github.com/Pri ## Features - - Supports Minecraft Bedrock version 1.16.201, 1.16.210, 1.16.220, 1.17.0 + - Supports Minecraft Bedrock version 1.16.201, 1.16.210, 1.16.220, 1.17.0, 1.17.10 - Parse and serialize packets as JavaScript objects - Automatically respond to keep-alive packets - [Proxy and mitm connections](docs/API.md) @@ -69,7 +69,7 @@ const bedrock = require('bedrock-protocol') const server = new bedrock.createServer({ host: '0.0.0.0', // optional. host to bind as. port: 19132, // optional - version: '1.16.220', // optional. The server version, latest if not specified. + version: '1.17.10', // optional. The server version, latest if not specified. }) server.on('connect', client => { diff --git a/data/1.17.10/protocol.json b/data/1.17.10/protocol.json new file mode 100644 index 0000000..1fcbc86 --- /dev/null +++ b/data/1.17.10/protocol.json @@ -0,0 +1,9081 @@ +{ + "types": { + "varint64": "native", + "zigzag32": "native", + "zigzag64": "native", + "uuid": "native", + "byterot": "native", + "bitflags": "native", + "restBuffer": "native", + "encapsulated": "native", + "nbt": "native", + "lnbt": "native", + "nbtLoop": "native", + "enum_size_based_on_values_len": "native", + "MapInfo": "native", + "BehaviourPackInfos": [ + "array", + { + "countType": "li16", + "type": [ + "container", + [ + { + "name": "uuid", + "type": "string" + }, + { + "name": "version", + "type": "string" + }, + { + "name": "size", + "type": "lu64" + }, + { + "name": "content_key", + "type": "string" + }, + { + "name": "sub_pack_name", + "type": "string" + }, + { + "name": "content_identity", + "type": "string" + }, + { + "name": "has_scripts", + "type": "bool" + } + ] + ] + } + ], + "TexturePackInfos": [ + "array", + { + "countType": "li16", + "type": [ + "container", + [ + { + "name": "uuid", + "type": "string" + }, + { + "name": "version", + "type": "string" + }, + { + "name": "size", + "type": "lu64" + }, + { + "name": "content_key", + "type": "string" + }, + { + "name": "sub_pack_name", + "type": "string" + }, + { + "name": "content_identity", + "type": "string" + }, + { + "name": "has_scripts", + "type": "bool" + }, + { + "name": "rtx_enabled", + "type": "bool" + } + ] + ] + } + ], + "ResourcePackIdVersions": [ + "array", + { + "countType": "varint", + "type": [ + "container", + [ + { + "name": "uuid", + "type": "string" + }, + { + "name": "version", + "type": "string" + }, + { + "name": "name", + "type": "string" + } + ] + ] + } + ], + "ResourcePackIds": [ + "array", + { + "countType": "li16", + "type": "string" + } + ], + "Experiment": [ + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "enabled", + "type": "bool" + } + ] + ], + "Experiments": [ + "array", + { + "countType": "li32", + "type": "Experiment" + } + ], + "GameMode": [ + "mapper", + { + "type": "zigzag32", + "mappings": { + "0": "survival", + "1": "creative", + "2": "adventure", + "3": "survival_spectator", + "4": "creative_spectator", + "5": "fallback" + } + } + ], + "GameRule": [ + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "editable", + "type": "bool" + }, + { + "name": "type", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "1": "bool", + "2": "int", + "3": "float" + } + } + ] + }, + { + "name": "value", + "type": [ + "switch", + { + "compareTo": "type", + "fields": { + "bool": "bool", + "int": "zigzag32", + "float": "lf32" + }, + "default": "void" + } + ] + } + ] + ], + "GameRules": [ + "array", + { + "countType": "varint", + "type": "GameRule" + } + ], + "Blob": [ + "container", + [ + { + "name": "hash", + "type": "lu64" + }, + { + "name": "payload", + "type": "ByteArray" + } + ] + ], + "BlockProperties": [ + "array", + { + "countType": "varint", + "type": [ + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "state", + "type": "nbt" + } + ] + ] + } + ], + "Itemstates": [ + "array", + { + "countType": "varint", + "type": [ + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "runtime_id", + "type": "li16" + }, + { + "name": "component_based", + "type": "bool" + } + ] + ] + } + ], + "ItemExtraDataWithBlockingTick": [ + "container", + [ + { + "name": "has_nbt", + "type": [ + "mapper", + { + "type": "lu16", + "mappings": { + "0": "false", + "65535": "true" + } + } + ] + }, + { + "name": "nbt", + "type": [ + "switch", + { + "compareTo": "has_nbt", + "fields": { + "true": [ + "container", + [ + { + "name": "version", + "type": "u8" + }, + { + "name": "nbt", + "type": "lnbt" + } + ] + ] + }, + "default": "void" + } + ] + }, + { + "name": "can_place_on", + "type": [ + "array", + { + "countType": "li32", + "type": "ShortArray" + } + ] + }, + { + "name": "can_destroy", + "type": [ + "array", + { + "countType": "li32", + "type": "ShortArray" + } + ] + }, + { + "name": "blocking_tick", + "type": "li64" + } + ] + ], + "ItemExtraDataWithoutBlockingTick": [ + "container", + [ + { + "name": "has_nbt", + "type": [ + "mapper", + { + "type": "lu16", + "mappings": { + "0": "false", + "65535": "true" + } + } + ] + }, + { + "name": "nbt", + "type": [ + "switch", + { + "compareTo": "has_nbt", + "fields": { + "true": [ + "container", + [ + { + "name": "version", + "type": "u8" + }, + { + "name": "nbt", + "type": "lnbt" + } + ] + ] + }, + "default": "void" + } + ] + }, + { + "name": "can_place_on", + "type": [ + "array", + { + "countType": "li32", + "type": "ShortArray" + } + ] + }, + { + "name": "can_destroy", + "type": [ + "array", + { + "countType": "li32", + "type": "ShortArray" + } + ] + } + ] + ], + "ItemLegacy": [ + "container", + [ + { + "name": "network_id", + "type": "zigzag32" + }, + { + "anon": true, + "type": [ + "switch", + { + "compareTo": "network_id", + "fields": { + "0": "void" + }, + "default": [ + "container", + [ + { + "name": "count", + "type": "lu16" + }, + { + "name": "metadata", + "type": "varint" + }, + { + "name": "block_runtime_id", + "type": "zigzag32" + }, + { + "name": "extra", + "type": [ + "switch", + { + "compareTo": "network_id", + "fields": { + "/ShieldItemID": [ + "encapsulated", + { + "lengthType": "varint", + "type": "ItemExtraDataWithBlockingTick" + } + ] + }, + "default": [ + "encapsulated", + { + "lengthType": "varint", + "type": "ItemExtraDataWithoutBlockingTick" + } + ] + } + ] + } + ] + ] + } + ] + } + ] + ], + "Item": [ + "container", + [ + { + "name": "network_id", + "type": "zigzag32" + }, + { + "anon": true, + "type": [ + "switch", + { + "compareTo": "network_id", + "fields": { + "0": "void" + }, + "default": [ + "container", + [ + { + "name": "count", + "type": "lu16" + }, + { + "name": "metadata", + "type": "varint" + }, + { + "name": "has_stack_id", + "type": "u8" + }, + { + "name": "stack_id", + "type": [ + "switch", + { + "compareTo": "has_stack_id", + "fields": { + "0": "void" + }, + "default": "zigzag32" + } + ] + }, + { + "name": "block_runtime_id", + "type": "zigzag32" + }, + { + "name": "extra", + "type": [ + "switch", + { + "compareTo": "network_id", + "fields": { + "/ShieldItemID": [ + "encapsulated", + { + "lengthType": "varint", + "type": "ItemExtraDataWithBlockingTick" + } + ] + }, + "default": [ + "encapsulated", + { + "lengthType": "varint", + "type": "ItemExtraDataWithoutBlockingTick" + } + ] + } + ] + } + ] + ] + } + ] + } + ] + ], + "vec3i": [ + "container", + [ + { + "name": "x", + "type": "zigzag32" + }, + { + "name": "y", + "type": "zigzag32" + }, + { + "name": "z", + "type": "zigzag32" + } + ] + ], + "vec3u": [ + "container", + [ + { + "name": "x", + "type": "varint" + }, + { + "name": "y", + "type": "varint" + }, + { + "name": "z", + "type": "varint" + } + ] + ], + "vec3f": [ + "container", + [ + { + "name": "x", + "type": "lf32" + }, + { + "name": "y", + "type": "lf32" + }, + { + "name": "z", + "type": "lf32" + } + ] + ], + "vec2f": [ + "container", + [ + { + "name": "x", + "type": "lf32" + }, + { + "name": "z", + "type": "lf32" + } + ] + ], + "MetadataDictionary": [ + "array", + { + "countType": "varint", + "type": [ + "container", + [ + { + "name": "key", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "flags", + "1": "health", + "2": "variant", + "3": "color", + "4": "nametag", + "5": "owner_eid", + "6": "target_eid", + "7": "air", + "8": "potion_color", + "9": "potion_ambient", + "10": "jump_duration", + "11": "hurt_time", + "12": "hurt_direction", + "13": "paddle_time_left", + "14": "paddle_time_right", + "15": "experience_value", + "16": "minecart_display_block", + "17": "minecart_display_offset", + "18": "minecart_has_display", + "20": "old_swell", + "21": "swell_dir", + "22": "charge_amount", + "23": "enderman_held_runtime_id", + "24": "entity_age", + "26": "player_flags", + "27": "player_index", + "28": "player_bed_position", + "29": "fireball_power_x", + "30": "fireball_power_y", + "31": "fireball_power_z", + "32": "aux_power", + "33": "fish_x", + "34": "fish_z", + "35": "fish_angle", + "36": "potion_aux_value", + "37": "lead_holder_eid", + "38": "scale", + "39": "interactive_tag", + "40": "npc_skin_id", + "41": "url_tag", + "42": "max_airdata_max_air", + "43": "mark_variant", + "44": "container_type", + "45": "container_base_size", + "46": "container_extra_slots_per_strength", + "47": "block_target", + "48": "wither_invulnerable_ticks", + "49": "wither_target_1", + "50": "wither_target_2", + "51": "wither_target_3", + "52": "aerial_attack", + "53": "boundingbox_width", + "54": "boundingbox_height", + "55": "fuse_length", + "56": "rider_seat_position", + "57": "rider_rotation_locked", + "58": "rider_max_rotation", + "59": "rider_min_rotation", + "60": "rider_rotation_offset", + "61": "area_effect_cloud_radius", + "62": "area_effect_cloud_waiting", + "63": "area_effect_cloud_particle_id", + "64": "shulker_peek_id", + "65": "shulker_attach_face", + "66": "shulker_attached", + "67": "shulker_attach_pos", + "68": "trading_player_eid", + "69": "trading_career", + "70": "has_command_block", + "71": "command_block_command", + "72": "command_block_last_output", + "73": "command_block_track_output", + "74": "controlling_rider_seat_number", + "75": "strength", + "76": "max_strength", + "77": "spell_casting_color", + "78": "limited_life", + "79": "armor_stand_pose_index", + "80": "ender_crystal_time_offset", + "81": "always_show_nametag", + "82": "color_2", + "83": "name_author", + "84": "score_tag", + "85": "balloon_attached_entity", + "86": "pufferfish_size", + "87": "bubble_time", + "88": "agent", + "89": "sitting_amount", + "90": "sitting_amount_previous", + "91": "eating_counter", + "92": "flags_extended", + "93": "laying_amount", + "94": "laying_amount_previous", + "95": "duration", + "96": "spawn_time", + "97": "change_rate", + "98": "change_on_pickup", + "99": "pickup_count", + "100": "interact_text", + "101": "trade_tier", + "102": "max_trade_tier", + "103": "trade_experience", + "104": "skin_id", + "105": "spawning_frames", + "106": "command_block_tick_delay", + "107": "command_block_execute_on_first_tick", + "108": "ambient_sound_interval", + "109": "ambient_sound_interval_range", + "110": "ambient_sound_event_name", + "111": "fall_damage_multiplier", + "112": "name_raw_text", + "113": "can_ride_target", + "114": "low_tier_cured_discount", + "115": "high_tier_cured_discount", + "116": "nearby_cured_discount", + "117": "nearby_cured_discount_timestamp", + "118": "hitbox", + "119": "is_buoyant", + "120": "base_runtime_id", + "121": "freezing_effect_strength", + "122": "buoyancy_data", + "123": "goat_horn_count", + "124": "update_properties" + } + } + ] + }, + { + "name": "type", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "byte", + "1": "short", + "2": "int", + "3": "float", + "4": "string", + "5": "compound", + "6": "vec3i", + "7": "long", + "8": "vec3f" + } + } + ] + }, + { + "name": "value", + "type": [ + "switch", + { + "compareTo": "key", + "fields": { + "flags": "MetadataFlags1", + "flags_extended": "MetadataFlags2" + }, + "default": [ + "switch", + { + "compareTo": "type", + "fields": { + "byte": "i8", + "short": "li16", + "int": "zigzag32", + "float": "lf32", + "string": "string", + "compound": "nbt", + "vec3i": "vec3i", + "long": "zigzag64", + "vec3f": "vec3f" + }, + "default": "void" + } + ] + } + ] + } + ] + ] + } + ], + "Link": [ + "container", + [ + { + "name": "ridden_entity_id", + "type": "zigzag64" + }, + { + "name": "rider_entity_id", + "type": "zigzag64" + }, + { + "name": "type", + "type": "u8" + }, + { + "name": "immediate", + "type": "bool" + }, + { + "name": "rider_initiated", + "type": "bool" + } + ] + ], + "Links": [ + "array", + { + "countType": "varint", + "type": "Link" + } + ], + "EntityAttributes": [ + "array", + { + "countType": "varint", + "type": [ + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "min", + "type": "lf32" + }, + { + "name": "value", + "type": "lf32" + }, + { + "name": "max", + "type": "lf32" + } + ] + ] + } + ], + "Rotation": [ + "container", + [ + { + "name": "yaw", + "type": "byterot" + }, + { + "name": "pitch", + "type": "byterot" + }, + { + "name": "head_yaw", + "type": "byterot" + } + ] + ], + "BlockCoordinates": [ + "container", + [ + { + "name": "x", + "type": "zigzag32" + }, + { + "name": "y", + "type": "varint" + }, + { + "name": "z", + "type": "zigzag32" + } + ] + ], + "PlayerAttributes": [ + "array", + { + "countType": "varint", + "type": [ + "container", + [ + { + "name": "min", + "type": "lf32" + }, + { + "name": "max", + "type": "lf32" + }, + { + "name": "current", + "type": "lf32" + }, + { + "name": "default", + "type": "lf32" + }, + { + "name": "name", + "type": "string" + } + ] + ] + } + ], + "TransactionUseItem": [ + "container", + [ + { + "name": "action_type", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "click_block", + "1": "click_air", + "2": "break_block" + } + } + ] + }, + { + "name": "block_position", + "type": "vec3i" + }, + { + "name": "face", + "type": "varint" + }, + { + "name": "hotbar_slot", + "type": "varint" + }, + { + "name": "held_item", + "type": "Item" + }, + { + "name": "player_pos", + "type": "vec3f" + }, + { + "name": "click_pos", + "type": "vec3f" + }, + { + "name": "block_runtime_id", + "type": "varint" + } + ] + ], + "TransactionActions": [ + "array", + { + "countType": "varint", + "type": [ + "container", + [ + { + "name": "source_type", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "container", + "1": "global", + "2": "world_interaction", + "3": "creative", + "100": "craft_slot", + "99999": "craft" + } + } + ] + }, + { + "anon": true, + "type": [ + "switch", + { + "compareTo": "source_type", + "fields": { + "container": [ + "container", + [ + { + "name": "inventory_id", + "type": "WindowIDVarint" + } + ] + ], + "craft": [ + "container", + [ + { + "name": "action", + "type": "varint" + } + ] + ], + "world_interaction": [ + "container", + [ + { + "name": "flags", + "type": "varint" + } + ] + ], + "craft_slot": [ + "container", + [ + { + "name": "action", + "type": "varint" + } + ] + ] + }, + "default": "void" + } + ] + }, + { + "name": "slot", + "type": "varint" + }, + { + "name": "old_item", + "type": "Item" + }, + { + "name": "new_item", + "type": "Item" + } + ] + ] + } + ], + "TransactionLegacy": [ + "container", + [ + { + "name": "legacy_request_id", + "type": "zigzag32" + }, + { + "name": "legacy_transactions", + "type": [ + "switch", + { + "compareTo": "legacy_request_id", + "fields": { + "0": "void" + }, + "default": [ + "array", + { + "countType": "varint", + "type": [ + "container", + [ + { + "name": "container_id", + "type": "u8" + }, + { + "name": "changed_slots", + "type": [ + "array", + { + "countType": "varint", + "type": [ + "container", + [ + { + "name": "slot_id", + "type": "u8" + } + ] + ] + } + ] + } + ] + ] + } + ] + } + ] + } + ] + ], + "Transaction": [ + "container", + [ + { + "name": "legacy", + "type": "TransactionLegacy" + }, + { + "name": "transaction_type", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "normal", + "1": "inventory_mismatch", + "2": "item_use", + "3": "item_use_on_entity", + "4": "item_release" + } + } + ] + }, + { + "name": "actions", + "type": "TransactionActions" + }, + { + "name": "transaction_data", + "type": [ + "switch", + { + "compareTo": "transaction_type", + "fields": { + "normal": "void", + "inventory_mismatch": "void", + "item_use": "TransactionUseItem", + "item_use_on_entity": [ + "container", + [ + { + "name": "entity_runtime_id", + "type": "varint64" + }, + { + "name": "action_type", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "interact", + "1": "attack" + } + } + ] + }, + { + "name": "hotbar_slot", + "type": "zigzag32" + }, + { + "name": "held_item", + "type": "Item" + }, + { + "name": "player_pos", + "type": "vec3f" + }, + { + "name": "click_pos", + "type": "vec3f" + } + ] + ], + "item_release": [ + "container", + [ + { + "name": "action_type", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "release", + "1": "consume" + } + } + ] + }, + { + "name": "hotbar_slot", + "type": "zigzag32" + }, + { + "name": "held_item", + "type": "Item" + }, + { + "name": "head_pos", + "type": "vec3f" + } + ] + ] + }, + "default": "void" + } + ] + } + ] + ], + "ItemStacks": [ + "array", + { + "countType": "varint", + "type": "Item" + } + ], + "RecipeIngredient": [ + "container", + [ + { + "name": "network_id", + "type": "zigzag32" + }, + { + "anon": true, + "type": [ + "switch", + { + "compareTo": "network_id", + "fields": { + "0": "void" + }, + "default": [ + "container", + [ + { + "name": "network_data", + "type": "zigzag32" + }, + { + "name": "count", + "type": "zigzag32" + } + ] + ] + } + ] + } + ] + ], + "PotionTypeRecipes": [ + "array", + { + "countType": "varint", + "type": [ + "container", + [ + { + "name": "input_item_id", + "type": "zigzag32" + }, + { + "name": "input_item_meta", + "type": "zigzag32" + }, + { + "name": "ingredient_id", + "type": "zigzag32" + }, + { + "name": "ingredient_meta", + "type": "zigzag32" + }, + { + "name": "output_item_id", + "type": "zigzag32" + }, + { + "name": "output_item_meta", + "type": "zigzag32" + } + ] + ] + } + ], + "PotionContainerChangeRecipes": [ + "array", + { + "countType": "varint", + "type": [ + "container", + [ + { + "name": "input_item_id", + "type": "zigzag32" + }, + { + "name": "ingredient_id", + "type": "zigzag32" + }, + { + "name": "output_item_id", + "type": "zigzag32" + } + ] + ] + } + ], + "Recipes": [ + "array", + { + "countType": "varint", + "type": [ + "container", + [ + { + "name": "type", + "type": [ + "mapper", + { + "type": "zigzag32", + "mappings": { + "0": "shapeless", + "1": "shaped", + "2": "furnace", + "3": "furnace_with_metadata", + "4": "multi", + "5": "shulker_box", + "6": "shapeless_chemistry", + "7": "shaped_chemistry" + } + } + ] + }, + { + "name": "recipe", + "type": [ + "switch", + { + "compareTo": "type", + "fields": { + "shapeless": [ + "container", + [ + { + "name": "recipe_id", + "type": "string" + }, + { + "name": "input", + "type": [ + "array", + { + "countType": "varint", + "type": "RecipeIngredient" + } + ] + }, + { + "name": "output", + "type": [ + "array", + { + "countType": "varint", + "type": "ItemLegacy" + } + ] + }, + { + "name": "uuid", + "type": "uuid" + }, + { + "name": "block", + "type": "string" + }, + { + "name": "priority", + "type": "zigzag32" + }, + { + "name": "network_id", + "type": "varint" + } + ] + ], + "shulker_box": [ + "container", + [ + { + "name": "recipe_id", + "type": "string" + }, + { + "name": "input", + "type": [ + "array", + { + "countType": "varint", + "type": "RecipeIngredient" + } + ] + }, + { + "name": "output", + "type": [ + "array", + { + "countType": "varint", + "type": "ItemLegacy" + } + ] + }, + { + "name": "uuid", + "type": "uuid" + }, + { + "name": "block", + "type": "string" + }, + { + "name": "priority", + "type": "zigzag32" + }, + { + "name": "network_id", + "type": "varint" + } + ] + ], + "shapeless_chemistry": [ + "container", + [ + { + "name": "recipe_id", + "type": "string" + }, + { + "name": "input", + "type": [ + "array", + { + "countType": "varint", + "type": "RecipeIngredient" + } + ] + }, + { + "name": "output", + "type": [ + "array", + { + "countType": "varint", + "type": "ItemLegacy" + } + ] + }, + { + "name": "uuid", + "type": "uuid" + }, + { + "name": "block", + "type": "string" + }, + { + "name": "priority", + "type": "zigzag32" + }, + { + "name": "network_id", + "type": "varint" + } + ] + ], + "shaped": [ + "container", + [ + { + "name": "recipe_id", + "type": "string" + }, + { + "name": "width", + "type": "zigzag32" + }, + { + "name": "height", + "type": "zigzag32" + }, + { + "name": "input", + "type": [ + "array", + { + "count": "width", + "type": [ + "array", + { + "count": "height", + "type": "RecipeIngredient" + } + ] + } + ] + }, + { + "name": "output", + "type": [ + "array", + { + "countType": "varint", + "type": "ItemLegacy" + } + ] + }, + { + "name": "uuid", + "type": "uuid" + }, + { + "name": "block", + "type": "string" + }, + { + "name": "priority", + "type": "zigzag32" + }, + { + "name": "network_id", + "type": "varint" + } + ] + ], + "shaped_chemistry": [ + "container", + [ + { + "name": "recipe_id", + "type": "string" + }, + { + "name": "width", + "type": "zigzag32" + }, + { + "name": "height", + "type": "zigzag32" + }, + { + "name": "input", + "type": [ + "array", + { + "count": "width", + "type": [ + "array", + { + "count": "height", + "type": "RecipeIngredient" + } + ] + } + ] + }, + { + "name": "output", + "type": [ + "array", + { + "countType": "varint", + "type": "ItemLegacy" + } + ] + }, + { + "name": "uuid", + "type": "uuid" + }, + { + "name": "block", + "type": "string" + }, + { + "name": "priority", + "type": "zigzag32" + }, + { + "name": "network_id", + "type": "varint" + } + ] + ], + "furnace": [ + "container", + [ + { + "name": "input_id", + "type": "zigzag32" + }, + { + "name": "output", + "type": "ItemLegacy" + }, + { + "name": "block", + "type": "string" + } + ] + ], + "furnace_with_metadata": [ + "container", + [ + { + "name": "input_id", + "type": "zigzag32" + }, + { + "name": "input_meta", + "type": "zigzag32" + }, + { + "name": "output", + "type": "ItemLegacy" + }, + { + "name": "block", + "type": "string" + } + ] + ], + "multi": [ + "container", + [ + { + "name": "uuid", + "type": "uuid" + }, + { + "name": "network_id", + "type": "varint" + } + ] + ] + }, + "default": "void" + } + ] + } + ] + ] + } + ], + "SkinImage": [ + "container", + [ + { + "name": "width", + "type": "li32" + }, + { + "name": "height", + "type": "li32" + }, + { + "name": "data", + "type": "ByteArray" + } + ] + ], + "Skin": [ + "container", + [ + { + "name": "skin_id", + "type": "string" + }, + { + "name": "play_fab_id", + "type": "string" + }, + { + "name": "skin_resource_pack", + "type": "string" + }, + { + "name": "skin_data", + "type": "SkinImage" + }, + { + "name": "animations", + "type": [ + "array", + { + "countType": "li32", + "type": [ + "container", + [ + { + "name": "skin_image", + "type": "SkinImage" + }, + { + "name": "animation_type", + "type": "li32" + }, + { + "name": "animation_frames", + "type": "lf32" + }, + { + "name": "expression_type", + "type": "lf32" + } + ] + ] + } + ] + }, + { + "name": "cape_data", + "type": "SkinImage" + }, + { + "name": "geometry_data", + "type": "string" + }, + { + "name": "animation_data", + "type": "string" + }, + { + "name": "premium", + "type": "bool" + }, + { + "name": "persona", + "type": "bool" + }, + { + "name": "cape_on_classic", + "type": "bool" + }, + { + "name": "cape_id", + "type": "string" + }, + { + "name": "full_skin_id", + "type": "string" + }, + { + "name": "arm_size", + "type": "string" + }, + { + "name": "skin_color", + "type": "string" + }, + { + "name": "personal_pieces", + "type": [ + "array", + { + "countType": "li32", + "type": [ + "container", + [ + { + "name": "piece_id", + "type": "string" + }, + { + "name": "piece_type", + "type": "string" + }, + { + "name": "pack_id", + "type": "string" + }, + { + "name": "is_default_piece", + "type": "bool" + }, + { + "name": "product_id", + "type": "string" + } + ] + ] + } + ] + }, + { + "name": "piece_tint_colors", + "type": [ + "array", + { + "countType": "li32", + "type": [ + "container", + [ + { + "name": "piece_type", + "type": "string" + }, + { + "name": "colors", + "type": [ + "array", + { + "countType": "li32", + "type": "string" + } + ] + } + ] + ] + } + ] + } + ] + ], + "PlayerRecords": [ + "container", + [ + { + "name": "type", + "type": [ + "mapper", + { + "type": "u8", + "mappings": { + "0": "add", + "1": "remove" + } + } + ] + }, + { + "name": "records_count", + "type": "varint" + }, + { + "name": "records", + "type": [ + "array", + { + "count": "records_count", + "type": [ + "switch", + { + "compareTo": "type", + "fields": { + "add": [ + "container", + [ + { + "name": "uuid", + "type": "uuid" + }, + { + "name": "entity_unique_id", + "type": "zigzag64" + }, + { + "name": "username", + "type": "string" + }, + { + "name": "xbox_user_id", + "type": "string" + }, + { + "name": "platform_chat_id", + "type": "string" + }, + { + "name": "build_platform", + "type": "li32" + }, + { + "name": "skin_data", + "type": "Skin" + }, + { + "name": "is_teacher", + "type": "bool" + }, + { + "name": "is_host", + "type": "bool" + } + ] + ], + "remove": [ + "container", + [ + { + "name": "uuid", + "type": "uuid" + } + ] + ] + }, + "default": "void" + } + ] + } + ] + }, + { + "name": "verified", + "type": [ + "switch", + { + "compareTo": "type", + "fields": { + "add": [ + "array", + { + "count": "records_count", + "type": "bool" + } + ] + }, + "default": "void" + } + ] + } + ] + ], + "Enchant": [ + "container", + [ + { + "name": "id", + "type": "u8" + }, + { + "name": "level", + "type": "u8" + } + ] + ], + "EnchantOption": [ + "container", + [ + { + "name": "cost", + "type": "varint" + }, + { + "name": "slot_flags", + "type": "li32" + }, + { + "name": "equip_enchants", + "type": [ + "array", + { + "countType": "varint", + "type": "Enchant" + } + ] + }, + { + "name": "held_enchants", + "type": [ + "array", + { + "countType": "varint", + "type": "Enchant" + } + ] + }, + { + "name": "self_enchants", + "type": [ + "array", + { + "countType": "varint", + "type": "Enchant" + } + ] + }, + { + "name": "name", + "type": "string" + }, + { + "name": "option_id", + "type": "zigzag32" + } + ] + ], + "Action": [ + "mapper", + { + "type": "zigzag32", + "mappings": { + "0": "start_break", + "1": "abort_break", + "2": "stop_break", + "3": "get_updated_block", + "4": "drop_item", + "5": "start_sleeping", + "6": "stop_sleeping", + "7": "respawn", + "8": "jump", + "9": "start_sprint", + "10": "stop_sprint", + "11": "start_sneak", + "12": "stop_sneak", + "13": "creative_player_destroy_block", + "14": "dimension_change_ack", + "15": "start_glide", + "16": "stop_glide", + "17": "build_denied", + "18": "crack_break", + "19": "change_skin", + "20": "set_enchatnment_seed", + "21": "swimming", + "22": "stop_swimming", + "23": "start_spin_attack", + "24": "stop_spin_attack", + "25": "interact_block", + "26": "predict_break", + "27": "continue_break" + } + } + ], + "StackRequestSlotInfo": [ + "container", + [ + { + "name": "slot_type", + "type": "ContainerSlotType" + }, + { + "name": "slot", + "type": "u8" + }, + { + "name": "stack_id", + "type": "zigzag32" + } + ] + ], + "ItemStackRequest": [ + "container", + [ + { + "name": "request_id", + "type": "varint" + }, + { + "name": "actions", + "type": [ + "array", + { + "countType": "varint", + "type": [ + "container", + [ + { + "name": "type_id", + "type": [ + "mapper", + { + "type": "u8", + "mappings": { + "0": "take", + "1": "place", + "2": "swap", + "3": "drop", + "4": "destroy", + "5": "consume", + "6": "create", + "7": "lab_table_combine", + "8": "beacon_payment", + "9": "mine_block", + "10": "craft_recipe", + "11": "craft_recipe_auto", + "12": "craft_creative", + "13": "optional", + "14": "non_implemented", + "15": "results_deprecated" + } + } + ] + }, + { + "anon": true, + "type": [ + "switch", + { + "compareTo": "type_id", + "fields": { + "take": [ + "container", + [ + { + "name": "count", + "type": "u8" + }, + { + "name": "source", + "type": "StackRequestSlotInfo" + }, + { + "name": "destination", + "type": "StackRequestSlotInfo" + } + ] + ], + "place": [ + "container", + [ + { + "name": "count", + "type": "u8" + }, + { + "name": "source", + "type": "StackRequestSlotInfo" + }, + { + "name": "destination", + "type": "StackRequestSlotInfo" + } + ] + ], + "swap": [ + "container", + [ + { + "name": "source", + "type": "StackRequestSlotInfo" + }, + { + "name": "destination", + "type": "StackRequestSlotInfo" + } + ] + ], + "drop": [ + "container", + [ + { + "name": "count", + "type": "u8" + }, + { + "name": "source", + "type": "StackRequestSlotInfo" + }, + { + "name": "randomly", + "type": "bool" + } + ] + ], + "destroy": [ + "container", + [ + { + "name": "count", + "type": "u8" + }, + { + "name": "source", + "type": "StackRequestSlotInfo" + } + ] + ], + "consume": [ + "container", + [ + { + "name": "count", + "type": "u8" + }, + { + "name": "source", + "type": "StackRequestSlotInfo" + } + ] + ], + "create": [ + "container", + [ + { + "name": "result_slot_id", + "type": "u8" + } + ] + ], + "beacon_payment": [ + "container", + [ + { + "name": "primary_effect", + "type": "zigzag32" + }, + { + "name": "secondary_effect", + "type": "zigzag32" + } + ] + ], + "mine_block": [ + "container", + [ + { + "name": "unknown1", + "type": "zigzag32" + }, + { + "name": "predicted_durability", + "type": "zigzag32" + }, + { + "name": "network_id", + "type": "zigzag32" + } + ] + ], + "craft_recipe": [ + "container", + [ + { + "name": "recipe_network_id", + "type": "varint" + } + ] + ], + "craft_recipe_auto": [ + "container", + [ + { + "name": "recipe_network_id", + "type": "varint" + } + ] + ], + "craft_creative": [ + "container", + [ + { + "name": "item_id", + "type": "varint" + } + ] + ], + "optional": [ + "container", + [ + { + "name": "recipe_network_id", + "type": "varint" + }, + { + "name": "filtered_string_index", + "type": "li32" + } + ] + ], + "non_implemented": "void", + "results_deprecated": [ + "container", + [ + { + "name": "result_items", + "type": [ + "array", + { + "countType": "varint", + "type": "ItemLegacy" + } + ] + }, + { + "name": "times_crafted", + "type": "u8" + } + ] + ] + }, + "default": "void" + } + ] + } + ] + ] + } + ] + }, + { + "name": "custom_names", + "type": [ + "array", + { + "countType": "varint", + "type": "string" + } + ] + } + ] + ], + "ItemStackResponses": [ + "array", + { + "countType": "varint", + "type": [ + "container", + [ + { + "name": "status", + "type": [ + "mapper", + { + "type": "u8", + "mappings": { + "0": "ok", + "1": "error" + } + } + ] + }, + { + "name": "request_id", + "type": "varint" + }, + { + "anon": true, + "type": [ + "switch", + { + "compareTo": "status", + "fields": { + "ok": [ + "container", + [ + { + "name": "containers", + "type": [ + "array", + { + "countType": "varint", + "type": [ + "container", + [ + { + "name": "slot_type", + "type": "ContainerSlotType" + }, + { + "name": "slots", + "type": [ + "array", + { + "countType": "varint", + "type": [ + "container", + [ + { + "name": "slot", + "type": "u8" + }, + { + "name": "hotbar_slot", + "type": "u8" + }, + { + "name": "count", + "type": "u8" + }, + { + "name": "item_stack_id", + "type": "varint" + }, + { + "name": "custom_name", + "type": "string" + }, + { + "name": "durability_correction", + "type": "zigzag32" + } + ] + ] + } + ] + } + ] + ] + } + ] + } + ] + ] + }, + "default": "void" + } + ] + } + ] + ] + } + ], + "ItemComponentList": [ + "array", + { + "countType": "varint", + "type": [ + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "nbt", + "type": "nbt" + } + ] + ] + } + ], + "CommandOrigin": [ + "container", + [ + { + "name": "type", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "player", + "1": "block", + "2": "minecart_block", + "3": "dev_console", + "4": "test", + "5": "automation_player", + "6": "client_automation", + "7": "dedicated_server", + "8": "entity", + "9": "virtual", + "10": "game_argument", + "11": "entity_server", + "12": "precompiled", + "13": "game_director_entity_server", + "14": "script" + } + } + ] + }, + { + "name": "uuid", + "type": "uuid" + }, + { + "name": "request_id", + "type": "string" + }, + { + "name": "player_entity_id", + "type": [ + "switch", + { + "compareTo": "type", + "fields": { + "dev_console": [ + "container", + [ + { + "name": "player_entity_id", + "type": "zigzag64" + } + ] + ], + "test": [ + "container", + [ + { + "name": "player_entity_id", + "type": "zigzag64" + } + ] + ] + }, + "default": "void" + } + ] + } + ] + ], + "TrackedObject": [ + "container", + [ + { + "name": "type", + "type": [ + "mapper", + { + "type": "li32", + "mappings": { + "0": "entity", + "1": "block" + } + } + ] + }, + { + "name": "entity_unique_id", + "type": [ + "switch", + { + "compareTo": "type", + "fields": { + "entity": "zigzag64" + }, + "default": "void" + } + ] + }, + { + "name": "block_position", + "type": [ + "switch", + { + "compareTo": "type", + "fields": { + "block": "BlockCoordinates" + }, + "default": "void" + } + ] + } + ] + ], + "MapDecoration": [ + "container", + [ + { + "name": "type", + "type": "u8" + }, + { + "name": "rotation", + "type": "u8" + }, + { + "name": "x", + "type": "u8" + }, + { + "name": "y", + "type": "u8" + }, + { + "name": "label", + "type": "string" + }, + { + "name": "color_abgr", + "type": "varint" + } + ] + ], + "StructureBlockSettings": [ + "container", + [ + { + "name": "palette_name", + "type": "string" + }, + { + "name": "ignore_entities", + "type": "bool" + }, + { + "name": "ignore_blocks", + "type": "bool" + }, + { + "name": "size", + "type": "BlockCoordinates" + }, + { + "name": "structure_offset", + "type": "BlockCoordinates" + }, + { + "name": "last_editing_player_unique_id", + "type": "zigzag64" + }, + { + "name": "rotation", + "type": [ + "mapper", + { + "type": "u8", + "mappings": { + "0": "none", + "1": "90_deg", + "2": "180_deg", + "3": "270_deg" + } + } + ] + }, + { + "name": "mirror", + "type": [ + "mapper", + { + "type": "u8", + "mappings": { + "0": "none", + "1": "x_axis", + "2": "z_axis", + "3": "both_axes" + } + } + ] + }, + { + "name": "animation_mode", + "type": [ + "mapper", + { + "type": "u8", + "mappings": { + "0": "none", + "1": "layers", + "2": "blocks" + } + } + ] + }, + { + "name": "animation_duration", + "type": "lf32" + }, + { + "name": "integrity", + "type": "lf32" + }, + { + "name": "seed", + "type": "lu32" + }, + { + "name": "pivot", + "type": "vec3f" + } + ] + ], + "WindowID": [ + "mapper", + { + "type": "i8", + "mappings": { + "0": "inventory", + "1": "first", + "100": "last", + "119": "offhand", + "120": "armor", + "121": "creative", + "122": "hotbar", + "123": "fixed_inventory", + "124": "ui", + "-100": "drop_contents", + "-24": "beacon", + "-23": "trading_output", + "-22": "trading_use_inputs", + "-21": "trading_input_2", + "-20": "trading_input_1", + "-17": "enchant_output", + "-16": "enchant_material", + "-15": "enchant_input", + "-13": "anvil_output", + "-12": "anvil_result", + "-11": "anvil_material", + "-10": "container_input", + "-5": "crafting_use_ingredient", + "-4": "crafting_result", + "-3": "crafting_remove_ingredient", + "-2": "crafting_add_ingredient", + "-1": "none" + } + } + ], + "WindowIDVarint": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "inventory", + "1": "first", + "100": "last", + "119": "offhand", + "120": "armor", + "121": "creative", + "122": "hotbar", + "123": "fixed_inventory", + "124": "ui", + "-100": "drop_contents", + "-24": "beacon", + "-23": "trading_output", + "-22": "trading_use_inputs", + "-21": "trading_input_2", + "-20": "trading_input_1", + "-17": "enchant_output", + "-16": "enchant_material", + "-15": "enchant_input", + "-13": "anvil_output", + "-12": "anvil_result", + "-11": "anvil_material", + "-10": "container_input", + "-5": "crafting_use_ingredient", + "-4": "crafting_result", + "-3": "crafting_remove_ingredient", + "-2": "crafting_add_ingredient", + "-1": "none" + } + } + ], + "WindowType": [ + "mapper", + { + "type": "i8", + "mappings": { + "0": "container", + "1": "workbench", + "2": "furnace", + "3": "enchantment", + "4": "brewing_stand", + "5": "anvil", + "6": "dispenser", + "7": "dropper", + "8": "hopper", + "9": "cauldron", + "10": "minecart_chest", + "11": "minecart_hopper", + "12": "horse", + "13": "beacon", + "14": "structure_editor", + "15": "trading", + "16": "command_block", + "17": "jukebox", + "18": "armor", + "19": "hand", + "20": "compound_creator", + "21": "element_constructor", + "22": "material_reducer", + "23": "lab_table", + "24": "loom", + "25": "lectern", + "26": "grindstone", + "27": "blast_furnace", + "28": "smoker", + "29": "stonecutter", + "30": "cartography", + "31": "hud", + "32": "jigsaw_editor", + "33": "smithing_table", + "-9": "none", + "-1": "inventory" + } + } + ], + "ContainerSlotType": [ + "mapper", + { + "type": "u8", + "mappings": { + "0": "anvil_input", + "1": "anvil_material", + "2": "anvil_result", + "3": "smithing_table_input", + "4": "smithing_table_material", + "5": "smithing_table_result", + "6": "armor", + "7": "container", + "8": "beacon_payment", + "9": "brewing_input", + "10": "brewing_result", + "11": "brewing_fuel", + "12": "hotbar_and_inventory", + "13": "crafting_input", + "14": "crafting_output", + "15": "recipe_construction", + "16": "recipe_nature", + "17": "recipe_items", + "18": "recipe_search", + "19": "recipe_search_bar", + "20": "recipe_equipment", + "21": "enchanting_input", + "22": "enchanting_lapis", + "23": "furnace_fuel", + "24": "furnace_ingredient", + "25": "furnace_output", + "26": "horse_equip", + "27": "hotbar", + "28": "inventory", + "29": "shulker", + "30": "trade_ingredient1", + "31": "trade_ingredient2", + "32": "trade_result", + "33": "offhand", + "34": "compcreate_input", + "35": "compcreate_output", + "36": "elemconstruct_output", + "37": "matreduce_input", + "38": "matreduce_output", + "39": "labtable_input", + "40": "loom_input", + "41": "loom_dye", + "42": "loom_material", + "43": "loom_result", + "44": "blast_furnace_ingredient", + "45": "smoker_ingredient", + "46": "trade2_ingredient1", + "47": "trade2_ingredient2", + "48": "trade2_result", + "49": "grindstone_input", + "50": "grindstone_additional", + "51": "grindstone_result", + "52": "stonecutter_input", + "53": "stonecutter_result", + "54": "cartography_input", + "55": "cartography_additional", + "56": "cartography_result", + "57": "barrel", + "58": "cursor", + "59": "creative_output" + } + } + ], + "SoundType": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "ItemUseOn", + "1": "Hit", + "2": "Step", + "3": "Fly", + "4": "Jump", + "5": "Break", + "6": "Place", + "7": "HeavyStep", + "8": "Gallop", + "9": "Fall", + "10": "Ambient", + "11": "AmbientBaby", + "12": "AmbientInWater", + "13": "Breathe", + "14": "Death", + "15": "DeathInWater", + "16": "DeathToZombie", + "17": "Hurt", + "18": "HurtInWater", + "19": "Mad", + "20": "Boost", + "21": "Bow", + "22": "SquishBig", + "23": "SquishSmall", + "24": "FallBig", + "25": "FallSmall", + "26": "Splash", + "27": "Fizz", + "28": "Flap", + "29": "Swim", + "30": "Drink", + "31": "Eat", + "32": "Takeoff", + "33": "Shake", + "34": "Plop", + "35": "Land", + "36": "Saddle", + "37": "Armor", + "38": "MobArmorStandPlace", + "39": "AddChest", + "40": "Throw", + "41": "Attack", + "42": "AttackNoDamage", + "43": "AttackStrong", + "44": "Warn", + "45": "Shear", + "46": "Milk", + "47": "Thunder", + "48": "Explode", + "49": "Fire", + "50": "Ignite", + "51": "Fuse", + "52": "Stare", + "53": "Spawn", + "54": "Shoot", + "55": "BreakBlock", + "56": "Launch", + "57": "Blast", + "58": "LargeBlast", + "59": "Twinkle", + "60": "Remedy", + "61": "Infect", + "62": "LevelUp", + "63": "BowHit", + "64": "BulletHit", + "65": "ExtinguishFire", + "66": "ItemFizz", + "67": "ChestOpen", + "68": "ChestClosed", + "69": "ShulkerBoxOpen", + "70": "ShulkerBoxClosed", + "71": "EnderChestOpen", + "72": "EnderChestClosed", + "73": "PowerOn", + "74": "PowerOff", + "75": "Attach", + "76": "Detach", + "77": "Deny", + "78": "Tripod", + "79": "Pop", + "80": "DropSlot", + "81": "Note", + "82": "Thorns", + "83": "PistonIn", + "84": "PistonOut", + "85": "Portal", + "86": "Water", + "87": "LavaPop", + "88": "Lava", + "89": "Burp", + "90": "BucketFillWater", + "91": "BucketFillLava", + "92": "BucketEmptyWater", + "93": "BucketEmptyLava", + "94": "ArmorEquipChain", + "95": "ArmorEquipDiamond", + "96": "ArmorEquipGeneric", + "97": "ArmorEquipGold", + "98": "ArmorEquipIron", + "99": "ArmorEquipLeather", + "100": "ArmorEquipElytra", + "101": "Record13", + "102": "RecordCat", + "103": "RecordBlocks", + "104": "RecordChirp", + "105": "RecordFar", + "106": "RecordMall", + "107": "RecordMellohi", + "108": "RecordStal", + "109": "RecordStrad", + "110": "RecordWard", + "111": "Record11", + "112": "RecordWait", + "113": "unknown1", + "114": "Flop", + "115": "ElderGuardianCurse", + "116": "MobWarning", + "117": "MobWarningBaby", + "118": "Teleport", + "119": "ShulkerOpen", + "120": "ShulkerClose", + "121": "Haggle", + "122": "HaggleYes", + "123": "HaggleNo", + "124": "HaggleIdle", + "125": "ChorusGrow", + "126": "ChorusDeath", + "127": "Glass", + "128": "PotionBrewed", + "129": "CastSpell", + "130": "PrepareAttack", + "131": "PrepareSummon", + "132": "PrepareWololo", + "133": "Fang", + "134": "Charge", + "135": "CameraTakePicture", + "136": "LeashKnotPlace", + "137": "LeashKnotBreak", + "138": "Growl", + "139": "Whine", + "140": "Pant", + "141": "Purr", + "142": "Purreow", + "143": "DeathMinVolume", + "144": "DeathMidVolume", + "145": "unknown2", + "146": "ImitateCaveSpider", + "147": "ImitateCreeper", + "148": "ImitateElderGuardian", + "149": "ImitateEnderDragon", + "150": "ImitateEnderman", + "151": "unknown3", + "152": "ImitateEvocationIllager", + "153": "ImitateGhast", + "154": "ImitateHusk", + "155": "ImitateIllusionIllager", + "156": "ImitateMagmaCube", + "157": "ImitatePolarBear", + "158": "ImitateShulker", + "159": "ImitateSilverfish", + "160": "ImitateSkeleton", + "161": "ImitateSlime", + "162": "ImitateSpider", + "163": "ImitateStray", + "164": "ImitateVex", + "165": "ImitateVindicationIllager", + "166": "ImitateWitch", + "167": "ImitateWither", + "168": "ImitateWitherSkeleton", + "169": "ImitateWolf", + "170": "ImitateZombie", + "171": "ImitateZombiePigman", + "172": "ImitateZombieVillager", + "173": "BlockEndPortalFrameFill", + "174": "BlockEndPortalSpawn", + "175": "RandomAnvilUse", + "176": "BottleDragonBreath", + "177": "PortalTravel", + "178": "ItemTridentHit", + "179": "ItemTridentReturn", + "180": "ItemTridentRiptide1", + "181": "ItemTridentRiptide2", + "182": "ItemTridentRiptide3", + "183": "ItemTridentThrow", + "184": "ItemTridentThunder", + "185": "ItemTridentHitGround", + "186": "Default", + "187": "BlockFletchingTableUse", + "188": "ElemConstructOpen", + "189": "IceBombHit", + "190": "BalloonPop", + "191": "LtReactionIceBomb", + "192": "LtReactionBleach", + "193": "LtReactionEPaste", + "194": "LtReactionEPaste2", + "195": "LtReactionFertilizer", + "196": "LtReactionFireball", + "197": "LtReactionMgsalt", + "198": "LtReactionMiscfire", + "199": "LtReactionFire", + "200": "LtReactionMiscexplosion", + "201": "LtReactionMiscmystical", + "202": "LtReactionMiscmystical2", + "203": "LtReactionProduct", + "204": "SparklerUse", + "205": "GlowstickUse", + "206": "SparklerActive", + "207": "ConvertToDrowned", + "208": "BucketFillFish", + "209": "BucketEmptyFish", + "210": "BubbleUp", + "211": "BubbleDown", + "212": "BubblePop", + "213": "BubbleUpInside", + "214": "BubbleDownInside", + "215": "HurtBaby", + "216": "DeathBaby", + "217": "StepBaby", + "218": "BabySpawn", + "219": "Born", + "220": "BlockTurtleEggBreak", + "221": "BlockTurtleEggCrack", + "222": "BlockTurtleEggHatch", + "223": "TurtleLayEgg", + "224": "BlockTurtleEggAttack", + "225": "BeaconActivate", + "226": "BeaconAmbient", + "227": "BeaconDeactivate", + "228": "BeaconPower", + "229": "ConduitActivate", + "230": "ConduitAmbient", + "231": "ConduitAttack", + "232": "ConduitDeactivate", + "233": "ConduitShort", + "234": "Swoop", + "235": "BlockBambooSaplingPlace", + "236": "PreSneeze", + "237": "Sneeze", + "238": "AmbientTame", + "239": "Scared", + "240": "BlockScaffoldingClimb", + "241": "CrossbowLoadingStart", + "242": "CrossbowLoadingMiddle", + "243": "CrossbowLoadingEnd", + "244": "CrossbowShoot", + "245": "CrossbowQuickChargeStart", + "246": "CrossbowQuickChargeMiddle", + "247": "CrossbowQuickChargeEnd", + "248": "AmbientAggressive", + "249": "AmbientWorried", + "250": "CantBreed", + "251": "ItemShieldBlock", + "252": "ItemBookPut", + "253": "BlockGrindstoneUse", + "254": "BlockBellHit", + "255": "BlockCampfireCrackle", + "256": "Roar", + "257": "Stun", + "258": "BlockSweetBerryBushHurt", + "259": "BlockSweetBerryBushPick", + "260": "UICartographyTableTakeResult", + "261": "UIStoneCutterTakeResult", + "262": "BlockComposterEmpty", + "263": "BlockComposterFill", + "264": "BlockComposterFillSuccess", + "265": "BlockComposterReady", + "266": "BlockBarrelOpen", + "267": "BlockBarrelClose", + "268": "RaidHorn", + "269": "BlockLoomUse", + "270": "AmbientRaid", + "271": "UICartographyTableUse", + "272": "UIStoneCutterUse", + "273": "UILoomUse", + "274": "SmokerUse", + "275": "BlastFurnaceUse", + "276": "SmithingTableUse", + "277": "Screech", + "278": "Sleep", + "279": "FurnaceUse", + "280": "MooshroomConvert", + "281": "MilkSuspiciously", + "282": "Celebrate", + "283": "JumpPrevent", + "284": "AmbientPollinate", + "285": "BeeHiveDrip", + "286": "BeeHiveEnter", + "287": "BeeHiveExit", + "288": "BeeHiveWork", + "289": "BeeHiveShear", + "290": "HoneyBottleDrink", + "291": "AmbientCave", + "292": "Retreat", + "293": "ConvertToZombified", + "294": "Admire", + "295": "StepLava", + "296": "Tempt", + "297": "Panic", + "298": "Angry", + "299": "AmbientWarpedForest", + "300": "AmbientSoulsandValley", + "301": "AmbientNetherWastes", + "302": "AmbientBasaltDeltas", + "303": "AmbientCrimsonForest", + "304": "RespawnAnchorCharge", + "305": "RespawnAnchorDeplete", + "306": "RespawnAnchorSetSpawn", + "307": "RespawnAnchorAmbient", + "308": "SoulEscapeQuiet", + "309": "SoulEscapeLoud", + "310": "RecordPigstep", + "311": "LinkCompassToLodestone", + "312": "BlockSmithingTableUse", + "313": "EquipNetherite", + "314": "AmbientLoopWarpedForest", + "315": "AmbientLoopSoulsandValley", + "316": "AmbientLoopNetherWastes", + "317": "AmbientLoopBasaltDeltas", + "318": "AmbientLoopCrimsonForest", + "319": "AmbientAdditionWarpedForest", + "320": "AmbientAdditionSoulsandValley", + "321": "AmbientAdditionNetherWastes", + "322": "AmbientAdditionBasaltDeltas", + "323": "AmbientAdditionCrimsonForest", + "324": "SculkSensorPowerOn", + "325": "SculkSensorPowerOff", + "326": "BucketFillPowderSnow", + "327": "BucketEmptyPowderSnow", + "328": "PointedDripstoneCauldronDripWater", + "329": "PointedDripstoneCauldronDripLava", + "330": "PointedDripstoneDripWater", + "331": "PointedDripstoneDripLava", + "332": "CaveVinesPickBerries", + "333": "BigDripleafTiltDown", + "334": "BigDripleafTiltUp", + "335": "unknown335", + "336": "unknown336", + "337": "unknown337", + "338": "unknown338", + "339": "copper_wax_on", + "340": "copper_wax_off", + "341": "scrape", + "342": "player_hurt_drown", + "343": "player_hurt_on_fire", + "344": "player_hurt_freeze", + "345": "use_spyglass", + "346": "stop_using_spyglass", + "347": "amethyst_block_chime", + "348": "ambient_screamer", + "349": "hurt_screamer", + "350": "death_screamer", + "351": "milk_screamer", + "352": "jump_to_block", + "353": "pre_ram", + "354": "pre_ram_screamer", + "355": "ram_impact", + "356": "ram_impact_screamer", + "357": "squid_ink_squirt", + "358": "glow_squid_ink_squirt", + "359": "convert_to_stray", + "360": "extinguish_candle", + "361": "ambient_candle", + "362": "Undefined" + } + } + ], + "LegacyEntityType": [ + "mapper", + { + "type": "li32", + "mappings": { + "10": "chicken", + "11": "cow", + "12": "pig", + "13": "sheep", + "14": "wolf", + "15": "villager", + "16": "mooshroom", + "17": "squid", + "18": "rabbit", + "19": "bat", + "20": "iron_golem", + "21": "snow_golem", + "22": "ocelot", + "23": "horse", + "24": "donkey", + "25": "mule", + "26": "skeleton_horse", + "27": "zombie_horse", + "28": "polar_bear", + "29": "llama", + "30": "parrot", + "31": "dolphin", + "32": "zombie", + "33": "creeper", + "34": "skeleton", + "35": "spider", + "36": "zombie_pigman", + "37": "slime", + "38": "enderman", + "39": "silverfish", + "40": "cave_spider", + "41": "ghast", + "42": "magma_cube", + "43": "blaze", + "44": "zombie_villager", + "45": "witch", + "46": "stray", + "47": "husk", + "48": "wither_skeleton", + "49": "guardian", + "50": "elder_guardian", + "51": "npc", + "52": "wither", + "53": "ender_dragon", + "54": "shulker", + "55": "endermite", + "56": "agent", + "57": "vindicator", + "58": "phantom", + "61": "armor_stand", + "62": "tripod_camera", + "63": "player", + "64": "item", + "65": "tnt", + "66": "falling_block", + "67": "moving_block", + "68": "xp_bottle", + "69": "xp_orb", + "70": "eye_of_ender_signal", + "71": "ender_crystal", + "72": "fireworks_rocket", + "73": "thrown_trident", + "74": "turtle", + "75": "cat", + "76": "shulker_bullet", + "77": "fishing_hook", + "78": "chalkboard", + "79": "dragon_fireball", + "80": "arrow", + "81": "snowball", + "82": "egg", + "83": "painting", + "84": "minecart", + "85": "fireball", + "86": "splash_potion", + "87": "ender_pearl", + "88": "leash_knot", + "89": "wither_skull", + "90": "boat", + "91": "wither_skull_dangerous", + "93": "lightning_bolt", + "94": "small_fireball", + "95": "area_effect_cloud", + "96": "hopper_minecart", + "97": "tnt_minecart", + "98": "chest_minecart", + "100": "command_block_minecart", + "101": "lingering_potion", + "102": "llama_spit", + "103": "evocation_fang", + "104": "evocation_illager", + "105": "vex", + "106": "ice_bomb", + "107": "balloon", + "108": "pufferfish", + "109": "salmon", + "110": "drowned", + "111": "tropicalfish", + "112": "cod", + "113": "panda" + } + } + ], + "mcpe_packet": [ + "container", + [ + { + "name": "name", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "1": "login", + "2": "play_status", + "3": "server_to_client_handshake", + "4": "client_to_server_handshake", + "5": "disconnect", + "6": "resource_packs_info", + "7": "resource_pack_stack", + "8": "resource_pack_client_response", + "9": "text", + "10": "set_time", + "11": "start_game", + "12": "add_player", + "13": "add_entity", + "14": "remove_entity", + "15": "add_item_entity", + "17": "take_item_entity", + "18": "move_entity", + "19": "move_player", + "20": "rider_jump", + "21": "update_block", + "22": "add_painting", + "23": "tick_sync", + "24": "level_sound_event_old", + "25": "level_event", + "26": "block_event", + "27": "entity_event", + "28": "mob_effect", + "29": "update_attributes", + "30": "inventory_transaction", + "31": "mob_equipment", + "32": "mob_armor_equipment", + "33": "interact", + "34": "block_pick_request", + "35": "entity_pick_request", + "36": "player_action", + "38": "hurt_armor", + "39": "set_entity_data", + "40": "set_entity_motion", + "41": "set_entity_link", + "42": "set_health", + "43": "set_spawn_position", + "44": "animate", + "45": "respawn", + "46": "container_open", + "47": "container_close", + "48": "player_hotbar", + "49": "inventory_content", + "50": "inventory_slot", + "51": "container_set_data", + "52": "crafting_data", + "53": "crafting_event", + "54": "gui_data_pick_item", + "55": "adventure_settings", + "56": "block_entity_data", + "57": "player_input", + "58": "level_chunk", + "59": "set_commands_enabled", + "60": "set_difficulty", + "61": "change_dimension", + "62": "set_player_game_type", + "63": "player_list", + "64": "simple_event", + "65": "event", + "66": "spawn_experience_orb", + "67": "clientbound_map_item_data", + "68": "map_info_request", + "69": "request_chunk_radius", + "70": "chunk_radius_update", + "71": "item_frame_drop_item", + "72": "game_rules_changed", + "73": "camera", + "74": "boss_event", + "75": "show_credits", + "76": "available_commands", + "77": "command_request", + "78": "command_block_update", + "79": "command_output", + "80": "update_trade", + "81": "update_equipment", + "82": "resource_pack_data_info", + "83": "resource_pack_chunk_data", + "84": "resource_pack_chunk_request", + "85": "transfer", + "86": "play_sound", + "87": "stop_sound", + "88": "set_title", + "89": "add_behavior_tree", + "90": "structure_block_update", + "91": "show_store_offer", + "92": "purchase_receipt", + "93": "player_skin", + "94": "sub_client_login", + "95": "initiate_web_socket_connection", + "96": "set_last_hurt_by", + "97": "book_edit", + "98": "npc_request", + "99": "photo_transfer", + "100": "modal_form_request", + "101": "modal_form_response", + "102": "server_settings_request", + "103": "server_settings_response", + "104": "show_profile", + "105": "set_default_game_type", + "106": "remove_objective", + "107": "set_display_objective", + "108": "set_score", + "109": "lab_table", + "110": "update_block_synced", + "111": "move_entity_delta", + "112": "set_scoreboard_identity", + "113": "set_local_player_as_initialized", + "114": "update_soft_enum", + "115": "network_stack_latency", + "117": "script_custom_event", + "118": "spawn_particle_effect", + "119": "available_entity_identifiers", + "120": "level_sound_event_v2", + "121": "network_chunk_publisher_update", + "122": "biome_definition_list", + "123": "level_sound_event", + "124": "level_event_generic", + "125": "lectern_update", + "126": "video_stream_connect", + "127": "add_ecs_entity", + "128": "remove_ecs_entity", + "129": "client_cache_status", + "130": "on_screen_texture_animation", + "131": "map_create_locked_copy", + "132": "structure_template_data_export_request", + "133": "structure_template_data_export_response", + "134": "update_block_properties", + "135": "client_cache_blob_status", + "136": "client_cache_miss_response", + "137": "education_settings", + "139": "multiplayer_settings", + "140": "settings_command", + "141": "anvil_damage", + "142": "completed_using_item", + "143": "network_settings", + "144": "player_auth_input", + "145": "creative_content", + "146": "player_enchant_options", + "147": "item_stack_request", + "148": "item_stack_response", + "149": "player_armor_damage", + "151": "update_player_game_type", + "153": "position_tracking_db_broadcast", + "154": "position_tracking_db_request", + "156": "packet_violation_warning", + "157": "motion_prediction_hints", + "158": "animate_entity", + "159": "camera_shake", + "160": "player_fog", + "161": "correct_player_move_prediction", + "162": "item_component", + "163": "filter_text_packet", + "164": "debug_renderer", + "165": "sync_entity_property", + "166": "add_volume_entity", + "167": "remove_volume_entity", + "168": "simulation_type", + "169": "npc_dialogue" + } + } + ] + }, + { + "name": "params", + "type": [ + "switch", + { + "compareTo": "name", + "fields": { + "login": "packet_login", + "play_status": "packet_play_status", + "server_to_client_handshake": "packet_server_to_client_handshake", + "client_to_server_handshake": "packet_client_to_server_handshake", + "disconnect": "packet_disconnect", + "resource_packs_info": "packet_resource_packs_info", + "resource_pack_stack": "packet_resource_pack_stack", + "resource_pack_client_response": "packet_resource_pack_client_response", + "text": "packet_text", + "set_time": "packet_set_time", + "start_game": "packet_start_game", + "add_player": "packet_add_player", + "add_entity": "packet_add_entity", + "remove_entity": "packet_remove_entity", + "add_item_entity": "packet_add_item_entity", + "take_item_entity": "packet_take_item_entity", + "move_entity": "packet_move_entity", + "move_player": "packet_move_player", + "rider_jump": "packet_rider_jump", + "update_block": "packet_update_block", + "add_painting": "packet_add_painting", + "tick_sync": "packet_tick_sync", + "level_sound_event_old": "packet_level_sound_event_old", + "level_event": "packet_level_event", + "block_event": "packet_block_event", + "entity_event": "packet_entity_event", + "mob_effect": "packet_mob_effect", + "update_attributes": "packet_update_attributes", + "inventory_transaction": "packet_inventory_transaction", + "mob_equipment": "packet_mob_equipment", + "mob_armor_equipment": "packet_mob_armor_equipment", + "interact": "packet_interact", + "block_pick_request": "packet_block_pick_request", + "entity_pick_request": "packet_entity_pick_request", + "player_action": "packet_player_action", + "hurt_armor": "packet_hurt_armor", + "set_entity_data": "packet_set_entity_data", + "set_entity_motion": "packet_set_entity_motion", + "set_entity_link": "packet_set_entity_link", + "set_health": "packet_set_health", + "set_spawn_position": "packet_set_spawn_position", + "animate": "packet_animate", + "respawn": "packet_respawn", + "container_open": "packet_container_open", + "container_close": "packet_container_close", + "player_hotbar": "packet_player_hotbar", + "inventory_content": "packet_inventory_content", + "inventory_slot": "packet_inventory_slot", + "container_set_data": "packet_container_set_data", + "crafting_data": "packet_crafting_data", + "crafting_event": "packet_crafting_event", + "gui_data_pick_item": "packet_gui_data_pick_item", + "adventure_settings": "packet_adventure_settings", + "block_entity_data": "packet_block_entity_data", + "player_input": "packet_player_input", + "level_chunk": "packet_level_chunk", + "set_commands_enabled": "packet_set_commands_enabled", + "set_difficulty": "packet_set_difficulty", + "change_dimension": "packet_change_dimension", + "set_player_game_type": "packet_set_player_game_type", + "player_list": "packet_player_list", + "simple_event": "packet_simple_event", + "event": "packet_event", + "spawn_experience_orb": "packet_spawn_experience_orb", + "clientbound_map_item_data": "packet_clientbound_map_item_data", + "map_info_request": "packet_map_info_request", + "request_chunk_radius": "packet_request_chunk_radius", + "chunk_radius_update": "packet_chunk_radius_update", + "item_frame_drop_item": "packet_item_frame_drop_item", + "game_rules_changed": "packet_game_rules_changed", + "camera": "packet_camera", + "boss_event": "packet_boss_event", + "show_credits": "packet_show_credits", + "available_commands": "packet_available_commands", + "command_request": "packet_command_request", + "command_block_update": "packet_command_block_update", + "command_output": "packet_command_output", + "update_trade": "packet_update_trade", + "update_equipment": "packet_update_equipment", + "resource_pack_data_info": "packet_resource_pack_data_info", + "resource_pack_chunk_data": "packet_resource_pack_chunk_data", + "resource_pack_chunk_request": "packet_resource_pack_chunk_request", + "transfer": "packet_transfer", + "play_sound": "packet_play_sound", + "stop_sound": "packet_stop_sound", + "set_title": "packet_set_title", + "add_behavior_tree": "packet_add_behavior_tree", + "structure_block_update": "packet_structure_block_update", + "show_store_offer": "packet_show_store_offer", + "purchase_receipt": "packet_purchase_receipt", + "player_skin": "packet_player_skin", + "sub_client_login": "packet_sub_client_login", + "initiate_web_socket_connection": "packet_initiate_web_socket_connection", + "set_last_hurt_by": "packet_set_last_hurt_by", + "book_edit": "packet_book_edit", + "npc_request": "packet_npc_request", + "photo_transfer": "packet_photo_transfer", + "modal_form_request": "packet_modal_form_request", + "modal_form_response": "packet_modal_form_response", + "server_settings_request": "packet_server_settings_request", + "server_settings_response": "packet_server_settings_response", + "show_profile": "packet_show_profile", + "set_default_game_type": "packet_set_default_game_type", + "remove_objective": "packet_remove_objective", + "set_display_objective": "packet_set_display_objective", + "set_score": "packet_set_score", + "lab_table": "packet_lab_table", + "update_block_synced": "packet_update_block_synced", + "move_entity_delta": "packet_move_entity_delta", + "set_scoreboard_identity": "packet_set_scoreboard_identity", + "set_local_player_as_initialized": "packet_set_local_player_as_initialized", + "update_soft_enum": "packet_update_soft_enum", + "network_stack_latency": "packet_network_stack_latency", + "script_custom_event": "packet_script_custom_event", + "spawn_particle_effect": "packet_spawn_particle_effect", + "available_entity_identifiers": "packet_available_entity_identifiers", + "level_sound_event_v2": "packet_level_sound_event_v2", + "network_chunk_publisher_update": "packet_network_chunk_publisher_update", + "biome_definition_list": "packet_biome_definition_list", + "level_sound_event": "packet_level_sound_event", + "level_event_generic": "packet_level_event_generic", + "lectern_update": "packet_lectern_update", + "video_stream_connect": "packet_video_stream_connect", + "add_ecs_entity": "packet_add_ecs_entity", + "remove_ecs_entity": "packet_remove_ecs_entity", + "client_cache_status": "packet_client_cache_status", + "on_screen_texture_animation": "packet_on_screen_texture_animation", + "map_create_locked_copy": "packet_map_create_locked_copy", + "structure_template_data_export_request": "packet_structure_template_data_export_request", + "structure_template_data_export_response": "packet_structure_template_data_export_response", + "update_block_properties": "packet_update_block_properties", + "client_cache_blob_status": "packet_client_cache_blob_status", + "client_cache_miss_response": "packet_client_cache_miss_response", + "education_settings": "packet_education_settings", + "multiplayer_settings": "packet_multiplayer_settings", + "settings_command": "packet_settings_command", + "anvil_damage": "packet_anvil_damage", + "completed_using_item": "packet_completed_using_item", + "network_settings": "packet_network_settings", + "player_auth_input": "packet_player_auth_input", + "creative_content": "packet_creative_content", + "player_enchant_options": "packet_player_enchant_options", + "item_stack_request": "packet_item_stack_request", + "item_stack_response": "packet_item_stack_response", + "player_armor_damage": "packet_player_armor_damage", + "update_player_game_type": "packet_update_player_game_type", + "position_tracking_db_request": "packet_position_tracking_db_request", + "position_tracking_db_broadcast": "packet_position_tracking_db_broadcast", + "packet_violation_warning": "packet_packet_violation_warning", + "motion_prediction_hints": "packet_motion_prediction_hints", + "animate_entity": "packet_animate_entity", + "camera_shake": "packet_camera_shake", + "player_fog": "packet_player_fog", + "correct_player_move_prediction": "packet_correct_player_move_prediction", + "item_component": "packet_item_component", + "filter_text_packet": "packet_filter_text_packet", + "debug_renderer": "packet_debug_renderer", + "sync_entity_property": "packet_sync_entity_property", + "add_volume_entity": "packet_add_volume_entity", + "remove_volume_entity": "packet_remove_volume_entity", + "simulation_type": "packet_simulation_type", + "npc_dialogue": "packet_npc_dialogue" + }, + "default": "void" + } + ] + } + ] + ], + "packet_login": [ + "container", + [ + { + "name": "protocol_version", + "type": "i32" + }, + { + "name": "tokens", + "type": [ + "encapsulated", + { + "lengthType": "varint", + "type": "LoginTokens" + } + ] + } + ] + ], + "LoginTokens": [ + "container", + [ + { + "name": "identity", + "type": "LittleString" + }, + { + "name": "client", + "type": "LittleString" + } + ] + ], + "packet_play_status": [ + "container", + [ + { + "name": "status", + "type": [ + "mapper", + { + "type": "i32", + "mappings": { + "0": "login_success", + "1": "failed_client", + "2": "failed_spawn", + "3": "player_spawn", + "4": "failed_invalid_tenant", + "5": "failed_vanilla_edu", + "6": "failed_edu_vanilla", + "7": "failed_server_full" + } + } + ] + } + ] + ], + "packet_server_to_client_handshake": [ + "container", + [ + { + "name": "token", + "type": "string" + } + ] + ], + "packet_client_to_server_handshake": [ + "container", + [] + ], + "packet_disconnect": [ + "container", + [ + { + "name": "hide_disconnect_reason", + "type": "bool" + }, + { + "name": "message", + "type": "string" + } + ] + ], + "packet_resource_packs_info": [ + "container", + [ + { + "name": "must_accept", + "type": "bool" + }, + { + "name": "has_scripts", + "type": "bool" + }, + { + "name": "behaviour_packs", + "type": "BehaviourPackInfos" + }, + { + "name": "texture_packs", + "type": "TexturePackInfos" + }, + { + "name": "force_server_packs", + "type": "bool" + } + ] + ], + "packet_resource_pack_stack": [ + "container", + [ + { + "name": "must_accept", + "type": "bool" + }, + { + "name": "behavior_packs", + "type": "ResourcePackIdVersions" + }, + { + "name": "resource_packs", + "type": "ResourcePackIdVersions" + }, + { + "name": "game_version", + "type": "string" + }, + { + "name": "experiments", + "type": "Experiments" + }, + { + "name": "experiments_previously_used", + "type": "bool" + } + ] + ], + "packet_resource_pack_client_response": [ + "container", + [ + { + "name": "response_status", + "type": [ + "mapper", + { + "type": "u8", + "mappings": { + "0": "none", + "1": "refused", + "2": "send_packs", + "3": "have_all_packs", + "4": "completed" + } + } + ] + }, + { + "name": "resourcepackids", + "type": "ResourcePackIds" + } + ] + ], + "packet_text": [ + "container", + [ + { + "name": "type", + "type": [ + "mapper", + { + "type": "u8", + "mappings": { + "0": "raw", + "1": "chat", + "2": "translation", + "3": "popup", + "4": "jukebox_popup", + "5": "tip", + "6": "system", + "7": "whisper", + "8": "announcement", + "9": "json_whisper", + "10": "json" + } + } + ] + }, + { + "name": "needs_translation", + "type": "bool" + }, + { + "anon": true, + "type": [ + "switch", + { + "compareTo": "type", + "fields": { + "chat": [ + "container", + [ + { + "name": "source_name", + "type": "string" + }, + { + "name": "message", + "type": "string" + } + ] + ], + "whisper": [ + "container", + [ + { + "name": "source_name", + "type": "string" + }, + { + "name": "message", + "type": "string" + } + ] + ], + "announcement": [ + "container", + [ + { + "name": "source_name", + "type": "string" + }, + { + "name": "message", + "type": "string" + } + ] + ], + "raw": [ + "container", + [ + { + "name": "message", + "type": "string" + } + ] + ], + "tip": [ + "container", + [ + { + "name": "message", + "type": "string" + } + ] + ], + "system": [ + "container", + [ + { + "name": "message", + "type": "string" + } + ] + ], + "json_whisper": [ + "container", + [ + { + "name": "message", + "type": "string" + } + ] + ], + "json": [ + "container", + [ + { + "name": "message", + "type": "string" + } + ] + ], + "translation": [ + "container", + [ + { + "name": "message", + "type": "string" + }, + { + "name": "paramaters", + "type": [ + "array", + { + "countType": "varint", + "type": "string" + } + ] + } + ] + ], + "popup": [ + "container", + [ + { + "name": "message", + "type": "string" + }, + { + "name": "paramaters", + "type": [ + "array", + { + "countType": "varint", + "type": "string" + } + ] + } + ] + ], + "jukebox_popup": [ + "container", + [ + { + "name": "message", + "type": "string" + }, + { + "name": "paramaters", + "type": [ + "array", + { + "countType": "varint", + "type": "string" + } + ] + } + ] + ] + }, + "default": "void" + } + ] + }, + { + "name": "xuid", + "type": "string" + }, + { + "name": "platform_chat_id", + "type": "string" + } + ] + ], + "packet_set_time": [ + "container", + [ + { + "name": "time", + "type": "zigzag32" + } + ] + ], + "packet_start_game": [ + "container", + [ + { + "name": "entity_id", + "type": "zigzag64" + }, + { + "name": "runtime_entity_id", + "type": "varint64" + }, + { + "name": "player_gamemode", + "type": "GameMode" + }, + { + "name": "player_position", + "type": "vec3f" + }, + { + "name": "rotation", + "type": "vec2f" + }, + { + "name": "seed", + "type": "zigzag32" + }, + { + "name": "biome_type", + "type": "li16" + }, + { + "name": "biome_name", + "type": "string" + }, + { + "name": "dimension", + "type": "zigzag32" + }, + { + "name": "generator", + "type": "zigzag32" + }, + { + "name": "world_gamemode", + "type": "GameMode" + }, + { + "name": "difficulty", + "type": "zigzag32" + }, + { + "name": "spawn_position", + "type": "BlockCoordinates" + }, + { + "name": "achievements_disabled", + "type": "bool" + }, + { + "name": "day_cycle_stop_time", + "type": "zigzag32" + }, + { + "name": "edu_offer", + "type": "zigzag32" + }, + { + "name": "edu_features_enabled", + "type": "bool" + }, + { + "name": "edu_product_uuid", + "type": "string" + }, + { + "name": "rain_level", + "type": "lf32" + }, + { + "name": "lightning_level", + "type": "lf32" + }, + { + "name": "has_confirmed_platform_locked_content", + "type": "bool" + }, + { + "name": "is_multiplayer", + "type": "bool" + }, + { + "name": "broadcast_to_lan", + "type": "bool" + }, + { + "name": "xbox_live_broadcast_mode", + "type": "varint" + }, + { + "name": "platform_broadcast_mode", + "type": "varint" + }, + { + "name": "enable_commands", + "type": "bool" + }, + { + "name": "is_texturepacks_required", + "type": "bool" + }, + { + "name": "gamerules", + "type": "GameRules" + }, + { + "name": "experiments", + "type": "Experiments" + }, + { + "name": "experiments_previously_used", + "type": "bool" + }, + { + "name": "bonus_chest", + "type": "bool" + }, + { + "name": "map_enabled", + "type": "bool" + }, + { + "name": "permission_level", + "type": "zigzag32" + }, + { + "name": "server_chunk_tick_range", + "type": "li32" + }, + { + "name": "has_locked_behavior_pack", + "type": "bool" + }, + { + "name": "has_locked_resource_pack", + "type": "bool" + }, + { + "name": "is_from_locked_world_template", + "type": "bool" + }, + { + "name": "msa_gamertags_only", + "type": "bool" + }, + { + "name": "is_from_world_template", + "type": "bool" + }, + { + "name": "is_world_template_option_locked", + "type": "bool" + }, + { + "name": "only_spawn_v1_villagers", + "type": "bool" + }, + { + "name": "game_version", + "type": "string" + }, + { + "name": "limited_world_width", + "type": "li32" + }, + { + "name": "limited_world_length", + "type": "li32" + }, + { + "name": "is_new_nether", + "type": "bool" + }, + { + "name": "experimental_gameplay_override", + "type": "bool" + }, + { + "name": "level_id", + "type": "string" + }, + { + "name": "world_name", + "type": "string" + }, + { + "name": "premium_world_template_id", + "type": "string" + }, + { + "name": "is_trial", + "type": "bool" + }, + { + "name": "movement_authority", + "type": [ + "mapper", + { + "type": "zigzag32", + "mappings": { + "0": "client", + "1": "server", + "2": "server_with_rewind" + } + } + ] + }, + { + "name": "rewind_history_size", + "type": "zigzag32" + }, + { + "name": "server_authoritative_block_breaking", + "type": "bool" + }, + { + "name": "current_tick", + "type": "li64" + }, + { + "name": "enchantment_seed", + "type": "zigzag32" + }, + { + "name": "block_properties", + "type": "BlockProperties" + }, + { + "name": "itemstates", + "type": "Itemstates" + }, + { + "name": "multiplayer_correlation_id", + "type": "string" + }, + { + "name": "server_authoritative_inventory", + "type": "bool" + }, + { + "name": "engine", + "type": "string" + } + ] + ], + "packet_add_player": [ + "container", + [ + { + "name": "uuid", + "type": "uuid" + }, + { + "name": "username", + "type": "string" + }, + { + "name": "entity_id_self", + "type": "zigzag64" + }, + { + "name": "runtime_entity_id", + "type": "varint64" + }, + { + "name": "platform_chat_id", + "type": "string" + }, + { + "name": "position", + "type": "vec3f" + }, + { + "name": "velocity", + "type": "vec3f" + }, + { + "name": "pitch", + "type": "lf32" + }, + { + "name": "yaw", + "type": "lf32" + }, + { + "name": "head_yaw", + "type": "lf32" + }, + { + "name": "held_item", + "type": "Item" + }, + { + "name": "metadata", + "type": "MetadataDictionary" + }, + { + "name": "flags", + "type": "varint" + }, + { + "name": "command_permission", + "type": "varint" + }, + { + "name": "action_permissions", + "type": "varint" + }, + { + "name": "permission_level", + "type": "varint" + }, + { + "name": "custom_stored_permissions", + "type": "varint" + }, + { + "name": "user_id", + "type": "li64" + }, + { + "name": "links", + "type": "Links" + }, + { + "name": "device_id", + "type": "string" + }, + { + "name": "device_os", + "type": "li32" + } + ] + ], + "packet_add_entity": [ + "container", + [ + { + "name": "entity_id_self", + "type": "zigzag64" + }, + { + "name": "runtime_entity_id", + "type": "varint64" + }, + { + "name": "entity_type", + "type": "string" + }, + { + "name": "position", + "type": "vec3f" + }, + { + "name": "velocity", + "type": "vec3f" + }, + { + "name": "pitch", + "type": "lf32" + }, + { + "name": "yaw", + "type": "lf32" + }, + { + "name": "head_yaw", + "type": "lf32" + }, + { + "name": "attributes", + "type": "EntityAttributes" + }, + { + "name": "metadata", + "type": "MetadataDictionary" + }, + { + "name": "links", + "type": "Links" + } + ] + ], + "packet_remove_entity": [ + "container", + [ + { + "name": "entity_id_self", + "type": "zigzag64" + } + ] + ], + "packet_add_item_entity": [ + "container", + [ + { + "name": "entity_id_self", + "type": "zigzag64" + }, + { + "name": "runtime_entity_id", + "type": "varint64" + }, + { + "name": "item", + "type": "Item" + }, + { + "name": "position", + "type": "vec3f" + }, + { + "name": "velocity", + "type": "vec3f" + }, + { + "name": "metadata", + "type": "MetadataDictionary" + }, + { + "name": "is_from_fishing", + "type": "bool" + } + ] + ], + "packet_take_item_entity": [ + "container", + [ + { + "name": "runtime_entity_id", + "type": "varint64" + }, + { + "name": "target", + "type": "varint" + } + ] + ], + "packet_move_entity": [ + "container", + [ + { + "name": "runtime_entity_id", + "type": "varint64" + }, + { + "name": "flags", + "type": "u8" + }, + { + "name": "position", + "type": "vec3f" + }, + { + "name": "rotation", + "type": "Rotation" + } + ] + ], + "packet_move_player": [ + "container", + [ + { + "name": "runtime_id", + "type": "varint" + }, + { + "name": "position", + "type": "vec3f" + }, + { + "name": "pitch", + "type": "lf32" + }, + { + "name": "yaw", + "type": "lf32" + }, + { + "name": "head_yaw", + "type": "lf32" + }, + { + "name": "mode", + "type": [ + "mapper", + { + "type": "u8", + "mappings": { + "0": "normal", + "1": "reset", + "2": "teleport", + "3": "rotation" + } + } + ] + }, + { + "name": "on_ground", + "type": "bool" + }, + { + "name": "ridden_runtime_id", + "type": "varint" + }, + { + "name": "teleport", + "type": [ + "switch", + { + "compareTo": "mode", + "fields": { + "teleport": [ + "container", + [ + { + "name": "cause", + "type": [ + "mapper", + { + "type": "li32", + "mappings": { + "0": "unknown", + "1": "projectile", + "2": "chorus_fruit", + "3": "command", + "4": "behavior" + } + } + ] + }, + { + "name": "source_entity_type", + "type": "LegacyEntityType" + } + ] + ] + }, + "default": "void" + } + ] + }, + { + "name": "tick", + "type": "varint64" + } + ] + ], + "packet_rider_jump": [ + "container", + [ + { + "name": "jump_strength", + "type": "zigzag32" + } + ] + ], + "packet_update_block": [ + "container", + [ + { + "name": "position", + "type": "BlockCoordinates" + }, + { + "name": "block_runtime_id", + "type": "varint" + }, + { + "name": "flags", + "type": "UpdateBlockFlags" + }, + { + "name": "layer", + "type": "varint" + } + ] + ], + "packet_add_painting": [ + "container", + [ + { + "name": "entity_id_self", + "type": "zigzag64" + }, + { + "name": "runtime_entity_id", + "type": "varint64" + }, + { + "name": "coordinates", + "type": "vec3f" + }, + { + "name": "direction", + "type": "zigzag32" + }, + { + "name": "title", + "type": "string" + } + ] + ], + "packet_tick_sync": [ + "container", + [ + { + "name": "request_time", + "type": "li64" + }, + { + "name": "response_time", + "type": "li64" + } + ] + ], + "packet_level_sound_event_old": [ + "container", + [ + { + "name": "sound_id", + "type": "u8" + }, + { + "name": "position", + "type": "vec3f" + }, + { + "name": "block_id", + "type": "zigzag32" + }, + { + "name": "entity_type", + "type": "zigzag32" + }, + { + "name": "is_baby_mob", + "type": "bool" + }, + { + "name": "is_global", + "type": "bool" + } + ] + ], + "packet_level_event": [ + "container", + [ + { + "name": "event", + "type": [ + "mapper", + { + "type": "zigzag32", + "mappings": { + "1000": "sound_click", + "1001": "sound_click_fail", + "1002": "sound_shoot", + "1003": "sound_door", + "1004": "sound_fizz", + "1005": "sound_ignite", + "1007": "sound_ghast", + "1008": "sound_ghast_shoot", + "1009": "sound_blaze_shoot", + "1010": "sound_door_bump", + "1012": "sound_door_crash", + "1018": "sound_enderman_teleport", + "1020": "sound_anvil_break", + "1021": "sound_anvil_use", + "1022": "sound_anvil_fall", + "1030": "sound_pop", + "1032": "sound_portal", + "1040": "sound_itemframe_add_item", + "1041": "sound_itemframe_remove", + "1042": "sound_itemframe_place", + "1043": "sound_itemframe_remove_item", + "1044": "sound_itemframe_rotate_item", + "1050": "sound_camera", + "1051": "sound_orb", + "1052": "sound_totem", + "1060": "sound_armor_stand_break", + "1061": "sound_armor_stand_hit", + "1062": "sound_armor_stand_fall", + "1063": "sound_armor_stand_place", + "1064": "pointed_dripstone_land", + "1065": "dye_used", + "1066": "ink_sack_used", + "2000": "particle_shoot", + "2001": "particle_destroy", + "2002": "particle_splash", + "2003": "particle_eye_despawn", + "2004": "particle_spawn", + "2005": "particle_crop_growth", + "2006": "particle_guardian_curse", + "2007": "particle_death_smoke", + "2008": "particle_block_force_field", + "2009": "particle_projectile_hit", + "2010": "particle_dragon_egg_teleport", + "2011": "particle_crop_eaten", + "2012": "particle_critical", + "2013": "particle_enderman_teleport", + "2014": "particle_punch_block", + "2015": "particle_bubble", + "2016": "particle_evaporate", + "2017": "particle_destroy_armor_stand", + "2018": "particle_breaking_egg", + "2019": "particle_destroy_egg", + "2020": "particle_evaporate_water", + "2021": "particle_destroy_block_no_sound", + "2022": "particle_knockback_roar", + "2023": "particle_teleport_trail", + "2024": "particle_point_cloud", + "2025": "particle_explosion", + "2026": "particle_block_explosion", + "2027": "particle_vibration_signal", + "2028": "particle_dripstone_drip", + "2029": "particle_fizz_effect", + "2030": "particle_wax_on", + "2031": "particle_wax_off", + "2032": "particle_scrape", + "2033": "particle_electric_spark", + "3001": "start_rain", + "3002": "start_thunder", + "3003": "stop_rain", + "3004": "stop_thunder", + "3005": "pause_game", + "3006": "pause_game_no_screen", + "3007": "set_game_speed", + "3500": "redstone_trigger", + "3501": "cauldron_explode", + "3502": "cauldron_dye_armor", + "3503": "cauldron_clean_armor", + "3504": "cauldron_fill_potion", + "3505": "cauldron_take_potion", + "3506": "cauldron_fill_water", + "3507": "cauldron_take_water", + "3508": "cauldron_add_dye", + "3509": "cauldron_clean_banner", + "3600": "block_start_break", + "3601": "block_stop_break", + "4000": "set_data", + "9800": "players_sleeping", + "16384": "add_particle_mask", + "16385": "particle_bubble", + "16386": "particle_bubble_manual", + "16387": "particle_critical", + "16388": "particle_block_force_field", + "16389": "particle_smoke", + "16390": "particle_explode", + "16391": "particle_evaporation", + "16392": "particle_flame", + "16393": "particle_candle_flame", + "16394": "particle_lava", + "16395": "particle_large_smoke", + "16396": "particle_redstone", + "16397": "particle_rising_red_dust", + "16398": "particle_item_break", + "16399": "particle_snowball_poof", + "16400": "particle_huge_explode", + "16401": "particle_huge_explode_seed", + "16402": "particle_mob_flame", + "16403": "particle_heart", + "16404": "particle_terrain", + "16405": "particle_town_aura", + "16406": "particle_portal", + "16408": "particle_water_splash", + "16409": "particle_water_splash_manual", + "16410": "particle_water_wake", + "16411": "particle_drip_water", + "16412": "particle_drip_lava", + "16413": "particle_drip_honey", + "16414": "particle_stalactite_drip_water", + "16415": "particle_stalactite_drip_lava", + "16416": "particle_falling_dust", + "16417": "particle_mob_spell", + "16418": "particle_mob_spell_ambient", + "16419": "particle_mob_spell_instantaneous", + "16420": "particle_ink", + "16421": "particle_slime", + "16422": "particle_rain_splash", + "16423": "particle_villager_angry", + "16424": "particle_villager_happy", + "16425": "particle_enchantment_table", + "16426": "particle_tracking_emitter", + "16427": "particle_note", + "16428": "particle_witch_spell", + "16429": "particle_carrot", + "16430": "particle_mob_appearance", + "16431": "particle_end_rod", + "16432": "particle_dragons_breath", + "16433": "particle_spit", + "16434": "particle_totem", + "16435": "particle_food", + "16436": "particle_fireworks_starter", + "16437": "particle_fireworks_spark", + "16438": "particle_fireworks_overlay", + "16439": "particle_balloon_gas", + "16440": "particle_colored_flame", + "16441": "particle_sparkler", + "16442": "particle_conduit", + "16443": "particle_bubble_column_up", + "16444": "particle_bubble_column_down", + "16445": "particle_sneeze", + "16446": "particle_shulker_bullet", + "16447": "particle_bleach", + "16448": "particle_dragon_destroy_block", + "16449": "particle_mycelium_dust", + "16450": "particle_falling_red_dust", + "16451": "particle_campfire_smoke", + "16452": "particle_tall_campfire_smoke", + "16453": "particle_dragon_breath_fire", + "16454": "particle_dragon_breath_trail", + "16455": "particle_blue_flame", + "16456": "particle_soul", + "16457": "particle_obsidian_tear", + "16458": "particle_portal_reverse", + "16459": "particle_snowflake", + "16460": "particle_vibration_signal", + "16461": "particle_sculk_sensor_redstone", + "16462": "particle_spore_blossom_shower", + "16463": "particle_spore_blossom_ambient", + "16464": "particle_wax", + "16465": "particle_electric_spark" + } + } + ] + }, + { + "name": "position", + "type": "vec3f" + }, + { + "name": "data", + "type": "zigzag32" + } + ] + ], + "packet_block_event": [ + "container", + [ + { + "name": "position", + "type": "BlockCoordinates" + }, + { + "name": "type", + "type": [ + "mapper", + { + "type": "zigzag32", + "mappings": { + "0": "sound", + "1": "change_state" + } + } + ] + }, + { + "name": "data", + "type": "zigzag32" + } + ] + ], + "packet_entity_event": [ + "container", + [ + { + "name": "runtime_entity_id", + "type": "varint64" + }, + { + "name": "event_id", + "type": [ + "mapper", + { + "type": "u8", + "mappings": { + "1": "jump", + "2": "hurt_animation", + "3": "death_animation", + "4": "arm_swing", + "5": "stop_attack", + "6": "tame_fail", + "7": "tame_success", + "8": "shake_wet", + "9": "use_item", + "10": "eat_grass_animation", + "11": "fish_hook_bubble", + "12": "fish_hook_position", + "13": "fish_hook_hook", + "14": "fish_hook_tease", + "15": "squid_ink_cloud", + "16": "zombie_villager_cure", + "18": "respawn", + "19": "iron_golem_offer_flower", + "20": "iron_golem_withdraw_flower", + "21": "love_particles", + "22": "villager_angry", + "23": "villager_happy", + "24": "witch_spell_particles", + "25": "firework_particles", + "26": "in_love_particles", + "27": "silverfish_spawn_animation", + "28": "guardian_attack", + "29": "witch_drink_potion", + "30": "witch_throw_potion", + "31": "minecart_tnt_prime_fuse", + "32": "creeper_prime_fuse", + "33": "air_supply_expired", + "34": "player_add_xp_levels", + "35": "elder_guardian_curse", + "36": "agent_arm_swing", + "37": "ender_dragon_death", + "38": "dust_particles", + "39": "arrow_shake", + "57": "eating_item", + "60": "baby_animal_feed", + "61": "death_smoke_cloud", + "62": "complete_trade", + "63": "remove_leash", + "65": "consume_totem", + "66": "player_check_treasure_hunter_achievement", + "67": "entity_spawn", + "68": "dragon_puke", + "69": "item_entity_merge", + "70": "start_swim", + "71": "balloon_pop", + "72": "treasure_hunt", + "73": "agent_summon", + "74": "charged_crossbow", + "75": "fall" + } + } + ] + }, + { + "name": "data", + "type": "zigzag32" + } + ] + ], + "packet_mob_effect": [ + "container", + [ + { + "name": "runtime_entity_id", + "type": "varint64" + }, + { + "name": "event_id", + "type": "u8" + }, + { + "name": "effect_id", + "type": "zigzag32" + }, + { + "name": "amplifier", + "type": "zigzag32" + }, + { + "name": "particles", + "type": "bool" + }, + { + "name": "duration", + "type": "zigzag32" + } + ] + ], + "packet_update_attributes": [ + "container", + [ + { + "name": "runtime_entity_id", + "type": "varint64" + }, + { + "name": "attributes", + "type": "PlayerAttributes" + }, + { + "name": "tick", + "type": "varint64" + } + ] + ], + "packet_inventory_transaction": [ + "container", + [ + { + "name": "transaction", + "type": "Transaction" + } + ] + ], + "packet_mob_equipment": [ + "container", + [ + { + "name": "runtime_entity_id", + "type": "varint64" + }, + { + "name": "item", + "type": "Item" + }, + { + "name": "slot", + "type": "u8" + }, + { + "name": "selected_slot", + "type": "u8" + }, + { + "name": "window_id", + "type": "WindowID" + } + ] + ], + "packet_mob_armor_equipment": [ + "container", + [ + { + "name": "runtime_entity_id", + "type": "varint64" + }, + { + "name": "helmet", + "type": "Item" + }, + { + "name": "chestplate", + "type": "Item" + }, + { + "name": "leggings", + "type": "Item" + }, + { + "name": "boots", + "type": "Item" + } + ] + ], + "packet_interact": [ + "container", + [ + { + "name": "action_id", + "type": [ + "mapper", + { + "type": "u8", + "mappings": { + "3": "leave_vehicle", + "4": "mouse_over_entity", + "6": "open_inventory" + } + } + ] + }, + { + "name": "target_entity_id", + "type": "varint64" + }, + { + "name": "position", + "type": [ + "switch", + { + "compareTo": "action_id", + "fields": { + "mouse_over_entity": "vec3f", + "leave_vehicle": "vec3f" + }, + "default": "void" + } + ] + } + ] + ], + "packet_block_pick_request": [ + "container", + [ + { + "name": "x", + "type": "zigzag32" + }, + { + "name": "y", + "type": "zigzag32" + }, + { + "name": "z", + "type": "zigzag32" + }, + { + "name": "add_user_data", + "type": "bool" + }, + { + "name": "selected_slot", + "type": "u8" + } + ] + ], + "packet_entity_pick_request": [ + "container", + [ + { + "name": "runtime_entity_id", + "type": "lu64" + }, + { + "name": "selected_slot", + "type": "u8" + } + ] + ], + "packet_player_action": [ + "container", + [ + { + "name": "runtime_entity_id", + "type": "varint64" + }, + { + "name": "action", + "type": "Action" + }, + { + "name": "position", + "type": "BlockCoordinates" + }, + { + "name": "face", + "type": "zigzag32" + } + ] + ], + "packet_hurt_armor": [ + "container", + [ + { + "name": "health", + "type": "zigzag32" + } + ] + ], + "packet_set_entity_data": [ + "container", + [ + { + "name": "runtime_entity_id", + "type": "varint64" + }, + { + "name": "metadata", + "type": "MetadataDictionary" + }, + { + "name": "tick", + "type": "varint" + } + ] + ], + "packet_set_entity_motion": [ + "container", + [ + { + "name": "runtime_entity_id", + "type": "varint64" + }, + { + "name": "velocity", + "type": "vec3f" + } + ] + ], + "packet_set_entity_link": [ + "container", + [ + { + "name": "link", + "type": "Link" + } + ] + ], + "packet_set_health": [ + "container", + [ + { + "name": "health", + "type": "zigzag32" + } + ] + ], + "packet_set_spawn_position": [ + "container", + [ + { + "name": "spawn_type", + "type": [ + "mapper", + { + "type": "zigzag32", + "mappings": { + "0": "player", + "1": "world" + } + } + ] + }, + { + "name": "player_position", + "type": "BlockCoordinates" + }, + { + "name": "dimension", + "type": "zigzag32" + }, + { + "name": "world_position", + "type": "BlockCoordinates" + } + ] + ], + "packet_animate": [ + "container", + [ + { + "name": "action_id", + "type": [ + "mapper", + { + "type": "zigzag32", + "mappings": { + "0": "none", + "1": "swing_arm", + "2": "unknown", + "3": "wake_up", + "4": "critical_hit", + "5": "magic_critical_hit", + "6": "row_right", + "7": "row_left" + } + } + ] + }, + { + "name": "runtime_entity_id", + "type": "varint64" + } + ] + ], + "packet_respawn": [ + "container", + [ + { + "name": "position", + "type": "vec3f" + }, + { + "name": "state", + "type": "u8" + }, + { + "name": "runtime_entity_id", + "type": "varint64" + } + ] + ], + "packet_container_open": [ + "container", + [ + { + "name": "window_id", + "type": "WindowID" + }, + { + "name": "window_type", + "type": "WindowType" + }, + { + "name": "coordinates", + "type": "BlockCoordinates" + }, + { + "name": "runtime_entity_id", + "type": "zigzag64" + } + ] + ], + "packet_container_close": [ + "container", + [ + { + "name": "window_id", + "type": "WindowID" + }, + { + "name": "server", + "type": "bool" + } + ] + ], + "packet_player_hotbar": [ + "container", + [ + { + "name": "selected_slot", + "type": "varint" + }, + { + "name": "window_id", + "type": "WindowID" + }, + { + "name": "select_slot", + "type": "bool" + } + ] + ], + "packet_inventory_content": [ + "container", + [ + { + "name": "window_id", + "type": "WindowIDVarint" + }, + { + "name": "input", + "type": "ItemStacks" + } + ] + ], + "packet_inventory_slot": [ + "container", + [ + { + "name": "window_id", + "type": "WindowIDVarint" + }, + { + "name": "slot", + "type": "varint" + }, + { + "name": "item", + "type": "Item" + } + ] + ], + "packet_container_set_data": [ + "container", + [ + { + "name": "window_id", + "type": "WindowID" + }, + { + "name": "property", + "type": "zigzag32" + }, + { + "name": "value", + "type": "zigzag32" + } + ] + ], + "packet_crafting_data": [ + "container", + [ + { + "name": "recipes", + "type": "Recipes" + }, + { + "name": "potion_type_recipes", + "type": "PotionTypeRecipes" + }, + { + "name": "potion_container_recipes", + "type": "PotionContainerChangeRecipes" + }, + { + "name": "is_clean", + "type": "bool" + } + ] + ], + "packet_crafting_event": [ + "container", + [ + { + "name": "window_id", + "type": "WindowID" + }, + { + "name": "recipe_type", + "type": [ + "mapper", + { + "type": "zigzag32", + "mappings": { + "0": "inventory", + "1": "crafting", + "2": "workbench" + } + } + ] + }, + { + "name": "recipe_id", + "type": "uuid" + }, + { + "name": "input", + "type": [ + "array", + { + "countType": "varint", + "type": "Item" + } + ] + }, + { + "name": "result", + "type": [ + "array", + { + "countType": "varint", + "type": "Item" + } + ] + } + ] + ], + "packet_gui_data_pick_item": [ + "container", + [ + { + "name": "item_name", + "type": "string" + }, + { + "name": "item_effects", + "type": "string" + }, + { + "name": "hotbar_slot", + "type": "li32" + } + ] + ], + "packet_adventure_settings": [ + "container", + [ + { + "name": "flags", + "type": "AdventureFlags" + }, + { + "name": "command_permission", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "normal", + "1": "operator", + "2": "host", + "3": "automation", + "4": "admin" + } + } + ] + }, + { + "name": "action_permissions", + "type": "ActionPermissions" + }, + { + "name": "permission_level", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "visitor", + "1": "member", + "2": "operator", + "3": "custom" + } + } + ] + }, + { + "name": "custom_stored_permissions", + "type": "varint" + }, + { + "name": "user_id", + "type": "li64" + } + ] + ], + "packet_block_entity_data": [ + "container", + [ + { + "name": "position", + "type": "BlockCoordinates" + }, + { + "name": "nbt", + "type": "nbt" + } + ] + ], + "packet_player_input": [ + "container", + [ + { + "name": "motion_x", + "type": "lf32" + }, + { + "name": "motion_z", + "type": "lf32" + }, + { + "name": "jumping", + "type": "bool" + }, + { + "name": "sneaking", + "type": "bool" + } + ] + ], + "packet_level_chunk": [ + "container", + [ + { + "name": "x", + "type": "zigzag32" + }, + { + "name": "z", + "type": "zigzag32" + }, + { + "name": "sub_chunk_count", + "type": "varint" + }, + { + "name": "cache_enabled", + "type": "bool" + }, + { + "name": "blobs", + "type": [ + "switch", + { + "compareTo": "cache_enabled", + "fields": { + "true": [ + "container", + [ + { + "name": "hashes", + "type": [ + "array", + { + "countType": "varint", + "type": "lu64" + } + ] + } + ] + ] + }, + "default": "void" + } + ] + }, + { + "name": "payload", + "type": "ByteArray" + } + ] + ], + "packet_set_commands_enabled": [ + "container", + [ + { + "name": "enabled", + "type": "bool" + } + ] + ], + "packet_set_difficulty": [ + "container", + [ + { + "name": "difficulty", + "type": "varint" + } + ] + ], + "packet_change_dimension": [ + "container", + [ + { + "name": "dimension", + "type": "zigzag32" + }, + { + "name": "position", + "type": "vec3f" + }, + { + "name": "respawn", + "type": "bool" + } + ] + ], + "packet_set_player_game_type": [ + "container", + [ + { + "name": "gamemode", + "type": "GameMode" + } + ] + ], + "packet_player_list": [ + "container", + [ + { + "name": "records", + "type": "PlayerRecords" + } + ] + ], + "packet_simple_event": [ + "container", + [ + { + "name": "event_type", + "type": "lu16" + } + ] + ], + "packet_event": [ + "container", + [ + { + "name": "runtime_id", + "type": "varint64" + }, + { + "name": "event_type", + "type": [ + "mapper", + { + "type": "zigzag32", + "mappings": { + "0": "achievement_awarded", + "1": "entity_interact", + "2": "portal_built", + "3": "portal_used", + "4": "mob_killed", + "5": "cauldron_used", + "6": "player_death", + "7": "boss_killed", + "8": "agent_command", + "9": "agent_created", + "10": "banner_pattern_removed", + "11": "commaned_executed", + "12": "fish_bucketed", + "13": "mob_born", + "14": "pet_died", + "15": "cauldron_block_used", + "16": "composter_block_used", + "17": "bell_block_used", + "18": "actor_definition", + "19": "raid_update", + "20": "player_movement_anomaly", + "21": "player_moement_corrected", + "22": "honey_harvested", + "23": "target_block_hit", + "24": "piglin_barter", + "25": "waxed_or_unwaxed_copper" + } + } + ] + }, + { + "name": "use_player_id", + "type": "u8" + }, + { + "name": "event_data", + "type": "restBuffer" + } + ] + ], + "packet_spawn_experience_orb": [ + "container", + [ + { + "name": "position", + "type": "vec3f" + }, + { + "name": "count", + "type": "zigzag32" + } + ] + ], + "packet_clientbound_map_item_data": [ + "container", + [ + { + "name": "map_id", + "type": "zigzag64" + }, + { + "name": "update_flags", + "type": "UpdateMapFlags" + }, + { + "name": "dimension", + "type": "u8" + }, + { + "name": "locked", + "type": "bool" + }, + { + "name": "included_in", + "type": [ + "switch", + { + "compareTo": "update_flags.initialisation", + "fields": { + "true": [ + "array", + { + "countType": "varint", + "type": "zigzag64" + } + ] + }, + "default": "void" + } + ] + }, + { + "name": "scale", + "type": [ + "switch", + { + "compareTo": "update_flags.initialisation || update_flags.decoration || update_flags.texture", + "fields": { + "true": "u8" + }, + "default": "void" + } + ] + }, + { + "name": "tracked", + "type": [ + "switch", + { + "compareTo": "update_flags.decoration", + "fields": { + "true": [ + "container", + [ + { + "name": "objects", + "type": [ + "array", + { + "countType": "varint", + "type": "TrackedObject" + } + ] + }, + { + "name": "decorations", + "type": [ + "array", + { + "countType": "varint", + "type": "MapDecoration" + } + ] + } + ] + ] + }, + "default": "void" + } + ] + }, + { + "name": "texture", + "type": [ + "switch", + { + "compareTo": "update_flags.texture", + "fields": { + "true": [ + "container", + [ + { + "name": "width", + "type": "zigzag32" + }, + { + "name": "height", + "type": "zigzag32" + }, + { + "name": "x_offset", + "type": "zigzag32" + }, + { + "name": "y_offset", + "type": "zigzag32" + }, + { + "name": "pixels", + "type": [ + "array", + { + "countType": "varint", + "type": "varint" + } + ] + } + ] + ] + }, + "default": "void" + } + ] + } + ] + ], + "packet_map_info_request": [ + "container", + [ + { + "name": "map_id", + "type": "zigzag64" + } + ] + ], + "packet_request_chunk_radius": [ + "container", + [ + { + "name": "chunk_radius", + "type": "zigzag32" + } + ] + ], + "packet_chunk_radius_update": [ + "container", + [ + { + "name": "chunk_radius", + "type": "zigzag32" + } + ] + ], + "packet_item_frame_drop_item": [ + "container", + [ + { + "name": "coordinates", + "type": "BlockCoordinates" + } + ] + ], + "packet_game_rules_changed": [ + "container", + [ + { + "name": "rules", + "type": "GameRules" + } + ] + ], + "packet_camera": [ + "container", + [ + { + "name": "camera_entity_unique_id", + "type": "zigzag64" + }, + { + "name": "target_player_unique_id", + "type": "zigzag64" + } + ] + ], + "packet_boss_event": [ + "container", + [ + { + "name": "boss_entity_id", + "type": "zigzag64" + }, + { + "name": "type", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "show_bar", + "1": "register_player", + "2": "hide_bar", + "3": "unregister_player", + "4": "set_bar_progress", + "5": "set_bar_title", + "6": "update_properties", + "7": "texture" + } + } + ] + }, + { + "anon": true, + "type": [ + "switch", + { + "compareTo": "type", + "fields": { + "show_bar": [ + "container", + [ + { + "name": "title", + "type": "string" + }, + { + "name": "progress", + "type": "lf32" + }, + { + "name": "screen_darkening", + "type": "li16" + }, + { + "name": "color", + "type": "varint" + }, + { + "name": "overlay", + "type": "varint" + } + ] + ], + "register_player": [ + "container", + [ + { + "name": "player_id", + "type": "zigzag64" + } + ] + ], + "unregister_player": [ + "container", + [ + { + "name": "player_id", + "type": "zigzag64" + } + ] + ], + "set_bar_progress": [ + "container", + [ + { + "name": "progress", + "type": "lf32" + } + ] + ], + "set_bar_title": [ + "container", + [ + { + "name": "title", + "type": "string" + } + ] + ], + "update_properties": [ + "container", + [ + { + "name": "screen_darkening", + "type": "li16" + }, + { + "name": "color", + "type": "varint" + }, + { + "name": "overlay", + "type": "varint" + } + ] + ], + "texture": [ + "container", + [ + { + "name": "color", + "type": "varint" + }, + { + "name": "overlay", + "type": "varint" + } + ] + ] + }, + "default": "void" + } + ] + } + ] + ], + "packet_show_credits": [ + "container", + [ + { + "name": "runtime_entity_id", + "type": "varint64" + }, + { + "name": "status", + "type": "zigzag32" + } + ] + ], + "packet_available_commands": [ + "container", + [ + { + "name": "values_len", + "type": "varint" + }, + { + "name": "_enum_type", + "type": [ + "enum_size_based_on_values_len" + ] + }, + { + "name": "enum_values", + "type": [ + "array", + { + "count": "values_len", + "type": "string" + } + ] + }, + { + "name": "suffixes", + "type": [ + "array", + { + "countType": "varint", + "type": "string" + } + ] + }, + { + "name": "enums", + "type": [ + "array", + { + "countType": "varint", + "type": [ + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "values", + "type": [ + "array", + { + "countType": "varint", + "type": [ + "switch", + { + "compareTo": "../_enum_type", + "fields": { + "byte": "u8", + "short": "lu16", + "int": "lu32" + }, + "default": "void" + } + ] + } + ] + } + ] + ] + } + ] + }, + { + "name": "command_data", + "type": [ + "array", + { + "countType": "varint", + "type": [ + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "description", + "type": "string" + }, + { + "name": "flags", + "type": "lu16" + }, + { + "name": "permission_level", + "type": "u8" + }, + { + "name": "alias", + "type": "li32" + }, + { + "name": "overloads", + "type": [ + "array", + { + "countType": "varint", + "type": [ + "array", + { + "countType": "varint", + "type": [ + "container", + [ + { + "name": "paramater_name", + "type": "string" + }, + { + "name": "value_type", + "type": [ + "mapper", + { + "type": "lu16", + "mappings": { + "1": "int", + "2": "float", + "3": "value", + "4": "wildcard_int", + "5": "operator", + "6": "target", + "16": "file_path", + "32": "string", + "40": "position", + "44": "message", + "46": "raw_text", + "50": "json", + "63": "command" + } + } + ] + }, + { + "name": "enum_type", + "type": [ + "mapper", + { + "type": "lu16", + "mappings": { + "16": "valid", + "32": "enum", + "256": "suffixed", + "1024": "soft_enum" + } + } + ] + }, + { + "name": "optional", + "type": "bool" + }, + { + "name": "options", + "type": "CommandFlags" + } + ] + ] + } + ] + } + ] + } + ] + ] + } + ] + }, + { + "name": "dynamic_enums", + "type": [ + "array", + { + "countType": "varint", + "type": [ + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "values", + "type": [ + "array", + { + "countType": "varint", + "type": "string" + } + ] + } + ] + ] + } + ] + }, + { + "name": "enum_constraints", + "type": [ + "array", + { + "countType": "varint", + "type": [ + "container", + [ + { + "name": "value_index", + "type": "li32" + }, + { + "name": "enum_index", + "type": "li32" + }, + { + "name": "constraints", + "type": [ + "array", + { + "countType": "varint", + "type": [ + "container", + [ + { + "name": "constraint", + "type": [ + "mapper", + { + "type": "u8", + "mappings": { + "0": "cheats_enabled", + "1": "operator_permissions", + "2": "host_permissions" + } + } + ] + } + ] + ] + } + ] + } + ] + ] + } + ] + } + ] + ], + "packet_command_request": [ + "container", + [ + { + "name": "command", + "type": "string" + }, + { + "name": "origin", + "type": "CommandOrigin" + }, + { + "name": "interval", + "type": "bool" + } + ] + ], + "packet_command_block_update": [ + "container", + [ + { + "name": "is_block", + "type": "bool" + }, + { + "anon": true, + "type": [ + "switch", + { + "compareTo": "is_block", + "fields": { + "true": [ + "container", + [ + { + "name": "position", + "type": "BlockCoordinates" + }, + { + "name": "mode", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "impulse", + "1": "repeat", + "2": "chain" + } + } + ] + }, + { + "name": "needs_redstone", + "type": "bool" + }, + { + "name": "conditional", + "type": "bool" + } + ] + ] + }, + "default": [ + "container", + [ + { + "name": "minecart_entity_runtime_id", + "type": "varint64" + } + ] + ] + } + ] + }, + { + "name": "command", + "type": "string" + }, + { + "name": "last_output", + "type": "string" + }, + { + "name": "name", + "type": "string" + }, + { + "name": "should_track_output", + "type": "bool" + }, + { + "name": "tick_delay", + "type": "li32" + }, + { + "name": "execute_on_first_tick", + "type": "bool" + } + ] + ], + "packet_command_output": [ + "container", + [ + { + "name": "origin", + "type": "CommandOrigin" + }, + { + "name": "output_type", + "type": [ + "mapper", + { + "type": "i8", + "mappings": { + "1": "last", + "2": "silent", + "3": "all", + "4": "data_set" + } + } + ] + }, + { + "name": "success_count", + "type": "varint" + }, + { + "name": "output", + "type": [ + "array", + { + "countType": "varint", + "type": [ + "container", + [ + { + "name": "success", + "type": "bool" + }, + { + "name": "message_id", + "type": "string" + }, + { + "name": "paramaters", + "type": [ + "array", + { + "countType": "varint", + "type": "string" + } + ] + } + ] + ] + } + ] + }, + { + "name": "data_set", + "type": [ + "switch", + { + "compareTo": "output_type", + "fields": { + "data_set": "string" + }, + "default": "void" + } + ] + } + ] + ], + "packet_update_trade": [ + "container", + [ + { + "name": "window_id", + "type": "WindowID" + }, + { + "name": "window_type", + "type": "WindowType" + }, + { + "name": "size", + "type": "varint" + }, + { + "name": "trade_tier", + "type": "varint" + }, + { + "name": "villager_unique_id", + "type": "varint64" + }, + { + "name": "entity_unique_id", + "type": "varint64" + }, + { + "name": "display_name", + "type": "string" + }, + { + "name": "new_trading_ui", + "type": "bool" + }, + { + "name": "economic_trades", + "type": "bool" + }, + { + "name": "offers", + "type": "nbt" + } + ] + ], + "packet_update_equipment": [ + "container", + [ + { + "name": "window_id", + "type": "WindowID" + }, + { + "name": "window_type", + "type": "WindowType" + }, + { + "name": "size", + "type": "u8" + }, + { + "name": "entity_id", + "type": "zigzag64" + }, + { + "name": "inventory", + "type": "nbt" + } + ] + ], + "packet_resource_pack_data_info": [ + "container", + [ + { + "name": "pack_id", + "type": "string" + }, + { + "name": "max_chunk_size", + "type": "lu32" + }, + { + "name": "chunk_count", + "type": "lu32" + }, + { + "name": "size", + "type": "lu64" + }, + { + "name": "hash", + "type": "ByteArray" + }, + { + "name": "is_premium", + "type": "bool" + }, + { + "name": "pack_type", + "type": [ + "mapper", + { + "type": "u8", + "mappings": { + "1": "addon", + "2": "cached", + "3": "copy_protected", + "4": "behavior", + "5": "persona_piece", + "6": "resources", + "7": "skins", + "8": "world_template" + } + } + ] + } + ] + ], + "packet_resource_pack_chunk_data": [ + "container", + [ + { + "name": "pack_id", + "type": "string" + }, + { + "name": "chunk_index", + "type": "lu32" + }, + { + "name": "progress", + "type": "lu64" + }, + { + "name": "payload", + "type": "ByteArray" + } + ] + ], + "packet_resource_pack_chunk_request": [ + "container", + [ + { + "name": "pack_id", + "type": "string" + }, + { + "name": "chunk_index", + "type": "lu32" + } + ] + ], + "packet_transfer": [ + "container", + [ + { + "name": "server_address", + "type": "string" + }, + { + "name": "port", + "type": "lu16" + } + ] + ], + "packet_play_sound": [ + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "coordinates", + "type": "BlockCoordinates" + }, + { + "name": "volume", + "type": "lf32" + }, + { + "name": "pitch", + "type": "lf32" + } + ] + ], + "packet_stop_sound": [ + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "stop_all", + "type": "bool" + } + ] + ], + "packet_set_title": [ + "container", + [ + { + "name": "type", + "type": [ + "mapper", + { + "type": "zigzag32", + "mappings": { + "0": "clear", + "1": "reset", + "2": "set_title", + "3": "set_subtitle", + "4": "action_bar_message", + "5": "set_durations", + "6": "set_title_json", + "7": "set_subtitle_json", + "8": "action_bar_message_json" + } + } + ] + }, + { + "name": "text", + "type": "string" + }, + { + "name": "fade_in_time", + "type": "zigzag32" + }, + { + "name": "stay_time", + "type": "zigzag32" + }, + { + "name": "fade_out_time", + "type": "zigzag32" + }, + { + "name": "xuid", + "type": "string" + }, + { + "name": "platform_online_id", + "type": "string" + } + ] + ], + "packet_add_behavior_tree": [ + "container", + [ + { + "name": "behaviortree", + "type": "string" + } + ] + ], + "packet_structure_block_update": [ + "container", + [ + { + "name": "position", + "type": "BlockCoordinates" + }, + { + "name": "structure_name", + "type": "string" + }, + { + "name": "data_field", + "type": "string" + }, + { + "name": "include_players", + "type": "bool" + }, + { + "name": "show_bounding_box", + "type": "bool" + }, + { + "name": "structure_block_type", + "type": "zigzag32" + }, + { + "name": "settings", + "type": "StructureBlockSettings" + }, + { + "name": "redstone_save_mode", + "type": "zigzag32" + }, + { + "name": "should_trigger", + "type": "bool" + } + ] + ], + "packet_show_store_offer": [ + "container", + [ + { + "name": "offer_id", + "type": "string" + }, + { + "name": "show_all", + "type": "bool" + } + ] + ], + "packet_purchase_receipt": [ + "container", + [ + { + "name": "receipts", + "type": [ + "array", + { + "countType": "varint", + "type": "string" + } + ] + } + ] + ], + "packet_player_skin": [ + "container", + [ + { + "name": "uuid", + "type": "uuid" + }, + { + "name": "skin", + "type": "Skin" + }, + { + "name": "skin_name", + "type": "string" + }, + { + "name": "old_skin_name", + "type": "string" + }, + { + "name": "is_verified", + "type": "bool" + } + ] + ], + "packet_sub_client_login": [ + "container", + [ + { + "name": "tokens", + "type": [ + "encapsulated", + { + "lengthType": "varint", + "type": "LoginTokens" + } + ] + } + ] + ], + "packet_initiate_web_socket_connection": [ + "container", + [ + { + "name": "server", + "type": "string" + } + ] + ], + "packet_set_last_hurt_by": [ + "container", + [ + { + "name": "entity_type", + "type": "varint" + } + ] + ], + "packet_book_edit": [ + "container", + [ + { + "name": "type", + "type": [ + "mapper", + { + "type": "u8", + "mappings": { + "0": "replace_page", + "1": "add_page", + "2": "delete_page", + "3": "swap_pages", + "4": "sign" + } + } + ] + }, + { + "name": "slot", + "type": "u8" + }, + { + "anon": true, + "type": [ + "switch", + { + "compareTo": "type", + "fields": { + "replace_page": [ + "container", + [ + { + "name": "page_number", + "type": "u8" + }, + { + "name": "text", + "type": "string" + }, + { + "name": "photo_name", + "type": "string" + } + ] + ], + "add_page": [ + "container", + [ + { + "name": "page_number", + "type": "u8" + }, + { + "name": "text", + "type": "string" + }, + { + "name": "photo_name", + "type": "string" + } + ] + ], + "delete_page": [ + "container", + [ + { + "name": "page_number", + "type": "u8" + } + ] + ], + "swap_pages": [ + "container", + [ + { + "name": "page1", + "type": "u8" + }, + { + "name": "page2", + "type": "u8" + } + ] + ], + "sign": [ + "container", + [ + { + "name": "title", + "type": "string" + }, + { + "name": "author", + "type": "string" + }, + { + "name": "xuid", + "type": "string" + } + ] + ] + }, + "default": "void" + } + ] + } + ] + ], + "packet_npc_request": [ + "container", + [ + { + "name": "runtime_entity_id", + "type": "varint64" + }, + { + "name": "request_type", + "type": [ + "mapper", + { + "type": "u8", + "mappings": { + "0": "set_actions", + "1": "execute_action", + "2": "execute_closing_commands", + "3": "set_name", + "4": "set_skin", + "5": "set_interaction_text" + } + } + ] + }, + { + "name": "command", + "type": "string" + }, + { + "name": "action_type", + "type": [ + "mapper", + { + "type": "u8", + "mappings": { + "0": "set_actions", + "1": "execute_action", + "2": "execute_closing_commands", + "3": "set_name", + "4": "set_skin", + "5": "set_interact_text", + "6": "execute_openining_commands" + } + } + ] + }, + { + "name": "scene_name", + "type": "string" + } + ] + ], + "packet_photo_transfer": [ + "container", + [ + { + "name": "image_name", + "type": "string" + }, + { + "name": "image_data", + "type": "string" + }, + { + "name": "book_id", + "type": "string" + } + ] + ], + "packet_modal_form_request": [ + "container", + [ + { + "name": "form_id", + "type": "varint" + }, + { + "name": "data", + "type": "string" + } + ] + ], + "packet_modal_form_response": [ + "container", + [ + { + "name": "form_id", + "type": "varint" + }, + { + "name": "data", + "type": "string" + } + ] + ], + "packet_server_settings_request": [ + "container", + [] + ], + "packet_server_settings_response": [ + "container", + [ + { + "name": "form_id", + "type": "varint" + }, + { + "name": "data", + "type": "string" + } + ] + ], + "packet_show_profile": [ + "container", + [ + { + "name": "xuid", + "type": "string" + } + ] + ], + "packet_set_default_game_type": [ + "container", + [ + { + "name": "gamemode", + "type": "GameMode" + } + ] + ], + "packet_remove_objective": [ + "container", + [ + { + "name": "objective_name", + "type": "string" + } + ] + ], + "packet_set_display_objective": [ + "container", + [ + { + "name": "display_slot", + "type": "string" + }, + { + "name": "objective_name", + "type": "string" + }, + { + "name": "display_name", + "type": "string" + }, + { + "name": "criteria_name", + "type": "string" + }, + { + "name": "sort_order", + "type": "zigzag32" + } + ] + ], + "packet_set_score": [ + "container", + [ + { + "name": "action", + "type": [ + "mapper", + { + "type": "u8", + "mappings": { + "0": "change", + "1": "remove" + } + } + ] + }, + { + "name": "entries", + "type": [ + "array", + { + "countType": "varint", + "type": [ + "container", + [ + { + "name": "scoreboard_id", + "type": "zigzag64" + }, + { + "name": "objective_name", + "type": "string" + }, + { + "name": "score", + "type": "li32" + }, + { + "anon": true, + "type": [ + "switch", + { + "compareTo": "../action", + "fields": { + "change": [ + "container", + [ + { + "name": "entry_type", + "type": [ + "mapper", + { + "type": "i8", + "mappings": { + "1": "player", + "2": "entity", + "3": "fake_player" + } + } + ] + }, + { + "name": "entity_unique_id", + "type": [ + "switch", + { + "compareTo": "entry_type", + "fields": { + "player": "zigzag64", + "entity": "zigzag64" + }, + "default": "void" + } + ] + }, + { + "name": "custom_name", + "type": [ + "switch", + { + "compareTo": "entry_type", + "fields": { + "fake_player": "string" + }, + "default": "void" + } + ] + } + ] + ] + }, + "default": "void" + } + ] + } + ] + ] + } + ] + } + ] + ], + "packet_lab_table": [ + "container", + [ + { + "name": "action_type", + "type": [ + "mapper", + { + "type": "u8", + "mappings": { + "0": "combine", + "1": "react" + } + } + ] + }, + { + "name": "position", + "type": "vec3u" + }, + { + "name": "reaction_type", + "type": "u8" + } + ] + ], + "packet_update_block_synced": [ + "container", + [ + { + "name": "position", + "type": "BlockCoordinates" + }, + { + "name": "block_runtime_id", + "type": "varint" + }, + { + "name": "flags", + "type": "UpdateBlockFlags" + }, + { + "name": "layer", + "type": "varint" + }, + { + "name": "entity_unique_id", + "type": "zigzag64" + }, + { + "name": "transition_type", + "type": [ + "mapper", + { + "type": "varint64", + "mappings": { + "0": "entity", + "1": "create", + "2": "destroy" + } + } + ] + } + ] + ], + "packet_move_entity_delta": [ + "container", + [ + { + "name": "runtime_entity_id", + "type": "varint64" + }, + { + "name": "flags", + "type": "DeltaMoveFlags" + }, + { + "name": "x", + "type": [ + "switch", + { + "compareTo": "flags.has_x", + "fields": { + "true": "lf32" + }, + "default": "void" + } + ] + }, + { + "name": "y", + "type": [ + "switch", + { + "compareTo": "flags.has_y", + "fields": { + "true": "lf32" + }, + "default": "void" + } + ] + }, + { + "name": "z", + "type": [ + "switch", + { + "compareTo": "flags.has_z", + "fields": { + "true": "lf32" + }, + "default": "void" + } + ] + }, + { + "name": "rot_x", + "type": [ + "switch", + { + "compareTo": "flags.has_rot_x", + "fields": { + "true": "u8" + }, + "default": "void" + } + ] + }, + { + "name": "rot_y", + "type": [ + "switch", + { + "compareTo": "flags.has_rot_y", + "fields": { + "true": "u8" + }, + "default": "void" + } + ] + }, + { + "name": "rot_z", + "type": [ + "switch", + { + "compareTo": "flags.has_rot_z", + "fields": { + "true": "u8" + }, + "default": "void" + } + ] + } + ] + ], + "packet_set_scoreboard_identity": [ + "container", + [ + { + "name": "action", + "type": [ + "mapper", + { + "type": "i8", + "mappings": { + "0": "register_identity", + "1": "clear_identity" + } + } + ] + }, + { + "name": "entries", + "type": [ + "array", + { + "countType": "varint", + "type": [ + "container", + [ + { + "name": "scoreboard_id", + "type": "zigzag64" + }, + { + "name": "entity_unique_id", + "type": [ + "switch", + { + "compareTo": "../action", + "fields": { + "register_identity": "zigzag64" + }, + "default": "void" + } + ] + } + ] + ] + } + ] + } + ] + ], + "packet_set_local_player_as_initialized": [ + "container", + [ + { + "name": "runtime_entity_id", + "type": "varint64" + } + ] + ], + "packet_update_soft_enum": [ + "container", + [] + ], + "packet_network_stack_latency": [ + "container", + [ + { + "name": "timestamp", + "type": "lu64" + }, + { + "name": "needs_response", + "type": "u8" + } + ] + ], + "packet_script_custom_event": [ + "container", + [ + { + "name": "event_name", + "type": "string" + }, + { + "name": "event_data", + "type": "string" + } + ] + ], + "packet_spawn_particle_effect": [ + "container", + [ + { + "name": "dimension", + "type": "u8" + }, + { + "name": "entity_id", + "type": "zigzag64" + }, + { + "name": "position", + "type": "vec3f" + }, + { + "name": "particle_name", + "type": "string" + } + ] + ], + "packet_available_entity_identifiers": [ + "container", + [ + { + "name": "nbt", + "type": "nbt" + } + ] + ], + "packet_level_sound_event_v2": [ + "container", + [ + { + "name": "sound_id", + "type": "u8" + }, + { + "name": "position", + "type": "vec3f" + }, + { + "name": "block_id", + "type": "zigzag32" + }, + { + "name": "entity_type", + "type": "string" + }, + { + "name": "is_baby_mob", + "type": "bool" + }, + { + "name": "is_global", + "type": "bool" + } + ] + ], + "packet_network_chunk_publisher_update": [ + "container", + [ + { + "name": "coordinates", + "type": "BlockCoordinates" + }, + { + "name": "radius", + "type": "varint" + } + ] + ], + "packet_biome_definition_list": [ + "container", + [ + { + "name": "nbt", + "type": "nbt" + } + ] + ], + "packet_level_sound_event": [ + "container", + [ + { + "name": "sound_id", + "type": "SoundType" + }, + { + "name": "position", + "type": "vec3f" + }, + { + "name": "extra_data", + "type": "zigzag32" + }, + { + "name": "entity_type", + "type": "string" + }, + { + "name": "is_baby_mob", + "type": "bool" + }, + { + "name": "is_global", + "type": "bool" + } + ] + ], + "packet_level_event_generic": [ + "container", + [ + { + "name": "event_id", + "type": "varint" + }, + { + "name": "nbt", + "type": "nbtLoop" + } + ] + ], + "packet_lectern_update": [ + "container", + [ + { + "name": "page", + "type": "u8" + }, + { + "name": "page_count", + "type": "u8" + }, + { + "name": "position", + "type": "vec3i" + }, + { + "name": "drop_book", + "type": "bool" + } + ] + ], + "packet_video_stream_connect": [ + "container", + [ + { + "name": "server_uri", + "type": "string" + }, + { + "name": "frame_send_frequency", + "type": "lf32" + }, + { + "name": "action", + "type": "u8" + }, + { + "name": "resolution_x", + "type": "li32" + }, + { + "name": "resolution_y", + "type": "li32" + } + ] + ], + "packet_add_ecs_entity": [ + "container", + [ + { + "name": "network_id", + "type": "varint64" + } + ] + ], + "packet_remove_ecs_entity": [ + "container", + [ + { + "name": "network_id", + "type": "varint64" + } + ] + ], + "packet_client_cache_status": [ + "container", + [ + { + "name": "enabled", + "type": "bool" + } + ] + ], + "packet_on_screen_texture_animation": [ + "container", + [ + { + "name": "animation_type", + "type": "lu32" + } + ] + ], + "packet_map_create_locked_copy": [ + "container", + [ + { + "name": "original_map_id", + "type": "zigzag64" + }, + { + "name": "new_map_id", + "type": "zigzag64" + } + ] + ], + "packet_structure_template_data_export_request": [ + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "position", + "type": "BlockCoordinates" + }, + { + "name": "settings", + "type": "StructureBlockSettings" + }, + { + "name": "request_type", + "type": [ + "mapper", + { + "type": "u8", + "mappings": { + "1": "export_from_save", + "2": "export_from_load", + "3": "query_saved_structure" + } + } + ] + } + ] + ], + "packet_structure_template_data_export_response": [ + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "success", + "type": "bool" + }, + { + "name": "nbt", + "type": [ + "switch", + { + "compareTo": "success", + "fields": { + "true": "nbt" + }, + "default": "void" + } + ] + }, + { + "name": "response_type", + "type": [ + "mapper", + { + "type": "u8", + "mappings": { + "1": "export", + "2": "query" + } + } + ] + } + ] + ], + "packet_update_block_properties": [ + "container", + [ + { + "name": "nbt", + "type": "nbt" + } + ] + ], + "packet_client_cache_blob_status": [ + "container", + [ + { + "name": "misses", + "type": "varint" + }, + { + "name": "haves", + "type": "varint" + }, + { + "name": "missing", + "type": [ + "array", + { + "count": "misses", + "type": "lu64" + } + ] + }, + { + "name": "have", + "type": [ + "array", + { + "count": "haves", + "type": "lu64" + } + ] + } + ] + ], + "packet_client_cache_miss_response": [ + "container", + [ + { + "name": "blobs", + "type": [ + "array", + { + "countType": "varint", + "type": "Blob" + } + ] + } + ] + ], + "packet_education_settings": [ + "container", + [ + { + "name": "CodeBuilderDefaultURI", + "type": "string" + }, + { + "name": "CodeBuilderTitle", + "type": "string" + }, + { + "name": "CanResizeCodeBuilder", + "type": "bool" + }, + { + "name": "HasOverrideURI", + "type": "bool" + }, + { + "name": "OverrideURI", + "type": [ + "switch", + { + "compareTo": "HasOverrideURI", + "fields": { + "true": "string" + }, + "default": "void" + } + ] + }, + { + "name": "HasQuiz", + "type": "bool" + } + ] + ], + "packet_multiplayer_settings": [ + "container", + [ + { + "name": "action_type", + "type": [ + "mapper", + { + "type": "zigzag32", + "mappings": { + "0": "enable_multiplayer", + "1": "disable_multiplayer", + "2": "refresh_join_code" + } + } + ] + } + ] + ], + "packet_settings_command": [ + "container", + [ + { + "name": "command_line", + "type": "string" + }, + { + "name": "suppress_output", + "type": "bool" + } + ] + ], + "packet_anvil_damage": [ + "container", + [ + { + "name": "damage", + "type": "u8" + }, + { + "name": "position", + "type": "BlockCoordinates" + } + ] + ], + "packet_completed_using_item": [ + "container", + [ + { + "name": "used_item_id", + "type": "li16" + }, + { + "name": "use_method", + "type": [ + "mapper", + { + "type": "li32", + "mappings": { + "0": "equip_armor", + "1": "eat", + "2": "attack", + "3": "consume", + "4": "throw", + "5": "shoot", + "6": "place", + "7": "fill_bottle", + "8": "fill_bucket", + "9": "pour_bucket", + "10": "use_tool", + "11": "interact", + "12": "retrieved", + "13": "dyed", + "14": "traded" + } + } + ] + } + ] + ], + "packet_network_settings": [ + "container", + [ + { + "name": "compression_threshold", + "type": "u16" + } + ] + ], + "packet_player_auth_input": [ + "container", + [ + { + "name": "pitch", + "type": "lf32" + }, + { + "name": "yaw", + "type": "lf32" + }, + { + "name": "position", + "type": "vec3f" + }, + { + "name": "move_vector", + "type": "vec2f" + }, + { + "name": "head_yaw", + "type": "lf32" + }, + { + "name": "input_data", + "type": "InputFlag" + }, + { + "name": "input_mode", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "unknown", + "1": "mouse", + "2": "touch", + "3": "game_pad", + "4": "motion_controller" + } + } + ] + }, + { + "name": "play_mode", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "normal", + "1": "teaser", + "2": "screen", + "3": "viewer", + "4": "reality", + "5": "placement", + "6": "living_room", + "7": "exit_level", + "8": "exit_level_living_room", + "9": "num_modes" + } + } + ] + }, + { + "name": "gaze_direction", + "type": [ + "switch", + { + "compareTo": "play_mode", + "fields": { + "reality": "vec3f" + }, + "default": "void" + } + ] + }, + { + "name": "tick", + "type": "varint64" + }, + { + "name": "delta", + "type": "vec3f" + }, + { + "name": "transaction", + "type": [ + "switch", + { + "compareTo": "input_data.item_interact", + "fields": { + "true": [ + "container", + [ + { + "name": "legacy", + "type": "TransactionLegacy" + }, + { + "name": "actions", + "type": "TransactionActions" + }, + { + "name": "data", + "type": "TransactionUseItem" + } + ] + ] + }, + "default": "void" + } + ] + }, + { + "name": "item_stack_request", + "type": [ + "switch", + { + "compareTo": "input_data.item_stack_request", + "fields": { + "true": "ItemStackRequest" + }, + "default": "void" + } + ] + }, + { + "name": "block_action", + "type": [ + "switch", + { + "compareTo": "input_data.block_action", + "fields": { + "true": [ + "array", + { + "countType": "zigzag32", + "type": [ + "container", + [ + { + "name": "action", + "type": "Action" + }, + { + "anon": true, + "type": [ + "switch", + { + "compareTo": "action", + "fields": { + "start_break": [ + "container", + [ + { + "name": "position", + "type": "BlockCoordinates" + }, + { + "name": "face", + "type": "zigzag32" + } + ] + ], + "abort_break": [ + "container", + [ + { + "name": "position", + "type": "BlockCoordinates" + }, + { + "name": "face", + "type": "zigzag32" + } + ] + ], + "crack_break": [ + "container", + [ + { + "name": "position", + "type": "BlockCoordinates" + }, + { + "name": "face", + "type": "zigzag32" + } + ] + ], + "predict_break": [ + "container", + [ + { + "name": "position", + "type": "BlockCoordinates" + }, + { + "name": "face", + "type": "zigzag32" + } + ] + ], + "continue_break": [ + "container", + [ + { + "name": "position", + "type": "BlockCoordinates" + }, + { + "name": "face", + "type": "zigzag32" + } + ] + ] + }, + "default": "void" + } + ] + } + ] + ] + } + ] + }, + "default": "void" + } + ] + } + ] + ], + "packet_creative_content": [ + "container", + [ + { + "name": "items", + "type": [ + "array", + { + "countType": "varint", + "type": [ + "container", + [ + { + "name": "entry_id", + "type": "varint" + }, + { + "name": "item", + "type": "ItemLegacy" + } + ] + ] + } + ] + } + ] + ], + "packet_player_enchant_options": [ + "container", + [ + { + "name": "options", + "type": [ + "array", + { + "countType": "varint", + "type": "EnchantOption" + } + ] + } + ] + ], + "packet_item_stack_request": [ + "container", + [ + { + "name": "requests", + "type": [ + "array", + { + "countType": "varint", + "type": "ItemStackRequest" + } + ] + } + ] + ], + "packet_item_stack_response": [ + "container", + [ + { + "name": "responses", + "type": "ItemStackResponses" + } + ] + ], + "packet_player_armor_damage": [ + "container", + [ + { + "name": "type", + "type": "ArmorDamageType" + }, + { + "name": "helmet_damage", + "type": [ + "switch", + { + "compareTo": "type.head", + "fields": { + "true": "zigzag32" + }, + "default": "void" + } + ] + }, + { + "name": "chestplate_damage", + "type": [ + "switch", + { + "compareTo": "type.chest", + "fields": { + "true": "zigzag32" + }, + "default": "void" + } + ] + }, + { + "name": "leggings_damage", + "type": [ + "switch", + { + "compareTo": "type.legs", + "fields": { + "true": "zigzag32" + }, + "default": "void" + } + ] + }, + { + "name": "boots_damage", + "type": [ + "switch", + { + "compareTo": "type.feet", + "fields": { + "true": "zigzag32" + }, + "default": "void" + } + ] + } + ] + ], + "packet_update_player_game_type": [ + "container", + [ + { + "name": "gamemode", + "type": "GameMode" + }, + { + "name": "player_unique_id", + "type": "zigzag64" + } + ] + ], + "packet_position_tracking_db_request": [ + "container", + [ + { + "name": "action", + "type": [ + "mapper", + { + "type": "u8", + "mappings": { + "0": "query" + } + } + ] + }, + { + "name": "tracking_id", + "type": "zigzag32" + } + ] + ], + "packet_position_tracking_db_broadcast": [ + "container", + [ + { + "name": "broadcast_action", + "type": [ + "mapper", + { + "type": "u8", + "mappings": { + "0": "update", + "1": "destory", + "2": "not_found" + } + } + ] + }, + { + "name": "tracking_id", + "type": "zigzag32" + }, + { + "name": "nbt", + "type": "nbt" + } + ] + ], + "packet_packet_violation_warning": [ + "container", + [ + { + "name": "violation_type", + "type": [ + "mapper", + { + "type": "zigzag32", + "mappings": { + "0": "malformed" + } + } + ] + }, + { + "name": "severity", + "type": [ + "mapper", + { + "type": "zigzag32", + "mappings": { + "0": "warning", + "1": "final_warning", + "2": "terminating" + } + } + ] + }, + { + "name": "packet_id", + "type": "zigzag32" + }, + { + "name": "reason", + "type": "string" + } + ] + ], + "packet_motion_prediction_hints": [ + "container", + [ + { + "name": "entity_runtime_id", + "type": "varint64" + }, + { + "name": "velocity", + "type": "vec3f" + }, + { + "name": "on_ground", + "type": "bool" + } + ] + ], + "packet_animate_entity": [ + "container", + [ + { + "name": "animation", + "type": "string" + }, + { + "name": "next_state", + "type": "string" + }, + { + "name": "stop_condition", + "type": "string" + }, + { + "name": "controller", + "type": "string" + }, + { + "name": "blend_out_time", + "type": "lf32" + }, + { + "name": "runtime_entity_ids", + "type": [ + "array", + { + "countType": "varint", + "type": "varint64" + } + ] + } + ] + ], + "packet_camera_shake": [ + "container", + [ + { + "name": "intensity", + "type": "lf32" + }, + { + "name": "duration", + "type": "lf32" + }, + { + "name": "type", + "type": "u8" + }, + { + "name": "action", + "type": [ + "mapper", + { + "type": "u8", + "mappings": { + "0": "add", + "1": "stop" + } + } + ] + } + ] + ], + "packet_player_fog": [ + "container", + [ + { + "name": "stack", + "type": [ + "array", + { + "countType": "varint", + "type": "string" + } + ] + } + ] + ], + "packet_correct_player_move_prediction": [ + "container", + [ + { + "name": "position", + "type": "vec3f" + }, + { + "name": "delta", + "type": "vec3f" + }, + { + "name": "on_ground", + "type": "bool" + }, + { + "name": "tick", + "type": "varint64" + } + ] + ], + "packet_item_component": [ + "container", + [ + { + "name": "entries", + "type": "ItemComponentList" + } + ] + ], + "packet_filter_text_packet": [ + "container", + [ + { + "name": "text", + "type": "string" + }, + { + "name": "from_server", + "type": "bool" + } + ] + ], + "packet_debug_renderer": [ + "container", + [ + { + "name": "type", + "type": [ + "mapper", + { + "type": "li32", + "mappings": { + "1": "clear", + "2": "add_cube" + } + } + ] + }, + { + "anon": true, + "type": [ + "switch", + { + "compareTo": "type", + "fields": { + "clear": "void", + "add_cube": [ + "container", + [ + { + "name": "text", + "type": "string" + }, + { + "name": "position", + "type": "vec3f" + }, + { + "name": "red", + "type": "lf32" + }, + { + "name": "green", + "type": "lf32" + }, + { + "name": "blue", + "type": "lf32" + }, + { + "name": "alpha", + "type": "lf32" + }, + { + "name": "duration", + "type": "li64" + } + ] + ] + }, + "default": "void" + } + ] + } + ] + ], + "packet_sync_entity_property": [ + "container", + [ + { + "name": "nbt", + "type": "nbt" + } + ] + ], + "packet_add_volume_entity": [ + "container", + [ + { + "name": "entity_id", + "type": "varint64" + }, + { + "name": "nbt", + "type": "nbt" + } + ] + ], + "packet_remove_volume_entity": [ + "container", + [ + { + "name": "entity_id", + "type": "varint64" + } + ] + ], + "packet_simulation_type": [ + "container", + [ + { + "name": "type", + "type": [ + "mapper", + { + "type": "u8", + "mappings": { + "0": "game", + "1": "editor", + "2": "test", + "3": "invalid" + } + } + ] + } + ] + ], + "packet_npc_dialogue": [ + "container", + [ + { + "name": "entity_id", + "type": "lu64" + }, + { + "name": "action_type", + "type": [ + "mapper", + { + "type": "li32", + "mappings": { + "0": "open", + "1": "close" + } + } + ] + }, + { + "name": "dialogue", + "type": "string" + }, + { + "name": "screen_name", + "type": "string" + }, + { + "name": "npc_name", + "type": "string" + }, + { + "name": "action_json", + "type": "string" + } + ] + ], + "string": [ + "pstring", + { + "countType": "varint" + } + ], + "ByteArray": [ + "buffer", + { + "countType": "varint" + } + ], + "SignedByteArray": [ + "buffer", + { + "countType": "zigzag32" + } + ], + "LittleString": [ + "pstring", + { + "countType": "li32" + } + ], + "ShortArray": [ + "buffer", + { + "countType": "li16" + } + ], + "MetadataFlags1": [ + "bitflags", + { + "type": "zigzag64", + "big": true, + "flags": [ + "onfire", + "sneaking", + "riding", + "sprinting", + "action", + "invisible", + "tempted", + "inlove", + "saddled", + "powered", + "ignited", + "baby", + "converting", + "critical", + "can_show_nametag", + "always_show_nametag", + "no_ai", + "silent", + "wallclimbing", + "can_climb", + "swimmer", + "can_fly", + "walker", + "resting", + "sitting", + "angry", + "interested", + "charged", + "tamed", + "orphaned", + "leashed", + "sheared", + "gliding", + "elder", + "moving", + "breathing", + "chested", + "stackable", + "showbase", + "rearing", + "vibrating", + "idling", + "evoker_spell", + "charge_attack", + "wasd_controlled", + "can_power_jump", + "linger", + "has_collision", + "affected_by_gravity", + "fire_immune", + "dancing", + "enchanted", + "show_trident_rope", + "container_private", + "transforming", + "spin_attack", + "swimming", + "bribed", + "pregnant", + "laying_egg", + "rider_can_pick", + "transition_sitting", + "eating", + "laying_down" + ] + } + ], + "MetadataFlags2": [ + "bitflags", + { + "type": "zigzag64", + "big": true, + "flags": [ + "sneezing", + "trusting", + "rolling", + "scared", + "in_scaffolding", + "over_scaffolding", + "fall_through_scaffolding", + "blocking", + "transition_blocking", + "blocked_using_shield", + "blocked_using_damaged_shield", + "sleeping", + "wants_to_wake", + "trade_interest", + "door_breaker", + "breaking_obstruction", + "door_opener", + "illager_captain", + "stunned", + "roaring", + "delayed_attacking", + "avoiding_mobs", + "avoiding_block", + "facing_target_to_range_attack", + "hidden_when_invisible", + "is_in_ui", + "stalking", + "emoting", + "celebrating", + "admiring", + "celebrating_special", + "unknown95", + "ram_attack", + "playing_dead" + ] + } + ], + "UpdateBlockFlags": [ + "bitflags", + { + "type": "varint", + "flags": { + "neighbors": 1, + "network": 2, + "no_graphic": 4, + "unused": 8, + "priority": 16 + } + } + ], + "AdventureFlags": [ + "bitflags", + { + "type": "varint", + "flags": { + "world_immutable": 1, + "no_pvp": 2, + "auto_jump": 32, + "allow_flight": 64, + "no_clip": 128, + "world_builder": 256, + "flying": 512, + "muted": 1024 + } + } + ], + "ActionPermissions": [ + "bitflags", + { + "type": "varint", + "flags": { + "mine": 65537, + "doors_and_switches": 65538, + "open_containers": 65540, + "attack_players": 65544, + "attack_mobs": 65552, + "operator": 65568, + "teleport": 65664, + "build": 65792, + "default": 66048 + } + } + ], + "UpdateMapFlags": [ + "bitflags", + { + "type": "varint", + "flags": [ + "void", + "texture", + "decoration", + "initialisation" + ] + } + ], + "CommandFlags": [ + "bitfield", + [ + { + "name": "unused", + "size": 6, + "signed": false + }, + { + "name": "has_semantic_constraint", + "size": 1, + "signed": false + }, + { + "name": "collapse_enum", + "size": 1, + "signed": false + } + ] + ], + "DeltaMoveFlags": [ + "bitflags", + { + "type": "lu16", + "flags": { + "has_x": 1, + "has_y": 2, + "has_z": 4, + "has_rot_x": 8, + "has_rot_y": 16, + "has_rot_z": 32, + "on_ground": 64, + "teleport": 128, + "force_move": 256 + } + } + ], + "InputFlag": [ + "bitflags", + { + "type": "varint64", + "big": true, + "flags": [ + "ascend", + "descend", + "north_jump", + "jump_down", + "sprint_down", + "change_height", + "jumping", + "auto_jumping_in_water", + "sneaking", + "sneak_down", + "up", + "down", + "left", + "right", + "up_left", + "up_right", + "want_up", + "want_down", + "want_down_slow", + "want_up_slow", + "sprinting", + "ascend_block", + "descend_block", + "sneak_toggle_down", + "persist_sneak", + "start_sprinting", + "stop_sprinting", + "start_sneaking", + "stop_sneaking", + "start_swimming", + "stop_swimming", + "start_jumping", + "start_gliding", + "stop_gliding", + "item_interact", + "block_action", + "item_stack_request" + ] + } + ], + "ArmorDamageType": [ + "bitflags", + { + "type": "u8", + "flags": { + "head": 1, + "chest": 2, + "legs": 4, + "feet": 8 + } + } + ] + } +} \ No newline at end of file diff --git a/data/latest/proto.yml b/data/latest/proto.yml index bb2237d..43b79bf 100644 --- a/data/latest/proto.yml +++ b/data/latest/proto.yml @@ -1,7 +1,7 @@ # Created from MiNET and gophertunnel docs # The version below is the latest version this protocol schema was updated for. # The output protocol.json will be in the folder for the version -!version: 1.17.0 +!version: 1.17.10 # Some ProtoDef aliases string: ["pstring",{"countType":"varint"}] # String / array types @@ -126,6 +126,8 @@ packet_resource_packs_info: # A list of resource packs that the client needs to download before joining the server. # The order of these resource packs is not relevant in this packet. It is however important in the Resource Pack Stack packet. texture_packs: TexturePackInfos + # ForcingServerPacks is currently an unclear field. + force_server_packs: bool packet_resource_pack_stack: !id: 0x07 @@ -691,6 +693,87 @@ packet_level_event: 4000: set_data 9800: players_sleeping 0x4000: add_particle_mask + # 0x4000 | + particle ID + 16385: particle_bubble # 1 + 16386: particle_bubble_manual # 2 + 16387: particle_critical # 3 + 16388: particle_block_force_field # 4 + 16389: particle_smoke # 5 + 16390: particle_explode # 6 + 16391: particle_evaporation # 7 + 16392: particle_flame # 8 + 16393: particle_candle_flame # 9 + 16394: particle_lava # 10 + 16395: particle_large_smoke # 11 + 16396: particle_redstone # 12 + 16397: particle_rising_red_dust # 13 + 16398: particle_item_break # 14 + 16399: particle_snowball_poof # 15 + 16400: particle_huge_explode # 16 + 16401: particle_huge_explode_seed # 17 + 16402: particle_mob_flame # 18 + 16403: particle_heart # 19 + 16404: particle_terrain # 20 + 16405: particle_town_aura # 21 + 16406: particle_portal # 22 + 16408: particle_water_splash # 24 + 16409: particle_water_splash_manual # 25 + 16410: particle_water_wake # 26 + 16411: particle_drip_water # 27 + 16412: particle_drip_lava # 28 + 16413: particle_drip_honey # 29 + 16414: particle_stalactite_drip_water # 30 + 16415: particle_stalactite_drip_lava # 31 + 16416: particle_falling_dust # 32 + 16417: particle_mob_spell # 33 + 16418: particle_mob_spell_ambient # 34 + 16419: particle_mob_spell_instantaneous # 35 + 16420: particle_ink # 36 + 16421: particle_slime # 37 + 16422: particle_rain_splash # 38 + 16423: particle_villager_angry # 39 + 16424: particle_villager_happy # 40 + 16425: particle_enchantment_table # 41 + 16426: particle_tracking_emitter # 42 + 16427: particle_note # 43 + 16428: particle_witch_spell # 44 + 16429: particle_carrot # 45 + 16430: particle_mob_appearance # 46 + 16431: particle_end_rod # 47 + 16432: particle_dragons_breath # 48 + 16433: particle_spit # 49 + 16434: particle_totem # 50 + 16435: particle_food # 51 + 16436: particle_fireworks_starter # 52 + 16437: particle_fireworks_spark # 53 + 16438: particle_fireworks_overlay # 54 + 16439: particle_balloon_gas # 55 + 16440: particle_colored_flame # 56 + 16441: particle_sparkler # 57 + 16442: particle_conduit # 58 + 16443: particle_bubble_column_up # 59 + 16444: particle_bubble_column_down # 60 + 16445: particle_sneeze # 61 + 16446: particle_shulker_bullet # 62 + 16447: particle_bleach # 63 + 16448: particle_dragon_destroy_block # 64 + 16449: particle_mycelium_dust # 65 + 16450: particle_falling_red_dust # 66 + 16451: particle_campfire_smoke # 67 + 16452: particle_tall_campfire_smoke # 68 + 16453: particle_dragon_breath_fire # 69 + 16454: particle_dragon_breath_trail # 70 + 16455: particle_blue_flame # 71 + 16456: particle_soul # 72 + 16457: particle_obsidian_tear # 73 + 16458: particle_portal_reverse # 74 + 16459: particle_snowflake # 75 + 16460: particle_vibration_signal # 76 + 16461: particle_sculk_sensor_redstone # 77 + 16462: particle_spore_blossom_shower # 78 + 16463: particle_spore_blossom_ambient # 79 + 16464: particle_wax # 80 + 16465: particle_electric_spark # 81 position: vec3f data: zigzag32 @@ -1488,7 +1571,7 @@ packet_available_commands: command_data: []varint name: string description: string - flags: u8 + flags: lu16 permission_level: u8 alias: li32 # The list of overload paramaters for this command @@ -1825,6 +1908,11 @@ packet_set_title: # FadeOutDuration is the duration that the title takes to fade out of the screen of the player. It is # measured in 20ths of a second (AKA in ticks). fade_out_time: zigzag32 + # XUID is the XBOX Live user ID of the player, which will remain consistent as long as the player is + # logged in with the XBOX Live account. It is empty if the user is not logged into its XBL account. + xuid: string + # PlatformOnlineID is either a uint64 or an empty string. + platform_online_id: string packet_add_behavior_tree: !id: 0x59 @@ -1984,7 +2072,16 @@ packet_npc_request: # what the player set in it. command: string # ActionType is the type of the action to execute. - action_type: u8 + action_type: u8 => + 0: set_actions + 1: execute_action + 2: execute_closing_commands + 3: set_name + 4: set_skin + 5: set_interact_text + 6: execute_openining_commands + # SceneName is the name of the scene. + scene_name: string # PhotoTransfer is sent by the server to transfer a photo (image) file to the client. It is typically used # to transfer photos so that the client can display it in a portfolio in Education Edition. @@ -2725,8 +2822,8 @@ InputFlag: [ "bitflags", { "want_down_slow", "want_up_slow", "sprinting", - "ascend_scaffolding", - "descend_scaffolding", + "ascend_block", + "descend_block", "sneak_toggle_down", "persist_sneak", "start_sprinting", @@ -3045,3 +3142,30 @@ packet_remove_volume_entity: # The Runtime Entity ID entity_id: varint64 +# SimulationType is an in-progress packet. We currently do not know the use case. +packet_simulation_type: + !id: 0xa8 + # SimulationType is the simulation type selected + type: u8 => + 0: game + 1: editor + 2: test + 3: invalid + +# NPCDialogue is a packet that allows the client to display dialog boxes for interacting with NPCs. +packet_npc_dialogue: + !id: 0xa9 + # ActorUniqueID is the ID of the NPC being requested. + entity_id: lu64 + # ActionType is the type of action for the packet. + action_type: li32 => + 0: open + 1: close + # Dialogue is the text that the client should see. + dialogue: string + # SceneName is the scene the data was pulled from for the client. + screen_name: string + # NPCName is the name of the NPC to be displayed to the client. + npc_name: string + # ActionJSON is the JSON string of the buttons/actions the server can perform. + action_json: string \ No newline at end of file diff --git a/data/latest/types.yaml b/data/latest/types.yaml index b474e56..f88fba0 100644 --- a/data/latest/types.yaml +++ b/data/latest/types.yaml @@ -1595,6 +1595,8 @@ SoundType: varint => - squid_ink_squirt - glow_squid_ink_squirt - convert_to_stray + - extinguish_candle + - ambient_candle - Undefined # TODO: remove? diff --git a/examples/serverReadmeExample.js b/examples/serverReadmeExample.js index 870aed8..06ab2d9 100644 --- a/examples/serverReadmeExample.js +++ b/examples/serverReadmeExample.js @@ -3,7 +3,7 @@ const bedrock = require('bedrock-protocol') const server = new bedrock.createServer({ host: '0.0.0.0', // optional port: 19132, // optional - version: '1.16.220', // The server version + version: '1.17.10', // The server version motd: { // The message of the day motd: 'Funtime Server', levelName: 'Wonderland' diff --git a/src/options.js b/src/options.js index 4530548..2147252 100644 --- a/src/options.js +++ b/src/options.js @@ -1,9 +1,10 @@ // Minimum supported version (< will be kicked) const MIN_VERSION = '1.16.201' // Currently supported verson -const CURRENT_VERSION = '1.17.0' +const CURRENT_VERSION = '1.17.10' const Versions = { + '1.17.10': 448, '1.17.0': 440, '1.16.220': 431, '1.16.210': 428, From f530677245858c75d04c259d212e4ba82c753b35 Mon Sep 17 00:00:00 2001 From: extremeheat Date: Sat, 17 Jul 2021 05:30:13 -0400 Subject: [PATCH 023/273] Option to use JS implementation of RakNet, fix 1.17.10 issue (#110) * Default to JS implementation of RakNet * update server also, adjust test timeout based on number of versions * 1.17.10: fix texture pack issue, keep raknet default at C++ * force_build --- .github/workflows/ci.yml | 3 +- HISTORY.md | 4 +++ data/1.17.10/protocol.json | 8 ++--- data/latest/proto.yml | 4 +-- docs/API.md | 2 +- index.d.ts | 9 ++++-- package.json | 2 +- src/client.js | 6 ++-- src/createClient.js | 2 +- src/options.js | 6 +++- src/rak.js | 59 ++++++++++++++++++++++++++----------- src/rakWorker.js | 5 ++++ src/server.js | 6 ++-- test/internal.js | 2 +- test/internal.test.js | 3 +- test/vanilla.test.js | 3 +- tools/startVanillaServer.js | 4 +++ 17 files changed, 91 insertions(+), 37 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7803afb..0a1ac07 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,8 @@ jobs: strategy: matrix: node-version: [14.x] - + env: + FORCE_BUILD: true steps: - uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.node-version }} diff --git a/HISTORY.md b/HISTORY.md index 71c0f33..1127ef5 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,3 +1,7 @@ +## 3.5.0 +* Add 1.17.10 support [#109](https://github.com/PrismarineJS/bedrock-protocol/pull/109) +* You can switch to the JS implementation of raknet by setting `useNativeRaknet: false` in options. + ## 3.4.0 * Initial 1.17 support [#99](https://github.com/PrismarineJS/bedrock-protocol/pull/99) * update connect version based on ping response & fix typings (u9g) [#101](https://github.com/PrismarineJS/bedrock-protocol/pull/101) diff --git a/data/1.17.10/protocol.json b/data/1.17.10/protocol.json index 1fcbc86..c994942 100644 --- a/data/1.17.10/protocol.json +++ b/data/1.17.10/protocol.json @@ -3780,6 +3780,10 @@ "name": "has_scripts", "type": "bool" }, + { + "name": "force_server_packs", + "type": "bool" + }, { "name": "behaviour_packs", "type": "BehaviourPackInfos" @@ -3787,10 +3791,6 @@ { "name": "texture_packs", "type": "TexturePackInfos" - }, - { - "name": "force_server_packs", - "type": "bool" } ] ], diff --git a/data/latest/proto.yml b/data/latest/proto.yml index 43b79bf..a214676 100644 --- a/data/latest/proto.yml +++ b/data/latest/proto.yml @@ -120,14 +120,14 @@ packet_resource_packs_info: must_accept: bool # If scripting is enabled. has_scripts: bool + # ForcingServerPacks is currently an unclear field. + force_server_packs: bool # A list of behaviour packs that the client needs to download before joining the server. # All of these behaviour packs will be applied together. behaviour_packs: BehaviourPackInfos # A list of resource packs that the client needs to download before joining the server. # The order of these resource packs is not relevant in this packet. It is however important in the Resource Pack Stack packet. texture_packs: TexturePackInfos - # ForcingServerPacks is currently an unclear field. - force_server_packs: bool packet_resource_pack_stack: !id: 0x07 diff --git a/docs/API.md b/docs/API.md index 051ea09..35db115 100644 --- a/docs/API.md +++ b/docs/API.md @@ -19,7 +19,7 @@ Returns a `Client` instance and connects to the server. | profilesFolder | *optional* | Where to store cached authentication tokens. Defaults to .minecraft, or the node_modules folder if not found. | | autoInitPlayer | *optional* | default to true, If we should send SetPlayerInitialized to the server after getting play_status spawn. | | skipPing | *optional* | Whether pinging the server to check its version should be skipped. | - +| useNativeRaknet | *optional* | Whether to use the C++ version of RakNet. Set to false to use JS. | ## be.createServer(options) : Server diff --git a/index.d.ts b/index.d.ts index d59c8fd..3e9d801 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,7 +1,7 @@ import EventEmitter from "events" declare module "bedrock-protocol" { - type Version = '1.17.0' | '1.16.220' | '1.16.210' | '1.16.201' + type Version = '1.17.10' | '1.17.0' | '1.16.220' | '1.16.210' | '1.16.201' enum title { MinecraftNintendoSwitch, MinecraftJava } @@ -15,7 +15,12 @@ declare module "bedrock-protocol" { port?: number // For the client, if we should login with Microsoft/Xbox Live. // For the server, if we should verify client's authentication with Xbox Live. - offline?: boolean + offline?: boolean, + + // Whether or not to use C++ version of RakNet + useNativeRaknet?: boolean, + // If using JS implementation of RakNet, should we use workers? (This only affects the client) + useRaknetWorker?: boolean } export interface ClientOptions extends Options { diff --git a/package.json b/package.json index 50e85f4..825cde1 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "debug": "^4.3.1", "jose-node-cjs-runtime": "^3.12.1", "jsonwebtoken": "^8.5.1", - "jsp-raknet": "^2.1.0", + "jsp-raknet": "^2.1.3", "minecraft-folder-path": "^1.1.0", "node-fetch": "^2.6.1", "prismarine-nbt": "^1.5.0", diff --git a/src/client.js b/src/client.js index 068dce5..2796546 100644 --- a/src/client.js +++ b/src/client.js @@ -1,6 +1,5 @@ const { ClientStatus, Connection } = require('./connection') const { createDeserializer, createSerializer } = require('./transforms/serializer') -const { RakClient } = require('./rak') const { serialize, isDebug } = require('./datatypes/util') const debug = require('debug')('minecraft-protocol') const Options = require('./options') @@ -21,6 +20,9 @@ class Client extends Connection { super() this.options = { ...Options.defaultOptions, ...options } this.validateOptions() + + const { RakClient } = require('./rak')(this.options.useNativeRaknet) + this.serializer = createSerializer(this.options.version) this.deserializer = createDeserializer(this.options.version) @@ -30,7 +32,7 @@ class Client extends Connection { const host = this.options.host const port = this.options.port - this.connection = new RakClient({ useWorkers: true, host, port }) + this.connection = new RakClient({ useWorkers: this.options.useRaknetWorkers, host, port }) this.startGameData = {} this.clientRuntimeId = null diff --git a/src/createClient.js b/src/createClient.js index f8e205a..e79b9a7 100644 --- a/src/createClient.js +++ b/src/createClient.js @@ -1,5 +1,5 @@ const { Client } = require('./client') -const { RakClient } = require('./rak') +const { RakClient } = require('./rak')(true) const assert = require('assert') const advertisement = require('./server/advertisement') const { sleep } = require('./datatypes/util') diff --git a/src/options.js b/src/options.js index 2147252..32d7d93 100644 --- a/src/options.js +++ b/src/options.js @@ -21,7 +21,11 @@ const defaultOptions = { // If true, do not authenticate with Xbox Live offline: false, // Milliseconds to wait before aborting connection attempt - connectTimeout: 9000 + connectTimeout: 9000, + // Whether or not to use C++ version of RakNet + useNativeRaknet: true, + // If using JS implementation of RakNet, should we use workers? (This only affects the client) + useRaknetWorkers: true } module.exports = { defaultOptions, MIN_VERSION, CURRENT_VERSION, Versions } diff --git a/src/rak.js b/src/rak.js index d8e99ee..32a3b31 100644 --- a/src/rak.js +++ b/src/rak.js @@ -1,12 +1,23 @@ const { EventEmitter } = require('events') const ConnWorker = require('./rakWorker') const { waitFor } = require('./datatypes/util') -// TODO: better way to switch, via an option -try { - var { Client, Server, PacketPriority, PacketReliability } = require('raknet-native') // eslint-disable-line -} catch (e) { - var { Client, Server, EncapsulatedPacket, Reliability } = require('jsp-raknet') // eslint-disable-line - console.debug('[raknet] native not found, using js', e) + +let Client, Server, PacketPriority, EncapsulatedPacket, PacketReliability, Reliability + +module.exports = nativeRaknet => { + if (nativeRaknet) { + try { + ({ Client, Server, PacketPriority, PacketReliability } = require('raknet-native')) + return { RakServer: RakNativeServer, RakClient: RakNativeClient } + } catch (e) { + ({ Client, Server, EncapsulatedPacket, Reliability } = require('jsp-raknet')) + console.debug('[raknet] native not found, using js', e) + console.debug('You can suppress the error above by disabling `useNativeRaknet` in your options') + } + } else { + ({ Client, Server, EncapsulatedPacket, Reliability } = require('jsp-raknet')) + } + return { RakServer: RakJsServer, RakClient: RakJsClient } } class RakNativeClient extends EventEmitter { @@ -118,9 +129,10 @@ class RakJsClient extends EventEmitter { this.sendReliable = this.workerSendReliable } else { this.connect = this.plainConnect - this.close = this.plainClose + this.close = reason => this.raknet.close(reason) this.sendReliable = this.plainSendReliable } + this.pongCb = null } workerConnect (host = this.options.host, port = this.options.port) { @@ -137,6 +149,8 @@ class RakJsClient extends EventEmitter { this.onEncapsulated(ecapsulated, address.hash) break } + case 'pong': + this.pongCb?.(evt.args) } }) } @@ -165,12 +179,21 @@ class RakJsClient extends EventEmitter { if (immediate) this.connection.sendQueue() } - plainClose (reason) { - this.raknet.close(reason) - } - - ping () { - // TODO + async ping (timeout = 1000) { + if (this.worker) { + this.worker.postMessage({ type: 'ping' }) + return waitFor(res => { + this.pongCb = data => res(data) + }, timeout, () => { throw new Error('Ping timed out') }) + } else { + if (!this.raknet) this.raknet = new Client(this.options.host, this.options.port) + return waitFor(res => { + this.raknet.ping(data => { + this.raknet.close() + res(data) + }) + }, timeout, () => { throw new Error('Ping timed out') }) + } } } @@ -207,9 +230,11 @@ class RakJsServer extends EventEmitter { this.raknet.on('closeConnection', this.onCloseConnection) this.raknet.on('encapsulated', this.onEncapsulated) } -} -module.exports = { - RakClient: PacketPriority ? RakNativeClient : RakJsClient, - RakServer: PacketPriority ? RakNativeServer : RakJsServer + close () { + // Allow some time for the final packets to come in/out + setTimeout(() => { + this.raknet.close() + }, 40) + } } diff --git a/src/rakWorker.js b/src/rakWorker.js index f6e4046..06cd736 100644 --- a/src/rakWorker.js +++ b/src/rakWorker.js @@ -53,6 +53,11 @@ function main () { } } else if (evt.type === 'close') { raknet.close() + process.exit(0) + } else if (evt.type === 'ping') { + raknet.ping((args) => { + parentPort.postMessage({ type: 'pong', args }) + }) } }) } diff --git a/src/server.js b/src/server.js index eb40a4e..e13ca92 100644 --- a/src/server.js +++ b/src/server.js @@ -1,7 +1,6 @@ const { EventEmitter } = require('events') const { createDeserializer, createSerializer } = require('./transforms/serializer') const { Player } = require('./serverPlayer') -const { RakServer } = require('./rak') const { sleep } = require('./datatypes/util') const { ServerAdvertisement } = require('./server/advertisement') const Options = require('./options') @@ -12,6 +11,9 @@ class Server extends EventEmitter { super() this.options = { ...Options.defaultOptions, ...options } this.validateOptions() + + this.RakServer = require('./rak')(this.options.useNativeRaknet).RakServer + this.serializer = createSerializer(this.options.version) this.deserializer = createDeserializer(this.options.version) this.advertisement = new ServerAdvertisement(this.options.motd) @@ -66,7 +68,7 @@ class Server extends EventEmitter { } async listen (host = this.options.host, port = this.options.port) { - this.raknet = new RakServer({ host, port }, this) + this.raknet = new this.RakServer({ host, port }, this) try { await this.raknet.listen() } catch (e) { diff --git a/test/internal.js b/test/internal.js index ddfd025..fd318c4 100644 --- a/test/internal.js +++ b/test/internal.js @@ -196,7 +196,7 @@ async function requestChunks (x, z, radius) { return chunks } -async function timedTest (version, timeout = 1000 * 120) { +async function timedTest (version, timeout = 1000 * 220) { await waitFor((res) => { startTest(version, res) }, timeout, () => { diff --git a/test/internal.test.js b/test/internal.test.js index b2a901b..32207e3 100644 --- a/test/internal.test.js +++ b/test/internal.test.js @@ -5,7 +5,8 @@ const { proxyTest } = require('./proxy') const { Versions } = require('../src/options') describe('internal client/server test', function () { - this.timeout(240 * 1000) + const vcount = Object.keys(Versions).length + this.timeout(vcount * 80 * 1000) for (const version in Versions) { it('connects ' + version, async () => { diff --git a/test/vanilla.test.js b/test/vanilla.test.js index 2670223..9cea359 100644 --- a/test/vanilla.test.js +++ b/test/vanilla.test.js @@ -4,7 +4,8 @@ const { clientTest } = require('./vanilla') const { Versions } = require('../src/options') describe('vanilla server test', function () { - this.timeout(220 * 1000) + const vcount = Object.keys(Versions).length + this.timeout(vcount * 80 * 1000) for (const version in Versions) { it('client spawns ' + version, async () => { diff --git a/tools/startVanillaServer.js b/tools/startVanillaServer.js index 32d0e0a..8e34794 100644 --- a/tools/startVanillaServer.js +++ b/tools/startVanillaServer.js @@ -82,6 +82,10 @@ async function startServer (version, onStart, options = {}) { await download(os, version, options.path) configure(options) const handle = run(!onStart) + handle.on('error', (...a) => { + console.warn('*** THE MINECRAFT PROCESS CRASHED ***', a) + handle.kill('SIGKILL') + }) if (onStart) { let stdout = '' handle.stdout.on('data', data => { From 0ab783e1e6985645894abbdd19a64939486472f8 Mon Sep 17 00:00:00 2001 From: extremeheat Date: Sat, 17 Jul 2021 15:30:17 -0400 Subject: [PATCH 024/273] Release 3.5.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 825cde1..eb5cd2d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bedrock-protocol", - "version": "3.4.0", + "version": "3.5.0", "description": "Minecraft Bedrock Edition protocol library", "main": "index.js", "scripts": { From 3b96765f4534abbc516f4a4be0e4162b8ccdca52 Mon Sep 17 00:00:00 2001 From: u9g <43508353+u9g@users.noreply.github.com> Date: Sun, 1 Aug 2021 05:21:34 -0400 Subject: [PATCH 025/273] Update link to proxy / mitm doc (#118) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 765491a..17b75a0 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ This is a work in progress. You can track the progress in https://github.com/Pri - Supports Minecraft Bedrock version 1.16.201, 1.16.210, 1.16.220, 1.17.0, 1.17.10 - Parse and serialize packets as JavaScript objects - Automatically respond to keep-alive packets - - [Proxy and mitm connections](docs/API.md) + - [Proxy and mitm connections](docs/API.md#proxy-docs) - Client - Authentication - Encryption From 0437e83fe9f5f51251dc7a89585dc7f7ed0c06be Mon Sep 17 00:00:00 2001 From: extremeheat Date: Mon, 2 Aug 2021 00:34:13 -0400 Subject: [PATCH 026/273] fix 1.17.10 npc packet serialization (#119) --- data/1.17.10/protocol.json | 2 +- data/latest/proto.yml | 2 +- src/client.js | 7 ++++++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/data/1.17.10/protocol.json b/data/1.17.10/protocol.json index c994942..21d4fac 100644 --- a/data/1.17.10/protocol.json +++ b/data/1.17.10/protocol.json @@ -8752,7 +8752,7 @@ "type": [ "mapper", { - "type": "li32", + "type": "varint", "mappings": { "0": "open", "1": "close" diff --git a/data/latest/proto.yml b/data/latest/proto.yml index a214676..d2998d1 100644 --- a/data/latest/proto.yml +++ b/data/latest/proto.yml @@ -3158,7 +3158,7 @@ packet_npc_dialogue: # ActorUniqueID is the ID of the NPC being requested. entity_id: lu64 # ActionType is the type of action for the packet. - action_type: li32 => + action_type: varint => 0: open 1: close # Dialogue is the text that the client should see. diff --git a/src/client.js b/src/client.js index 2796546..bf6d167 100644 --- a/src/client.js +++ b/src/client.js @@ -156,7 +156,12 @@ class Client extends Connection { } readPacket (packet) { - const des = this.deserializer.parsePacketBuffer(packet) + try { + var des = this.deserializer.parsePacketBuffer(packet) // eslint-disable-line + } catch (e) { + this.emit('error', e) + return + } const pakData = { name: des.data.name, params: des.data.params } this.inLog?.('-> C', pakData.name, this.options.loggging ? serialize(pakData.params) : '') this.emit('packet', des) From a1fe4802e691b36d23ea94c41ef813a71d536447 Mon Sep 17 00:00:00 2001 From: extremeheat Date: Mon, 2 Aug 2021 05:32:43 -0400 Subject: [PATCH 027/273] Release 3.5.1 --- HISTORY.md | 3 +++ package.json | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/HISTORY.md b/HISTORY.md index 1127ef5..ac57572 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,3 +1,6 @@ +## 3.5.1 +* Fix 1.17.10 npc packet serialization (#119) + ## 3.5.0 * Add 1.17.10 support [#109](https://github.com/PrismarineJS/bedrock-protocol/pull/109) * You can switch to the JS implementation of raknet by setting `useNativeRaknet: false` in options. diff --git a/package.json b/package.json index eb5cd2d..ac23547 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bedrock-protocol", - "version": "3.5.0", + "version": "3.5.1", "description": "Minecraft Bedrock Edition protocol library", "main": "index.js", "scripts": { From 254dbefcd46333b908aee36c02abffb30799b938 Mon Sep 17 00:00:00 2001 From: extremeheat Date: Sat, 7 Aug 2021 17:41:01 -0400 Subject: [PATCH 028/273] Add update helper script (#117) * Squashed commit from 'helper' branch * CI: run "update-helper" script on cron * Update index.js * disable proxy test * lint * re-add proxy test with delay * lint * Fix cron time --- .github/helper-bot/github-helper.js | 59 ++++++++++++ .github/helper-bot/index.js | 137 ++++++++++++++++++++++++++++ .github/workflows/ci.yml | 2 - .github/workflows/update-helper.yml | 24 +++++ test/internal.test.js | 4 + test/vanilla.test.js | 2 + 6 files changed, 226 insertions(+), 2 deletions(-) create mode 100644 .github/helper-bot/github-helper.js create mode 100644 .github/helper-bot/index.js create mode 100644 .github/workflows/update-helper.yml diff --git a/.github/helper-bot/github-helper.js b/.github/helper-bot/github-helper.js new file mode 100644 index 0000000..08759b2 --- /dev/null +++ b/.github/helper-bot/github-helper.js @@ -0,0 +1,59 @@ +if (!process.env.CI) { + // mock a bunch of things for testing locally -- https://github.com/actions/toolkit/issues/71 + process.env.GITHUB_REPOSITORY = 'PrismarineJS/bedrock-protocol' + process.env.GITHUB_EVENT_NAME = 'issue_comment' + process.env.GITHUB_SHA = 'cb2fd97b6eae9f2c7fee79d5a86eb9c3b4ac80d8' + process.env.GITHUB_REF = 'refs/heads/master' + process.env.GITHUB_WORKFLOW = 'Issue comments' + process.env.GITHUB_ACTION = 'run1' + process.env.GITHUB_ACTOR = 'test-user' + module.exports = { getIssueStatus: () => ({}), updateIssue: () => {}, createIssue: () => {} } + return +} + +// const { Octokit } = require('@octokit/rest') // https://github.com/octokit/rest.js +const github = require('@actions/github') + +const token = process.env.GITHUB_TOKEN +const octokit = github.getOctokit(token) +const context = github.context + +async function getIssueStatus (title) { + // https://docs.github.com/en/rest/reference/search#search-issues-and-pull-requests + const existingIssues = await octokit.rest.search.issuesAndPullRequests({ + q: `is:issue repo:${process.env.GITHUB_REPOSITORY} in:title ${title}` + }) + // console.log('Existing issues', existingIssues) + const existingIssue = existingIssues.data.items.find(issue => issue.title === title) + + if (!existingIssue) return {} + + return { open: existingIssue.state === 'open', closed: existingIssue.state === 'closed', id: existingIssue.number } +} + +async function updateIssue (id, payload) { + const issue = await octokit.rest.issues.update({ + ...context.repo, + issue_number: id, + body: payload.body + }) + console.log(`Updated issue ${issue.data.title}#${issue.data.number}: ${issue.data.html_url}`) +} + +async function createIssue (payload) { + const issue = await octokit.rest.issues.create({ + ...context.repo, + ...payload + }) + console.log(`Created issue ${issue.data.title}#${issue.data.number}: ${issue.data.html_url}`) +} + +async function close (id, reason) { + if (reason) await octokit.rest.issues.createComment({ ...context.repo, issue_number: id, body: reason }) + const issue = await octokit.rest.issues.update({ ...context.repo, issue_number: id, state: 'closed' }) + console.log(`Closed issue ${issue.data.title}#${issue.data.number}: ${issue.data.html_url}`) +} + +if (process.env.CI) { + module.exports = { getIssueStatus, updateIssue, createIssue, close } +} diff --git a/.github/helper-bot/index.js b/.github/helper-bot/index.js new file mode 100644 index 0000000..58d7856 --- /dev/null +++ b/.github/helper-bot/index.js @@ -0,0 +1,137 @@ +// Automatic version update checker for Minecraft bedrock edition. +const fs = require('fs') +const cp = require('child_process') +const helper = require('./github-helper') +const latestVesionEndpoint = 'https://itunes.apple.com/lookup?bundleId=com.mojang.minecraftpe' +const changelogURL = 'https://feedback.minecraft.net/hc/en-us/sections/360001186971-Release-Changelogs' + +// Relevant infomation for us is: +// "version": "1.17.10", +// "currentVersionReleaseDate": "2021-07-13T15:35:49Z", +// "releaseNotes": "What's new in 1.17.10:\nVarious bug fixes", + +function buildFirstIssue (title, result, externalPatches) { + let commitData = '' + let protocolVersion = '?' + const date = new Date(result.currentVersionReleaseDate).toUTCString() + + for (const name in externalPatches) { + commitData += '### ' + name + '\n' + const [patches, diff] = externalPatches[name] + for (const [name, url] of patches) { + commitData += `${name}\n` + } + commitData += `\n**[See the diff between *${result.currentVersionReleaseDate}* and now](${diff})**\n` + } + try { protocolVersion = getProtocolVersion() } catch (e) { console.log(e) } + + return { + title, + body: ` +A new Minecraft Bedrock version is available (as of ${date}), version **${result.version}** + +## Official Changelog +* ${result.releaseNotes} *(via App Store)* +* ${changelogURL} + +## 3rd party protocol patches +${commitData} + +## Protocol Details +(I will close this issue automatically if "${result.version}" is added to index.d.ts on "master" and there are no X's below) + + + + +
Name${result.version}
Protocol ID${protocolVersion}
+ +----- + +🤖 I am a bot, I check for updates every 2 hours without a trigger. You can close this PR to prevent any further updates. + ` + } +} + +function getCommitsInRepo (repo, containing, since) { + const endpoint = `https://api.github.com/repos/${repo}/commits` + console.log('Getting', endpoint) + cp.execSync(`curl -L ${endpoint} -o commits.json`, { stdio: 'inherit', shell: true }) + const commits = JSON.parse(fs.readFileSync('./commits.json', 'utf-8')) + const relevant = [] + for (const commit of commits) { + if (commit.commit.message.includes(containing)) { + console.log('commit url', commit.html_url) + relevant.push([commit.commit.message, commit.html_url]) + } + } + if (since) { + cp.execSync(`curl -L ${endpoint}?since=${since} -o commits.json`, { stdio: 'inherit', shell: true }) + const commits = JSON.parse(fs.readFileSync('./commits.json', 'utf-8')) + const head = commits[0].sha + const tail = commits[commits.length - 1].sha + return [relevant, `https://github.com/${repo}/compare/${tail}..${head}`] + } + return [relevant] +} + +function getProtocolVersion () { + if (!fs.existsSync('./ProtocolInfo.php')) cp.execSync('curl -LO https://raw.githubusercontent.com/pmmp/PocketMine-MP/stable/src/pocketmine/network/mcpe/protocol/ProtocolInfo.php', { stdio: 'inherit', shell: true }) + const currentApi = fs.readFileSync('./ProtocolInfo.php', 'utf-8') + const [, latestProtocolVersion] = currentApi.match(/public const CURRENT_PROTOCOL = (\d+);/) + return latestProtocolVersion +} + +async function fetchLatest () { + if (!fs.existsSync('./results.json')) cp.execSync(`curl -L ${latestVesionEndpoint} -o results.json`, { stdio: 'inherit', shell: true }) + const json = require('./results.json') + const result = json.results[0] + // console.log(json) + + if (!fs.existsSync('./index.d.ts')) cp.execSync('curl -LO https://raw.githubusercontent.com/PrismarineJS/bedrock-protocol/master/index.d.ts', { stdio: 'inherit', shell: true }) + const currentApi = fs.readFileSync('./index.d.ts', 'utf-8') + const supportedVersions = currentApi.match(/type Version = ([^\n]+)/)[1].replace(/\||'/g, ' ').split(' ').map(k => k.trim()).filter(k => k.length) + console.log(supportedVersions) + + let { version, currentVersionReleaseDate, releaseNotes } = result + console.log(version, currentVersionReleaseDate, releaseNotes) + + const title = `Support Minecraft ${result.version}` + + const issueStatus = await helper.getIssueStatus(title) + + if (supportedVersions.includes(version)) { + if (issueStatus.open) { + helper.close(issueStatus.id, `Closing as ${version} is now supported`) + } + console.log('Latest version is supported.') + return + } + + + if (issueStatus.closed) { + // We already made an issue, but someone else already closed it, don't do anything else + console.log('I already made an issue, but it was closed') + return + } + + version = version.replace('.0', '') + const issuePayload = buildFirstIssue(title, result, { + PocketMine: getCommitsInRepo('pmmp/PocketMine-MP', version, currentVersionReleaseDate), + gophertunnel: getCommitsInRepo('Sandertv/gophertunnel', version, currentVersionReleaseDate), + CloudburstMC: getCommitsInRepo('CloudburstMC/Protocol', version, currentVersionReleaseDate) + }) + + if (issueStatus.open) { + helper.updateIssue(issueStatus.id, issuePayload) + } else { + helper.createIssue(issuePayload) + } + + fs.writeFileSync('./issue.md', issuePayload.body) + console.log('OK, wrote to ./issue.md', issuePayload) +} + +fetchLatest() diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0a1ac07..580260c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,8 +14,6 @@ jobs: strategy: matrix: node-version: [14.x] - env: - FORCE_BUILD: true steps: - uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.node-version }} diff --git a/.github/workflows/update-helper.yml b/.github/workflows/update-helper.yml new file mode 100644 index 0000000..83503ac --- /dev/null +++ b/.github/workflows/update-helper.yml @@ -0,0 +1,24 @@ +name: Update Helper +on: + workflow_dispatch: + schedule: + - cron: "0 */2 * * *" + +jobs: + helper: + name: update-checker + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@master + - name: Set up Node.js + uses: actions/setup-node@master + with: + node-version: 16.0.0 + - name: Install Github Actions toolkit + run: npm i @actions/github + # The env vars contain the relevant trigger information, so we don't need to pass it + - name: Runs helper + run: cd .github/helper-bot && node index.js + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/test/internal.test.js b/test/internal.test.js index 32207e3..d6c11d8 100644 --- a/test/internal.test.js +++ b/test/internal.test.js @@ -3,6 +3,7 @@ const { timedTest } = require('./internal') const { proxyTest } = require('./proxy') const { Versions } = require('../src/options') +const { sleep } = require('../src/datatypes/util') describe('internal client/server test', function () { const vcount = Object.keys(Versions).length @@ -12,6 +13,7 @@ describe('internal client/server test', function () { it('connects ' + version, async () => { console.debug(version) await timedTest(version) + await sleep(100) }) } @@ -19,6 +21,8 @@ describe('internal client/server test', function () { it('proxies ' + version, async () => { console.debug(version) await proxyTest(version) + await sleep(5000) + console.debug('Done', version) }) } }) diff --git a/test/vanilla.test.js b/test/vanilla.test.js index 9cea359..3bae596 100644 --- a/test/vanilla.test.js +++ b/test/vanilla.test.js @@ -2,6 +2,7 @@ const { clientTest } = require('./vanilla') const { Versions } = require('../src/options') +const { sleep } = require('../src/datatypes/util') describe('vanilla server test', function () { const vcount = Object.keys(Versions).length @@ -10,6 +11,7 @@ describe('vanilla server test', function () { for (const version in Versions) { it('client spawns ' + version, async () => { await clientTest(version) + await sleep(100) }) } }) From 8845621e414e8c6c5a19dd8f5880f30419fd6b4d Mon Sep 17 00:00:00 2001 From: extremeheat Date: Mon, 9 Aug 2021 18:24:41 -0400 Subject: [PATCH 029/273] helper-bot: fix API call caching issue Fix issue with server caching the results --- .github/helper-bot/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/helper-bot/index.js b/.github/helper-bot/index.js index 58d7856..63e3988 100644 --- a/.github/helper-bot/index.js +++ b/.github/helper-bot/index.js @@ -2,7 +2,7 @@ const fs = require('fs') const cp = require('child_process') const helper = require('./github-helper') -const latestVesionEndpoint = 'https://itunes.apple.com/lookup?bundleId=com.mojang.minecraftpe' +const latestVesionEndpoint = 'https://itunes.apple.com/lookup?bundleId=com.mojang.minecraftpe&time=' + Date.now() const changelogURL = 'https://feedback.minecraft.net/hc/en-us/sections/360001186971-Release-Changelogs' // Relevant infomation for us is: From 37244db6dc0b44b74cc649d46c7781dd68eca81b Mon Sep 17 00:00:00 2001 From: extremeheat Date: Mon, 9 Aug 2021 23:16:17 -0400 Subject: [PATCH 030/273] Run tests on windows, disable proxy test on ubuntu CI runner (#125) --- .github/workflows/ci.yml | 13 +++++++++---- test/internal.test.js | 19 ++++++++++++------- test/proxy.js | 10 ++++++---- 3 files changed, 27 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 580260c..79e0818 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,15 +5,20 @@ on: branches: [ '*', '!gh-pages' ] pull_request: branches: [ '*', '!gh-pages' ] + workflow_dispatch: + inputs: + via: + description: 'trigger origin' + required: true jobs: build: - runs-on: ubuntu-latest - timeout-minutes: 10 - strategy: matrix: - node-version: [14.x] + os: [ubuntu-latest, windows-latest] + node-version: [16.x] + runs-on: ${{ matrix.os }} + timeout-minutes: 10 steps: - uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.node-version }} diff --git a/test/internal.test.js b/test/internal.test.js index d6c11d8..6e81c43 100644 --- a/test/internal.test.js +++ b/test/internal.test.js @@ -17,12 +17,17 @@ describe('internal client/server test', function () { }) } - for (const version in Versions) { - it('proxies ' + version, async () => { - console.debug(version) - await proxyTest(version) - await sleep(5000) - console.debug('Done', version) - }) + if (process.env.CI && process.platform === 'linux') { + // Don't run the test, see : + // https://github.com/PrismarineJS/bedrock-protocol/issues/124 + } else { + for (const version in Versions) { + it('proxies ' + version, async () => { + console.debug(version) + await proxyTest(version) + await sleep(5000) + console.debug('Done', version) + }) + } } }) diff --git a/test/proxy.js b/test/proxy.js index 2ea17b9..2d94e05 100644 --- a/test/proxy.js +++ b/test/proxy.js @@ -3,9 +3,11 @@ const { sleep, waitFor } = require('../src/datatypes/util') function proxyTest (version, timeout = 1000 * 40) { return waitFor(res => { + const SERVER_PORT = 19000 + ((Math.random() * 100) | 0) + const CLIENT_PORT = 19000 + ((Math.random() * 100) | 0) const server = createServer({ host: '0.0.0.0', // optional - port: 19131, // optional + port: SERVER_PORT, // optional offline: true, version // The server version }) @@ -27,11 +29,11 @@ function proxyTest (version, timeout = 1000 * 40) { offline: true, /* host and port for clients to listen to */ host: '0.0.0.0', - port: 19132, + port: CLIENT_PORT, /* Where to send upstream packets to */ destination: { host: '127.0.0.1', - port: 19131 + port: SERVER_PORT } }) relay.conLog = console.debug @@ -39,7 +41,7 @@ function proxyTest (version, timeout = 1000 * 40) { console.debug('Proxy started', server.options.version) - const client = createClient({ host: '127.0.0.1', version, username: 'Boat', offline: true }) + const client = createClient({ host: '127.0.0.1', port: CLIENT_PORT, version, username: 'Boat', offline: true }) console.debug('Client started') From b3edee0b4aeeee7ce3619b01db0bccdc758bab90 Mon Sep 17 00:00:00 2001 From: extremeheat Date: Mon, 9 Aug 2021 23:19:08 -0400 Subject: [PATCH 031/273] helper-bot: fix url escaping --- .github/helper-bot/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/helper-bot/index.js b/.github/helper-bot/index.js index 63e3988..39fd32c 100644 --- a/.github/helper-bot/index.js +++ b/.github/helper-bot/index.js @@ -85,7 +85,7 @@ function getProtocolVersion () { } async function fetchLatest () { - if (!fs.existsSync('./results.json')) cp.execSync(`curl -L ${latestVesionEndpoint} -o results.json`, { stdio: 'inherit', shell: true }) + if (!fs.existsSync('./results.json')) cp.execSync(`curl -L "${latestVesionEndpoint}" -o results.json`, { stdio: 'inherit', shell: true }) const json = require('./results.json') const result = json.results[0] // console.log(json) From 72850b7f601ecd6764ebe75b40f3963ba3a41513 Mon Sep 17 00:00:00 2001 From: extremeheat Date: Tue, 10 Aug 2021 01:17:39 -0400 Subject: [PATCH 032/273] helper-bot: handle condition where there are no 3rd party commits The helper-bot will still automatically update the PR if there are new commits while PR is still open --- .github/helper-bot/index.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/helper-bot/index.js b/.github/helper-bot/index.js index 39fd32c..95689f2 100644 --- a/.github/helper-bot/index.js +++ b/.github/helper-bot/index.js @@ -16,12 +16,13 @@ function buildFirstIssue (title, result, externalPatches) { const date = new Date(result.currentVersionReleaseDate).toUTCString() for (const name in externalPatches) { - commitData += '### ' + name + '\n' const [patches, diff] = externalPatches[name] + commitData += '### ' + name + '\n' for (const [name, url] of patches) { commitData += `${name}\n` } - commitData += `\n**[See the diff between *${result.currentVersionReleaseDate}* and now](${diff})**\n` + if (diff) commitData += `\n**[See the diff between *${result.currentVersionReleaseDate}* and now](${diff})**\n` + else commitData += '\n(No changes so far)\n' } try { protocolVersion = getProtocolVersion() } catch (e) { console.log(e) } @@ -70,9 +71,11 @@ function getCommitsInRepo (repo, containing, since) { if (since) { cp.execSync(`curl -L ${endpoint}?since=${since} -o commits.json`, { stdio: 'inherit', shell: true }) const commits = JSON.parse(fs.readFileSync('./commits.json', 'utf-8')) - const head = commits[0].sha - const tail = commits[commits.length - 1].sha - return [relevant, `https://github.com/${repo}/compare/${tail}..${head}`] + if (commits.length) { + const head = commits[0].sha + const tail = commits[commits.length - 1].sha + return [relevant, `https://github.com/${repo}/compare/${tail}..${head}`] + } } return [relevant] } From 2f941335f63fb1df5b5b67c4b609f150113dbc45 Mon Sep 17 00:00:00 2001 From: u9g <43508353+u9g@users.noreply.github.com> Date: Tue, 10 Aug 2021 02:36:26 -0400 Subject: [PATCH 033/273] Fix small typo in helper-bot (#128) --- .github/helper-bot/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/helper-bot/index.js b/.github/helper-bot/index.js index 95689f2..e9d5893 100644 --- a/.github/helper-bot/index.js +++ b/.github/helper-bot/index.js @@ -51,7 +51,7 @@ ${commitData} ----- -🤖 I am a bot, I check for updates every 2 hours without a trigger. You can close this PR to prevent any further updates. +🤖 I am a bot, I check for updates every 2 hours without a trigger. You can close this issue to prevent any further updates. ` } } From 2d42caafb9a97701b14f8d4fe4c871f845a3623c Mon Sep 17 00:00:00 2001 From: u9g <43508353+u9g@users.noreply.github.com> Date: Tue, 10 Aug 2021 21:17:41 -0400 Subject: [PATCH 034/273] Fix Typo in readme example (#129) * Fix Typo in readme example * ServerAdvertisement: Fix motd name doc/code inconsistency * Update advertisement.js * Update advertisement.js Co-authored-by: extremeheat --- README.md | 2 +- src/server/advertisement.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 17b75a0..04dc13f 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,7 @@ client.on('text', (packet) => { // Listen for chat messages and echo them back. *Can't connect locally on Windows? See the [faq](docs/FAQ.md)* ```js const bedrock = require('bedrock-protocol') -const server = new bedrock.createServer({ +const server = bedrock.createServer({ host: '0.0.0.0', // optional. host to bind as. port: 19132, // optional version: '1.17.10', // optional. The server version, latest if not specified. diff --git a/src/server/advertisement.js b/src/server/advertisement.js index 3bca141..3a2fee8 100644 --- a/src/server/advertisement.js +++ b/src/server/advertisement.js @@ -12,6 +12,7 @@ class ServerAdvertisement { serverId = '0' constructor (obj, version) { + if (obj?.name) obj.motd = obj.name Object.assign(this, obj) } From 3267bbfca16fd3c154092edccb6468f5717141a0 Mon Sep 17 00:00:00 2001 From: u9g <43508353+u9g@users.noreply.github.com> Date: Thu, 12 Aug 2021 00:05:29 -0400 Subject: [PATCH 035/273] Fix typo in example (#130) --- examples/serverReadmeExample.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/serverReadmeExample.js b/examples/serverReadmeExample.js index 06ab2d9..92039f7 100644 --- a/examples/serverReadmeExample.js +++ b/examples/serverReadmeExample.js @@ -1,6 +1,6 @@ /* eslint-disable */ const bedrock = require('bedrock-protocol') -const server = new bedrock.createServer({ +const server = bedrock.createServer({ host: '0.0.0.0', // optional port: 19132, // optional version: '1.17.10', // The server version @@ -15,4 +15,4 @@ server.on('connect', client => { const d = new Date() // Once client is in the server, send a colorful kick message client.disconnect(`Good ${d.getHours() < 12 ? '§emorning§r' : '§3afternoon§r'} :)\n\nMy time is ${d.toLocaleString()} !`) }) -}) \ No newline at end of file +}) From c5858d5adda866af8ea19f6909ae6296b6c5831a Mon Sep 17 00:00:00 2001 From: Jordan Jones Date: Mon, 16 Aug 2021 04:06:19 -0700 Subject: [PATCH 036/273] Implement Prismarine Auth (#131) * add prismarine-auth and mfp * implement prismarine-auth * putting this on the record, i am stupid * Remove unneeded files * Use export from prismarine-auth * fix cache path * default the authTitle to MNS needs testings * Remove unnecessary comment --- index.js | 4 +- package.json | 11 +- src/client.js | 2 +- src/client/auth.js | 99 +++--- src/client/authConstants.js | 10 - src/client/authFlow.js | 161 ---------- src/client/titles.js | 4 - src/client/tokens.js | 592 ------------------------------------ 8 files changed, 52 insertions(+), 831 deletions(-) delete mode 100644 src/client/authConstants.js delete mode 100644 src/client/authFlow.js delete mode 100644 src/client/titles.js delete mode 100644 src/client/tokens.js diff --git a/index.js b/index.js index e3241a5..dcd3a80 100644 --- a/index.js +++ b/index.js @@ -9,7 +9,7 @@ const { Server } = require('./src/server') const { Relay } = require('./src/relay') const { createClient, ping } = require('./src/createClient') const { createServer } = require('./src/createServer') -const Title = require('./src/client/titles') +const { Titles } = require('prismarine-auth') module.exports = { Client, @@ -18,5 +18,5 @@ module.exports = { createClient, ping, createServer, - title: Title + title: Titles } diff --git a/package.json b/package.json index ac23547..e521bae 100644 --- a/package.json +++ b/package.json @@ -27,8 +27,9 @@ "jose-node-cjs-runtime": "^3.12.1", "jsonwebtoken": "^8.5.1", "jsp-raknet": "^2.1.3", - "minecraft-folder-path": "^1.1.0", + "minecraft-folder-path": "^1.2.0", "node-fetch": "^2.6.1", + "prismarine-auth": "^1.1.0", "prismarine-nbt": "^1.5.0", "protodef": "^1.14.0", "smart-buffer": "^4.1.0", @@ -39,13 +40,13 @@ }, "devDependencies": { "@babel/eslint-parser": "^7.13.10", - "bedrock-provider": "^1.0.0", "babel-eslint": "^10.1.0", + "bedrock-protocol": "file:.", + "bedrock-provider": "^1.0.0", + "leveldb-zlib": "^1.0.1", "mocha": "^8.3.2", "protodef-yaml": "^1.1.0", - "standard": "^16.0.3", - "leveldb-zlib": "^1.0.1", - "bedrock-protocol": "file:." + "standard": "^16.0.3" }, "standard": { "parser": "babel-eslint" diff --git a/src/client.js b/src/client.js index bf6d167..3e4c9b6 100644 --- a/src/client.js +++ b/src/client.js @@ -50,7 +50,7 @@ class Client extends Connection { debug('offline mode, not authenticating', this.options) auth.createOfflineSession(this, this.options) } else { - auth.authenticateDeviceCode(this, this.options) + auth.authenticate(this, this.options) } this.startQueue() diff --git a/src/client/auth.js b/src/client/auth.js index d7ffc8d..bee00f3 100644 --- a/src/client/auth.js +++ b/src/client/auth.js @@ -1,31 +1,48 @@ -const { MsAuthFlow } = require('./authFlow.js') +const path = require('path') +const { Authflow: PrismarineAuth, Titles } = require('prismarine-auth') +const minecraftFolderPath = require('minecraft-folder-path') +const debug = require('debug')('minecraft-protocol') const { uuidFrom } = require('../datatypes/util') /** - * Obtains Minecaft profile data using a Minecraft access token and starts the join sequence + * Authenticates to Minecraft via device code based Microsoft auth, + * then connects to the specified server in Client Options + * + * @function * @param {object} client - The client passed to protocol * @param {object} options - Client Options - * @param {string} chains - Minecraft JWTs to send to server */ -async function postAuthenticate (client, options, chains) { - // First chain is Mojang stuff, second is Xbox profile data used by mc - const jwt = chains[1] - const [header, payload, signature] = jwt.split('.').map(k => Buffer.from(k, 'base64')) // eslint-disable-line - const xboxProfile = JSON.parse(String(payload)) - - // This profile / session here could be simplified down to where it just passes the uuid of the player to encrypt.js - // That way you could remove some lines of code. It accesses client.session.selectedProfile.id so /shrug. - // - Kashalls - const profile = { - name: xboxProfile?.extraData?.displayName || 'Player', - uuid: xboxProfile?.extraData?.identity || 'adfcf5ca-206c-404a-aec4-f59fff264c9b', // random - xuid: xboxProfile?.extraData?.XUID || 0 +async function authenticate (client, options) { + if (!options.profilesFolder) { + options.profilesFolder = path.join(minecraftFolderPath, 'nmp-cache') } + if (!options.authTitle) { + options.authTitle = Titles.MinecraftNintendoSwitch + } + try { + const Authflow = new PrismarineAuth(options.username, options.profilesFolder, options, options.onMsaCode) + const chains = await Authflow.getMinecraftBedrockToken(client.clientX509) - client.profile = profile - client.username = profile.name - client.accessToken = chains - client.emit('session', profile) + debug('chains', chains) + + // First chain is Mojang stuff, second is Xbox profile data used by mc + const jwt = chains[1] + const [header, payload, signature] = jwt.split('.').map(k => Buffer.from(k, 'base64')) // eslint-disable-line + const xboxProfile = JSON.parse(String(payload)) + + debug('got xbox profile', xboxProfile) + + const profile = { + name: xboxProfile?.extraData?.displayName || 'Player', + uuid: xboxProfile?.extraData?.identity || 'adfcf5ca-206c-404a-aec4-f59fff264c9b', // random + xuid: xboxProfile?.extraData?.XUID || 0 + } + + return postAuthenticate(client, profile, chains) + } catch (err) { + console.error(err) + client.emit('error', err) + } } /** @@ -38,49 +55,19 @@ function createOfflineSession (client, options) { uuid: uuidFrom(options.username), // random xuid: 0 } + return postAuthenticate(client, profile, []) // No extra JWTs, only send 1 client signed chain with all the data +} + +function postAuthenticate (client, profile, chains) { client.profile = profile client.username = profile.name - client.accessToken = [] // No extra JWTs, only send 1 client signed chain with all the data + client.accessToken = chains client.emit('session', profile) } -/** - * Authenticates with Mincrosoft through user credentials, then - * with Xbox Live, Minecraft, checks entitlements and returns profile - * - * @function - * @param {object} client - The client passed to protocol - * @param {object} options - Client Options - */ -async function authenticatePassword (client, options) { - throw Error('Not implemented') -} - -/** - * Authenticates to Minecraft via device code based Microsoft auth, - * then connects to the specified server in Client Options - * - * @function - * @param {object} client - The client passed to protocol - * @param {object} options - Client Options - */ -async function authenticateDeviceCode (client, options) { - try { - const flow = new MsAuthFlow(options.username, options.profilesFolder, options, options.onMsaCode) - - const chain = await flow.getMinecraftToken(client.clientX509) - // console.log('Chain', chain) - await postAuthenticate(client, options, chain) - } catch (err) { - console.error(err) - client.emit('error', err) - } -} - module.exports = { createOfflineSession, - authenticatePassword, - authenticateDeviceCode + authenticate } // async function msaTest () { diff --git a/src/client/authConstants.js b/src/client/authConstants.js deleted file mode 100644 index 1f5066f..0000000 --- a/src/client/authConstants.js +++ /dev/null @@ -1,10 +0,0 @@ -module.exports = { - XSTSRelyingParty: 'https://multiplayer.minecraft.net/', - MinecraftAuth: 'https://multiplayer.minecraft.net/authentication', - XboxDeviceAuth: 'https://device.auth.xboxlive.com/device/authenticate', - XboxTitleAuth: 'https://title.auth.xboxlive.com/title/authenticate', - XstsAuthorize: 'https://xsts.auth.xboxlive.com/xsts/authorize', - - LiveDeviceCodeRequest: 'https://login.live.com/oauth20_connect.srf', - LiveTokenRequest: 'https://login.live.com/oauth20_token.srf' -} diff --git a/src/client/authFlow.js b/src/client/authFlow.js deleted file mode 100644 index 16c6c68..0000000 --- a/src/client/authFlow.js +++ /dev/null @@ -1,161 +0,0 @@ -const crypto = require('crypto') -const path = require('path') -const fs = require('fs') -const debug = require('debug')('minecraft-protocol') -const mcDefaultFolderPath = require('minecraft-folder-path') -const authConstants = require('./authConstants') -const { LiveTokenManager, MsaTokenManager, XboxTokenManager, MinecraftTokenManager } = require('./tokens') - -// Initialize msal -// Docs: https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-common/docs/request.md#public-apis-1 -const msalConfig = { - auth: { - // the minecraft client: - // clientId: "000000004C12AE6F", - clientId: '389b1b32-b5d5-43b2-bddc-84ce938d6737', // token from https://github.com/microsoft/Office365APIEditor - authority: 'https://login.microsoftonline.com/consumers' - } -} - -async function retry (methodFn, beforeRetry, times) { - while (times--) { - if (times !== 0) { - try { return await methodFn() } catch (e) { debug(e) } - await new Promise(resolve => setTimeout(resolve, 2000)) - await beforeRetry() - } else { - return await methodFn() - } - } -} - -class MsAuthFlow { - constructor (username, cacheDir, options = {}, codeCallback) { - this.options = options - this.initTokenCaches(username, cacheDir) - this.codeCallback = codeCallback - } - - initTokenCaches (username, cacheDir) { - const hash = sha1(username).substr(0, 6) - - let cachePath = cacheDir || mcDefaultFolderPath - try { - if (!fs.existsSync(cachePath + '/nmp-cache')) { - fs.mkdirSync(cachePath + '/nmp-cache') - } - cachePath += '/nmp-cache' - } catch (e) { - console.log('Failed to open cache dir', e) - cachePath = __dirname - } - - const cachePaths = { - live: path.join(cachePath, `./${hash}_live-cache.json`), - msa: path.join(cachePath, `./${hash}_msa-cache.json`), - xbl: path.join(cachePath, `./${hash}_xbl-cache.json`), - bed: path.join(cachePath, `./${hash}_bed-cache.json`) - } - - if (this.options.authTitle) { // Login with login.live.com - const scopes = ['service::user.auth.xboxlive.com::MBI_SSL'] - this.msa = new LiveTokenManager(this.options.authTitle, scopes, cachePaths.live) - } else { // Login with microsoftonline.com - const scopes = ['XboxLive.signin', 'offline_access'] - this.msa = new MsaTokenManager(msalConfig, scopes, cachePaths.msa) - } - - const keyPair = crypto.generateKeyPairSync('ec', { namedCurve: 'P-256' }) - this.xbl = new XboxTokenManager(authConstants.XSTSRelyingParty, keyPair, cachePaths.xbl) - this.mca = new MinecraftTokenManager(cachePaths.bed) - } - - static resetTokenCaches (cacheDir) { - let cachePath = cacheDir || mcDefaultFolderPath - try { - if (fs.existsSync(cachePath + '/nmp-cache')) { - cachePath += '/nmp-cache' - fs.rmdirSync(cachePath, { recursive: true }) - return true - } - } catch (e) { - console.log('Failed to clear cache dir', e) - return false - } - } - - async getMsaToken () { - if (await this.msa.verifyTokens()) { - debug('[msa] Using existing tokens') - return this.msa.getAccessToken().token - } else { - debug('[msa] No valid cached tokens, need to sign in') - const ret = await this.msa.authDeviceCode((response) => { - console.info('[msa] First time signing in. Please authenticate now:') - console.info(response.message) - if (this.codeCallback) this.codeCallback(response) - }) - - if (ret.account) { - console.info(`[msa] Signed in as ${ret.account.username}`) - } else { // We don't get extra account data here per scope - console.info('[msa] Signed in with Microsoft') - } - - debug('[msa] got auth result', ret) - return ret.accessToken - } - } - - async getXboxToken () { - if (await this.xbl.verifyTokens()) { - debug('[xbl] Using existing XSTS token') - return this.xbl.getCachedXstsToken().data - } else { - debug('[xbl] Need to obtain tokens') - return await retry(async () => { - const msaToken = await this.getMsaToken() - const ut = await this.xbl.getUserToken(msaToken, !this.options.authTitle) - - if (this.options.authTitle) { - const deviceToken = await this.xbl.getDeviceToken({ DeviceType: 'Nintendo', Version: '0.0.0' }) - const titleToken = await this.xbl.getTitleToken(msaToken, deviceToken) - const xsts = await this.xbl.getXSTSToken(ut, deviceToken, titleToken) - return xsts - } else { - const xsts = await this.xbl.getXSTSToken(ut) - return xsts - } - }, () => { this.msa.forceRefresh = true }, 2) - } - } - - async getMinecraftToken (publicKey) { - // TODO: Fix cache, in order to do cache we also need to cache the ECDH keys so disable it - // is this even a good idea to cache? - if (await this.mca.verifyTokens() && false) { // eslint-disable-line - debug('[mc] Using existing tokens') - return this.mca.getCachedAccessToken().chain - } else { - if (!publicKey) throw new Error('Need to specifiy a ECDH x509 URL encoded public key') - debug('[mc] Need to obtain tokens') - return await retry(async () => { - const xsts = await this.getXboxToken() - debug('[xbl] xsts data', xsts) - const token = await this.mca.getAccessToken(publicKey, xsts) - // If we want to auth with a title ID, make sure there's a TitleID in the response - const body = JSON.parse(Buffer.from(token.chain[1].split('.')[1], 'base64').toString()) - if (!body.extraData.titleId && this.options.authTitle) { - throw Error('missing titleId in response') - } - return token.chain - }, () => { this.xbl.forceRefresh = true }, 2) - } - } -} - -function sha1 (data) { - return crypto.createHash('sha1').update(data || '', 'binary').digest('hex') -} - -module.exports = { MsAuthFlow } diff --git a/src/client/titles.js b/src/client/titles.js deleted file mode 100644 index 66ca06c..0000000 --- a/src/client/titles.js +++ /dev/null @@ -1,4 +0,0 @@ -module.exports = { - MinecraftNintendoSwitch: '00000000441cc96b', - MinecraftJava: '00000000402b5328' -} diff --git a/src/client/tokens.js b/src/client/tokens.js deleted file mode 100644 index f4436d6..0000000 --- a/src/client/tokens.js +++ /dev/null @@ -1,592 +0,0 @@ -const msal = require('@azure/msal-node') -const XboxLiveAuth = require('@xboxreplay/xboxlive-auth') -const debug = require('debug')('minecraft-protocol') -const fs = require('fs') -const path = require('path') -const fetch = require('node-fetch') -const authConstants = require('./authConstants') -const crypto = require('crypto') -const { nextUUID } = require('../datatypes/util') -const { SmartBuffer } = require('smart-buffer') -const jose = require('jose-node-cjs-runtime/jwk/from_key_like') - -class LiveTokenManager { - constructor (clientId, scopes, cacheLocation) { - this.clientId = clientId - this.scopes = scopes - this.cacheLocation = cacheLocation - this.reloadCache() - } - - reloadCache () { - try { - this.cache = require(this.cacheLocation) - } catch (e) { - this.cache = {} - fs.writeFileSync(this.cacheLocation, JSON.stringify(this.cache)) - } - } - - async verifyTokens () { - if (this.forceRefresh) try { await this.refreshTokens() } catch { } - const at = this.getAccessToken() - const rt = this.getRefreshToken() - if (!at || !rt) { - return false - } - debug('[live] have at, rt', at, rt) - if (at.valid && rt) { - return true - } else { - try { - await this.refreshTokens() - return true - } catch (e) { - console.warn('Error refreshing token', e) // TODO: looks like an error happens here - return false - } - } - } - - async refreshTokens () { - const rtoken = this.getRefreshToken() - if (!rtoken) { - throw new Error('Cannot refresh without refresh token') - } - - const codeRequest = { - method: 'post', - body: new URLSearchParams({ scope: this.scopes, client_id: this.clientId, grant_type: 'refresh_token', refresh_token: rtoken.token }).toString(), - headers: { - 'Content-Type': 'application/x-www-form-urlencoded' - }, - credentials: 'include' // This cookie handler does not work on node-fetch ... - } - - const token = await fetch(authConstants.LiveTokenRequest, codeRequest).then(checkStatus) - this.updateCachce(token) - return token - } - - getAccessToken () { - const token = this.cache.token - if (!token) return - const until = new Date(token.obtainedOn + token.expires_in) - Date.now() - const valid = until > 1000 - return { valid, until: until, token: token.access_token } - } - - getRefreshToken () { - const token = this.cache.token - if (!token) return - const until = new Date(token.obtainedOn + token.expires_in) - Date.now() - const valid = until > 1000 - return { valid, until: until, token: token.refresh_token } - } - - updateCachce (data) { - data.obtainedOn = Date.now() - this.cache.token = data - fs.writeFileSync(this.cacheLocation, JSON.stringify(this.cache)) - } - - async authDeviceCode (deviceCodeCallback) { - const acquireTime = Date.now() - const codeRequest = { - method: 'post', - body: new URLSearchParams({ scope: this.scopes, client_id: this.clientId, response_type: 'device_code' }).toString(), - headers: { - 'Content-Type': 'application/x-www-form-urlencoded' - }, - credentials: 'include' // This cookie handler does not work on node-fetch ... - } - - debug('Requesting live device token', codeRequest) - - const cookies = [] - - const res = await fetch(authConstants.LiveDeviceCodeRequest, codeRequest) - .then(res => { - if (res.status !== 200) { - res.text().then(console.warn) - throw Error('Failed to request live.com device code') - } - for (const cookie of Object.values(res.headers.raw()['set-cookie'])) { - const [keyval] = cookie.split(';') - cookies.push(keyval) - } - return res - }) - .then(checkStatus).then(resp => { - resp.message = `To sign in, use a web browser to open the page ${resp.verification_uri} and enter the code ${resp.user_code} to authenticate.` - deviceCodeCallback(resp) - return resp - }) - const expireTime = acquireTime + (res.expires_in * 1000) - 100 /* for safety */ - - this.polling = true - while (this.polling && expireTime > Date.now()) { - await new Promise(resolve => setTimeout(resolve, res.interval * 1000)) - try { - const verifi = { - method: 'post', - headers: { - 'Content-Type': 'application/x-www-form-urlencoded', - Cookie: cookies.join('; ') - }, - body: new URLSearchParams({ - client_id: this.clientId, - device_code: res.device_code, - grant_type: 'urn:ietf:params:oauth:grant-type:device_code' - }).toString() - } - - const token = await fetch(authConstants.LiveTokenRequest + '?client_id=' + this.clientId, verifi) - .then(res => res.json()).then(res => { - if (res.error) { - if (res.error === 'authorization_pending') { - debug('[live] Still waiting:', res.error_description) - } else { - throw Error(`Failed to acquire authorization code from device token (${res.error}) - ${res.error_description}`) - } - } else { - return res - } - }) - if (!token) continue - this.updateCachce(token) - this.polling = false - return { accessToken: token.access_token } - } catch (e) { - console.debug(e) - } - } - this.polling = false - throw Error('Authenitcation failed, timed out') - } -} - -// Manages Microsoft account tokens -class MsaTokenManager { - constructor (msalConfig, scopes, cacheLocation) { - this.msaClientId = msalConfig.auth.clientId - this.scopes = scopes - this.cacheLocation = cacheLocation || path.join(__dirname, './msa-cache.json') - - this.reloadCache() - - const beforeCacheAccess = async (cacheContext) => { - cacheContext.tokenCache.deserialize(await fs.promises.readFile(this.cacheLocation, 'utf-8')) - } - - const afterCacheAccess = async (cacheContext) => { - if (cacheContext.cacheHasChanged) { - await fs.promises.writeFile(this.cacheLocation, cacheContext.tokenCache.serialize()) - } - } - - const cachePlugin = { - beforeCacheAccess, - afterCacheAccess - } - - msalConfig.cache = { - cachePlugin - } - this.msalApp = new msal.PublicClientApplication(msalConfig) - this.msalConfig = msalConfig - } - - reloadCache () { - try { - this.msaCache = require(this.cacheLocation) - } catch (e) { - this.msaCache = {} - fs.writeFileSync(this.cacheLocation, JSON.stringify(this.msaCache)) - } - } - - getUsers () { - const accounts = this.msaCache.Account - const users = [] - if (!accounts) return users - for (const account of Object.values(accounts)) { - users.push(account) - } - return users - } - - getAccessToken () { - const tokens = this.msaCache.AccessToken - if (!tokens) return - const account = Object.values(tokens).filter(t => t.client_id === this.msaClientId)[0] - if (!account) { - debug('[msa] No valid access token found', tokens) - return - } - const until = new Date(account.expires_on * 1000) - Date.now() - const valid = until > 1000 - return { valid, until: until, token: account.secret } - } - - getRefreshToken () { - const tokens = this.msaCache.RefreshToken - if (!tokens) return - const account = Object.values(tokens).filter(t => t.client_id === this.msaClientId)[0] - if (!account) { - debug('[msa] No valid refresh token found', tokens) - return - } - return { token: account.secret } - } - - async refreshTokens () { - const rtoken = this.getRefreshToken() - if (!rtoken) { - throw new Error('Cannot refresh without refresh token') - } - const refreshTokenRequest = { - refreshToken: rtoken.token, - scopes: this.scopes - } - - return new Promise((resolve, reject) => { - this.msalApp.acquireTokenByRefreshToken(refreshTokenRequest).then((response) => { - debug('[msa] refreshed token', JSON.stringify(response)) - this.reloadCache() - resolve(response) - }).catch((error) => { - debug('[msa] failed to refresh', JSON.stringify(error)) - reject(error) - }) - }) - } - - async verifyTokens () { - if (this.forceRefresh) try { await this.refreshTokens() } catch { } - const at = this.getAccessToken() - const rt = this.getRefreshToken() - if (!at || !rt) { - return false - } - debug('[msa] have at, rt', at, rt) - if (at.valid && rt) { - return true - } else { - try { - await this.refreshTokens() - return true - } catch (e) { - console.warn('Error refreshing token', e) // TODO: looks like an error happens here - return false - } - } - } - - // Authenticate with device_code flow - async authDeviceCode (dataCallback) { - const deviceCodeRequest = { - deviceCodeCallback: (resp) => { - debug('[msa] device_code response: ', resp) - dataCallback(resp) - }, - scopes: this.scopes - } - - return new Promise((resolve, reject) => { - this.msalApp.acquireTokenByDeviceCode(deviceCodeRequest).then((response) => { - debug('[msa] device_code resp', JSON.stringify(response)) - if (!this.msaCache.Account) this.msaCache.Account = { '': response.account } - resolve(response) - }).catch((error) => { - console.warn('[msa] Error getting device code') - console.debug(JSON.stringify(error)) - reject(error) - }) - }) - } -} - -// Manages Xbox Live tokens for xboxlive.com -class XboxTokenManager { - constructor (relyingParty, ecKey, cacheLocation) { - this.relyingParty = relyingParty - this.key = ecKey - jose.fromKeyLike(ecKey.publicKey).then(jwk => { - this.jwk = { ...jwk, alg: 'ES256', use: 'sig' } - }) - this.cacheLocation = cacheLocation || path.join(__dirname, './xbl-cache.json') - try { - this.cache = require(this.cacheLocation) - } catch (e) { - this.cache = {} - } - - this.headers = { 'Cache-Control': 'no-store, must-revalidate, no-cache', 'x-xbl-contract-version': 1 } - } - - getCachedUserToken () { - const token = this.cache.userToken - if (!token) return - const until = new Date(token.NotAfter) - const dn = Date.now() - const remainingMs = until - dn - const valid = remainingMs > 1000 - return { valid, token: token.Token, data: token } - } - - getCachedXstsToken () { - const token = this.cache.xstsToken - if (!token) return - const until = new Date(token.expiresOn) - const dn = Date.now() - const remainingMs = until - dn - const valid = remainingMs > 1000 - return { valid, token: token.XSTSToken, data: token } - } - - setCachedUserToken (data) { - this.cache.userToken = data - fs.writeFileSync(this.cacheLocation, JSON.stringify(this.cache)) - } - - setCachedXstsToken (data) { - this.cache.xstsToken = data - fs.writeFileSync(this.cacheLocation, JSON.stringify(this.cache)) - } - - async verifyTokens () { - const ut = this.getCachedUserToken() - const xt = this.getCachedXstsToken() - if (!ut || !xt || this.forceRefresh) { - return false - } - debug('[xbl] have user, xsts', ut, xt) - if (ut.valid && xt.valid) { - return true - } else if (ut.valid && !xt.valid) { - try { - await this.getXSTSToken(ut.data) - return true - } catch (e) { - return false - } - } - return false - } - - async getUserToken (msaAccessToken, azure) { - debug('[xbl] obtaining xbox token with ms token', msaAccessToken) - msaAccessToken = (azure ? 'd=' : 't=') + msaAccessToken - const xblUserToken = await XboxLiveAuth.exchangeRpsTicketForUserToken(msaAccessToken) - this.setCachedUserToken(xblUserToken) - debug('[xbl] user token:', xblUserToken) - return xblUserToken - } - - // Make signature for the data being sent to server with our private key; server is sent our public key in plaintext - sign (url, authorizationToken, payload) { - // Their backend servers use Windows epoch timestamps, account for that. The server is very picky, - // bad percision or wrong epoch may fail the request. - const windowsTimestamp = (BigInt((Date.now() / 1000) | 0) + 11644473600n) * 10000000n - // Only the /uri?and-query-string - const pathAndQuery = new URL(url).pathname - - // Allocate the buffer for signature, TS, path, tokens and payload and NUL termination - const allocSize = /* sig */ 5 + /* ts */ 9 + /* POST */ 5 + pathAndQuery.length + 1 + authorizationToken.length + 1 + payload.length + 1 - const buf = SmartBuffer.fromSize(allocSize) - buf.writeInt32BE(1) // Policy Version - buf.writeUInt8(0) - buf.writeBigUInt64BE(windowsTimestamp) - buf.writeUInt8(0) // null term - buf.writeStringNT('POST') - buf.writeStringNT(pathAndQuery) - buf.writeStringNT(authorizationToken) - buf.writeStringNT(payload) - - // Get the signature from the payload - const signature = crypto.sign('SHA256', buf.toBuffer(), { key: this.key.privateKey, dsaEncoding: 'ieee-p1363' }) - - const header = SmartBuffer.fromSize(signature.length + 12) - header.writeInt32BE(1) // Policy Version - header.writeBigUInt64BE(windowsTimestamp) - header.writeBuffer(signature) // Add signature at end of header - - return header.toBuffer() - } - - // If we don't need Xbox Title Authentication, we can have xboxreplay lib - // handle the auth, otherwise we need to build the request ourselves with - // the extra token data. - async getXSTSToken (xblUserToken, deviceToken, titleToken) { - if (deviceToken && titleToken) return this.getXSTSTokenWithTitle(xblUserToken, deviceToken, titleToken) - - debug('[xbl] obtaining xsts token with xbox user token (with XboxReplay)', xblUserToken.Token) - const xsts = await XboxLiveAuth.exchangeUserTokenForXSTSIdentity(xblUserToken.Token, { XSTSRelyingParty: this.relyingParty, raw: false }) - this.setCachedXstsToken(xsts) - debug('[xbl] xsts', xsts) - return xsts - } - - async getXSTSTokenWithTitle (xblUserToken, deviceToken, titleToken, optionalDisplayClaims) { - const userToken = xblUserToken.Token - debug('[xbl] obtaining xsts token with xbox user token', userToken) - - const payload = { - RelyingParty: this.relyingParty, - TokenType: 'JWT', - Properties: { - UserTokens: [userToken], - DeviceToken: deviceToken, - TitleToken: titleToken, - OptionalDisplayClaims: optionalDisplayClaims, - ProofKey: this.jwk, - SandboxId: 'RETAIL' - } - } - - const body = JSON.stringify(payload) - const signature = this.sign(authConstants.XstsAuthorize, '', body).toString('base64') - - const headers = { ...this.headers, Signature: signature } - - const ret = await fetch(authConstants.XstsAuthorize, { method: 'post', headers, body }).then(checkStatus) - const xsts = { - userXUID: ret.DisplayClaims.xui[0].xid || null, - userHash: ret.DisplayClaims.xui[0].uhs, - XSTSToken: ret.Token, - expiresOn: ret.NotAfter - } - - this.setCachedXstsToken(xsts) - debug('[xbl] xsts', xsts) - return xsts - } - - /** - * Requests an Xbox Live-related device token that uniquely links the XToken (aka xsts token) - * @param {{ DeviceType, Version }} asDevice The hardware type and version to auth as, for example Android or Nintendo - */ - async getDeviceToken (asDevice) { - const payload = { - Properties: { - AuthMethod: 'ProofOfPossession', - Id: `{${nextUUID()}}`, - DeviceType: asDevice.DeviceType || 'Android', - SerialNumber: `{${nextUUID()}}`, - Version: asDevice.Version || '10', - ProofKey: this.jwk - }, - RelyingParty: 'http://auth.xboxlive.com', - TokenType: 'JWT' - } - - const body = JSON.stringify(payload) - - const signature = this.sign(authConstants.XboxDeviceAuth, '', body).toString('base64') - - const headers = { ...this.headers, Signature: signature } - - const ret = await fetch(authConstants.XboxDeviceAuth, { method: 'post', headers, body }).then(checkStatus) - debug('Xbox Device Token', ret) - return ret.Token - } - - // This *only* works with live.com auth - async getTitleToken (msaAccessToken, deviceToken) { - const payload = { - Properties: { - AuthMethod: 'RPS', - DeviceToken: deviceToken, - RpsTicket: 't=' + msaAccessToken, - SiteName: 'user.auth.xboxlive.com', - ProofKey: this.jwk - }, - RelyingParty: 'http://auth.xboxlive.com', - TokenType: 'JWT' - } - const body = JSON.stringify(payload) - const signature = this.sign(authConstants.XboxTitleAuth, '', body).toString('base64') - - const headers = { ...this.headers, Signature: signature } - - const ret = await fetch(authConstants.XboxTitleAuth, { method: 'post', headers, body }).then(checkStatus) - debug('Xbox Title Token', ret) - return ret.Token - } -} - -// Manages Minecraft tokens for sessionserver.mojang.com -class MinecraftTokenManager { - constructor (clientPublicKey, cacheLocation) { - this.clientPublicKey = clientPublicKey - this.cacheLocation = cacheLocation || path.join(__dirname, './bed-cache.json') - try { - this.cache = require(this.cacheLocation) - } catch (e) { - this.cache = {} - } - } - - getCachedAccessToken () { - const token = this.cache.mca - debug('[mc] token cache', this.cache) - if (!token) return - debug('Auth token', token) - const jwt = token.chain[0] - const [header, payload, signature] = jwt.split('.').map(k => Buffer.from(k, 'base64')) // eslint-disable-line - - const body = JSON.parse(String(payload)) - const expires = new Date(body.exp * 1000) - const remainingMs = expires - Date.now() - const valid = remainingMs > 1000 - return { valid, until: expires, chain: token.chain } - } - - setCachedAccessToken (data) { - data.obtainedOn = Date.now() - this.cache.mca = data - fs.writeFileSync(this.cacheLocation, JSON.stringify(this.cache)) - } - - async verifyTokens () { - const at = this.getCachedAccessToken() - if (!at || this.forceRefresh) { - return false - } - debug('[mc] have user access token', at) - if (at.valid) { - return true - } - return false - } - - async getAccessToken (clientPublicKey, xsts) { - debug('[mc] authing to minecraft', clientPublicKey, xsts) - const headers = { - 'Content-Type': 'application/json', - 'User-Agent': 'node-minecraft-protocol', - Authorization: `XBL3.0 x=${xsts.userHash};${xsts.XSTSToken}` - } - const MineServicesResponse = await fetch(authConstants.MinecraftAuth, { - method: 'post', - headers, - body: JSON.stringify({ identityPublicKey: clientPublicKey }) - }).then(checkStatus) - - debug('[mc] mc auth response', MineServicesResponse) - this.setCachedAccessToken(MineServicesResponse) - return MineServicesResponse - } -} - -function checkStatus (res) { - if (res.ok) { // res.status >= 200 && res.status < 300 - return res.json() - } else { - debug('Request fail', res) - throw Error(res.statusText) - } -} - -module.exports = { LiveTokenManager, MsaTokenManager, XboxTokenManager, MinecraftTokenManager } From 2056b7e00168a8dc44f8193c50d9115d888b8df7 Mon Sep 17 00:00:00 2001 From: Romain Beaumont Date: Tue, 24 Aug 2021 05:28:55 +0200 Subject: [PATCH 037/273] add protocol doc link --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 04dc13f..a4ca346 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Minecraft Bedrock Edition (aka MCPE) protocol library, supporting authentication and encryption. Help [contribute](CONTRIBUTING.md). -This is a work in progress. You can track the progress in https://github.com/PrismarineJS/bedrock-protocol/pull/34. +[Protocol doc](https://minecraft-data.prismarine.js.org/?v=bedrock_1.17.10&d=protocol) ## Features From 1f7e94e5db4f13c2a4e5af04344e81230471519c Mon Sep 17 00:00:00 2001 From: extremeheat Date: Sat, 18 Sep 2021 19:50:43 -0400 Subject: [PATCH 038/273] Update some examples, cleanup (#136) * Update some examples, cleanup * lint --- AUTHORS.md => docs/AUTHORS.md | 0 .../client.js} | 0 .../clientInternal.js} | 3 +++ .../createClient.js} | 0 .../basicServer.js} | 0 examples/{serverTest.js => server/server.js} | 18 +++++++++++------- examples/{ => server}/serverChunks.js | 6 +----- package.json | 5 ----- src/client/auth.js | 18 ------------------ src/handshake/loginVerify.js | 2 -- tools/startVanillaServer.js | 2 +- 11 files changed, 16 insertions(+), 38 deletions(-) rename AUTHORS.md => docs/AUTHORS.md (100%) rename examples/{clientReadmeExample.js => client/client.js} (100%) rename examples/{clientTest.js => client/clientInternal.js} (92%) rename examples/{createClientExample.js => client/createClient.js} (100%) rename examples/{serverReadmeExample.js => server/basicServer.js} (100%) rename examples/{serverTest.js => server/server.js} (91%) rename examples/{ => server}/serverChunks.js (83%) diff --git a/AUTHORS.md b/docs/AUTHORS.md similarity index 100% rename from AUTHORS.md rename to docs/AUTHORS.md diff --git a/examples/clientReadmeExample.js b/examples/client/client.js similarity index 100% rename from examples/clientReadmeExample.js rename to examples/client/client.js diff --git a/examples/clientTest.js b/examples/client/clientInternal.js similarity index 92% rename from examples/clientTest.js rename to examples/client/clientInternal.js index a6996eb..f30fe23 100644 --- a/examples/clientTest.js +++ b/examples/client/clientInternal.js @@ -1,3 +1,6 @@ +/** + * Do not use this example unless you need to change the login procedure, instead see `client.js`. + */ process.env.DEBUG = 'minecraft-protocol raknet' const { Client } = require('bedrock-protocol') const { ChunkColumn, Version } = require('bedrock-provider') diff --git a/examples/createClientExample.js b/examples/client/createClient.js similarity index 100% rename from examples/createClientExample.js rename to examples/client/createClient.js diff --git a/examples/serverReadmeExample.js b/examples/server/basicServer.js similarity index 100% rename from examples/serverReadmeExample.js rename to examples/server/basicServer.js diff --git a/examples/serverTest.js b/examples/server/server.js similarity index 91% rename from examples/serverTest.js rename to examples/server/server.js index e299b62..8e4e74d 100644 --- a/examples/serverTest.js +++ b/examples/server/server.js @@ -1,27 +1,31 @@ /** + * This example spawns a client. For a basic server that disconnects users, see "basicServer.js". + * * bedrock-protocol server example; to run this example you need to clone this repo from git. * first need to dump some packets from the vanilla server as there is alot of boilerplate - * to send to clients. + * to send to clients. The `serverChunks.js` contains the chunk loading code. * * In your server implementation, you need to implement each of the following packets to * get a client to spawn like vanilla. You can look at the dumped packets in `data/1.16.10/sample` * * First, dump packets for version 1.16.210 by running `npm run dumpPackets`. + * Then you can run `node server.js ` to start this script. */ process.env.DEBUG = 'minecraft-protocol' // packet logging // const fs = require('fs') -const { Server } = require('../src/server') -const { hasDumps } = require('../tools/genPacketDumps') -const DataProvider = require('../data/provider') -const { waitFor } = require('../src/datatypes/util') +const { Server } = require('bedrock-protocol') + +const { hasDumps } = require('../../tools/genPacketDumps') +const DataProvider = require('../../data/provider') +const { waitFor } = require('../../src/datatypes/util') const { loadWorld } = require('./serverChunks') -async function startServer (version = '1.16.220', ok) { +async function startServer (version = '1.17.10', ok) { if (!hasDumps(version)) { throw Error('You need to dump some packets first. Run tools/genPacketDumps.js') } - const Item = require('../types/Item')(version) + const Item = require('../../types/Item')(version) const port = 19132 const server = new Server({ host: '0.0.0.0', port, version }) let loop diff --git a/examples/serverChunks.js b/examples/server/serverChunks.js similarity index 83% rename from examples/serverChunks.js rename to examples/server/serverChunks.js index 0b711c4..d6fac9c 100644 --- a/examples/serverChunks.js +++ b/examples/server/serverChunks.js @@ -4,7 +4,7 @@ const { LevelDB } = require('leveldb-zlib') const { join } = require('path') async function loadWorld (version) { - const path = join(__dirname, `../tools/bds-${version}/worlds/Bedrock level/db`) + const path = join(__dirname, `../../tools/bds-${version}/worlds/Bedrock level/db`) console.log('Loading world at path', path) // Load world from testing server const db = new LevelDB(path, { createIfMissing: false }) await db.open() @@ -19,11 +19,8 @@ async function loadWorld (version) { for (let cx = cxStart; cx < cxEnd; cx++) { for (let cz = czStart; cz < czEnd; cz++) { - // console.log('reading chunk at ', cx, cz) - const cc = await wp.load(cx, cz, true) if (!cc) { - // console.log('no chunk') continue } const cbuf = await cc.networkEncodeNoCache() @@ -35,7 +32,6 @@ async function loadWorld (version) { blobs: [], payload: cbuf }) - // console.log('Ht',cc.sectionsLen,cc.sections) } } diff --git a/package.json b/package.json index e521bae..44bdda2 100644 --- a/package.json +++ b/package.json @@ -21,18 +21,13 @@ ], "license": "MIT", "dependencies": { - "@azure/msal-node": "^1.1.0", - "@xboxreplay/xboxlive-auth": "^3.3.3", "debug": "^4.3.1", - "jose-node-cjs-runtime": "^3.12.1", "jsonwebtoken": "^8.5.1", "jsp-raknet": "^2.1.3", "minecraft-folder-path": "^1.2.0", - "node-fetch": "^2.6.1", "prismarine-auth": "^1.1.0", "prismarine-nbt": "^1.5.0", "protodef": "^1.14.0", - "smart-buffer": "^4.1.0", "uuid-1345": "^1.0.2" }, "optionalDependencies": { diff --git a/src/client/auth.js b/src/client/auth.js index bee00f3..98c334d 100644 --- a/src/client/auth.js +++ b/src/client/auth.js @@ -69,21 +69,3 @@ module.exports = { createOfflineSession, authenticate } - -// async function msaTest () { -// // MsAuthFlow.resetTokenCaches() - -// await authenticateDeviceCode({ -// connect(...args) { -// console.log('Connecting', args) -// }, -// emit(...e) { -// console.log('Event', e) -// } -// }, {}) -// } - -// // debug with node microsoftAuth.js -// if (!module.parent) { -// msaTest() -// } diff --git a/src/handshake/loginVerify.js b/src/handshake/loginVerify.js index 722dd17..62adc6d 100644 --- a/src/handshake/loginVerify.js +++ b/src/handshake/loginVerify.js @@ -24,7 +24,6 @@ module.exports = (client, server, options) => { for (const token of chain) { const decoded = JWT.verify(token, pubKey, { algorithms: ['ES384'] }) - // console.log('Decoded', decoded) // Check if signed by Mojang key const x5u = getX5U(token) @@ -37,7 +36,6 @@ module.exports = (client, server, options) => { finalKey = decoded.identityPublicKey || finalKey // non pem data = { ...data, ...decoded } } - // console.log('Result', data) if (!didVerify && !options.offline) { client.disconnect('disconnectionScreen.notAuthenticated') diff --git a/tools/startVanillaServer.js b/tools/startVanillaServer.js index 8e34794..157f458 100644 --- a/tools/startVanillaServer.js +++ b/tools/startVanillaServer.js @@ -112,7 +112,7 @@ async function startServerAndWait (version, withTimeout, options) { if (!module.parent) { // if (process.argv.length < 3) throw Error('Missing version argument') - startServer(process.argv[2] || '1.16.201', null, process.argv[3] ? { 'server-port': process.argv[3], 'online-mode': !!process.argv[4] } : undefined) + startServer(process.argv[2] || '1.17.10', null, process.argv[3] ? { 'server-port': process.argv[3], 'online-mode': !!process.argv[4] } : undefined) } module.exports = { fetchLatestStable, startServer, startServerAndWait } From f8ea6c01f43e5daaa71da490cf1c4824ed4b804a Mon Sep 17 00:00:00 2001 From: extremeheat Date: Sat, 25 Sep 2021 16:57:29 -0400 Subject: [PATCH 039/273] Use minecraft-data for protocol data (#126) * use minecraft-data protocol data * use minecraft-data for extra data * Update .npmignore * update skin data * fix example * remove .gitattr * fix mcdata skin import, disable install script --- .gitattributes | 1 - .gitignore | 5 +- .npmignore | 4 +- data/1.16.201/protocol.json | 7171 ----------------------- data/1.16.201/steve.json | 120 - data/1.16.201/steveGeometry.json | 5147 ----------------- data/1.16.201/steveSkin.bin | Bin 262144 -> 0 bytes data/1.16.210/protocol.json | 7798 ------------------------- data/1.16.220/protocol.json | 8795 ----------------------------- data/1.17.0/protocol.json | 8907 ----------------------------- data/1.17.10/protocol.json | 9081 ------------------------------ data/latest/proto.yml | 3171 ----------- data/latest/types.yaml | 1703 ------ data/provider.js | 44 - examples/server/server.js | 4 +- package.json | 2 +- src/createClient.js | 2 +- src/handshake/login.js | 9 +- src/options.js | 12 +- src/transforms/serializer.js | 20 +- test/internal.js | 4 +- tools/compileProtocol.js | 71 +- 22 files changed, 39 insertions(+), 52032 deletions(-) delete mode 100644 .gitattributes delete mode 100644 data/1.16.201/protocol.json delete mode 100644 data/1.16.201/steve.json delete mode 100644 data/1.16.201/steveGeometry.json delete mode 100644 data/1.16.201/steveSkin.bin delete mode 100644 data/1.16.210/protocol.json delete mode 100644 data/1.16.220/protocol.json delete mode 100644 data/1.17.0/protocol.json delete mode 100644 data/1.17.10/protocol.json delete mode 100644 data/latest/proto.yml delete mode 100644 data/latest/types.yaml delete mode 100644 data/provider.js diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index cd19a23..0000000 --- a/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -data/*/*.json linguist-generated \ No newline at end of file diff --git a/.gitignore b/.gitignore index e698980..72abbbc 100644 --- a/.gitignore +++ b/.gitignore @@ -4,10 +4,7 @@ package-lock.json __* src/**/*.json # Runtime generated data -data/**/sample -data/**/read.js -data/**/write.js -data/**/size.js +data/ tools/bds* tools/*/* *.txt \ No newline at end of file diff --git a/.npmignore b/.npmignore index c80c616..1dab2b5 100644 --- a/.npmignore +++ b/.npmignore @@ -3,9 +3,9 @@ npm-debug.log __* src/**/*.json # Runtime generated data -data/**/sample +data/ tools/bds* # Extra data examples test -.github \ No newline at end of file +.github diff --git a/data/1.16.201/protocol.json b/data/1.16.201/protocol.json deleted file mode 100644 index d82e626..0000000 --- a/data/1.16.201/protocol.json +++ /dev/null @@ -1,7171 +0,0 @@ -{ - "types": { - "varint32": "varint", - "varint64": "native", - "zigzag32": "native", - "zigzag64": "native", - "uuid": "native", - "byterot": "native", - "bitflags": "native", - "restBuffer": "native", - "encapsulated": "native", - "nbt": "native", - "lnbt": "native", - "nbtLoop": "native", - "enum_size_based_on_values_len": "native", - "MapInfo": "native", - "BehaviourPackInfos": [ - "array", - { - "countType": "li16", - "type": [ - "container", - [ - { - "name": "uuid", - "type": "string" - }, - { - "name": "version", - "type": "string" - }, - { - "name": "size", - "type": "lu64" - }, - { - "name": "content_key", - "type": "string" - }, - { - "name": "sub_pack_name", - "type": "string" - }, - { - "name": "content_identity", - "type": "string" - }, - { - "name": "has_scripts", - "type": "bool" - } - ] - ] - } - ], - "TexturePackInfos": [ - "array", - { - "countType": "li16", - "type": [ - "container", - [ - { - "name": "uuid", - "type": "string" - }, - { - "name": "version", - "type": "string" - }, - { - "name": "size", - "type": "lu64" - }, - { - "name": "content_key", - "type": "string" - }, - { - "name": "sub_pack_name", - "type": "string" - }, - { - "name": "content_identity", - "type": "string" - }, - { - "name": "has_scripts", - "type": "bool" - }, - { - "name": "rtx_enabled", - "type": "bool" - } - ] - ] - } - ], - "ResourcePackIdVersions": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "uuid", - "type": "string" - }, - { - "name": "version", - "type": "string" - }, - { - "name": "name", - "type": "string" - } - ] - ] - } - ], - "ResourcePackIds": [ - "array", - { - "countType": "li16", - "type": "string" - } - ], - "Experiment": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "enabled", - "type": "bool" - } - ] - ], - "Experiments": [ - "array", - { - "countType": "li32", - "type": "Experiment" - } - ], - "GameMode": [ - "mapper", - { - "type": "zigzag32", - "mappings": { - "0": "survival", - "1": "creative", - "2": "adventure", - "3": "survival_spectator", - "4": "creative_spectator", - "5": "fallback" - } - } - ], - "GameRule": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "type", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "1": "bool", - "2": "int", - "3": "float" - } - } - ] - }, - { - "name": "value", - "type": [ - "switch", - { - "compareTo": "type", - "fields": { - "bool": "bool", - "int": "zigzag32", - "float": "lf32" - }, - "default": "void" - } - ] - } - ] - ], - "GameRules": [ - "array", - { - "countType": "varint", - "type": "GameRule" - } - ], - "Blob": [ - "container", - [ - { - "name": "hash", - "type": "lu64" - }, - { - "name": "payload", - "type": "ByteArray" - } - ] - ], - "BlockPalette": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "state", - "type": "nbt" - } - ] - ] - } - ], - "Itemstates": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "runtime_id", - "type": "li16" - }, - { - "name": "component_based", - "type": "bool" - } - ] - ] - } - ], - "Item": [ - "container", - [ - { - "name": "network_id", - "type": "zigzag32" - }, - { - "anon": true, - "type": [ - "switch", - { - "compareTo": "network_id", - "fields": { - "0": "void" - }, - "default": [ - "container", - [ - { - "name": "auxiliary_value", - "type": "zigzag32" - }, - { - "name": "has_nbt", - "type": [ - "mapper", - { - "type": "lu16", - "mappings": { - "0": "false", - "65535": "true" - } - } - ] - }, - { - "name": "nbt", - "type": [ - "switch", - { - "compareTo": "has_nbt", - "fields": { - "true": [ - "container", - [ - { - "name": "version", - "type": "u8" - }, - { - "name": "nbt", - "type": "nbt" - } - ] - ] - }, - "default": "void" - } - ] - }, - { - "name": "can_place_on", - "type": [ - "array", - { - "countType": "zigzag32", - "type": "string" - } - ] - }, - { - "name": "can_destroy", - "type": [ - "array", - { - "countType": "zigzag32", - "type": "string" - } - ] - } - ] - ] - } - ] - }, - { - "anon": true, - "type": [ - "switch", - { - "compareTo": "network_id", - "fields": { - "355": [ - "container", - [ - { - "name": "blocking_tick", - "type": "zigzag64" - } - ] - ] - }, - "default": "void" - } - ] - } - ] - ], - "vec3i": [ - "container", - [ - { - "name": "x", - "type": "zigzag32" - }, - { - "name": "y", - "type": "zigzag32" - }, - { - "name": "z", - "type": "zigzag32" - } - ] - ], - "vec3u": [ - "container", - [ - { - "name": "x", - "type": "varint" - }, - { - "name": "y", - "type": "varint" - }, - { - "name": "z", - "type": "varint" - } - ] - ], - "vec3f": [ - "container", - [ - { - "name": "x", - "type": "lf32" - }, - { - "name": "y", - "type": "lf32" - }, - { - "name": "z", - "type": "lf32" - } - ] - ], - "vec2f": [ - "container", - [ - { - "name": "x", - "type": "lf32" - }, - { - "name": "z", - "type": "lf32" - } - ] - ], - "MetadataDictionary": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "key", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "0": "index", - "1": "health", - "2": "variant", - "3": "color", - "4": "nametag", - "5": "owner_eid", - "6": "target_eid", - "7": "air", - "8": "potion_color", - "9": "potion_ambient", - "10": "jump_duration", - "11": "hurt_time", - "12": "hurt_direction", - "13": "paddle_time_left", - "14": "paddle_time_right", - "15": "experience_value", - "16": "minecart_display_block", - "17": "minecart_display_offset", - "18": "minecart_has_display", - "20": "old_swell", - "21": "swell_dir", - "22": "charge_amount", - "23": "enderman_held_runtime_id", - "24": "entity_age", - "26": "player_flags", - "27": "player_index", - "28": "player_bed_position", - "29": "fireball_power_x", - "30": "fireball_power_y", - "31": "fireball_power_z", - "32": "aux_power", - "33": "fish_x", - "34": "fish_z", - "35": "fish_angle", - "36": "potion_aux_value", - "37": "lead_holder_eid", - "38": "scale", - "39": "interactive_tag", - "40": "npc_skin_id", - "41": "url_tag", - "42": "max_airdata_max_air", - "43": "mark_variant", - "44": "container_type", - "45": "container_base_size", - "46": "container_extra_slots_per_strength", - "47": "block_target", - "48": "wither_invulnerable_ticks", - "49": "wither_target_1", - "50": "wither_target_2", - "51": "wither_target_3", - "52": "aerial_attack", - "53": "boundingbox_width", - "54": "boundingbox_height", - "55": "fuse_length", - "56": "rider_seat_position", - "57": "rider_rotation_locked", - "58": "rider_max_rotation", - "59": "rider_min_rotation", - "60": "area_effect_cloud_radius", - "61": "area_effect_cloud_waiting", - "62": "area_effect_cloud_particle_id", - "63": "shulker_peek_id", - "64": "shulker_attach_face", - "65": "shulker_attached", - "66": "shulker_attach_pos", - "67": "trading_player_eid", - "68": "trading_career", - "69": "has_command_block", - "70": "command_block_command", - "71": "command_block_last_output", - "72": "command_block_track_output", - "73": "controlling_rider_seat_number", - "74": "strength", - "75": "max_strength", - "76": "spell_casting_color", - "77": "limited_life", - "78": "armor_stand_pose_index", - "79": "ender_crystal_time_offset", - "80": "always_show_nametag", - "81": "color_2", - "82": "name_author", - "83": "score_tag", - "84": "balloon_attached_entity", - "85": "pufferfish_size", - "86": "bubble_time", - "87": "agent", - "88": "sitting_amount", - "89": "sitting_amount_previous", - "90": "eating_counter", - "91": "flags_extended", - "92": "laying_amount", - "93": "laying_amount_previous", - "94": "duration", - "95": "spawn_time", - "96": "change_rate", - "97": "change_on_pickup", - "98": "pickup_count", - "99": "interact_text", - "100": "trade_tier", - "101": "max_trade_tier", - "102": "trade_experience", - "103": "skin_id", - "104": "spawning_frames", - "105": "command_block_tick_delay", - "106": "command_block_execute_on_first_tick", - "107": "ambient_sound_interval", - "108": "ambient_sound_interval_range", - "109": "ambient_sound_event_name", - "110": "fall_damage_multiplier", - "111": "name_raw_text", - "112": "can_ride_target", - "113": "low_tier_cured_discount", - "114": "high_tier_cured_discount", - "115": "nearby_cured_discount", - "116": "nearby_cured_discount_timestamp", - "117": "hitbox", - "118": "is_buoyant", - "119": "buoyancy_data" - } - } - ] - }, - { - "name": "type", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "0": "byte", - "1": "short", - "2": "int", - "3": "float", - "4": "string", - "5": "compound", - "6": "vec3i", - "7": "long", - "8": "vec3f" - } - } - ] - }, - { - "name": "value", - "type": [ - "switch", - { - "compareTo": "type", - "fields": { - "byte": "i8", - "short": "li16", - "int": "zigzag32", - "float": "lf32", - "string": "string", - "compound": "nbt", - "vec3i": "vec3i", - "long": "zigzag64", - "vec3f": "vec3f" - }, - "default": "void" - } - ] - } - ] - ] - } - ], - "Link": [ - "container", - [ - { - "name": "ridden_entity_id", - "type": "zigzag64" - }, - { - "name": "rider_entity_id", - "type": "zigzag64" - }, - { - "name": "type", - "type": "u8" - }, - { - "name": "immediate", - "type": "bool" - }, - { - "name": "rider_initiated", - "type": "bool" - } - ] - ], - "Links": [ - "array", - { - "countType": "varint", - "type": "Link" - } - ], - "EntityAttributes": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "min", - "type": "lf32" - }, - { - "name": "value", - "type": "lf32" - }, - { - "name": "max", - "type": "lf32" - } - ] - ] - } - ], - "Rotation": [ - "container", - [ - { - "name": "yaw", - "type": "byterot" - }, - { - "name": "pitch", - "type": "byterot" - }, - { - "name": "head_yaw", - "type": "byterot" - } - ] - ], - "BlockCoordinates": [ - "container", - [ - { - "name": "x", - "type": "zigzag32" - }, - { - "name": "y", - "type": "varint" - }, - { - "name": "z", - "type": "zigzag32" - } - ] - ], - "PlayerAttributes": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "min", - "type": "lf32" - }, - { - "name": "max", - "type": "lf32" - }, - { - "name": "current", - "type": "lf32" - }, - { - "name": "default", - "type": "lf32" - }, - { - "name": "name", - "type": "string" - } - ] - ] - } - ], - "Transaction": [ - "container", - [ - { - "name": "legacy_request_id", - "type": "zigzag32" - }, - { - "name": "legacy_transactions", - "type": [ - "switch", - { - "compareTo": "legacy_request_id", - "fields": { - "0": "void" - }, - "default": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "container_id", - "type": "u8" - }, - { - "name": "changed_slots", - "type": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "slot_id", - "type": "u8" - } - ] - ] - } - ] - } - ] - ] - } - ] - } - ] - }, - { - "name": "transaction_type", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "0": "normal", - "1": "inventory_mismatch", - "2": "item_use", - "3": "item_use_on_entity", - "4": "item_release" - } - } - ] - }, - { - "name": "network_ids", - "type": "bool" - }, - { - "name": "inventory_actions", - "type": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "source_type", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "0": "container", - "1": "global", - "2": "world_interaction", - "3": "creative", - "100": "craft_slot", - "99999": "craft" - } - } - ] - }, - { - "anon": true, - "type": [ - "switch", - { - "compareTo": "source_type", - "fields": { - "container": [ - "container", - [ - { - "name": "inventory_id", - "type": "varint" - } - ] - ], - "creative": [ - "container", - [ - { - "name": "inventory_id", - "type": "varint" - } - ] - ], - "world_interaction": [ - "container", - [ - { - "name": "flags", - "type": "varint" - } - ] - ], - "craft": [ - "container", - [ - { - "name": "action", - "type": "varint" - } - ] - ], - "craft_slot": [ - "container", - [ - { - "name": "action", - "type": "varint" - } - ] - ] - }, - "default": "void" - } - ] - }, - { - "name": "slot", - "type": "varint" - }, - { - "name": "old_item", - "type": "Item" - }, - { - "name": "new_item", - "type": "Item" - }, - { - "name": "new_item_stack_id", - "type": [ - "switch", - { - "compareTo": "../network_ids", - "fields": { - "true": "zigzag32" - }, - "default": "void" - } - ] - } - ] - ] - } - ] - }, - { - "name": "transaction_data", - "type": [ - "switch", - { - "compareTo": "transaction_type", - "fields": { - "normal": "void", - "inventory_mismatch": "void", - "item_use": [ - "container", - [ - { - "name": "action_type", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "0": "click_block", - "1": "click_air", - "2": "break_block" - } - } - ] - }, - { - "name": "block_position", - "type": "BlockCoordinates" - }, - { - "name": "face", - "type": "varint" - }, - { - "name": "hotbar_slot", - "type": "varint" - }, - { - "name": "held_item", - "type": "Item" - }, - { - "name": "player_pos", - "type": "vec3f" - }, - { - "name": "click_pos", - "type": "vec3f" - }, - { - "name": "block_runtime_id", - "type": "varint" - } - ] - ], - "item_use_on_entity": [ - "container", - [ - { - "name": "entity_runtime_id", - "type": "varint64" - }, - { - "name": "action_type", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "0": "interact", - "1": "attack" - } - } - ] - }, - { - "name": "hotbar_slot", - "type": "zigzag32" - }, - { - "name": "held_item", - "type": "Item" - }, - { - "name": "player_pos", - "type": "vec3f" - }, - { - "name": "click_pos", - "type": "vec3f" - } - ] - ], - "item_release": [ - "container", - [ - { - "name": "action_type", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "0": "release", - "1": "consume" - } - } - ] - }, - { - "name": "hotbar_slot", - "type": "zigzag32" - }, - { - "name": "held_item", - "type": "Item" - }, - { - "name": "head_pos", - "type": "vec3f" - } - ] - ] - }, - "default": "void" - } - ] - } - ] - ], - "ItemStack": [ - "container", - [ - { - "name": "runtime_id", - "type": "zigzag32" - }, - { - "name": "item", - "type": "Item" - } - ] - ], - "ItemStacks": [ - "array", - { - "countType": "varint", - "type": "ItemStack" - } - ], - "RecipeIngredient": [ - "container", - [ - { - "name": "network_id", - "type": "zigzag32" - }, - { - "anon": true, - "type": [ - "switch", - { - "compareTo": "network_id", - "fields": { - "0": "void" - }, - "default": [ - "container", - [ - { - "name": "network_data", - "type": "zigzag32" - }, - { - "name": "count", - "type": "zigzag32" - } - ] - ] - } - ] - } - ] - ], - "PotionTypeRecipes": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "input_item_id", - "type": "zigzag32" - }, - { - "name": "input_item_meta", - "type": "zigzag32" - }, - { - "name": "ingredient_id", - "type": "zigzag32" - }, - { - "name": "ingredient_meta", - "type": "zigzag32" - }, - { - "name": "output_item_id", - "type": "zigzag32" - }, - { - "name": "output_item_meta", - "type": "zigzag32" - } - ] - ] - } - ], - "PotionContainerChangeRecipes": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "input_item_id", - "type": "zigzag32" - }, - { - "name": "ingredient_id", - "type": "zigzag32" - }, - { - "name": "output_item_id", - "type": "zigzag32" - } - ] - ] - } - ], - "Recipes": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "type", - "type": [ - "mapper", - { - "type": "zigzag32", - "mappings": { - "0": "shapeless", - "1": "shaped", - "2": "furnace", - "3": "furnace_with_metadata", - "4": "multi", - "5": "shulker_box", - "6": "shapeless_chemistry", - "7": "shaped_chemistry" - } - } - ] - }, - { - "name": "recipe", - "type": [ - "switch", - { - "compareTo": "type", - "fields": { - "shapeless": [ - "container", - [ - { - "name": "recipe_id", - "type": "string" - }, - { - "name": "input", - "type": [ - "array", - { - "countType": "varint", - "type": "RecipeIngredient" - } - ] - }, - { - "name": "output", - "type": [ - "array", - { - "countType": "varint", - "type": "Item" - } - ] - }, - { - "name": "uuid", - "type": "uuid" - }, - { - "name": "block", - "type": "string" - }, - { - "name": "priority", - "type": "zigzag32" - }, - { - "name": "network_id", - "type": "zigzag32" - } - ] - ], - "shulker_box": [ - "container", - [ - { - "name": "recipe_id", - "type": "string" - }, - { - "name": "input", - "type": [ - "array", - { - "countType": "varint", - "type": "RecipeIngredient" - } - ] - }, - { - "name": "output", - "type": [ - "array", - { - "countType": "varint", - "type": "Item" - } - ] - }, - { - "name": "uuid", - "type": "uuid" - }, - { - "name": "block", - "type": "string" - }, - { - "name": "priority", - "type": "zigzag32" - }, - { - "name": "network_id", - "type": "zigzag32" - } - ] - ], - "shapeless_chemistry": [ - "container", - [ - { - "name": "recipe_id", - "type": "string" - }, - { - "name": "input", - "type": [ - "array", - { - "countType": "varint", - "type": "RecipeIngredient" - } - ] - }, - { - "name": "output", - "type": [ - "array", - { - "countType": "varint", - "type": "Item" - } - ] - }, - { - "name": "uuid", - "type": "uuid" - }, - { - "name": "block", - "type": "string" - }, - { - "name": "priority", - "type": "zigzag32" - }, - { - "name": "network_id", - "type": "zigzag32" - } - ] - ], - "shaped": [ - "container", - [ - { - "name": "recipe_id", - "type": "string" - }, - { - "name": "width", - "type": "zigzag32" - }, - { - "name": "height", - "type": "zigzag32" - }, - { - "name": "input", - "type": [ - "array", - { - "count": "width", - "type": [ - "array", - { - "count": "height", - "type": "RecipeIngredient" - } - ] - } - ] - }, - { - "name": "output", - "type": [ - "array", - { - "countType": "varint", - "type": "Item" - } - ] - }, - { - "name": "uuid", - "type": "uuid" - }, - { - "name": "block", - "type": "string" - }, - { - "name": "priority", - "type": "zigzag32" - }, - { - "name": "network_id", - "type": "zigzag32" - } - ] - ], - "shaped_chemistry": [ - "container", - [ - { - "name": "recipe_id", - "type": "string" - }, - { - "name": "width", - "type": "zigzag32" - }, - { - "name": "height", - "type": "zigzag32" - }, - { - "name": "input", - "type": [ - "array", - { - "count": "width", - "type": [ - "array", - { - "count": "height", - "type": "RecipeIngredient" - } - ] - } - ] - }, - { - "name": "output", - "type": [ - "array", - { - "countType": "varint", - "type": "Item" - } - ] - }, - { - "name": "uuid", - "type": "uuid" - }, - { - "name": "block", - "type": "string" - }, - { - "name": "priority", - "type": "zigzag32" - }, - { - "name": "network_id", - "type": "zigzag32" - } - ] - ], - "furnace": [ - "container", - [ - { - "name": "input_id", - "type": "zigzag32" - }, - { - "name": "output", - "type": "Item" - }, - { - "name": "block", - "type": "string" - } - ] - ], - "furnace_with_metadata": [ - "container", - [ - { - "name": "input_id", - "type": "zigzag32" - }, - { - "name": "input_meta", - "type": "zigzag32" - }, - { - "name": "output", - "type": "Item" - }, - { - "name": "block", - "type": "string" - } - ] - ], - "multi": [ - "container", - [ - { - "name": "uuid", - "type": "uuid" - }, - { - "name": "network_id", - "type": "zigzag32" - } - ] - ] - }, - "default": "void" - } - ] - } - ] - ] - } - ], - "SkinImage": [ - "container", - [ - { - "name": "width", - "type": "li32" - }, - { - "name": "height", - "type": "li32" - }, - { - "name": "data", - "type": "string" - } - ] - ], - "Skin": [ - "container", - [ - { - "name": "skin_id", - "type": "string" - }, - { - "name": "skin_resource_pack", - "type": "string" - }, - { - "name": "skin_data", - "type": "SkinImage" - }, - { - "name": "animations", - "type": [ - "array", - { - "countType": "li32", - "type": [ - "container", - [ - { - "name": "skin_image", - "type": "SkinImage" - }, - { - "name": "animation_type", - "type": "li32" - }, - { - "name": "animation_frames", - "type": "lf32" - }, - { - "name": "expression_type", - "type": "lf32" - } - ] - ] - } - ] - }, - { - "name": "cape_data", - "type": "SkinImage" - }, - { - "name": "geometry_data", - "type": "string" - }, - { - "name": "animation_data", - "type": "string" - }, - { - "name": "premium", - "type": "string" - }, - { - "name": "persona", - "type": "bool" - }, - { - "name": "cape_on_classic", - "type": "bool" - }, - { - "name": "cape_id", - "type": "string" - }, - { - "name": "full_skin_id", - "type": "string" - }, - { - "name": "arm_size", - "type": "string" - }, - { - "name": "skin_color", - "type": "string" - }, - { - "name": "personal_pieces", - "type": [ - "array", - { - "countType": "li32", - "type": [ - "container", - [ - { - "name": "piece_id", - "type": "string" - }, - { - "name": "piece_type", - "type": "string" - }, - { - "name": "pack_id", - "type": "string" - }, - { - "name": "is_default_piece", - "type": "bool" - }, - { - "name": "product_id", - "type": "string" - } - ] - ] - } - ] - }, - { - "name": "piece_tint_colors", - "type": [ - "array", - { - "countType": "li32", - "type": [ - "container", - [ - { - "name": "piece_type", - "type": "string" - }, - { - "name": "colors", - "type": [ - "array", - { - "countType": "li32", - "type": "string" - } - ] - } - ] - ] - } - ] - } - ] - ], - "PlayerRecords": [ - "container", - [ - { - "name": "type", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "0": "add", - "1": "remove" - } - } - ] - }, - { - "name": "records_count", - "type": "varint" - }, - { - "name": "records", - "type": [ - "array", - { - "count": "records_count", - "type": [ - "switch", - { - "compareTo": "type", - "fields": { - "add": [ - "container", - [ - { - "name": "uuid", - "type": "uuid" - }, - { - "name": "entity_unique_id", - "type": "zigzag64" - }, - { - "name": "username", - "type": "string" - }, - { - "name": "xbox_user_id", - "type": "string" - }, - { - "name": "platform_chat_id", - "type": "string" - }, - { - "name": "build_platform", - "type": "li32" - }, - { - "name": "skin_data", - "type": "Skin" - }, - { - "name": "is_teacher", - "type": "bool" - }, - { - "name": "is_host", - "type": "bool" - } - ] - ], - "remove": [ - "container", - [ - { - "name": "uuid", - "type": "uuid" - } - ] - ] - }, - "default": "void" - } - ] - } - ] - }, - { - "name": "verified", - "type": [ - "array", - { - "count": "records_count", - "type": "bool" - } - ] - } - ] - ], - "ScoreEntries": [ - "container", - [ - { - "name": "type", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "0": "change", - "1": "remove" - } - } - ] - }, - { - "name": "entries", - "type": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "scoreboard_id", - "type": "zigzag64" - }, - { - "name": "objective_name", - "type": "string" - }, - { - "name": "score", - "type": "li32" - }, - { - "anon": true, - "type": [ - "switch", - { - "compareTo": "type", - "fields": { - "remove": [ - "container", - [ - { - "name": "entry_type", - "type": [ - "mapper", - { - "type": "i8", - "mappings": { - "1": "player", - "2": "entity", - "3": "fake_player" - } - } - ] - }, - { - "name": "entity_unique_id", - "type": [ - "switch", - { - "compareTo": "entry_type", - "fields": { - "player": "zigzag64", - "entity": "zigzag64" - }, - "default": "void" - } - ] - }, - { - "name": "custom_name", - "type": [ - "switch", - { - "compareTo": "entry_type", - "fields": { - "fake_player": "string" - }, - "default": "void" - } - ] - } - ] - ] - }, - "default": "void" - } - ] - } - ] - ] - } - ] - } - ] - ], - "ScoreboardIdentityEntries": [ - "container", - [ - { - "name": "type", - "type": [ - "mapper", - { - "type": "i8", - "mappings": { - "0": "TYPE_REGISTER_IDENTITY", - "1": "TYPE_CLEAR_IDENTITY" - } - } - ] - }, - { - "name": "entries", - "type": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "scoreboard_id", - "type": "zigzag64" - }, - { - "name": "entity_unique_id", - "type": [ - "switch", - { - "compareTo": "type", - "fields": { - "TYPE_REGISTER_IDENTITY": "zigzag64" - }, - "default": "void" - } - ] - } - ] - ] - } - ] - } - ] - ], - "Enchant": [ - "container", - [ - { - "name": "id", - "type": "u8" - }, - { - "name": "level", - "type": "u8" - } - ] - ], - "EnchantOptions": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "cost", - "type": "varint" - }, - { - "name": "slot_flags", - "type": "li32" - }, - { - "name": "equip_enchants", - "type": [ - "array", - { - "countType": "varint", - "type": "Enchant" - } - ] - }, - { - "name": "held_enchants", - "type": [ - "array", - { - "countType": "varint", - "type": "Enchant" - } - ] - }, - { - "name": "self_enchants", - "type": [ - "array", - { - "countType": "varint", - "type": "Enchant" - } - ] - }, - { - "name": "name", - "type": "string" - }, - { - "name": "option_id", - "type": "zigzag32" - } - ] - ] - } - ], - "StackRequestSlotInfo": [ - "container", - [ - { - "name": "container_id", - "type": "u8" - }, - { - "name": "slot_id", - "type": "u8" - }, - { - "name": "stack_id", - "type": "zigzag32" - } - ] - ], - "ItemStackRequests": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "request_id", - "type": "zigzag32" - }, - { - "name": "actions", - "type": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "type_id", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "0": "take", - "1": "place", - "2": "swap", - "3": "drop", - "4": "destroy", - "5": "consume", - "6": "create", - "7": "lab_table_combine", - "8": "beacon_payment", - "9": "craft_recipe", - "10": "craft_recipe_auto", - "11": "craft_creative", - "12": "optional", - "13": "non_implemented", - "14": "results_deprecated" - } - } - ] - }, - { - "anon": true, - "type": [ - "switch", - { - "compareTo": "type_id", - "fields": { - "take": [ - "container", - [ - { - "name": "count", - "type": "u8" - }, - { - "name": "source", - "type": "StackRequestSlotInfo" - }, - { - "name": "destination", - "type": "StackRequestSlotInfo" - } - ] - ], - "place": [ - "container", - [ - { - "name": "count", - "type": "u8" - }, - { - "name": "source", - "type": "StackRequestSlotInfo" - }, - { - "name": "destination", - "type": "StackRequestSlotInfo" - } - ] - ], - "swap": [ - "container", - [ - { - "name": "source", - "type": "StackRequestSlotInfo" - }, - { - "name": "destination", - "type": "StackRequestSlotInfo" - } - ] - ], - "drop": [ - "container", - [ - { - "name": "count", - "type": "u8" - }, - { - "name": "source", - "type": "StackRequestSlotInfo" - }, - { - "name": "randomly", - "type": "bool" - } - ] - ], - "destroy": [ - "container", - [ - { - "name": "count", - "type": "u8" - }, - { - "name": "source", - "type": "StackRequestSlotInfo" - } - ] - ], - "consume": [ - "container", - [ - { - "name": "count", - "type": "u8" - }, - { - "name": "source", - "type": "StackRequestSlotInfo" - } - ] - ], - "create": [ - "container", - [ - { - "name": "result_slot_id", - "type": "u8" - } - ] - ], - "beacon_payment": [ - "container", - [ - { - "name": "primary_effect", - "type": "zigzag32" - }, - { - "name": "secondary_effect", - "type": "zigzag32" - } - ] - ], - "craft_recipe": [ - "container", - [ - { - "name": "recipe_network_id", - "type": "varint" - } - ] - ], - "craft_recipe_auto": [ - "container", - [ - { - "name": "recipe_network_id", - "type": "varint" - } - ] - ], - "craft_creative": [ - "container", - [ - { - "name": "creative_item_network_id", - "type": "varint32" - } - ] - ], - "optional": [ - "container", - [ - { - "name": "recipe_network_id", - "type": "varint" - }, - { - "name": "filtered_string_index", - "type": "li32" - } - ] - ], - "non_implemented": "void", - "results_deprecated": [ - "container", - [ - { - "name": "result_items", - "type": [ - "array", - { - "countType": "varint", - "type": "Item" - } - ] - }, - { - "name": "times_crafted", - "type": "u8" - } - ] - ] - }, - "default": "void" - } - ] - } - ] - ] - } - ] - }, - { - "name": "custom_names", - "type": [ - "array", - { - "countType": "varint", - "type": "string" - } - ] - } - ] - ] - } - ], - "ItemStackResponses": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "result", - "type": "u8" - }, - { - "name": "request_id", - "type": "varint32" - }, - { - "name": "containers", - "type": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "container_id", - "type": "u8" - }, - { - "name": "slots", - "type": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "slot", - "type": "u8" - }, - { - "name": "hotbar_slot", - "type": "u8" - }, - { - "name": "count", - "type": "u8" - }, - { - "name": "item_stack_id", - "type": "varint32" - }, - { - "name": "custom_name", - "type": "string" - } - ] - ] - } - ] - } - ] - ] - } - ] - } - ] - ] - } - ], - "ItemComponentList": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "nbt", - "type": "nbt" - } - ] - ] - } - ], - "CommandOrigin": [ - "container", - [ - { - "name": "type", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "0": "player", - "1": "block", - "2": "minecart_block", - "3": "dev_console", - "4": "test", - "5": "automation_player", - "6": "client_automation", - "7": "dedicated_server", - "8": "entity", - "9": "virtual", - "10": "game_argument", - "11": "entity_server" - } - } - ] - }, - { - "name": "uuid", - "type": "uuid" - }, - { - "name": "request_id", - "type": "string" - }, - { - "name": "player_entity_id", - "type": [ - "switch", - { - "compareTo": "type", - "fields": { - "dev_console": [ - "container", - [ - { - "name": "player_entity_id", - "type": "zigzag64" - } - ] - ], - "test": [ - "container", - [ - { - "name": "player_entity_id", - "type": "zigzag64" - } - ] - ] - }, - "default": "void" - } - ] - } - ] - ], - "WindowID": [ - "mapper", - { - "type": "i8", - "mappings": { - "0": "inventory", - "1": "first", - "100": "last", - "119": "offhand", - "120": "armor", - "121": "creative", - "122": "hotbar", - "123": "fixed_inventory", - "124": "ui", - "-100": "drop_contents", - "-24": "beacon", - "-23": "trading_output", - "-22": "trading_use_inputs", - "-21": "trading_input_2", - "-20": "trading_input_1", - "-17": "enchant_output", - "-16": "enchant_material", - "-15": "enchant_input", - "-13": "anvil_output", - "-12": "anvil_result", - "-11": "anvil_material", - "-10": "container_input", - "-5": "crafting_use_ingredient", - "-4": "crafting_result", - "-3": "crafting_remove_ingredient", - "-2": "crafting_add_ingredient", - "-1": "none" - } - } - ], - "WindowType": [ - "mapper", - { - "type": "u8", - "mappings": { - "0": "container", - "1": "workbench", - "2": "furnace", - "3": "enchantment", - "4": "brewing_stand", - "5": "anvil", - "6": "dispenser", - "7": "dropper", - "8": "hopper", - "9": "cauldron", - "10": "minecart_chest", - "11": "minecart_hopper", - "12": "horse", - "13": "beacon", - "14": "structure_editor", - "15": "trading", - "16": "command_block", - "17": "jukebox", - "18": "armor", - "19": "hand", - "20": "compound_creator", - "21": "element_constructor", - "22": "material_reducer", - "23": "lab_table", - "24": "loom", - "25": "lectern", - "26": "grindstone", - "27": "blast_furnace", - "28": "smoker", - "29": "stonecutter", - "30": "cartography", - "31": "hud", - "32": "jigsaw_editor", - "33": "smithing_table" - } - } - ], - "LegacyEntityType": [ - "mapper", - { - "type": "li32", - "mappings": { - "10": "chicken", - "11": "cow", - "12": "pig", - "13": "sheep", - "14": "wolf", - "15": "villager", - "16": "mooshroom", - "17": "squid", - "18": "rabbit", - "19": "bat", - "20": "iron_golem", - "21": "snow_golem", - "22": "ocelot", - "23": "horse", - "24": "donkey", - "25": "mule", - "26": "skeleton_horse", - "27": "zombie_horse", - "28": "polar_bear", - "29": "llama", - "30": "parrot", - "31": "dolphin", - "32": "zombie", - "33": "creeper", - "34": "skeleton", - "35": "spider", - "36": "zombie_pigman", - "37": "slime", - "38": "enderman", - "39": "silverfish", - "40": "cave_spider", - "41": "ghast", - "42": "magma_cube", - "43": "blaze", - "44": "zombie_villager", - "45": "witch", - "46": "stray", - "47": "husk", - "48": "wither_skeleton", - "49": "guardian", - "50": "elder_guardian", - "51": "npc", - "52": "wither", - "53": "ender_dragon", - "54": "shulker", - "55": "endermite", - "56": "agent", - "57": "vindicator", - "58": "phantom", - "61": "armor_stand", - "62": "tripod_camera", - "63": "player", - "64": "item", - "65": "tnt", - "66": "falling_block", - "67": "moving_block", - "68": "xp_bottle", - "69": "xp_orb", - "70": "eye_of_ender_signal", - "71": "ender_crystal", - "72": "fireworks_rocket", - "73": "thrown_trident", - "74": "turtle", - "75": "cat", - "76": "shulker_bullet", - "77": "fishing_hook", - "78": "chalkboard", - "79": "dragon_fireball", - "80": "arrow", - "81": "snowball", - "82": "egg", - "83": "painting", - "84": "minecart", - "85": "fireball", - "86": "splash_potion", - "87": "ender_pearl", - "88": "leash_knot", - "89": "wither_skull", - "90": "boat", - "91": "wither_skull_dangerous", - "93": "lightning_bolt", - "94": "small_fireball", - "95": "area_effect_cloud", - "96": "hopper_minecart", - "97": "tnt_minecart", - "98": "chest_minecart", - "100": "command_block_minecart", - "101": "lingering_potion", - "102": "llama_spit", - "103": "evocation_fang", - "104": "evocation_illager", - "105": "vex", - "106": "ice_bomb", - "107": "balloon", - "108": "pufferfish", - "109": "salmon", - "110": "drowned", - "111": "tropicalfish", - "112": "cod", - "113": "panda" - } - } - ], - "mcpe_packet": [ - "container", - [ - { - "name": "name", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "1": "login", - "2": "play_status", - "3": "server_to_client_handshake", - "4": "client_to_server_handshake", - "5": "disconnect", - "6": "resource_packs_info", - "7": "resource_pack_stack", - "8": "resource_pack_client_response", - "9": "text", - "10": "set_time", - "11": "start_game", - "12": "add_player", - "13": "add_entity", - "14": "remove_entity", - "15": "add_item_entity", - "17": "take_item_entity", - "18": "move_entity", - "19": "move_player", - "20": "rider_jump", - "21": "update_block", - "22": "add_painting", - "23": "tick_sync", - "24": "level_sound_event_old", - "25": "level_event", - "26": "block_event", - "27": "entity_event", - "28": "mob_effect", - "29": "update_attributes", - "30": "inventory_transaction", - "31": "mob_equipment", - "32": "mob_armor_equipment", - "33": "interact", - "34": "block_pick_request", - "35": "entity_pick_request", - "36": "player_action", - "38": "hurt_armor", - "39": "set_entity_data", - "40": "set_entity_motion", - "41": "set_entity_link", - "42": "set_health", - "43": "set_spawn_position", - "44": "animate", - "45": "respawn", - "46": "container_open", - "47": "container_close", - "48": "player_hotbar", - "49": "inventory_content", - "50": "inventory_slot", - "51": "container_set_data", - "52": "crafting_data", - "53": "crafting_event", - "54": "gui_data_pick_item", - "55": "adventure_settings", - "56": "block_entity_data", - "57": "player_input", - "58": "level_chunk", - "59": "set_commands_enabled", - "60": "set_difficulty", - "61": "change_dimension", - "62": "set_player_game_type", - "63": "player_list", - "64": "simple_event", - "65": "event", - "66": "spawn_experience_orb", - "67": "clientbound_map_item_data", - "68": "map_info_request", - "69": "request_chunk_radius", - "70": "chunk_radius_update", - "71": "item_frame_drop_item", - "72": "game_rules_changed", - "73": "camera", - "74": "boss_event", - "75": "show_credits", - "76": "available_commands", - "77": "command_request", - "78": "command_block_update", - "79": "command_output", - "80": "update_trade", - "81": "update_equipment", - "82": "resource_pack_data_info", - "83": "resource_pack_chunk_data", - "84": "resource_pack_chunk_request", - "85": "transfer", - "86": "play_sound", - "87": "stop_sound", - "88": "set_title", - "89": "add_behavior_tree", - "90": "structure_block_update", - "91": "show_store_offer", - "92": "purchase_receipt", - "93": "player_skin", - "94": "sub_client_login", - "95": "initiate_web_socket_connection", - "96": "set_last_hurt_by", - "97": "book_edit", - "98": "npc_request", - "99": "photo_transfer", - "100": "modal_form_request", - "101": "modal_form_response", - "102": "server_settings_request", - "103": "server_settings_response", - "104": "show_profile", - "105": "set_default_game_type", - "106": "remove_objective", - "107": "set_display_objective", - "108": "set_score", - "109": "lab_table", - "110": "update_block_synced", - "111": "move_entity_delta", - "112": "set_scoreboard_identity", - "113": "set_local_player_as_initialized", - "114": "update_soft_enum", - "115": "network_stack_latency", - "117": "script_custom_event", - "118": "spawn_particle_effect", - "119": "available_entity_identifiers", - "120": "level_sound_event_v2", - "121": "network_chunk_publisher_update", - "122": "biome_definition_list", - "123": "level_sound_event", - "124": "level_event_generic", - "125": "lectern_update", - "126": "video_stream_connect", - "127": "add_ecs_entity", - "128": "remove_ecs_entity", - "129": "client_cache_status", - "130": "on_screen_texture_animation", - "131": "map_create_locked_copy", - "132": "structure_template_data_export_request", - "133": "structure_template_data_export_response", - "134": "update_block_properties", - "135": "client_cache_blob_status", - "136": "client_cache_miss_response", - "137": "education_settings", - "139": "multiplayer_settings", - "140": "settings_command", - "141": "anvil_damage", - "142": "completed_using_item", - "143": "network_settings", - "144": "player_auth_input", - "145": "creative_content", - "146": "player_enchant_options", - "147": "item_stack_request", - "148": "item_stack_response", - "149": "player_armor_damage", - "151": "update_player_game_type", - "153": "position_tracking_db_broadcast", - "154": "position_tracking_db_request", - "156": "packet_violation_warning", - "157": "motion_prediction_hints", - "158": "animate_entity", - "159": "camera_shake", - "160": "player_fog", - "161": "correct_player_move_prediction", - "162": "item_component", - "163": "filter_text_packet" - } - } - ] - }, - { - "name": "params", - "type": [ - "switch", - { - "compareTo": "name", - "fields": { - "login": "packet_login", - "play_status": "packet_play_status", - "server_to_client_handshake": "packet_server_to_client_handshake", - "client_to_server_handshake": "packet_client_to_server_handshake", - "disconnect": "packet_disconnect", - "resource_packs_info": "packet_resource_packs_info", - "resource_pack_stack": "packet_resource_pack_stack", - "resource_pack_client_response": "packet_resource_pack_client_response", - "text": "packet_text", - "set_time": "packet_set_time", - "start_game": "packet_start_game", - "add_player": "packet_add_player", - "add_entity": "packet_add_entity", - "remove_entity": "packet_remove_entity", - "add_item_entity": "packet_add_item_entity", - "take_item_entity": "packet_take_item_entity", - "move_entity": "packet_move_entity", - "move_player": "packet_move_player", - "rider_jump": "packet_rider_jump", - "update_block": "packet_update_block", - "add_painting": "packet_add_painting", - "tick_sync": "packet_tick_sync", - "level_sound_event_old": "packet_level_sound_event_old", - "level_event": "packet_level_event", - "block_event": "packet_block_event", - "entity_event": "packet_entity_event", - "mob_effect": "packet_mob_effect", - "update_attributes": "packet_update_attributes", - "inventory_transaction": "packet_inventory_transaction", - "mob_equipment": "packet_mob_equipment", - "mob_armor_equipment": "packet_mob_armor_equipment", - "interact": "packet_interact", - "block_pick_request": "packet_block_pick_request", - "entity_pick_request": "packet_entity_pick_request", - "player_action": "packet_player_action", - "hurt_armor": "packet_hurt_armor", - "set_entity_data": "packet_set_entity_data", - "set_entity_motion": "packet_set_entity_motion", - "set_entity_link": "packet_set_entity_link", - "set_health": "packet_set_health", - "set_spawn_position": "packet_set_spawn_position", - "animate": "packet_animate", - "respawn": "packet_respawn", - "container_open": "packet_container_open", - "container_close": "packet_container_close", - "player_hotbar": "packet_player_hotbar", - "inventory_content": "packet_inventory_content", - "inventory_slot": "packet_inventory_slot", - "container_set_data": "packet_container_set_data", - "crafting_data": "packet_crafting_data", - "crafting_event": "packet_crafting_event", - "gui_data_pick_item": "packet_gui_data_pick_item", - "adventure_settings": "packet_adventure_settings", - "block_entity_data": "packet_block_entity_data", - "player_input": "packet_player_input", - "level_chunk": "packet_level_chunk", - "set_commands_enabled": "packet_set_commands_enabled", - "set_difficulty": "packet_set_difficulty", - "change_dimension": "packet_change_dimension", - "set_player_game_type": "packet_set_player_game_type", - "player_list": "packet_player_list", - "simple_event": "packet_simple_event", - "event": "packet_event", - "spawn_experience_orb": "packet_spawn_experience_orb", - "clientbound_map_item_data": "packet_clientbound_map_item_data", - "map_info_request": "packet_map_info_request", - "request_chunk_radius": "packet_request_chunk_radius", - "chunk_radius_update": "packet_chunk_radius_update", - "item_frame_drop_item": "packet_item_frame_drop_item", - "game_rules_changed": "packet_game_rules_changed", - "camera": "packet_camera", - "boss_event": "packet_boss_event", - "show_credits": "packet_show_credits", - "available_commands": "packet_available_commands", - "command_request": "packet_command_request", - "command_block_update": "packet_command_block_update", - "command_output": "packet_command_output", - "update_trade": "packet_update_trade", - "update_equipment": "packet_update_equipment", - "resource_pack_data_info": "packet_resource_pack_data_info", - "resource_pack_chunk_data": "packet_resource_pack_chunk_data", - "resource_pack_chunk_request": "packet_resource_pack_chunk_request", - "transfer": "packet_transfer", - "play_sound": "packet_play_sound", - "stop_sound": "packet_stop_sound", - "set_title": "packet_set_title", - "add_behavior_tree": "packet_add_behavior_tree", - "structure_block_update": "packet_structure_block_update", - "show_store_offer": "packet_show_store_offer", - "purchase_receipt": "packet_purchase_receipt", - "player_skin": "packet_player_skin", - "sub_client_login": "packet_sub_client_login", - "initiate_web_socket_connection": "packet_initiate_web_socket_connection", - "set_last_hurt_by": "packet_set_last_hurt_by", - "book_edit": "packet_book_edit", - "npc_request": "packet_npc_request", - "photo_transfer": "packet_photo_transfer", - "modal_form_request": "packet_modal_form_request", - "modal_form_response": "packet_modal_form_response", - "server_settings_request": "packet_server_settings_request", - "server_settings_response": "packet_server_settings_response", - "show_profile": "packet_show_profile", - "set_default_game_type": "packet_set_default_game_type", - "remove_objective": "packet_remove_objective", - "set_display_objective": "packet_set_display_objective", - "set_score": "packet_set_score", - "lab_table": "packet_lab_table", - "update_block_synced": "packet_update_block_synced", - "move_entity_delta": "packet_move_entity_delta", - "set_scoreboard_identity": "packet_set_scoreboard_identity", - "set_local_player_as_initialized": "packet_set_local_player_as_initialized", - "update_soft_enum": "packet_update_soft_enum", - "network_stack_latency": "packet_network_stack_latency", - "script_custom_event": "packet_script_custom_event", - "spawn_particle_effect": "packet_spawn_particle_effect", - "available_entity_identifiers": "packet_available_entity_identifiers", - "level_sound_event_v2": "packet_level_sound_event_v2", - "network_chunk_publisher_update": "packet_network_chunk_publisher_update", - "biome_definition_list": "packet_biome_definition_list", - "level_sound_event": "packet_level_sound_event", - "level_event_generic": "packet_level_event_generic", - "lectern_update": "packet_lectern_update", - "video_stream_connect": "packet_video_stream_connect", - "add_ecs_entity": "packet_add_ecs_entity", - "remove_ecs_entity": "packet_remove_ecs_entity", - "client_cache_status": "packet_client_cache_status", - "on_screen_texture_animation": "packet_on_screen_texture_animation", - "map_create_locked_copy": "packet_map_create_locked_copy", - "structure_template_data_export_request": "packet_structure_template_data_export_request", - "structure_template_data_export_response": "packet_structure_template_data_export_response", - "update_block_properties": "packet_update_block_properties", - "client_cache_blob_status": "packet_client_cache_blob_status", - "client_cache_miss_response": "packet_client_cache_miss_response", - "education_settings": "packet_education_settings", - "multiplayer_settings": "packet_multiplayer_settings", - "settings_command": "packet_settings_command", - "anvil_damage": "packet_anvil_damage", - "completed_using_item": "packet_completed_using_item", - "network_settings": "packet_network_settings", - "player_auth_input": "packet_player_auth_input", - "creative_content": "packet_creative_content", - "player_enchant_options": "packet_player_enchant_options", - "item_stack_request": "packet_item_stack_request", - "item_stack_response": "packet_item_stack_response", - "player_armor_damage": "packet_player_armor_damage", - "update_player_game_type": "packet_update_player_game_type", - "position_tracking_db_request": "packet_position_tracking_db_request", - "position_tracking_db_broadcast": "packet_position_tracking_db_broadcast", - "packet_violation_warning": "packet_packet_violation_warning", - "motion_prediction_hints": "packet_motion_prediction_hints", - "animate_entity": "packet_animate_entity", - "camera_shake": "packet_camera_shake", - "player_fog": "packet_player_fog", - "correct_player_move_prediction": "packet_correct_player_move_prediction", - "item_component": "packet_item_component", - "filter_text_packet": "packet_filter_text_packet" - }, - "default": "void" - } - ] - } - ] - ], - "packet_login": [ - "container", - [ - { - "name": "protocol_version", - "type": "i32" - }, - { - "name": "tokens", - "type": [ - "encapsulated", - { - "lengthType": "varint", - "type": "LoginTokens" - } - ] - } - ] - ], - "LoginTokens": [ - "container", - [ - { - "name": "identity", - "type": "LittleString" - }, - { - "name": "client", - "type": "LittleString" - } - ] - ], - "packet_play_status": [ - "container", - [ - { - "name": "status", - "type": [ - "mapper", - { - "type": "i32", - "mappings": { - "0": "login_success", - "1": "failed_client", - "2": "failed_spawn", - "3": "player_spawn", - "4": "failed_invalid_tenant", - "5": "failed_vanilla_edu", - "6": "failed_edu_vanilla", - "7": "failed_server_full" - } - } - ] - } - ] - ], - "packet_server_to_client_handshake": [ - "container", - [ - { - "name": "token", - "type": "string" - } - ] - ], - "packet_client_to_server_handshake": [ - "container", - [] - ], - "packet_disconnect": [ - "container", - [ - { - "name": "hide_disconnect_reason", - "type": "bool" - }, - { - "name": "message", - "type": "string" - } - ] - ], - "packet_resource_packs_info": [ - "container", - [ - { - "name": "must_accept", - "type": "bool" - }, - { - "name": "has_scripts", - "type": "bool" - }, - { - "name": "behaviour_packs", - "type": "BehaviourPackInfos" - }, - { - "name": "texture_packs", - "type": "TexturePackInfos" - } - ] - ], - "packet_resource_pack_stack": [ - "container", - [ - { - "name": "must_accept", - "type": "bool" - }, - { - "name": "behavior_packs", - "type": "ResourcePackIdVersions" - }, - { - "name": "resource_packs", - "type": "ResourcePackIdVersions" - }, - { - "name": "game_version", - "type": "string" - }, - { - "name": "experiments", - "type": "Experiments" - }, - { - "name": "experiments_previously_used", - "type": "bool" - } - ] - ], - "packet_resource_pack_client_response": [ - "container", - [ - { - "name": "response_status", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "0": "none", - "1": "refused", - "2": "send_packs", - "3": "have_all_packs", - "4": "completed" - } - } - ] - }, - { - "name": "resourcepackids", - "type": "ResourcePackIds" - } - ] - ], - "packet_text": [ - "container", - [ - { - "name": "type", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "0": "raw", - "1": "chat", - "2": "translation", - "3": "popup", - "4": "jukebox_popup", - "5": "tip", - "6": "system", - "7": "whisper", - "8": "announcement", - "9": "json_whisper", - "10": "json" - } - } - ] - }, - { - "name": "needs_translation", - "type": "bool" - }, - { - "anon": true, - "type": [ - "switch", - { - "compareTo": "type", - "fields": { - "chat": [ - "container", - [ - { - "name": "source_name", - "type": "string" - }, - { - "name": "message", - "type": "string" - } - ] - ], - "whisper": [ - "container", - [ - { - "name": "source_name", - "type": "string" - }, - { - "name": "message", - "type": "string" - } - ] - ], - "announcement": [ - "container", - [ - { - "name": "source_name", - "type": "string" - }, - { - "name": "message", - "type": "string" - } - ] - ], - "raw": [ - "container", - [ - { - "name": "message", - "type": "string" - } - ] - ], - "tip": [ - "container", - [ - { - "name": "message", - "type": "string" - } - ] - ], - "system": [ - "container", - [ - { - "name": "message", - "type": "string" - } - ] - ], - "json_whisper": [ - "container", - [ - { - "name": "message", - "type": "string" - } - ] - ], - "json": [ - "container", - [ - { - "name": "message", - "type": "string" - } - ] - ], - "translation": [ - "container", - [ - { - "name": "message", - "type": "string" - }, - { - "name": "paramaters", - "type": [ - "array", - { - "countType": "varint", - "type": "string" - } - ] - } - ] - ], - "popup": [ - "container", - [ - { - "name": "message", - "type": "string" - }, - { - "name": "paramaters", - "type": [ - "array", - { - "countType": "varint", - "type": "string" - } - ] - } - ] - ], - "jukebox_popup": [ - "container", - [ - { - "name": "message", - "type": "string" - }, - { - "name": "paramaters", - "type": [ - "array", - { - "countType": "varint", - "type": "string" - } - ] - } - ] - ] - }, - "default": "void" - } - ] - }, - { - "name": "xuid", - "type": "string" - }, - { - "name": "platform_chat_id", - "type": "string" - } - ] - ], - "packet_set_time": [ - "container", - [ - { - "name": "time", - "type": "zigzag32" - } - ] - ], - "packet_start_game": [ - "container", - [ - { - "name": "entity_id", - "type": "zigzag64" - }, - { - "name": "runtime_entity_id", - "type": "varint64" - }, - { - "name": "player_gamemode", - "type": "GameMode" - }, - { - "name": "spawn", - "type": "vec3f" - }, - { - "name": "rotation", - "type": "vec2f" - }, - { - "name": "seed", - "type": "zigzag32" - }, - { - "name": "biome_type", - "type": "li16" - }, - { - "name": "biome_name", - "type": "string" - }, - { - "name": "dimension", - "type": "zigzag32" - }, - { - "name": "generator", - "type": "zigzag32" - }, - { - "name": "world_gamemode", - "type": "GameMode" - }, - { - "name": "difficulty", - "type": "zigzag32" - }, - { - "name": "spawn_position", - "type": "BlockCoordinates" - }, - { - "name": "achievements_disabled", - "type": "bool" - }, - { - "name": "day_cycle_stop_time", - "type": "zigzag32" - }, - { - "name": "edu_offer", - "type": "zigzag32" - }, - { - "name": "edu_features_enabled", - "type": "bool" - }, - { - "name": "edu_product_uuid", - "type": "string" - }, - { - "name": "rain_level", - "type": "lf32" - }, - { - "name": "lightning_level", - "type": "lf32" - }, - { - "name": "has_confirmed_platform_locked_content", - "type": "bool" - }, - { - "name": "is_multiplayer", - "type": "bool" - }, - { - "name": "broadcast_to_lan", - "type": "bool" - }, - { - "name": "xbox_live_broadcast_mode", - "type": "varint" - }, - { - "name": "platform_broadcast_mode", - "type": "varint" - }, - { - "name": "enable_commands", - "type": "bool" - }, - { - "name": "is_texturepacks_required", - "type": "bool" - }, - { - "name": "gamerules", - "type": "GameRules" - }, - { - "name": "experiments", - "type": "Experiments" - }, - { - "name": "experiments_previously_used", - "type": "bool" - }, - { - "name": "bonus_chest", - "type": "bool" - }, - { - "name": "map_enabled", - "type": "bool" - }, - { - "name": "permission_level", - "type": "zigzag32" - }, - { - "name": "server_chunk_tick_range", - "type": "li32" - }, - { - "name": "has_locked_behavior_pack", - "type": "bool" - }, - { - "name": "has_locked_resource_pack", - "type": "bool" - }, - { - "name": "is_from_locked_world_template", - "type": "bool" - }, - { - "name": "msa_gamertags_only", - "type": "bool" - }, - { - "name": "is_from_world_template", - "type": "bool" - }, - { - "name": "is_world_template_option_locked", - "type": "bool" - }, - { - "name": "only_spawn_v1_villagers", - "type": "bool" - }, - { - "name": "game_version", - "type": "string" - }, - { - "name": "limited_world_width", - "type": "li32" - }, - { - "name": "limited_world_length", - "type": "li32" - }, - { - "name": "is_new_nether", - "type": "bool" - }, - { - "name": "experimental_gameplay_override", - "type": "bool" - }, - { - "name": "level_id", - "type": "string" - }, - { - "name": "world_name", - "type": "string" - }, - { - "name": "premium_world_template_id", - "type": "string" - }, - { - "name": "is_trial", - "type": "bool" - }, - { - "name": "movement_authority", - "type": [ - "mapper", - { - "type": "zigzag32", - "mappings": { - "0": "client", - "1": "server", - "2": "server_v2_rewind" - } - } - ] - }, - { - "name": "current_tick", - "type": "li64" - }, - { - "name": "enchantment_seed", - "type": "zigzag32" - }, - { - "name": "block_palette", - "type": "BlockPalette" - }, - { - "name": "itemstates", - "type": "Itemstates" - }, - { - "name": "multiplayer_correlation_id", - "type": "string" - }, - { - "name": "server_authoritative_inventory", - "type": "bool" - } - ] - ], - "packet_add_player": [ - "container", - [ - { - "name": "uuid", - "type": "uuid" - }, - { - "name": "username", - "type": "string" - }, - { - "name": "entity_id_self", - "type": "zigzag64" - }, - { - "name": "runtime_entity_id", - "type": "varint" - }, - { - "name": "platform_chat_id", - "type": "string" - }, - { - "name": "x", - "type": "lf32" - }, - { - "name": "y", - "type": "lf32" - }, - { - "name": "z", - "type": "lf32" - }, - { - "name": "speed_x", - "type": "lf32" - }, - { - "name": "speed_y", - "type": "lf32" - }, - { - "name": "speed_z", - "type": "lf32" - }, - { - "name": "pitch", - "type": "lf32" - }, - { - "name": "yaw", - "type": "lf32" - }, - { - "name": "head_yaw", - "type": "lf32" - }, - { - "name": "held_item", - "type": "Item" - }, - { - "name": "metadata", - "type": "MetadataDictionary" - }, - { - "name": "flags", - "type": "varint" - }, - { - "name": "command_permission", - "type": "varint" - }, - { - "name": "action_permissions", - "type": "varint" - }, - { - "name": "permission_level", - "type": "varint" - }, - { - "name": "custom_stored_permissions", - "type": "varint" - }, - { - "name": "user_id", - "type": "li64" - }, - { - "name": "links", - "type": "Links" - }, - { - "name": "device_id", - "type": "string" - }, - { - "name": "device_os", - "type": "li32" - } - ] - ], - "packet_add_entity": [ - "container", - [ - { - "name": "entity_id_self", - "type": "zigzag64" - }, - { - "name": "runtime_entity_id", - "type": "varint" - }, - { - "name": "entity_type", - "type": "string" - }, - { - "name": "x", - "type": "lf32" - }, - { - "name": "y", - "type": "lf32" - }, - { - "name": "z", - "type": "lf32" - }, - { - "name": "speed_x", - "type": "lf32" - }, - { - "name": "speed_y", - "type": "lf32" - }, - { - "name": "speed_z", - "type": "lf32" - }, - { - "name": "pitch", - "type": "lf32" - }, - { - "name": "yaw", - "type": "lf32" - }, - { - "name": "head_yaw", - "type": "lf32" - }, - { - "name": "attributes", - "type": "EntityAttributes" - }, - { - "name": "metadata", - "type": "MetadataDictionary" - }, - { - "name": "links", - "type": "Links" - } - ] - ], - "packet_remove_entity": [ - "container", - [ - { - "name": "entity_id_self", - "type": "zigzag64" - } - ] - ], - "packet_add_item_entity": [ - "container", - [ - { - "name": "entity_id_self", - "type": "zigzag64" - }, - { - "name": "runtime_entity_id", - "type": "varint" - }, - { - "name": "item", - "type": "Item" - }, - { - "name": "x", - "type": "lf32" - }, - { - "name": "y", - "type": "lf32" - }, - { - "name": "z", - "type": "lf32" - }, - { - "name": "speed_x", - "type": "lf32" - }, - { - "name": "speed_y", - "type": "lf32" - }, - { - "name": "speed_z", - "type": "lf32" - }, - { - "name": "metadata", - "type": "MetadataDictionary" - }, - { - "name": "is_from_fishing", - "type": "bool" - } - ] - ], - "packet_take_item_entity": [ - "container", - [ - { - "name": "runtime_entity_id", - "type": "varint" - }, - { - "name": "target", - "type": "varint" - } - ] - ], - "packet_move_entity": [ - "container", - [ - { - "name": "runtime_entity_id", - "type": "varint" - }, - { - "name": "flags", - "type": "u8" - }, - { - "name": "position", - "type": "vec3f" - }, - { - "name": "rotation", - "type": "Rotation" - } - ] - ], - "packet_move_player": [ - "container", - [ - { - "name": "runtime_id", - "type": "varint" - }, - { - "name": "position", - "type": "vec3f" - }, - { - "name": "pitch", - "type": "lf32" - }, - { - "name": "yaw", - "type": "lf32" - }, - { - "name": "head_yaw", - "type": "lf32" - }, - { - "name": "mode", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "0": "normal", - "1": "reset", - "2": "teleport", - "3": "rotation" - } - } - ] - }, - { - "name": "on_ground", - "type": "bool" - }, - { - "name": "ridden_runtime_id", - "type": "varint" - }, - { - "name": "teleport", - "type": [ - "switch", - { - "compareTo": "mode", - "fields": { - "teleport": [ - "container", - [ - { - "name": "cause", - "type": [ - "mapper", - { - "type": "li32", - "mappings": { - "0": "unknown", - "1": "projectile", - "2": "chorus_fruit", - "3": "command", - "4": "behavior" - } - } - ] - }, - { - "name": "source_entity_type", - "type": "LegacyEntityType" - } - ] - ] - }, - "default": "void" - } - ] - }, - { - "name": "tick", - "type": "varint64" - } - ] - ], - "packet_rider_jump": [ - "container", - [ - { - "name": "jump_strength", - "type": "zigzag32" - } - ] - ], - "packet_update_block": [ - "container", - [ - { - "name": "coordinates", - "type": "BlockCoordinates" - }, - { - "name": "block_runtime_id", - "type": "varint" - }, - { - "name": "block_priority", - "type": "varint" - }, - { - "name": "storage", - "type": "varint" - } - ] - ], - "packet_add_painting": [ - "container", - [ - { - "name": "entity_id_self", - "type": "zigzag64" - }, - { - "name": "runtime_entity_id", - "type": "varint" - }, - { - "name": "coordinates", - "type": "BlockCoordinates" - }, - { - "name": "direction", - "type": "zigzag32" - }, - { - "name": "title", - "type": "string" - } - ] - ], - "packet_tick_sync": [ - "container", - [ - { - "name": "request_time", - "type": "li64" - }, - { - "name": "response_time", - "type": "li64" - } - ] - ], - "packet_level_sound_event_old": [ - "container", - [ - { - "name": "sound_id", - "type": "u8" - }, - { - "name": "position", - "type": "vec3f" - }, - { - "name": "block_id", - "type": "zigzag32" - }, - { - "name": "entity_type", - "type": "zigzag32" - }, - { - "name": "is_baby_mob", - "type": "bool" - }, - { - "name": "is_global", - "type": "bool" - } - ] - ], - "packet_level_event": [ - "container", - [ - { - "name": "event", - "type": [ - "mapper", - { - "type": "zigzag32", - "mappings": { - "1000": "sound_click", - "1001": "sound_click_fail", - "1002": "sound_shoot", - "1003": "sound_door", - "1004": "sound_fizz", - "1005": "sound_ignite", - "1007": "sound_ghast", - "1008": "sound_ghast_shoot", - "1009": "sound_blaze_shoot", - "1010": "sound_door_bump", - "1012": "sound_door_crash", - "1018": "sound_enderman_teleport", - "1020": "sound_anvil_break", - "1021": "sound_anvil_use", - "1022": "sound_anvil_fall", - "1030": "sound_pop", - "1032": "sound_portal", - "1040": "sound_itemframe_add_item", - "1041": "sound_itemframe_remove", - "1042": "sound_itemframe_place", - "1043": "sound_itemframe_remove_item", - "1044": "sound_itemframe_rotate_item", - "1050": "sound_camera", - "1051": "sound_orb", - "1052": "sound_totem", - "1060": "sound_armor_stand_break", - "1061": "sound_armor_stand_hit", - "1062": "sound_armor_stand_fall", - "1063": "sound_armor_stand_place", - "2000": "particle_shoot", - "2001": "particle_destroy", - "2002": "particle_splash", - "2003": "particle_eye_despawn", - "2004": "particle_spawn", - "2006": "guardian_curse", - "2008": "particle_block_force_field", - "2009": "particle_projectile_hit", - "2013": "particle_enderman_teleport", - "2014": "particle_punch_block", - "3001": "start_rain", - "3002": "start_thunder", - "3003": "stop_rain", - "3004": "stop_thunder", - "3005": "pause_game", - "3006": "pause_game_no_screen", - "3007": "set_game_speed", - "3500": "redstone_trigger", - "3501": "cauldron_explode", - "3502": "cauldron_dye_armor", - "3503": "cauldron_clean_armor", - "3504": "cauldron_fill_potion", - "3505": "cauldron_take_potion", - "3506": "cauldron_fill_water", - "3507": "cauldron_take_water", - "3508": "cauldron_add_dye", - "3509": "cauldron_clean_banner", - "3600": "block_start_break", - "3601": "block_stop_break", - "4000": "set_data", - "9800": "players_sleeping", - "16384": "add_particle_mask" - } - } - ] - }, - { - "name": "position", - "type": "vec3f" - }, - { - "name": "data", - "type": "zigzag32" - } - ] - ], - "packet_block_event": [ - "container", - [ - { - "name": "position", - "type": "BlockCoordinates" - }, - { - "name": "type", - "type": [ - "mapper", - { - "type": "zigzag32", - "mappings": { - "0": "sound", - "1": "change_state" - } - } - ] - }, - { - "name": "data", - "type": "zigzag32" - } - ] - ], - "packet_entity_event": [ - "container", - [ - { - "name": "runtime_entity_id", - "type": "varint" - }, - { - "name": "event_id", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "1": "jump", - "2": "hurt_animation", - "3": "death_animation", - "4": "arm_swing", - "5": "stop_attack", - "6": "tame_fail", - "7": "tame_success", - "8": "shake_wet", - "9": "use_item", - "10": "eat_grass_animation", - "11": "fish_hook_bubble", - "12": "fish_hook_position", - "13": "fish_hook_hook", - "14": "fish_hook_tease", - "15": "squid_ink_cloud", - "16": "zombie_villager_cure", - "18": "respawn", - "19": "iron_golem_offer_flower", - "20": "iron_golem_withdraw_flower", - "21": "love_particles", - "22": "villager_angry", - "23": "villager_happy", - "24": "witch_spell_particles", - "25": "firework_particles", - "26": "in_love_particles", - "27": "silverfish_spawn_animation", - "28": "guardian_attack", - "29": "witch_drink_potion", - "30": "witch_throw_potion", - "31": "minecart_tnt_prime_fuse", - "32": "creeper_prime_fuse", - "33": "air_supply_expired", - "34": "player_add_xp_levels", - "35": "elder_guardian_curse", - "36": "agent_arm_swing", - "37": "ender_dragon_death", - "38": "dust_particles", - "39": "arrow_shake", - "57": "eating_item", - "60": "baby_animal_feed", - "61": "death_smoke_cloud", - "62": "complete_trade", - "63": "remove_leash", - "65": "consume_totem", - "66": "player_check_treasure_hunter_achievement", - "67": "entity_spawn", - "68": "dragon_puke", - "69": "item_entity_merge", - "70": "start_swim", - "71": "balloon_pop", - "72": "treasure_hunt", - "73": "agent_summon", - "74": "charged_crossbow", - "75": "fall" - } - } - ] - }, - { - "name": "data", - "type": "zigzag32" - } - ] - ], - "packet_mob_effect": [ - "container", - [ - { - "name": "runtime_entity_id", - "type": "varint" - }, - { - "name": "event_id", - "type": "u8" - }, - { - "name": "effect_id", - "type": "zigzag32" - }, - { - "name": "amplifier", - "type": "zigzag32" - }, - { - "name": "particles", - "type": "bool" - }, - { - "name": "duration", - "type": "zigzag32" - } - ] - ], - "packet_update_attributes": [ - "container", - [ - { - "name": "runtime_entity_id", - "type": "varint64" - }, - { - "name": "attributes", - "type": "PlayerAttributes" - }, - { - "name": "tick", - "type": "varint64" - } - ] - ], - "packet_inventory_transaction": [ - "container", - [ - { - "name": "transaction", - "type": "Transaction" - } - ] - ], - "packet_mob_equipment": [ - "container", - [ - { - "name": "runtime_entity_id", - "type": "varint" - }, - { - "name": "item", - "type": "Item" - }, - { - "name": "slot", - "type": "u8" - }, - { - "name": "selected_slot", - "type": "u8" - }, - { - "name": "windows_id", - "type": "WindowID" - } - ] - ], - "packet_mob_armor_equipment": [ - "container", - [ - { - "name": "runtime_entity_id", - "type": "varint" - }, - { - "name": "helmet", - "type": "Item" - }, - { - "name": "chestplate", - "type": "Item" - }, - { - "name": "leggings", - "type": "Item" - }, - { - "name": "boots", - "type": "Item" - } - ] - ], - "packet_interact": [ - "container", - [ - { - "name": "action_id", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "3": "leave_vehicle", - "4": "mouse_over_entity", - "6": "open_inventory" - } - } - ] - }, - { - "name": "target_runtime_entity_id", - "type": "varint" - }, - { - "name": "position", - "type": [ - "switch", - { - "compareTo": "action_id", - "fields": { - "mouse_over_entity": "vec3f", - "leave_vehicle": "vec3f" - }, - "default": "void" - } - ] - } - ] - ], - "packet_block_pick_request": [ - "container", - [ - { - "name": "x", - "type": "zigzag32" - }, - { - "name": "y", - "type": "zigzag32" - }, - { - "name": "z", - "type": "zigzag32" - }, - { - "name": "add_user_data", - "type": "bool" - }, - { - "name": "selected_slot", - "type": "u8" - } - ] - ], - "packet_entity_pick_request": [ - "container", - [ - { - "name": "runtime_entity_id", - "type": "lu64" - }, - { - "name": "selected_slot", - "type": "u8" - } - ] - ], - "packet_player_action": [ - "container", - [ - { - "name": "runtime_entity_id", - "type": "varint" - }, - { - "name": "action", - "type": [ - "mapper", - { - "type": "zigzag32", - "mappings": { - "0": "start_break", - "1": "abort_break", - "2": "stop_break", - "3": "get_updated_block", - "4": "drop_item", - "5": "start_sleeping", - "6": "stop_sleeping", - "7": "respawn", - "8": "jump", - "9": "start_sprint", - "10": "stop_sprint", - "11": "start_sneak", - "12": "stop_sneak", - "13": "creative_player_destroy_block", - "14": "dimension_change_ack", - "15": "start_glide", - "16": "stop_glide", - "17": "build_denied", - "18": "continue_break", - "19": "change_skin", - "20": "set_enchatnment_seed", - "21": "swimming", - "22": "stop_swimming", - "23": "start_spin_attack", - "24": "stop_spin_attack", - "25": "ineract_block" - } - } - ] - }, - { - "name": "position", - "type": "BlockCoordinates" - }, - { - "name": "face", - "type": "zigzag32" - } - ] - ], - "packet_hurt_armor": [ - "container", - [ - { - "name": "health", - "type": "zigzag32" - } - ] - ], - "packet_set_entity_data": [ - "container", - [ - { - "name": "runtime_entity_id", - "type": "varint" - }, - { - "name": "metadata", - "type": "MetadataDictionary" - }, - { - "name": "tick", - "type": "varint" - } - ] - ], - "packet_set_entity_motion": [ - "container", - [ - { - "name": "runtime_entity_id", - "type": "varint" - }, - { - "name": "velocity", - "type": "vec3f" - } - ] - ], - "packet_set_entity_link": [ - "container", - [ - { - "name": "link", - "type": "Link" - } - ] - ], - "packet_set_health": [ - "container", - [ - { - "name": "health", - "type": "zigzag32" - } - ] - ], - "packet_set_spawn_position": [ - "container", - [ - { - "name": "spawn_type", - "type": [ - "mapper", - { - "type": "zigzag32", - "mappings": { - "0": "player", - "1": "world" - } - } - ] - }, - { - "name": "player_position", - "type": "BlockCoordinates" - }, - { - "name": "dimension", - "type": "zigzag32" - }, - { - "name": "world_position", - "type": "BlockCoordinates" - } - ] - ], - "packet_animate": [ - "container", - [ - { - "name": "action_id", - "type": "zigzag32" - }, - { - "name": "runtime_entity_id", - "type": "varint" - } - ] - ], - "packet_respawn": [ - "container", - [ - { - "name": "x", - "type": "lf32" - }, - { - "name": "y", - "type": "lf32" - }, - { - "name": "z", - "type": "lf32" - }, - { - "name": "state", - "type": "u8" - }, - { - "name": "runtime_entity_id", - "type": "varint" - } - ] - ], - "packet_container_open": [ - "container", - [ - { - "name": "window_id", - "type": "WindowID" - }, - { - "name": "window_type", - "type": "WindowType" - }, - { - "name": "coordinates", - "type": "BlockCoordinates" - }, - { - "name": "runtime_entity_id", - "type": "zigzag64" - } - ] - ], - "packet_container_close": [ - "container", - [ - { - "name": "window_id", - "type": "WindowID" - }, - { - "name": "server", - "type": "bool" - } - ] - ], - "packet_player_hotbar": [ - "container", - [ - { - "name": "selected_slot", - "type": "varint" - }, - { - "name": "window_id", - "type": "WindowID" - }, - { - "name": "select_slot", - "type": "bool" - } - ] - ], - "packet_inventory_content": [ - "container", - [ - { - "name": "inventory_id", - "type": "varint" - }, - { - "name": "input", - "type": "ItemStacks" - } - ] - ], - "packet_inventory_slot": [ - "container", - [ - { - "name": "window_id", - "type": "WindowID" - }, - { - "name": "slot", - "type": "varint" - }, - { - "name": "item", - "type": "ItemStack" - } - ] - ], - "packet_container_set_data": [ - "container", - [ - { - "name": "window_id", - "type": "WindowID" - }, - { - "name": "property", - "type": "zigzag32" - }, - { - "name": "value", - "type": "zigzag32" - } - ] - ], - "packet_crafting_data": [ - "container", - [ - { - "name": "recipes", - "type": "Recipes" - }, - { - "name": "potion_type_recipes", - "type": "PotionTypeRecipes" - }, - { - "name": "potion_container_recipes", - "type": "PotionContainerChangeRecipes" - }, - { - "name": "is_clean", - "type": "bool" - } - ] - ], - "packet_crafting_event": [ - "container", - [ - { - "name": "window_id", - "type": "WindowID" - }, - { - "name": "recipe_type", - "type": [ - "mapper", - { - "type": "zigzag32", - "mappings": { - "0": "inventory", - "1": "crafting", - "2": "workbench" - } - } - ] - }, - { - "name": "recipe_id", - "type": "uuid" - }, - { - "name": "input", - "type": [ - "array", - { - "countType": "varint", - "type": "Item" - } - ] - }, - { - "name": "result", - "type": [ - "array", - { - "countType": "varint", - "type": "Item" - } - ] - } - ] - ], - "packet_gui_data_pick_item": [ - "container", - [] - ], - "packet_adventure_settings": [ - "container", - [ - { - "name": "flags", - "type": "AdventureFlags" - }, - { - "name": "command_permission", - "type": [ - "mapper", - { - "type": "varint32", - "mappings": { - "0": "normal", - "1": "operator", - "2": "host", - "3": "automation", - "4": "admin" - } - } - ] - }, - { - "name": "action_permissions", - "type": "ActionPermissions" - }, - { - "name": "permission_level", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "0": "visitor", - "1": "member", - "2": "operator", - "3": "custom" - } - } - ] - }, - { - "name": "custom_stored_permissions", - "type": "varint" - }, - { - "name": "user_id", - "type": "li64" - } - ] - ], - "packet_block_entity_data": [ - "container", - [ - { - "name": "position", - "type": "BlockCoordinates" - }, - { - "name": "nbt", - "type": "nbt" - } - ] - ], - "packet_player_input": [ - "container", - [ - { - "name": "motion_x", - "type": "lf32" - }, - { - "name": "motion_z", - "type": "lf32" - }, - { - "name": "jumping", - "type": "bool" - }, - { - "name": "sneaking", - "type": "bool" - } - ] - ], - "packet_level_chunk": [ - "container", - [ - { - "name": "x", - "type": "zigzag32" - }, - { - "name": "z", - "type": "zigzag32" - }, - { - "name": "sub_chunk_count", - "type": "varint" - }, - { - "name": "cache_enabled", - "type": "bool" - }, - { - "name": "blobs", - "type": [ - "switch", - { - "compareTo": "cache_enabled", - "fields": { - "true": [ - "container", - [ - { - "name": "hashes", - "type": [ - "array", - { - "countType": "varint", - "type": "lu64" - } - ] - } - ] - ] - }, - "default": "void" - } - ] - }, - { - "name": "payload", - "type": "ByteArray" - } - ] - ], - "packet_set_commands_enabled": [ - "container", - [ - { - "name": "enabled", - "type": "bool" - } - ] - ], - "packet_set_difficulty": [ - "container", - [ - { - "name": "difficulty", - "type": "varint" - } - ] - ], - "packet_change_dimension": [ - "container", - [ - { - "name": "dimension", - "type": "zigzag32" - }, - { - "name": "position", - "type": "vec3f" - }, - { - "name": "respawn", - "type": "bool" - } - ] - ], - "packet_set_player_game_type": [ - "container", - [ - { - "name": "gamemode", - "type": "GameMode" - } - ] - ], - "packet_player_list": [ - "container", - [ - { - "name": "records", - "type": "PlayerRecords" - } - ] - ], - "packet_simple_event": [ - "container", - [ - { - "name": "event_type", - "type": "lu16" - } - ] - ], - "packet_event": [ - "container", - [ - { - "name": "runtime_id", - "type": "varint64" - }, - { - "name": "event_type", - "type": [ - "mapper", - { - "type": "zigzag32", - "mappings": { - "0": "achievement_awarded", - "1": "entity_interact", - "2": "portal_built", - "3": "portal_used", - "4": "mob_killed", - "5": "cauldron_used", - "6": "player_death", - "7": "boss_killed", - "8": "agent_command", - "9": "agent_created", - "10": "banner_pattern_removed", - "11": "commaned_executed", - "12": "fish_bucketed", - "13": "mob_born", - "14": "pet_died", - "15": "cauldron_block_used", - "16": "composter_block_used", - "17": "bell_block_used" - } - } - ] - }, - { - "name": "use_player_id", - "type": "u8" - }, - { - "name": "event_data", - "type": "restBuffer" - } - ] - ], - "packet_spawn_experience_orb": [ - "container", - [ - { - "name": "position", - "type": "vec3f" - }, - { - "name": "count", - "type": "zigzag32" - } - ] - ], - "packet_clientbound_map_item_data": [ - "container", - [ - { - "name": "mapinfo", - "type": "MapInfo" - } - ] - ], - "packet_map_info_request": [ - "container", - [ - { - "name": "map_id", - "type": "zigzag64" - } - ] - ], - "packet_request_chunk_radius": [ - "container", - [ - { - "name": "chunk_radius", - "type": "zigzag32" - } - ] - ], - "packet_chunk_radius_update": [ - "container", - [ - { - "name": "chunk_radius", - "type": "zigzag32" - } - ] - ], - "packet_item_frame_drop_item": [ - "container", - [ - { - "name": "coordinates", - "type": "BlockCoordinates" - } - ] - ], - "packet_game_rules_changed": [ - "container", - [ - { - "name": "rules", - "type": "GameRules" - } - ] - ], - "packet_camera": [ - "container", - [ - { - "name": "camera_entity_unique_id", - "type": "zigzag64" - }, - { - "name": "target_player_unique_id", - "type": "zigzag64" - } - ] - ], - "packet_boss_event": [ - "container", - [ - { - "name": "boss_entity_id", - "type": "zigzag64" - }, - { - "name": "type", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "0": "show_bar", - "1": "register_player", - "2": "hide_bar", - "3": "unregister_player", - "4": "set_bar_progress", - "5": "set_bar_title", - "6": "update_properties", - "7": "texture" - } - } - ] - }, - { - "anon": true, - "type": [ - "switch", - { - "compareTo": "type", - "fields": { - "register_player": [ - "container", - [ - { - "name": "player_id", - "type": "zigzag64" - } - ] - ], - "unregister_player": [ - "container", - [ - { - "name": "player_id", - "type": "zigzag64" - } - ] - ], - "show": [ - "container", - [ - { - "name": "title", - "type": "string" - }, - { - "name": "bar_progress", - "type": "lf32" - } - ] - ], - "update_properties": [ - "container", - [ - { - "name": "darkness_factor", - "type": "li16" - } - ] - ], - "texture": [ - "container", - [ - { - "name": "color", - "type": "varint" - }, - { - "name": "overlay", - "type": "varint" - } - ] - ], - "set_bar_progress": [ - "container", - [ - { - "name": "bar_progress", - "type": "lf32" - } - ] - ], - "set_bar_title": [ - "container", - [ - { - "name": "title", - "type": "string" - } - ] - ] - }, - "default": "void" - } - ] - } - ] - ], - "packet_show_credits": [ - "container", - [ - { - "name": "runtime_entity_id", - "type": "varint" - }, - { - "name": "status", - "type": "zigzag32" - } - ] - ], - "packet_available_commands": [ - "container", - [ - { - "name": "values_len", - "type": "varint" - }, - { - "name": "_enum_type", - "type": [ - "enum_size_based_on_values_len" - ] - }, - { - "name": "enum_values", - "type": [ - "array", - { - "count": "values_len", - "type": "string" - } - ] - }, - { - "name": "suffixes", - "type": [ - "array", - { - "countType": "varint", - "type": "string" - } - ] - }, - { - "name": "enums", - "type": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "values", - "type": [ - "array", - { - "countType": "varint", - "type": [ - "switch", - { - "compareTo": "../_enum_type", - "fields": { - "byte": "u8", - "short": "lu16", - "int": "lu32" - }, - "default": "void" - } - ] - } - ] - } - ] - ] - } - ] - }, - { - "name": "command_data", - "type": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "description", - "type": "string" - }, - { - "name": "flags", - "type": "u8" - }, - { - "name": "permission_level", - "type": "u8" - }, - { - "name": "alias", - "type": "li32" - }, - { - "name": "overloads", - "type": [ - "array", - { - "countType": "varint", - "type": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "paramater_name", - "type": "string" - }, - { - "name": "value_type", - "type": [ - "mapper", - { - "type": "lu16", - "mappings": { - "1": "int", - "2": "float", - "3": "value", - "4": "wildcard_int", - "5": "operator", - "6": "target", - "14": "file_path", - "29": "string", - "37": "position", - "41": "message", - "43": "raw_text", - "46": "json", - "53": "command" - } - } - ] - }, - { - "name": "enum_type", - "type": [ - "mapper", - { - "type": "lu16", - "mappings": { - "16": "valid", - "32": "enum", - "256": "suffixed", - "1024": "soft_enum" - } - } - ] - }, - { - "name": "optional", - "type": "bool" - }, - { - "name": "options", - "type": "CommandFlags" - } - ] - ] - } - ] - } - ] - } - ] - ] - } - ] - }, - { - "name": "dynamic_enums", - "type": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "values", - "type": [ - "array", - { - "countType": "varint", - "type": "string" - } - ] - } - ] - ] - } - ] - }, - { - "name": "enum_constraints", - "type": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "value_index", - "type": "li32" - }, - { - "name": "enum_index", - "type": "li32" - }, - { - "name": "constraints", - "type": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "constraint", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "0": "cheats_enabled" - } - } - ] - } - ] - ] - } - ] - } - ] - ] - } - ] - } - ] - ], - "packet_command_request": [ - "container", - [ - { - "name": "command", - "type": "string" - }, - { - "name": "origin", - "type": "CommandOrigin" - }, - { - "name": "interval", - "type": "bool" - } - ] - ], - "packet_command_block_update": [ - "container", - [ - { - "name": "is_block", - "type": "bool" - } - ] - ], - "packet_command_output": [ - "container", - [ - { - "name": "origin", - "type": "CommandOrigin" - }, - { - "name": "output_type", - "type": "i8" - }, - { - "name": "success_count", - "type": "varint" - }, - { - "name": "output", - "type": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "success", - "type": "bool" - }, - { - "name": "message_id", - "type": "string" - }, - { - "name": "paramaters", - "type": [ - "array", - { - "countType": "varint", - "type": "string" - } - ] - } - ] - ] - } - ] - } - ] - ], - "packet_update_trade": [ - "container", - [ - { - "name": "window_id", - "type": "WindowID" - }, - { - "name": "window_type", - "type": "WindowType" - }, - { - "name": "size", - "type": "varint" - }, - { - "name": "trade_tier", - "type": "varint" - }, - { - "name": "villager_unique_id", - "type": "varint64" - }, - { - "name": "entity_unique_id", - "type": "varint64" - }, - { - "name": "display_name", - "type": "string" - }, - { - "name": "new_trading_ui", - "type": "bool" - }, - { - "name": "economic_trades", - "type": "bool" - }, - { - "name": "offers", - "type": "nbt" - } - ] - ], - "packet_update_equipment": [ - "container", - [ - { - "name": "window_id", - "type": "WindowID" - }, - { - "name": "window_type", - "type": "WindowType" - }, - { - "name": "size", - "type": "u8" - }, - { - "name": "entity_id", - "type": "zigzag64" - }, - { - "name": "inventory", - "type": "nbt" - } - ] - ], - "packet_resource_pack_data_info": [ - "container", - [ - { - "name": "package_id", - "type": "string" - }, - { - "name": "max_chunk_size", - "type": "lu32" - }, - { - "name": "chunk_count", - "type": "lu32" - }, - { - "name": "compressed_package_size", - "type": "lu64" - }, - { - "name": "hash", - "type": "ByteArray" - }, - { - "name": "is_premium", - "type": "bool" - }, - { - "name": "pack_type", - "type": "u8" - } - ] - ], - "packet_resource_pack_chunk_data": [ - "container", - [ - { - "name": "package_id", - "type": "string" - }, - { - "name": "chunk_index", - "type": "lu32" - }, - { - "name": "progress", - "type": "lu64" - }, - { - "name": "payload", - "type": "ByteArray" - } - ] - ], - "packet_resource_pack_chunk_request": [ - "container", - [ - { - "name": "package_id", - "type": "string" - }, - { - "name": "chunk_index", - "type": "lu32" - } - ] - ], - "packet_transfer": [ - "container", - [ - { - "name": "server_address", - "type": "string" - }, - { - "name": "port", - "type": "lu16" - } - ] - ], - "packet_play_sound": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "coordinates", - "type": "BlockCoordinates" - }, - { - "name": "volume", - "type": "lf32" - }, - { - "name": "pitch", - "type": "lf32" - } - ] - ], - "packet_stop_sound": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "stop_all", - "type": "bool" - } - ] - ], - "packet_set_title": [ - "container", - [ - { - "name": "type", - "type": "zigzag32" - }, - { - "name": "text", - "type": "string" - }, - { - "name": "fade_in_time", - "type": "zigzag32" - }, - { - "name": "stay_time", - "type": "zigzag32" - }, - { - "name": "fade_out_time", - "type": "zigzag32" - } - ] - ], - "packet_add_behavior_tree": [ - "container", - [ - { - "name": "behaviortree", - "type": "string" - } - ] - ], - "packet_structure_block_update": [ - "container", - [] - ], - "packet_show_store_offer": [ - "container", - [ - { - "name": "unknown0", - "type": "string" - }, - { - "name": "unknown1", - "type": "bool" - } - ] - ], - "packet_purchase_receipt": [ - "container", - [] - ], - "packet_player_skin": [ - "container", - [ - { - "name": "uuid", - "type": "uuid" - }, - { - "name": "skin", - "type": "Skin" - }, - { - "name": "skin_name", - "type": "string" - }, - { - "name": "old_skin_name", - "type": "string" - }, - { - "name": "is_verified", - "type": "bool" - } - ] - ], - "packet_sub_client_login": [ - "container", - [] - ], - "packet_initiate_web_socket_connection": [ - "container", - [ - { - "name": "server", - "type": "string" - } - ] - ], - "packet_set_last_hurt_by": [ - "container", - [ - { - "name": "unknown", - "type": "varint" - } - ] - ], - "packet_book_edit": [ - "container", - [ - { - "name": "type", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "0": "replace_page", - "1": "add_page", - "2": "delete_page", - "3": "swap_pages", - "4": "sign" - } - } - ] - }, - { - "name": "slot", - "type": "u8" - }, - { - "anon": true, - "type": [ - "switch", - { - "compareTo": "type", - "fields": { - "replace_page": [ - "container", - [ - { - "name": "page_number", - "type": "u8" - }, - { - "name": "text", - "type": "string" - }, - { - "name": "photo_name", - "type": "string" - } - ] - ], - "add_page": [ - "container", - [ - { - "name": "page_number", - "type": "u8" - }, - { - "name": "text", - "type": "string" - }, - { - "name": "photo_name", - "type": "string" - } - ] - ], - "delete_page": [ - "container", - [ - { - "name": "page_number", - "type": "u8" - } - ] - ], - "swap_pages": [ - "container", - [ - { - "name": "page1", - "type": "u8" - }, - { - "name": "page2", - "type": "u8" - } - ] - ], - "sign": [ - "container", - [ - { - "name": "title", - "type": "string" - }, - { - "name": "author", - "type": "string" - }, - { - "name": "xuid", - "type": "string" - } - ] - ] - }, - "default": "void" - } - ] - } - ] - ], - "packet_npc_request": [ - "container", - [ - { - "name": "runtime_entity_id", - "type": "varint" - }, - { - "name": "unknown0", - "type": "u8" - }, - { - "name": "unknown1", - "type": "string" - }, - { - "name": "unknown2", - "type": "u8" - } - ] - ], - "packet_photo_transfer": [ - "container", - [ - { - "name": "file_name", - "type": "string" - }, - { - "name": "image_data", - "type": "string" - }, - { - "name": "unknown2", - "type": "string" - } - ] - ], - "packet_modal_form_request": [ - "container", - [ - { - "name": "form_id", - "type": "varint" - }, - { - "name": "data", - "type": "string" - } - ] - ], - "packet_modal_form_response": [ - "container", - [ - { - "name": "form_id", - "type": "varint" - }, - { - "name": "data", - "type": "string" - } - ] - ], - "packet_server_settings_request": [ - "container", - [] - ], - "packet_server_settings_response": [ - "container", - [ - { - "name": "form_id", - "type": "varint" - }, - { - "name": "data", - "type": "string" - } - ] - ], - "packet_show_profile": [ - "container", - [ - { - "name": "xuid", - "type": "string" - } - ] - ], - "packet_set_default_game_type": [ - "container", - [ - { - "name": "gamemode", - "type": "GameMode" - } - ] - ], - "packet_remove_objective": [ - "container", - [ - { - "name": "objective_name", - "type": "string" - } - ] - ], - "packet_set_display_objective": [ - "container", - [ - { - "name": "display_slot", - "type": "string" - }, - { - "name": "objective_name", - "type": "string" - }, - { - "name": "display_name", - "type": "string" - }, - { - "name": "criteria_name", - "type": "string" - }, - { - "name": "sort_order", - "type": "zigzag32" - } - ] - ], - "packet_set_score": [ - "container", - [ - { - "name": "entries", - "type": "ScoreEntries" - } - ] - ], - "packet_lab_table": [ - "container", - [ - { - "name": "useless_byte", - "type": "u8" - }, - { - "name": "lab_table_x", - "type": "varint" - }, - { - "name": "lab_table_y", - "type": "varint" - }, - { - "name": "lab_table_z", - "type": "varint" - }, - { - "name": "reaction_type", - "type": "u8" - } - ] - ], - "packet_update_block_synced": [ - "container", - [ - { - "name": "coordinates", - "type": "BlockCoordinates" - }, - { - "name": "block_runtime_id", - "type": "varint" - }, - { - "name": "block_priority", - "type": "varint" - }, - { - "name": "data_layer_id", - "type": "varint" - }, - { - "name": "unknown0", - "type": "varint" - }, - { - "name": "unknown1", - "type": "varint" - } - ] - ], - "packet_move_entity_delta": [ - "container", - [ - { - "name": "runtime_entity_id", - "type": "varint64" - }, - { - "name": "flags", - "type": "DeltaMoveFlags" - }, - { - "name": "x", - "type": [ - "switch", - { - "compareTo": "flags.has_x", - "fields": { - "true": "lf32" - }, - "default": "void" - } - ] - }, - { - "name": "y", - "type": [ - "switch", - { - "compareTo": "flags.has_y", - "fields": { - "true": "lf32" - }, - "default": "void" - } - ] - }, - { - "name": "z", - "type": [ - "switch", - { - "compareTo": "flags.has_z", - "fields": { - "true": "lf32" - }, - "default": "void" - } - ] - }, - { - "name": "rot_x", - "type": [ - "switch", - { - "compareTo": "flags.has_rot_x", - "fields": { - "true": "u8" - }, - "default": "void" - } - ] - }, - { - "name": "rot_y", - "type": [ - "switch", - { - "compareTo": "flags.has_rot_y", - "fields": { - "true": "u8" - }, - "default": "void" - } - ] - }, - { - "name": "rot_z", - "type": [ - "switch", - { - "compareTo": "flags.has_rot_z", - "fields": { - "true": "u8" - }, - "default": "void" - } - ] - } - ] - ], - "packet_set_scoreboard_identity": [ - "container", - [ - { - "name": "entries", - "type": "ScoreboardIdentityEntries" - } - ] - ], - "packet_set_local_player_as_initialized": [ - "container", - [ - { - "name": "runtime_entity_id", - "type": "varint64" - } - ] - ], - "packet_update_soft_enum": [ - "container", - [] - ], - "packet_network_stack_latency": [ - "container", - [ - { - "name": "timestamp", - "type": "lu64" - }, - { - "name": "unknown_flag", - "type": "u8" - } - ] - ], - "packet_script_custom_event": [ - "container", - [ - { - "name": "event_name", - "type": "string" - }, - { - "name": "event_data", - "type": "string" - } - ] - ], - "packet_spawn_particle_effect": [ - "container", - [ - { - "name": "dimension_id", - "type": "u8" - }, - { - "name": "entity_id", - "type": "zigzag64" - }, - { - "name": "position", - "type": "vec3f" - }, - { - "name": "particle_name", - "type": "string" - } - ] - ], - "packet_available_entity_identifiers": [ - "container", - [ - { - "name": "nbt", - "type": "nbt" - } - ] - ], - "packet_level_sound_event_v2": [ - "container", - [ - { - "name": "sound_id", - "type": "u8" - }, - { - "name": "position", - "type": "vec3f" - }, - { - "name": "block_id", - "type": "zigzag32" - }, - { - "name": "entity_type", - "type": "string" - }, - { - "name": "is_baby_mob", - "type": "bool" - }, - { - "name": "is_global", - "type": "bool" - } - ] - ], - "packet_network_chunk_publisher_update": [ - "container", - [ - { - "name": "coordinates", - "type": "BlockCoordinates" - }, - { - "name": "radius", - "type": "varint" - } - ] - ], - "packet_biome_definition_list": [ - "container", - [ - { - "name": "nbt", - "type": "nbt" - } - ] - ], - "packet_level_sound_event": [ - "container", - [ - { - "name": "sound_id", - "type": "varint" - }, - { - "name": "position", - "type": "vec3f" - }, - { - "name": "block_id", - "type": "zigzag32" - }, - { - "name": "entity_type", - "type": "string" - }, - { - "name": "is_baby_mob", - "type": "bool" - }, - { - "name": "is_global", - "type": "bool" - } - ] - ], - "packet_level_event_generic": [ - "container", - [ - { - "name": "event_id", - "type": "varint" - }, - { - "name": "nbt", - "type": "nbtLoop" - } - ] - ], - "packet_lectern_update": [ - "container", - [ - { - "name": "page", - "type": "u8" - }, - { - "name": "page_count", - "type": "u8" - }, - { - "name": "position", - "type": "vec3i" - }, - { - "name": "drop_book", - "type": "bool" - } - ] - ], - "packet_video_stream_connect": [ - "container", - [ - { - "name": "server_uri", - "type": "string" - }, - { - "name": "frame_send_frequency", - "type": "lf32" - }, - { - "name": "action", - "type": "u8" - }, - { - "name": "resolution_x", - "type": "li32" - }, - { - "name": "resolution_y", - "type": "li32" - } - ] - ], - "packet_add_ecs_entity": [ - "container", - [ - { - "name": "network_id", - "type": "varint64" - } - ] - ], - "packet_remove_ecs_entity": [ - "container", - [ - { - "name": "network_id", - "type": "varint64" - } - ] - ], - "packet_client_cache_status": [ - "container", - [ - { - "name": "enabled", - "type": "bool" - } - ] - ], - "packet_on_screen_texture_animation": [ - "container", - [] - ], - "packet_map_create_locked_copy": [ - "container", - [] - ], - "packet_structure_template_data_export_request": [ - "container", - [] - ], - "packet_structure_template_data_export_response": [ - "container", - [] - ], - "packet_update_block_properties": [ - "container", - [ - { - "name": "nbt", - "type": "nbt" - } - ] - ], - "packet_client_cache_blob_status": [ - "container", - [ - { - "name": "misses", - "type": "varint" - }, - { - "name": "haves", - "type": "varint" - }, - { - "name": "missing", - "type": [ - "array", - { - "count": "misses", - "type": "lu64" - } - ] - }, - { - "name": "have", - "type": [ - "array", - { - "count": "haves", - "type": "lu64" - } - ] - } - ] - ], - "packet_client_cache_miss_response": [ - "container", - [ - { - "name": "blobs", - "type": [ - "array", - { - "countType": "varint", - "type": "Blob" - } - ] - } - ] - ], - "packet_education_settings": [ - "container", - [ - { - "name": "CodeBuilderDefaultURI", - "type": "string" - }, - { - "name": "CodeBuilderTitle", - "type": "string" - }, - { - "name": "CanResizeCodeBuilder", - "type": "bool" - }, - { - "name": "HasOverrideURI", - "type": "bool" - }, - { - "name": "OverrideURI", - "type": [ - "switch", - { - "compareTo": "HasOverrideURI", - "fields": { - "true": "string" - }, - "default": "void" - } - ] - }, - { - "name": "HasQuiz", - "type": "bool" - } - ] - ], - "packet_multiplayer_settings": [ - "container", - [ - { - "name": "action_type", - "type": [ - "mapper", - { - "type": "zigzag32", - "mappings": { - "0": "enable_multiplayer", - "1": "disable_multiplayer", - "2": "refresh_join_code" - } - } - ] - } - ] - ], - "packet_settings_command": [ - "container", - [ - { - "name": "command_line", - "type": "string" - }, - { - "name": "suppress_output", - "type": "bool" - } - ] - ], - "packet_anvil_damage": [ - "container", - [ - { - "name": "damage", - "type": "u8" - }, - { - "name": "position", - "type": "BlockCoordinates" - } - ] - ], - "packet_completed_using_item": [ - "container", - [ - { - "name": "used_item_id", - "type": "li16" - }, - { - "name": "use_method", - "type": [ - "mapper", - { - "type": "li32", - "mappings": { - "0": "equip_armor", - "1": "eat", - "2": "attack", - "3": "consume", - "4": "throw", - "5": "shoot", - "6": "place", - "7": "fill_bottle", - "8": "fill_bucket", - "9": "pour_bucket", - "10": "use_tool", - "11": "interact", - "12": "retrieved", - "13": "dyed", - "14": "traded" - } - } - ] - } - ] - ], - "packet_network_settings": [ - "container", - [ - { - "name": "compression_threshold", - "type": "u16" - } - ] - ], - "packet_player_auth_input": [ - "container", - [ - { - "name": "pitch", - "type": "lf32" - }, - { - "name": "yaw", - "type": "lf32" - }, - { - "name": "position", - "type": "vec3f" - }, - { - "name": "move_vector", - "type": "vec2f" - }, - { - "name": "head_yaw", - "type": "lf32" - }, - { - "name": "input_data", - "type": "InputFlag" - }, - { - "name": "input_mode", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "0": "mouse", - "1": "touch", - "2": "game_pad", - "3": "motion_controller" - } - } - ] - }, - { - "name": "play_mode", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "0": "normal", - "1": "teaser", - "2": "screen", - "3": "viewer", - "4": "reality", - "5": "placement", - "6": "living_room", - "7": "exit_level", - "8": "exit_level_living_room", - "9": "num_modes" - } - } - ] - }, - { - "name": "gaze_direction", - "type": [ - "switch", - { - "compareTo": "play_mode", - "fields": { - "reality": "vec3f" - }, - "default": "void" - } - ] - }, - { - "name": "tick", - "type": "varint64" - }, - { - "name": "delta", - "type": "vec3f" - } - ] - ], - "packet_creative_content": [ - "container", - [ - { - "name": "items", - "type": "ItemStacks" - } - ] - ], - "packet_player_enchant_options": [ - "container", - [ - { - "name": "enchant_options", - "type": "EnchantOptions" - } - ] - ], - "packet_item_stack_request": [ - "container", - [ - { - "name": "requests", - "type": "ItemStackRequests" - } - ] - ], - "packet_item_stack_response": [ - "container", - [ - { - "name": "responses", - "type": "ItemStackResponses" - } - ] - ], - "packet_player_armor_damage": [ - "container", - [ - { - "name": "type", - "type": "ArmorDamageType" - }, - { - "name": "helmet_damage", - "type": [ - "switch", - { - "compareTo": "type.head", - "fields": { - "true": "zigzag32" - }, - "default": "void" - } - ] - }, - { - "name": "chestplate_damage", - "type": [ - "switch", - { - "compareTo": "type.chest", - "fields": { - "true": "zigzag32" - }, - "default": "void" - } - ] - }, - { - "name": "leggings_damage", - "type": [ - "switch", - { - "compareTo": "type.legs", - "fields": { - "true": "zigzag32" - }, - "default": "void" - } - ] - }, - { - "name": "boots_damage", - "type": [ - "switch", - { - "compareTo": "types.feet", - "fields": { - "true": "zigzag32" - }, - "default": "void" - } - ] - } - ] - ], - "packet_update_player_game_type": [ - "container", - [ - { - "name": "gamemode", - "type": "GameMode" - }, - { - "name": "player_unique_id", - "type": "zigzag64" - } - ] - ], - "packet_position_tracking_db_request": [ - "container", - [ - { - "name": "action", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "0": "query" - } - } - ] - }, - { - "name": "tracking_id", - "type": "zigzag32" - } - ] - ], - "packet_position_tracking_db_broadcast": [ - "container", - [ - { - "name": "broadcast_action", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "0": "update", - "1": "destory", - "2": "not_found" - } - } - ] - }, - { - "name": "tracking_id", - "type": "zigzag32" - }, - { - "name": "nbt", - "type": "nbt" - } - ] - ], - "packet_packet_violation_warning": [ - "container", - [ - { - "name": "violation_type", - "type": [ - "mapper", - { - "type": "zigzag32", - "mappings": { - "0": "malformed" - } - } - ] - }, - { - "name": "severity", - "type": [ - "mapper", - { - "type": "zigzag32", - "mappings": { - "0": "warning", - "1": "final_warning", - "2": "terminating" - } - } - ] - }, - { - "name": "packet_id", - "type": "zigzag32" - }, - { - "name": "reason", - "type": "string" - } - ] - ], - "packet_motion_prediction_hints": [ - "container", - [ - { - "name": "entity_runtime_id", - "type": "varint64" - }, - { - "name": "velocity", - "type": "vec3f" - }, - { - "name": "on_ground", - "type": "bool" - } - ] - ], - "packet_animate_entity": [ - "container", - [ - { - "name": "animation", - "type": "string" - }, - { - "name": "next_state", - "type": "string" - }, - { - "name": "stop_condition", - "type": "string" - }, - { - "name": "controller", - "type": "string" - }, - { - "name": "blend_out_time", - "type": "lf32" - }, - { - "name": "runtime_entity_ids", - "type": [ - "array", - { - "countType": "varint", - "type": "varint64" - } - ] - } - ] - ], - "packet_camera_shake": [ - "container", - [ - { - "name": "intensity", - "type": "lf32" - }, - { - "name": "duration", - "type": "lf32" - }, - { - "name": "type", - "type": "u8" - } - ] - ], - "packet_player_fog": [ - "container", - [ - { - "name": "stack", - "type": [ - "array", - { - "countType": "varint", - "type": "string" - } - ] - } - ] - ], - "packet_correct_player_move_prediction": [ - "container", - [ - { - "name": "position", - "type": "vec3f" - }, - { - "name": "delta", - "type": "vec3f" - }, - { - "name": "on_ground", - "type": "bool" - }, - { - "name": "tick", - "type": "varint64" - } - ] - ], - "packet_item_component": [ - "container", - [ - { - "name": "entries", - "type": "ItemComponentList" - } - ] - ], - "packet_filter_text_packet": [ - "container", - [ - { - "name": "text", - "type": "string" - }, - { - "name": "from_server", - "type": "bool" - } - ] - ], - "string": [ - "pstring", - { - "countType": "varint" - } - ], - "ByteArray": [ - "buffer", - { - "countType": "varint" - } - ], - "SignedByteArray": [ - "buffer", - { - "countType": "zigzag32" - } - ], - "LittleString": [ - "pstring", - { - "countType": "li32" - } - ], - "AdventureFlags": [ - "bitflags", - { - "type": "varint", - "flags": { - "world_immutable": 1, - "no_pvp": 2, - "auto_jump": 32, - "allow_flight": 64, - "no_clip": 128, - "world_builder": 256, - "flying": 512, - "muted": 1024 - } - } - ], - "ActionPermissions": [ - "bitflags", - { - "type": "varint", - "flags": { - "build_and_mine": 65537, - "doors_and_switches": 65538, - "open_containers": 65540, - "attack_players": 65544, - "attack_mobs": 65552, - "operator": 65568, - "teleport": 65664 - } - } - ], - "CommandFlags": [ - "bitfield", - [ - { - "name": "unused", - "size": 6, - "signed": false - }, - { - "name": "has_semantic_constraint", - "size": 1, - "signed": false - }, - { - "name": "collapse_enum", - "size": 1, - "signed": false - } - ] - ], - "DeltaMoveFlags": [ - "bitflags", - { - "type": "lu16", - "flags": { - "has_x": 1, - "has_y": 2, - "has_z": 4, - "has_rot_x": 8, - "has_rot_y": 16, - "has_rot_z": 32, - "on_ground": 64, - "teleport": 128, - "force_move": 256 - } - } - ], - "InputFlag": [ - "bitflags", - { - "type": "varint", - "flags": { - "ascend": 1, - "descend": 2, - "north_jump": 4, - "jump_down": 8, - "sprint_down": 16, - "change_height": 32, - "jumping": 64, - "auto_jumping_in_water": 128, - "sneaking": 256, - "sneak_down": 512, - "up": 1024, - "down": 2048, - "left": 4096, - "right": 8192, - "up_left": 16384, - "up_right": 32768, - "want_up": 65536, - "want_down": 131072, - "want_down_slow": 262144, - "want_up_slow": 524288, - "sprinting": 1048576, - "ascend_scaffolding": 2097152, - "descend_scaffolding": 4194304, - "sneak_toggle_down": 8388608, - "persist_sneak": 16777216 - } - } - ], - "ArmorDamageType": [ - "bitflags", - { - "type": "u8", - "flags": { - "head": 1, - "chest": 2, - "legs": 4, - "feet": 8 - } - } - ] - } -} \ No newline at end of file diff --git a/data/1.16.201/steve.json b/data/1.16.201/steve.json deleted file mode 100644 index 8b66dc7..0000000 --- a/data/1.16.201/steve.json +++ /dev/null @@ -1,120 +0,0 @@ -{ - "AnimatedImageData": [ - { - "AnimationExpression": 1, - "Frames": 2, - "Image": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcEAH/HBAB/xAHAP8cEAH/HBAB/xAHAP8QBwD/CgQA/3NBNP9zQTT/c0E0/3NBNP9zQTT/c0E0/3NBNP9zQTT/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwQAf8QBwD/HxME/x8TBP8cEAH/EAcA/xAHAP8QBwD/c0E0/1QyKf9qPDH/VDIp/2o8Mf9qPDH/ckAz/3NBNP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHBAB/x8TBP8fEwT/FAoA/xwQAf8QBwD/EAcA/xAHAP9zQTT/VDIp/zgjHv84Ix7/OCMe/zgjHv9UMin/c0E0/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQBwD/HxME/xwQAf8QBwD/HBAB/xwQAf8fEwT/HBAB/3NBNP9UMin/OCMe/zgjHv84Ix7/OCMe/1QyKf9zQTT/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwQAf8fEwT/HBAB/xQKAP8UCgD/HxME/x8TBP8cEAH/c0E0/1QyKf84Ix7/OCMe/zgjHv84Ix7/VDIp/3NBNP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHBAB/xwQAf8UCgD/FAoA/x8TBP8fEwT/HxME/xwQAf9zQTT/VDIp/zgjHv84Ix7/OCMe/zgjHv9MLSX/c0E0/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcEAH/FAoA/x8TBP8cEAH/FAoA/woEAP8fEwT/HBAB/3NBNP9UMin/VDIp/1QyKf9UMin/VDIp/1QyKf9zQTT/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwQAf8cEAH/FAoA/xQKAP8UCgD/FAoA/xwQAf8cEAH/c0E0/3NBNP9zQTT/c0E0/3NBNP9zQTT/c0E0/3NBNP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQKAP8UCgD/FAoA/xQKAP8cEAH/KBkK/x8TBP8fEwT/IRQF/xwQAf8fEwT/FAoA/xAHAP8UCgD/HBAB/xwQAf8fEwT/HxME/ygZCv8cEAH/FAoA/xQKAP8ZDgD/GQ4A/xwQAf8cEAH/EAcA/xwQAf8cEAH/EAcA/xAHAP8KBAD/FAoA/xQKAP8UCgD/FAoA/x8TBP8cEAH/HxME/ygZCv8cEAH/HBAB/xwQAf8hFAX/Lh8P/y4fD/8fEwT/HBAB/ygZCv8cEAH/FAoA/x8TBP8UCgD/FAoA/xkOAP8ZDgD/HBAB/xAHAP8fEwT/HxME/xwQAf8QBwD/EAcA/xAHAP8fEwT/CgQA/xQKAP8cEAH/HxME/xwQAf8UCgD/HBAB/xwQAf+wcFf/snti/7WGbf+ye2L/tIJp/61sU/8oGQr/HBAB/xAHAP8UCgD/HBAB/xQKAP8UCgD/EAcA/x8TBP8cEAH/HxME/x8TBP8UCgD/HBAB/xAHAP8QBwD/EAcA/xkOAP8ZDgD/HxME/x8TBP8ZDgD/GQ4A/x8TBP8fEwT/sHBX/7N9ZP+wcFf/snti/61sU/+ye2L/qmZM/6pmTP8fEwT/HxME/xQKAP8UCgD/HxME/x8TBP8UCgD/FAoA/xAHAP8fEwT/HBAB/xAHAP8cEAH/HBAB/x8TBP8cEAH/GQ4A/xkOAP8ZDgD/GQ4A/woEAP+MTTv/q2ZP/yEUBf+zfWT/9/fr/1I9if+wcFf/snti/1I9if/39+v/sHBX/yEUBf+rZk//lVA9/xAHAP8UCgD/FAoA/xQKAP8UCgD/HBAB/x8TBP8cEAH/FAoA/xQKAP8fEwT/HxME/xwQAf8ZDgD/GQ4A/xkOAP8KBAD/HREC/39CNP+MTTv/iUc2/5VTQP+oZk//snti/4JHOP+CRzj/snti/6tmT/96QzX/iUg3/5VQPf96QzX/HREC/xkOAP8UCgD/FAoA/xQKAP8cEAH/HBAB/xQKAP8UCgD/HxME/x8TBP8fEwT/HBAB/yEUBf8ZDgD/IRQF/7N9ZP+rZk//lU07/39CNP+AQzT/i0o5/5VTQP92QjX/dkI1/3ZCNf92QjX/iUg3/3pDNf9zQTT/ekM1/4ZJOf+hV0P/sHBX/xQKAP8UCgD/HxME/xwQAf8UCgD/HxME/xwQAf8UCgD/CgQA/x8TBP8cEAH/f0I0/39CNP+hV0P/f0I0/5VNO/+MTTv/f0I0/4BDNP+AQzT/gEM0/49OPP+PTjz/gUY3/4tKOf+LSjn/dUI1/3NBNP9/QjT/oVdD/6FXQ/+nYEr/oVdD/6dgSv9/QjT/f0I0/3NBNP8UCgD/FAoA/xQKAP8UCgD/c0E0/39CNP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHBAB/xwQAf8QBwD/HBAB/xwQAf8QBwD/EAcA/woEAP9zQTT/c0E0/3NBNP9zQTT/c0E0/3NBNP9zQTT/c0E0/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcEAH/EAcA/x8TBP8fEwT/HBAB/xAHAP8QBwD/EAcA/3NBNP9UMin/ajwx/1QyKf9qPDH/ajwx/3JAM/9zQTT/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwQAf8fEwT/HxME/xQKAP8cEAH/EAcA/xAHAP8QBwD/c0E0/1QyKf84Ix7/OCMe/zgjHv84Ix7/VDIp/3NBNP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAcA/x8TBP8cEAH/EAcA/xwQAf8cEAH/HxME/xwQAf9zQTT/VDIp/zgjHv84Ix7/OCMe/zgjHv9UMin/c0E0/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcEAH/HxME/xwQAf8UCgD/FAoA/x8TBP8fEwT/HBAB/3NBNP9UMin/OCMe/zgjHv84Ix7/OCMe/1QyKf9zQTT/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwQAf8cEAH/FAoA/xQKAP8fEwT/HxME/x8TBP8cEAH/c0E0/1QyKf84Ix7/OCMe/zgjHv84Ix7/TC0l/3NBNP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHBAB/xQKAP8fEwT/HBAB/xQKAP8KBAD/HxME/xwQAf9zQTT/VDIp/1QyKf9UMin/VDIp/1QyKf9UMin/c0E0/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcEAH/HBAB/xQKAP8UCgD/FAoA/xQKAP8cEAH/HBAB/3NBNP9zQTT/c0E0/3NBNP9zQTT/c0E0/3NBNP9zQTT/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUCgD/FAoA/xQKAP8UCgD/HBAB/ygZCv8fEwT/HxME/yEUBf8cEAH/HxME/xQKAP8QBwD/FAoA/xwQAf8cEAH/HxME/x8TBP8oGQr/HBAB/xQKAP8UCgD/GQ4A/xkOAP8cEAH/HBAB/xAHAP8cEAH/HBAB/xAHAP8QBwD/CgQA/xQKAP8UCgD/FAoA/xQKAP8fEwT/HBAB/x8TBP8oGQr/HBAB/xwQAf8cEAH/IRQF/y4fD/8uHw//HxME/xwQAf8oGQr/HBAB/xQKAP8fEwT/FAoA/xQKAP8ZDgD/GQ4A/xwQAf8QBwD/HxME/x8TBP8cEAH/EAcA/xAHAP8QBwD/HxME/woEAP8UCgD/HBAB/x8TBP8cEAH/FAoA/xwQAf8cEAH/sHBX/7J7Yv+1hm3/snti/7SCaf+tbFP/KBkK/xwQAf8QBwD/FAoA/xwQAf8UCgD/FAoA/xAHAP8fEwT/HBAB/x8TBP8fEwT/FAoA/xwQAf8QBwD/EAcA/xAHAP8ZDgD/GQ4A/x8TBP8fEwT/GQ4A/xkOAP8fEwT/HxME/7BwV/+zfWT/sHBX/7J7Yv+tbFP/snti/6pmTP+qZkz/HxME/x8TBP8UCgD/FAoA/x8TBP8fEwT/FAoA/xQKAP8QBwD/HxME/xwQAf8QBwD/HBAB/xwQAf8fEwT/HBAB/xkOAP8ZDgD/GQ4A/xkOAP8KBAD/jE07/6tmT/8hFAX/s31k/69sUv+vbFL/sHBX/7J7Yv+vbFL/r2xS/7BwV/8hFAX/q2ZP/5VQPf8QBwD/FAoA/xQKAP8UCgD/FAoA/xwQAf8fEwT/HBAB/xQKAP8UCgD/HxME/x8TBP8cEAH/GQ4A/xkOAP8ZDgD/CgQA/x0RAv9/QjT/jE07/4lHNv+VU0D/qGZP/7J7Yv+CRzj/gkc4/7J7Yv+rZk//ekM1/4lIN/+VUD3/ekM1/x0RAv8ZDgD/FAoA/xQKAP8UCgD/HBAB/xwQAf8UCgD/FAoA/x8TBP8fEwT/HxME/xwQAf8hFAX/GQ4A/yEUBf+zfWT/q2ZP/5VNO/9/QjT/gEM0/4tKOf+VU0D/dkI1/3ZCNf92QjX/dkI1/4lIN/96QzX/c0E0/3pDNf+GSTn/oVdD/7BwV/8UCgD/FAoA/x8TBP8cEAH/FAoA/x8TBP8cEAH/FAoA/woEAP8fEwT/HBAB/39CNP9/QjT/oVdD/39CNP+VTTv/jE07/39CNP+AQzT/gEM0/4BDNP+PTjz/j048/4FGN/+LSjn/i0o5/3VCNf9zQTT/f0I0/6FXQ/+hV0P/p2BK/6FXQ/+nYEr/f0I0/39CNP9zQTT/FAoA/xQKAP8UCgD/FAoA/3NBNP9/QjT/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", - "ImageHeight": 64, - "ImageWidth": 32, - "Type": 1 - } - ], - "ArmSize": "wide", - "CapeData": "", - "CapeId": "", - "CapeImageHeight": 0, - "CapeImageWidth": 0, - "CapeOnClassicSkin": false, - "PersonaPieces": [ - { - "IsDefault": true, - "PackId": "2099de18-429a-465a-a49b-fc4710a17bb3", - "PieceId": "8f96d1f8-e9bb-40d2-acc8-eb79746c5d7c", - "PieceType": "persona_skeleton", - "ProductId": "" - }, - { - "IsDefault": true, - "PackId": "2099de18-429a-465a-a49b-fc4710a17bb3", - "PieceId": "1042557f-d1f9-44e3-ba78-f404e8fb7363", - "PieceType": "persona_body", - "ProductId": "" - }, - { - "IsDefault": true, - "PackId": "2099de18-429a-465a-a49b-fc4710a17bb3", - "PieceId": "f1e4c577-19ba-4d77-9222-47f145857f78", - "PieceType": "persona_skin", - "ProductId": "" - }, - { - "IsDefault": true, - "PackId": "2099de18-429a-465a-a49b-fc4710a17bb3", - "PieceId": "49f93789-a512-4c47-95cb-0606cdc1c2be", - "PieceType": "persona_bottom", - "ProductId": "" - }, - { - "IsDefault": true, - "PackId": "2099de18-429a-465a-a49b-fc4710a17bb3", - "PieceId": "68bfe60d-f30a-422f-b32c-72374ebdd057", - "PieceType": "persona_feet", - "ProductId": "" - }, - { - "IsDefault": true, - "PackId": "2099de18-429a-465a-a49b-fc4710a17bb3", - "PieceId": "b6702f0e-a4b5-497a-8820-6c8e3946bb55", - "PieceType": "persona_top", - "ProductId": "" - }, - { - "IsDefault": true, - "PackId": "2099de18-429a-465a-a49b-fc4710a17bb3", - "PieceId": "52dd0726-cd68-4d7d-8561-515a4866de39", - "PieceType": "persona_mouth", - "ProductId": "" - }, - { - "IsDefault": true, - "PackId": "2099de18-429a-465a-a49b-fc4710a17bb3", - "PieceId": "a0f263b3-e093-4c85-aadb-3759417898ff", - "PieceType": "persona_eyes", - "ProductId": "" - }, - { - "IsDefault": true, - "PackId": "2099de18-429a-465a-a49b-fc4710a17bb3", - "PieceId": "2bb1473b-9a5c-4eae-9fd5-82302a6aa3da", - "PieceType": "persona_hair", - "ProductId": "" - } - ], - "PersonaSkin": true, - "PieceTintColors": [ - { - "Colors": [ - "#2f1f0f", - "#0", - "#0", - "#0" - ], - "PieceType": "persona_hair" - }, - { - "Colors": [ - "#523d89", - "#0", - "#0", - "#0" - ], - "PieceType": "persona_eyes" - }, - { - "Colors": [ - "#0", - "#0", - "#774235", - "#0" - ], - "PieceType": "persona_mouth" - } - ], - "PremiumSkin": false, - "SkinAnimationData": "", - "SkinColor": "#b37b62", - "SkinId": "5eb65f73-af11-448e-82aa-1b7b165316ad.persona-3891382d5e3f67c4-0", - "SkinImageHeight": 256, - "SkinImageWidth": 256, - "SkinResourcePatch": "ewogICAiZ2VvbWV0cnkiIDogewogICAgICAiYW5pbWF0ZWRfZmFjZSIgOiAiZ2VvbWV0cnkuYW5pbWF0ZWRfZmFjZV9wZXJzb25hLTM4OTEzODJkNWUzZjY3YzQtMCIsCiAgICAgICJkZWZhdWx0IiA6ICJnZW9tZXRyeS5wZXJzb25hXzM4OTEzODJkNWUzZjY3YzQtMCIKICAgfQp9Cg==" -} \ No newline at end of file diff --git a/data/1.16.201/steveGeometry.json b/data/1.16.201/steveGeometry.json deleted file mode 100644 index fcc59f4..0000000 --- a/data/1.16.201/steveGeometry.json +++ /dev/null @@ -1,5147 +0,0 @@ -{ - "format_version": "1.14.0", - "minecraft:geometry": [ - { - "bones": [ - { - "name": "belt", - "parent": "body", - "pivot": [ - 0.0, - 24.0, - 0.0 - ] - }, - { - "locators": { - "armor_offset.default_neck": [ - 0.0, - 24.0, - 0.0 - ] - }, - "name": "body", - "parent": "waist", - "pivot": [ - 0.0, - 24.0, - 0.0 - ], - "poly_mesh": { - "normalized_uvs": true, - "normals": [ - [ - 0.0, - 1.0, - 0.0 - ], - [ - 0.0, - -1.0, - 0.0 - ], - [ - -1.0, - 0.0, - 0.0 - ], - [ - 1.0, - 0.0, - 0.0 - ], - [ - 0.0, - 0.0, - -1.0 - ], - [ - 0.0, - 0.0, - 1.0 - ] - ], - "polys": [ - [ - [ - 0, - 0, - 0 - ], - [ - 1, - 0, - 1 - ], - [ - 2, - 0, - 2 - ], - [ - 3, - 0, - 3 - ] - ], - [ - [ - 4, - 1, - 4 - ], - [ - 5, - 1, - 5 - ], - [ - 6, - 1, - 6 - ], - [ - 7, - 1, - 7 - ] - ], - [ - [ - 8, - 2, - 8 - ], - [ - 9, - 2, - 9 - ], - [ - 10, - 2, - 10 - ], - [ - 11, - 2, - 11 - ] - ], - [ - [ - 12, - 3, - 12 - ], - [ - 13, - 3, - 13 - ], - [ - 14, - 3, - 14 - ], - [ - 15, - 3, - 15 - ] - ], - [ - [ - 16, - 4, - 16 - ], - [ - 17, - 4, - 17 - ], - [ - 18, - 4, - 18 - ], - [ - 19, - 4, - 19 - ] - ], - [ - [ - 20, - 5, - 20 - ], - [ - 21, - 5, - 21 - ], - [ - 22, - 5, - 22 - ], - [ - 23, - 5, - 23 - ] - ] - ], - "positions": [ - [ - -4.0, - 24.0, - -2.0 - ], - [ - 4.0, - 24.0, - -2.0 - ], - [ - 4.0, - 24.0, - 2.0 - ], - [ - -4.0, - 24.0, - 2.0 - ], - [ - -4.0, - 12.0, - 2.0 - ], - [ - 4.0, - 12.0, - 2.0 - ], - [ - 4.0, - 12.0, - -2.0 - ], - [ - -4.0, - 12.0, - -2.0 - ], - [ - -4.0, - 12.0, - 2.0 - ], - [ - -4.0, - 12.0, - -2.0 - ], - [ - -4.0, - 24.0, - -2.0 - ], - [ - -4.0, - 24.0, - 2.0 - ], - [ - 4.0, - 12.0, - -2.0 - ], - [ - 4.0, - 12.0, - 2.0 - ], - [ - 4.0, - 24.0, - 2.0 - ], - [ - 4.0, - 24.0, - -2.0 - ], - [ - -4.0, - 12.0, - -2.0 - ], - [ - 4.0, - 12.0, - -2.0 - ], - [ - 4.0, - 24.0, - -2.0 - ], - [ - -4.0, - 24.0, - -2.0 - ], - [ - 4.0, - 12.0, - 2.0 - ], - [ - -4.0, - 12.0, - 2.0 - ], - [ - -4.0, - 24.0, - 2.0 - ], - [ - 4.0, - 24.0, - 2.0 - ] - ], - "uvs": [ - [ - 0.082031250, - 0.980468750 - ], - [ - 0.113281250, - 0.980468750 - ], - [ - 0.113281250, - 0.996093750 - ], - [ - 0.082031250, - 0.996093750 - ], - [ - 0.144531250, - 0.996093750 - ], - [ - 0.113281250, - 0.996093750 - ], - [ - 0.113281250, - 0.980468750 - ], - [ - 0.144531250, - 0.980468750 - ], - [ - 0.066406250, - 0.933593750 - ], - [ - 0.082031250, - 0.933593750 - ], - [ - 0.082031250, - 0.980468750 - ], - [ - 0.066406250, - 0.980468750 - ], - [ - 0.113281250, - 0.933593750 - ], - [ - 0.128906250, - 0.933593750 - ], - [ - 0.128906250, - 0.980468750 - ], - [ - 0.113281250, - 0.980468750 - ], - [ - 0.082031250, - 0.933593750 - ], - [ - 0.113281250, - 0.933593750 - ], - [ - 0.113281250, - 0.980468750 - ], - [ - 0.082031250, - 0.980468750 - ], - [ - 0.128906250, - 0.933593750 - ], - [ - 0.160156250, - 0.933593750 - ], - [ - 0.160156250, - 0.980468750 - ], - [ - 0.128906250, - 0.980468750 - ] - ] - } - }, - { - "name": "bodyarmor", - "parent": "body", - "pivot": [ - 0.0, - 24.0, - 0.0 - ] - }, - { - "name": "head", - "parent": "body", - "pivot": [ - 0.0, - 24.0, - 0.0 - ] - }, - { - "name": "helmet", - "parent": "head", - "pivot": [ - 0.0, - 24.0, - 0.0 - ] - }, - { - "name": "jacket", - "parent": "body", - "pivot": [ - 0.0, - 24.0, - 0.0 - ], - "poly_mesh": { - "normalized_uvs": true, - "normals": [ - [ - 0.0, - 1.0, - 0.0 - ], - [ - 0.0, - -1.0, - 0.0 - ], - [ - -1.0, - 0.0, - 0.0 - ], - [ - 1.0, - 0.0, - 0.0 - ], - [ - 0.0, - 0.0, - -1.0 - ], - [ - 0.0, - 0.0, - 1.0 - ] - ], - "polys": [ - [ - [ - 0, - 0, - 0 - ], - [ - 1, - 0, - 1 - ], - [ - 2, - 0, - 2 - ], - [ - 3, - 0, - 3 - ] - ], - [ - [ - 4, - 1, - 4 - ], - [ - 5, - 1, - 5 - ], - [ - 6, - 1, - 6 - ], - [ - 7, - 1, - 7 - ] - ], - [ - [ - 8, - 2, - 8 - ], - [ - 9, - 2, - 9 - ], - [ - 10, - 2, - 10 - ], - [ - 11, - 2, - 11 - ] - ], - [ - [ - 12, - 3, - 12 - ], - [ - 13, - 3, - 13 - ], - [ - 14, - 3, - 14 - ], - [ - 15, - 3, - 15 - ] - ], - [ - [ - 16, - 4, - 16 - ], - [ - 17, - 4, - 17 - ], - [ - 18, - 4, - 18 - ], - [ - 19, - 4, - 19 - ] - ], - [ - [ - 20, - 5, - 20 - ], - [ - 21, - 5, - 21 - ], - [ - 22, - 5, - 22 - ], - [ - 23, - 5, - 23 - ] - ] - ], - "positions": [ - [ - -4.250, - 24.250, - -2.250 - ], - [ - 4.250, - 24.250, - -2.250 - ], - [ - 4.250, - 24.250, - 2.250 - ], - [ - -4.250, - 24.250, - 2.250 - ], - [ - -4.250, - 11.750, - 2.250 - ], - [ - 4.250, - 11.750, - 2.250 - ], - [ - 4.250, - 11.750, - -2.250 - ], - [ - -4.250, - 11.750, - -2.250 - ], - [ - -4.250, - 11.750, - 2.250 - ], - [ - -4.250, - 11.750, - -2.250 - ], - [ - -4.250, - 24.250, - -2.250 - ], - [ - -4.250, - 24.250, - 2.250 - ], - [ - 4.250, - 11.750, - -2.250 - ], - [ - 4.250, - 11.750, - 2.250 - ], - [ - 4.250, - 24.250, - 2.250 - ], - [ - 4.250, - 24.250, - -2.250 - ], - [ - -4.250, - 11.750, - -2.250 - ], - [ - 4.250, - 11.750, - -2.250 - ], - [ - 4.250, - 24.250, - -2.250 - ], - [ - -4.250, - 24.250, - -2.250 - ], - [ - 4.250, - 11.750, - 2.250 - ], - [ - -4.250, - 11.750, - 2.250 - ], - [ - -4.250, - 24.250, - 2.250 - ], - [ - 4.250, - 24.250, - 2.250 - ] - ], - "uvs": [ - [ - 0.082031250, - 0.917968750 - ], - [ - 0.113281250, - 0.917968750 - ], - [ - 0.113281250, - 0.933593750 - ], - [ - 0.082031250, - 0.933593750 - ], - [ - 0.144531250, - 0.933593750 - ], - [ - 0.113281250, - 0.933593750 - ], - [ - 0.113281250, - 0.917968750 - ], - [ - 0.144531250, - 0.917968750 - ], - [ - 0.066406250, - 0.871093750 - ], - [ - 0.082031250, - 0.871093750 - ], - [ - 0.082031250, - 0.917968750 - ], - [ - 0.066406250, - 0.917968750 - ], - [ - 0.113281250, - 0.871093750 - ], - [ - 0.128906250, - 0.871093750 - ], - [ - 0.128906250, - 0.917968750 - ], - [ - 0.113281250, - 0.917968750 - ], - [ - 0.082031250, - 0.871093750 - ], - [ - 0.113281250, - 0.871093750 - ], - [ - 0.113281250, - 0.917968750 - ], - [ - 0.082031250, - 0.917968750 - ], - [ - 0.128906250, - 0.871093750 - ], - [ - 0.160156250, - 0.871093750 - ], - [ - 0.160156250, - 0.917968750 - ], - [ - 0.128906250, - 0.917968750 - ] - ] - } - }, - { - "name": "leftarm", - "parent": "body", - "pivot": [ - 5.0, - 22.0, - 0.0 - ], - "poly_mesh": { - "normalized_uvs": true, - "normals": [ - [ - 0.0, - 1.0, - 0.0 - ], - [ - 0.0, - -1.0, - 0.0 - ], - [ - -1.0, - 0.0, - 0.0 - ], - [ - 1.0, - 0.0, - 0.0 - ], - [ - 0.0, - 0.0, - -1.0 - ], - [ - 0.0, - 0.0, - 1.0 - ] - ], - "polys": [ - [ - [ - 0, - 0, - 0 - ], - [ - 1, - 0, - 1 - ], - [ - 2, - 0, - 2 - ], - [ - 3, - 0, - 3 - ] - ], - [ - [ - 4, - 1, - 4 - ], - [ - 5, - 1, - 5 - ], - [ - 6, - 1, - 6 - ], - [ - 7, - 1, - 7 - ] - ], - [ - [ - 8, - 2, - 8 - ], - [ - 9, - 2, - 9 - ], - [ - 10, - 2, - 10 - ], - [ - 11, - 2, - 11 - ] - ], - [ - [ - 12, - 3, - 12 - ], - [ - 13, - 3, - 13 - ], - [ - 14, - 3, - 14 - ], - [ - 15, - 3, - 15 - ] - ], - [ - [ - 16, - 4, - 16 - ], - [ - 17, - 4, - 17 - ], - [ - 18, - 4, - 18 - ], - [ - 19, - 4, - 19 - ] - ], - [ - [ - 20, - 5, - 20 - ], - [ - 21, - 5, - 21 - ], - [ - 22, - 5, - 22 - ], - [ - 23, - 5, - 23 - ] - ] - ], - "positions": [ - [ - 4.0, - 24.0, - -2.0 - ], - [ - 8.0, - 24.0, - -2.0 - ], - [ - 8.0, - 24.0, - 2.0 - ], - [ - 4.0, - 24.0, - 2.0 - ], - [ - 4.0, - 12.0, - 2.0 - ], - [ - 8.0, - 12.0, - 2.0 - ], - [ - 8.0, - 12.0, - -2.0 - ], - [ - 4.0, - 12.0, - -2.0 - ], - [ - 4.0, - 12.0, - 2.0 - ], - [ - 4.0, - 12.0, - -2.0 - ], - [ - 4.0, - 24.0, - -2.0 - ], - [ - 4.0, - 24.0, - 2.0 - ], - [ - 8.0, - 12.0, - -2.0 - ], - [ - 8.0, - 12.0, - 2.0 - ], - [ - 8.0, - 24.0, - 2.0 - ], - [ - 8.0, - 24.0, - -2.0 - ], - [ - 4.0, - 12.0, - -2.0 - ], - [ - 8.0, - 12.0, - -2.0 - ], - [ - 8.0, - 24.0, - -2.0 - ], - [ - 4.0, - 24.0, - -2.0 - ], - [ - 8.0, - 12.0, - 2.0 - ], - [ - 4.0, - 12.0, - 2.0 - ], - [ - 4.0, - 24.0, - 2.0 - ], - [ - 8.0, - 24.0, - 2.0 - ] - ], - "uvs": [ - [ - 0.175781250, - 0.980468750 - ], - [ - 0.191406250, - 0.980468750 - ], - [ - 0.191406250, - 0.996093750 - ], - [ - 0.175781250, - 0.996093750 - ], - [ - 0.207031250, - 0.996093750 - ], - [ - 0.191406250, - 0.996093750 - ], - [ - 0.191406250, - 0.980468750 - ], - [ - 0.207031250, - 0.980468750 - ], - [ - 0.160156250, - 0.933593750 - ], - [ - 0.175781250, - 0.933593750 - ], - [ - 0.175781250, - 0.980468750 - ], - [ - 0.160156250, - 0.980468750 - ], - [ - 0.191406250, - 0.933593750 - ], - [ - 0.207031250, - 0.933593750 - ], - [ - 0.207031250, - 0.980468750 - ], - [ - 0.191406250, - 0.980468750 - ], - [ - 0.175781250, - 0.933593750 - ], - [ - 0.191406250, - 0.933593750 - ], - [ - 0.191406250, - 0.980468750 - ], - [ - 0.175781250, - 0.980468750 - ], - [ - 0.207031250, - 0.933593750 - ], - [ - 0.222656250, - 0.933593750 - ], - [ - 0.222656250, - 0.980468750 - ], - [ - 0.207031250, - 0.980468750 - ] - ] - } - }, - { - "mirror": true, - "name": "leftarmarmor", - "parent": "leftarm", - "pivot": [ - 5.0, - 22.0, - 0.0 - ] - }, - { - "mirror": true, - "name": "leftboot", - "parent": "leftleg", - "pivot": [ - 1.899999976158142, - 12.0, - 0.0 - ] - }, - { - "name": "leftitem", - "parent": "leftarm", - "pivot": [ - 6.0, - 15.0, - 0.0 - ] - }, - { - "name": "leftleg", - "parent": "root", - "pivot": [ - 1.899999976158142, - 12.0, - 0.0 - ], - "poly_mesh": { - "normalized_uvs": true, - "normals": [ - [ - 0.0, - 1.0, - 0.0 - ], - [ - 0.0, - -1.0, - 0.0 - ], - [ - -1.0, - 0.0, - 0.0 - ], - [ - 1.0, - 0.0, - 0.0 - ], - [ - 0.0, - 0.0, - -1.0 - ], - [ - 0.0, - 0.0, - 1.0 - ] - ], - "polys": [ - [ - [ - 0, - 0, - 0 - ], - [ - 1, - 0, - 1 - ], - [ - 2, - 0, - 2 - ], - [ - 3, - 0, - 3 - ] - ], - [ - [ - 4, - 1, - 4 - ], - [ - 5, - 1, - 5 - ], - [ - 6, - 1, - 6 - ], - [ - 7, - 1, - 7 - ] - ], - [ - [ - 8, - 2, - 8 - ], - [ - 9, - 2, - 9 - ], - [ - 10, - 2, - 10 - ], - [ - 11, - 2, - 11 - ] - ], - [ - [ - 12, - 3, - 12 - ], - [ - 13, - 3, - 13 - ], - [ - 14, - 3, - 14 - ], - [ - 15, - 3, - 15 - ] - ], - [ - [ - 16, - 4, - 16 - ], - [ - 17, - 4, - 17 - ], - [ - 18, - 4, - 18 - ], - [ - 19, - 4, - 19 - ] - ], - [ - [ - 20, - 5, - 20 - ], - [ - 21, - 5, - 21 - ], - [ - 22, - 5, - 22 - ], - [ - 23, - 5, - 23 - ] - ] - ], - "positions": [ - [ - -0.1000000014901161, - 12.0, - -2.0 - ], - [ - 3.900000095367432, - 12.0, - -2.0 - ], - [ - 3.900000095367432, - 12.0, - 2.0 - ], - [ - -0.1000000014901161, - 12.0, - 2.0 - ], - [ - -0.1000000014901161, - 0.0, - 2.0 - ], - [ - 3.900000095367432, - 0.0, - 2.0 - ], - [ - 3.900000095367432, - 0.0, - -2.0 - ], - [ - -0.1000000014901161, - 0.0, - -2.0 - ], - [ - -0.1000000014901161, - 0.0, - 2.0 - ], - [ - -0.1000000014901161, - 0.0, - -2.0 - ], - [ - -0.1000000014901161, - 12.0, - -2.0 - ], - [ - -0.1000000014901161, - 12.0, - 2.0 - ], - [ - 3.900000095367432, - 0.0, - -2.0 - ], - [ - 3.900000095367432, - 0.0, - 2.0 - ], - [ - 3.900000095367432, - 12.0, - 2.0 - ], - [ - 3.900000095367432, - 12.0, - -2.0 - ], - [ - -0.1000000014901161, - 0.0, - -2.0 - ], - [ - 3.900000095367432, - 0.0, - -2.0 - ], - [ - 3.900000095367432, - 12.0, - -2.0 - ], - [ - -0.1000000014901161, - 12.0, - -2.0 - ], - [ - 3.900000095367432, - 0.0, - 2.0 - ], - [ - -0.1000000014901161, - 0.0, - 2.0 - ], - [ - -0.1000000014901161, - 12.0, - 2.0 - ], - [ - 3.900000095367432, - 12.0, - 2.0 - ] - ], - "uvs": [ - [ - 0.144531250, - 0.855468750 - ], - [ - 0.160156250, - 0.855468750 - ], - [ - 0.160156250, - 0.871093750 - ], - [ - 0.144531250, - 0.871093750 - ], - [ - 0.175781250, - 0.871093750 - ], - [ - 0.160156250, - 0.871093750 - ], - [ - 0.160156250, - 0.855468750 - ], - [ - 0.175781250, - 0.855468750 - ], - [ - 0.128906250, - 0.808593750 - ], - [ - 0.144531250, - 0.808593750 - ], - [ - 0.144531250, - 0.855468750 - ], - [ - 0.128906250, - 0.855468750 - ], - [ - 0.160156250, - 0.808593750 - ], - [ - 0.175781250, - 0.808593750 - ], - [ - 0.175781250, - 0.855468750 - ], - [ - 0.160156250, - 0.855468750 - ], - [ - 0.144531250, - 0.808593750 - ], - [ - 0.160156250, - 0.808593750 - ], - [ - 0.160156250, - 0.855468750 - ], - [ - 0.144531250, - 0.855468750 - ], - [ - 0.175781250, - 0.808593750 - ], - [ - 0.191406250, - 0.808593750 - ], - [ - 0.191406250, - 0.855468750 - ], - [ - 0.175781250, - 0.855468750 - ] - ] - } - }, - { - "mirror": true, - "name": "leftlegging", - "parent": "leftleg", - "pivot": [ - 1.899999976158142, - 12.0, - 0.0 - ] - }, - { - "name": "leftpants", - "parent": "leftleg", - "pivot": [ - 1.899999976158142, - 12.0, - 0.0 - ], - "poly_mesh": { - "normalized_uvs": true, - "normals": [ - [ - 0.0, - 1.0, - 0.0 - ], - [ - 0.0, - -1.0, - 0.0 - ], - [ - -1.0, - 0.0, - 0.0 - ], - [ - 1.0, - 0.0, - 0.0 - ], - [ - 0.0, - 0.0, - -1.0 - ], - [ - 0.0, - 0.0, - 1.0 - ] - ], - "polys": [ - [ - [ - 0, - 0, - 0 - ], - [ - 1, - 0, - 1 - ], - [ - 2, - 0, - 2 - ], - [ - 3, - 0, - 3 - ] - ], - [ - [ - 4, - 1, - 4 - ], - [ - 5, - 1, - 5 - ], - [ - 6, - 1, - 6 - ], - [ - 7, - 1, - 7 - ] - ], - [ - [ - 8, - 2, - 8 - ], - [ - 9, - 2, - 9 - ], - [ - 10, - 2, - 10 - ], - [ - 11, - 2, - 11 - ] - ], - [ - [ - 12, - 3, - 12 - ], - [ - 13, - 3, - 13 - ], - [ - 14, - 3, - 14 - ], - [ - 15, - 3, - 15 - ] - ], - [ - [ - 16, - 4, - 16 - ], - [ - 17, - 4, - 17 - ], - [ - 18, - 4, - 18 - ], - [ - 19, - 4, - 19 - ] - ], - [ - [ - 20, - 5, - 20 - ], - [ - 21, - 5, - 21 - ], - [ - 22, - 5, - 22 - ], - [ - 23, - 5, - 23 - ] - ] - ], - "positions": [ - [ - -0.3499999940395355, - 12.250, - -2.250 - ], - [ - 4.150000095367432, - 12.250, - -2.250 - ], - [ - 4.150000095367432, - 12.250, - 2.250 - ], - [ - -0.3499999940395355, - 12.250, - 2.250 - ], - [ - -0.3499999940395355, - -0.250, - 2.250 - ], - [ - 4.150000095367432, - -0.250, - 2.250 - ], - [ - 4.150000095367432, - -0.250, - -2.250 - ], - [ - -0.3499999940395355, - -0.250, - -2.250 - ], - [ - -0.3499999940395355, - -0.250, - 2.250 - ], - [ - -0.3499999940395355, - -0.250, - -2.250 - ], - [ - -0.3499999940395355, - 12.250, - -2.250 - ], - [ - -0.3499999940395355, - 12.250, - 2.250 - ], - [ - 4.150000095367432, - -0.250, - -2.250 - ], - [ - 4.150000095367432, - -0.250, - 2.250 - ], - [ - 4.150000095367432, - 12.250, - 2.250 - ], - [ - 4.150000095367432, - 12.250, - -2.250 - ], - [ - -0.3499999940395355, - -0.250, - -2.250 - ], - [ - 4.150000095367432, - -0.250, - -2.250 - ], - [ - 4.150000095367432, - 12.250, - -2.250 - ], - [ - -0.3499999940395355, - 12.250, - -2.250 - ], - [ - 4.150000095367432, - -0.250, - 2.250 - ], - [ - -0.3499999940395355, - -0.250, - 2.250 - ], - [ - -0.3499999940395355, - 12.250, - 2.250 - ], - [ - 4.150000095367432, - 12.250, - 2.250 - ] - ], - "uvs": [ - [ - 0.207031250, - 0.855468750 - ], - [ - 0.222656250, - 0.855468750 - ], - [ - 0.222656250, - 0.871093750 - ], - [ - 0.207031250, - 0.871093750 - ], - [ - 0.238281250, - 0.871093750 - ], - [ - 0.222656250, - 0.871093750 - ], - [ - 0.222656250, - 0.855468750 - ], - [ - 0.238281250, - 0.855468750 - ], - [ - 0.191406250, - 0.808593750 - ], - [ - 0.207031250, - 0.808593750 - ], - [ - 0.207031250, - 0.855468750 - ], - [ - 0.191406250, - 0.855468750 - ], - [ - 0.222656250, - 0.808593750 - ], - [ - 0.238281250, - 0.808593750 - ], - [ - 0.238281250, - 0.855468750 - ], - [ - 0.222656250, - 0.855468750 - ], - [ - 0.207031250, - 0.808593750 - ], - [ - 0.222656250, - 0.808593750 - ], - [ - 0.222656250, - 0.855468750 - ], - [ - 0.207031250, - 0.855468750 - ], - [ - 0.238281250, - 0.808593750 - ], - [ - 0.253906250, - 0.808593750 - ], - [ - 0.253906250, - 0.855468750 - ], - [ - 0.238281250, - 0.855468750 - ] - ] - } - }, - { - "name": "leftsleeve", - "parent": "leftarm", - "pivot": [ - 5.0, - 22.0, - 0.0 - ], - "poly_mesh": { - "normalized_uvs": true, - "normals": [ - [ - 0.0, - 1.0, - 0.0 - ], - [ - 0.0, - -1.0, - 0.0 - ], - [ - -1.0, - 0.0, - 0.0 - ], - [ - 1.0, - 0.0, - 0.0 - ], - [ - 0.0, - 0.0, - -1.0 - ], - [ - 0.0, - 0.0, - 1.0 - ] - ], - "polys": [ - [ - [ - 0, - 0, - 0 - ], - [ - 1, - 0, - 1 - ], - [ - 2, - 0, - 2 - ], - [ - 3, - 0, - 3 - ] - ], - [ - [ - 4, - 1, - 4 - ], - [ - 5, - 1, - 5 - ], - [ - 6, - 1, - 6 - ], - [ - 7, - 1, - 7 - ] - ], - [ - [ - 8, - 2, - 8 - ], - [ - 9, - 2, - 9 - ], - [ - 10, - 2, - 10 - ], - [ - 11, - 2, - 11 - ] - ], - [ - [ - 12, - 3, - 12 - ], - [ - 13, - 3, - 13 - ], - [ - 14, - 3, - 14 - ], - [ - 15, - 3, - 15 - ] - ], - [ - [ - 16, - 4, - 16 - ], - [ - 17, - 4, - 17 - ], - [ - 18, - 4, - 18 - ], - [ - 19, - 4, - 19 - ] - ], - [ - [ - 20, - 5, - 20 - ], - [ - 21, - 5, - 21 - ], - [ - 22, - 5, - 22 - ], - [ - 23, - 5, - 23 - ] - ] - ], - "positions": [ - [ - 3.750, - 24.250, - -2.250 - ], - [ - 8.250, - 24.250, - -2.250 - ], - [ - 8.250, - 24.250, - 2.250 - ], - [ - 3.750, - 24.250, - 2.250 - ], - [ - 3.750, - 11.750, - 2.250 - ], - [ - 8.250, - 11.750, - 2.250 - ], - [ - 8.250, - 11.750, - -2.250 - ], - [ - 3.750, - 11.750, - -2.250 - ], - [ - 3.750, - 11.750, - 2.250 - ], - [ - 3.750, - 11.750, - -2.250 - ], - [ - 3.750, - 24.250, - -2.250 - ], - [ - 3.750, - 24.250, - 2.250 - ], - [ - 8.250, - 11.750, - -2.250 - ], - [ - 8.250, - 11.750, - 2.250 - ], - [ - 8.250, - 24.250, - 2.250 - ], - [ - 8.250, - 24.250, - -2.250 - ], - [ - 3.750, - 11.750, - -2.250 - ], - [ - 8.250, - 11.750, - -2.250 - ], - [ - 8.250, - 24.250, - -2.250 - ], - [ - 3.750, - 24.250, - -2.250 - ], - [ - 8.250, - 11.750, - 2.250 - ], - [ - 3.750, - 11.750, - 2.250 - ], - [ - 3.750, - 24.250, - 2.250 - ], - [ - 8.250, - 24.250, - 2.250 - ] - ], - "uvs": [ - [ - 0.175781250, - 0.917968750 - ], - [ - 0.191406250, - 0.917968750 - ], - [ - 0.191406250, - 0.933593750 - ], - [ - 0.175781250, - 0.933593750 - ], - [ - 0.207031250, - 0.933593750 - ], - [ - 0.191406250, - 0.933593750 - ], - [ - 0.191406250, - 0.917968750 - ], - [ - 0.207031250, - 0.917968750 - ], - [ - 0.160156250, - 0.871093750 - ], - [ - 0.175781250, - 0.871093750 - ], - [ - 0.175781250, - 0.917968750 - ], - [ - 0.160156250, - 0.917968750 - ], - [ - 0.191406250, - 0.871093750 - ], - [ - 0.207031250, - 0.871093750 - ], - [ - 0.207031250, - 0.917968750 - ], - [ - 0.191406250, - 0.917968750 - ], - [ - 0.175781250, - 0.871093750 - ], - [ - 0.191406250, - 0.871093750 - ], - [ - 0.191406250, - 0.917968750 - ], - [ - 0.175781250, - 0.917968750 - ], - [ - 0.207031250, - 0.871093750 - ], - [ - 0.222656250, - 0.871093750 - ], - [ - 0.222656250, - 0.917968750 - ], - [ - 0.207031250, - 0.917968750 - ] - ] - } - }, - { - "mirror": true, - "name": "leftsock", - "parent": "leftleg", - "pivot": [ - 1.899999976158142, - 12.0, - 0.0 - ] - }, - { - "name": "rightarm", - "parent": "body", - "pivot": [ - -5.0, - 22.0, - 0.0 - ], - "poly_mesh": { - "normalized_uvs": true, - "normals": [ - [ - 0.0, - 1.0, - 0.0 - ], - [ - 0.0, - -1.0, - 0.0 - ], - [ - -1.0, - 0.0, - 0.0 - ], - [ - 1.0, - 0.0, - 0.0 - ], - [ - 0.0, - 0.0, - -1.0 - ], - [ - 0.0, - 0.0, - 1.0 - ] - ], - "polys": [ - [ - [ - 0, - 0, - 0 - ], - [ - 1, - 0, - 1 - ], - [ - 2, - 0, - 2 - ], - [ - 3, - 0, - 3 - ] - ], - [ - [ - 4, - 1, - 4 - ], - [ - 5, - 1, - 5 - ], - [ - 6, - 1, - 6 - ], - [ - 7, - 1, - 7 - ] - ], - [ - [ - 8, - 2, - 8 - ], - [ - 9, - 2, - 9 - ], - [ - 10, - 2, - 10 - ], - [ - 11, - 2, - 11 - ] - ], - [ - [ - 12, - 3, - 12 - ], - [ - 13, - 3, - 13 - ], - [ - 14, - 3, - 14 - ], - [ - 15, - 3, - 15 - ] - ], - [ - [ - 16, - 4, - 16 - ], - [ - 17, - 4, - 17 - ], - [ - 18, - 4, - 18 - ], - [ - 19, - 4, - 19 - ] - ], - [ - [ - 20, - 5, - 20 - ], - [ - 21, - 5, - 21 - ], - [ - 22, - 5, - 22 - ], - [ - 23, - 5, - 23 - ] - ] - ], - "positions": [ - [ - -8.0, - 24.0, - -2.0 - ], - [ - -4.0, - 24.0, - -2.0 - ], - [ - -4.0, - 24.0, - 2.0 - ], - [ - -8.0, - 24.0, - 2.0 - ], - [ - -8.0, - 12.0, - 2.0 - ], - [ - -4.0, - 12.0, - 2.0 - ], - [ - -4.0, - 12.0, - -2.0 - ], - [ - -8.0, - 12.0, - -2.0 - ], - [ - -8.0, - 12.0, - 2.0 - ], - [ - -8.0, - 12.0, - -2.0 - ], - [ - -8.0, - 24.0, - -2.0 - ], - [ - -8.0, - 24.0, - 2.0 - ], - [ - -4.0, - 12.0, - -2.0 - ], - [ - -4.0, - 12.0, - 2.0 - ], - [ - -4.0, - 24.0, - 2.0 - ], - [ - -4.0, - 24.0, - -2.0 - ], - [ - -8.0, - 12.0, - -2.0 - ], - [ - -4.0, - 12.0, - -2.0 - ], - [ - -4.0, - 24.0, - -2.0 - ], - [ - -8.0, - 24.0, - -2.0 - ], - [ - -4.0, - 12.0, - 2.0 - ], - [ - -8.0, - 12.0, - 2.0 - ], - [ - -8.0, - 24.0, - 2.0 - ], - [ - -4.0, - 24.0, - 2.0 - ] - ], - "uvs": [ - [ - 0.019531250, - 0.980468750 - ], - [ - 0.035156250, - 0.980468750 - ], - [ - 0.035156250, - 0.996093750 - ], - [ - 0.019531250, - 0.996093750 - ], - [ - 0.050781250, - 0.996093750 - ], - [ - 0.035156250, - 0.996093750 - ], - [ - 0.035156250, - 0.980468750 - ], - [ - 0.050781250, - 0.980468750 - ], - [ - 0.003906250, - 0.933593750 - ], - [ - 0.019531250, - 0.933593750 - ], - [ - 0.019531250, - 0.980468750 - ], - [ - 0.003906250, - 0.980468750 - ], - [ - 0.035156250, - 0.933593750 - ], - [ - 0.050781250, - 0.933593750 - ], - [ - 0.050781250, - 0.980468750 - ], - [ - 0.035156250, - 0.980468750 - ], - [ - 0.019531250, - 0.933593750 - ], - [ - 0.035156250, - 0.933593750 - ], - [ - 0.035156250, - 0.980468750 - ], - [ - 0.019531250, - 0.980468750 - ], - [ - 0.050781250, - 0.933593750 - ], - [ - 0.066406250, - 0.933593750 - ], - [ - 0.066406250, - 0.980468750 - ], - [ - 0.050781250, - 0.980468750 - ] - ] - } - }, - { - "name": "rightarmarmor", - "parent": "rightarm", - "pivot": [ - -5.0, - 22.0, - 0.0 - ] - }, - { - "name": "rightboot", - "parent": "rightleg", - "pivot": [ - -1.899999976158142, - 12.0, - 0.0 - ] - }, - { - "locators": { - "lead_hold": [ - -6.0, - 15.0, - 0.0 - ] - }, - "name": "rightitem", - "parent": "rightarm", - "pivot": [ - -6.0, - 15.0, - 0.0 - ] - }, - { - "name": "rightleg", - "parent": "root", - "pivot": [ - -1.899999976158142, - 12.0, - 0.0 - ], - "poly_mesh": { - "normalized_uvs": true, - "normals": [ - [ - 0.0, - 1.0, - 0.0 - ], - [ - 0.0, - -1.0, - 0.0 - ], - [ - -1.0, - 0.0, - 0.0 - ], - [ - 1.0, - 0.0, - 0.0 - ], - [ - 0.0, - 0.0, - -1.0 - ], - [ - 0.0, - 0.0, - 1.0 - ] - ], - "polys": [ - [ - [ - 0, - 0, - 0 - ], - [ - 1, - 0, - 1 - ], - [ - 2, - 0, - 2 - ], - [ - 3, - 0, - 3 - ] - ], - [ - [ - 4, - 1, - 4 - ], - [ - 5, - 1, - 5 - ], - [ - 6, - 1, - 6 - ], - [ - 7, - 1, - 7 - ] - ], - [ - [ - 8, - 2, - 8 - ], - [ - 9, - 2, - 9 - ], - [ - 10, - 2, - 10 - ], - [ - 11, - 2, - 11 - ] - ], - [ - [ - 12, - 3, - 12 - ], - [ - 13, - 3, - 13 - ], - [ - 14, - 3, - 14 - ], - [ - 15, - 3, - 15 - ] - ], - [ - [ - 16, - 4, - 16 - ], - [ - 17, - 4, - 17 - ], - [ - 18, - 4, - 18 - ], - [ - 19, - 4, - 19 - ] - ], - [ - [ - 20, - 5, - 20 - ], - [ - 21, - 5, - 21 - ], - [ - 22, - 5, - 22 - ], - [ - 23, - 5, - 23 - ] - ] - ], - "positions": [ - [ - -3.900000095367432, - 12.0, - -2.0 - ], - [ - 0.09999989718198776, - 12.0, - -2.0 - ], - [ - 0.09999989718198776, - 12.0, - 2.0 - ], - [ - -3.900000095367432, - 12.0, - 2.0 - ], - [ - -3.900000095367432, - 0.0, - 2.0 - ], - [ - 0.09999989718198776, - 0.0, - 2.0 - ], - [ - 0.09999989718198776, - 0.0, - -2.0 - ], - [ - -3.900000095367432, - 0.0, - -2.0 - ], - [ - -3.900000095367432, - 0.0, - 2.0 - ], - [ - -3.900000095367432, - 0.0, - -2.0 - ], - [ - -3.900000095367432, - 12.0, - -2.0 - ], - [ - -3.900000095367432, - 12.0, - 2.0 - ], - [ - 0.09999989718198776, - 0.0, - -2.0 - ], - [ - 0.09999989718198776, - 0.0, - 2.0 - ], - [ - 0.09999989718198776, - 12.0, - 2.0 - ], - [ - 0.09999989718198776, - 12.0, - -2.0 - ], - [ - -3.900000095367432, - 0.0, - -2.0 - ], - [ - 0.09999989718198776, - 0.0, - -2.0 - ], - [ - 0.09999989718198776, - 12.0, - -2.0 - ], - [ - -3.900000095367432, - 12.0, - -2.0 - ], - [ - 0.09999989718198776, - 0.0, - 2.0 - ], - [ - -3.900000095367432, - 0.0, - 2.0 - ], - [ - -3.900000095367432, - 12.0, - 2.0 - ], - [ - 0.09999989718198776, - 12.0, - 2.0 - ] - ], - "uvs": [ - [ - 0.082031250, - 0.855468750 - ], - [ - 0.097656250, - 0.855468750 - ], - [ - 0.097656250, - 0.871093750 - ], - [ - 0.082031250, - 0.871093750 - ], - [ - 0.113281250, - 0.871093750 - ], - [ - 0.097656250, - 0.871093750 - ], - [ - 0.097656250, - 0.855468750 - ], - [ - 0.113281250, - 0.855468750 - ], - [ - 0.066406250, - 0.808593750 - ], - [ - 0.082031250, - 0.808593750 - ], - [ - 0.082031250, - 0.855468750 - ], - [ - 0.066406250, - 0.855468750 - ], - [ - 0.097656250, - 0.808593750 - ], - [ - 0.113281250, - 0.808593750 - ], - [ - 0.113281250, - 0.855468750 - ], - [ - 0.097656250, - 0.855468750 - ], - [ - 0.082031250, - 0.808593750 - ], - [ - 0.097656250, - 0.808593750 - ], - [ - 0.097656250, - 0.855468750 - ], - [ - 0.082031250, - 0.855468750 - ], - [ - 0.113281250, - 0.808593750 - ], - [ - 0.128906250, - 0.808593750 - ], - [ - 0.128906250, - 0.855468750 - ], - [ - 0.113281250, - 0.855468750 - ] - ] - } - }, - { - "name": "rightlegging", - "parent": "rightleg", - "pivot": [ - -1.899999976158142, - 12.0, - 0.0 - ] - }, - { - "name": "rightpants", - "parent": "rightleg", - "pivot": [ - -1.899999976158142, - 12.0, - 0.0 - ], - "poly_mesh": { - "normalized_uvs": true, - "normals": [ - [ - 0.0, - 1.0, - 0.0 - ], - [ - 0.0, - -1.0, - 0.0 - ], - [ - -1.0, - 0.0, - 0.0 - ], - [ - 1.0, - 0.0, - 0.0 - ], - [ - 0.0, - 0.0, - -1.0 - ], - [ - 0.0, - 0.0, - 1.0 - ] - ], - "polys": [ - [ - [ - 0, - 0, - 0 - ], - [ - 1, - 0, - 1 - ], - [ - 2, - 0, - 2 - ], - [ - 3, - 0, - 3 - ] - ], - [ - [ - 4, - 1, - 4 - ], - [ - 5, - 1, - 5 - ], - [ - 6, - 1, - 6 - ], - [ - 7, - 1, - 7 - ] - ], - [ - [ - 8, - 2, - 8 - ], - [ - 9, - 2, - 9 - ], - [ - 10, - 2, - 10 - ], - [ - 11, - 2, - 11 - ] - ], - [ - [ - 12, - 3, - 12 - ], - [ - 13, - 3, - 13 - ], - [ - 14, - 3, - 14 - ], - [ - 15, - 3, - 15 - ] - ], - [ - [ - 16, - 4, - 16 - ], - [ - 17, - 4, - 17 - ], - [ - 18, - 4, - 18 - ], - [ - 19, - 4, - 19 - ] - ], - [ - [ - 20, - 5, - 20 - ], - [ - 21, - 5, - 21 - ], - [ - 22, - 5, - 22 - ], - [ - 23, - 5, - 23 - ] - ] - ], - "positions": [ - [ - -4.150000095367432, - 12.250, - -2.250 - ], - [ - 0.3499999046325684, - 12.250, - -2.250 - ], - [ - 0.3499999046325684, - 12.250, - 2.250 - ], - [ - -4.150000095367432, - 12.250, - 2.250 - ], - [ - -4.150000095367432, - -0.250, - 2.250 - ], - [ - 0.3499999046325684, - -0.250, - 2.250 - ], - [ - 0.3499999046325684, - -0.250, - -2.250 - ], - [ - -4.150000095367432, - -0.250, - -2.250 - ], - [ - -4.150000095367432, - -0.250, - 2.250 - ], - [ - -4.150000095367432, - -0.250, - -2.250 - ], - [ - -4.150000095367432, - 12.250, - -2.250 - ], - [ - -4.150000095367432, - 12.250, - 2.250 - ], - [ - 0.3499999046325684, - -0.250, - -2.250 - ], - [ - 0.3499999046325684, - -0.250, - 2.250 - ], - [ - 0.3499999046325684, - 12.250, - 2.250 - ], - [ - 0.3499999046325684, - 12.250, - -2.250 - ], - [ - -4.150000095367432, - -0.250, - -2.250 - ], - [ - 0.3499999046325684, - -0.250, - -2.250 - ], - [ - 0.3499999046325684, - 12.250, - -2.250 - ], - [ - -4.150000095367432, - 12.250, - -2.250 - ], - [ - 0.3499999046325684, - -0.250, - 2.250 - ], - [ - -4.150000095367432, - -0.250, - 2.250 - ], - [ - -4.150000095367432, - 12.250, - 2.250 - ], - [ - 0.3499999046325684, - 12.250, - 2.250 - ] - ], - "uvs": [ - [ - 0.019531250, - 0.855468750 - ], - [ - 0.035156250, - 0.855468750 - ], - [ - 0.035156250, - 0.871093750 - ], - [ - 0.019531250, - 0.871093750 - ], - [ - 0.050781250, - 0.871093750 - ], - [ - 0.035156250, - 0.871093750 - ], - [ - 0.035156250, - 0.855468750 - ], - [ - 0.050781250, - 0.855468750 - ], - [ - 0.003906250, - 0.808593750 - ], - [ - 0.019531250, - 0.808593750 - ], - [ - 0.019531250, - 0.855468750 - ], - [ - 0.003906250, - 0.855468750 - ], - [ - 0.035156250, - 0.808593750 - ], - [ - 0.050781250, - 0.808593750 - ], - [ - 0.050781250, - 0.855468750 - ], - [ - 0.035156250, - 0.855468750 - ], - [ - 0.019531250, - 0.808593750 - ], - [ - 0.035156250, - 0.808593750 - ], - [ - 0.035156250, - 0.855468750 - ], - [ - 0.019531250, - 0.855468750 - ], - [ - 0.050781250, - 0.808593750 - ], - [ - 0.066406250, - 0.808593750 - ], - [ - 0.066406250, - 0.855468750 - ], - [ - 0.050781250, - 0.855468750 - ] - ] - } - }, - { - "name": "rightsleeve", - "parent": "rightarm", - "pivot": [ - -5.0, - 22.0, - 0.0 - ], - "poly_mesh": { - "normalized_uvs": true, - "normals": [ - [ - 0.0, - 1.0, - 0.0 - ], - [ - 0.0, - -1.0, - 0.0 - ], - [ - -1.0, - 0.0, - 0.0 - ], - [ - 1.0, - 0.0, - 0.0 - ], - [ - 0.0, - 0.0, - -1.0 - ], - [ - 0.0, - 0.0, - 1.0 - ] - ], - "polys": [ - [ - [ - 0, - 0, - 0 - ], - [ - 1, - 0, - 1 - ], - [ - 2, - 0, - 2 - ], - [ - 3, - 0, - 3 - ] - ], - [ - [ - 4, - 1, - 4 - ], - [ - 5, - 1, - 5 - ], - [ - 6, - 1, - 6 - ], - [ - 7, - 1, - 7 - ] - ], - [ - [ - 8, - 2, - 8 - ], - [ - 9, - 2, - 9 - ], - [ - 10, - 2, - 10 - ], - [ - 11, - 2, - 11 - ] - ], - [ - [ - 12, - 3, - 12 - ], - [ - 13, - 3, - 13 - ], - [ - 14, - 3, - 14 - ], - [ - 15, - 3, - 15 - ] - ], - [ - [ - 16, - 4, - 16 - ], - [ - 17, - 4, - 17 - ], - [ - 18, - 4, - 18 - ], - [ - 19, - 4, - 19 - ] - ], - [ - [ - 20, - 5, - 20 - ], - [ - 21, - 5, - 21 - ], - [ - 22, - 5, - 22 - ], - [ - 23, - 5, - 23 - ] - ] - ], - "positions": [ - [ - -8.250, - 24.250, - -2.250 - ], - [ - -3.750, - 24.250, - -2.250 - ], - [ - -3.750, - 24.250, - 2.250 - ], - [ - -8.250, - 24.250, - 2.250 - ], - [ - -8.250, - 11.750, - 2.250 - ], - [ - -3.750, - 11.750, - 2.250 - ], - [ - -3.750, - 11.750, - -2.250 - ], - [ - -8.250, - 11.750, - -2.250 - ], - [ - -8.250, - 11.750, - 2.250 - ], - [ - -8.250, - 11.750, - -2.250 - ], - [ - -8.250, - 24.250, - -2.250 - ], - [ - -8.250, - 24.250, - 2.250 - ], - [ - -3.750, - 11.750, - -2.250 - ], - [ - -3.750, - 11.750, - 2.250 - ], - [ - -3.750, - 24.250, - 2.250 - ], - [ - -3.750, - 24.250, - -2.250 - ], - [ - -8.250, - 11.750, - -2.250 - ], - [ - -3.750, - 11.750, - -2.250 - ], - [ - -3.750, - 24.250, - -2.250 - ], - [ - -8.250, - 24.250, - -2.250 - ], - [ - -3.750, - 11.750, - 2.250 - ], - [ - -8.250, - 11.750, - 2.250 - ], - [ - -8.250, - 24.250, - 2.250 - ], - [ - -3.750, - 24.250, - 2.250 - ] - ], - "uvs": [ - [ - 0.019531250, - 0.917968750 - ], - [ - 0.035156250, - 0.917968750 - ], - [ - 0.035156250, - 0.933593750 - ], - [ - 0.019531250, - 0.933593750 - ], - [ - 0.050781250, - 0.933593750 - ], - [ - 0.035156250, - 0.933593750 - ], - [ - 0.035156250, - 0.917968750 - ], - [ - 0.050781250, - 0.917968750 - ], - [ - 0.003906250, - 0.871093750 - ], - [ - 0.019531250, - 0.871093750 - ], - [ - 0.019531250, - 0.917968750 - ], - [ - 0.003906250, - 0.917968750 - ], - [ - 0.035156250, - 0.871093750 - ], - [ - 0.050781250, - 0.871093750 - ], - [ - 0.050781250, - 0.917968750 - ], - [ - 0.035156250, - 0.917968750 - ], - [ - 0.019531250, - 0.871093750 - ], - [ - 0.035156250, - 0.871093750 - ], - [ - 0.035156250, - 0.917968750 - ], - [ - 0.019531250, - 0.917968750 - ], - [ - 0.050781250, - 0.871093750 - ], - [ - 0.066406250, - 0.871093750 - ], - [ - 0.066406250, - 0.917968750 - ], - [ - 0.050781250, - 0.917968750 - ] - ] - } - }, - { - "name": "rightsock", - "parent": "rightleg", - "pivot": [ - -1.899999976158142, - 12.0, - 0.0 - ] - }, - { - "name": "root" - }, - { - "name": "waist", - "parent": "root", - "pivot": [ - 0.0, - 12.0, - 0.0 - ] - } - ], - "description": { - "identifier": "geometry.persona_3891382d5e3f67c4-0", - "texture_height": 256.0, - "texture_width": 256.0 - } - }, - { - "bones": [ - { - "name": "belt", - "parent": "body", - "pivot": [ - 0.0, - 24.0, - 0.0 - ] - }, - { - "locators": { - "armor_offset.default_neck": [ - 0.0, - 24.0, - 0.0 - ] - }, - "name": "body", - "parent": "waist", - "pivot": [ - 0.0, - 24.0, - 0.0 - ] - }, - { - "name": "bodyarmor", - "parent": "body", - "pivot": [ - 0.0, - 24.0, - 0.0 - ] - }, - { - "name": "hat", - "parent": "head", - "pivot": [ - 0.0, - 24.0, - 0.0 - ], - "poly_mesh": { - "normalized_uvs": true, - "normals": [ - [ - 0.0, - 1.0, - 0.0 - ], - [ - 0.0, - -1.0, - 0.0 - ], - [ - -1.0, - 0.0, - 0.0 - ], - [ - 1.0, - 0.0, - 0.0 - ], - [ - 0.0, - 0.0, - -1.0 - ], - [ - 0.0, - 0.0, - 1.0 - ] - ], - "polys": [ - [ - [ - 0, - 0, - 0 - ], - [ - 1, - 0, - 1 - ], - [ - 2, - 0, - 2 - ], - [ - 3, - 0, - 3 - ] - ], - [ - [ - 4, - 1, - 4 - ], - [ - 5, - 1, - 5 - ], - [ - 6, - 1, - 6 - ], - [ - 7, - 1, - 7 - ] - ], - [ - [ - 8, - 2, - 8 - ], - [ - 9, - 2, - 9 - ], - [ - 10, - 2, - 10 - ], - [ - 11, - 2, - 11 - ] - ], - [ - [ - 12, - 3, - 12 - ], - [ - 13, - 3, - 13 - ], - [ - 14, - 3, - 14 - ], - [ - 15, - 3, - 15 - ] - ], - [ - [ - 16, - 4, - 16 - ], - [ - 17, - 4, - 17 - ], - [ - 18, - 4, - 18 - ], - [ - 19, - 4, - 19 - ] - ], - [ - [ - 20, - 5, - 20 - ], - [ - 21, - 5, - 21 - ], - [ - 22, - 5, - 22 - ], - [ - 23, - 5, - 23 - ] - ] - ], - "positions": [ - [ - -4.50, - 32.50, - -4.50 - ], - [ - 4.50, - 32.50, - -4.50 - ], - [ - 4.50, - 32.50, - 4.50 - ], - [ - -4.50, - 32.50, - 4.50 - ], - [ - -4.50, - 23.50, - 4.50 - ], - [ - 4.50, - 23.50, - 4.50 - ], - [ - 4.50, - 23.50, - -4.50 - ], - [ - -4.50, - 23.50, - -4.50 - ], - [ - -4.50, - 23.50, - 4.50 - ], - [ - -4.50, - 23.50, - -4.50 - ], - [ - -4.50, - 32.50, - -4.50 - ], - [ - -4.50, - 32.50, - 4.50 - ], - [ - 4.50, - 23.50, - -4.50 - ], - [ - 4.50, - 23.50, - 4.50 - ], - [ - 4.50, - 32.50, - 4.50 - ], - [ - 4.50, - 32.50, - -4.50 - ], - [ - -4.50, - 23.50, - -4.50 - ], - [ - 4.50, - 23.50, - -4.50 - ], - [ - 4.50, - 32.50, - -4.50 - ], - [ - -4.50, - 32.50, - -4.50 - ], - [ - 4.50, - 23.50, - 4.50 - ], - [ - -4.50, - 23.50, - 4.50 - ], - [ - -4.50, - 32.50, - 4.50 - ], - [ - 4.50, - 32.50, - 4.50 - ] - ], - "uvs": [ - [ - 0.250, - 0.6250 - ], - [ - 0.50, - 0.6250 - ], - [ - 0.50, - 0.750 - ], - [ - 0.250, - 0.750 - ], - [ - 0.750, - 0.750 - ], - [ - 0.50, - 0.750 - ], - [ - 0.50, - 0.6250 - ], - [ - 0.750, - 0.6250 - ], - [ - 0.0, - 0.50 - ], - [ - 0.250, - 0.50 - ], - [ - 0.250, - 0.6250 - ], - [ - 0.0, - 0.6250 - ], - [ - 0.50, - 0.50 - ], - [ - 0.750, - 0.50 - ], - [ - 0.750, - 0.6250 - ], - [ - 0.50, - 0.6250 - ], - [ - 0.250, - 0.50 - ], - [ - 0.50, - 0.50 - ], - [ - 0.50, - 0.6250 - ], - [ - 0.250, - 0.6250 - ], - [ - 0.750, - 0.50 - ], - [ - 1.0, - 0.50 - ], - [ - 1.0, - 0.6250 - ], - [ - 0.750, - 0.6250 - ] - ] - } - }, - { - "name": "head", - "parent": "body", - "pivot": [ - 0.0, - 24.0, - 0.0 - ], - "poly_mesh": { - "normalized_uvs": true, - "normals": [ - [ - 0.0, - 1.0, - 0.0 - ], - [ - 0.0, - -1.0, - 0.0 - ], - [ - -1.0, - 0.0, - 0.0 - ], - [ - 1.0, - 0.0, - 0.0 - ], - [ - 0.0, - 0.0, - -1.0 - ], - [ - 0.0, - 0.0, - 1.0 - ] - ], - "polys": [ - [ - [ - 0, - 0, - 0 - ], - [ - 1, - 0, - 1 - ], - [ - 2, - 0, - 2 - ], - [ - 3, - 0, - 3 - ] - ], - [ - [ - 4, - 1, - 4 - ], - [ - 5, - 1, - 5 - ], - [ - 6, - 1, - 6 - ], - [ - 7, - 1, - 7 - ] - ], - [ - [ - 8, - 2, - 8 - ], - [ - 9, - 2, - 9 - ], - [ - 10, - 2, - 10 - ], - [ - 11, - 2, - 11 - ] - ], - [ - [ - 12, - 3, - 12 - ], - [ - 13, - 3, - 13 - ], - [ - 14, - 3, - 14 - ], - [ - 15, - 3, - 15 - ] - ], - [ - [ - 16, - 4, - 16 - ], - [ - 17, - 4, - 17 - ], - [ - 18, - 4, - 18 - ], - [ - 19, - 4, - 19 - ] - ], - [ - [ - 20, - 5, - 20 - ], - [ - 21, - 5, - 21 - ], - [ - 22, - 5, - 22 - ], - [ - 23, - 5, - 23 - ] - ] - ], - "positions": [ - [ - -4.0, - 32.0, - -4.0 - ], - [ - 4.0, - 32.0, - -4.0 - ], - [ - 4.0, - 32.0, - 4.0 - ], - [ - -4.0, - 32.0, - 4.0 - ], - [ - -4.0, - 24.0, - 4.0 - ], - [ - 4.0, - 24.0, - 4.0 - ], - [ - 4.0, - 24.0, - -4.0 - ], - [ - -4.0, - 24.0, - -4.0 - ], - [ - -4.0, - 24.0, - 4.0 - ], - [ - -4.0, - 24.0, - -4.0 - ], - [ - -4.0, - 32.0, - -4.0 - ], - [ - -4.0, - 32.0, - 4.0 - ], - [ - 4.0, - 24.0, - -4.0 - ], - [ - 4.0, - 24.0, - 4.0 - ], - [ - 4.0, - 32.0, - 4.0 - ], - [ - 4.0, - 32.0, - -4.0 - ], - [ - -4.0, - 24.0, - -4.0 - ], - [ - 4.0, - 24.0, - -4.0 - ], - [ - 4.0, - 32.0, - -4.0 - ], - [ - -4.0, - 32.0, - -4.0 - ], - [ - 4.0, - 24.0, - 4.0 - ], - [ - -4.0, - 24.0, - 4.0 - ], - [ - -4.0, - 32.0, - 4.0 - ], - [ - 4.0, - 32.0, - 4.0 - ] - ], - "uvs": [ - [ - 0.250, - 0.8750 - ], - [ - 0.50, - 0.8750 - ], - [ - 0.50, - 1.0 - ], - [ - 0.250, - 1.0 - ], - [ - 0.750, - 1.0 - ], - [ - 0.50, - 1.0 - ], - [ - 0.50, - 0.8750 - ], - [ - 0.750, - 0.8750 - ], - [ - 0.0, - 0.750 - ], - [ - 0.250, - 0.750 - ], - [ - 0.250, - 0.8750 - ], - [ - 0.0, - 0.8750 - ], - [ - 0.50, - 0.750 - ], - [ - 0.750, - 0.750 - ], - [ - 0.750, - 0.8750 - ], - [ - 0.50, - 0.8750 - ], - [ - 0.250, - 0.750 - ], - [ - 0.50, - 0.750 - ], - [ - 0.50, - 0.8750 - ], - [ - 0.250, - 0.8750 - ], - [ - 0.750, - 0.750 - ], - [ - 1.0, - 0.750 - ], - [ - 1.0, - 0.8750 - ], - [ - 0.750, - 0.8750 - ] - ] - } - }, - { - "name": "helmet", - "parent": "head", - "pivot": [ - 0.0, - 24.0, - 0.0 - ] - }, - { - "name": "leftarm", - "parent": "body", - "pivot": [ - 5.0, - 22.0, - 0.0 - ] - }, - { - "mirror": true, - "name": "leftarmarmor", - "parent": "leftarm", - "pivot": [ - 5.0, - 22.0, - 0.0 - ] - }, - { - "mirror": true, - "name": "leftboot", - "parent": "leftleg", - "pivot": [ - 1.899999976158142, - 12.0, - 0.0 - ] - }, - { - "name": "leftitem", - "parent": "leftarm", - "pivot": [ - 6.0, - 15.0, - 0.0 - ] - }, - { - "name": "leftleg", - "parent": "root", - "pivot": [ - 1.899999976158142, - 12.0, - 0.0 - ] - }, - { - "mirror": true, - "name": "leftlegging", - "parent": "leftleg", - "pivot": [ - 1.899999976158142, - 12.0, - 0.0 - ] - }, - { - "mirror": true, - "name": "leftsock", - "parent": "leftleg", - "pivot": [ - 1.899999976158142, - 12.0, - 0.0 - ] - }, - { - "name": "rightarm", - "parent": "body", - "pivot": [ - -5.0, - 22.0, - 0.0 - ] - }, - { - "name": "rightarmarmor", - "parent": "rightarm", - "pivot": [ - -5.0, - 22.0, - 0.0 - ] - }, - { - "name": "rightboot", - "parent": "rightleg", - "pivot": [ - -1.899999976158142, - 12.0, - 0.0 - ] - }, - { - "locators": { - "lead_hold": [ - -6.0, - 15.0, - 0.0 - ] - }, - "name": "rightitem", - "parent": "rightarm", - "pivot": [ - -6.0, - 15.0, - 0.0 - ] - }, - { - "name": "rightleg", - "parent": "root", - "pivot": [ - -1.899999976158142, - 12.0, - 0.0 - ] - }, - { - "name": "rightlegging", - "parent": "rightleg", - "pivot": [ - -1.899999976158142, - 12.0, - 0.0 - ] - }, - { - "name": "rightsock", - "parent": "rightleg", - "pivot": [ - -1.899999976158142, - 12.0, - 0.0 - ] - }, - { - "name": "root" - }, - { - "name": "waist", - "parent": "root", - "pivot": [ - 0.0, - 12.0, - 0.0 - ] - } - ], - "description": { - "identifier": "geometry.animated_face_persona-3891382d5e3f67c4-0", - "texture_height": 64.0, - "texture_width": 32.0 - } - } - ] -} \ No newline at end of file diff --git a/data/1.16.201/steveSkin.bin b/data/1.16.201/steveSkin.bin deleted file mode 100644 index e2c09e28abf1ed6379af552eb7d3b534af73363e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 262144 zcmeI5v5q6f7KZ0p2(APfB4P+_@BY2I_W%C-@#e=*|FgF} z5s$mN*u?Z*+j)QfdGm1UdOX|Vt0upiTh=@bxNuLizI-ms*XiaZV11wFFQ3zV^xifB z?)^J^&iyU-3 zmU-&hnLmDF&>v&)Ge_*yuXca;#^(}@rZP5u9s;TDw!W)&qO()}j758~8B2U(qm?`l zpx1VMVi@0N`_`{>C1xnUsbo*h-KUQ^Gr*Pr(NqG z{nx%@<8w}ATr^eNQ}dhp&Q4wb*nZ*5USV`>JmW6SC+qsPN&-BeWAn4Lzkm4l(Um^@ zv8{ir{nRX1>XcedZPBKmaoCJ$YnqtOSJyr(zlrZ`UBBIb{rLvt=H!zcl2grrys*_r zdmpptUa{xL&rt6GB`)PAVpn1-M*rI=OU|n*gpFQBm zPJL^b7Y@ve9bBKiJ~N+l^UFS_GBW-)38Z#w{idCIKwGiY6*|Drm`C@2^dC*5>z$7G z_jvRli~bwU*E585$&+=l^pod7eiPps)^F#}I=Sd)9R1j9^I_dSKFJY(wG$B;exn4U zovNRYICit7%?W{ij{W z_q552JZjx05Awp++|r)<&a~^-`I8IlVyl0<{;B=uoa6auA|LYXdXYFnOY;%4Ru6) zVdKXa`^kqtZ9e+o`@Q|*#h;t@`t0Lh-v2zH(?iA+ldl*OE;>Wgp_UB#Bfn4>x<6Ok{>A#N8S-|VGFK|94->Hm@zfA(vY_;en zHW#}8^~)Dq9klgb^`CaDeO_<%-PLX^+Hc1*h8Xlue#wQr$O9j?=6{LWW?ndCPS%d4 zA6tFNrSi$X>)vQ@_l>r%d_E@M+pJ!*mca89K>yf!zNC%rZ}ogs|Ic4Tt{?#kNI(J- zkbndvAOQ(TKmrnwfCMBU0SQPz0uqpb1SB8<2}nQ!5|DrdBp?9^NI(J-kbndvAOQ(T zKmrnwfCMBU0SQPz0uqpb1SB8<2}ocL0y zz*PNCjh}Dlt}FowOx5qy_{F{h`Ha7J@3x=WSO2E^V7?_TpEX46V4MRaFav?9`kfj- z!!r)N6zNc7*?QTi`&>VM|< z(B%&ZpvzPG&6rbud>Pm3yTv@n8>i?v8je=;8ejbzi1F3_j6>s`8~CeF{m)SOE*Sz<+i4H! zKi{+0Yij&r--W92s#Wge$8_Arab~pVMx9grFSZQsJu&plJv{nH-)YCsm{@$+>Px#X zK65iaaoEN3ZFS6Z{Lp>;+_=SpFtK|k5Y1K%58eO!{Ae5f*D-bOKL1kL^7n$U`8zxO zZ7}+<_+sh9^7n@Nd^K*V9L(#!2}F}sqgA_U)8n7rj=k;=`ix_H2m1jbpy} zYTT{!GXEPV!0)Ma77fP^?yAJyyZ+HD8phI({^^g6{_#ii_|*SkWjWxQ1h|iPdQOdU z1`MWv{>MHy3{E`nfatSc=r~$N!@qv{Vmk(XqkrNuE`9jv$I>4=?`~av^#ss=XGiJ3 z#BpXk>A7L`zy%_q7BhFdG4W1|6H9_tk%==I7gtsXqF~#?7`-7nXno4hXb5=HH^C zb+pZxKK*k>;7dGxeQ^f~*dYN4%toMUHEr}C+v-1k_|Z1;^vBXie9i`9XWOU?OF#k# z1gch}*LojEzgT>+#9`5Yd>PLbe~mjxzzzvWU^W8i7mHS-XEc0D|BPw%&wT2Cwzt-W zB``<;{i0X&-`>YF4vn{GLws!<^R;n<2{}Ll61WoMm{nH;C{o~J^_|*T^ z-bxpez-R*KAB&EoWi;&Xw~WSWfCMBU0SQPz0uqpb1SB8<2}nQ!5|Drdo|iy=AFq5S zPkxp+>T@}EpZ}A%_S(*y-~Tyv4ehSUujZEZhQjqrKmsQSp#7aaNB_}e-?i62zZ=}z zoC`x=O@8Ws2$+5ej37|&ubtLL>uVQt75#U)jy|78pm3-JR!5-fziXeP|Mt0`*Zceb z1)u-b|LQ8#4PS~tpAMt{d=^hEpXE`<@i{-(>U;HS^YGhm+c^IJ9{)dRJ6GR)>C0MN z%**RKf7*;E$JS3gb}Xx`%l8;vd-VCz#d6-Y_BqbK(dYA69*)0X0%(Wt!_gPoicKH> zSagN0{z{mE zoBW5qn*7xN5HS5m38da~QHQO5qO()}=#1Fd8lTwcGtUF)wH=?Bs@1mLw|<=~8O|^UTi~kT$Wg=)d+I8=rF` zn9$&->3}(F6|I{q?T*s!JtMic`7G0A^^5V)E`msm0{=U1_Z}Q~ zJHDy;_3ha{33LR|6xxn$^;5^-M}x8Z`b?eXqRwNvS7FoF)^i=7dgt{{7k%s39OFm- zY1iDIqW>Dp`BCR+=g*w+Gv<+=a~3rDALzQC7u^5*Vs^~fKY6k)mVWX)$j?fbz!3t} z7PS+Lw%Yol&ZsZ!Cm;T_`RIf1H`p&;{JCkb&p!U;-}_wZywiWi6O*y=Z^v-&>&E4E zd^NXLpUI*6(*K@L{4-|gJ!OB`#BgOU=8er5eAt8MnLM{} z<-FtBhi9Ai`G>JbEP0U!`(u6b!qSf&+P{7YteF71LTBg(iyxbQG#I?V{&=nd&SLld-Z2b6Q>+?^ZYwEKL z?d@|7+V1qfr0;)*_~@6wJrh9x*sATc(fz%C|8vjpt$UMz1SB8<2}nQ!5|DrdBp?9^ zNI(J-kbndvAOQ(TKmrnwfCMBU0SQPz0uqpb1SB8<2}nQ!5|DrdBp?9^NI(J-I3)1u ztA952dinC@re22;k9%rt+BG)q$D@5E0SPRLz*PNCjb9QAbCJN>2u#)Q)cCo1PtAX7 z{M`F@{dE(VTEA1{=cYe3|EckF@89*;MS#!!<1_vE%o}X|e4MoTT+iySW9Y|LU)uD? zZa-INVYsL2cWV5?aG1`W6No0OMyo#4#y5064Eb57oquU~r|NfV{L*-s&wUd>m#6g0 z84%m*xBAZU&rLTu*F6mF@7|w(=6*k1|GEU8QvYN0F{Gc?f8E_4uJ)Au=WIN6K0d|I zI!oLCArX7lM4)Or?Y2ItTk1dezj{rLpPO~NzoGs2`C)U6-zopx`*;0y6F|SzXzCk% zr`_rUAC`E=^~Gmy<|ht2H~qf+tH#;avHYjT&%J-wUpIlazH9AQ{WIUCf0>`T({AUV zd;hM#ZUX%Oe00#(C;g0j^XAQ_Ui33=Z2a8x$s2nt|L5}0y?@tVHv#mEt=dkTe(a_F zbJJ&EL;7aivHhPLKllD!f87MAYwWT5elGvq^w}47ZTp{_zw0lAK>o(Oa@-zd!EJn741=Uo|G}jE_IDt*^#C?{22g zp8TWb&W_T5iBtd6-v(#65`k#-_3M8xbevj_W~(n_s*Z_?%{Y9V8~Cd)W0v-n{OXmx z=VBk##~x#Af7{U1Sl*L;8ukHMM3M0qdErF`lw9$WT ztN--jN87~HA4?zc(LJ$C1KH+U_d)*bl|5uX^bud<=p%l~`(N7oVLsO-P-`{ynp&k^ zsb4Iy&SbSJC-fE-jhB)Snuf|<>cf+f( zH}YNE{)Y)U;+_fg)jxVg6IlAuKmD=M4gSoD?-upXKG*}6{(IX0J=eB-8zzAMvFJE8 zPTl|d<%{jJKwJOBWL$js>BrI^JDkyVN01|SZTr72ZC6_w0qP#Rw)$t^*tP9{Y4vD6 z5|DrdBp?9^NI(J-kbndvAOQ(TKmrnwfCMBU0SQPz0uqpb1SB8<2}nQ!5|DrdBp?9^ zNI(J-kbndvAOQ(TKmrnwfCMBU0SQPz0uqpb1SB8<2}nQ!5|DrdBp?9^NI(J-kbndv zAOQ(TKmrnwfCMBU0SQPz0uqpb1SB8<2}nQ!5|DrdBp?9^NI(J-kbndvAOQ(TKmrnw zfCMBU0SQPz0uqpb1SB8<2}nQ!5|DrdBp?9^NI(J-kbndvAOQ(TKmrnwfCMBU0SQPz z0uqpb1SB8<2}nQ!5|DrdBp?9^NI(J-kbndvAOQ(TKmrnwfCMBU0SQPz0uqpb1SB8< z2}nQ!5|DrdBp?9^NI(J-kbndvAOQ(TKmrnwfCMBU0SQPz0uqpb1SB8<2}nQ!5|Drd zBp?9^NI(J-kbndvAOQ(TKmrnwfCMBU0SQPz0uqpb1SB8<2}nQ!5|DrdBp?9^NI(J- zkbndvAOQ(TKmrnwfCMBU0SQPz0uqpb1SB8<2}nQ!5|DrdBp?9^NI(J-kbndvAOQ(T zKmrnwfCMBU0SQPz0uqpb1SB8<2}nQ!5|DrdBp?9^NI(J-kbndvAOQ(TKmrnwfCMBU z0SQPz0uqpb1SB8<2}nQ!5|DrdBp?9^NI(J-kbndvAOQ(TKmrnwfCMBU0SQPz0uqpb z1SB8<2}nQ!5|DrdBp?9^NI(J-kbndvAOQ(TKmrnwfCMBU0SQPz0uqpb1SB8<2}nQ! z5|DrdBp?9^NI(J-kbndvAOQ(TKmrnwfCMBU0SQPz0uqpb1SB8<2}nQ!5|DrdBp?9^ zNI(J-kbndvAOQ(TKmrnwfCMBU0SQPz0uqpb1SB8<2}nQ!5|DrdBp?9^NI(J-kbndv TAOQ(TKmrnwfCMCPIRgI&V?knt diff --git a/data/1.16.210/protocol.json b/data/1.16.210/protocol.json deleted file mode 100644 index 96a88ca..0000000 --- a/data/1.16.210/protocol.json +++ /dev/null @@ -1,7798 +0,0 @@ -{ - "types": { - "varint32": "varint", - "varint64": "native", - "zigzag32": "native", - "zigzag64": "native", - "uuid": "native", - "byterot": "native", - "bitflags": "native", - "restBuffer": "native", - "encapsulated": "native", - "nbt": "native", - "lnbt": "native", - "nbtLoop": "native", - "enum_size_based_on_values_len": "native", - "MapInfo": "native", - "BehaviourPackInfos": [ - "array", - { - "countType": "li16", - "type": [ - "container", - [ - { - "name": "uuid", - "type": "string" - }, - { - "name": "version", - "type": "string" - }, - { - "name": "size", - "type": "lu64" - }, - { - "name": "content_key", - "type": "string" - }, - { - "name": "sub_pack_name", - "type": "string" - }, - { - "name": "content_identity", - "type": "string" - }, - { - "name": "has_scripts", - "type": "bool" - } - ] - ] - } - ], - "TexturePackInfos": [ - "array", - { - "countType": "li16", - "type": [ - "container", - [ - { - "name": "uuid", - "type": "string" - }, - { - "name": "version", - "type": "string" - }, - { - "name": "size", - "type": "lu64" - }, - { - "name": "content_key", - "type": "string" - }, - { - "name": "sub_pack_name", - "type": "string" - }, - { - "name": "content_identity", - "type": "string" - }, - { - "name": "has_scripts", - "type": "bool" - }, - { - "name": "rtx_enabled", - "type": "bool" - } - ] - ] - } - ], - "ResourcePackIdVersions": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "uuid", - "type": "string" - }, - { - "name": "version", - "type": "string" - }, - { - "name": "name", - "type": "string" - } - ] - ] - } - ], - "ResourcePackIds": [ - "array", - { - "countType": "li16", - "type": "string" - } - ], - "Experiment": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "enabled", - "type": "bool" - } - ] - ], - "Experiments": [ - "array", - { - "countType": "li32", - "type": "Experiment" - } - ], - "GameMode": [ - "mapper", - { - "type": "zigzag32", - "mappings": { - "0": "survival", - "1": "creative", - "2": "adventure", - "3": "survival_spectator", - "4": "creative_spectator", - "5": "fallback" - } - } - ], - "GameRule": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "type", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "1": "bool", - "2": "int", - "3": "float" - } - } - ] - }, - { - "name": "value", - "type": [ - "switch", - { - "compareTo": "type", - "fields": { - "bool": "bool", - "int": "zigzag32", - "float": "lf32" - }, - "default": "void" - } - ] - } - ] - ], - "GameRules": [ - "array", - { - "countType": "varint", - "type": "GameRule" - } - ], - "Blob": [ - "container", - [ - { - "name": "hash", - "type": "lu64" - }, - { - "name": "payload", - "type": "ByteArray" - } - ] - ], - "BlockPalette": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "state", - "type": "nbt" - } - ] - ] - } - ], - "Itemstates": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "runtime_id", - "type": "li16" - }, - { - "name": "component_based", - "type": "bool" - } - ] - ] - } - ], - "Item": [ - "container", - [ - { - "name": "network_id", - "type": "zigzag32" - }, - { - "anon": true, - "type": [ - "switch", - { - "compareTo": "network_id", - "fields": { - "0": "void" - }, - "default": [ - "container", - [ - { - "name": "auxiliary_value", - "type": "zigzag32" - }, - { - "name": "has_nbt", - "type": [ - "mapper", - { - "type": "lu16", - "mappings": { - "0": "false", - "65535": "true" - } - } - ] - }, - { - "name": "nbt", - "type": [ - "switch", - { - "compareTo": "has_nbt", - "fields": { - "true": [ - "container", - [ - { - "name": "version", - "type": "u8" - }, - { - "name": "nbt", - "type": "nbt" - } - ] - ] - }, - "default": "void" - } - ] - }, - { - "name": "can_place_on", - "type": [ - "array", - { - "countType": "zigzag32", - "type": "string" - } - ] - }, - { - "name": "can_destroy", - "type": [ - "array", - { - "countType": "zigzag32", - "type": "string" - } - ] - } - ] - ] - } - ] - }, - { - "anon": true, - "type": [ - "switch", - { - "compareTo": "network_id", - "fields": { - "355": [ - "container", - [ - { - "name": "blocking_tick", - "type": "zigzag64" - } - ] - ] - }, - "default": "void" - } - ] - } - ] - ], - "vec3i": [ - "container", - [ - { - "name": "x", - "type": "zigzag32" - }, - { - "name": "y", - "type": "zigzag32" - }, - { - "name": "z", - "type": "zigzag32" - } - ] - ], - "vec3u": [ - "container", - [ - { - "name": "x", - "type": "varint" - }, - { - "name": "y", - "type": "varint" - }, - { - "name": "z", - "type": "varint" - } - ] - ], - "vec3f": [ - "container", - [ - { - "name": "x", - "type": "lf32" - }, - { - "name": "y", - "type": "lf32" - }, - { - "name": "z", - "type": "lf32" - } - ] - ], - "vec2f": [ - "container", - [ - { - "name": "x", - "type": "lf32" - }, - { - "name": "z", - "type": "lf32" - } - ] - ], - "MetadataDictionary": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "key", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "0": "flags", - "1": "health", - "2": "variant", - "3": "color", - "4": "nametag", - "5": "owner_eid", - "6": "target_eid", - "7": "air", - "8": "potion_color", - "9": "potion_ambient", - "10": "jump_duration", - "11": "hurt_time", - "12": "hurt_direction", - "13": "paddle_time_left", - "14": "paddle_time_right", - "15": "experience_value", - "16": "minecart_display_block", - "17": "minecart_display_offset", - "18": "minecart_has_display", - "20": "old_swell", - "21": "swell_dir", - "22": "charge_amount", - "23": "enderman_held_runtime_id", - "24": "entity_age", - "26": "player_flags", - "27": "player_index", - "28": "player_bed_position", - "29": "fireball_power_x", - "30": "fireball_power_y", - "31": "fireball_power_z", - "32": "aux_power", - "33": "fish_x", - "34": "fish_z", - "35": "fish_angle", - "36": "potion_aux_value", - "37": "lead_holder_eid", - "38": "scale", - "39": "interactive_tag", - "40": "npc_skin_id", - "41": "url_tag", - "42": "max_airdata_max_air", - "43": "mark_variant", - "44": "container_type", - "45": "container_base_size", - "46": "container_extra_slots_per_strength", - "47": "block_target", - "48": "wither_invulnerable_ticks", - "49": "wither_target_1", - "50": "wither_target_2", - "51": "wither_target_3", - "52": "aerial_attack", - "53": "boundingbox_width", - "54": "boundingbox_height", - "55": "fuse_length", - "56": "rider_seat_position", - "57": "rider_rotation_locked", - "58": "rider_max_rotation", - "59": "rider_min_rotation", - "60": "rider_rotation_offset", - "61": "area_effect_cloud_radius", - "62": "area_effect_cloud_waiting", - "63": "area_effect_cloud_particle_id", - "64": "shulker_peek_id", - "65": "shulker_attach_face", - "66": "shulker_attached", - "67": "shulker_attach_pos", - "68": "trading_player_eid", - "69": "trading_career", - "70": "has_command_block", - "71": "command_block_command", - "72": "command_block_last_output", - "73": "command_block_track_output", - "74": "controlling_rider_seat_number", - "75": "strength", - "76": "max_strength", - "77": "spell_casting_color", - "78": "limited_life", - "79": "armor_stand_pose_index", - "80": "ender_crystal_time_offset", - "81": "always_show_nametag", - "82": "color_2", - "83": "name_author", - "84": "score_tag", - "85": "balloon_attached_entity", - "86": "pufferfish_size", - "87": "bubble_time", - "88": "agent", - "89": "sitting_amount", - "90": "sitting_amount_previous", - "91": "eating_counter", - "92": "flags_extended", - "93": "laying_amount", - "94": "laying_amount_previous", - "95": "duration", - "96": "spawn_time", - "97": "change_rate", - "98": "change_on_pickup", - "99": "pickup_count", - "100": "interact_text", - "101": "trade_tier", - "102": "max_trade_tier", - "103": "trade_experience", - "104": "skin_id", - "105": "spawning_frames", - "106": "command_block_tick_delay", - "107": "command_block_execute_on_first_tick", - "108": "ambient_sound_interval", - "109": "ambient_sound_interval_range", - "110": "ambient_sound_event_name", - "111": "fall_damage_multiplier", - "112": "name_raw_text", - "113": "can_ride_target", - "114": "low_tier_cured_discount", - "115": "high_tier_cured_discount", - "116": "nearby_cured_discount", - "117": "nearby_cured_discount_timestamp", - "118": "hitbox", - "119": "is_buoyant", - "120": "buoyancy_data", - "121": "goat_horn_count" - } - } - ] - }, - { - "name": "type", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "0": "byte", - "1": "short", - "2": "int", - "3": "float", - "4": "string", - "5": "compound", - "6": "vec3i", - "7": "long", - "8": "vec3f" - } - } - ] - }, - { - "name": "value", - "type": [ - "switch", - { - "compareTo": "key", - "fields": { - "flags": "MetadataFlags1", - "flags_extended": "MetadataFlags2" - }, - "default": [ - "switch", - { - "compareTo": "type", - "fields": { - "byte": "i8", - "short": "li16", - "int": "zigzag32", - "float": "lf32", - "string": "string", - "compound": "nbt", - "vec3i": "vec3i", - "long": "zigzag64", - "vec3f": "vec3f" - }, - "default": "void" - } - ] - } - ] - } - ] - ] - } - ], - "Link": [ - "container", - [ - { - "name": "ridden_entity_id", - "type": "zigzag64" - }, - { - "name": "rider_entity_id", - "type": "zigzag64" - }, - { - "name": "type", - "type": "u8" - }, - { - "name": "immediate", - "type": "bool" - }, - { - "name": "rider_initiated", - "type": "bool" - } - ] - ], - "Links": [ - "array", - { - "countType": "varint", - "type": "Link" - } - ], - "EntityAttributes": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "min", - "type": "lf32" - }, - { - "name": "value", - "type": "lf32" - }, - { - "name": "max", - "type": "lf32" - } - ] - ] - } - ], - "Rotation": [ - "container", - [ - { - "name": "yaw", - "type": "byterot" - }, - { - "name": "pitch", - "type": "byterot" - }, - { - "name": "head_yaw", - "type": "byterot" - } - ] - ], - "BlockCoordinates": [ - "container", - [ - { - "name": "x", - "type": "zigzag32" - }, - { - "name": "y", - "type": "varint" - }, - { - "name": "z", - "type": "zigzag32" - } - ] - ], - "PlayerAttributes": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "min", - "type": "lf32" - }, - { - "name": "max", - "type": "lf32" - }, - { - "name": "current", - "type": "lf32" - }, - { - "name": "default", - "type": "lf32" - }, - { - "name": "name", - "type": "string" - } - ] - ] - } - ], - "TransactionUseItem": [ - "container", - [ - { - "name": "action_type", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "0": "click_block", - "1": "click_air", - "2": "break_block" - } - } - ] - }, - { - "name": "block_position", - "type": "BlockCoordinates" - }, - { - "name": "face", - "type": "varint" - }, - { - "name": "hotbar_slot", - "type": "varint" - }, - { - "name": "held_item", - "type": "Item" - }, - { - "name": "player_pos", - "type": "vec3f" - }, - { - "name": "click_pos", - "type": "vec3f" - }, - { - "name": "block_runtime_id", - "type": "varint" - } - ] - ], - "TransactionActions": [ - "container", - [ - { - "name": "network_ids", - "type": "bool" - }, - { - "name": "actions", - "type": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "source_type", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "0": "container", - "1": "global", - "2": "world_interaction", - "3": "creative", - "100": "craft_slot", - "99999": "craft" - } - } - ] - }, - { - "anon": true, - "type": [ - "switch", - { - "compareTo": "source_type", - "fields": { - "container": [ - "container", - [ - { - "name": "inventory_id", - "type": "varint" - } - ] - ], - "craft": [ - "container", - [ - { - "name": "action", - "type": "varint" - } - ] - ], - "world_interaction": [ - "container", - [ - { - "name": "flags", - "type": "varint" - } - ] - ], - "craft_slot": [ - "container", - [ - { - "name": "action", - "type": "varint" - } - ] - ] - }, - "default": "void" - } - ] - }, - { - "name": "slot", - "type": "varint" - }, - { - "name": "old_item", - "type": "Item" - }, - { - "name": "new_item", - "type": "Item" - }, - { - "name": "new_item_stack_id", - "type": [ - "switch", - { - "compareTo": "../network_ids", - "fields": { - "true": "zigzag32" - }, - "default": "void" - } - ] - } - ] - ] - } - ] - } - ] - ], - "TransactionLegacy": [ - "container", - [ - { - "name": "legacy_request_id", - "type": "zigzag32" - }, - { - "name": "legacy_transactions", - "type": [ - "switch", - { - "compareTo": "legacy_request_id", - "fields": { - "0": "void" - }, - "default": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "container_id", - "type": "u8" - }, - { - "name": "changed_slots", - "type": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "slot_id", - "type": "u8" - } - ] - ] - } - ] - } - ] - ] - } - ] - } - ] - } - ] - ], - "Transaction": [ - "container", - [ - { - "name": "legacy", - "type": "TransactionLegacy" - }, - { - "name": "transaction_type", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "0": "normal", - "1": "inventory_mismatch", - "2": "item_use", - "3": "item_use_on_entity", - "4": "item_release" - } - } - ] - }, - { - "name": "actions", - "type": "TransactionActions" - }, - { - "name": "transaction_data", - "type": [ - "switch", - { - "compareTo": "transaction_type", - "fields": { - "normal": "void", - "inventory_mismatch": "void", - "item_use": "TransactionUseItem", - "item_use_on_entity": [ - "container", - [ - { - "name": "entity_runtime_id", - "type": "varint64" - }, - { - "name": "action_type", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "0": "interact", - "1": "attack" - } - } - ] - }, - { - "name": "hotbar_slot", - "type": "zigzag32" - }, - { - "name": "held_item", - "type": "Item" - }, - { - "name": "player_pos", - "type": "vec3f" - }, - { - "name": "click_pos", - "type": "vec3f" - } - ] - ], - "item_release": [ - "container", - [ - { - "name": "action_type", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "0": "release", - "1": "consume" - } - } - ] - }, - { - "name": "hotbar_slot", - "type": "zigzag32" - }, - { - "name": "held_item", - "type": "Item" - }, - { - "name": "head_pos", - "type": "vec3f" - } - ] - ] - }, - "default": "void" - } - ] - } - ] - ], - "ItemStack": [ - "container", - [ - { - "name": "stack_id", - "type": "varint" - }, - { - "name": "item", - "type": "Item" - } - ] - ], - "ItemStacks": [ - "array", - { - "countType": "varint", - "type": "ItemStack" - } - ], - "RecipeIngredient": [ - "container", - [ - { - "name": "network_id", - "type": "zigzag32" - }, - { - "anon": true, - "type": [ - "switch", - { - "compareTo": "network_id", - "fields": { - "0": "void" - }, - "default": [ - "container", - [ - { - "name": "network_data", - "type": "zigzag32" - }, - { - "name": "count", - "type": "zigzag32" - } - ] - ] - } - ] - } - ] - ], - "PotionTypeRecipes": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "input_item_id", - "type": "zigzag32" - }, - { - "name": "input_item_meta", - "type": "zigzag32" - }, - { - "name": "ingredient_id", - "type": "zigzag32" - }, - { - "name": "ingredient_meta", - "type": "zigzag32" - }, - { - "name": "output_item_id", - "type": "zigzag32" - }, - { - "name": "output_item_meta", - "type": "zigzag32" - } - ] - ] - } - ], - "PotionContainerChangeRecipes": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "input_item_id", - "type": "zigzag32" - }, - { - "name": "ingredient_id", - "type": "zigzag32" - }, - { - "name": "output_item_id", - "type": "zigzag32" - } - ] - ] - } - ], - "Recipes": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "type", - "type": [ - "mapper", - { - "type": "zigzag32", - "mappings": { - "0": "shapeless", - "1": "shaped", - "2": "furnace", - "3": "furnace_with_metadata", - "4": "multi", - "5": "shulker_box", - "6": "shapeless_chemistry", - "7": "shaped_chemistry" - } - } - ] - }, - { - "name": "recipe", - "type": [ - "switch", - { - "compareTo": "type", - "fields": { - "shapeless": [ - "container", - [ - { - "name": "recipe_id", - "type": "string" - }, - { - "name": "input", - "type": [ - "array", - { - "countType": "varint", - "type": "RecipeIngredient" - } - ] - }, - { - "name": "output", - "type": [ - "array", - { - "countType": "varint", - "type": "Item" - } - ] - }, - { - "name": "uuid", - "type": "uuid" - }, - { - "name": "block", - "type": "string" - }, - { - "name": "priority", - "type": "zigzag32" - }, - { - "name": "network_id", - "type": "varint" - } - ] - ], - "shulker_box": [ - "container", - [ - { - "name": "recipe_id", - "type": "string" - }, - { - "name": "input", - "type": [ - "array", - { - "countType": "varint", - "type": "RecipeIngredient" - } - ] - }, - { - "name": "output", - "type": [ - "array", - { - "countType": "varint", - "type": "Item" - } - ] - }, - { - "name": "uuid", - "type": "uuid" - }, - { - "name": "block", - "type": "string" - }, - { - "name": "priority", - "type": "zigzag32" - }, - { - "name": "network_id", - "type": "varint" - } - ] - ], - "shapeless_chemistry": [ - "container", - [ - { - "name": "recipe_id", - "type": "string" - }, - { - "name": "input", - "type": [ - "array", - { - "countType": "varint", - "type": "RecipeIngredient" - } - ] - }, - { - "name": "output", - "type": [ - "array", - { - "countType": "varint", - "type": "Item" - } - ] - }, - { - "name": "uuid", - "type": "uuid" - }, - { - "name": "block", - "type": "string" - }, - { - "name": "priority", - "type": "zigzag32" - }, - { - "name": "network_id", - "type": "varint" - } - ] - ], - "shaped": [ - "container", - [ - { - "name": "recipe_id", - "type": "string" - }, - { - "name": "width", - "type": "zigzag32" - }, - { - "name": "height", - "type": "zigzag32" - }, - { - "name": "input", - "type": [ - "array", - { - "count": "width", - "type": [ - "array", - { - "count": "height", - "type": "RecipeIngredient" - } - ] - } - ] - }, - { - "name": "output", - "type": [ - "array", - { - "countType": "varint", - "type": "Item" - } - ] - }, - { - "name": "uuid", - "type": "uuid" - }, - { - "name": "block", - "type": "string" - }, - { - "name": "priority", - "type": "zigzag32" - }, - { - "name": "network_id", - "type": "varint" - } - ] - ], - "shaped_chemistry": [ - "container", - [ - { - "name": "recipe_id", - "type": "string" - }, - { - "name": "width", - "type": "zigzag32" - }, - { - "name": "height", - "type": "zigzag32" - }, - { - "name": "input", - "type": [ - "array", - { - "count": "width", - "type": [ - "array", - { - "count": "height", - "type": "RecipeIngredient" - } - ] - } - ] - }, - { - "name": "output", - "type": [ - "array", - { - "countType": "varint", - "type": "Item" - } - ] - }, - { - "name": "uuid", - "type": "uuid" - }, - { - "name": "block", - "type": "string" - }, - { - "name": "priority", - "type": "zigzag32" - }, - { - "name": "network_id", - "type": "varint" - } - ] - ], - "furnace": [ - "container", - [ - { - "name": "input_id", - "type": "zigzag32" - }, - { - "name": "output", - "type": "Item" - }, - { - "name": "block", - "type": "string" - } - ] - ], - "furnace_with_metadata": [ - "container", - [ - { - "name": "input_id", - "type": "zigzag32" - }, - { - "name": "input_meta", - "type": "zigzag32" - }, - { - "name": "output", - "type": "Item" - }, - { - "name": "block", - "type": "string" - } - ] - ], - "multi": [ - "container", - [ - { - "name": "uuid", - "type": "uuid" - }, - { - "name": "network_id", - "type": "varint" - } - ] - ] - }, - "default": "void" - } - ] - } - ] - ] - } - ], - "SkinImage": [ - "container", - [ - { - "name": "width", - "type": "li32" - }, - { - "name": "height", - "type": "li32" - }, - { - "name": "data", - "type": "string" - } - ] - ], - "Skin": [ - "container", - [ - { - "name": "skin_id", - "type": "string" - }, - { - "name": "play_fab_id", - "type": "string" - }, - { - "name": "skin_resource_pack", - "type": "string" - }, - { - "name": "skin_data", - "type": "SkinImage" - }, - { - "name": "animations", - "type": [ - "array", - { - "countType": "li32", - "type": [ - "container", - [ - { - "name": "skin_image", - "type": "SkinImage" - }, - { - "name": "animation_type", - "type": "li32" - }, - { - "name": "animation_frames", - "type": "lf32" - }, - { - "name": "expression_type", - "type": "lf32" - } - ] - ] - } - ] - }, - { - "name": "cape_data", - "type": "SkinImage" - }, - { - "name": "geometry_data", - "type": "string" - }, - { - "name": "animation_data", - "type": "string" - }, - { - "name": "premium", - "type": "string" - }, - { - "name": "persona", - "type": "bool" - }, - { - "name": "cape_on_classic", - "type": "bool" - }, - { - "name": "cape_id", - "type": "string" - }, - { - "name": "full_skin_id", - "type": "string" - }, - { - "name": "arm_size", - "type": "string" - }, - { - "name": "skin_color", - "type": "string" - }, - { - "name": "personal_pieces", - "type": [ - "array", - { - "countType": "li32", - "type": [ - "container", - [ - { - "name": "piece_id", - "type": "string" - }, - { - "name": "piece_type", - "type": "string" - }, - { - "name": "pack_id", - "type": "string" - }, - { - "name": "is_default_piece", - "type": "bool" - }, - { - "name": "product_id", - "type": "string" - } - ] - ] - } - ] - }, - { - "name": "piece_tint_colors", - "type": [ - "array", - { - "countType": "li32", - "type": [ - "container", - [ - { - "name": "piece_type", - "type": "string" - }, - { - "name": "colors", - "type": [ - "array", - { - "countType": "li32", - "type": "string" - } - ] - } - ] - ] - } - ] - } - ] - ], - "PlayerRecords": [ - "container", - [ - { - "name": "type", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "0": "add", - "1": "remove" - } - } - ] - }, - { - "name": "records_count", - "type": "varint" - }, - { - "name": "records", - "type": [ - "array", - { - "count": "records_count", - "type": [ - "switch", - { - "compareTo": "type", - "fields": { - "add": [ - "container", - [ - { - "name": "uuid", - "type": "uuid" - }, - { - "name": "entity_unique_id", - "type": "zigzag64" - }, - { - "name": "username", - "type": "string" - }, - { - "name": "xbox_user_id", - "type": "string" - }, - { - "name": "platform_chat_id", - "type": "string" - }, - { - "name": "build_platform", - "type": "li32" - }, - { - "name": "skin_data", - "type": "Skin" - }, - { - "name": "is_teacher", - "type": "bool" - }, - { - "name": "is_host", - "type": "bool" - } - ] - ], - "remove": [ - "container", - [ - { - "name": "uuid", - "type": "uuid" - } - ] - ] - }, - "default": "void" - } - ] - } - ] - }, - { - "name": "verified", - "type": [ - "array", - { - "count": "records_count", - "type": "bool" - } - ] - } - ] - ], - "ScoreEntries": [ - "container", - [ - { - "name": "type", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "0": "change", - "1": "remove" - } - } - ] - }, - { - "name": "entries", - "type": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "scoreboard_id", - "type": "zigzag64" - }, - { - "name": "objective_name", - "type": "string" - }, - { - "name": "score", - "type": "li32" - }, - { - "anon": true, - "type": [ - "switch", - { - "compareTo": "type", - "fields": { - "remove": [ - "container", - [ - { - "name": "entry_type", - "type": [ - "mapper", - { - "type": "i8", - "mappings": { - "1": "player", - "2": "entity", - "3": "fake_player" - } - } - ] - }, - { - "name": "entity_unique_id", - "type": [ - "switch", - { - "compareTo": "entry_type", - "fields": { - "player": "zigzag64", - "entity": "zigzag64" - }, - "default": "void" - } - ] - }, - { - "name": "custom_name", - "type": [ - "switch", - { - "compareTo": "entry_type", - "fields": { - "fake_player": "string" - }, - "default": "void" - } - ] - } - ] - ] - }, - "default": "void" - } - ] - } - ] - ] - } - ] - } - ] - ], - "ScoreboardIdentityEntries": [ - "container", - [ - { - "name": "type", - "type": [ - "mapper", - { - "type": "i8", - "mappings": { - "0": "TYPE_REGISTER_IDENTITY", - "1": "TYPE_CLEAR_IDENTITY" - } - } - ] - }, - { - "name": "entries", - "type": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "scoreboard_id", - "type": "zigzag64" - }, - { - "name": "entity_unique_id", - "type": [ - "switch", - { - "compareTo": "type", - "fields": { - "TYPE_REGISTER_IDENTITY": "zigzag64" - }, - "default": "void" - } - ] - } - ] - ] - } - ] - } - ] - ], - "Enchant": [ - "container", - [ - { - "name": "id", - "type": "u8" - }, - { - "name": "level", - "type": "u8" - } - ] - ], - "EnchantOptions": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "cost", - "type": "varint" - }, - { - "name": "slot_flags", - "type": "li32" - }, - { - "name": "equip_enchants", - "type": [ - "array", - { - "countType": "varint", - "type": "Enchant" - } - ] - }, - { - "name": "held_enchants", - "type": [ - "array", - { - "countType": "varint", - "type": "Enchant" - } - ] - }, - { - "name": "self_enchants", - "type": [ - "array", - { - "countType": "varint", - "type": "Enchant" - } - ] - }, - { - "name": "name", - "type": "string" - }, - { - "name": "option_id", - "type": "zigzag32" - } - ] - ] - } - ], - "Action": [ - "mapper", - { - "type": "zigzag32", - "mappings": { - "0": "start_break", - "1": "abort_break", - "2": "stop_break", - "3": "get_updated_block", - "4": "drop_item", - "5": "start_sleeping", - "6": "stop_sleeping", - "7": "respawn", - "8": "jump", - "9": "start_sprint", - "10": "stop_sprint", - "11": "start_sneak", - "12": "stop_sneak", - "13": "creative_player_destroy_block", - "14": "dimension_change_ack", - "15": "start_glide", - "16": "stop_glide", - "17": "build_denied", - "18": "crack_break", - "19": "change_skin", - "20": "set_enchatnment_seed", - "21": "swimming", - "22": "stop_swimming", - "23": "start_spin_attack", - "24": "stop_spin_attack", - "25": "interact_block", - "26": "predict_break", - "27": "continue_break" - } - } - ], - "StackRequestSlotInfo": [ - "container", - [ - { - "name": "slot_type", - "type": "ContainerSlotType" - }, - { - "name": "slot", - "type": "u8" - }, - { - "name": "stack_id", - "type": "zigzag32" - } - ] - ], - "ItemStackRequest": [ - "container", - [ - { - "name": "request_id", - "type": "varint" - }, - { - "name": "actions", - "type": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "type_id", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "0": "take", - "1": "place", - "2": "swap", - "3": "drop", - "4": "destroy", - "5": "consume", - "6": "create", - "7": "lab_table_combine", - "8": "beacon_payment", - "9": "mine_block", - "10": "craft_recipe", - "11": "craft_recipe_auto", - "12": "craft_creative", - "13": "optional", - "14": "non_implemented", - "15": "results_deprecated" - } - } - ] - }, - { - "anon": true, - "type": [ - "switch", - { - "compareTo": "type_id", - "fields": { - "take": [ - "container", - [ - { - "name": "count", - "type": "u8" - }, - { - "name": "source", - "type": "StackRequestSlotInfo" - }, - { - "name": "destination", - "type": "StackRequestSlotInfo" - } - ] - ], - "place": [ - "container", - [ - { - "name": "count", - "type": "u8" - }, - { - "name": "source", - "type": "StackRequestSlotInfo" - }, - { - "name": "destination", - "type": "StackRequestSlotInfo" - } - ] - ], - "swap": [ - "container", - [ - { - "name": "source", - "type": "StackRequestSlotInfo" - }, - { - "name": "destination", - "type": "StackRequestSlotInfo" - } - ] - ], - "drop": [ - "container", - [ - { - "name": "count", - "type": "u8" - }, - { - "name": "source", - "type": "StackRequestSlotInfo" - }, - { - "name": "randomly", - "type": "bool" - } - ] - ], - "destroy": [ - "container", - [ - { - "name": "count", - "type": "u8" - }, - { - "name": "source", - "type": "StackRequestSlotInfo" - } - ] - ], - "consume": [ - "container", - [ - { - "name": "count", - "type": "u8" - }, - { - "name": "source", - "type": "StackRequestSlotInfo" - } - ] - ], - "create": [ - "container", - [ - { - "name": "result_slot_id", - "type": "u8" - } - ] - ], - "beacon_payment": [ - "container", - [ - { - "name": "primary_effect", - "type": "zigzag32" - }, - { - "name": "secondary_effect", - "type": "zigzag32" - } - ] - ], - "mine_block": [ - "container", - [ - { - "name": "unknown1", - "type": "zigzag32" - }, - { - "name": "predicted_durability", - "type": "zigzag32" - }, - { - "name": "network_id", - "type": "zigzag32" - } - ] - ], - "craft_recipe": [ - "container", - [ - { - "name": "recipe_network_id", - "type": "varint" - } - ] - ], - "craft_recipe_auto": [ - "container", - [ - { - "name": "recipe_network_id", - "type": "varint" - } - ] - ], - "craft_creative": [ - "container", - [ - { - "name": "item_id", - "type": "varint32" - } - ] - ], - "optional": [ - "container", - [ - { - "name": "recipe_network_id", - "type": "varint" - }, - { - "name": "filtered_string_index", - "type": "li32" - } - ] - ], - "non_implemented": "void", - "results_deprecated": [ - "container", - [ - { - "name": "result_items", - "type": [ - "array", - { - "countType": "varint", - "type": "Item" - } - ] - }, - { - "name": "times_crafted", - "type": "u8" - } - ] - ] - }, - "default": "void" - } - ] - } - ] - ] - } - ] - }, - { - "name": "custom_names", - "type": [ - "array", - { - "countType": "varint", - "type": "string" - } - ] - } - ] - ], - "ItemStackResponses": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "status", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "0": "ok", - "1": "error" - } - } - ] - }, - { - "name": "request_id", - "type": "varint32" - }, - { - "anon": true, - "type": [ - "switch", - { - "compareTo": "status", - "fields": { - "ok": [ - "container", - [ - { - "name": "containers", - "type": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "slot_type", - "type": "ContainerSlotType" - }, - { - "name": "slots", - "type": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "slot", - "type": "u8" - }, - { - "name": "hotbar_slot", - "type": "u8" - }, - { - "name": "count", - "type": "u8" - }, - { - "name": "item_stack_id", - "type": "varint32" - }, - { - "name": "custom_name", - "type": "string" - }, - { - "name": "durability_correction", - "type": "zigzag32" - } - ] - ] - } - ] - } - ] - ] - } - ] - } - ] - ] - }, - "default": "void" - } - ] - } - ] - ] - } - ], - "ItemComponentList": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "nbt", - "type": "nbt" - } - ] - ] - } - ], - "CommandOrigin": [ - "container", - [ - { - "name": "type", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "0": "player", - "1": "block", - "2": "minecart_block", - "3": "dev_console", - "4": "test", - "5": "automation_player", - "6": "client_automation", - "7": "dedicated_server", - "8": "entity", - "9": "virtual", - "10": "game_argument", - "11": "entity_server" - } - } - ] - }, - { - "name": "uuid", - "type": "uuid" - }, - { - "name": "request_id", - "type": "string" - }, - { - "name": "player_entity_id", - "type": [ - "switch", - { - "compareTo": "type", - "fields": { - "dev_console": [ - "container", - [ - { - "name": "player_entity_id", - "type": "zigzag64" - } - ] - ], - "test": [ - "container", - [ - { - "name": "player_entity_id", - "type": "zigzag64" - } - ] - ] - }, - "default": "void" - } - ] - } - ] - ], - "WindowID": [ - "mapper", - { - "type": "i8", - "mappings": { - "0": "inventory", - "1": "first", - "100": "last", - "119": "offhand", - "120": "armor", - "121": "creative", - "122": "hotbar", - "123": "fixed_inventory", - "124": "ui", - "-100": "drop_contents", - "-24": "beacon", - "-23": "trading_output", - "-22": "trading_use_inputs", - "-21": "trading_input_2", - "-20": "trading_input_1", - "-17": "enchant_output", - "-16": "enchant_material", - "-15": "enchant_input", - "-13": "anvil_output", - "-12": "anvil_result", - "-11": "anvil_material", - "-10": "container_input", - "-5": "crafting_use_ingredient", - "-4": "crafting_result", - "-3": "crafting_remove_ingredient", - "-2": "crafting_add_ingredient", - "-1": "none" - } - } - ], - "WindowIDVarint": [ - "mapper", - { - "type": "varint", - "mappings": { - "0": "inventory", - "1": "first", - "100": "last", - "119": "offhand", - "120": "armor", - "121": "creative", - "122": "hotbar", - "123": "fixed_inventory", - "124": "ui", - "-100": "drop_contents", - "-24": "beacon", - "-23": "trading_output", - "-22": "trading_use_inputs", - "-21": "trading_input_2", - "-20": "trading_input_1", - "-17": "enchant_output", - "-16": "enchant_material", - "-15": "enchant_input", - "-13": "anvil_output", - "-12": "anvil_result", - "-11": "anvil_material", - "-10": "container_input", - "-5": "crafting_use_ingredient", - "-4": "crafting_result", - "-3": "crafting_remove_ingredient", - "-2": "crafting_add_ingredient", - "-1": "none" - } - } - ], - "WindowType": [ - "mapper", - { - "type": "i8", - "mappings": { - "0": "container", - "1": "workbench", - "2": "furnace", - "3": "enchantment", - "4": "brewing_stand", - "5": "anvil", - "6": "dispenser", - "7": "dropper", - "8": "hopper", - "9": "cauldron", - "10": "minecart_chest", - "11": "minecart_hopper", - "12": "horse", - "13": "beacon", - "14": "structure_editor", - "15": "trading", - "16": "command_block", - "17": "jukebox", - "18": "armor", - "19": "hand", - "20": "compound_creator", - "21": "element_constructor", - "22": "material_reducer", - "23": "lab_table", - "24": "loom", - "25": "lectern", - "26": "grindstone", - "27": "blast_furnace", - "28": "smoker", - "29": "stonecutter", - "30": "cartography", - "31": "hud", - "32": "jigsaw_editor", - "33": "smithing_table", - "-9": "none", - "-1": "inventory" - } - } - ], - "ContainerSlotType": [ - "mapper", - { - "type": "u8", - "mappings": { - "0": "anvil_input", - "1": "anvil_material", - "2": "anvil_result", - "3": "smithing_table_input", - "4": "smithing_table_material", - "5": "smithing_table_result", - "6": "armor", - "7": "container", - "8": "beacon_payment", - "9": "brewing_input", - "10": "brewing_result", - "11": "brewing_fuel", - "12": "hotbar_and_inventory", - "13": "crafting_input", - "14": "crafting_output", - "15": "recipe_construction", - "16": "recipe_nature", - "17": "recipe_items", - "18": "recipe_search", - "19": "recipe_search_bar", - "20": "recipe_equipment", - "21": "enchanting_input", - "22": "enchanting_lapis", - "23": "furnace_fuel", - "24": "furnace_ingredient", - "25": "furnace_output", - "26": "horse_equip", - "27": "hotbar", - "28": "inventory", - "29": "shulker", - "30": "trade_ingredient1", - "31": "trade_ingredient2", - "32": "trade_result", - "33": "offhand", - "34": "compcreate_input", - "35": "compcreate_output", - "36": "elemconstruct_output", - "37": "matreduce_input", - "38": "matreduce_output", - "39": "labtable_input", - "40": "loom_input", - "41": "loom_dye", - "42": "loom_material", - "43": "loom_result", - "44": "blast_furnace_ingredient", - "45": "smoker_ingredient", - "46": "trade2_ingredient1", - "47": "trade2_ingredient2", - "48": "trade2_result", - "49": "grindstone_input", - "50": "grindstone_additional", - "51": "grindstone_result", - "52": "stonecutter_input", - "53": "stonecutter_result", - "54": "cartography_input", - "55": "cartography_additional", - "56": "cartography_result", - "57": "barrel", - "58": "cursor", - "59": "creative_output" - } - } - ], - "LegacyEntityType": [ - "mapper", - { - "type": "li32", - "mappings": { - "10": "chicken", - "11": "cow", - "12": "pig", - "13": "sheep", - "14": "wolf", - "15": "villager", - "16": "mooshroom", - "17": "squid", - "18": "rabbit", - "19": "bat", - "20": "iron_golem", - "21": "snow_golem", - "22": "ocelot", - "23": "horse", - "24": "donkey", - "25": "mule", - "26": "skeleton_horse", - "27": "zombie_horse", - "28": "polar_bear", - "29": "llama", - "30": "parrot", - "31": "dolphin", - "32": "zombie", - "33": "creeper", - "34": "skeleton", - "35": "spider", - "36": "zombie_pigman", - "37": "slime", - "38": "enderman", - "39": "silverfish", - "40": "cave_spider", - "41": "ghast", - "42": "magma_cube", - "43": "blaze", - "44": "zombie_villager", - "45": "witch", - "46": "stray", - "47": "husk", - "48": "wither_skeleton", - "49": "guardian", - "50": "elder_guardian", - "51": "npc", - "52": "wither", - "53": "ender_dragon", - "54": "shulker", - "55": "endermite", - "56": "agent", - "57": "vindicator", - "58": "phantom", - "61": "armor_stand", - "62": "tripod_camera", - "63": "player", - "64": "item", - "65": "tnt", - "66": "falling_block", - "67": "moving_block", - "68": "xp_bottle", - "69": "xp_orb", - "70": "eye_of_ender_signal", - "71": "ender_crystal", - "72": "fireworks_rocket", - "73": "thrown_trident", - "74": "turtle", - "75": "cat", - "76": "shulker_bullet", - "77": "fishing_hook", - "78": "chalkboard", - "79": "dragon_fireball", - "80": "arrow", - "81": "snowball", - "82": "egg", - "83": "painting", - "84": "minecart", - "85": "fireball", - "86": "splash_potion", - "87": "ender_pearl", - "88": "leash_knot", - "89": "wither_skull", - "90": "boat", - "91": "wither_skull_dangerous", - "93": "lightning_bolt", - "94": "small_fireball", - "95": "area_effect_cloud", - "96": "hopper_minecart", - "97": "tnt_minecart", - "98": "chest_minecart", - "100": "command_block_minecart", - "101": "lingering_potion", - "102": "llama_spit", - "103": "evocation_fang", - "104": "evocation_illager", - "105": "vex", - "106": "ice_bomb", - "107": "balloon", - "108": "pufferfish", - "109": "salmon", - "110": "drowned", - "111": "tropicalfish", - "112": "cod", - "113": "panda" - } - } - ], - "mcpe_packet": [ - "container", - [ - { - "name": "name", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "1": "login", - "2": "play_status", - "3": "server_to_client_handshake", - "4": "client_to_server_handshake", - "5": "disconnect", - "6": "resource_packs_info", - "7": "resource_pack_stack", - "8": "resource_pack_client_response", - "9": "text", - "10": "set_time", - "11": "start_game", - "12": "add_player", - "13": "add_entity", - "14": "remove_entity", - "15": "add_item_entity", - "17": "take_item_entity", - "18": "move_entity", - "19": "move_player", - "20": "rider_jump", - "21": "update_block", - "22": "add_painting", - "23": "tick_sync", - "24": "level_sound_event_old", - "25": "level_event", - "26": "block_event", - "27": "entity_event", - "28": "mob_effect", - "29": "update_attributes", - "30": "inventory_transaction", - "31": "mob_equipment", - "32": "mob_armor_equipment", - "33": "interact", - "34": "block_pick_request", - "35": "entity_pick_request", - "36": "player_action", - "38": "hurt_armor", - "39": "set_entity_data", - "40": "set_entity_motion", - "41": "set_entity_link", - "42": "set_health", - "43": "set_spawn_position", - "44": "animate", - "45": "respawn", - "46": "container_open", - "47": "container_close", - "48": "player_hotbar", - "49": "inventory_content", - "50": "inventory_slot", - "51": "container_set_data", - "52": "crafting_data", - "53": "crafting_event", - "54": "gui_data_pick_item", - "55": "adventure_settings", - "56": "block_entity_data", - "57": "player_input", - "58": "level_chunk", - "59": "set_commands_enabled", - "60": "set_difficulty", - "61": "change_dimension", - "62": "set_player_game_type", - "63": "player_list", - "64": "simple_event", - "65": "event", - "66": "spawn_experience_orb", - "67": "clientbound_map_item_data", - "68": "map_info_request", - "69": "request_chunk_radius", - "70": "chunk_radius_update", - "71": "item_frame_drop_item", - "72": "game_rules_changed", - "73": "camera", - "74": "boss_event", - "75": "show_credits", - "76": "available_commands", - "77": "command_request", - "78": "command_block_update", - "79": "command_output", - "80": "update_trade", - "81": "update_equipment", - "82": "resource_pack_data_info", - "83": "resource_pack_chunk_data", - "84": "resource_pack_chunk_request", - "85": "transfer", - "86": "play_sound", - "87": "stop_sound", - "88": "set_title", - "89": "add_behavior_tree", - "90": "structure_block_update", - "91": "show_store_offer", - "92": "purchase_receipt", - "93": "player_skin", - "94": "sub_client_login", - "95": "initiate_web_socket_connection", - "96": "set_last_hurt_by", - "97": "book_edit", - "98": "npc_request", - "99": "photo_transfer", - "100": "modal_form_request", - "101": "modal_form_response", - "102": "server_settings_request", - "103": "server_settings_response", - "104": "show_profile", - "105": "set_default_game_type", - "106": "remove_objective", - "107": "set_display_objective", - "108": "set_score", - "109": "lab_table", - "110": "update_block_synced", - "111": "move_entity_delta", - "112": "set_scoreboard_identity", - "113": "set_local_player_as_initialized", - "114": "update_soft_enum", - "115": "network_stack_latency", - "117": "script_custom_event", - "118": "spawn_particle_effect", - "119": "available_entity_identifiers", - "120": "level_sound_event_v2", - "121": "network_chunk_publisher_update", - "122": "biome_definition_list", - "123": "level_sound_event", - "124": "level_event_generic", - "125": "lectern_update", - "126": "video_stream_connect", - "127": "add_ecs_entity", - "128": "remove_ecs_entity", - "129": "client_cache_status", - "130": "on_screen_texture_animation", - "131": "map_create_locked_copy", - "132": "structure_template_data_export_request", - "133": "structure_template_data_export_response", - "134": "update_block_properties", - "135": "client_cache_blob_status", - "136": "client_cache_miss_response", - "137": "education_settings", - "139": "multiplayer_settings", - "140": "settings_command", - "141": "anvil_damage", - "142": "completed_using_item", - "143": "network_settings", - "144": "player_auth_input", - "145": "creative_content", - "146": "player_enchant_options", - "147": "item_stack_request", - "148": "item_stack_response", - "149": "player_armor_damage", - "151": "update_player_game_type", - "153": "position_tracking_db_broadcast", - "154": "position_tracking_db_request", - "156": "packet_violation_warning", - "157": "motion_prediction_hints", - "158": "animate_entity", - "159": "camera_shake", - "160": "player_fog", - "161": "correct_player_move_prediction", - "162": "item_component", - "163": "filter_text_packet", - "164": "debug_renderer" - } - } - ] - }, - { - "name": "params", - "type": [ - "switch", - { - "compareTo": "name", - "fields": { - "login": "packet_login", - "play_status": "packet_play_status", - "server_to_client_handshake": "packet_server_to_client_handshake", - "client_to_server_handshake": "packet_client_to_server_handshake", - "disconnect": "packet_disconnect", - "resource_packs_info": "packet_resource_packs_info", - "resource_pack_stack": "packet_resource_pack_stack", - "resource_pack_client_response": "packet_resource_pack_client_response", - "text": "packet_text", - "set_time": "packet_set_time", - "start_game": "packet_start_game", - "add_player": "packet_add_player", - "add_entity": "packet_add_entity", - "remove_entity": "packet_remove_entity", - "add_item_entity": "packet_add_item_entity", - "take_item_entity": "packet_take_item_entity", - "move_entity": "packet_move_entity", - "move_player": "packet_move_player", - "rider_jump": "packet_rider_jump", - "update_block": "packet_update_block", - "add_painting": "packet_add_painting", - "tick_sync": "packet_tick_sync", - "level_sound_event_old": "packet_level_sound_event_old", - "level_event": "packet_level_event", - "block_event": "packet_block_event", - "entity_event": "packet_entity_event", - "mob_effect": "packet_mob_effect", - "update_attributes": "packet_update_attributes", - "inventory_transaction": "packet_inventory_transaction", - "mob_equipment": "packet_mob_equipment", - "mob_armor_equipment": "packet_mob_armor_equipment", - "interact": "packet_interact", - "block_pick_request": "packet_block_pick_request", - "entity_pick_request": "packet_entity_pick_request", - "player_action": "packet_player_action", - "hurt_armor": "packet_hurt_armor", - "set_entity_data": "packet_set_entity_data", - "set_entity_motion": "packet_set_entity_motion", - "set_entity_link": "packet_set_entity_link", - "set_health": "packet_set_health", - "set_spawn_position": "packet_set_spawn_position", - "animate": "packet_animate", - "respawn": "packet_respawn", - "container_open": "packet_container_open", - "container_close": "packet_container_close", - "player_hotbar": "packet_player_hotbar", - "inventory_content": "packet_inventory_content", - "inventory_slot": "packet_inventory_slot", - "container_set_data": "packet_container_set_data", - "crafting_data": "packet_crafting_data", - "crafting_event": "packet_crafting_event", - "gui_data_pick_item": "packet_gui_data_pick_item", - "adventure_settings": "packet_adventure_settings", - "block_entity_data": "packet_block_entity_data", - "player_input": "packet_player_input", - "level_chunk": "packet_level_chunk", - "set_commands_enabled": "packet_set_commands_enabled", - "set_difficulty": "packet_set_difficulty", - "change_dimension": "packet_change_dimension", - "set_player_game_type": "packet_set_player_game_type", - "player_list": "packet_player_list", - "simple_event": "packet_simple_event", - "event": "packet_event", - "spawn_experience_orb": "packet_spawn_experience_orb", - "clientbound_map_item_data": "packet_clientbound_map_item_data", - "map_info_request": "packet_map_info_request", - "request_chunk_radius": "packet_request_chunk_radius", - "chunk_radius_update": "packet_chunk_radius_update", - "item_frame_drop_item": "packet_item_frame_drop_item", - "game_rules_changed": "packet_game_rules_changed", - "camera": "packet_camera", - "boss_event": "packet_boss_event", - "show_credits": "packet_show_credits", - "available_commands": "packet_available_commands", - "command_request": "packet_command_request", - "command_block_update": "packet_command_block_update", - "command_output": "packet_command_output", - "update_trade": "packet_update_trade", - "update_equipment": "packet_update_equipment", - "resource_pack_data_info": "packet_resource_pack_data_info", - "resource_pack_chunk_data": "packet_resource_pack_chunk_data", - "resource_pack_chunk_request": "packet_resource_pack_chunk_request", - "transfer": "packet_transfer", - "play_sound": "packet_play_sound", - "stop_sound": "packet_stop_sound", - "set_title": "packet_set_title", - "add_behavior_tree": "packet_add_behavior_tree", - "structure_block_update": "packet_structure_block_update", - "show_store_offer": "packet_show_store_offer", - "purchase_receipt": "packet_purchase_receipt", - "player_skin": "packet_player_skin", - "sub_client_login": "packet_sub_client_login", - "initiate_web_socket_connection": "packet_initiate_web_socket_connection", - "set_last_hurt_by": "packet_set_last_hurt_by", - "book_edit": "packet_book_edit", - "npc_request": "packet_npc_request", - "photo_transfer": "packet_photo_transfer", - "modal_form_request": "packet_modal_form_request", - "modal_form_response": "packet_modal_form_response", - "server_settings_request": "packet_server_settings_request", - "server_settings_response": "packet_server_settings_response", - "show_profile": "packet_show_profile", - "set_default_game_type": "packet_set_default_game_type", - "remove_objective": "packet_remove_objective", - "set_display_objective": "packet_set_display_objective", - "set_score": "packet_set_score", - "lab_table": "packet_lab_table", - "update_block_synced": "packet_update_block_synced", - "move_entity_delta": "packet_move_entity_delta", - "set_scoreboard_identity": "packet_set_scoreboard_identity", - "set_local_player_as_initialized": "packet_set_local_player_as_initialized", - "update_soft_enum": "packet_update_soft_enum", - "network_stack_latency": "packet_network_stack_latency", - "script_custom_event": "packet_script_custom_event", - "spawn_particle_effect": "packet_spawn_particle_effect", - "available_entity_identifiers": "packet_available_entity_identifiers", - "level_sound_event_v2": "packet_level_sound_event_v2", - "network_chunk_publisher_update": "packet_network_chunk_publisher_update", - "biome_definition_list": "packet_biome_definition_list", - "level_sound_event": "packet_level_sound_event", - "level_event_generic": "packet_level_event_generic", - "lectern_update": "packet_lectern_update", - "video_stream_connect": "packet_video_stream_connect", - "add_ecs_entity": "packet_add_ecs_entity", - "remove_ecs_entity": "packet_remove_ecs_entity", - "client_cache_status": "packet_client_cache_status", - "on_screen_texture_animation": "packet_on_screen_texture_animation", - "map_create_locked_copy": "packet_map_create_locked_copy", - "structure_template_data_export_request": "packet_structure_template_data_export_request", - "structure_template_data_export_response": "packet_structure_template_data_export_response", - "update_block_properties": "packet_update_block_properties", - "client_cache_blob_status": "packet_client_cache_blob_status", - "client_cache_miss_response": "packet_client_cache_miss_response", - "education_settings": "packet_education_settings", - "multiplayer_settings": "packet_multiplayer_settings", - "settings_command": "packet_settings_command", - "anvil_damage": "packet_anvil_damage", - "completed_using_item": "packet_completed_using_item", - "network_settings": "packet_network_settings", - "player_auth_input": "packet_player_auth_input", - "creative_content": "packet_creative_content", - "player_enchant_options": "packet_player_enchant_options", - "item_stack_request": "packet_item_stack_request", - "item_stack_response": "packet_item_stack_response", - "player_armor_damage": "packet_player_armor_damage", - "update_player_game_type": "packet_update_player_game_type", - "position_tracking_db_request": "packet_position_tracking_db_request", - "position_tracking_db_broadcast": "packet_position_tracking_db_broadcast", - "packet_violation_warning": "packet_packet_violation_warning", - "motion_prediction_hints": "packet_motion_prediction_hints", - "animate_entity": "packet_animate_entity", - "camera_shake": "packet_camera_shake", - "player_fog": "packet_player_fog", - "correct_player_move_prediction": "packet_correct_player_move_prediction", - "item_component": "packet_item_component", - "filter_text_packet": "packet_filter_text_packet", - "debug_renderer": "packet_debug_renderer" - }, - "default": "void" - } - ] - } - ] - ], - "packet_login": [ - "container", - [ - { - "name": "protocol_version", - "type": "i32" - }, - { - "name": "tokens", - "type": [ - "encapsulated", - { - "lengthType": "varint", - "type": "LoginTokens" - } - ] - } - ] - ], - "LoginTokens": [ - "container", - [ - { - "name": "identity", - "type": "LittleString" - }, - { - "name": "client", - "type": "LittleString" - } - ] - ], - "packet_play_status": [ - "container", - [ - { - "name": "status", - "type": [ - "mapper", - { - "type": "i32", - "mappings": { - "0": "login_success", - "1": "failed_client", - "2": "failed_spawn", - "3": "player_spawn", - "4": "failed_invalid_tenant", - "5": "failed_vanilla_edu", - "6": "failed_edu_vanilla", - "7": "failed_server_full" - } - } - ] - } - ] - ], - "packet_server_to_client_handshake": [ - "container", - [ - { - "name": "token", - "type": "string" - } - ] - ], - "packet_client_to_server_handshake": [ - "container", - [] - ], - "packet_disconnect": [ - "container", - [ - { - "name": "hide_disconnect_reason", - "type": "bool" - }, - { - "name": "message", - "type": "string" - } - ] - ], - "packet_resource_packs_info": [ - "container", - [ - { - "name": "must_accept", - "type": "bool" - }, - { - "name": "has_scripts", - "type": "bool" - }, - { - "name": "behaviour_packs", - "type": "BehaviourPackInfos" - }, - { - "name": "texture_packs", - "type": "TexturePackInfos" - } - ] - ], - "packet_resource_pack_stack": [ - "container", - [ - { - "name": "must_accept", - "type": "bool" - }, - { - "name": "behavior_packs", - "type": "ResourcePackIdVersions" - }, - { - "name": "resource_packs", - "type": "ResourcePackIdVersions" - }, - { - "name": "game_version", - "type": "string" - }, - { - "name": "experiments", - "type": "Experiments" - }, - { - "name": "experiments_previously_used", - "type": "bool" - } - ] - ], - "packet_resource_pack_client_response": [ - "container", - [ - { - "name": "response_status", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "0": "none", - "1": "refused", - "2": "send_packs", - "3": "have_all_packs", - "4": "completed" - } - } - ] - }, - { - "name": "resourcepackids", - "type": "ResourcePackIds" - } - ] - ], - "packet_text": [ - "container", - [ - { - "name": "type", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "0": "raw", - "1": "chat", - "2": "translation", - "3": "popup", - "4": "jukebox_popup", - "5": "tip", - "6": "system", - "7": "whisper", - "8": "announcement", - "9": "json_whisper", - "10": "json" - } - } - ] - }, - { - "name": "needs_translation", - "type": "bool" - }, - { - "anon": true, - "type": [ - "switch", - { - "compareTo": "type", - "fields": { - "chat": [ - "container", - [ - { - "name": "source_name", - "type": "string" - }, - { - "name": "message", - "type": "string" - } - ] - ], - "whisper": [ - "container", - [ - { - "name": "source_name", - "type": "string" - }, - { - "name": "message", - "type": "string" - } - ] - ], - "announcement": [ - "container", - [ - { - "name": "source_name", - "type": "string" - }, - { - "name": "message", - "type": "string" - } - ] - ], - "raw": [ - "container", - [ - { - "name": "message", - "type": "string" - } - ] - ], - "tip": [ - "container", - [ - { - "name": "message", - "type": "string" - } - ] - ], - "system": [ - "container", - [ - { - "name": "message", - "type": "string" - } - ] - ], - "json_whisper": [ - "container", - [ - { - "name": "message", - "type": "string" - } - ] - ], - "json": [ - "container", - [ - { - "name": "message", - "type": "string" - } - ] - ], - "translation": [ - "container", - [ - { - "name": "message", - "type": "string" - }, - { - "name": "paramaters", - "type": [ - "array", - { - "countType": "varint", - "type": "string" - } - ] - } - ] - ], - "popup": [ - "container", - [ - { - "name": "message", - "type": "string" - }, - { - "name": "paramaters", - "type": [ - "array", - { - "countType": "varint", - "type": "string" - } - ] - } - ] - ], - "jukebox_popup": [ - "container", - [ - { - "name": "message", - "type": "string" - }, - { - "name": "paramaters", - "type": [ - "array", - { - "countType": "varint", - "type": "string" - } - ] - } - ] - ] - }, - "default": "void" - } - ] - }, - { - "name": "xuid", - "type": "string" - }, - { - "name": "platform_chat_id", - "type": "string" - } - ] - ], - "packet_set_time": [ - "container", - [ - { - "name": "time", - "type": "zigzag32" - } - ] - ], - "packet_start_game": [ - "container", - [ - { - "name": "entity_id", - "type": "zigzag64" - }, - { - "name": "runtime_entity_id", - "type": "varint64" - }, - { - "name": "player_gamemode", - "type": "GameMode" - }, - { - "name": "player_position", - "type": "vec3f" - }, - { - "name": "rotation", - "type": "vec2f" - }, - { - "name": "seed", - "type": "zigzag32" - }, - { - "name": "biome_type", - "type": "li16" - }, - { - "name": "biome_name", - "type": "string" - }, - { - "name": "dimension", - "type": "zigzag32" - }, - { - "name": "generator", - "type": "zigzag32" - }, - { - "name": "world_gamemode", - "type": "GameMode" - }, - { - "name": "difficulty", - "type": "zigzag32" - }, - { - "name": "spawn_position", - "type": "BlockCoordinates" - }, - { - "name": "achievements_disabled", - "type": "bool" - }, - { - "name": "day_cycle_stop_time", - "type": "zigzag32" - }, - { - "name": "edu_offer", - "type": "zigzag32" - }, - { - "name": "edu_features_enabled", - "type": "bool" - }, - { - "name": "edu_product_uuid", - "type": "string" - }, - { - "name": "rain_level", - "type": "lf32" - }, - { - "name": "lightning_level", - "type": "lf32" - }, - { - "name": "has_confirmed_platform_locked_content", - "type": "bool" - }, - { - "name": "is_multiplayer", - "type": "bool" - }, - { - "name": "broadcast_to_lan", - "type": "bool" - }, - { - "name": "xbox_live_broadcast_mode", - "type": "varint" - }, - { - "name": "platform_broadcast_mode", - "type": "varint" - }, - { - "name": "enable_commands", - "type": "bool" - }, - { - "name": "is_texturepacks_required", - "type": "bool" - }, - { - "name": "gamerules", - "type": "GameRules" - }, - { - "name": "experiments", - "type": "Experiments" - }, - { - "name": "experiments_previously_used", - "type": "bool" - }, - { - "name": "bonus_chest", - "type": "bool" - }, - { - "name": "map_enabled", - "type": "bool" - }, - { - "name": "permission_level", - "type": "zigzag32" - }, - { - "name": "server_chunk_tick_range", - "type": "li32" - }, - { - "name": "has_locked_behavior_pack", - "type": "bool" - }, - { - "name": "has_locked_resource_pack", - "type": "bool" - }, - { - "name": "is_from_locked_world_template", - "type": "bool" - }, - { - "name": "msa_gamertags_only", - "type": "bool" - }, - { - "name": "is_from_world_template", - "type": "bool" - }, - { - "name": "is_world_template_option_locked", - "type": "bool" - }, - { - "name": "only_spawn_v1_villagers", - "type": "bool" - }, - { - "name": "game_version", - "type": "string" - }, - { - "name": "limited_world_width", - "type": "li32" - }, - { - "name": "limited_world_length", - "type": "li32" - }, - { - "name": "is_new_nether", - "type": "bool" - }, - { - "name": "experimental_gameplay_override", - "type": "bool" - }, - { - "name": "level_id", - "type": "string" - }, - { - "name": "world_name", - "type": "string" - }, - { - "name": "premium_world_template_id", - "type": "string" - }, - { - "name": "is_trial", - "type": "bool" - }, - { - "name": "movement_authority", - "type": [ - "mapper", - { - "type": "zigzag32", - "mappings": { - "0": "client", - "1": "server", - "2": "server_with_rewind" - } - } - ] - }, - { - "name": "rewind_history_size", - "type": "zigzag32" - }, - { - "name": "server_authoritative_block_breaking", - "type": "bool" - }, - { - "name": "current_tick", - "type": "li64" - }, - { - "name": "enchantment_seed", - "type": "zigzag32" - }, - { - "name": "block_palette", - "type": "BlockPalette" - }, - { - "name": "itemstates", - "type": "Itemstates" - }, - { - "name": "multiplayer_correlation_id", - "type": "string" - }, - { - "name": "server_authoritative_inventory", - "type": "bool" - } - ] - ], - "packet_add_player": [ - "container", - [ - { - "name": "uuid", - "type": "uuid" - }, - { - "name": "username", - "type": "string" - }, - { - "name": "entity_id_self", - "type": "zigzag64" - }, - { - "name": "runtime_entity_id", - "type": "varint64" - }, - { - "name": "platform_chat_id", - "type": "string" - }, - { - "name": "x", - "type": "lf32" - }, - { - "name": "y", - "type": "lf32" - }, - { - "name": "z", - "type": "lf32" - }, - { - "name": "speed_x", - "type": "lf32" - }, - { - "name": "speed_y", - "type": "lf32" - }, - { - "name": "speed_z", - "type": "lf32" - }, - { - "name": "pitch", - "type": "lf32" - }, - { - "name": "yaw", - "type": "lf32" - }, - { - "name": "head_yaw", - "type": "lf32" - }, - { - "name": "held_item", - "type": "Item" - }, - { - "name": "metadata", - "type": "MetadataDictionary" - }, - { - "name": "flags", - "type": "varint" - }, - { - "name": "command_permission", - "type": "varint" - }, - { - "name": "action_permissions", - "type": "varint" - }, - { - "name": "permission_level", - "type": "varint" - }, - { - "name": "custom_stored_permissions", - "type": "varint" - }, - { - "name": "user_id", - "type": "li64" - }, - { - "name": "links", - "type": "Links" - }, - { - "name": "device_id", - "type": "string" - }, - { - "name": "device_os", - "type": "li32" - } - ] - ], - "packet_add_entity": [ - "container", - [ - { - "name": "entity_id_self", - "type": "zigzag64" - }, - { - "name": "runtime_entity_id", - "type": "varint64" - }, - { - "name": "entity_type", - "type": "string" - }, - { - "name": "x", - "type": "lf32" - }, - { - "name": "y", - "type": "lf32" - }, - { - "name": "z", - "type": "lf32" - }, - { - "name": "speed_x", - "type": "lf32" - }, - { - "name": "speed_y", - "type": "lf32" - }, - { - "name": "speed_z", - "type": "lf32" - }, - { - "name": "pitch", - "type": "lf32" - }, - { - "name": "yaw", - "type": "lf32" - }, - { - "name": "head_yaw", - "type": "lf32" - }, - { - "name": "attributes", - "type": "EntityAttributes" - }, - { - "name": "metadata", - "type": "MetadataDictionary" - }, - { - "name": "links", - "type": "Links" - } - ] - ], - "packet_remove_entity": [ - "container", - [ - { - "name": "entity_id_self", - "type": "zigzag64" - } - ] - ], - "packet_add_item_entity": [ - "container", - [ - { - "name": "entity_id_self", - "type": "zigzag64" - }, - { - "name": "runtime_entity_id", - "type": "varint64" - }, - { - "name": "item", - "type": "Item" - }, - { - "name": "x", - "type": "lf32" - }, - { - "name": "y", - "type": "lf32" - }, - { - "name": "z", - "type": "lf32" - }, - { - "name": "speed_x", - "type": "lf32" - }, - { - "name": "speed_y", - "type": "lf32" - }, - { - "name": "speed_z", - "type": "lf32" - }, - { - "name": "metadata", - "type": "MetadataDictionary" - }, - { - "name": "is_from_fishing", - "type": "bool" - } - ] - ], - "packet_take_item_entity": [ - "container", - [ - { - "name": "runtime_entity_id", - "type": "varint64" - }, - { - "name": "target", - "type": "varint" - } - ] - ], - "packet_move_entity": [ - "container", - [ - { - "name": "runtime_entity_id", - "type": "varint64" - }, - { - "name": "flags", - "type": "u8" - }, - { - "name": "position", - "type": "vec3f" - }, - { - "name": "rotation", - "type": "Rotation" - } - ] - ], - "packet_move_player": [ - "container", - [ - { - "name": "runtime_id", - "type": "varint" - }, - { - "name": "position", - "type": "vec3f" - }, - { - "name": "pitch", - "type": "lf32" - }, - { - "name": "yaw", - "type": "lf32" - }, - { - "name": "head_yaw", - "type": "lf32" - }, - { - "name": "mode", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "0": "normal", - "1": "reset", - "2": "teleport", - "3": "rotation" - } - } - ] - }, - { - "name": "on_ground", - "type": "bool" - }, - { - "name": "ridden_runtime_id", - "type": "varint" - }, - { - "name": "teleport", - "type": [ - "switch", - { - "compareTo": "mode", - "fields": { - "teleport": [ - "container", - [ - { - "name": "cause", - "type": [ - "mapper", - { - "type": "li32", - "mappings": { - "0": "unknown", - "1": "projectile", - "2": "chorus_fruit", - "3": "command", - "4": "behavior" - } - } - ] - }, - { - "name": "source_entity_type", - "type": "LegacyEntityType" - } - ] - ] - }, - "default": "void" - } - ] - }, - { - "name": "tick", - "type": "varint64" - } - ] - ], - "packet_rider_jump": [ - "container", - [ - { - "name": "jump_strength", - "type": "zigzag32" - } - ] - ], - "packet_update_block": [ - "container", - [ - { - "name": "position", - "type": "BlockCoordinates" - }, - { - "name": "block_runtime_id", - "type": "varint" - }, - { - "name": "flags", - "type": "UpdateBlockFlags" - }, - { - "name": "layer", - "type": "varint" - } - ] - ], - "packet_add_painting": [ - "container", - [ - { - "name": "entity_id_self", - "type": "zigzag64" - }, - { - "name": "runtime_entity_id", - "type": "varint64" - }, - { - "name": "coordinates", - "type": "BlockCoordinates" - }, - { - "name": "direction", - "type": "zigzag32" - }, - { - "name": "title", - "type": "string" - } - ] - ], - "packet_tick_sync": [ - "container", - [ - { - "name": "request_time", - "type": "li64" - }, - { - "name": "response_time", - "type": "li64" - } - ] - ], - "packet_level_sound_event_old": [ - "container", - [ - { - "name": "sound_id", - "type": "u8" - }, - { - "name": "position", - "type": "vec3f" - }, - { - "name": "block_id", - "type": "zigzag32" - }, - { - "name": "entity_type", - "type": "zigzag32" - }, - { - "name": "is_baby_mob", - "type": "bool" - }, - { - "name": "is_global", - "type": "bool" - } - ] - ], - "packet_level_event": [ - "container", - [ - { - "name": "event", - "type": [ - "mapper", - { - "type": "zigzag32", - "mappings": { - "1000": "sound_click", - "1001": "sound_click_fail", - "1002": "sound_shoot", - "1003": "sound_door", - "1004": "sound_fizz", - "1005": "sound_ignite", - "1007": "sound_ghast", - "1008": "sound_ghast_shoot", - "1009": "sound_blaze_shoot", - "1010": "sound_door_bump", - "1012": "sound_door_crash", - "1018": "sound_enderman_teleport", - "1020": "sound_anvil_break", - "1021": "sound_anvil_use", - "1022": "sound_anvil_fall", - "1030": "sound_pop", - "1032": "sound_portal", - "1040": "sound_itemframe_add_item", - "1041": "sound_itemframe_remove", - "1042": "sound_itemframe_place", - "1043": "sound_itemframe_remove_item", - "1044": "sound_itemframe_rotate_item", - "1050": "sound_camera", - "1051": "sound_orb", - "1052": "sound_totem", - "1060": "sound_armor_stand_break", - "1061": "sound_armor_stand_hit", - "1062": "sound_armor_stand_fall", - "1063": "sound_armor_stand_place", - "2000": "particle_shoot", - "2001": "particle_destroy", - "2002": "particle_splash", - "2003": "particle_eye_despawn", - "2004": "particle_spawn", - "2006": "guardian_curse", - "2008": "particle_block_force_field", - "2009": "particle_projectile_hit", - "2013": "particle_enderman_teleport", - "2014": "particle_punch_block", - "3001": "start_rain", - "3002": "start_thunder", - "3003": "stop_rain", - "3004": "stop_thunder", - "3005": "pause_game", - "3006": "pause_game_no_screen", - "3007": "set_game_speed", - "3500": "redstone_trigger", - "3501": "cauldron_explode", - "3502": "cauldron_dye_armor", - "3503": "cauldron_clean_armor", - "3504": "cauldron_fill_potion", - "3505": "cauldron_take_potion", - "3506": "cauldron_fill_water", - "3507": "cauldron_take_water", - "3508": "cauldron_add_dye", - "3509": "cauldron_clean_banner", - "3600": "block_start_break", - "3601": "block_stop_break", - "4000": "set_data", - "9800": "players_sleeping", - "16384": "add_particle_mask" - } - } - ] - }, - { - "name": "position", - "type": "vec3f" - }, - { - "name": "data", - "type": "zigzag32" - } - ] - ], - "packet_block_event": [ - "container", - [ - { - "name": "position", - "type": "BlockCoordinates" - }, - { - "name": "type", - "type": [ - "mapper", - { - "type": "zigzag32", - "mappings": { - "0": "sound", - "1": "change_state" - } - } - ] - }, - { - "name": "data", - "type": "zigzag32" - } - ] - ], - "packet_entity_event": [ - "container", - [ - { - "name": "runtime_entity_id", - "type": "varint64" - }, - { - "name": "event_id", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "1": "jump", - "2": "hurt_animation", - "3": "death_animation", - "4": "arm_swing", - "5": "stop_attack", - "6": "tame_fail", - "7": "tame_success", - "8": "shake_wet", - "9": "use_item", - "10": "eat_grass_animation", - "11": "fish_hook_bubble", - "12": "fish_hook_position", - "13": "fish_hook_hook", - "14": "fish_hook_tease", - "15": "squid_ink_cloud", - "16": "zombie_villager_cure", - "18": "respawn", - "19": "iron_golem_offer_flower", - "20": "iron_golem_withdraw_flower", - "21": "love_particles", - "22": "villager_angry", - "23": "villager_happy", - "24": "witch_spell_particles", - "25": "firework_particles", - "26": "in_love_particles", - "27": "silverfish_spawn_animation", - "28": "guardian_attack", - "29": "witch_drink_potion", - "30": "witch_throw_potion", - "31": "minecart_tnt_prime_fuse", - "32": "creeper_prime_fuse", - "33": "air_supply_expired", - "34": "player_add_xp_levels", - "35": "elder_guardian_curse", - "36": "agent_arm_swing", - "37": "ender_dragon_death", - "38": "dust_particles", - "39": "arrow_shake", - "57": "eating_item", - "60": "baby_animal_feed", - "61": "death_smoke_cloud", - "62": "complete_trade", - "63": "remove_leash", - "65": "consume_totem", - "66": "player_check_treasure_hunter_achievement", - "67": "entity_spawn", - "68": "dragon_puke", - "69": "item_entity_merge", - "70": "start_swim", - "71": "balloon_pop", - "72": "treasure_hunt", - "73": "agent_summon", - "74": "charged_crossbow", - "75": "fall" - } - } - ] - }, - { - "name": "data", - "type": "zigzag32" - } - ] - ], - "packet_mob_effect": [ - "container", - [ - { - "name": "runtime_entity_id", - "type": "varint64" - }, - { - "name": "event_id", - "type": "u8" - }, - { - "name": "effect_id", - "type": "zigzag32" - }, - { - "name": "amplifier", - "type": "zigzag32" - }, - { - "name": "particles", - "type": "bool" - }, - { - "name": "duration", - "type": "zigzag32" - } - ] - ], - "packet_update_attributes": [ - "container", - [ - { - "name": "runtime_entity_id", - "type": "varint64" - }, - { - "name": "attributes", - "type": "PlayerAttributes" - }, - { - "name": "tick", - "type": "varint64" - } - ] - ], - "packet_inventory_transaction": [ - "container", - [ - { - "name": "transaction", - "type": "Transaction" - } - ] - ], - "packet_mob_equipment": [ - "container", - [ - { - "name": "runtime_entity_id", - "type": "varint64" - }, - { - "name": "item", - "type": "Item" - }, - { - "name": "slot", - "type": "u8" - }, - { - "name": "selected_slot", - "type": "u8" - }, - { - "name": "window_id", - "type": "WindowID" - } - ] - ], - "packet_mob_armor_equipment": [ - "container", - [ - { - "name": "runtime_entity_id", - "type": "varint64" - }, - { - "name": "helmet", - "type": "Item" - }, - { - "name": "chestplate", - "type": "Item" - }, - { - "name": "leggings", - "type": "Item" - }, - { - "name": "boots", - "type": "Item" - } - ] - ], - "packet_interact": [ - "container", - [ - { - "name": "action_id", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "3": "leave_vehicle", - "4": "mouse_over_entity", - "6": "open_inventory" - } - } - ] - }, - { - "name": "target_entity_id", - "type": "varint64" - }, - { - "name": "position", - "type": [ - "switch", - { - "compareTo": "action_id", - "fields": { - "mouse_over_entity": "vec3f", - "leave_vehicle": "vec3f" - }, - "default": "void" - } - ] - } - ] - ], - "packet_block_pick_request": [ - "container", - [ - { - "name": "x", - "type": "zigzag32" - }, - { - "name": "y", - "type": "zigzag32" - }, - { - "name": "z", - "type": "zigzag32" - }, - { - "name": "add_user_data", - "type": "bool" - }, - { - "name": "selected_slot", - "type": "u8" - } - ] - ], - "packet_entity_pick_request": [ - "container", - [ - { - "name": "runtime_entity_id", - "type": "lu64" - }, - { - "name": "selected_slot", - "type": "u8" - } - ] - ], - "packet_player_action": [ - "container", - [ - { - "name": "runtime_entity_id", - "type": "varint64" - }, - { - "name": "action", - "type": "Action" - }, - { - "name": "position", - "type": "BlockCoordinates" - }, - { - "name": "face", - "type": "zigzag32" - } - ] - ], - "packet_hurt_armor": [ - "container", - [ - { - "name": "health", - "type": "zigzag32" - } - ] - ], - "packet_set_entity_data": [ - "container", - [ - { - "name": "runtime_entity_id", - "type": "varint64" - }, - { - "name": "metadata", - "type": "MetadataDictionary" - }, - { - "name": "tick", - "type": "varint" - } - ] - ], - "packet_set_entity_motion": [ - "container", - [ - { - "name": "runtime_entity_id", - "type": "varint64" - }, - { - "name": "velocity", - "type": "vec3f" - } - ] - ], - "packet_set_entity_link": [ - "container", - [ - { - "name": "link", - "type": "Link" - } - ] - ], - "packet_set_health": [ - "container", - [ - { - "name": "health", - "type": "zigzag32" - } - ] - ], - "packet_set_spawn_position": [ - "container", - [ - { - "name": "spawn_type", - "type": [ - "mapper", - { - "type": "zigzag32", - "mappings": { - "0": "player", - "1": "world" - } - } - ] - }, - { - "name": "player_position", - "type": "BlockCoordinates" - }, - { - "name": "dimension", - "type": "zigzag32" - }, - { - "name": "world_position", - "type": "BlockCoordinates" - } - ] - ], - "packet_animate": [ - "container", - [ - { - "name": "action_id", - "type": "zigzag32" - }, - { - "name": "runtime_entity_id", - "type": "varint64" - } - ] - ], - "packet_respawn": [ - "container", - [ - { - "name": "x", - "type": "lf32" - }, - { - "name": "y", - "type": "lf32" - }, - { - "name": "z", - "type": "lf32" - }, - { - "name": "state", - "type": "u8" - }, - { - "name": "runtime_entity_id", - "type": "varint64" - } - ] - ], - "packet_container_open": [ - "container", - [ - { - "name": "window_id", - "type": "WindowID" - }, - { - "name": "window_type", - "type": "WindowType" - }, - { - "name": "coordinates", - "type": "BlockCoordinates" - }, - { - "name": "runtime_entity_id", - "type": "zigzag64" - } - ] - ], - "packet_container_close": [ - "container", - [ - { - "name": "window_id", - "type": "WindowID" - }, - { - "name": "server", - "type": "bool" - } - ] - ], - "packet_player_hotbar": [ - "container", - [ - { - "name": "selected_slot", - "type": "varint" - }, - { - "name": "window_id", - "type": "WindowID" - }, - { - "name": "select_slot", - "type": "bool" - } - ] - ], - "packet_inventory_content": [ - "container", - [ - { - "name": "window_id", - "type": "WindowIDVarint" - }, - { - "name": "input", - "type": "ItemStacks" - } - ] - ], - "packet_inventory_slot": [ - "container", - [ - { - "name": "window_id", - "type": "WindowIDVarint" - }, - { - "name": "slot", - "type": "varint" - }, - { - "name": "item", - "type": "ItemStack" - } - ] - ], - "packet_container_set_data": [ - "container", - [ - { - "name": "window_id", - "type": "WindowID" - }, - { - "name": "property", - "type": "zigzag32" - }, - { - "name": "value", - "type": "zigzag32" - } - ] - ], - "packet_crafting_data": [ - "container", - [ - { - "name": "recipes", - "type": "Recipes" - }, - { - "name": "potion_type_recipes", - "type": "PotionTypeRecipes" - }, - { - "name": "potion_container_recipes", - "type": "PotionContainerChangeRecipes" - }, - { - "name": "is_clean", - "type": "bool" - } - ] - ], - "packet_crafting_event": [ - "container", - [ - { - "name": "window_id", - "type": "WindowID" - }, - { - "name": "recipe_type", - "type": [ - "mapper", - { - "type": "zigzag32", - "mappings": { - "0": "inventory", - "1": "crafting", - "2": "workbench" - } - } - ] - }, - { - "name": "recipe_id", - "type": "uuid" - }, - { - "name": "input", - "type": [ - "array", - { - "countType": "varint", - "type": "Item" - } - ] - }, - { - "name": "result", - "type": [ - "array", - { - "countType": "varint", - "type": "Item" - } - ] - } - ] - ], - "packet_gui_data_pick_item": [ - "container", - [ - { - "name": "item_name", - "type": "string" - }, - { - "name": "item_effects", - "type": "string" - }, - { - "name": "hotbar_slot", - "type": "li32" - } - ] - ], - "packet_adventure_settings": [ - "container", - [ - { - "name": "flags", - "type": "AdventureFlags" - }, - { - "name": "command_permission", - "type": [ - "mapper", - { - "type": "varint32", - "mappings": { - "0": "normal", - "1": "operator", - "2": "host", - "3": "automation", - "4": "admin" - } - } - ] - }, - { - "name": "action_permissions", - "type": "ActionPermissions" - }, - { - "name": "permission_level", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "0": "visitor", - "1": "member", - "2": "operator", - "3": "custom" - } - } - ] - }, - { - "name": "custom_stored_permissions", - "type": "varint" - }, - { - "name": "user_id", - "type": "li64" - } - ] - ], - "packet_block_entity_data": [ - "container", - [ - { - "name": "position", - "type": "BlockCoordinates" - }, - { - "name": "nbt", - "type": "nbt" - } - ] - ], - "packet_player_input": [ - "container", - [ - { - "name": "motion_x", - "type": "lf32" - }, - { - "name": "motion_z", - "type": "lf32" - }, - { - "name": "jumping", - "type": "bool" - }, - { - "name": "sneaking", - "type": "bool" - } - ] - ], - "packet_level_chunk": [ - "container", - [ - { - "name": "x", - "type": "zigzag32" - }, - { - "name": "z", - "type": "zigzag32" - }, - { - "name": "sub_chunk_count", - "type": "varint" - }, - { - "name": "cache_enabled", - "type": "bool" - }, - { - "name": "blobs", - "type": [ - "switch", - { - "compareTo": "cache_enabled", - "fields": { - "true": [ - "container", - [ - { - "name": "hashes", - "type": [ - "array", - { - "countType": "varint", - "type": "lu64" - } - ] - } - ] - ] - }, - "default": "void" - } - ] - }, - { - "name": "payload", - "type": "ByteArray" - } - ] - ], - "packet_set_commands_enabled": [ - "container", - [ - { - "name": "enabled", - "type": "bool" - } - ] - ], - "packet_set_difficulty": [ - "container", - [ - { - "name": "difficulty", - "type": "varint" - } - ] - ], - "packet_change_dimension": [ - "container", - [ - { - "name": "dimension", - "type": "zigzag32" - }, - { - "name": "position", - "type": "vec3f" - }, - { - "name": "respawn", - "type": "bool" - } - ] - ], - "packet_set_player_game_type": [ - "container", - [ - { - "name": "gamemode", - "type": "GameMode" - } - ] - ], - "packet_player_list": [ - "container", - [ - { - "name": "records", - "type": "PlayerRecords" - } - ] - ], - "packet_simple_event": [ - "container", - [ - { - "name": "event_type", - "type": "lu16" - } - ] - ], - "packet_event": [ - "container", - [ - { - "name": "runtime_id", - "type": "varint64" - }, - { - "name": "event_type", - "type": [ - "mapper", - { - "type": "zigzag32", - "mappings": { - "0": "achievement_awarded", - "1": "entity_interact", - "2": "portal_built", - "3": "portal_used", - "4": "mob_killed", - "5": "cauldron_used", - "6": "player_death", - "7": "boss_killed", - "8": "agent_command", - "9": "agent_created", - "10": "banner_pattern_removed", - "11": "commaned_executed", - "12": "fish_bucketed", - "13": "mob_born", - "14": "pet_died", - "15": "cauldron_block_used", - "16": "composter_block_used", - "17": "bell_block_used", - "18": "actor_definition", - "19": "raid_update", - "20": "player_movement_anomaly", - "21": "player_moement_corrected", - "22": "honey_harvested", - "23": "target_block_hit", - "24": "piglin_barter" - } - } - ] - }, - { - "name": "use_player_id", - "type": "u8" - }, - { - "name": "event_data", - "type": "restBuffer" - } - ] - ], - "packet_spawn_experience_orb": [ - "container", - [ - { - "name": "position", - "type": "vec3f" - }, - { - "name": "count", - "type": "zigzag32" - } - ] - ], - "packet_clientbound_map_item_data": [ - "container", - [ - { - "name": "mapinfo", - "type": "MapInfo" - } - ] - ], - "packet_map_info_request": [ - "container", - [ - { - "name": "map_id", - "type": "zigzag64" - } - ] - ], - "packet_request_chunk_radius": [ - "container", - [ - { - "name": "chunk_radius", - "type": "zigzag32" - } - ] - ], - "packet_chunk_radius_update": [ - "container", - [ - { - "name": "chunk_radius", - "type": "zigzag32" - } - ] - ], - "packet_item_frame_drop_item": [ - "container", - [ - { - "name": "coordinates", - "type": "BlockCoordinates" - } - ] - ], - "packet_game_rules_changed": [ - "container", - [ - { - "name": "rules", - "type": "GameRules" - } - ] - ], - "packet_camera": [ - "container", - [ - { - "name": "camera_entity_unique_id", - "type": "zigzag64" - }, - { - "name": "target_player_unique_id", - "type": "zigzag64" - } - ] - ], - "packet_boss_event": [ - "container", - [ - { - "name": "boss_entity_id", - "type": "zigzag64" - }, - { - "name": "type", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "0": "show_bar", - "1": "register_player", - "2": "hide_bar", - "3": "unregister_player", - "4": "set_bar_progress", - "5": "set_bar_title", - "6": "update_properties", - "7": "texture" - } - } - ] - }, - { - "anon": true, - "type": [ - "switch", - { - "compareTo": "type", - "fields": { - "register_player": [ - "container", - [ - { - "name": "player_id", - "type": "zigzag64" - } - ] - ], - "unregister_player": [ - "container", - [ - { - "name": "player_id", - "type": "zigzag64" - } - ] - ], - "show": [ - "container", - [ - { - "name": "title", - "type": "string" - }, - { - "name": "bar_progress", - "type": "lf32" - } - ] - ], - "update_properties": [ - "container", - [ - { - "name": "darkness_factor", - "type": "li16" - } - ] - ], - "texture": [ - "container", - [ - { - "name": "color", - "type": "varint" - }, - { - "name": "overlay", - "type": "varint" - } - ] - ], - "set_bar_progress": [ - "container", - [ - { - "name": "bar_progress", - "type": "lf32" - } - ] - ], - "set_bar_title": [ - "container", - [ - { - "name": "title", - "type": "string" - } - ] - ] - }, - "default": "void" - } - ] - } - ] - ], - "packet_show_credits": [ - "container", - [ - { - "name": "runtime_entity_id", - "type": "varint64" - }, - { - "name": "status", - "type": "zigzag32" - } - ] - ], - "packet_available_commands": [ - "container", - [ - { - "name": "values_len", - "type": "varint" - }, - { - "name": "_enum_type", - "type": [ - "enum_size_based_on_values_len" - ] - }, - { - "name": "enum_values", - "type": [ - "array", - { - "count": "values_len", - "type": "string" - } - ] - }, - { - "name": "suffixes", - "type": [ - "array", - { - "countType": "varint", - "type": "string" - } - ] - }, - { - "name": "enums", - "type": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "values", - "type": [ - "array", - { - "countType": "varint", - "type": [ - "switch", - { - "compareTo": "../_enum_type", - "fields": { - "byte": "u8", - "short": "lu16", - "int": "lu32" - }, - "default": "void" - } - ] - } - ] - } - ] - ] - } - ] - }, - { - "name": "command_data", - "type": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "description", - "type": "string" - }, - { - "name": "flags", - "type": "u8" - }, - { - "name": "permission_level", - "type": "u8" - }, - { - "name": "alias", - "type": "li32" - }, - { - "name": "overloads", - "type": [ - "array", - { - "countType": "varint", - "type": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "paramater_name", - "type": "string" - }, - { - "name": "value_type", - "type": [ - "mapper", - { - "type": "lu16", - "mappings": { - "1": "int", - "2": "float", - "3": "value", - "4": "wildcard_int", - "5": "operator", - "6": "target", - "16": "file_path", - "32": "string", - "40": "position", - "44": "message", - "46": "raw_text", - "50": "json", - "63": "command" - } - } - ] - }, - { - "name": "enum_type", - "type": [ - "mapper", - { - "type": "lu16", - "mappings": { - "16": "valid", - "32": "enum", - "256": "suffixed", - "1024": "soft_enum" - } - } - ] - }, - { - "name": "optional", - "type": "bool" - }, - { - "name": "options", - "type": "CommandFlags" - } - ] - ] - } - ] - } - ] - } - ] - ] - } - ] - }, - { - "name": "dynamic_enums", - "type": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "values", - "type": [ - "array", - { - "countType": "varint", - "type": "string" - } - ] - } - ] - ] - } - ] - }, - { - "name": "enum_constraints", - "type": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "value_index", - "type": "li32" - }, - { - "name": "enum_index", - "type": "li32" - }, - { - "name": "constraints", - "type": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "constraint", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "0": "cheats_enabled" - } - } - ] - } - ] - ] - } - ] - } - ] - ] - } - ] - } - ] - ], - "packet_command_request": [ - "container", - [ - { - "name": "command", - "type": "string" - }, - { - "name": "origin", - "type": "CommandOrigin" - }, - { - "name": "interval", - "type": "bool" - } - ] - ], - "packet_command_block_update": [ - "container", - [ - { - "name": "is_block", - "type": "bool" - } - ] - ], - "packet_command_output": [ - "container", - [ - { - "name": "origin", - "type": "CommandOrigin" - }, - { - "name": "output_type", - "type": [ - "mapper", - { - "type": "i8", - "mappings": { - "1": "last", - "2": "silent", - "3": "all", - "4": "data_set" - } - } - ] - }, - { - "name": "success_count", - "type": "varint" - }, - { - "name": "output", - "type": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "success", - "type": "bool" - }, - { - "name": "message_id", - "type": "string" - }, - { - "name": "paramaters", - "type": [ - "array", - { - "countType": "varint", - "type": "string" - } - ] - } - ] - ] - } - ] - }, - { - "name": "data_set", - "type": [ - "switch", - { - "compareTo": "output_type", - "fields": { - "data_set": "string" - }, - "default": "void" - } - ] - } - ] - ], - "packet_update_trade": [ - "container", - [ - { - "name": "window_id", - "type": "WindowID" - }, - { - "name": "window_type", - "type": "WindowType" - }, - { - "name": "size", - "type": "varint" - }, - { - "name": "trade_tier", - "type": "varint" - }, - { - "name": "villager_unique_id", - "type": "varint64" - }, - { - "name": "entity_unique_id", - "type": "varint64" - }, - { - "name": "display_name", - "type": "string" - }, - { - "name": "new_trading_ui", - "type": "bool" - }, - { - "name": "economic_trades", - "type": "bool" - }, - { - "name": "offers", - "type": "nbt" - } - ] - ], - "packet_update_equipment": [ - "container", - [ - { - "name": "window_id", - "type": "WindowID" - }, - { - "name": "window_type", - "type": "WindowType" - }, - { - "name": "size", - "type": "u8" - }, - { - "name": "entity_id", - "type": "zigzag64" - }, - { - "name": "inventory", - "type": "nbt" - } - ] - ], - "packet_resource_pack_data_info": [ - "container", - [ - { - "name": "package_id", - "type": "string" - }, - { - "name": "max_chunk_size", - "type": "lu32" - }, - { - "name": "chunk_count", - "type": "lu32" - }, - { - "name": "compressed_package_size", - "type": "lu64" - }, - { - "name": "hash", - "type": "ByteArray" - }, - { - "name": "is_premium", - "type": "bool" - }, - { - "name": "pack_type", - "type": "u8" - } - ] - ], - "packet_resource_pack_chunk_data": [ - "container", - [ - { - "name": "package_id", - "type": "string" - }, - { - "name": "chunk_index", - "type": "lu32" - }, - { - "name": "progress", - "type": "lu64" - }, - { - "name": "payload", - "type": "ByteArray" - } - ] - ], - "packet_resource_pack_chunk_request": [ - "container", - [ - { - "name": "package_id", - "type": "string" - }, - { - "name": "chunk_index", - "type": "lu32" - } - ] - ], - "packet_transfer": [ - "container", - [ - { - "name": "server_address", - "type": "string" - }, - { - "name": "port", - "type": "lu16" - } - ] - ], - "packet_play_sound": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "coordinates", - "type": "BlockCoordinates" - }, - { - "name": "volume", - "type": "lf32" - }, - { - "name": "pitch", - "type": "lf32" - } - ] - ], - "packet_stop_sound": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "stop_all", - "type": "bool" - } - ] - ], - "packet_set_title": [ - "container", - [ - { - "name": "type", - "type": [ - "mapper", - { - "type": "zigzag32", - "mappings": { - "0": "clear", - "1": "reset", - "2": "set_title", - "3": "set_subtitle", - "4": "action_bar_message", - "5": "set_durations", - "6": "set_title_json", - "7": "set_subtitle_json", - "8": "action_bar_message_json" - } - } - ] - }, - { - "name": "text", - "type": "string" - }, - { - "name": "fade_in_time", - "type": "zigzag32" - }, - { - "name": "stay_time", - "type": "zigzag32" - }, - { - "name": "fade_out_time", - "type": "zigzag32" - } - ] - ], - "packet_add_behavior_tree": [ - "container", - [ - { - "name": "behaviortree", - "type": "string" - } - ] - ], - "packet_structure_block_update": [ - "container", - [] - ], - "packet_show_store_offer": [ - "container", - [ - { - "name": "unknown0", - "type": "string" - }, - { - "name": "unknown1", - "type": "bool" - } - ] - ], - "packet_purchase_receipt": [ - "container", - [] - ], - "packet_player_skin": [ - "container", - [ - { - "name": "uuid", - "type": "uuid" - }, - { - "name": "skin", - "type": "Skin" - }, - { - "name": "skin_name", - "type": "string" - }, - { - "name": "old_skin_name", - "type": "string" - }, - { - "name": "is_verified", - "type": "bool" - } - ] - ], - "packet_sub_client_login": [ - "container", - [] - ], - "packet_initiate_web_socket_connection": [ - "container", - [ - { - "name": "server", - "type": "string" - } - ] - ], - "packet_set_last_hurt_by": [ - "container", - [ - { - "name": "unknown", - "type": "varint" - } - ] - ], - "packet_book_edit": [ - "container", - [ - { - "name": "type", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "0": "replace_page", - "1": "add_page", - "2": "delete_page", - "3": "swap_pages", - "4": "sign" - } - } - ] - }, - { - "name": "slot", - "type": "u8" - }, - { - "anon": true, - "type": [ - "switch", - { - "compareTo": "type", - "fields": { - "replace_page": [ - "container", - [ - { - "name": "page_number", - "type": "u8" - }, - { - "name": "text", - "type": "string" - }, - { - "name": "photo_name", - "type": "string" - } - ] - ], - "add_page": [ - "container", - [ - { - "name": "page_number", - "type": "u8" - }, - { - "name": "text", - "type": "string" - }, - { - "name": "photo_name", - "type": "string" - } - ] - ], - "delete_page": [ - "container", - [ - { - "name": "page_number", - "type": "u8" - } - ] - ], - "swap_pages": [ - "container", - [ - { - "name": "page1", - "type": "u8" - }, - { - "name": "page2", - "type": "u8" - } - ] - ], - "sign": [ - "container", - [ - { - "name": "title", - "type": "string" - }, - { - "name": "author", - "type": "string" - }, - { - "name": "xuid", - "type": "string" - } - ] - ] - }, - "default": "void" - } - ] - } - ] - ], - "packet_npc_request": [ - "container", - [ - { - "name": "runtime_entity_id", - "type": "varint64" - }, - { - "name": "unknown0", - "type": "u8" - }, - { - "name": "unknown1", - "type": "string" - }, - { - "name": "unknown2", - "type": "u8" - } - ] - ], - "packet_photo_transfer": [ - "container", - [ - { - "name": "file_name", - "type": "string" - }, - { - "name": "image_data", - "type": "string" - }, - { - "name": "unknown2", - "type": "string" - } - ] - ], - "packet_modal_form_request": [ - "container", - [ - { - "name": "form_id", - "type": "varint" - }, - { - "name": "data", - "type": "string" - } - ] - ], - "packet_modal_form_response": [ - "container", - [ - { - "name": "form_id", - "type": "varint" - }, - { - "name": "data", - "type": "string" - } - ] - ], - "packet_server_settings_request": [ - "container", - [] - ], - "packet_server_settings_response": [ - "container", - [ - { - "name": "form_id", - "type": "varint" - }, - { - "name": "data", - "type": "string" - } - ] - ], - "packet_show_profile": [ - "container", - [ - { - "name": "xuid", - "type": "string" - } - ] - ], - "packet_set_default_game_type": [ - "container", - [ - { - "name": "gamemode", - "type": "GameMode" - } - ] - ], - "packet_remove_objective": [ - "container", - [ - { - "name": "objective_name", - "type": "string" - } - ] - ], - "packet_set_display_objective": [ - "container", - [ - { - "name": "display_slot", - "type": "string" - }, - { - "name": "objective_name", - "type": "string" - }, - { - "name": "display_name", - "type": "string" - }, - { - "name": "criteria_name", - "type": "string" - }, - { - "name": "sort_order", - "type": "zigzag32" - } - ] - ], - "packet_set_score": [ - "container", - [ - { - "name": "entries", - "type": "ScoreEntries" - } - ] - ], - "packet_lab_table": [ - "container", - [ - { - "name": "useless_byte", - "type": "u8" - }, - { - "name": "lab_table_x", - "type": "varint" - }, - { - "name": "lab_table_y", - "type": "varint" - }, - { - "name": "lab_table_z", - "type": "varint" - }, - { - "name": "reaction_type", - "type": "u8" - } - ] - ], - "packet_update_block_synced": [ - "container", - [ - { - "name": "position", - "type": "BlockCoordinates" - }, - { - "name": "block_runtime_id", - "type": "varint" - }, - { - "name": "flags", - "type": "UpdateBlockFlags" - }, - { - "name": "layer", - "type": "varint" - }, - { - "name": "entity_unique_id", - "type": "zigzag64" - }, - { - "name": "transition_type", - "type": [ - "mapper", - { - "type": "varint64", - "mappings": { - "0": "entity", - "1": "create", - "2": "destroy" - } - } - ] - } - ] - ], - "packet_move_entity_delta": [ - "container", - [ - { - "name": "runtime_entity_id", - "type": "varint64" - }, - { - "name": "flags", - "type": "DeltaMoveFlags" - }, - { - "name": "x", - "type": [ - "switch", - { - "compareTo": "flags.has_x", - "fields": { - "true": "lf32" - }, - "default": "void" - } - ] - }, - { - "name": "y", - "type": [ - "switch", - { - "compareTo": "flags.has_y", - "fields": { - "true": "lf32" - }, - "default": "void" - } - ] - }, - { - "name": "z", - "type": [ - "switch", - { - "compareTo": "flags.has_z", - "fields": { - "true": "lf32" - }, - "default": "void" - } - ] - }, - { - "name": "rot_x", - "type": [ - "switch", - { - "compareTo": "flags.has_rot_x", - "fields": { - "true": "u8" - }, - "default": "void" - } - ] - }, - { - "name": "rot_y", - "type": [ - "switch", - { - "compareTo": "flags.has_rot_y", - "fields": { - "true": "u8" - }, - "default": "void" - } - ] - }, - { - "name": "rot_z", - "type": [ - "switch", - { - "compareTo": "flags.has_rot_z", - "fields": { - "true": "u8" - }, - "default": "void" - } - ] - } - ] - ], - "packet_set_scoreboard_identity": [ - "container", - [ - { - "name": "entries", - "type": "ScoreboardIdentityEntries" - } - ] - ], - "packet_set_local_player_as_initialized": [ - "container", - [ - { - "name": "runtime_entity_id", - "type": "varint64" - } - ] - ], - "packet_update_soft_enum": [ - "container", - [] - ], - "packet_network_stack_latency": [ - "container", - [ - { - "name": "timestamp", - "type": "lu64" - }, - { - "name": "unknown_flag", - "type": "u8" - } - ] - ], - "packet_script_custom_event": [ - "container", - [ - { - "name": "event_name", - "type": "string" - }, - { - "name": "event_data", - "type": "string" - } - ] - ], - "packet_spawn_particle_effect": [ - "container", - [ - { - "name": "dimension_id", - "type": "u8" - }, - { - "name": "entity_id", - "type": "zigzag64" - }, - { - "name": "position", - "type": "vec3f" - }, - { - "name": "particle_name", - "type": "string" - } - ] - ], - "packet_available_entity_identifiers": [ - "container", - [ - { - "name": "nbt", - "type": "nbt" - } - ] - ], - "packet_level_sound_event_v2": [ - "container", - [ - { - "name": "sound_id", - "type": "u8" - }, - { - "name": "position", - "type": "vec3f" - }, - { - "name": "block_id", - "type": "zigzag32" - }, - { - "name": "entity_type", - "type": "string" - }, - { - "name": "is_baby_mob", - "type": "bool" - }, - { - "name": "is_global", - "type": "bool" - } - ] - ], - "packet_network_chunk_publisher_update": [ - "container", - [ - { - "name": "coordinates", - "type": "BlockCoordinates" - }, - { - "name": "radius", - "type": "varint" - } - ] - ], - "packet_biome_definition_list": [ - "container", - [ - { - "name": "nbt", - "type": "nbt" - } - ] - ], - "packet_level_sound_event": [ - "container", - [ - { - "name": "sound_id", - "type": "varint" - }, - { - "name": "position", - "type": "vec3f" - }, - { - "name": "block_id", - "type": "zigzag32" - }, - { - "name": "entity_type", - "type": "string" - }, - { - "name": "is_baby_mob", - "type": "bool" - }, - { - "name": "is_global", - "type": "bool" - } - ] - ], - "packet_level_event_generic": [ - "container", - [ - { - "name": "event_id", - "type": "varint" - }, - { - "name": "nbt", - "type": "nbtLoop" - } - ] - ], - "packet_lectern_update": [ - "container", - [ - { - "name": "page", - "type": "u8" - }, - { - "name": "page_count", - "type": "u8" - }, - { - "name": "position", - "type": "vec3i" - }, - { - "name": "drop_book", - "type": "bool" - } - ] - ], - "packet_video_stream_connect": [ - "container", - [ - { - "name": "server_uri", - "type": "string" - }, - { - "name": "frame_send_frequency", - "type": "lf32" - }, - { - "name": "action", - "type": "u8" - }, - { - "name": "resolution_x", - "type": "li32" - }, - { - "name": "resolution_y", - "type": "li32" - } - ] - ], - "packet_add_ecs_entity": [ - "container", - [ - { - "name": "network_id", - "type": "varint64" - } - ] - ], - "packet_remove_ecs_entity": [ - "container", - [ - { - "name": "network_id", - "type": "varint64" - } - ] - ], - "packet_client_cache_status": [ - "container", - [ - { - "name": "enabled", - "type": "bool" - } - ] - ], - "packet_on_screen_texture_animation": [ - "container", - [] - ], - "packet_map_create_locked_copy": [ - "container", - [] - ], - "packet_structure_template_data_export_request": [ - "container", - [] - ], - "packet_structure_template_data_export_response": [ - "container", - [] - ], - "packet_update_block_properties": [ - "container", - [ - { - "name": "nbt", - "type": "nbt" - } - ] - ], - "packet_client_cache_blob_status": [ - "container", - [ - { - "name": "misses", - "type": "varint" - }, - { - "name": "haves", - "type": "varint" - }, - { - "name": "missing", - "type": [ - "array", - { - "count": "misses", - "type": "lu64" - } - ] - }, - { - "name": "have", - "type": [ - "array", - { - "count": "haves", - "type": "lu64" - } - ] - } - ] - ], - "packet_client_cache_miss_response": [ - "container", - [ - { - "name": "blobs", - "type": [ - "array", - { - "countType": "varint", - "type": "Blob" - } - ] - } - ] - ], - "packet_education_settings": [ - "container", - [ - { - "name": "CodeBuilderDefaultURI", - "type": "string" - }, - { - "name": "CodeBuilderTitle", - "type": "string" - }, - { - "name": "CanResizeCodeBuilder", - "type": "bool" - }, - { - "name": "HasOverrideURI", - "type": "bool" - }, - { - "name": "OverrideURI", - "type": [ - "switch", - { - "compareTo": "HasOverrideURI", - "fields": { - "true": "string" - }, - "default": "void" - } - ] - }, - { - "name": "HasQuiz", - "type": "bool" - } - ] - ], - "packet_multiplayer_settings": [ - "container", - [ - { - "name": "action_type", - "type": [ - "mapper", - { - "type": "zigzag32", - "mappings": { - "0": "enable_multiplayer", - "1": "disable_multiplayer", - "2": "refresh_join_code" - } - } - ] - } - ] - ], - "packet_settings_command": [ - "container", - [ - { - "name": "command_line", - "type": "string" - }, - { - "name": "suppress_output", - "type": "bool" - } - ] - ], - "packet_anvil_damage": [ - "container", - [ - { - "name": "damage", - "type": "u8" - }, - { - "name": "position", - "type": "BlockCoordinates" - } - ] - ], - "packet_completed_using_item": [ - "container", - [ - { - "name": "used_item_id", - "type": "li16" - }, - { - "name": "use_method", - "type": [ - "mapper", - { - "type": "li32", - "mappings": { - "0": "equip_armor", - "1": "eat", - "2": "attack", - "3": "consume", - "4": "throw", - "5": "shoot", - "6": "place", - "7": "fill_bottle", - "8": "fill_bucket", - "9": "pour_bucket", - "10": "use_tool", - "11": "interact", - "12": "retrieved", - "13": "dyed", - "14": "traded" - } - } - ] - } - ] - ], - "packet_network_settings": [ - "container", - [ - { - "name": "compression_threshold", - "type": "u16" - } - ] - ], - "packet_player_auth_input": [ - "container", - [ - { - "name": "pitch", - "type": "lf32" - }, - { - "name": "yaw", - "type": "lf32" - }, - { - "name": "position", - "type": "vec3f" - }, - { - "name": "move_vector", - "type": "vec2f" - }, - { - "name": "head_yaw", - "type": "lf32" - }, - { - "name": "input_data", - "type": "InputFlag" - }, - { - "name": "input_mode", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "0": "unknown", - "1": "mouse", - "2": "touch", - "3": "game_pad", - "4": "motion_controller" - } - } - ] - }, - { - "name": "play_mode", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "0": "normal", - "1": "teaser", - "2": "screen", - "3": "viewer", - "4": "reality", - "5": "placement", - "6": "living_room", - "7": "exit_level", - "8": "exit_level_living_room", - "9": "num_modes" - } - } - ] - }, - { - "name": "gaze_direction", - "type": [ - "switch", - { - "compareTo": "play_mode", - "fields": { - "reality": "vec3f" - }, - "default": "void" - } - ] - }, - { - "name": "tick", - "type": "varint64" - }, - { - "name": "delta", - "type": "vec3f" - }, - { - "name": "transaction", - "type": [ - "switch", - { - "compareTo": "input_data.item_interact", - "fields": { - "true": [ - "container", - [ - { - "name": "legacy", - "type": "TransactionLegacy" - }, - { - "name": "actions", - "type": "TransactionActions" - }, - { - "name": "data", - "type": "TransactionUseItem" - } - ] - ] - }, - "default": "void" - } - ] - }, - { - "name": "item_stack_request", - "type": [ - "switch", - { - "compareTo": "input_data.item_stack_request", - "fields": { - "true": "ItemStackRequest" - }, - "default": "void" - } - ] - }, - { - "name": "block_action", - "type": [ - "switch", - { - "compareTo": "input_data.block_action", - "fields": { - "true": [ - "array", - { - "countType": "zigzag32", - "type": [ - "container", - [ - { - "name": "action", - "type": "Action" - }, - { - "anon": true, - "type": [ - "switch", - { - "compareTo": "action", - "fields": { - "start_break": [ - "container", - [ - { - "name": "position", - "type": "BlockCoordinates" - }, - { - "name": "face", - "type": "zigzag32" - } - ] - ], - "abort_break": [ - "container", - [ - { - "name": "position", - "type": "BlockCoordinates" - }, - { - "name": "face", - "type": "zigzag32" - } - ] - ], - "crack_break": [ - "container", - [ - { - "name": "position", - "type": "BlockCoordinates" - }, - { - "name": "face", - "type": "zigzag32" - } - ] - ], - "predict_break": [ - "container", - [ - { - "name": "position", - "type": "BlockCoordinates" - }, - { - "name": "face", - "type": "zigzag32" - } - ] - ], - "continue_break": [ - "container", - [ - { - "name": "position", - "type": "BlockCoordinates" - }, - { - "name": "face", - "type": "zigzag32" - } - ] - ] - }, - "default": "void" - } - ] - } - ] - ] - } - ] - }, - "default": "void" - } - ] - } - ] - ], - "packet_creative_content": [ - "container", - [ - { - "name": "items", - "type": "ItemStacks" - } - ] - ], - "packet_player_enchant_options": [ - "container", - [ - { - "name": "enchant_options", - "type": "EnchantOptions" - } - ] - ], - "packet_item_stack_request": [ - "container", - [ - { - "name": "requests", - "type": [ - "array", - { - "countType": "varint", - "type": "ItemStackRequest" - } - ] - } - ] - ], - "packet_item_stack_response": [ - "container", - [ - { - "name": "responses", - "type": "ItemStackResponses" - } - ] - ], - "packet_player_armor_damage": [ - "container", - [ - { - "name": "type", - "type": "ArmorDamageType" - }, - { - "name": "helmet_damage", - "type": [ - "switch", - { - "compareTo": "type.head", - "fields": { - "true": "zigzag32" - }, - "default": "void" - } - ] - }, - { - "name": "chestplate_damage", - "type": [ - "switch", - { - "compareTo": "type.chest", - "fields": { - "true": "zigzag32" - }, - "default": "void" - } - ] - }, - { - "name": "leggings_damage", - "type": [ - "switch", - { - "compareTo": "type.legs", - "fields": { - "true": "zigzag32" - }, - "default": "void" - } - ] - }, - { - "name": "boots_damage", - "type": [ - "switch", - { - "compareTo": "type.feet", - "fields": { - "true": "zigzag32" - }, - "default": "void" - } - ] - } - ] - ], - "packet_update_player_game_type": [ - "container", - [ - { - "name": "gamemode", - "type": "GameMode" - }, - { - "name": "player_unique_id", - "type": "zigzag64" - } - ] - ], - "packet_position_tracking_db_request": [ - "container", - [ - { - "name": "action", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "0": "query" - } - } - ] - }, - { - "name": "tracking_id", - "type": "zigzag32" - } - ] - ], - "packet_position_tracking_db_broadcast": [ - "container", - [ - { - "name": "broadcast_action", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "0": "update", - "1": "destory", - "2": "not_found" - } - } - ] - }, - { - "name": "tracking_id", - "type": "zigzag32" - }, - { - "name": "nbt", - "type": "nbt" - } - ] - ], - "packet_packet_violation_warning": [ - "container", - [ - { - "name": "violation_type", - "type": [ - "mapper", - { - "type": "zigzag32", - "mappings": { - "0": "malformed" - } - } - ] - }, - { - "name": "severity", - "type": [ - "mapper", - { - "type": "zigzag32", - "mappings": { - "0": "warning", - "1": "final_warning", - "2": "terminating" - } - } - ] - }, - { - "name": "packet_id", - "type": "zigzag32" - }, - { - "name": "reason", - "type": "string" - } - ] - ], - "packet_motion_prediction_hints": [ - "container", - [ - { - "name": "entity_runtime_id", - "type": "varint64" - }, - { - "name": "velocity", - "type": "vec3f" - }, - { - "name": "on_ground", - "type": "bool" - } - ] - ], - "packet_animate_entity": [ - "container", - [ - { - "name": "animation", - "type": "string" - }, - { - "name": "next_state", - "type": "string" - }, - { - "name": "stop_condition", - "type": "string" - }, - { - "name": "controller", - "type": "string" - }, - { - "name": "blend_out_time", - "type": "lf32" - }, - { - "name": "runtime_entity_ids", - "type": [ - "array", - { - "countType": "varint", - "type": "varint64" - } - ] - } - ] - ], - "packet_camera_shake": [ - "container", - [ - { - "name": "intensity", - "type": "lf32" - }, - { - "name": "duration", - "type": "lf32" - }, - { - "name": "type", - "type": "u8" - }, - { - "name": "action", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "0": "add", - "1": "stop" - } - } - ] - } - ] - ], - "packet_player_fog": [ - "container", - [ - { - "name": "stack", - "type": [ - "array", - { - "countType": "varint", - "type": "string" - } - ] - } - ] - ], - "packet_correct_player_move_prediction": [ - "container", - [ - { - "name": "position", - "type": "vec3f" - }, - { - "name": "delta", - "type": "vec3f" - }, - { - "name": "on_ground", - "type": "bool" - }, - { - "name": "tick", - "type": "varint64" - } - ] - ], - "packet_item_component": [ - "container", - [ - { - "name": "entries", - "type": "ItemComponentList" - } - ] - ], - "packet_filter_text_packet": [ - "container", - [ - { - "name": "text", - "type": "string" - }, - { - "name": "from_server", - "type": "bool" - } - ] - ], - "packet_debug_renderer": [ - "container", - [ - { - "name": "type", - "type": [ - "mapper", - { - "type": "li32", - "mappings": { - "1": "clear", - "2": "add_cube" - } - } - ] - }, - { - "anon": true, - "type": [ - "switch", - { - "compareTo": "type", - "fields": { - "clear": "void", - "add_cube": [ - "container", - [ - { - "name": "text", - "type": "string" - }, - { - "name": "position", - "type": "vec3f" - }, - { - "name": "red", - "type": "lf32" - }, - { - "name": "green", - "type": "lf32" - }, - { - "name": "blue", - "type": "lf32" - }, - { - "name": "alpha", - "type": "lf32" - }, - { - "name": "duration", - "type": "li64" - } - ] - ] - }, - "default": "void" - } - ] - } - ] - ], - "string": [ - "pstring", - { - "countType": "varint" - } - ], - "ByteArray": [ - "buffer", - { - "countType": "varint" - } - ], - "SignedByteArray": [ - "buffer", - { - "countType": "zigzag32" - } - ], - "LittleString": [ - "pstring", - { - "countType": "li32" - } - ], - "MetadataFlags1": [ - "bitflags", - { - "type": "zigzag64", - "big": true, - "flags": [ - "onfire", - "sneaking", - "riding", - "sprinting", - "action", - "invisible", - "tempted", - "inlove", - "saddled", - "powered", - "ignited", - "baby", - "converting", - "critical", - "can_show_nametag", - "always_show_nametag", - "no_ai", - "silent", - "wallclimbing", - "can_climb", - "swimmer", - "can_fly", - "walker", - "resting", - "sitting", - "angry", - "interested", - "charged", - "tamed", - "orphaned", - "leashed", - "sheared", - "gliding", - "elder", - "moving", - "breathing", - "chested", - "stackable", - "showbase", - "rearing", - "vibrating", - "idling", - "evoker_spell", - "charge_attack", - "wasd_controlled", - "can_power_jump", - "linger", - "has_collision", - "affected_by_gravity", - "fire_immune", - "dancing", - "enchanted", - "show_trident_rope", - "container_private", - "transforming", - "spin_attack", - "swimming", - "bribed", - "pregnant", - "laying_egg", - "rider_can_pick", - "transition_sitting", - "eating", - "laying_down" - ] - } - ], - "MetadataFlags2": [ - "bitflags", - { - "type": "zigzag64", - "big": true, - "flags": [ - "sneezing", - "trusting", - "rolling", - "scared", - "in_scaffolding", - "over_scaffolding", - "fall_through_scaffolding", - "blocking", - "transition_blocking", - "blocked_using_shield", - "blocked_using_damaged_shield", - "sleeping", - "wants_to_wake", - "trade_interest", - "door_breaker", - "breaking_obstruction", - "door_opener", - "illager_captain", - "stunned", - "roaring", - "delayed_attacking", - "avoiding_mobs", - "avoiding_block", - "facing_target_to_range_attack", - "hidden_when_invisible", - "is_in_ui", - "stalking", - "emoting", - "celebrating", - "admiring", - "celebrating_special" - ] - } - ], - "UpdateBlockFlags": [ - "bitflags", - { - "type": "varint", - "flags": { - "neighbors": 1, - "network": 2, - "no_graphic": 4, - "unused": 8, - "priority": 16 - } - } - ], - "AdventureFlags": [ - "bitflags", - { - "type": "varint", - "flags": { - "world_immutable": 1, - "no_pvp": 2, - "auto_jump": 32, - "allow_flight": 64, - "no_clip": 128, - "world_builder": 256, - "flying": 512, - "muted": 1024 - } - } - ], - "ActionPermissions": [ - "bitflags", - { - "type": "varint", - "flags": { - "mine": 65537, - "doors_and_switches": 65538, - "open_containers": 65540, - "attack_players": 65544, - "attack_mobs": 65552, - "operator": 65568, - "teleport": 65664, - "build": 65792, - "default": 66048 - } - } - ], - "CommandFlags": [ - "bitfield", - [ - { - "name": "unused", - "size": 6, - "signed": false - }, - { - "name": "has_semantic_constraint", - "size": 1, - "signed": false - }, - { - "name": "collapse_enum", - "size": 1, - "signed": false - } - ] - ], - "DeltaMoveFlags": [ - "bitflags", - { - "type": "lu16", - "flags": { - "has_x": 1, - "has_y": 2, - "has_z": 4, - "has_rot_x": 8, - "has_rot_y": 16, - "has_rot_z": 32, - "on_ground": 64, - "teleport": 128, - "force_move": 256 - } - } - ], - "InputFlag": [ - "bitflags", - { - "type": "varint64", - "big": true, - "flags": [ - "ascend", - "descend", - "north_jump", - "jump_down", - "sprint_down", - "change_height", - "jumping", - "auto_jumping_in_water", - "sneaking", - "sneak_down", - "up", - "down", - "left", - "right", - "up_left", - "up_right", - "want_up", - "want_down", - "want_down_slow", - "want_up_slow", - "sprinting", - "ascend_scaffolding", - "descend_scaffolding", - "sneak_toggle_down", - "persist_sneak", - "start_sprinting", - "stop_sprinting", - "start_sneaking", - "stop_sneaking", - "start_swimming", - "stop_swimming", - "start_jumping", - "start_gliding", - "stop_gliding", - "item_interact", - "block_action", - "item_stack_request" - ] - } - ], - "ArmorDamageType": [ - "bitflags", - { - "type": "u8", - "flags": { - "head": 1, - "chest": 2, - "legs": 4, - "feet": 8 - } - } - ] - } -} \ No newline at end of file diff --git a/data/1.16.220/protocol.json b/data/1.16.220/protocol.json deleted file mode 100644 index eaebb08..0000000 --- a/data/1.16.220/protocol.json +++ /dev/null @@ -1,8795 +0,0 @@ -{ - "types": { - "varint32": "varint", - "varint64": "native", - "zigzag32": "native", - "zigzag64": "native", - "uuid": "native", - "byterot": "native", - "bitflags": "native", - "restBuffer": "native", - "encapsulated": "native", - "nbt": "native", - "lnbt": "native", - "nbtLoop": "native", - "enum_size_based_on_values_len": "native", - "MapInfo": "native", - "BehaviourPackInfos": [ - "array", - { - "countType": "li16", - "type": [ - "container", - [ - { - "name": "uuid", - "type": "string" - }, - { - "name": "version", - "type": "string" - }, - { - "name": "size", - "type": "lu64" - }, - { - "name": "content_key", - "type": "string" - }, - { - "name": "sub_pack_name", - "type": "string" - }, - { - "name": "content_identity", - "type": "string" - }, - { - "name": "has_scripts", - "type": "bool" - } - ] - ] - } - ], - "TexturePackInfos": [ - "array", - { - "countType": "li16", - "type": [ - "container", - [ - { - "name": "uuid", - "type": "string" - }, - { - "name": "version", - "type": "string" - }, - { - "name": "size", - "type": "lu64" - }, - { - "name": "content_key", - "type": "string" - }, - { - "name": "sub_pack_name", - "type": "string" - }, - { - "name": "content_identity", - "type": "string" - }, - { - "name": "has_scripts", - "type": "bool" - }, - { - "name": "rtx_enabled", - "type": "bool" - } - ] - ] - } - ], - "ResourcePackIdVersions": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "uuid", - "type": "string" - }, - { - "name": "version", - "type": "string" - }, - { - "name": "name", - "type": "string" - } - ] - ] - } - ], - "ResourcePackIds": [ - "array", - { - "countType": "li16", - "type": "string" - } - ], - "Experiment": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "enabled", - "type": "bool" - } - ] - ], - "Experiments": [ - "array", - { - "countType": "li32", - "type": "Experiment" - } - ], - "GameMode": [ - "mapper", - { - "type": "zigzag32", - "mappings": { - "0": "survival", - "1": "creative", - "2": "adventure", - "3": "survival_spectator", - "4": "creative_spectator", - "5": "fallback" - } - } - ], - "GameRule": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "type", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "1": "bool", - "2": "int", - "3": "float" - } - } - ] - }, - { - "name": "value", - "type": [ - "switch", - { - "compareTo": "type", - "fields": { - "bool": "bool", - "int": "zigzag32", - "float": "lf32" - }, - "default": "void" - } - ] - } - ] - ], - "GameRules": [ - "array", - { - "countType": "varint", - "type": "GameRule" - } - ], - "Blob": [ - "container", - [ - { - "name": "hash", - "type": "lu64" - }, - { - "name": "payload", - "type": "ByteArray" - } - ] - ], - "BlockProperties": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "state", - "type": "nbt" - } - ] - ] - } - ], - "Itemstates": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "runtime_id", - "type": "li16" - }, - { - "name": "component_based", - "type": "bool" - } - ] - ] - } - ], - "ItemExtraDataWithBlockingTick": [ - "container", - [ - { - "name": "has_nbt", - "type": [ - "mapper", - { - "type": "lu16", - "mappings": { - "0": "false", - "65535": "true" - } - } - ] - }, - { - "name": "nbt", - "type": [ - "switch", - { - "compareTo": "has_nbt", - "fields": { - "true": [ - "container", - [ - { - "name": "version", - "type": "u8" - }, - { - "name": "nbt", - "type": "lnbt" - } - ] - ] - }, - "default": "void" - } - ] - }, - { - "name": "can_place_on", - "type": [ - "array", - { - "countType": "li32", - "type": "ShortArray" - } - ] - }, - { - "name": "can_destroy", - "type": [ - "array", - { - "countType": "li32", - "type": "ShortArray" - } - ] - }, - { - "name": "blocking_tick", - "type": "li64" - } - ] - ], - "ItemExtraDataWithoutBlockingTick": [ - "container", - [ - { - "name": "has_nbt", - "type": [ - "mapper", - { - "type": "lu16", - "mappings": { - "0": "false", - "65535": "true" - } - } - ] - }, - { - "name": "nbt", - "type": [ - "switch", - { - "compareTo": "has_nbt", - "fields": { - "true": [ - "container", - [ - { - "name": "version", - "type": "u8" - }, - { - "name": "nbt", - "type": "lnbt" - } - ] - ] - }, - "default": "void" - } - ] - }, - { - "name": "can_place_on", - "type": [ - "array", - { - "countType": "li32", - "type": "ShortArray" - } - ] - }, - { - "name": "can_destroy", - "type": [ - "array", - { - "countType": "li32", - "type": "ShortArray" - } - ] - } - ] - ], - "ItemLegacy": [ - "container", - [ - { - "name": "network_id", - "type": "zigzag32" - }, - { - "anon": true, - "type": [ - "switch", - { - "compareTo": "network_id", - "fields": { - "0": "void" - }, - "default": [ - "container", - [ - { - "name": "count", - "type": "lu16" - }, - { - "name": "metadata", - "type": "varint" - }, - { - "name": "block_runtime_id", - "type": "zigzag32" - }, - { - "name": "extra", - "type": [ - "switch", - { - "compareTo": "network_id", - "fields": { - "/ShieldItemID": [ - "encapsulated", - { - "lengthType": "varint", - "type": "ItemExtraDataWithBlockingTick" - } - ] - }, - "default": [ - "encapsulated", - { - "lengthType": "varint", - "type": "ItemExtraDataWithoutBlockingTick" - } - ] - } - ] - } - ] - ] - } - ] - } - ] - ], - "Item": [ - "container", - [ - { - "name": "network_id", - "type": "zigzag32" - }, - { - "anon": true, - "type": [ - "switch", - { - "compareTo": "network_id", - "fields": { - "0": "void" - }, - "default": [ - "container", - [ - { - "name": "count", - "type": "lu16" - }, - { - "name": "metadata", - "type": "varint" - }, - { - "name": "has_stack_id", - "type": "u8" - }, - { - "name": "stack_id", - "type": [ - "switch", - { - "compareTo": "has_stack_id", - "fields": { - "0": "void" - }, - "default": "zigzag32" - } - ] - }, - { - "name": "block_runtime_id", - "type": "zigzag32" - }, - { - "name": "extra", - "type": [ - "switch", - { - "compareTo": "network_id", - "fields": { - "/ShieldItemID": [ - "encapsulated", - { - "lengthType": "varint", - "type": "ItemExtraDataWithBlockingTick" - } - ] - }, - "default": [ - "encapsulated", - { - "lengthType": "varint", - "type": "ItemExtraDataWithoutBlockingTick" - } - ] - } - ] - } - ] - ] - } - ] - } - ] - ], - "vec3i": [ - "container", - [ - { - "name": "x", - "type": "zigzag32" - }, - { - "name": "y", - "type": "zigzag32" - }, - { - "name": "z", - "type": "zigzag32" - } - ] - ], - "vec3u": [ - "container", - [ - { - "name": "x", - "type": "varint" - }, - { - "name": "y", - "type": "varint" - }, - { - "name": "z", - "type": "varint" - } - ] - ], - "vec3f": [ - "container", - [ - { - "name": "x", - "type": "lf32" - }, - { - "name": "y", - "type": "lf32" - }, - { - "name": "z", - "type": "lf32" - } - ] - ], - "vec2f": [ - "container", - [ - { - "name": "x", - "type": "lf32" - }, - { - "name": "z", - "type": "lf32" - } - ] - ], - "MetadataDictionary": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "key", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "0": "flags", - "1": "health", - "2": "variant", - "3": "color", - "4": "nametag", - "5": "owner_eid", - "6": "target_eid", - "7": "air", - "8": "potion_color", - "9": "potion_ambient", - "10": "jump_duration", - "11": "hurt_time", - "12": "hurt_direction", - "13": "paddle_time_left", - "14": "paddle_time_right", - "15": "experience_value", - "16": "minecart_display_block", - "17": "minecart_display_offset", - "18": "minecart_has_display", - "20": "old_swell", - "21": "swell_dir", - "22": "charge_amount", - "23": "enderman_held_runtime_id", - "24": "entity_age", - "26": "player_flags", - "27": "player_index", - "28": "player_bed_position", - "29": "fireball_power_x", - "30": "fireball_power_y", - "31": "fireball_power_z", - "32": "aux_power", - "33": "fish_x", - "34": "fish_z", - "35": "fish_angle", - "36": "potion_aux_value", - "37": "lead_holder_eid", - "38": "scale", - "39": "interactive_tag", - "40": "npc_skin_id", - "41": "url_tag", - "42": "max_airdata_max_air", - "43": "mark_variant", - "44": "container_type", - "45": "container_base_size", - "46": "container_extra_slots_per_strength", - "47": "block_target", - "48": "wither_invulnerable_ticks", - "49": "wither_target_1", - "50": "wither_target_2", - "51": "wither_target_3", - "52": "aerial_attack", - "53": "boundingbox_width", - "54": "boundingbox_height", - "55": "fuse_length", - "56": "rider_seat_position", - "57": "rider_rotation_locked", - "58": "rider_max_rotation", - "59": "rider_min_rotation", - "60": "rider_rotation_offset", - "61": "area_effect_cloud_radius", - "62": "area_effect_cloud_waiting", - "63": "area_effect_cloud_particle_id", - "64": "shulker_peek_id", - "65": "shulker_attach_face", - "66": "shulker_attached", - "67": "shulker_attach_pos", - "68": "trading_player_eid", - "69": "trading_career", - "70": "has_command_block", - "71": "command_block_command", - "72": "command_block_last_output", - "73": "command_block_track_output", - "74": "controlling_rider_seat_number", - "75": "strength", - "76": "max_strength", - "77": "spell_casting_color", - "78": "limited_life", - "79": "armor_stand_pose_index", - "80": "ender_crystal_time_offset", - "81": "always_show_nametag", - "82": "color_2", - "83": "name_author", - "84": "score_tag", - "85": "balloon_attached_entity", - "86": "pufferfish_size", - "87": "bubble_time", - "88": "agent", - "89": "sitting_amount", - "90": "sitting_amount_previous", - "91": "eating_counter", - "92": "flags_extended", - "93": "laying_amount", - "94": "laying_amount_previous", - "95": "duration", - "96": "spawn_time", - "97": "change_rate", - "98": "change_on_pickup", - "99": "pickup_count", - "100": "interact_text", - "101": "trade_tier", - "102": "max_trade_tier", - "103": "trade_experience", - "104": "skin_id", - "105": "spawning_frames", - "106": "command_block_tick_delay", - "107": "command_block_execute_on_first_tick", - "108": "ambient_sound_interval", - "109": "ambient_sound_interval_range", - "110": "ambient_sound_event_name", - "111": "fall_damage_multiplier", - "112": "name_raw_text", - "113": "can_ride_target", - "114": "low_tier_cured_discount", - "115": "high_tier_cured_discount", - "116": "nearby_cured_discount", - "117": "nearby_cured_discount_timestamp", - "118": "hitbox", - "119": "is_buoyant", - "120": "freezing_effect_strength", - "121": "buoyancy_data", - "122": "goat_horn_count", - "123": "base_runtime_id", - "124": "define_properties", - "125": "update_properties" - } - } - ] - }, - { - "name": "type", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "0": "byte", - "1": "short", - "2": "int", - "3": "float", - "4": "string", - "5": "compound", - "6": "vec3i", - "7": "long", - "8": "vec3f" - } - } - ] - }, - { - "name": "value", - "type": [ - "switch", - { - "compareTo": "key", - "fields": { - "flags": "MetadataFlags1", - "flags_extended": "MetadataFlags2" - }, - "default": [ - "switch", - { - "compareTo": "type", - "fields": { - "byte": "i8", - "short": "li16", - "int": "zigzag32", - "float": "lf32", - "string": "string", - "compound": "nbt", - "vec3i": "vec3i", - "long": "zigzag64", - "vec3f": "vec3f" - }, - "default": "void" - } - ] - } - ] - } - ] - ] - } - ], - "Link": [ - "container", - [ - { - "name": "ridden_entity_id", - "type": "zigzag64" - }, - { - "name": "rider_entity_id", - "type": "zigzag64" - }, - { - "name": "type", - "type": "u8" - }, - { - "name": "immediate", - "type": "bool" - }, - { - "name": "rider_initiated", - "type": "bool" - } - ] - ], - "Links": [ - "array", - { - "countType": "varint", - "type": "Link" - } - ], - "EntityAttributes": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "min", - "type": "lf32" - }, - { - "name": "value", - "type": "lf32" - }, - { - "name": "max", - "type": "lf32" - } - ] - ] - } - ], - "Rotation": [ - "container", - [ - { - "name": "yaw", - "type": "byterot" - }, - { - "name": "pitch", - "type": "byterot" - }, - { - "name": "head_yaw", - "type": "byterot" - } - ] - ], - "BlockCoordinates": [ - "container", - [ - { - "name": "x", - "type": "zigzag32" - }, - { - "name": "y", - "type": "varint" - }, - { - "name": "z", - "type": "zigzag32" - } - ] - ], - "PlayerAttributes": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "min", - "type": "lf32" - }, - { - "name": "max", - "type": "lf32" - }, - { - "name": "current", - "type": "lf32" - }, - { - "name": "default", - "type": "lf32" - }, - { - "name": "name", - "type": "string" - } - ] - ] - } - ], - "TransactionUseItem": [ - "container", - [ - { - "name": "action_type", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "0": "click_block", - "1": "click_air", - "2": "break_block" - } - } - ] - }, - { - "name": "block_position", - "type": "vec3i" - }, - { - "name": "face", - "type": "varint" - }, - { - "name": "hotbar_slot", - "type": "varint" - }, - { - "name": "held_item", - "type": "Item" - }, - { - "name": "player_pos", - "type": "vec3f" - }, - { - "name": "click_pos", - "type": "vec3f" - }, - { - "name": "block_runtime_id", - "type": "varint" - } - ] - ], - "TransactionActions": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "source_type", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "0": "container", - "1": "global", - "2": "world_interaction", - "3": "creative", - "100": "craft_slot", - "99999": "craft" - } - } - ] - }, - { - "anon": true, - "type": [ - "switch", - { - "compareTo": "source_type", - "fields": { - "container": [ - "container", - [ - { - "name": "inventory_id", - "type": "WindowIDVarint" - } - ] - ], - "craft": [ - "container", - [ - { - "name": "action", - "type": "varint" - } - ] - ], - "world_interaction": [ - "container", - [ - { - "name": "flags", - "type": "varint" - } - ] - ], - "craft_slot": [ - "container", - [ - { - "name": "action", - "type": "varint" - } - ] - ] - }, - "default": "void" - } - ] - }, - { - "name": "slot", - "type": "varint" - }, - { - "name": "old_item", - "type": "Item" - }, - { - "name": "new_item", - "type": "Item" - } - ] - ] - } - ], - "TransactionLegacy": [ - "container", - [ - { - "name": "legacy_request_id", - "type": "zigzag32" - }, - { - "name": "legacy_transactions", - "type": [ - "switch", - { - "compareTo": "legacy_request_id", - "fields": { - "0": "void" - }, - "default": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "container_id", - "type": "u8" - }, - { - "name": "changed_slots", - "type": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "slot_id", - "type": "u8" - } - ] - ] - } - ] - } - ] - ] - } - ] - } - ] - } - ] - ], - "Transaction": [ - "container", - [ - { - "name": "legacy", - "type": "TransactionLegacy" - }, - { - "name": "transaction_type", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "0": "normal", - "1": "inventory_mismatch", - "2": "item_use", - "3": "item_use_on_entity", - "4": "item_release" - } - } - ] - }, - { - "name": "actions", - "type": "TransactionActions" - }, - { - "name": "transaction_data", - "type": [ - "switch", - { - "compareTo": "transaction_type", - "fields": { - "normal": "void", - "inventory_mismatch": "void", - "item_use": "TransactionUseItem", - "item_use_on_entity": [ - "container", - [ - { - "name": "entity_runtime_id", - "type": "varint64" - }, - { - "name": "action_type", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "0": "interact", - "1": "attack" - } - } - ] - }, - { - "name": "hotbar_slot", - "type": "zigzag32" - }, - { - "name": "held_item", - "type": "Item" - }, - { - "name": "player_pos", - "type": "vec3f" - }, - { - "name": "click_pos", - "type": "vec3f" - } - ] - ], - "item_release": [ - "container", - [ - { - "name": "action_type", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "0": "release", - "1": "consume" - } - } - ] - }, - { - "name": "hotbar_slot", - "type": "zigzag32" - }, - { - "name": "held_item", - "type": "Item" - }, - { - "name": "head_pos", - "type": "vec3f" - } - ] - ] - }, - "default": "void" - } - ] - } - ] - ], - "ItemStacks": [ - "array", - { - "countType": "varint", - "type": "Item" - } - ], - "RecipeIngredient": [ - "container", - [ - { - "name": "network_id", - "type": "zigzag32" - }, - { - "anon": true, - "type": [ - "switch", - { - "compareTo": "network_id", - "fields": { - "0": "void" - }, - "default": [ - "container", - [ - { - "name": "network_data", - "type": "zigzag32" - }, - { - "name": "count", - "type": "zigzag32" - } - ] - ] - } - ] - } - ] - ], - "PotionTypeRecipes": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "input_item_id", - "type": "zigzag32" - }, - { - "name": "input_item_meta", - "type": "zigzag32" - }, - { - "name": "ingredient_id", - "type": "zigzag32" - }, - { - "name": "ingredient_meta", - "type": "zigzag32" - }, - { - "name": "output_item_id", - "type": "zigzag32" - }, - { - "name": "output_item_meta", - "type": "zigzag32" - } - ] - ] - } - ], - "PotionContainerChangeRecipes": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "input_item_id", - "type": "zigzag32" - }, - { - "name": "ingredient_id", - "type": "zigzag32" - }, - { - "name": "output_item_id", - "type": "zigzag32" - } - ] - ] - } - ], - "Recipes": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "type", - "type": [ - "mapper", - { - "type": "zigzag32", - "mappings": { - "0": "shapeless", - "1": "shaped", - "2": "furnace", - "3": "furnace_with_metadata", - "4": "multi", - "5": "shulker_box", - "6": "shapeless_chemistry", - "7": "shaped_chemistry" - } - } - ] - }, - { - "name": "recipe", - "type": [ - "switch", - { - "compareTo": "type", - "fields": { - "shapeless": [ - "container", - [ - { - "name": "recipe_id", - "type": "string" - }, - { - "name": "input", - "type": [ - "array", - { - "countType": "varint", - "type": "RecipeIngredient" - } - ] - }, - { - "name": "output", - "type": [ - "array", - { - "countType": "varint", - "type": "ItemLegacy" - } - ] - }, - { - "name": "uuid", - "type": "uuid" - }, - { - "name": "block", - "type": "string" - }, - { - "name": "priority", - "type": "zigzag32" - }, - { - "name": "network_id", - "type": "varint" - } - ] - ], - "shulker_box": [ - "container", - [ - { - "name": "recipe_id", - "type": "string" - }, - { - "name": "input", - "type": [ - "array", - { - "countType": "varint", - "type": "RecipeIngredient" - } - ] - }, - { - "name": "output", - "type": [ - "array", - { - "countType": "varint", - "type": "ItemLegacy" - } - ] - }, - { - "name": "uuid", - "type": "uuid" - }, - { - "name": "block", - "type": "string" - }, - { - "name": "priority", - "type": "zigzag32" - }, - { - "name": "network_id", - "type": "varint" - } - ] - ], - "shapeless_chemistry": [ - "container", - [ - { - "name": "recipe_id", - "type": "string" - }, - { - "name": "input", - "type": [ - "array", - { - "countType": "varint", - "type": "RecipeIngredient" - } - ] - }, - { - "name": "output", - "type": [ - "array", - { - "countType": "varint", - "type": "ItemLegacy" - } - ] - }, - { - "name": "uuid", - "type": "uuid" - }, - { - "name": "block", - "type": "string" - }, - { - "name": "priority", - "type": "zigzag32" - }, - { - "name": "network_id", - "type": "varint" - } - ] - ], - "shaped": [ - "container", - [ - { - "name": "recipe_id", - "type": "string" - }, - { - "name": "width", - "type": "zigzag32" - }, - { - "name": "height", - "type": "zigzag32" - }, - { - "name": "input", - "type": [ - "array", - { - "count": "width", - "type": [ - "array", - { - "count": "height", - "type": "RecipeIngredient" - } - ] - } - ] - }, - { - "name": "output", - "type": [ - "array", - { - "countType": "varint", - "type": "ItemLegacy" - } - ] - }, - { - "name": "uuid", - "type": "uuid" - }, - { - "name": "block", - "type": "string" - }, - { - "name": "priority", - "type": "zigzag32" - }, - { - "name": "network_id", - "type": "varint" - } - ] - ], - "shaped_chemistry": [ - "container", - [ - { - "name": "recipe_id", - "type": "string" - }, - { - "name": "width", - "type": "zigzag32" - }, - { - "name": "height", - "type": "zigzag32" - }, - { - "name": "input", - "type": [ - "array", - { - "count": "width", - "type": [ - "array", - { - "count": "height", - "type": "RecipeIngredient" - } - ] - } - ] - }, - { - "name": "output", - "type": [ - "array", - { - "countType": "varint", - "type": "ItemLegacy" - } - ] - }, - { - "name": "uuid", - "type": "uuid" - }, - { - "name": "block", - "type": "string" - }, - { - "name": "priority", - "type": "zigzag32" - }, - { - "name": "network_id", - "type": "varint" - } - ] - ], - "furnace": [ - "container", - [ - { - "name": "input_id", - "type": "zigzag32" - }, - { - "name": "output", - "type": "ItemLegacy" - }, - { - "name": "block", - "type": "string" - } - ] - ], - "furnace_with_metadata": [ - "container", - [ - { - "name": "input_id", - "type": "zigzag32" - }, - { - "name": "input_meta", - "type": "zigzag32" - }, - { - "name": "output", - "type": "ItemLegacy" - }, - { - "name": "block", - "type": "string" - } - ] - ], - "multi": [ - "container", - [ - { - "name": "uuid", - "type": "uuid" - }, - { - "name": "network_id", - "type": "varint" - } - ] - ] - }, - "default": "void" - } - ] - } - ] - ] - } - ], - "SkinImage": [ - "container", - [ - { - "name": "width", - "type": "li32" - }, - { - "name": "height", - "type": "li32" - }, - { - "name": "data", - "type": "ByteArray" - } - ] - ], - "Skin": [ - "container", - [ - { - "name": "skin_id", - "type": "string" - }, - { - "name": "play_fab_id", - "type": "string" - }, - { - "name": "skin_resource_pack", - "type": "string" - }, - { - "name": "skin_data", - "type": "SkinImage" - }, - { - "name": "animations", - "type": [ - "array", - { - "countType": "li32", - "type": [ - "container", - [ - { - "name": "skin_image", - "type": "SkinImage" - }, - { - "name": "animation_type", - "type": "li32" - }, - { - "name": "animation_frames", - "type": "lf32" - }, - { - "name": "expression_type", - "type": "lf32" - } - ] - ] - } - ] - }, - { - "name": "cape_data", - "type": "SkinImage" - }, - { - "name": "geometry_data", - "type": "string" - }, - { - "name": "animation_data", - "type": "string" - }, - { - "name": "premium", - "type": "bool" - }, - { - "name": "persona", - "type": "bool" - }, - { - "name": "cape_on_classic", - "type": "bool" - }, - { - "name": "cape_id", - "type": "string" - }, - { - "name": "full_skin_id", - "type": "string" - }, - { - "name": "arm_size", - "type": "string" - }, - { - "name": "skin_color", - "type": "string" - }, - { - "name": "personal_pieces", - "type": [ - "array", - { - "countType": "li32", - "type": [ - "container", - [ - { - "name": "piece_id", - "type": "string" - }, - { - "name": "piece_type", - "type": "string" - }, - { - "name": "pack_id", - "type": "string" - }, - { - "name": "is_default_piece", - "type": "bool" - }, - { - "name": "product_id", - "type": "string" - } - ] - ] - } - ] - }, - { - "name": "piece_tint_colors", - "type": [ - "array", - { - "countType": "li32", - "type": [ - "container", - [ - { - "name": "piece_type", - "type": "string" - }, - { - "name": "colors", - "type": [ - "array", - { - "countType": "li32", - "type": "string" - } - ] - } - ] - ] - } - ] - } - ] - ], - "PlayerRecords": [ - "container", - [ - { - "name": "type", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "0": "add", - "1": "remove" - } - } - ] - }, - { - "name": "records_count", - "type": "varint" - }, - { - "name": "records", - "type": [ - "array", - { - "count": "records_count", - "type": [ - "switch", - { - "compareTo": "type", - "fields": { - "add": [ - "container", - [ - { - "name": "uuid", - "type": "uuid" - }, - { - "name": "entity_unique_id", - "type": "zigzag64" - }, - { - "name": "username", - "type": "string" - }, - { - "name": "xbox_user_id", - "type": "string" - }, - { - "name": "platform_chat_id", - "type": "string" - }, - { - "name": "build_platform", - "type": "li32" - }, - { - "name": "skin_data", - "type": "Skin" - }, - { - "name": "is_teacher", - "type": "bool" - }, - { - "name": "is_host", - "type": "bool" - } - ] - ], - "remove": [ - "container", - [ - { - "name": "uuid", - "type": "uuid" - } - ] - ] - }, - "default": "void" - } - ] - } - ] - }, - { - "name": "verified", - "type": [ - "switch", - { - "compareTo": "type", - "fields": { - "add": [ - "array", - { - "count": "records_count", - "type": "bool" - } - ] - }, - "default": "void" - } - ] - } - ] - ], - "Enchant": [ - "container", - [ - { - "name": "id", - "type": "u8" - }, - { - "name": "level", - "type": "u8" - } - ] - ], - "EnchantOption": [ - "container", - [ - { - "name": "cost", - "type": "varint" - }, - { - "name": "slot_flags", - "type": "li32" - }, - { - "name": "equip_enchants", - "type": [ - "array", - { - "countType": "varint", - "type": "Enchant" - } - ] - }, - { - "name": "held_enchants", - "type": [ - "array", - { - "countType": "varint", - "type": "Enchant" - } - ] - }, - { - "name": "self_enchants", - "type": [ - "array", - { - "countType": "varint", - "type": "Enchant" - } - ] - }, - { - "name": "name", - "type": "string" - }, - { - "name": "option_id", - "type": "zigzag32" - } - ] - ], - "Action": [ - "mapper", - { - "type": "zigzag32", - "mappings": { - "0": "start_break", - "1": "abort_break", - "2": "stop_break", - "3": "get_updated_block", - "4": "drop_item", - "5": "start_sleeping", - "6": "stop_sleeping", - "7": "respawn", - "8": "jump", - "9": "start_sprint", - "10": "stop_sprint", - "11": "start_sneak", - "12": "stop_sneak", - "13": "creative_player_destroy_block", - "14": "dimension_change_ack", - "15": "start_glide", - "16": "stop_glide", - "17": "build_denied", - "18": "crack_break", - "19": "change_skin", - "20": "set_enchatnment_seed", - "21": "swimming", - "22": "stop_swimming", - "23": "start_spin_attack", - "24": "stop_spin_attack", - "25": "interact_block", - "26": "predict_break", - "27": "continue_break" - } - } - ], - "StackRequestSlotInfo": [ - "container", - [ - { - "name": "slot_type", - "type": "ContainerSlotType" - }, - { - "name": "slot", - "type": "u8" - }, - { - "name": "stack_id", - "type": "zigzag32" - } - ] - ], - "ItemStackRequest": [ - "container", - [ - { - "name": "request_id", - "type": "varint" - }, - { - "name": "actions", - "type": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "type_id", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "0": "take", - "1": "place", - "2": "swap", - "3": "drop", - "4": "destroy", - "5": "consume", - "6": "create", - "7": "lab_table_combine", - "8": "beacon_payment", - "9": "mine_block", - "10": "craft_recipe", - "11": "craft_recipe_auto", - "12": "craft_creative", - "13": "optional", - "14": "non_implemented", - "15": "results_deprecated" - } - } - ] - }, - { - "anon": true, - "type": [ - "switch", - { - "compareTo": "type_id", - "fields": { - "take": [ - "container", - [ - { - "name": "count", - "type": "u8" - }, - { - "name": "source", - "type": "StackRequestSlotInfo" - }, - { - "name": "destination", - "type": "StackRequestSlotInfo" - } - ] - ], - "place": [ - "container", - [ - { - "name": "count", - "type": "u8" - }, - { - "name": "source", - "type": "StackRequestSlotInfo" - }, - { - "name": "destination", - "type": "StackRequestSlotInfo" - } - ] - ], - "swap": [ - "container", - [ - { - "name": "source", - "type": "StackRequestSlotInfo" - }, - { - "name": "destination", - "type": "StackRequestSlotInfo" - } - ] - ], - "drop": [ - "container", - [ - { - "name": "count", - "type": "u8" - }, - { - "name": "source", - "type": "StackRequestSlotInfo" - }, - { - "name": "randomly", - "type": "bool" - } - ] - ], - "destroy": [ - "container", - [ - { - "name": "count", - "type": "u8" - }, - { - "name": "source", - "type": "StackRequestSlotInfo" - } - ] - ], - "consume": [ - "container", - [ - { - "name": "count", - "type": "u8" - }, - { - "name": "source", - "type": "StackRequestSlotInfo" - } - ] - ], - "create": [ - "container", - [ - { - "name": "result_slot_id", - "type": "u8" - } - ] - ], - "beacon_payment": [ - "container", - [ - { - "name": "primary_effect", - "type": "zigzag32" - }, - { - "name": "secondary_effect", - "type": "zigzag32" - } - ] - ], - "mine_block": [ - "container", - [ - { - "name": "unknown1", - "type": "zigzag32" - }, - { - "name": "predicted_durability", - "type": "zigzag32" - }, - { - "name": "network_id", - "type": "zigzag32" - } - ] - ], - "craft_recipe": [ - "container", - [ - { - "name": "recipe_network_id", - "type": "varint" - } - ] - ], - "craft_recipe_auto": [ - "container", - [ - { - "name": "recipe_network_id", - "type": "varint" - } - ] - ], - "craft_creative": [ - "container", - [ - { - "name": "item_id", - "type": "varint32" - } - ] - ], - "optional": [ - "container", - [ - { - "name": "recipe_network_id", - "type": "varint" - }, - { - "name": "filtered_string_index", - "type": "li32" - } - ] - ], - "non_implemented": "void", - "results_deprecated": [ - "container", - [ - { - "name": "result_items", - "type": [ - "array", - { - "countType": "varint", - "type": "ItemLegacy" - } - ] - }, - { - "name": "times_crafted", - "type": "u8" - } - ] - ] - }, - "default": "void" - } - ] - } - ] - ] - } - ] - }, - { - "name": "custom_names", - "type": [ - "array", - { - "countType": "varint", - "type": "string" - } - ] - } - ] - ], - "ItemStackResponses": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "status", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "0": "ok", - "1": "error" - } - } - ] - }, - { - "name": "request_id", - "type": "varint32" - }, - { - "anon": true, - "type": [ - "switch", - { - "compareTo": "status", - "fields": { - "ok": [ - "container", - [ - { - "name": "containers", - "type": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "slot_type", - "type": "ContainerSlotType" - }, - { - "name": "slots", - "type": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "slot", - "type": "u8" - }, - { - "name": "hotbar_slot", - "type": "u8" - }, - { - "name": "count", - "type": "u8" - }, - { - "name": "item_stack_id", - "type": "varint32" - }, - { - "name": "custom_name", - "type": "string" - }, - { - "name": "durability_correction", - "type": "zigzag32" - } - ] - ] - } - ] - } - ] - ] - } - ] - } - ] - ] - }, - "default": "void" - } - ] - } - ] - ] - } - ], - "ItemComponentList": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "nbt", - "type": "nbt" - } - ] - ] - } - ], - "CommandOrigin": [ - "container", - [ - { - "name": "type", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "0": "player", - "1": "block", - "2": "minecart_block", - "3": "dev_console", - "4": "test", - "5": "automation_player", - "6": "client_automation", - "7": "dedicated_server", - "8": "entity", - "9": "virtual", - "10": "game_argument", - "11": "entity_server", - "12": "precompiled", - "13": "game_director_entity_server", - "14": "script" - } - } - ] - }, - { - "name": "uuid", - "type": "uuid" - }, - { - "name": "request_id", - "type": "string" - }, - { - "name": "player_entity_id", - "type": [ - "switch", - { - "compareTo": "type", - "fields": { - "dev_console": [ - "container", - [ - { - "name": "player_entity_id", - "type": "zigzag64" - } - ] - ], - "test": [ - "container", - [ - { - "name": "player_entity_id", - "type": "zigzag64" - } - ] - ] - }, - "default": "void" - } - ] - } - ] - ], - "TrackedObject": [ - "container", - [ - { - "name": "type", - "type": [ - "mapper", - { - "type": "li32", - "mappings": { - "0": "entity", - "1": "block" - } - } - ] - }, - { - "name": "entity_unique_id", - "type": [ - "switch", - { - "compareTo": "type", - "fields": { - "entity": "zigzag64" - }, - "default": "void" - } - ] - }, - { - "name": "block_position", - "type": [ - "switch", - { - "compareTo": "type", - "fields": { - "block": "BlockCoordinates" - }, - "default": "void" - } - ] - } - ] - ], - "MapDecoration": [ - "container", - [ - { - "name": "type", - "type": "u8" - }, - { - "name": "rotation", - "type": "u8" - }, - { - "name": "x", - "type": "u8" - }, - { - "name": "y", - "type": "u8" - }, - { - "name": "label", - "type": "string" - }, - { - "name": "color_abgr", - "type": "varint" - } - ] - ], - "StructureBlockSettings": [ - "container", - [ - { - "name": "palette_name", - "type": "string" - }, - { - "name": "ignore_entities", - "type": "bool" - }, - { - "name": "ignore_blocks", - "type": "bool" - }, - { - "name": "size", - "type": "BlockCoordinates" - }, - { - "name": "structure_offset", - "type": "BlockCoordinates" - }, - { - "name": "last_editing_player_unique_id", - "type": "zigzag64" - }, - { - "name": "rotation", - "type": "u8" - }, - { - "name": "mirror", - "type": "u8" - }, - { - "name": "integrity", - "type": "lf32" - }, - { - "name": "seed", - "type": "lu32" - }, - { - "name": "pivot", - "type": "vec3f" - } - ] - ], - "WindowID": [ - "mapper", - { - "type": "i8", - "mappings": { - "0": "inventory", - "1": "first", - "100": "last", - "119": "offhand", - "120": "armor", - "121": "creative", - "122": "hotbar", - "123": "fixed_inventory", - "124": "ui", - "-100": "drop_contents", - "-24": "beacon", - "-23": "trading_output", - "-22": "trading_use_inputs", - "-21": "trading_input_2", - "-20": "trading_input_1", - "-17": "enchant_output", - "-16": "enchant_material", - "-15": "enchant_input", - "-13": "anvil_output", - "-12": "anvil_result", - "-11": "anvil_material", - "-10": "container_input", - "-5": "crafting_use_ingredient", - "-4": "crafting_result", - "-3": "crafting_remove_ingredient", - "-2": "crafting_add_ingredient", - "-1": "none" - } - } - ], - "WindowIDVarint": [ - "mapper", - { - "type": "varint", - "mappings": { - "0": "inventory", - "1": "first", - "100": "last", - "119": "offhand", - "120": "armor", - "121": "creative", - "122": "hotbar", - "123": "fixed_inventory", - "124": "ui", - "-100": "drop_contents", - "-24": "beacon", - "-23": "trading_output", - "-22": "trading_use_inputs", - "-21": "trading_input_2", - "-20": "trading_input_1", - "-17": "enchant_output", - "-16": "enchant_material", - "-15": "enchant_input", - "-13": "anvil_output", - "-12": "anvil_result", - "-11": "anvil_material", - "-10": "container_input", - "-5": "crafting_use_ingredient", - "-4": "crafting_result", - "-3": "crafting_remove_ingredient", - "-2": "crafting_add_ingredient", - "-1": "none" - } - } - ], - "WindowType": [ - "mapper", - { - "type": "i8", - "mappings": { - "0": "container", - "1": "workbench", - "2": "furnace", - "3": "enchantment", - "4": "brewing_stand", - "5": "anvil", - "6": "dispenser", - "7": "dropper", - "8": "hopper", - "9": "cauldron", - "10": "minecart_chest", - "11": "minecart_hopper", - "12": "horse", - "13": "beacon", - "14": "structure_editor", - "15": "trading", - "16": "command_block", - "17": "jukebox", - "18": "armor", - "19": "hand", - "20": "compound_creator", - "21": "element_constructor", - "22": "material_reducer", - "23": "lab_table", - "24": "loom", - "25": "lectern", - "26": "grindstone", - "27": "blast_furnace", - "28": "smoker", - "29": "stonecutter", - "30": "cartography", - "31": "hud", - "32": "jigsaw_editor", - "33": "smithing_table", - "-9": "none", - "-1": "inventory" - } - } - ], - "ContainerSlotType": [ - "mapper", - { - "type": "u8", - "mappings": { - "0": "anvil_input", - "1": "anvil_material", - "2": "anvil_result", - "3": "smithing_table_input", - "4": "smithing_table_material", - "5": "smithing_table_result", - "6": "armor", - "7": "container", - "8": "beacon_payment", - "9": "brewing_input", - "10": "brewing_result", - "11": "brewing_fuel", - "12": "hotbar_and_inventory", - "13": "crafting_input", - "14": "crafting_output", - "15": "recipe_construction", - "16": "recipe_nature", - "17": "recipe_items", - "18": "recipe_search", - "19": "recipe_search_bar", - "20": "recipe_equipment", - "21": "enchanting_input", - "22": "enchanting_lapis", - "23": "furnace_fuel", - "24": "furnace_ingredient", - "25": "furnace_output", - "26": "horse_equip", - "27": "hotbar", - "28": "inventory", - "29": "shulker", - "30": "trade_ingredient1", - "31": "trade_ingredient2", - "32": "trade_result", - "33": "offhand", - "34": "compcreate_input", - "35": "compcreate_output", - "36": "elemconstruct_output", - "37": "matreduce_input", - "38": "matreduce_output", - "39": "labtable_input", - "40": "loom_input", - "41": "loom_dye", - "42": "loom_material", - "43": "loom_result", - "44": "blast_furnace_ingredient", - "45": "smoker_ingredient", - "46": "trade2_ingredient1", - "47": "trade2_ingredient2", - "48": "trade2_result", - "49": "grindstone_input", - "50": "grindstone_additional", - "51": "grindstone_result", - "52": "stonecutter_input", - "53": "stonecutter_result", - "54": "cartography_input", - "55": "cartography_additional", - "56": "cartography_result", - "57": "barrel", - "58": "cursor", - "59": "creative_output" - } - } - ], - "SoundType": [ - "mapper", - { - "type": "varint", - "mappings": { - "0": "ItemUseOn", - "1": "Hit", - "2": "Step", - "3": "Fly", - "4": "Jump", - "5": "Break", - "6": "Place", - "7": "HeavyStep", - "8": "Gallop", - "9": "Fall", - "10": "Ambient", - "11": "AmbientBaby", - "12": "AmbientInWater", - "13": "Breathe", - "14": "Death", - "15": "DeathInWater", - "16": "DeathToZombie", - "17": "Hurt", - "18": "HurtInWater", - "19": "Mad", - "20": "Boost", - "21": "Bow", - "22": "SquishBig", - "23": "SquishSmall", - "24": "FallBig", - "25": "FallSmall", - "26": "Splash", - "27": "Fizz", - "28": "Flap", - "29": "Swim", - "30": "Drink", - "31": "Eat", - "32": "Takeoff", - "33": "Shake", - "34": "Plop", - "35": "Land", - "36": "Saddle", - "37": "Armor", - "38": "MobArmorStandPlace", - "39": "AddChest", - "40": "Throw", - "41": "Attack", - "42": "AttackNoDamage", - "43": "AttackStrong", - "44": "Warn", - "45": "Shear", - "46": "Milk", - "47": "Thunder", - "48": "Explode", - "49": "Fire", - "50": "Ignite", - "51": "Fuse", - "52": "Stare", - "53": "Spawn", - "54": "Shoot", - "55": "BreakBlock", - "56": "Launch", - "57": "Blast", - "58": "LargeBlast", - "59": "Twinkle", - "60": "Remedy", - "61": "Infect", - "62": "LevelUp", - "63": "BowHit", - "64": "BulletHit", - "65": "ExtinguishFire", - "66": "ItemFizz", - "67": "ChestOpen", - "68": "ChestClosed", - "69": "ShulkerBoxOpen", - "70": "ShulkerBoxClosed", - "71": "EnderChestOpen", - "72": "EnderChestClosed", - "73": "PowerOn", - "74": "PowerOff", - "75": "Attach", - "76": "Detach", - "77": "Deny", - "78": "Tripod", - "79": "Pop", - "80": "DropSlot", - "81": "Note", - "82": "Thorns", - "83": "PistonIn", - "84": "PistonOut", - "85": "Portal", - "86": "Water", - "87": "LavaPop", - "88": "Lava", - "89": "Burp", - "90": "BucketFillWater", - "91": "BucketFillLava", - "92": "BucketEmptyWater", - "93": "BucketEmptyLava", - "94": "ArmorEquipChain", - "95": "ArmorEquipDiamond", - "96": "ArmorEquipGeneric", - "97": "ArmorEquipGold", - "98": "ArmorEquipIron", - "99": "ArmorEquipLeather", - "100": "ArmorEquipElytra", - "101": "Record13", - "102": "RecordCat", - "103": "RecordBlocks", - "104": "RecordChirp", - "105": "RecordFar", - "106": "RecordMall", - "107": "RecordMellohi", - "108": "RecordStal", - "109": "RecordStrad", - "110": "RecordWard", - "111": "Record11", - "112": "RecordWait", - "113": "unknown1", - "114": "Flop", - "115": "ElderGuardianCurse", - "116": "MobWarning", - "117": "MobWarningBaby", - "118": "Teleport", - "119": "ShulkerOpen", - "120": "ShulkerClose", - "121": "Haggle", - "122": "HaggleYes", - "123": "HaggleNo", - "124": "HaggleIdle", - "125": "ChorusGrow", - "126": "ChorusDeath", - "127": "Glass", - "128": "PotionBrewed", - "129": "CastSpell", - "130": "PrepareAttack", - "131": "PrepareSummon", - "132": "PrepareWololo", - "133": "Fang", - "134": "Charge", - "135": "CameraTakePicture", - "136": "LeashKnotPlace", - "137": "LeashKnotBreak", - "138": "Growl", - "139": "Whine", - "140": "Pant", - "141": "Purr", - "142": "Purreow", - "143": "DeathMinVolume", - "144": "DeathMidVolume", - "145": "unknown2", - "146": "ImitateCaveSpider", - "147": "ImitateCreeper", - "148": "ImitateElderGuardian", - "149": "ImitateEnderDragon", - "150": "ImitateEnderman", - "151": "unknown3", - "152": "ImitateEvocationIllager", - "153": "ImitateGhast", - "154": "ImitateHusk", - "155": "ImitateIllusionIllager", - "156": "ImitateMagmaCube", - "157": "ImitatePolarBear", - "158": "ImitateShulker", - "159": "ImitateSilverfish", - "160": "ImitateSkeleton", - "161": "ImitateSlime", - "162": "ImitateSpider", - "163": "ImitateStray", - "164": "ImitateVex", - "165": "ImitateVindicationIllager", - "166": "ImitateWitch", - "167": "ImitateWither", - "168": "ImitateWitherSkeleton", - "169": "ImitateWolf", - "170": "ImitateZombie", - "171": "ImitateZombiePigman", - "172": "ImitateZombieVillager", - "173": "BlockEndPortalFrameFill", - "174": "BlockEndPortalSpawn", - "175": "RandomAnvilUse", - "176": "BottleDragonBreath", - "177": "PortalTravel", - "178": "ItemTridentHit", - "179": "ItemTridentReturn", - "180": "ItemTridentRiptide1", - "181": "ItemTridentRiptide2", - "182": "ItemTridentRiptide3", - "183": "ItemTridentThrow", - "184": "ItemTridentThunder", - "185": "ItemTridentHitGround", - "186": "Default", - "187": "BlockFletchingTableUse", - "188": "ElemConstructOpen", - "189": "IceBombHit", - "190": "BalloonPop", - "191": "LtReactionIceBomb", - "192": "LtReactionBleach", - "193": "LtReactionEPaste", - "194": "LtReactionEPaste2", - "195": "LtReactionFertilizer", - "196": "LtReactionFireball", - "197": "LtReactionMgsalt", - "198": "LtReactionMiscfire", - "199": "LtReactionFire", - "200": "LtReactionMiscexplosion", - "201": "LtReactionMiscmystical", - "202": "LtReactionMiscmystical2", - "203": "LtReactionProduct", - "204": "SparklerUse", - "205": "GlowstickUse", - "206": "SparklerActive", - "207": "ConvertToDrowned", - "208": "BucketFillFish", - "209": "BucketEmptyFish", - "210": "BubbleUp", - "211": "BubbleDown", - "212": "BubblePop", - "213": "BubbleUpInside", - "214": "BubbleDownInside", - "215": "HurtBaby", - "216": "DeathBaby", - "217": "StepBaby", - "218": "BabySpawn", - "219": "Born", - "220": "BlockTurtleEggBreak", - "221": "BlockTurtleEggCrack", - "222": "BlockTurtleEggHatch", - "223": "TurtleLayEgg", - "224": "BlockTurtleEggAttack", - "225": "BeaconActivate", - "226": "BeaconAmbient", - "227": "BeaconDeactivate", - "228": "BeaconPower", - "229": "ConduitActivate", - "230": "ConduitAmbient", - "231": "ConduitAttack", - "232": "ConduitDeactivate", - "233": "ConduitShort", - "234": "Swoop", - "235": "BlockBambooSaplingPlace", - "236": "PreSneeze", - "237": "Sneeze", - "238": "AmbientTame", - "239": "Scared", - "240": "BlockScaffoldingClimb", - "241": "CrossbowLoadingStart", - "242": "CrossbowLoadingMiddle", - "243": "CrossbowLoadingEnd", - "244": "CrossbowShoot", - "245": "CrossbowQuickChargeStart", - "246": "CrossbowQuickChargeMiddle", - "247": "CrossbowQuickChargeEnd", - "248": "AmbientAggressive", - "249": "AmbientWorried", - "250": "CantBreed", - "251": "ItemShieldBlock", - "252": "ItemBookPut", - "253": "BlockGrindstoneUse", - "254": "BlockBellHit", - "255": "BlockCampfireCrackle", - "256": "Roar", - "257": "Stun", - "258": "BlockSweetBerryBushHurt", - "259": "BlockSweetBerryBushPick", - "260": "UICartographyTableTakeResult", - "261": "UIStoneCutterTakeResult", - "262": "BlockComposterEmpty", - "263": "BlockComposterFill", - "264": "BlockComposterFillSuccess", - "265": "BlockComposterReady", - "266": "BlockBarrelOpen", - "267": "BlockBarrelClose", - "268": "RaidHorn", - "269": "BlockLoomUse", - "270": "AmbientRaid", - "271": "UICartographyTableUse", - "272": "UIStoneCutterUse", - "273": "UILoomUse", - "274": "SmokerUse", - "275": "BlastFurnaceUse", - "276": "SmithingTableUse", - "277": "Screech", - "278": "Sleep", - "279": "FurnaceUse", - "280": "MooshroomConvert", - "281": "MilkSuspiciously", - "282": "Celebrate", - "283": "JumpPrevent", - "284": "AmbientPollinate", - "285": "BeeHiveDrip", - "286": "BeeHiveEnter", - "287": "BeeHiveExit", - "288": "BeeHiveWork", - "289": "BeeHiveShear", - "290": "HoneyBottleDrink", - "291": "AmbientCave", - "292": "Retreat", - "293": "ConvertToZombified", - "294": "Admire", - "295": "StepLava", - "296": "Tempt", - "297": "Panic", - "298": "Angry", - "299": "AmbientWarpedForest", - "300": "AmbientSoulsandValley", - "301": "AmbientNetherWastes", - "302": "AmbientBasaltDeltas", - "303": "AmbientCrimsonForest", - "304": "RespawnAnchorCharge", - "305": "RespawnAnchorDeplete", - "306": "RespawnAnchorSetSpawn", - "307": "RespawnAnchorAmbient", - "308": "SoulEscapeQuiet", - "309": "SoulEscapeLoud", - "310": "RecordPigstep", - "311": "LinkCompassToLodestone", - "312": "BlockSmithingTableUse", - "313": "EquipNetherite", - "314": "AmbientLoopWarpedForest", - "315": "AmbientLoopSoulsandValley", - "316": "AmbientLoopNetherWastes", - "317": "AmbientLoopBasaltDeltas", - "318": "AmbientLoopCrimsonForest", - "319": "AmbientAdditionWarpedForest", - "320": "AmbientAdditionSoulsandValley", - "321": "AmbientAdditionNetherWastes", - "322": "AmbientAdditionBasaltDeltas", - "323": "AmbientAdditionCrimsonForest", - "324": "SculkSensorPowerOn", - "325": "SculkSensorPowerOff", - "326": "BucketFillPowderSnow", - "327": "BucketEmptyPowderSnow", - "328": "PointedDripstoneCauldronDripWater", - "329": "PointedDripstoneCauldronDripLava", - "330": "PointedDripstoneDripWater", - "331": "PointedDripstoneDripLava", - "332": "CaveVinesPickBerries", - "333": "BigDripleafTiltDown", - "334": "BigDripleafTiltUp", - "335": "Undefined" - } - } - ], - "LegacyEntityType": [ - "mapper", - { - "type": "li32", - "mappings": { - "10": "chicken", - "11": "cow", - "12": "pig", - "13": "sheep", - "14": "wolf", - "15": "villager", - "16": "mooshroom", - "17": "squid", - "18": "rabbit", - "19": "bat", - "20": "iron_golem", - "21": "snow_golem", - "22": "ocelot", - "23": "horse", - "24": "donkey", - "25": "mule", - "26": "skeleton_horse", - "27": "zombie_horse", - "28": "polar_bear", - "29": "llama", - "30": "parrot", - "31": "dolphin", - "32": "zombie", - "33": "creeper", - "34": "skeleton", - "35": "spider", - "36": "zombie_pigman", - "37": "slime", - "38": "enderman", - "39": "silverfish", - "40": "cave_spider", - "41": "ghast", - "42": "magma_cube", - "43": "blaze", - "44": "zombie_villager", - "45": "witch", - "46": "stray", - "47": "husk", - "48": "wither_skeleton", - "49": "guardian", - "50": "elder_guardian", - "51": "npc", - "52": "wither", - "53": "ender_dragon", - "54": "shulker", - "55": "endermite", - "56": "agent", - "57": "vindicator", - "58": "phantom", - "61": "armor_stand", - "62": "tripod_camera", - "63": "player", - "64": "item", - "65": "tnt", - "66": "falling_block", - "67": "moving_block", - "68": "xp_bottle", - "69": "xp_orb", - "70": "eye_of_ender_signal", - "71": "ender_crystal", - "72": "fireworks_rocket", - "73": "thrown_trident", - "74": "turtle", - "75": "cat", - "76": "shulker_bullet", - "77": "fishing_hook", - "78": "chalkboard", - "79": "dragon_fireball", - "80": "arrow", - "81": "snowball", - "82": "egg", - "83": "painting", - "84": "minecart", - "85": "fireball", - "86": "splash_potion", - "87": "ender_pearl", - "88": "leash_knot", - "89": "wither_skull", - "90": "boat", - "91": "wither_skull_dangerous", - "93": "lightning_bolt", - "94": "small_fireball", - "95": "area_effect_cloud", - "96": "hopper_minecart", - "97": "tnt_minecart", - "98": "chest_minecart", - "100": "command_block_minecart", - "101": "lingering_potion", - "102": "llama_spit", - "103": "evocation_fang", - "104": "evocation_illager", - "105": "vex", - "106": "ice_bomb", - "107": "balloon", - "108": "pufferfish", - "109": "salmon", - "110": "drowned", - "111": "tropicalfish", - "112": "cod", - "113": "panda" - } - } - ], - "mcpe_packet": [ - "container", - [ - { - "name": "name", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "1": "login", - "2": "play_status", - "3": "server_to_client_handshake", - "4": "client_to_server_handshake", - "5": "disconnect", - "6": "resource_packs_info", - "7": "resource_pack_stack", - "8": "resource_pack_client_response", - "9": "text", - "10": "set_time", - "11": "start_game", - "12": "add_player", - "13": "add_entity", - "14": "remove_entity", - "15": "add_item_entity", - "17": "take_item_entity", - "18": "move_entity", - "19": "move_player", - "20": "rider_jump", - "21": "update_block", - "22": "add_painting", - "23": "tick_sync", - "24": "level_sound_event_old", - "25": "level_event", - "26": "block_event", - "27": "entity_event", - "28": "mob_effect", - "29": "update_attributes", - "30": "inventory_transaction", - "31": "mob_equipment", - "32": "mob_armor_equipment", - "33": "interact", - "34": "block_pick_request", - "35": "entity_pick_request", - "36": "player_action", - "38": "hurt_armor", - "39": "set_entity_data", - "40": "set_entity_motion", - "41": "set_entity_link", - "42": "set_health", - "43": "set_spawn_position", - "44": "animate", - "45": "respawn", - "46": "container_open", - "47": "container_close", - "48": "player_hotbar", - "49": "inventory_content", - "50": "inventory_slot", - "51": "container_set_data", - "52": "crafting_data", - "53": "crafting_event", - "54": "gui_data_pick_item", - "55": "adventure_settings", - "56": "block_entity_data", - "57": "player_input", - "58": "level_chunk", - "59": "set_commands_enabled", - "60": "set_difficulty", - "61": "change_dimension", - "62": "set_player_game_type", - "63": "player_list", - "64": "simple_event", - "65": "event", - "66": "spawn_experience_orb", - "67": "clientbound_map_item_data", - "68": "map_info_request", - "69": "request_chunk_radius", - "70": "chunk_radius_update", - "71": "item_frame_drop_item", - "72": "game_rules_changed", - "73": "camera", - "74": "boss_event", - "75": "show_credits", - "76": "available_commands", - "77": "command_request", - "78": "command_block_update", - "79": "command_output", - "80": "update_trade", - "81": "update_equipment", - "82": "resource_pack_data_info", - "83": "resource_pack_chunk_data", - "84": "resource_pack_chunk_request", - "85": "transfer", - "86": "play_sound", - "87": "stop_sound", - "88": "set_title", - "89": "add_behavior_tree", - "90": "structure_block_update", - "91": "show_store_offer", - "92": "purchase_receipt", - "93": "player_skin", - "94": "sub_client_login", - "95": "initiate_web_socket_connection", - "96": "set_last_hurt_by", - "97": "book_edit", - "98": "npc_request", - "99": "photo_transfer", - "100": "modal_form_request", - "101": "modal_form_response", - "102": "server_settings_request", - "103": "server_settings_response", - "104": "show_profile", - "105": "set_default_game_type", - "106": "remove_objective", - "107": "set_display_objective", - "108": "set_score", - "109": "lab_table", - "110": "update_block_synced", - "111": "move_entity_delta", - "112": "set_scoreboard_identity", - "113": "set_local_player_as_initialized", - "114": "update_soft_enum", - "115": "network_stack_latency", - "117": "script_custom_event", - "118": "spawn_particle_effect", - "119": "available_entity_identifiers", - "120": "level_sound_event_v2", - "121": "network_chunk_publisher_update", - "122": "biome_definition_list", - "123": "level_sound_event", - "124": "level_event_generic", - "125": "lectern_update", - "126": "video_stream_connect", - "127": "add_ecs_entity", - "128": "remove_ecs_entity", - "129": "client_cache_status", - "130": "on_screen_texture_animation", - "131": "map_create_locked_copy", - "132": "structure_template_data_export_request", - "133": "structure_template_data_export_response", - "134": "update_block_properties", - "135": "client_cache_blob_status", - "136": "client_cache_miss_response", - "137": "education_settings", - "139": "multiplayer_settings", - "140": "settings_command", - "141": "anvil_damage", - "142": "completed_using_item", - "143": "network_settings", - "144": "player_auth_input", - "145": "creative_content", - "146": "player_enchant_options", - "147": "item_stack_request", - "148": "item_stack_response", - "149": "player_armor_damage", - "151": "update_player_game_type", - "153": "position_tracking_db_broadcast", - "154": "position_tracking_db_request", - "156": "packet_violation_warning", - "157": "motion_prediction_hints", - "158": "animate_entity", - "159": "camera_shake", - "160": "player_fog", - "161": "correct_player_move_prediction", - "162": "item_component", - "163": "filter_text_packet", - "164": "debug_renderer" - } - } - ] - }, - { - "name": "params", - "type": [ - "switch", - { - "compareTo": "name", - "fields": { - "login": "packet_login", - "play_status": "packet_play_status", - "server_to_client_handshake": "packet_server_to_client_handshake", - "client_to_server_handshake": "packet_client_to_server_handshake", - "disconnect": "packet_disconnect", - "resource_packs_info": "packet_resource_packs_info", - "resource_pack_stack": "packet_resource_pack_stack", - "resource_pack_client_response": "packet_resource_pack_client_response", - "text": "packet_text", - "set_time": "packet_set_time", - "start_game": "packet_start_game", - "add_player": "packet_add_player", - "add_entity": "packet_add_entity", - "remove_entity": "packet_remove_entity", - "add_item_entity": "packet_add_item_entity", - "take_item_entity": "packet_take_item_entity", - "move_entity": "packet_move_entity", - "move_player": "packet_move_player", - "rider_jump": "packet_rider_jump", - "update_block": "packet_update_block", - "add_painting": "packet_add_painting", - "tick_sync": "packet_tick_sync", - "level_sound_event_old": "packet_level_sound_event_old", - "level_event": "packet_level_event", - "block_event": "packet_block_event", - "entity_event": "packet_entity_event", - "mob_effect": "packet_mob_effect", - "update_attributes": "packet_update_attributes", - "inventory_transaction": "packet_inventory_transaction", - "mob_equipment": "packet_mob_equipment", - "mob_armor_equipment": "packet_mob_armor_equipment", - "interact": "packet_interact", - "block_pick_request": "packet_block_pick_request", - "entity_pick_request": "packet_entity_pick_request", - "player_action": "packet_player_action", - "hurt_armor": "packet_hurt_armor", - "set_entity_data": "packet_set_entity_data", - "set_entity_motion": "packet_set_entity_motion", - "set_entity_link": "packet_set_entity_link", - "set_health": "packet_set_health", - "set_spawn_position": "packet_set_spawn_position", - "animate": "packet_animate", - "respawn": "packet_respawn", - "container_open": "packet_container_open", - "container_close": "packet_container_close", - "player_hotbar": "packet_player_hotbar", - "inventory_content": "packet_inventory_content", - "inventory_slot": "packet_inventory_slot", - "container_set_data": "packet_container_set_data", - "crafting_data": "packet_crafting_data", - "crafting_event": "packet_crafting_event", - "gui_data_pick_item": "packet_gui_data_pick_item", - "adventure_settings": "packet_adventure_settings", - "block_entity_data": "packet_block_entity_data", - "player_input": "packet_player_input", - "level_chunk": "packet_level_chunk", - "set_commands_enabled": "packet_set_commands_enabled", - "set_difficulty": "packet_set_difficulty", - "change_dimension": "packet_change_dimension", - "set_player_game_type": "packet_set_player_game_type", - "player_list": "packet_player_list", - "simple_event": "packet_simple_event", - "event": "packet_event", - "spawn_experience_orb": "packet_spawn_experience_orb", - "clientbound_map_item_data": "packet_clientbound_map_item_data", - "map_info_request": "packet_map_info_request", - "request_chunk_radius": "packet_request_chunk_radius", - "chunk_radius_update": "packet_chunk_radius_update", - "item_frame_drop_item": "packet_item_frame_drop_item", - "game_rules_changed": "packet_game_rules_changed", - "camera": "packet_camera", - "boss_event": "packet_boss_event", - "show_credits": "packet_show_credits", - "available_commands": "packet_available_commands", - "command_request": "packet_command_request", - "command_block_update": "packet_command_block_update", - "command_output": "packet_command_output", - "update_trade": "packet_update_trade", - "update_equipment": "packet_update_equipment", - "resource_pack_data_info": "packet_resource_pack_data_info", - "resource_pack_chunk_data": "packet_resource_pack_chunk_data", - "resource_pack_chunk_request": "packet_resource_pack_chunk_request", - "transfer": "packet_transfer", - "play_sound": "packet_play_sound", - "stop_sound": "packet_stop_sound", - "set_title": "packet_set_title", - "add_behavior_tree": "packet_add_behavior_tree", - "structure_block_update": "packet_structure_block_update", - "show_store_offer": "packet_show_store_offer", - "purchase_receipt": "packet_purchase_receipt", - "player_skin": "packet_player_skin", - "sub_client_login": "packet_sub_client_login", - "initiate_web_socket_connection": "packet_initiate_web_socket_connection", - "set_last_hurt_by": "packet_set_last_hurt_by", - "book_edit": "packet_book_edit", - "npc_request": "packet_npc_request", - "photo_transfer": "packet_photo_transfer", - "modal_form_request": "packet_modal_form_request", - "modal_form_response": "packet_modal_form_response", - "server_settings_request": "packet_server_settings_request", - "server_settings_response": "packet_server_settings_response", - "show_profile": "packet_show_profile", - "set_default_game_type": "packet_set_default_game_type", - "remove_objective": "packet_remove_objective", - "set_display_objective": "packet_set_display_objective", - "set_score": "packet_set_score", - "lab_table": "packet_lab_table", - "update_block_synced": "packet_update_block_synced", - "move_entity_delta": "packet_move_entity_delta", - "set_scoreboard_identity": "packet_set_scoreboard_identity", - "set_local_player_as_initialized": "packet_set_local_player_as_initialized", - "update_soft_enum": "packet_update_soft_enum", - "network_stack_latency": "packet_network_stack_latency", - "script_custom_event": "packet_script_custom_event", - "spawn_particle_effect": "packet_spawn_particle_effect", - "available_entity_identifiers": "packet_available_entity_identifiers", - "level_sound_event_v2": "packet_level_sound_event_v2", - "network_chunk_publisher_update": "packet_network_chunk_publisher_update", - "biome_definition_list": "packet_biome_definition_list", - "level_sound_event": "packet_level_sound_event", - "level_event_generic": "packet_level_event_generic", - "lectern_update": "packet_lectern_update", - "video_stream_connect": "packet_video_stream_connect", - "add_ecs_entity": "packet_add_ecs_entity", - "remove_ecs_entity": "packet_remove_ecs_entity", - "client_cache_status": "packet_client_cache_status", - "on_screen_texture_animation": "packet_on_screen_texture_animation", - "map_create_locked_copy": "packet_map_create_locked_copy", - "structure_template_data_export_request": "packet_structure_template_data_export_request", - "structure_template_data_export_response": "packet_structure_template_data_export_response", - "update_block_properties": "packet_update_block_properties", - "client_cache_blob_status": "packet_client_cache_blob_status", - "client_cache_miss_response": "packet_client_cache_miss_response", - "education_settings": "packet_education_settings", - "multiplayer_settings": "packet_multiplayer_settings", - "settings_command": "packet_settings_command", - "anvil_damage": "packet_anvil_damage", - "completed_using_item": "packet_completed_using_item", - "network_settings": "packet_network_settings", - "player_auth_input": "packet_player_auth_input", - "creative_content": "packet_creative_content", - "player_enchant_options": "packet_player_enchant_options", - "item_stack_request": "packet_item_stack_request", - "item_stack_response": "packet_item_stack_response", - "player_armor_damage": "packet_player_armor_damage", - "update_player_game_type": "packet_update_player_game_type", - "position_tracking_db_request": "packet_position_tracking_db_request", - "position_tracking_db_broadcast": "packet_position_tracking_db_broadcast", - "packet_violation_warning": "packet_packet_violation_warning", - "motion_prediction_hints": "packet_motion_prediction_hints", - "animate_entity": "packet_animate_entity", - "camera_shake": "packet_camera_shake", - "player_fog": "packet_player_fog", - "correct_player_move_prediction": "packet_correct_player_move_prediction", - "item_component": "packet_item_component", - "filter_text_packet": "packet_filter_text_packet", - "debug_renderer": "packet_debug_renderer" - }, - "default": "void" - } - ] - } - ] - ], - "packet_login": [ - "container", - [ - { - "name": "protocol_version", - "type": "i32" - }, - { - "name": "tokens", - "type": [ - "encapsulated", - { - "lengthType": "varint", - "type": "LoginTokens" - } - ] - } - ] - ], - "LoginTokens": [ - "container", - [ - { - "name": "identity", - "type": "LittleString" - }, - { - "name": "client", - "type": "LittleString" - } - ] - ], - "packet_play_status": [ - "container", - [ - { - "name": "status", - "type": [ - "mapper", - { - "type": "i32", - "mappings": { - "0": "login_success", - "1": "failed_client", - "2": "failed_spawn", - "3": "player_spawn", - "4": "failed_invalid_tenant", - "5": "failed_vanilla_edu", - "6": "failed_edu_vanilla", - "7": "failed_server_full" - } - } - ] - } - ] - ], - "packet_server_to_client_handshake": [ - "container", - [ - { - "name": "token", - "type": "string" - } - ] - ], - "packet_client_to_server_handshake": [ - "container", - [] - ], - "packet_disconnect": [ - "container", - [ - { - "name": "hide_disconnect_reason", - "type": "bool" - }, - { - "name": "message", - "type": "string" - } - ] - ], - "packet_resource_packs_info": [ - "container", - [ - { - "name": "must_accept", - "type": "bool" - }, - { - "name": "has_scripts", - "type": "bool" - }, - { - "name": "behaviour_packs", - "type": "BehaviourPackInfos" - }, - { - "name": "texture_packs", - "type": "TexturePackInfos" - } - ] - ], - "packet_resource_pack_stack": [ - "container", - [ - { - "name": "must_accept", - "type": "bool" - }, - { - "name": "behavior_packs", - "type": "ResourcePackIdVersions" - }, - { - "name": "resource_packs", - "type": "ResourcePackIdVersions" - }, - { - "name": "game_version", - "type": "string" - }, - { - "name": "experiments", - "type": "Experiments" - }, - { - "name": "experiments_previously_used", - "type": "bool" - } - ] - ], - "packet_resource_pack_client_response": [ - "container", - [ - { - "name": "response_status", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "0": "none", - "1": "refused", - "2": "send_packs", - "3": "have_all_packs", - "4": "completed" - } - } - ] - }, - { - "name": "resourcepackids", - "type": "ResourcePackIds" - } - ] - ], - "packet_text": [ - "container", - [ - { - "name": "type", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "0": "raw", - "1": "chat", - "2": "translation", - "3": "popup", - "4": "jukebox_popup", - "5": "tip", - "6": "system", - "7": "whisper", - "8": "announcement", - "9": "json_whisper", - "10": "json" - } - } - ] - }, - { - "name": "needs_translation", - "type": "bool" - }, - { - "anon": true, - "type": [ - "switch", - { - "compareTo": "type", - "fields": { - "chat": [ - "container", - [ - { - "name": "source_name", - "type": "string" - }, - { - "name": "message", - "type": "string" - } - ] - ], - "whisper": [ - "container", - [ - { - "name": "source_name", - "type": "string" - }, - { - "name": "message", - "type": "string" - } - ] - ], - "announcement": [ - "container", - [ - { - "name": "source_name", - "type": "string" - }, - { - "name": "message", - "type": "string" - } - ] - ], - "raw": [ - "container", - [ - { - "name": "message", - "type": "string" - } - ] - ], - "tip": [ - "container", - [ - { - "name": "message", - "type": "string" - } - ] - ], - "system": [ - "container", - [ - { - "name": "message", - "type": "string" - } - ] - ], - "json_whisper": [ - "container", - [ - { - "name": "message", - "type": "string" - } - ] - ], - "json": [ - "container", - [ - { - "name": "message", - "type": "string" - } - ] - ], - "translation": [ - "container", - [ - { - "name": "message", - "type": "string" - }, - { - "name": "paramaters", - "type": [ - "array", - { - "countType": "varint", - "type": "string" - } - ] - } - ] - ], - "popup": [ - "container", - [ - { - "name": "message", - "type": "string" - }, - { - "name": "paramaters", - "type": [ - "array", - { - "countType": "varint", - "type": "string" - } - ] - } - ] - ], - "jukebox_popup": [ - "container", - [ - { - "name": "message", - "type": "string" - }, - { - "name": "paramaters", - "type": [ - "array", - { - "countType": "varint", - "type": "string" - } - ] - } - ] - ] - }, - "default": "void" - } - ] - }, - { - "name": "xuid", - "type": "string" - }, - { - "name": "platform_chat_id", - "type": "string" - } - ] - ], - "packet_set_time": [ - "container", - [ - { - "name": "time", - "type": "zigzag32" - } - ] - ], - "packet_start_game": [ - "container", - [ - { - "name": "entity_id", - "type": "zigzag64" - }, - { - "name": "runtime_entity_id", - "type": "varint64" - }, - { - "name": "player_gamemode", - "type": "GameMode" - }, - { - "name": "player_position", - "type": "vec3f" - }, - { - "name": "rotation", - "type": "vec2f" - }, - { - "name": "seed", - "type": "zigzag32" - }, - { - "name": "biome_type", - "type": "li16" - }, - { - "name": "biome_name", - "type": "string" - }, - { - "name": "dimension", - "type": "zigzag32" - }, - { - "name": "generator", - "type": "zigzag32" - }, - { - "name": "world_gamemode", - "type": "GameMode" - }, - { - "name": "difficulty", - "type": "zigzag32" - }, - { - "name": "spawn_position", - "type": "BlockCoordinates" - }, - { - "name": "achievements_disabled", - "type": "bool" - }, - { - "name": "day_cycle_stop_time", - "type": "zigzag32" - }, - { - "name": "edu_offer", - "type": "zigzag32" - }, - { - "name": "edu_features_enabled", - "type": "bool" - }, - { - "name": "edu_product_uuid", - "type": "string" - }, - { - "name": "rain_level", - "type": "lf32" - }, - { - "name": "lightning_level", - "type": "lf32" - }, - { - "name": "has_confirmed_platform_locked_content", - "type": "bool" - }, - { - "name": "is_multiplayer", - "type": "bool" - }, - { - "name": "broadcast_to_lan", - "type": "bool" - }, - { - "name": "xbox_live_broadcast_mode", - "type": "varint" - }, - { - "name": "platform_broadcast_mode", - "type": "varint" - }, - { - "name": "enable_commands", - "type": "bool" - }, - { - "name": "is_texturepacks_required", - "type": "bool" - }, - { - "name": "gamerules", - "type": "GameRules" - }, - { - "name": "experiments", - "type": "Experiments" - }, - { - "name": "experiments_previously_used", - "type": "bool" - }, - { - "name": "bonus_chest", - "type": "bool" - }, - { - "name": "map_enabled", - "type": "bool" - }, - { - "name": "permission_level", - "type": "zigzag32" - }, - { - "name": "server_chunk_tick_range", - "type": "li32" - }, - { - "name": "has_locked_behavior_pack", - "type": "bool" - }, - { - "name": "has_locked_resource_pack", - "type": "bool" - }, - { - "name": "is_from_locked_world_template", - "type": "bool" - }, - { - "name": "msa_gamertags_only", - "type": "bool" - }, - { - "name": "is_from_world_template", - "type": "bool" - }, - { - "name": "is_world_template_option_locked", - "type": "bool" - }, - { - "name": "only_spawn_v1_villagers", - "type": "bool" - }, - { - "name": "game_version", - "type": "string" - }, - { - "name": "limited_world_width", - "type": "li32" - }, - { - "name": "limited_world_length", - "type": "li32" - }, - { - "name": "is_new_nether", - "type": "bool" - }, - { - "name": "experimental_gameplay_override", - "type": "bool" - }, - { - "name": "level_id", - "type": "string" - }, - { - "name": "world_name", - "type": "string" - }, - { - "name": "premium_world_template_id", - "type": "string" - }, - { - "name": "is_trial", - "type": "bool" - }, - { - "name": "movement_authority", - "type": [ - "mapper", - { - "type": "zigzag32", - "mappings": { - "0": "client", - "1": "server", - "2": "server_with_rewind" - } - } - ] - }, - { - "name": "rewind_history_size", - "type": "zigzag32" - }, - { - "name": "server_authoritative_block_breaking", - "type": "bool" - }, - { - "name": "current_tick", - "type": "li64" - }, - { - "name": "enchantment_seed", - "type": "zigzag32" - }, - { - "name": "block_properties", - "type": "BlockProperties" - }, - { - "name": "itemstates", - "type": "Itemstates" - }, - { - "name": "multiplayer_correlation_id", - "type": "string" - }, - { - "name": "server_authoritative_inventory", - "type": "bool" - } - ] - ], - "packet_add_player": [ - "container", - [ - { - "name": "uuid", - "type": "uuid" - }, - { - "name": "username", - "type": "string" - }, - { - "name": "entity_id_self", - "type": "zigzag64" - }, - { - "name": "runtime_entity_id", - "type": "varint64" - }, - { - "name": "platform_chat_id", - "type": "string" - }, - { - "name": "position", - "type": "vec3f" - }, - { - "name": "velocity", - "type": "vec3f" - }, - { - "name": "pitch", - "type": "lf32" - }, - { - "name": "yaw", - "type": "lf32" - }, - { - "name": "head_yaw", - "type": "lf32" - }, - { - "name": "held_item", - "type": "Item" - }, - { - "name": "metadata", - "type": "MetadataDictionary" - }, - { - "name": "flags", - "type": "varint" - }, - { - "name": "command_permission", - "type": "varint" - }, - { - "name": "action_permissions", - "type": "varint" - }, - { - "name": "permission_level", - "type": "varint" - }, - { - "name": "custom_stored_permissions", - "type": "varint" - }, - { - "name": "user_id", - "type": "li64" - }, - { - "name": "links", - "type": "Links" - }, - { - "name": "device_id", - "type": "string" - }, - { - "name": "device_os", - "type": "li32" - } - ] - ], - "packet_add_entity": [ - "container", - [ - { - "name": "entity_id_self", - "type": "zigzag64" - }, - { - "name": "runtime_entity_id", - "type": "varint64" - }, - { - "name": "entity_type", - "type": "string" - }, - { - "name": "position", - "type": "vec3f" - }, - { - "name": "velocity", - "type": "vec3f" - }, - { - "name": "pitch", - "type": "lf32" - }, - { - "name": "yaw", - "type": "lf32" - }, - { - "name": "head_yaw", - "type": "lf32" - }, - { - "name": "attributes", - "type": "EntityAttributes" - }, - { - "name": "metadata", - "type": "MetadataDictionary" - }, - { - "name": "links", - "type": "Links" - } - ] - ], - "packet_remove_entity": [ - "container", - [ - { - "name": "entity_id_self", - "type": "zigzag64" - } - ] - ], - "packet_add_item_entity": [ - "container", - [ - { - "name": "entity_id_self", - "type": "zigzag64" - }, - { - "name": "runtime_entity_id", - "type": "varint64" - }, - { - "name": "item", - "type": "Item" - }, - { - "name": "position", - "type": "vec3f" - }, - { - "name": "velocity", - "type": "vec3f" - }, - { - "name": "metadata", - "type": "MetadataDictionary" - }, - { - "name": "is_from_fishing", - "type": "bool" - } - ] - ], - "packet_take_item_entity": [ - "container", - [ - { - "name": "runtime_entity_id", - "type": "varint64" - }, - { - "name": "target", - "type": "varint" - } - ] - ], - "packet_move_entity": [ - "container", - [ - { - "name": "runtime_entity_id", - "type": "varint64" - }, - { - "name": "flags", - "type": "u8" - }, - { - "name": "position", - "type": "vec3f" - }, - { - "name": "rotation", - "type": "Rotation" - } - ] - ], - "packet_move_player": [ - "container", - [ - { - "name": "runtime_id", - "type": "varint" - }, - { - "name": "position", - "type": "vec3f" - }, - { - "name": "pitch", - "type": "lf32" - }, - { - "name": "yaw", - "type": "lf32" - }, - { - "name": "head_yaw", - "type": "lf32" - }, - { - "name": "mode", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "0": "normal", - "1": "reset", - "2": "teleport", - "3": "rotation" - } - } - ] - }, - { - "name": "on_ground", - "type": "bool" - }, - { - "name": "ridden_runtime_id", - "type": "varint" - }, - { - "name": "teleport", - "type": [ - "switch", - { - "compareTo": "mode", - "fields": { - "teleport": [ - "container", - [ - { - "name": "cause", - "type": [ - "mapper", - { - "type": "li32", - "mappings": { - "0": "unknown", - "1": "projectile", - "2": "chorus_fruit", - "3": "command", - "4": "behavior" - } - } - ] - }, - { - "name": "source_entity_type", - "type": "LegacyEntityType" - } - ] - ] - }, - "default": "void" - } - ] - }, - { - "name": "tick", - "type": "varint64" - } - ] - ], - "packet_rider_jump": [ - "container", - [ - { - "name": "jump_strength", - "type": "zigzag32" - } - ] - ], - "packet_update_block": [ - "container", - [ - { - "name": "position", - "type": "BlockCoordinates" - }, - { - "name": "block_runtime_id", - "type": "varint" - }, - { - "name": "flags", - "type": "UpdateBlockFlags" - }, - { - "name": "layer", - "type": "varint" - } - ] - ], - "packet_add_painting": [ - "container", - [ - { - "name": "entity_id_self", - "type": "zigzag64" - }, - { - "name": "runtime_entity_id", - "type": "varint64" - }, - { - "name": "coordinates", - "type": "vec3f" - }, - { - "name": "direction", - "type": "zigzag32" - }, - { - "name": "title", - "type": "string" - } - ] - ], - "packet_tick_sync": [ - "container", - [ - { - "name": "request_time", - "type": "li64" - }, - { - "name": "response_time", - "type": "li64" - } - ] - ], - "packet_level_sound_event_old": [ - "container", - [ - { - "name": "sound_id", - "type": "u8" - }, - { - "name": "position", - "type": "vec3f" - }, - { - "name": "block_id", - "type": "zigzag32" - }, - { - "name": "entity_type", - "type": "zigzag32" - }, - { - "name": "is_baby_mob", - "type": "bool" - }, - { - "name": "is_global", - "type": "bool" - } - ] - ], - "packet_level_event": [ - "container", - [ - { - "name": "event", - "type": [ - "mapper", - { - "type": "zigzag32", - "mappings": { - "1000": "sound_click", - "1001": "sound_click_fail", - "1002": "sound_shoot", - "1003": "sound_door", - "1004": "sound_fizz", - "1005": "sound_ignite", - "1007": "sound_ghast", - "1008": "sound_ghast_shoot", - "1009": "sound_blaze_shoot", - "1010": "sound_door_bump", - "1012": "sound_door_crash", - "1018": "sound_enderman_teleport", - "1020": "sound_anvil_break", - "1021": "sound_anvil_use", - "1022": "sound_anvil_fall", - "1030": "sound_pop", - "1032": "sound_portal", - "1040": "sound_itemframe_add_item", - "1041": "sound_itemframe_remove", - "1042": "sound_itemframe_place", - "1043": "sound_itemframe_remove_item", - "1044": "sound_itemframe_rotate_item", - "1050": "sound_camera", - "1051": "sound_orb", - "1052": "sound_totem", - "1060": "sound_armor_stand_break", - "1061": "sound_armor_stand_hit", - "1062": "sound_armor_stand_fall", - "1063": "sound_armor_stand_place", - "1064": "pointed_dripstone_land", - "1065": "dye_used", - "1066": "ink_sack_used", - "2000": "particle_shoot", - "2001": "particle_destroy", - "2002": "particle_splash", - "2003": "particle_eye_despawn", - "2004": "particle_spawn", - "2005": "particle_crop_growth", - "2006": "particle_guardian_curse", - "2007": "particle_death_smoke", - "2008": "particle_block_force_field", - "2009": "particle_projectile_hit", - "2010": "particle_dragon_egg_teleport", - "2011": "particle_crop_eaten", - "2012": "particle_critical", - "2013": "particle_enderman_teleport", - "2014": "particle_punch_block", - "2015": "particle_bubble", - "2016": "particle_evaporate", - "2017": "particle_destroy_armor_stand", - "2018": "particle_breaking_egg", - "2019": "particle_destroy_egg", - "2020": "particle_evaporate_water", - "2021": "particle_destroy_block_no_sound", - "2022": "particle_knockback_roar", - "2023": "particle_teleport_trail", - "2024": "particle_point_cloud", - "2025": "particle_explosion", - "2026": "particle_block_explosion", - "2027": "particle_vibration_signal", - "2028": "particle_dripstone_drip", - "2029": "particle_fizz_effect", - "2030": "particle_wax_on", - "2031": "particle_wax_off", - "2032": "particle_scrape", - "2033": "particle_electric_spark", - "3001": "start_rain", - "3002": "start_thunder", - "3003": "stop_rain", - "3004": "stop_thunder", - "3005": "pause_game", - "3006": "pause_game_no_screen", - "3007": "set_game_speed", - "3500": "redstone_trigger", - "3501": "cauldron_explode", - "3502": "cauldron_dye_armor", - "3503": "cauldron_clean_armor", - "3504": "cauldron_fill_potion", - "3505": "cauldron_take_potion", - "3506": "cauldron_fill_water", - "3507": "cauldron_take_water", - "3508": "cauldron_add_dye", - "3509": "cauldron_clean_banner", - "3600": "block_start_break", - "3601": "block_stop_break", - "4000": "set_data", - "9800": "players_sleeping", - "16384": "add_particle_mask" - } - } - ] - }, - { - "name": "position", - "type": "vec3f" - }, - { - "name": "data", - "type": "zigzag32" - } - ] - ], - "packet_block_event": [ - "container", - [ - { - "name": "position", - "type": "BlockCoordinates" - }, - { - "name": "type", - "type": [ - "mapper", - { - "type": "zigzag32", - "mappings": { - "0": "sound", - "1": "change_state" - } - } - ] - }, - { - "name": "data", - "type": "zigzag32" - } - ] - ], - "packet_entity_event": [ - "container", - [ - { - "name": "runtime_entity_id", - "type": "varint64" - }, - { - "name": "event_id", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "1": "jump", - "2": "hurt_animation", - "3": "death_animation", - "4": "arm_swing", - "5": "stop_attack", - "6": "tame_fail", - "7": "tame_success", - "8": "shake_wet", - "9": "use_item", - "10": "eat_grass_animation", - "11": "fish_hook_bubble", - "12": "fish_hook_position", - "13": "fish_hook_hook", - "14": "fish_hook_tease", - "15": "squid_ink_cloud", - "16": "zombie_villager_cure", - "18": "respawn", - "19": "iron_golem_offer_flower", - "20": "iron_golem_withdraw_flower", - "21": "love_particles", - "22": "villager_angry", - "23": "villager_happy", - "24": "witch_spell_particles", - "25": "firework_particles", - "26": "in_love_particles", - "27": "silverfish_spawn_animation", - "28": "guardian_attack", - "29": "witch_drink_potion", - "30": "witch_throw_potion", - "31": "minecart_tnt_prime_fuse", - "32": "creeper_prime_fuse", - "33": "air_supply_expired", - "34": "player_add_xp_levels", - "35": "elder_guardian_curse", - "36": "agent_arm_swing", - "37": "ender_dragon_death", - "38": "dust_particles", - "39": "arrow_shake", - "57": "eating_item", - "60": "baby_animal_feed", - "61": "death_smoke_cloud", - "62": "complete_trade", - "63": "remove_leash", - "65": "consume_totem", - "66": "player_check_treasure_hunter_achievement", - "67": "entity_spawn", - "68": "dragon_puke", - "69": "item_entity_merge", - "70": "start_swim", - "71": "balloon_pop", - "72": "treasure_hunt", - "73": "agent_summon", - "74": "charged_crossbow", - "75": "fall" - } - } - ] - }, - { - "name": "data", - "type": "zigzag32" - } - ] - ], - "packet_mob_effect": [ - "container", - [ - { - "name": "runtime_entity_id", - "type": "varint64" - }, - { - "name": "event_id", - "type": "u8" - }, - { - "name": "effect_id", - "type": "zigzag32" - }, - { - "name": "amplifier", - "type": "zigzag32" - }, - { - "name": "particles", - "type": "bool" - }, - { - "name": "duration", - "type": "zigzag32" - } - ] - ], - "packet_update_attributes": [ - "container", - [ - { - "name": "runtime_entity_id", - "type": "varint64" - }, - { - "name": "attributes", - "type": "PlayerAttributes" - }, - { - "name": "tick", - "type": "varint64" - } - ] - ], - "packet_inventory_transaction": [ - "container", - [ - { - "name": "transaction", - "type": "Transaction" - } - ] - ], - "packet_mob_equipment": [ - "container", - [ - { - "name": "runtime_entity_id", - "type": "varint64" - }, - { - "name": "item", - "type": "Item" - }, - { - "name": "slot", - "type": "u8" - }, - { - "name": "selected_slot", - "type": "u8" - }, - { - "name": "window_id", - "type": "WindowID" - } - ] - ], - "packet_mob_armor_equipment": [ - "container", - [ - { - "name": "runtime_entity_id", - "type": "varint64" - }, - { - "name": "helmet", - "type": "Item" - }, - { - "name": "chestplate", - "type": "Item" - }, - { - "name": "leggings", - "type": "Item" - }, - { - "name": "boots", - "type": "Item" - } - ] - ], - "packet_interact": [ - "container", - [ - { - "name": "action_id", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "3": "leave_vehicle", - "4": "mouse_over_entity", - "6": "open_inventory" - } - } - ] - }, - { - "name": "target_entity_id", - "type": "varint64" - }, - { - "name": "position", - "type": [ - "switch", - { - "compareTo": "action_id", - "fields": { - "mouse_over_entity": "vec3f", - "leave_vehicle": "vec3f" - }, - "default": "void" - } - ] - } - ] - ], - "packet_block_pick_request": [ - "container", - [ - { - "name": "x", - "type": "zigzag32" - }, - { - "name": "y", - "type": "zigzag32" - }, - { - "name": "z", - "type": "zigzag32" - }, - { - "name": "add_user_data", - "type": "bool" - }, - { - "name": "selected_slot", - "type": "u8" - } - ] - ], - "packet_entity_pick_request": [ - "container", - [ - { - "name": "runtime_entity_id", - "type": "lu64" - }, - { - "name": "selected_slot", - "type": "u8" - } - ] - ], - "packet_player_action": [ - "container", - [ - { - "name": "runtime_entity_id", - "type": "varint64" - }, - { - "name": "action", - "type": "Action" - }, - { - "name": "position", - "type": "BlockCoordinates" - }, - { - "name": "face", - "type": "zigzag32" - } - ] - ], - "packet_hurt_armor": [ - "container", - [ - { - "name": "health", - "type": "zigzag32" - } - ] - ], - "packet_set_entity_data": [ - "container", - [ - { - "name": "runtime_entity_id", - "type": "varint64" - }, - { - "name": "metadata", - "type": "MetadataDictionary" - }, - { - "name": "tick", - "type": "varint" - } - ] - ], - "packet_set_entity_motion": [ - "container", - [ - { - "name": "runtime_entity_id", - "type": "varint64" - }, - { - "name": "velocity", - "type": "vec3f" - } - ] - ], - "packet_set_entity_link": [ - "container", - [ - { - "name": "link", - "type": "Link" - } - ] - ], - "packet_set_health": [ - "container", - [ - { - "name": "health", - "type": "zigzag32" - } - ] - ], - "packet_set_spawn_position": [ - "container", - [ - { - "name": "spawn_type", - "type": [ - "mapper", - { - "type": "zigzag32", - "mappings": { - "0": "player", - "1": "world" - } - } - ] - }, - { - "name": "player_position", - "type": "BlockCoordinates" - }, - { - "name": "dimension", - "type": "zigzag32" - }, - { - "name": "world_position", - "type": "BlockCoordinates" - } - ] - ], - "packet_animate": [ - "container", - [ - { - "name": "action_id", - "type": [ - "mapper", - { - "type": "zigzag32", - "mappings": { - "0": "none", - "1": "swing_arm", - "2": "unknown", - "3": "wake_up", - "4": "critical_hit", - "5": "magic_critical_hit", - "6": "row_right", - "7": "row_left" - } - } - ] - }, - { - "name": "runtime_entity_id", - "type": "varint64" - } - ] - ], - "packet_respawn": [ - "container", - [ - { - "name": "position", - "type": "vec3f" - }, - { - "name": "state", - "type": "u8" - }, - { - "name": "runtime_entity_id", - "type": "varint64" - } - ] - ], - "packet_container_open": [ - "container", - [ - { - "name": "window_id", - "type": "WindowID" - }, - { - "name": "window_type", - "type": "WindowType" - }, - { - "name": "coordinates", - "type": "BlockCoordinates" - }, - { - "name": "runtime_entity_id", - "type": "zigzag64" - } - ] - ], - "packet_container_close": [ - "container", - [ - { - "name": "window_id", - "type": "WindowID" - }, - { - "name": "server", - "type": "bool" - } - ] - ], - "packet_player_hotbar": [ - "container", - [ - { - "name": "selected_slot", - "type": "varint" - }, - { - "name": "window_id", - "type": "WindowID" - }, - { - "name": "select_slot", - "type": "bool" - } - ] - ], - "packet_inventory_content": [ - "container", - [ - { - "name": "window_id", - "type": "WindowIDVarint" - }, - { - "name": "input", - "type": "ItemStacks" - } - ] - ], - "packet_inventory_slot": [ - "container", - [ - { - "name": "window_id", - "type": "WindowIDVarint" - }, - { - "name": "slot", - "type": "varint" - }, - { - "name": "item", - "type": "Item" - } - ] - ], - "packet_container_set_data": [ - "container", - [ - { - "name": "window_id", - "type": "WindowID" - }, - { - "name": "property", - "type": "zigzag32" - }, - { - "name": "value", - "type": "zigzag32" - } - ] - ], - "packet_crafting_data": [ - "container", - [ - { - "name": "recipes", - "type": "Recipes" - }, - { - "name": "potion_type_recipes", - "type": "PotionTypeRecipes" - }, - { - "name": "potion_container_recipes", - "type": "PotionContainerChangeRecipes" - }, - { - "name": "is_clean", - "type": "bool" - } - ] - ], - "packet_crafting_event": [ - "container", - [ - { - "name": "window_id", - "type": "WindowID" - }, - { - "name": "recipe_type", - "type": [ - "mapper", - { - "type": "zigzag32", - "mappings": { - "0": "inventory", - "1": "crafting", - "2": "workbench" - } - } - ] - }, - { - "name": "recipe_id", - "type": "uuid" - }, - { - "name": "input", - "type": [ - "array", - { - "countType": "varint", - "type": "Item" - } - ] - }, - { - "name": "result", - "type": [ - "array", - { - "countType": "varint", - "type": "Item" - } - ] - } - ] - ], - "packet_gui_data_pick_item": [ - "container", - [ - { - "name": "item_name", - "type": "string" - }, - { - "name": "item_effects", - "type": "string" - }, - { - "name": "hotbar_slot", - "type": "li32" - } - ] - ], - "packet_adventure_settings": [ - "container", - [ - { - "name": "flags", - "type": "AdventureFlags" - }, - { - "name": "command_permission", - "type": [ - "mapper", - { - "type": "varint32", - "mappings": { - "0": "normal", - "1": "operator", - "2": "host", - "3": "automation", - "4": "admin" - } - } - ] - }, - { - "name": "action_permissions", - "type": "ActionPermissions" - }, - { - "name": "permission_level", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "0": "visitor", - "1": "member", - "2": "operator", - "3": "custom" - } - } - ] - }, - { - "name": "custom_stored_permissions", - "type": "varint" - }, - { - "name": "user_id", - "type": "li64" - } - ] - ], - "packet_block_entity_data": [ - "container", - [ - { - "name": "position", - "type": "BlockCoordinates" - }, - { - "name": "nbt", - "type": "nbt" - } - ] - ], - "packet_player_input": [ - "container", - [ - { - "name": "motion_x", - "type": "lf32" - }, - { - "name": "motion_z", - "type": "lf32" - }, - { - "name": "jumping", - "type": "bool" - }, - { - "name": "sneaking", - "type": "bool" - } - ] - ], - "packet_level_chunk": [ - "container", - [ - { - "name": "x", - "type": "zigzag32" - }, - { - "name": "z", - "type": "zigzag32" - }, - { - "name": "sub_chunk_count", - "type": "varint" - }, - { - "name": "cache_enabled", - "type": "bool" - }, - { - "name": "blobs", - "type": [ - "switch", - { - "compareTo": "cache_enabled", - "fields": { - "true": [ - "container", - [ - { - "name": "hashes", - "type": [ - "array", - { - "countType": "varint", - "type": "lu64" - } - ] - } - ] - ] - }, - "default": "void" - } - ] - }, - { - "name": "payload", - "type": "ByteArray" - } - ] - ], - "packet_set_commands_enabled": [ - "container", - [ - { - "name": "enabled", - "type": "bool" - } - ] - ], - "packet_set_difficulty": [ - "container", - [ - { - "name": "difficulty", - "type": "varint" - } - ] - ], - "packet_change_dimension": [ - "container", - [ - { - "name": "dimension", - "type": "zigzag32" - }, - { - "name": "position", - "type": "vec3f" - }, - { - "name": "respawn", - "type": "bool" - } - ] - ], - "packet_set_player_game_type": [ - "container", - [ - { - "name": "gamemode", - "type": "GameMode" - } - ] - ], - "packet_player_list": [ - "container", - [ - { - "name": "records", - "type": "PlayerRecords" - } - ] - ], - "packet_simple_event": [ - "container", - [ - { - "name": "event_type", - "type": "lu16" - } - ] - ], - "packet_event": [ - "container", - [ - { - "name": "runtime_id", - "type": "varint64" - }, - { - "name": "event_type", - "type": [ - "mapper", - { - "type": "zigzag32", - "mappings": { - "0": "achievement_awarded", - "1": "entity_interact", - "2": "portal_built", - "3": "portal_used", - "4": "mob_killed", - "5": "cauldron_used", - "6": "player_death", - "7": "boss_killed", - "8": "agent_command", - "9": "agent_created", - "10": "banner_pattern_removed", - "11": "commaned_executed", - "12": "fish_bucketed", - "13": "mob_born", - "14": "pet_died", - "15": "cauldron_block_used", - "16": "composter_block_used", - "17": "bell_block_used", - "18": "actor_definition", - "19": "raid_update", - "20": "player_movement_anomaly", - "21": "player_moement_corrected", - "22": "honey_harvested", - "23": "target_block_hit", - "24": "piglin_barter" - } - } - ] - }, - { - "name": "use_player_id", - "type": "u8" - }, - { - "name": "event_data", - "type": "restBuffer" - } - ] - ], - "packet_spawn_experience_orb": [ - "container", - [ - { - "name": "position", - "type": "vec3f" - }, - { - "name": "count", - "type": "zigzag32" - } - ] - ], - "packet_clientbound_map_item_data": [ - "container", - [ - { - "name": "map_id", - "type": "zigzag64" - }, - { - "name": "update_flags", - "type": "UpdateMapFlags" - }, - { - "name": "dimension", - "type": "u8" - }, - { - "name": "locked", - "type": "bool" - }, - { - "name": "included_in", - "type": [ - "switch", - { - "compareTo": "update_flags.initialisation", - "fields": { - "true": [ - "array", - { - "countType": "varint", - "type": "zigzag64" - } - ] - }, - "default": "void" - } - ] - }, - { - "name": "scale", - "type": [ - "switch", - { - "compareTo": "update_flags.initialisation || update_flags.decoration || update_flags.texture", - "fields": { - "true": "u8" - }, - "default": "void" - } - ] - }, - { - "name": "tracked", - "type": [ - "switch", - { - "compareTo": "update_flags.decoration", - "fields": { - "true": [ - "container", - [ - { - "name": "objects", - "type": [ - "array", - { - "countType": "varint", - "type": "TrackedObject" - } - ] - }, - { - "name": "decorations", - "type": [ - "array", - { - "countType": "varint", - "type": "MapDecoration" - } - ] - } - ] - ] - }, - "default": "void" - } - ] - }, - { - "name": "texture", - "type": [ - "switch", - { - "compareTo": "update_flags.texture", - "fields": { - "true": [ - "container", - [ - { - "name": "width", - "type": "zigzag32" - }, - { - "name": "height", - "type": "zigzag32" - }, - { - "name": "x_offset", - "type": "zigzag32" - }, - { - "name": "y_offset", - "type": "zigzag32" - }, - { - "name": "pixels", - "type": [ - "array", - { - "countType": "varint", - "type": "varint" - } - ] - } - ] - ] - }, - "default": "void" - } - ] - } - ] - ], - "packet_map_info_request": [ - "container", - [ - { - "name": "map_id", - "type": "zigzag64" - } - ] - ], - "packet_request_chunk_radius": [ - "container", - [ - { - "name": "chunk_radius", - "type": "zigzag32" - } - ] - ], - "packet_chunk_radius_update": [ - "container", - [ - { - "name": "chunk_radius", - "type": "zigzag32" - } - ] - ], - "packet_item_frame_drop_item": [ - "container", - [ - { - "name": "coordinates", - "type": "BlockCoordinates" - } - ] - ], - "packet_game_rules_changed": [ - "container", - [ - { - "name": "rules", - "type": "GameRules" - } - ] - ], - "packet_camera": [ - "container", - [ - { - "name": "camera_entity_unique_id", - "type": "zigzag64" - }, - { - "name": "target_player_unique_id", - "type": "zigzag64" - } - ] - ], - "packet_boss_event": [ - "container", - [ - { - "name": "boss_entity_id", - "type": "zigzag64" - }, - { - "name": "type", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "0": "show_bar", - "1": "register_player", - "2": "hide_bar", - "3": "unregister_player", - "4": "set_bar_progress", - "5": "set_bar_title", - "6": "update_properties", - "7": "texture" - } - } - ] - }, - { - "anon": true, - "type": [ - "switch", - { - "compareTo": "type", - "fields": { - "show_bar": [ - "container", - [ - { - "name": "title", - "type": "string" - }, - { - "name": "progress", - "type": "lf32" - }, - { - "name": "screen_darkening", - "type": "li16" - }, - { - "name": "color", - "type": "varint" - }, - { - "name": "overlay", - "type": "varint" - } - ] - ], - "register_player": [ - "container", - [ - { - "name": "player_id", - "type": "zigzag64" - } - ] - ], - "unregister_player": [ - "container", - [ - { - "name": "player_id", - "type": "zigzag64" - } - ] - ], - "set_bar_progress": [ - "container", - [ - { - "name": "progress", - "type": "lf32" - } - ] - ], - "set_bar_title": [ - "container", - [ - { - "name": "title", - "type": "string" - } - ] - ], - "update_properties": [ - "container", - [ - { - "name": "screen_darkening", - "type": "li16" - }, - { - "name": "color", - "type": "varint" - }, - { - "name": "overlay", - "type": "varint" - } - ] - ], - "texture": [ - "container", - [ - { - "name": "color", - "type": "varint" - }, - { - "name": "overlay", - "type": "varint" - } - ] - ] - }, - "default": "void" - } - ] - } - ] - ], - "packet_show_credits": [ - "container", - [ - { - "name": "runtime_entity_id", - "type": "varint64" - }, - { - "name": "status", - "type": "zigzag32" - } - ] - ], - "packet_available_commands": [ - "container", - [ - { - "name": "values_len", - "type": "varint" - }, - { - "name": "_enum_type", - "type": [ - "enum_size_based_on_values_len" - ] - }, - { - "name": "enum_values", - "type": [ - "array", - { - "count": "values_len", - "type": "string" - } - ] - }, - { - "name": "suffixes", - "type": [ - "array", - { - "countType": "varint", - "type": "string" - } - ] - }, - { - "name": "enums", - "type": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "values", - "type": [ - "array", - { - "countType": "varint", - "type": [ - "switch", - { - "compareTo": "../_enum_type", - "fields": { - "byte": "u8", - "short": "lu16", - "int": "lu32" - }, - "default": "void" - } - ] - } - ] - } - ] - ] - } - ] - }, - { - "name": "command_data", - "type": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "description", - "type": "string" - }, - { - "name": "flags", - "type": "u8" - }, - { - "name": "permission_level", - "type": "u8" - }, - { - "name": "alias", - "type": "li32" - }, - { - "name": "overloads", - "type": [ - "array", - { - "countType": "varint", - "type": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "paramater_name", - "type": "string" - }, - { - "name": "value_type", - "type": [ - "mapper", - { - "type": "lu16", - "mappings": { - "1": "int", - "2": "float", - "3": "value", - "4": "wildcard_int", - "5": "operator", - "6": "target", - "16": "file_path", - "32": "string", - "40": "position", - "44": "message", - "46": "raw_text", - "50": "json", - "63": "command" - } - } - ] - }, - { - "name": "enum_type", - "type": [ - "mapper", - { - "type": "lu16", - "mappings": { - "16": "valid", - "32": "enum", - "256": "suffixed", - "1024": "soft_enum" - } - } - ] - }, - { - "name": "optional", - "type": "bool" - }, - { - "name": "options", - "type": "CommandFlags" - } - ] - ] - } - ] - } - ] - } - ] - ] - } - ] - }, - { - "name": "dynamic_enums", - "type": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "values", - "type": [ - "array", - { - "countType": "varint", - "type": "string" - } - ] - } - ] - ] - } - ] - }, - { - "name": "enum_constraints", - "type": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "value_index", - "type": "li32" - }, - { - "name": "enum_index", - "type": "li32" - }, - { - "name": "constraints", - "type": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "constraint", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "0": "cheats_enabled", - "1": "operator_permissions", - "2": "host_permissions" - } - } - ] - } - ] - ] - } - ] - } - ] - ] - } - ] - } - ] - ], - "packet_command_request": [ - "container", - [ - { - "name": "command", - "type": "string" - }, - { - "name": "origin", - "type": "CommandOrigin" - }, - { - "name": "interval", - "type": "bool" - } - ] - ], - "packet_command_block_update": [ - "container", - [ - { - "name": "is_block", - "type": "bool" - }, - { - "anon": true, - "type": [ - "switch", - { - "compareTo": "is_block", - "fields": { - "true": [ - "container", - [ - { - "name": "position", - "type": "BlockCoordinates" - }, - { - "name": "mode", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "0": "impulse", - "1": "repeat", - "2": "chain" - } - } - ] - }, - { - "name": "needs_redstone", - "type": "bool" - }, - { - "name": "conditional", - "type": "bool" - } - ] - ] - }, - "default": [ - "container", - [ - { - "name": "minecart_entity_runtime_id", - "type": "varint64" - } - ] - ] - } - ] - }, - { - "name": "command", - "type": "string" - }, - { - "name": "last_output", - "type": "string" - }, - { - "name": "name", - "type": "string" - }, - { - "name": "should_track_output", - "type": "bool" - }, - { - "name": "tick_delay", - "type": "li32" - }, - { - "name": "execute_on_first_tick", - "type": "bool" - } - ] - ], - "packet_command_output": [ - "container", - [ - { - "name": "origin", - "type": "CommandOrigin" - }, - { - "name": "output_type", - "type": [ - "mapper", - { - "type": "i8", - "mappings": { - "1": "last", - "2": "silent", - "3": "all", - "4": "data_set" - } - } - ] - }, - { - "name": "success_count", - "type": "varint" - }, - { - "name": "output", - "type": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "success", - "type": "bool" - }, - { - "name": "message_id", - "type": "string" - }, - { - "name": "paramaters", - "type": [ - "array", - { - "countType": "varint", - "type": "string" - } - ] - } - ] - ] - } - ] - }, - { - "name": "data_set", - "type": [ - "switch", - { - "compareTo": "output_type", - "fields": { - "data_set": "string" - }, - "default": "void" - } - ] - } - ] - ], - "packet_update_trade": [ - "container", - [ - { - "name": "window_id", - "type": "WindowID" - }, - { - "name": "window_type", - "type": "WindowType" - }, - { - "name": "size", - "type": "varint" - }, - { - "name": "trade_tier", - "type": "varint" - }, - { - "name": "villager_unique_id", - "type": "varint64" - }, - { - "name": "entity_unique_id", - "type": "varint64" - }, - { - "name": "display_name", - "type": "string" - }, - { - "name": "new_trading_ui", - "type": "bool" - }, - { - "name": "economic_trades", - "type": "bool" - }, - { - "name": "offers", - "type": "nbt" - } - ] - ], - "packet_update_equipment": [ - "container", - [ - { - "name": "window_id", - "type": "WindowID" - }, - { - "name": "window_type", - "type": "WindowType" - }, - { - "name": "size", - "type": "u8" - }, - { - "name": "entity_id", - "type": "zigzag64" - }, - { - "name": "inventory", - "type": "nbt" - } - ] - ], - "packet_resource_pack_data_info": [ - "container", - [ - { - "name": "pack_id", - "type": "string" - }, - { - "name": "max_chunk_size", - "type": "lu32" - }, - { - "name": "chunk_count", - "type": "lu32" - }, - { - "name": "size", - "type": "lu64" - }, - { - "name": "hash", - "type": "ByteArray" - }, - { - "name": "is_premium", - "type": "bool" - }, - { - "name": "pack_type", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "1": "addon", - "2": "cached", - "3": "copy_protected", - "4": "behavior", - "5": "persona_piece", - "6": "resources", - "7": "skins", - "8": "world_template" - } - } - ] - } - ] - ], - "packet_resource_pack_chunk_data": [ - "container", - [ - { - "name": "pack_id", - "type": "string" - }, - { - "name": "chunk_index", - "type": "lu32" - }, - { - "name": "progress", - "type": "lu64" - }, - { - "name": "payload", - "type": "ByteArray" - } - ] - ], - "packet_resource_pack_chunk_request": [ - "container", - [ - { - "name": "pack_id", - "type": "string" - }, - { - "name": "chunk_index", - "type": "lu32" - } - ] - ], - "packet_transfer": [ - "container", - [ - { - "name": "server_address", - "type": "string" - }, - { - "name": "port", - "type": "lu16" - } - ] - ], - "packet_play_sound": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "coordinates", - "type": "BlockCoordinates" - }, - { - "name": "volume", - "type": "lf32" - }, - { - "name": "pitch", - "type": "lf32" - } - ] - ], - "packet_stop_sound": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "stop_all", - "type": "bool" - } - ] - ], - "packet_set_title": [ - "container", - [ - { - "name": "type", - "type": [ - "mapper", - { - "type": "zigzag32", - "mappings": { - "0": "clear", - "1": "reset", - "2": "set_title", - "3": "set_subtitle", - "4": "action_bar_message", - "5": "set_durations", - "6": "set_title_json", - "7": "set_subtitle_json", - "8": "action_bar_message_json" - } - } - ] - }, - { - "name": "text", - "type": "string" - }, - { - "name": "fade_in_time", - "type": "zigzag32" - }, - { - "name": "stay_time", - "type": "zigzag32" - }, - { - "name": "fade_out_time", - "type": "zigzag32" - } - ] - ], - "packet_add_behavior_tree": [ - "container", - [ - { - "name": "behaviortree", - "type": "string" - } - ] - ], - "packet_structure_block_update": [ - "container", - [ - { - "name": "position", - "type": "BlockCoordinates" - }, - { - "name": "structure_name", - "type": "string" - }, - { - "name": "data_field", - "type": "string" - }, - { - "name": "include_players", - "type": "bool" - }, - { - "name": "show_bounding_box", - "type": "bool" - }, - { - "name": "structure_block_type", - "type": "zigzag32" - }, - { - "name": "settings", - "type": "StructureBlockSettings" - }, - { - "name": "redstone_save_mode", - "type": "zigzag32" - }, - { - "name": "should_trigger", - "type": "bool" - } - ] - ], - "packet_show_store_offer": [ - "container", - [ - { - "name": "offer_id", - "type": "string" - }, - { - "name": "show_all", - "type": "bool" - } - ] - ], - "packet_purchase_receipt": [ - "container", - [ - { - "name": "receipts", - "type": [ - "array", - { - "countType": "varint", - "type": "string" - } - ] - } - ] - ], - "packet_player_skin": [ - "container", - [ - { - "name": "uuid", - "type": "uuid" - }, - { - "name": "skin", - "type": "Skin" - }, - { - "name": "skin_name", - "type": "string" - }, - { - "name": "old_skin_name", - "type": "string" - }, - { - "name": "is_verified", - "type": "bool" - } - ] - ], - "packet_sub_client_login": [ - "container", - [ - { - "name": "tokens", - "type": [ - "encapsulated", - { - "lengthType": "varint", - "type": "LoginTokens" - } - ] - } - ] - ], - "packet_initiate_web_socket_connection": [ - "container", - [ - { - "name": "server", - "type": "string" - } - ] - ], - "packet_set_last_hurt_by": [ - "container", - [ - { - "name": "entity_type", - "type": "varint" - } - ] - ], - "packet_book_edit": [ - "container", - [ - { - "name": "type", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "0": "replace_page", - "1": "add_page", - "2": "delete_page", - "3": "swap_pages", - "4": "sign" - } - } - ] - }, - { - "name": "slot", - "type": "u8" - }, - { - "anon": true, - "type": [ - "switch", - { - "compareTo": "type", - "fields": { - "replace_page": [ - "container", - [ - { - "name": "page_number", - "type": "u8" - }, - { - "name": "text", - "type": "string" - }, - { - "name": "photo_name", - "type": "string" - } - ] - ], - "add_page": [ - "container", - [ - { - "name": "page_number", - "type": "u8" - }, - { - "name": "text", - "type": "string" - }, - { - "name": "photo_name", - "type": "string" - } - ] - ], - "delete_page": [ - "container", - [ - { - "name": "page_number", - "type": "u8" - } - ] - ], - "swap_pages": [ - "container", - [ - { - "name": "page1", - "type": "u8" - }, - { - "name": "page2", - "type": "u8" - } - ] - ], - "sign": [ - "container", - [ - { - "name": "title", - "type": "string" - }, - { - "name": "author", - "type": "string" - }, - { - "name": "xuid", - "type": "string" - } - ] - ] - }, - "default": "void" - } - ] - } - ] - ], - "packet_npc_request": [ - "container", - [ - { - "name": "runtime_entity_id", - "type": "varint64" - }, - { - "name": "request_type", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "0": "set_actions", - "1": "execute_action", - "2": "execute_closing_commands", - "3": "set_name", - "4": "set_skin", - "5": "set_interaction_text" - } - } - ] - }, - { - "name": "command", - "type": "string" - }, - { - "name": "action_type", - "type": "u8" - } - ] - ], - "packet_photo_transfer": [ - "container", - [ - { - "name": "image_name", - "type": "string" - }, - { - "name": "image_data", - "type": "string" - }, - { - "name": "book_id", - "type": "string" - } - ] - ], - "packet_modal_form_request": [ - "container", - [ - { - "name": "form_id", - "type": "varint" - }, - { - "name": "data", - "type": "string" - } - ] - ], - "packet_modal_form_response": [ - "container", - [ - { - "name": "form_id", - "type": "varint" - }, - { - "name": "data", - "type": "string" - } - ] - ], - "packet_server_settings_request": [ - "container", - [] - ], - "packet_server_settings_response": [ - "container", - [ - { - "name": "form_id", - "type": "varint" - }, - { - "name": "data", - "type": "string" - } - ] - ], - "packet_show_profile": [ - "container", - [ - { - "name": "xuid", - "type": "string" - } - ] - ], - "packet_set_default_game_type": [ - "container", - [ - { - "name": "gamemode", - "type": "GameMode" - } - ] - ], - "packet_remove_objective": [ - "container", - [ - { - "name": "objective_name", - "type": "string" - } - ] - ], - "packet_set_display_objective": [ - "container", - [ - { - "name": "display_slot", - "type": "string" - }, - { - "name": "objective_name", - "type": "string" - }, - { - "name": "display_name", - "type": "string" - }, - { - "name": "criteria_name", - "type": "string" - }, - { - "name": "sort_order", - "type": "zigzag32" - } - ] - ], - "packet_set_score": [ - "container", - [ - { - "name": "action", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "0": "change", - "1": "remove" - } - } - ] - }, - { - "name": "entries", - "type": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "scoreboard_id", - "type": "zigzag64" - }, - { - "name": "objective_name", - "type": "string" - }, - { - "name": "score", - "type": "li32" - }, - { - "anon": true, - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "change": [ - "container", - [ - { - "name": "entry_type", - "type": [ - "mapper", - { - "type": "i8", - "mappings": { - "1": "player", - "2": "entity", - "3": "fake_player" - } - } - ] - }, - { - "name": "entity_unique_id", - "type": [ - "switch", - { - "compareTo": "entry_type", - "fields": { - "player": "zigzag64", - "entity": "zigzag64" - }, - "default": "void" - } - ] - }, - { - "name": "custom_name", - "type": [ - "switch", - { - "compareTo": "entry_type", - "fields": { - "fake_player": "string" - }, - "default": "void" - } - ] - } - ] - ] - }, - "default": "void" - } - ] - } - ] - ] - } - ] - } - ] - ], - "packet_lab_table": [ - "container", - [ - { - "name": "action_type", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "0": "combine", - "1": "react" - } - } - ] - }, - { - "name": "position", - "type": "vec3u" - }, - { - "name": "reaction_type", - "type": "u8" - } - ] - ], - "packet_update_block_synced": [ - "container", - [ - { - "name": "position", - "type": "BlockCoordinates" - }, - { - "name": "block_runtime_id", - "type": "varint" - }, - { - "name": "flags", - "type": "UpdateBlockFlags" - }, - { - "name": "layer", - "type": "varint" - }, - { - "name": "entity_unique_id", - "type": "zigzag64" - }, - { - "name": "transition_type", - "type": [ - "mapper", - { - "type": "varint64", - "mappings": { - "0": "entity", - "1": "create", - "2": "destroy" - } - } - ] - } - ] - ], - "packet_move_entity_delta": [ - "container", - [ - { - "name": "runtime_entity_id", - "type": "varint64" - }, - { - "name": "flags", - "type": "DeltaMoveFlags" - }, - { - "name": "x", - "type": [ - "switch", - { - "compareTo": "flags.has_x", - "fields": { - "true": "lf32" - }, - "default": "void" - } - ] - }, - { - "name": "y", - "type": [ - "switch", - { - "compareTo": "flags.has_y", - "fields": { - "true": "lf32" - }, - "default": "void" - } - ] - }, - { - "name": "z", - "type": [ - "switch", - { - "compareTo": "flags.has_z", - "fields": { - "true": "lf32" - }, - "default": "void" - } - ] - }, - { - "name": "rot_x", - "type": [ - "switch", - { - "compareTo": "flags.has_rot_x", - "fields": { - "true": "u8" - }, - "default": "void" - } - ] - }, - { - "name": "rot_y", - "type": [ - "switch", - { - "compareTo": "flags.has_rot_y", - "fields": { - "true": "u8" - }, - "default": "void" - } - ] - }, - { - "name": "rot_z", - "type": [ - "switch", - { - "compareTo": "flags.has_rot_z", - "fields": { - "true": "u8" - }, - "default": "void" - } - ] - } - ] - ], - "packet_set_scoreboard_identity": [ - "container", - [ - { - "name": "action", - "type": [ - "mapper", - { - "type": "i8", - "mappings": { - "0": "register_identity", - "1": "clear_identity" - } - } - ] - }, - { - "name": "entries", - "type": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "scoreboard_id", - "type": "zigzag64" - }, - { - "name": "entity_unique_id", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "register_identity": "zigzag64" - }, - "default": "void" - } - ] - } - ] - ] - } - ] - } - ] - ], - "packet_set_local_player_as_initialized": [ - "container", - [ - { - "name": "runtime_entity_id", - "type": "varint64" - } - ] - ], - "packet_update_soft_enum": [ - "container", - [] - ], - "packet_network_stack_latency": [ - "container", - [ - { - "name": "timestamp", - "type": "lu64" - }, - { - "name": "needs_response", - "type": "u8" - } - ] - ], - "packet_script_custom_event": [ - "container", - [ - { - "name": "event_name", - "type": "string" - }, - { - "name": "event_data", - "type": "string" - } - ] - ], - "packet_spawn_particle_effect": [ - "container", - [ - { - "name": "dimension", - "type": "u8" - }, - { - "name": "entity_id", - "type": "zigzag64" - }, - { - "name": "position", - "type": "vec3f" - }, - { - "name": "particle_name", - "type": "string" - } - ] - ], - "packet_available_entity_identifiers": [ - "container", - [ - { - "name": "nbt", - "type": "nbt" - } - ] - ], - "packet_level_sound_event_v2": [ - "container", - [ - { - "name": "sound_id", - "type": "u8" - }, - { - "name": "position", - "type": "vec3f" - }, - { - "name": "block_id", - "type": "zigzag32" - }, - { - "name": "entity_type", - "type": "string" - }, - { - "name": "is_baby_mob", - "type": "bool" - }, - { - "name": "is_global", - "type": "bool" - } - ] - ], - "packet_network_chunk_publisher_update": [ - "container", - [ - { - "name": "coordinates", - "type": "BlockCoordinates" - }, - { - "name": "radius", - "type": "varint" - } - ] - ], - "packet_biome_definition_list": [ - "container", - [ - { - "name": "nbt", - "type": "nbt" - } - ] - ], - "packet_level_sound_event": [ - "container", - [ - { - "name": "sound_id", - "type": "SoundType" - }, - { - "name": "position", - "type": "vec3f" - }, - { - "name": "extra_data", - "type": "zigzag32" - }, - { - "name": "entity_type", - "type": "string" - }, - { - "name": "is_baby_mob", - "type": "bool" - }, - { - "name": "is_global", - "type": "bool" - } - ] - ], - "packet_level_event_generic": [ - "container", - [ - { - "name": "event_id", - "type": "varint" - }, - { - "name": "nbt", - "type": "nbtLoop" - } - ] - ], - "packet_lectern_update": [ - "container", - [ - { - "name": "page", - "type": "u8" - }, - { - "name": "page_count", - "type": "u8" - }, - { - "name": "position", - "type": "vec3i" - }, - { - "name": "drop_book", - "type": "bool" - } - ] - ], - "packet_video_stream_connect": [ - "container", - [ - { - "name": "server_uri", - "type": "string" - }, - { - "name": "frame_send_frequency", - "type": "lf32" - }, - { - "name": "action", - "type": "u8" - }, - { - "name": "resolution_x", - "type": "li32" - }, - { - "name": "resolution_y", - "type": "li32" - } - ] - ], - "packet_add_ecs_entity": [ - "container", - [ - { - "name": "network_id", - "type": "varint64" - } - ] - ], - "packet_remove_ecs_entity": [ - "container", - [ - { - "name": "network_id", - "type": "varint64" - } - ] - ], - "packet_client_cache_status": [ - "container", - [ - { - "name": "enabled", - "type": "bool" - } - ] - ], - "packet_on_screen_texture_animation": [ - "container", - [ - { - "name": "animation_type", - "type": "lu32" - } - ] - ], - "packet_map_create_locked_copy": [ - "container", - [ - { - "name": "original_map_id", - "type": "zigzag64" - }, - { - "name": "new_map_id", - "type": "zigzag64" - } - ] - ], - "packet_structure_template_data_export_request": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "position", - "type": "BlockCoordinates" - }, - { - "name": "settings", - "type": "StructureBlockSettings" - }, - { - "name": "request_type", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "1": "export_from_save", - "2": "export_from_load", - "3": "query_saved_structure" - } - } - ] - } - ] - ], - "packet_structure_template_data_export_response": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "success", - "type": "bool" - }, - { - "name": "nbt", - "type": [ - "switch", - { - "compareTo": "success", - "fields": { - "true": "nbt" - }, - "default": "void" - } - ] - }, - { - "name": "response_type", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "1": "export", - "2": "query" - } - } - ] - } - ] - ], - "packet_update_block_properties": [ - "container", - [ - { - "name": "nbt", - "type": "nbt" - } - ] - ], - "packet_client_cache_blob_status": [ - "container", - [ - { - "name": "misses", - "type": "varint" - }, - { - "name": "haves", - "type": "varint" - }, - { - "name": "missing", - "type": [ - "array", - { - "count": "misses", - "type": "lu64" - } - ] - }, - { - "name": "have", - "type": [ - "array", - { - "count": "haves", - "type": "lu64" - } - ] - } - ] - ], - "packet_client_cache_miss_response": [ - "container", - [ - { - "name": "blobs", - "type": [ - "array", - { - "countType": "varint", - "type": "Blob" - } - ] - } - ] - ], - "packet_education_settings": [ - "container", - [ - { - "name": "CodeBuilderDefaultURI", - "type": "string" - }, - { - "name": "CodeBuilderTitle", - "type": "string" - }, - { - "name": "CanResizeCodeBuilder", - "type": "bool" - }, - { - "name": "HasOverrideURI", - "type": "bool" - }, - { - "name": "OverrideURI", - "type": [ - "switch", - { - "compareTo": "HasOverrideURI", - "fields": { - "true": "string" - }, - "default": "void" - } - ] - }, - { - "name": "HasQuiz", - "type": "bool" - } - ] - ], - "packet_multiplayer_settings": [ - "container", - [ - { - "name": "action_type", - "type": [ - "mapper", - { - "type": "zigzag32", - "mappings": { - "0": "enable_multiplayer", - "1": "disable_multiplayer", - "2": "refresh_join_code" - } - } - ] - } - ] - ], - "packet_settings_command": [ - "container", - [ - { - "name": "command_line", - "type": "string" - }, - { - "name": "suppress_output", - "type": "bool" - } - ] - ], - "packet_anvil_damage": [ - "container", - [ - { - "name": "damage", - "type": "u8" - }, - { - "name": "position", - "type": "BlockCoordinates" - } - ] - ], - "packet_completed_using_item": [ - "container", - [ - { - "name": "used_item_id", - "type": "li16" - }, - { - "name": "use_method", - "type": [ - "mapper", - { - "type": "li32", - "mappings": { - "0": "equip_armor", - "1": "eat", - "2": "attack", - "3": "consume", - "4": "throw", - "5": "shoot", - "6": "place", - "7": "fill_bottle", - "8": "fill_bucket", - "9": "pour_bucket", - "10": "use_tool", - "11": "interact", - "12": "retrieved", - "13": "dyed", - "14": "traded" - } - } - ] - } - ] - ], - "packet_network_settings": [ - "container", - [ - { - "name": "compression_threshold", - "type": "u16" - } - ] - ], - "packet_player_auth_input": [ - "container", - [ - { - "name": "pitch", - "type": "lf32" - }, - { - "name": "yaw", - "type": "lf32" - }, - { - "name": "position", - "type": "vec3f" - }, - { - "name": "move_vector", - "type": "vec2f" - }, - { - "name": "head_yaw", - "type": "lf32" - }, - { - "name": "input_data", - "type": "InputFlag" - }, - { - "name": "input_mode", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "0": "unknown", - "1": "mouse", - "2": "touch", - "3": "game_pad", - "4": "motion_controller" - } - } - ] - }, - { - "name": "play_mode", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "0": "normal", - "1": "teaser", - "2": "screen", - "3": "viewer", - "4": "reality", - "5": "placement", - "6": "living_room", - "7": "exit_level", - "8": "exit_level_living_room", - "9": "num_modes" - } - } - ] - }, - { - "name": "gaze_direction", - "type": [ - "switch", - { - "compareTo": "play_mode", - "fields": { - "reality": "vec3f" - }, - "default": "void" - } - ] - }, - { - "name": "tick", - "type": "varint64" - }, - { - "name": "delta", - "type": "vec3f" - }, - { - "name": "transaction", - "type": [ - "switch", - { - "compareTo": "input_data.item_interact", - "fields": { - "true": [ - "container", - [ - { - "name": "legacy", - "type": "TransactionLegacy" - }, - { - "name": "actions", - "type": "TransactionActions" - }, - { - "name": "data", - "type": "TransactionUseItem" - } - ] - ] - }, - "default": "void" - } - ] - }, - { - "name": "item_stack_request", - "type": [ - "switch", - { - "compareTo": "input_data.item_stack_request", - "fields": { - "true": "ItemStackRequest" - }, - "default": "void" - } - ] - }, - { - "name": "block_action", - "type": [ - "switch", - { - "compareTo": "input_data.block_action", - "fields": { - "true": [ - "array", - { - "countType": "zigzag32", - "type": [ - "container", - [ - { - "name": "action", - "type": "Action" - }, - { - "anon": true, - "type": [ - "switch", - { - "compareTo": "action", - "fields": { - "start_break": [ - "container", - [ - { - "name": "position", - "type": "BlockCoordinates" - }, - { - "name": "face", - "type": "zigzag32" - } - ] - ], - "abort_break": [ - "container", - [ - { - "name": "position", - "type": "BlockCoordinates" - }, - { - "name": "face", - "type": "zigzag32" - } - ] - ], - "crack_break": [ - "container", - [ - { - "name": "position", - "type": "BlockCoordinates" - }, - { - "name": "face", - "type": "zigzag32" - } - ] - ], - "predict_break": [ - "container", - [ - { - "name": "position", - "type": "BlockCoordinates" - }, - { - "name": "face", - "type": "zigzag32" - } - ] - ], - "continue_break": [ - "container", - [ - { - "name": "position", - "type": "BlockCoordinates" - }, - { - "name": "face", - "type": "zigzag32" - } - ] - ] - }, - "default": "void" - } - ] - } - ] - ] - } - ] - }, - "default": "void" - } - ] - } - ] - ], - "packet_creative_content": [ - "container", - [ - { - "name": "items", - "type": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "entry_id", - "type": "varint" - }, - { - "name": "item", - "type": "ItemLegacy" - } - ] - ] - } - ] - } - ] - ], - "packet_player_enchant_options": [ - "container", - [ - { - "name": "options", - "type": [ - "array", - { - "countType": "varint", - "type": "EnchantOption" - } - ] - } - ] - ], - "packet_item_stack_request": [ - "container", - [ - { - "name": "requests", - "type": [ - "array", - { - "countType": "varint", - "type": "ItemStackRequest" - } - ] - } - ] - ], - "packet_item_stack_response": [ - "container", - [ - { - "name": "responses", - "type": "ItemStackResponses" - } - ] - ], - "packet_player_armor_damage": [ - "container", - [ - { - "name": "type", - "type": "ArmorDamageType" - }, - { - "name": "helmet_damage", - "type": [ - "switch", - { - "compareTo": "type.head", - "fields": { - "true": "zigzag32" - }, - "default": "void" - } - ] - }, - { - "name": "chestplate_damage", - "type": [ - "switch", - { - "compareTo": "type.chest", - "fields": { - "true": "zigzag32" - }, - "default": "void" - } - ] - }, - { - "name": "leggings_damage", - "type": [ - "switch", - { - "compareTo": "type.legs", - "fields": { - "true": "zigzag32" - }, - "default": "void" - } - ] - }, - { - "name": "boots_damage", - "type": [ - "switch", - { - "compareTo": "type.feet", - "fields": { - "true": "zigzag32" - }, - "default": "void" - } - ] - } - ] - ], - "packet_update_player_game_type": [ - "container", - [ - { - "name": "gamemode", - "type": "GameMode" - }, - { - "name": "player_unique_id", - "type": "zigzag64" - } - ] - ], - "packet_position_tracking_db_request": [ - "container", - [ - { - "name": "action", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "0": "query" - } - } - ] - }, - { - "name": "tracking_id", - "type": "zigzag32" - } - ] - ], - "packet_position_tracking_db_broadcast": [ - "container", - [ - { - "name": "broadcast_action", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "0": "update", - "1": "destory", - "2": "not_found" - } - } - ] - }, - { - "name": "tracking_id", - "type": "zigzag32" - }, - { - "name": "nbt", - "type": "nbt" - } - ] - ], - "packet_packet_violation_warning": [ - "container", - [ - { - "name": "violation_type", - "type": [ - "mapper", - { - "type": "zigzag32", - "mappings": { - "0": "malformed" - } - } - ] - }, - { - "name": "severity", - "type": [ - "mapper", - { - "type": "zigzag32", - "mappings": { - "0": "warning", - "1": "final_warning", - "2": "terminating" - } - } - ] - }, - { - "name": "packet_id", - "type": "zigzag32" - }, - { - "name": "reason", - "type": "string" - } - ] - ], - "packet_motion_prediction_hints": [ - "container", - [ - { - "name": "entity_runtime_id", - "type": "varint64" - }, - { - "name": "velocity", - "type": "vec3f" - }, - { - "name": "on_ground", - "type": "bool" - } - ] - ], - "packet_animate_entity": [ - "container", - [ - { - "name": "animation", - "type": "string" - }, - { - "name": "next_state", - "type": "string" - }, - { - "name": "stop_condition", - "type": "string" - }, - { - "name": "controller", - "type": "string" - }, - { - "name": "blend_out_time", - "type": "lf32" - }, - { - "name": "runtime_entity_ids", - "type": [ - "array", - { - "countType": "varint", - "type": "varint64" - } - ] - } - ] - ], - "packet_camera_shake": [ - "container", - [ - { - "name": "intensity", - "type": "lf32" - }, - { - "name": "duration", - "type": "lf32" - }, - { - "name": "type", - "type": "u8" - }, - { - "name": "action", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "0": "add", - "1": "stop" - } - } - ] - } - ] - ], - "packet_player_fog": [ - "container", - [ - { - "name": "stack", - "type": [ - "array", - { - "countType": "varint", - "type": "string" - } - ] - } - ] - ], - "packet_correct_player_move_prediction": [ - "container", - [ - { - "name": "position", - "type": "vec3f" - }, - { - "name": "delta", - "type": "vec3f" - }, - { - "name": "on_ground", - "type": "bool" - }, - { - "name": "tick", - "type": "varint64" - } - ] - ], - "packet_item_component": [ - "container", - [ - { - "name": "entries", - "type": "ItemComponentList" - } - ] - ], - "packet_filter_text_packet": [ - "container", - [ - { - "name": "text", - "type": "string" - }, - { - "name": "from_server", - "type": "bool" - } - ] - ], - "packet_debug_renderer": [ - "container", - [ - { - "name": "type", - "type": [ - "mapper", - { - "type": "li32", - "mappings": { - "1": "clear", - "2": "add_cube" - } - } - ] - }, - { - "anon": true, - "type": [ - "switch", - { - "compareTo": "type", - "fields": { - "clear": "void", - "add_cube": [ - "container", - [ - { - "name": "text", - "type": "string" - }, - { - "name": "position", - "type": "vec3f" - }, - { - "name": "red", - "type": "lf32" - }, - { - "name": "green", - "type": "lf32" - }, - { - "name": "blue", - "type": "lf32" - }, - { - "name": "alpha", - "type": "lf32" - }, - { - "name": "duration", - "type": "li64" - } - ] - ] - }, - "default": "void" - } - ] - } - ] - ], - "string": [ - "pstring", - { - "countType": "varint" - } - ], - "ByteArray": [ - "buffer", - { - "countType": "varint" - } - ], - "SignedByteArray": [ - "buffer", - { - "countType": "zigzag32" - } - ], - "LittleString": [ - "pstring", - { - "countType": "li32" - } - ], - "ShortArray": [ - "buffer", - { - "countType": "li16" - } - ], - "MetadataFlags1": [ - "bitflags", - { - "type": "zigzag64", - "big": true, - "flags": [ - "onfire", - "sneaking", - "riding", - "sprinting", - "action", - "invisible", - "tempted", - "inlove", - "saddled", - "powered", - "ignited", - "baby", - "converting", - "critical", - "can_show_nametag", - "always_show_nametag", - "no_ai", - "silent", - "wallclimbing", - "can_climb", - "swimmer", - "can_fly", - "walker", - "resting", - "sitting", - "angry", - "interested", - "charged", - "tamed", - "orphaned", - "leashed", - "sheared", - "gliding", - "elder", - "moving", - "breathing", - "chested", - "stackable", - "showbase", - "rearing", - "vibrating", - "idling", - "evoker_spell", - "charge_attack", - "wasd_controlled", - "can_power_jump", - "linger", - "has_collision", - "affected_by_gravity", - "fire_immune", - "dancing", - "enchanted", - "show_trident_rope", - "container_private", - "transforming", - "spin_attack", - "swimming", - "bribed", - "pregnant", - "laying_egg", - "rider_can_pick", - "transition_sitting", - "eating", - "laying_down" - ] - } - ], - "MetadataFlags2": [ - "bitflags", - { - "type": "zigzag64", - "big": true, - "flags": [ - "sneezing", - "trusting", - "rolling", - "scared", - "in_scaffolding", - "over_scaffolding", - "fall_through_scaffolding", - "blocking", - "transition_blocking", - "blocked_using_shield", - "blocked_using_damaged_shield", - "sleeping", - "wants_to_wake", - "trade_interest", - "door_breaker", - "breaking_obstruction", - "door_opener", - "illager_captain", - "stunned", - "roaring", - "delayed_attacking", - "avoiding_mobs", - "avoiding_block", - "facing_target_to_range_attack", - "hidden_when_invisible", - "is_in_ui", - "stalking", - "emoting", - "celebrating", - "admiring", - "celebrating_special" - ] - } - ], - "UpdateBlockFlags": [ - "bitflags", - { - "type": "varint", - "flags": { - "neighbors": 1, - "network": 2, - "no_graphic": 4, - "unused": 8, - "priority": 16 - } - } - ], - "AdventureFlags": [ - "bitflags", - { - "type": "varint", - "flags": { - "world_immutable": 1, - "no_pvp": 2, - "auto_jump": 32, - "allow_flight": 64, - "no_clip": 128, - "world_builder": 256, - "flying": 512, - "muted": 1024 - } - } - ], - "ActionPermissions": [ - "bitflags", - { - "type": "varint", - "flags": { - "mine": 65537, - "doors_and_switches": 65538, - "open_containers": 65540, - "attack_players": 65544, - "attack_mobs": 65552, - "operator": 65568, - "teleport": 65664, - "build": 65792, - "default": 66048 - } - } - ], - "UpdateMapFlags": [ - "bitflags", - { - "type": "varint", - "flags": [ - "void", - "texture", - "decoration", - "initialisation" - ] - } - ], - "CommandFlags": [ - "bitfield", - [ - { - "name": "unused", - "size": 6, - "signed": false - }, - { - "name": "has_semantic_constraint", - "size": 1, - "signed": false - }, - { - "name": "collapse_enum", - "size": 1, - "signed": false - } - ] - ], - "DeltaMoveFlags": [ - "bitflags", - { - "type": "lu16", - "flags": { - "has_x": 1, - "has_y": 2, - "has_z": 4, - "has_rot_x": 8, - "has_rot_y": 16, - "has_rot_z": 32, - "on_ground": 64, - "teleport": 128, - "force_move": 256 - } - } - ], - "InputFlag": [ - "bitflags", - { - "type": "varint64", - "big": true, - "flags": [ - "ascend", - "descend", - "north_jump", - "jump_down", - "sprint_down", - "change_height", - "jumping", - "auto_jumping_in_water", - "sneaking", - "sneak_down", - "up", - "down", - "left", - "right", - "up_left", - "up_right", - "want_up", - "want_down", - "want_down_slow", - "want_up_slow", - "sprinting", - "ascend_scaffolding", - "descend_scaffolding", - "sneak_toggle_down", - "persist_sneak", - "start_sprinting", - "stop_sprinting", - "start_sneaking", - "stop_sneaking", - "start_swimming", - "stop_swimming", - "start_jumping", - "start_gliding", - "stop_gliding", - "item_interact", - "block_action", - "item_stack_request" - ] - } - ], - "ArmorDamageType": [ - "bitflags", - { - "type": "u8", - "flags": { - "head": 1, - "chest": 2, - "legs": 4, - "feet": 8 - } - } - ] - } -} \ No newline at end of file diff --git a/data/1.17.0/protocol.json b/data/1.17.0/protocol.json deleted file mode 100644 index 68efe51..0000000 --- a/data/1.17.0/protocol.json +++ /dev/null @@ -1,8907 +0,0 @@ -{ - "types": { - "varint64": "native", - "zigzag32": "native", - "zigzag64": "native", - "uuid": "native", - "byterot": "native", - "bitflags": "native", - "restBuffer": "native", - "encapsulated": "native", - "nbt": "native", - "lnbt": "native", - "nbtLoop": "native", - "enum_size_based_on_values_len": "native", - "MapInfo": "native", - "BehaviourPackInfos": [ - "array", - { - "countType": "li16", - "type": [ - "container", - [ - { - "name": "uuid", - "type": "string" - }, - { - "name": "version", - "type": "string" - }, - { - "name": "size", - "type": "lu64" - }, - { - "name": "content_key", - "type": "string" - }, - { - "name": "sub_pack_name", - "type": "string" - }, - { - "name": "content_identity", - "type": "string" - }, - { - "name": "has_scripts", - "type": "bool" - } - ] - ] - } - ], - "TexturePackInfos": [ - "array", - { - "countType": "li16", - "type": [ - "container", - [ - { - "name": "uuid", - "type": "string" - }, - { - "name": "version", - "type": "string" - }, - { - "name": "size", - "type": "lu64" - }, - { - "name": "content_key", - "type": "string" - }, - { - "name": "sub_pack_name", - "type": "string" - }, - { - "name": "content_identity", - "type": "string" - }, - { - "name": "has_scripts", - "type": "bool" - }, - { - "name": "rtx_enabled", - "type": "bool" - } - ] - ] - } - ], - "ResourcePackIdVersions": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "uuid", - "type": "string" - }, - { - "name": "version", - "type": "string" - }, - { - "name": "name", - "type": "string" - } - ] - ] - } - ], - "ResourcePackIds": [ - "array", - { - "countType": "li16", - "type": "string" - } - ], - "Experiment": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "enabled", - "type": "bool" - } - ] - ], - "Experiments": [ - "array", - { - "countType": "li32", - "type": "Experiment" - } - ], - "GameMode": [ - "mapper", - { - "type": "zigzag32", - "mappings": { - "0": "survival", - "1": "creative", - "2": "adventure", - "3": "survival_spectator", - "4": "creative_spectator", - "5": "fallback" - } - } - ], - "GameRule": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "editable", - "type": "bool" - }, - { - "name": "type", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "1": "bool", - "2": "int", - "3": "float" - } - } - ] - }, - { - "name": "value", - "type": [ - "switch", - { - "compareTo": "type", - "fields": { - "bool": "bool", - "int": "zigzag32", - "float": "lf32" - }, - "default": "void" - } - ] - } - ] - ], - "GameRules": [ - "array", - { - "countType": "varint", - "type": "GameRule" - } - ], - "Blob": [ - "container", - [ - { - "name": "hash", - "type": "lu64" - }, - { - "name": "payload", - "type": "ByteArray" - } - ] - ], - "BlockProperties": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "state", - "type": "nbt" - } - ] - ] - } - ], - "Itemstates": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "runtime_id", - "type": "li16" - }, - { - "name": "component_based", - "type": "bool" - } - ] - ] - } - ], - "ItemExtraDataWithBlockingTick": [ - "container", - [ - { - "name": "has_nbt", - "type": [ - "mapper", - { - "type": "lu16", - "mappings": { - "0": "false", - "65535": "true" - } - } - ] - }, - { - "name": "nbt", - "type": [ - "switch", - { - "compareTo": "has_nbt", - "fields": { - "true": [ - "container", - [ - { - "name": "version", - "type": "u8" - }, - { - "name": "nbt", - "type": "lnbt" - } - ] - ] - }, - "default": "void" - } - ] - }, - { - "name": "can_place_on", - "type": [ - "array", - { - "countType": "li32", - "type": "ShortArray" - } - ] - }, - { - "name": "can_destroy", - "type": [ - "array", - { - "countType": "li32", - "type": "ShortArray" - } - ] - }, - { - "name": "blocking_tick", - "type": "li64" - } - ] - ], - "ItemExtraDataWithoutBlockingTick": [ - "container", - [ - { - "name": "has_nbt", - "type": [ - "mapper", - { - "type": "lu16", - "mappings": { - "0": "false", - "65535": "true" - } - } - ] - }, - { - "name": "nbt", - "type": [ - "switch", - { - "compareTo": "has_nbt", - "fields": { - "true": [ - "container", - [ - { - "name": "version", - "type": "u8" - }, - { - "name": "nbt", - "type": "lnbt" - } - ] - ] - }, - "default": "void" - } - ] - }, - { - "name": "can_place_on", - "type": [ - "array", - { - "countType": "li32", - "type": "ShortArray" - } - ] - }, - { - "name": "can_destroy", - "type": [ - "array", - { - "countType": "li32", - "type": "ShortArray" - } - ] - } - ] - ], - "ItemLegacy": [ - "container", - [ - { - "name": "network_id", - "type": "zigzag32" - }, - { - "anon": true, - "type": [ - "switch", - { - "compareTo": "network_id", - "fields": { - "0": "void" - }, - "default": [ - "container", - [ - { - "name": "count", - "type": "lu16" - }, - { - "name": "metadata", - "type": "varint" - }, - { - "name": "block_runtime_id", - "type": "zigzag32" - }, - { - "name": "extra", - "type": [ - "switch", - { - "compareTo": "network_id", - "fields": { - "/ShieldItemID": [ - "encapsulated", - { - "lengthType": "varint", - "type": "ItemExtraDataWithBlockingTick" - } - ] - }, - "default": [ - "encapsulated", - { - "lengthType": "varint", - "type": "ItemExtraDataWithoutBlockingTick" - } - ] - } - ] - } - ] - ] - } - ] - } - ] - ], - "Item": [ - "container", - [ - { - "name": "network_id", - "type": "zigzag32" - }, - { - "anon": true, - "type": [ - "switch", - { - "compareTo": "network_id", - "fields": { - "0": "void" - }, - "default": [ - "container", - [ - { - "name": "count", - "type": "lu16" - }, - { - "name": "metadata", - "type": "varint" - }, - { - "name": "has_stack_id", - "type": "u8" - }, - { - "name": "stack_id", - "type": [ - "switch", - { - "compareTo": "has_stack_id", - "fields": { - "0": "void" - }, - "default": "zigzag32" - } - ] - }, - { - "name": "block_runtime_id", - "type": "zigzag32" - }, - { - "name": "extra", - "type": [ - "switch", - { - "compareTo": "network_id", - "fields": { - "/ShieldItemID": [ - "encapsulated", - { - "lengthType": "varint", - "type": "ItemExtraDataWithBlockingTick" - } - ] - }, - "default": [ - "encapsulated", - { - "lengthType": "varint", - "type": "ItemExtraDataWithoutBlockingTick" - } - ] - } - ] - } - ] - ] - } - ] - } - ] - ], - "vec3i": [ - "container", - [ - { - "name": "x", - "type": "zigzag32" - }, - { - "name": "y", - "type": "zigzag32" - }, - { - "name": "z", - "type": "zigzag32" - } - ] - ], - "vec3u": [ - "container", - [ - { - "name": "x", - "type": "varint" - }, - { - "name": "y", - "type": "varint" - }, - { - "name": "z", - "type": "varint" - } - ] - ], - "vec3f": [ - "container", - [ - { - "name": "x", - "type": "lf32" - }, - { - "name": "y", - "type": "lf32" - }, - { - "name": "z", - "type": "lf32" - } - ] - ], - "vec2f": [ - "container", - [ - { - "name": "x", - "type": "lf32" - }, - { - "name": "z", - "type": "lf32" - } - ] - ], - "MetadataDictionary": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "key", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "0": "flags", - "1": "health", - "2": "variant", - "3": "color", - "4": "nametag", - "5": "owner_eid", - "6": "target_eid", - "7": "air", - "8": "potion_color", - "9": "potion_ambient", - "10": "jump_duration", - "11": "hurt_time", - "12": "hurt_direction", - "13": "paddle_time_left", - "14": "paddle_time_right", - "15": "experience_value", - "16": "minecart_display_block", - "17": "minecart_display_offset", - "18": "minecart_has_display", - "20": "old_swell", - "21": "swell_dir", - "22": "charge_amount", - "23": "enderman_held_runtime_id", - "24": "entity_age", - "26": "player_flags", - "27": "player_index", - "28": "player_bed_position", - "29": "fireball_power_x", - "30": "fireball_power_y", - "31": "fireball_power_z", - "32": "aux_power", - "33": "fish_x", - "34": "fish_z", - "35": "fish_angle", - "36": "potion_aux_value", - "37": "lead_holder_eid", - "38": "scale", - "39": "interactive_tag", - "40": "npc_skin_id", - "41": "url_tag", - "42": "max_airdata_max_air", - "43": "mark_variant", - "44": "container_type", - "45": "container_base_size", - "46": "container_extra_slots_per_strength", - "47": "block_target", - "48": "wither_invulnerable_ticks", - "49": "wither_target_1", - "50": "wither_target_2", - "51": "wither_target_3", - "52": "aerial_attack", - "53": "boundingbox_width", - "54": "boundingbox_height", - "55": "fuse_length", - "56": "rider_seat_position", - "57": "rider_rotation_locked", - "58": "rider_max_rotation", - "59": "rider_min_rotation", - "60": "rider_rotation_offset", - "61": "area_effect_cloud_radius", - "62": "area_effect_cloud_waiting", - "63": "area_effect_cloud_particle_id", - "64": "shulker_peek_id", - "65": "shulker_attach_face", - "66": "shulker_attached", - "67": "shulker_attach_pos", - "68": "trading_player_eid", - "69": "trading_career", - "70": "has_command_block", - "71": "command_block_command", - "72": "command_block_last_output", - "73": "command_block_track_output", - "74": "controlling_rider_seat_number", - "75": "strength", - "76": "max_strength", - "77": "spell_casting_color", - "78": "limited_life", - "79": "armor_stand_pose_index", - "80": "ender_crystal_time_offset", - "81": "always_show_nametag", - "82": "color_2", - "83": "name_author", - "84": "score_tag", - "85": "balloon_attached_entity", - "86": "pufferfish_size", - "87": "bubble_time", - "88": "agent", - "89": "sitting_amount", - "90": "sitting_amount_previous", - "91": "eating_counter", - "92": "flags_extended", - "93": "laying_amount", - "94": "laying_amount_previous", - "95": "duration", - "96": "spawn_time", - "97": "change_rate", - "98": "change_on_pickup", - "99": "pickup_count", - "100": "interact_text", - "101": "trade_tier", - "102": "max_trade_tier", - "103": "trade_experience", - "104": "skin_id", - "105": "spawning_frames", - "106": "command_block_tick_delay", - "107": "command_block_execute_on_first_tick", - "108": "ambient_sound_interval", - "109": "ambient_sound_interval_range", - "110": "ambient_sound_event_name", - "111": "fall_damage_multiplier", - "112": "name_raw_text", - "113": "can_ride_target", - "114": "low_tier_cured_discount", - "115": "high_tier_cured_discount", - "116": "nearby_cured_discount", - "117": "nearby_cured_discount_timestamp", - "118": "hitbox", - "119": "is_buoyant", - "120": "base_runtime_id", - "121": "freezing_effect_strength", - "122": "buoyancy_data", - "123": "goat_horn_count", - "124": "update_properties" - } - } - ] - }, - { - "name": "type", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "0": "byte", - "1": "short", - "2": "int", - "3": "float", - "4": "string", - "5": "compound", - "6": "vec3i", - "7": "long", - "8": "vec3f" - } - } - ] - }, - { - "name": "value", - "type": [ - "switch", - { - "compareTo": "key", - "fields": { - "flags": "MetadataFlags1", - "flags_extended": "MetadataFlags2" - }, - "default": [ - "switch", - { - "compareTo": "type", - "fields": { - "byte": "i8", - "short": "li16", - "int": "zigzag32", - "float": "lf32", - "string": "string", - "compound": "nbt", - "vec3i": "vec3i", - "long": "zigzag64", - "vec3f": "vec3f" - }, - "default": "void" - } - ] - } - ] - } - ] - ] - } - ], - "Link": [ - "container", - [ - { - "name": "ridden_entity_id", - "type": "zigzag64" - }, - { - "name": "rider_entity_id", - "type": "zigzag64" - }, - { - "name": "type", - "type": "u8" - }, - { - "name": "immediate", - "type": "bool" - }, - { - "name": "rider_initiated", - "type": "bool" - } - ] - ], - "Links": [ - "array", - { - "countType": "varint", - "type": "Link" - } - ], - "EntityAttributes": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "min", - "type": "lf32" - }, - { - "name": "value", - "type": "lf32" - }, - { - "name": "max", - "type": "lf32" - } - ] - ] - } - ], - "Rotation": [ - "container", - [ - { - "name": "yaw", - "type": "byterot" - }, - { - "name": "pitch", - "type": "byterot" - }, - { - "name": "head_yaw", - "type": "byterot" - } - ] - ], - "BlockCoordinates": [ - "container", - [ - { - "name": "x", - "type": "zigzag32" - }, - { - "name": "y", - "type": "varint" - }, - { - "name": "z", - "type": "zigzag32" - } - ] - ], - "PlayerAttributes": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "min", - "type": "lf32" - }, - { - "name": "max", - "type": "lf32" - }, - { - "name": "current", - "type": "lf32" - }, - { - "name": "default", - "type": "lf32" - }, - { - "name": "name", - "type": "string" - } - ] - ] - } - ], - "TransactionUseItem": [ - "container", - [ - { - "name": "action_type", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "0": "click_block", - "1": "click_air", - "2": "break_block" - } - } - ] - }, - { - "name": "block_position", - "type": "vec3i" - }, - { - "name": "face", - "type": "varint" - }, - { - "name": "hotbar_slot", - "type": "varint" - }, - { - "name": "held_item", - "type": "Item" - }, - { - "name": "player_pos", - "type": "vec3f" - }, - { - "name": "click_pos", - "type": "vec3f" - }, - { - "name": "block_runtime_id", - "type": "varint" - } - ] - ], - "TransactionActions": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "source_type", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "0": "container", - "1": "global", - "2": "world_interaction", - "3": "creative", - "100": "craft_slot", - "99999": "craft" - } - } - ] - }, - { - "anon": true, - "type": [ - "switch", - { - "compareTo": "source_type", - "fields": { - "container": [ - "container", - [ - { - "name": "inventory_id", - "type": "WindowIDVarint" - } - ] - ], - "craft": [ - "container", - [ - { - "name": "action", - "type": "varint" - } - ] - ], - "world_interaction": [ - "container", - [ - { - "name": "flags", - "type": "varint" - } - ] - ], - "craft_slot": [ - "container", - [ - { - "name": "action", - "type": "varint" - } - ] - ] - }, - "default": "void" - } - ] - }, - { - "name": "slot", - "type": "varint" - }, - { - "name": "old_item", - "type": "Item" - }, - { - "name": "new_item", - "type": "Item" - } - ] - ] - } - ], - "TransactionLegacy": [ - "container", - [ - { - "name": "legacy_request_id", - "type": "zigzag32" - }, - { - "name": "legacy_transactions", - "type": [ - "switch", - { - "compareTo": "legacy_request_id", - "fields": { - "0": "void" - }, - "default": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "container_id", - "type": "u8" - }, - { - "name": "changed_slots", - "type": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "slot_id", - "type": "u8" - } - ] - ] - } - ] - } - ] - ] - } - ] - } - ] - } - ] - ], - "Transaction": [ - "container", - [ - { - "name": "legacy", - "type": "TransactionLegacy" - }, - { - "name": "transaction_type", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "0": "normal", - "1": "inventory_mismatch", - "2": "item_use", - "3": "item_use_on_entity", - "4": "item_release" - } - } - ] - }, - { - "name": "actions", - "type": "TransactionActions" - }, - { - "name": "transaction_data", - "type": [ - "switch", - { - "compareTo": "transaction_type", - "fields": { - "normal": "void", - "inventory_mismatch": "void", - "item_use": "TransactionUseItem", - "item_use_on_entity": [ - "container", - [ - { - "name": "entity_runtime_id", - "type": "varint64" - }, - { - "name": "action_type", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "0": "interact", - "1": "attack" - } - } - ] - }, - { - "name": "hotbar_slot", - "type": "zigzag32" - }, - { - "name": "held_item", - "type": "Item" - }, - { - "name": "player_pos", - "type": "vec3f" - }, - { - "name": "click_pos", - "type": "vec3f" - } - ] - ], - "item_release": [ - "container", - [ - { - "name": "action_type", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "0": "release", - "1": "consume" - } - } - ] - }, - { - "name": "hotbar_slot", - "type": "zigzag32" - }, - { - "name": "held_item", - "type": "Item" - }, - { - "name": "head_pos", - "type": "vec3f" - } - ] - ] - }, - "default": "void" - } - ] - } - ] - ], - "ItemStacks": [ - "array", - { - "countType": "varint", - "type": "Item" - } - ], - "RecipeIngredient": [ - "container", - [ - { - "name": "network_id", - "type": "zigzag32" - }, - { - "anon": true, - "type": [ - "switch", - { - "compareTo": "network_id", - "fields": { - "0": "void" - }, - "default": [ - "container", - [ - { - "name": "network_data", - "type": "zigzag32" - }, - { - "name": "count", - "type": "zigzag32" - } - ] - ] - } - ] - } - ] - ], - "PotionTypeRecipes": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "input_item_id", - "type": "zigzag32" - }, - { - "name": "input_item_meta", - "type": "zigzag32" - }, - { - "name": "ingredient_id", - "type": "zigzag32" - }, - { - "name": "ingredient_meta", - "type": "zigzag32" - }, - { - "name": "output_item_id", - "type": "zigzag32" - }, - { - "name": "output_item_meta", - "type": "zigzag32" - } - ] - ] - } - ], - "PotionContainerChangeRecipes": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "input_item_id", - "type": "zigzag32" - }, - { - "name": "ingredient_id", - "type": "zigzag32" - }, - { - "name": "output_item_id", - "type": "zigzag32" - } - ] - ] - } - ], - "Recipes": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "type", - "type": [ - "mapper", - { - "type": "zigzag32", - "mappings": { - "0": "shapeless", - "1": "shaped", - "2": "furnace", - "3": "furnace_with_metadata", - "4": "multi", - "5": "shulker_box", - "6": "shapeless_chemistry", - "7": "shaped_chemistry" - } - } - ] - }, - { - "name": "recipe", - "type": [ - "switch", - { - "compareTo": "type", - "fields": { - "shapeless": [ - "container", - [ - { - "name": "recipe_id", - "type": "string" - }, - { - "name": "input", - "type": [ - "array", - { - "countType": "varint", - "type": "RecipeIngredient" - } - ] - }, - { - "name": "output", - "type": [ - "array", - { - "countType": "varint", - "type": "ItemLegacy" - } - ] - }, - { - "name": "uuid", - "type": "uuid" - }, - { - "name": "block", - "type": "string" - }, - { - "name": "priority", - "type": "zigzag32" - }, - { - "name": "network_id", - "type": "varint" - } - ] - ], - "shulker_box": [ - "container", - [ - { - "name": "recipe_id", - "type": "string" - }, - { - "name": "input", - "type": [ - "array", - { - "countType": "varint", - "type": "RecipeIngredient" - } - ] - }, - { - "name": "output", - "type": [ - "array", - { - "countType": "varint", - "type": "ItemLegacy" - } - ] - }, - { - "name": "uuid", - "type": "uuid" - }, - { - "name": "block", - "type": "string" - }, - { - "name": "priority", - "type": "zigzag32" - }, - { - "name": "network_id", - "type": "varint" - } - ] - ], - "shapeless_chemistry": [ - "container", - [ - { - "name": "recipe_id", - "type": "string" - }, - { - "name": "input", - "type": [ - "array", - { - "countType": "varint", - "type": "RecipeIngredient" - } - ] - }, - { - "name": "output", - "type": [ - "array", - { - "countType": "varint", - "type": "ItemLegacy" - } - ] - }, - { - "name": "uuid", - "type": "uuid" - }, - { - "name": "block", - "type": "string" - }, - { - "name": "priority", - "type": "zigzag32" - }, - { - "name": "network_id", - "type": "varint" - } - ] - ], - "shaped": [ - "container", - [ - { - "name": "recipe_id", - "type": "string" - }, - { - "name": "width", - "type": "zigzag32" - }, - { - "name": "height", - "type": "zigzag32" - }, - { - "name": "input", - "type": [ - "array", - { - "count": "width", - "type": [ - "array", - { - "count": "height", - "type": "RecipeIngredient" - } - ] - } - ] - }, - { - "name": "output", - "type": [ - "array", - { - "countType": "varint", - "type": "ItemLegacy" - } - ] - }, - { - "name": "uuid", - "type": "uuid" - }, - { - "name": "block", - "type": "string" - }, - { - "name": "priority", - "type": "zigzag32" - }, - { - "name": "network_id", - "type": "varint" - } - ] - ], - "shaped_chemistry": [ - "container", - [ - { - "name": "recipe_id", - "type": "string" - }, - { - "name": "width", - "type": "zigzag32" - }, - { - "name": "height", - "type": "zigzag32" - }, - { - "name": "input", - "type": [ - "array", - { - "count": "width", - "type": [ - "array", - { - "count": "height", - "type": "RecipeIngredient" - } - ] - } - ] - }, - { - "name": "output", - "type": [ - "array", - { - "countType": "varint", - "type": "ItemLegacy" - } - ] - }, - { - "name": "uuid", - "type": "uuid" - }, - { - "name": "block", - "type": "string" - }, - { - "name": "priority", - "type": "zigzag32" - }, - { - "name": "network_id", - "type": "varint" - } - ] - ], - "furnace": [ - "container", - [ - { - "name": "input_id", - "type": "zigzag32" - }, - { - "name": "output", - "type": "ItemLegacy" - }, - { - "name": "block", - "type": "string" - } - ] - ], - "furnace_with_metadata": [ - "container", - [ - { - "name": "input_id", - "type": "zigzag32" - }, - { - "name": "input_meta", - "type": "zigzag32" - }, - { - "name": "output", - "type": "ItemLegacy" - }, - { - "name": "block", - "type": "string" - } - ] - ], - "multi": [ - "container", - [ - { - "name": "uuid", - "type": "uuid" - }, - { - "name": "network_id", - "type": "varint" - } - ] - ] - }, - "default": "void" - } - ] - } - ] - ] - } - ], - "SkinImage": [ - "container", - [ - { - "name": "width", - "type": "li32" - }, - { - "name": "height", - "type": "li32" - }, - { - "name": "data", - "type": "ByteArray" - } - ] - ], - "Skin": [ - "container", - [ - { - "name": "skin_id", - "type": "string" - }, - { - "name": "play_fab_id", - "type": "string" - }, - { - "name": "skin_resource_pack", - "type": "string" - }, - { - "name": "skin_data", - "type": "SkinImage" - }, - { - "name": "animations", - "type": [ - "array", - { - "countType": "li32", - "type": [ - "container", - [ - { - "name": "skin_image", - "type": "SkinImage" - }, - { - "name": "animation_type", - "type": "li32" - }, - { - "name": "animation_frames", - "type": "lf32" - }, - { - "name": "expression_type", - "type": "lf32" - } - ] - ] - } - ] - }, - { - "name": "cape_data", - "type": "SkinImage" - }, - { - "name": "geometry_data", - "type": "string" - }, - { - "name": "animation_data", - "type": "string" - }, - { - "name": "premium", - "type": "bool" - }, - { - "name": "persona", - "type": "bool" - }, - { - "name": "cape_on_classic", - "type": "bool" - }, - { - "name": "cape_id", - "type": "string" - }, - { - "name": "full_skin_id", - "type": "string" - }, - { - "name": "arm_size", - "type": "string" - }, - { - "name": "skin_color", - "type": "string" - }, - { - "name": "personal_pieces", - "type": [ - "array", - { - "countType": "li32", - "type": [ - "container", - [ - { - "name": "piece_id", - "type": "string" - }, - { - "name": "piece_type", - "type": "string" - }, - { - "name": "pack_id", - "type": "string" - }, - { - "name": "is_default_piece", - "type": "bool" - }, - { - "name": "product_id", - "type": "string" - } - ] - ] - } - ] - }, - { - "name": "piece_tint_colors", - "type": [ - "array", - { - "countType": "li32", - "type": [ - "container", - [ - { - "name": "piece_type", - "type": "string" - }, - { - "name": "colors", - "type": [ - "array", - { - "countType": "li32", - "type": "string" - } - ] - } - ] - ] - } - ] - } - ] - ], - "PlayerRecords": [ - "container", - [ - { - "name": "type", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "0": "add", - "1": "remove" - } - } - ] - }, - { - "name": "records_count", - "type": "varint" - }, - { - "name": "records", - "type": [ - "array", - { - "count": "records_count", - "type": [ - "switch", - { - "compareTo": "type", - "fields": { - "add": [ - "container", - [ - { - "name": "uuid", - "type": "uuid" - }, - { - "name": "entity_unique_id", - "type": "zigzag64" - }, - { - "name": "username", - "type": "string" - }, - { - "name": "xbox_user_id", - "type": "string" - }, - { - "name": "platform_chat_id", - "type": "string" - }, - { - "name": "build_platform", - "type": "li32" - }, - { - "name": "skin_data", - "type": "Skin" - }, - { - "name": "is_teacher", - "type": "bool" - }, - { - "name": "is_host", - "type": "bool" - } - ] - ], - "remove": [ - "container", - [ - { - "name": "uuid", - "type": "uuid" - } - ] - ] - }, - "default": "void" - } - ] - } - ] - }, - { - "name": "verified", - "type": [ - "switch", - { - "compareTo": "type", - "fields": { - "add": [ - "array", - { - "count": "records_count", - "type": "bool" - } - ] - }, - "default": "void" - } - ] - } - ] - ], - "Enchant": [ - "container", - [ - { - "name": "id", - "type": "u8" - }, - { - "name": "level", - "type": "u8" - } - ] - ], - "EnchantOption": [ - "container", - [ - { - "name": "cost", - "type": "varint" - }, - { - "name": "slot_flags", - "type": "li32" - }, - { - "name": "equip_enchants", - "type": [ - "array", - { - "countType": "varint", - "type": "Enchant" - } - ] - }, - { - "name": "held_enchants", - "type": [ - "array", - { - "countType": "varint", - "type": "Enchant" - } - ] - }, - { - "name": "self_enchants", - "type": [ - "array", - { - "countType": "varint", - "type": "Enchant" - } - ] - }, - { - "name": "name", - "type": "string" - }, - { - "name": "option_id", - "type": "zigzag32" - } - ] - ], - "Action": [ - "mapper", - { - "type": "zigzag32", - "mappings": { - "0": "start_break", - "1": "abort_break", - "2": "stop_break", - "3": "get_updated_block", - "4": "drop_item", - "5": "start_sleeping", - "6": "stop_sleeping", - "7": "respawn", - "8": "jump", - "9": "start_sprint", - "10": "stop_sprint", - "11": "start_sneak", - "12": "stop_sneak", - "13": "creative_player_destroy_block", - "14": "dimension_change_ack", - "15": "start_glide", - "16": "stop_glide", - "17": "build_denied", - "18": "crack_break", - "19": "change_skin", - "20": "set_enchatnment_seed", - "21": "swimming", - "22": "stop_swimming", - "23": "start_spin_attack", - "24": "stop_spin_attack", - "25": "interact_block", - "26": "predict_break", - "27": "continue_break" - } - } - ], - "StackRequestSlotInfo": [ - "container", - [ - { - "name": "slot_type", - "type": "ContainerSlotType" - }, - { - "name": "slot", - "type": "u8" - }, - { - "name": "stack_id", - "type": "zigzag32" - } - ] - ], - "ItemStackRequest": [ - "container", - [ - { - "name": "request_id", - "type": "varint" - }, - { - "name": "actions", - "type": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "type_id", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "0": "take", - "1": "place", - "2": "swap", - "3": "drop", - "4": "destroy", - "5": "consume", - "6": "create", - "7": "lab_table_combine", - "8": "beacon_payment", - "9": "mine_block", - "10": "craft_recipe", - "11": "craft_recipe_auto", - "12": "craft_creative", - "13": "optional", - "14": "non_implemented", - "15": "results_deprecated" - } - } - ] - }, - { - "anon": true, - "type": [ - "switch", - { - "compareTo": "type_id", - "fields": { - "take": [ - "container", - [ - { - "name": "count", - "type": "u8" - }, - { - "name": "source", - "type": "StackRequestSlotInfo" - }, - { - "name": "destination", - "type": "StackRequestSlotInfo" - } - ] - ], - "place": [ - "container", - [ - { - "name": "count", - "type": "u8" - }, - { - "name": "source", - "type": "StackRequestSlotInfo" - }, - { - "name": "destination", - "type": "StackRequestSlotInfo" - } - ] - ], - "swap": [ - "container", - [ - { - "name": "source", - "type": "StackRequestSlotInfo" - }, - { - "name": "destination", - "type": "StackRequestSlotInfo" - } - ] - ], - "drop": [ - "container", - [ - { - "name": "count", - "type": "u8" - }, - { - "name": "source", - "type": "StackRequestSlotInfo" - }, - { - "name": "randomly", - "type": "bool" - } - ] - ], - "destroy": [ - "container", - [ - { - "name": "count", - "type": "u8" - }, - { - "name": "source", - "type": "StackRequestSlotInfo" - } - ] - ], - "consume": [ - "container", - [ - { - "name": "count", - "type": "u8" - }, - { - "name": "source", - "type": "StackRequestSlotInfo" - } - ] - ], - "create": [ - "container", - [ - { - "name": "result_slot_id", - "type": "u8" - } - ] - ], - "beacon_payment": [ - "container", - [ - { - "name": "primary_effect", - "type": "zigzag32" - }, - { - "name": "secondary_effect", - "type": "zigzag32" - } - ] - ], - "mine_block": [ - "container", - [ - { - "name": "unknown1", - "type": "zigzag32" - }, - { - "name": "predicted_durability", - "type": "zigzag32" - }, - { - "name": "network_id", - "type": "zigzag32" - } - ] - ], - "craft_recipe": [ - "container", - [ - { - "name": "recipe_network_id", - "type": "varint" - } - ] - ], - "craft_recipe_auto": [ - "container", - [ - { - "name": "recipe_network_id", - "type": "varint" - } - ] - ], - "craft_creative": [ - "container", - [ - { - "name": "item_id", - "type": "varint" - } - ] - ], - "optional": [ - "container", - [ - { - "name": "recipe_network_id", - "type": "varint" - }, - { - "name": "filtered_string_index", - "type": "li32" - } - ] - ], - "non_implemented": "void", - "results_deprecated": [ - "container", - [ - { - "name": "result_items", - "type": [ - "array", - { - "countType": "varint", - "type": "ItemLegacy" - } - ] - }, - { - "name": "times_crafted", - "type": "u8" - } - ] - ] - }, - "default": "void" - } - ] - } - ] - ] - } - ] - }, - { - "name": "custom_names", - "type": [ - "array", - { - "countType": "varint", - "type": "string" - } - ] - } - ] - ], - "ItemStackResponses": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "status", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "0": "ok", - "1": "error" - } - } - ] - }, - { - "name": "request_id", - "type": "varint" - }, - { - "anon": true, - "type": [ - "switch", - { - "compareTo": "status", - "fields": { - "ok": [ - "container", - [ - { - "name": "containers", - "type": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "slot_type", - "type": "ContainerSlotType" - }, - { - "name": "slots", - "type": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "slot", - "type": "u8" - }, - { - "name": "hotbar_slot", - "type": "u8" - }, - { - "name": "count", - "type": "u8" - }, - { - "name": "item_stack_id", - "type": "varint" - }, - { - "name": "custom_name", - "type": "string" - }, - { - "name": "durability_correction", - "type": "zigzag32" - } - ] - ] - } - ] - } - ] - ] - } - ] - } - ] - ] - }, - "default": "void" - } - ] - } - ] - ] - } - ], - "ItemComponentList": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "nbt", - "type": "nbt" - } - ] - ] - } - ], - "CommandOrigin": [ - "container", - [ - { - "name": "type", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "0": "player", - "1": "block", - "2": "minecart_block", - "3": "dev_console", - "4": "test", - "5": "automation_player", - "6": "client_automation", - "7": "dedicated_server", - "8": "entity", - "9": "virtual", - "10": "game_argument", - "11": "entity_server", - "12": "precompiled", - "13": "game_director_entity_server", - "14": "script" - } - } - ] - }, - { - "name": "uuid", - "type": "uuid" - }, - { - "name": "request_id", - "type": "string" - }, - { - "name": "player_entity_id", - "type": [ - "switch", - { - "compareTo": "type", - "fields": { - "dev_console": [ - "container", - [ - { - "name": "player_entity_id", - "type": "zigzag64" - } - ] - ], - "test": [ - "container", - [ - { - "name": "player_entity_id", - "type": "zigzag64" - } - ] - ] - }, - "default": "void" - } - ] - } - ] - ], - "TrackedObject": [ - "container", - [ - { - "name": "type", - "type": [ - "mapper", - { - "type": "li32", - "mappings": { - "0": "entity", - "1": "block" - } - } - ] - }, - { - "name": "entity_unique_id", - "type": [ - "switch", - { - "compareTo": "type", - "fields": { - "entity": "zigzag64" - }, - "default": "void" - } - ] - }, - { - "name": "block_position", - "type": [ - "switch", - { - "compareTo": "type", - "fields": { - "block": "BlockCoordinates" - }, - "default": "void" - } - ] - } - ] - ], - "MapDecoration": [ - "container", - [ - { - "name": "type", - "type": "u8" - }, - { - "name": "rotation", - "type": "u8" - }, - { - "name": "x", - "type": "u8" - }, - { - "name": "y", - "type": "u8" - }, - { - "name": "label", - "type": "string" - }, - { - "name": "color_abgr", - "type": "varint" - } - ] - ], - "StructureBlockSettings": [ - "container", - [ - { - "name": "palette_name", - "type": "string" - }, - { - "name": "ignore_entities", - "type": "bool" - }, - { - "name": "ignore_blocks", - "type": "bool" - }, - { - "name": "size", - "type": "BlockCoordinates" - }, - { - "name": "structure_offset", - "type": "BlockCoordinates" - }, - { - "name": "last_editing_player_unique_id", - "type": "zigzag64" - }, - { - "name": "rotation", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "0": "none", - "1": "90_deg", - "2": "180_deg", - "3": "270_deg" - } - } - ] - }, - { - "name": "mirror", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "0": "none", - "1": "x_axis", - "2": "z_axis", - "3": "both_axes" - } - } - ] - }, - { - "name": "animation_mode", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "0": "none", - "1": "layers", - "2": "blocks" - } - } - ] - }, - { - "name": "animation_duration", - "type": "lf32" - }, - { - "name": "integrity", - "type": "lf32" - }, - { - "name": "seed", - "type": "lu32" - }, - { - "name": "pivot", - "type": "vec3f" - } - ] - ], - "WindowID": [ - "mapper", - { - "type": "i8", - "mappings": { - "0": "inventory", - "1": "first", - "100": "last", - "119": "offhand", - "120": "armor", - "121": "creative", - "122": "hotbar", - "123": "fixed_inventory", - "124": "ui", - "-100": "drop_contents", - "-24": "beacon", - "-23": "trading_output", - "-22": "trading_use_inputs", - "-21": "trading_input_2", - "-20": "trading_input_1", - "-17": "enchant_output", - "-16": "enchant_material", - "-15": "enchant_input", - "-13": "anvil_output", - "-12": "anvil_result", - "-11": "anvil_material", - "-10": "container_input", - "-5": "crafting_use_ingredient", - "-4": "crafting_result", - "-3": "crafting_remove_ingredient", - "-2": "crafting_add_ingredient", - "-1": "none" - } - } - ], - "WindowIDVarint": [ - "mapper", - { - "type": "varint", - "mappings": { - "0": "inventory", - "1": "first", - "100": "last", - "119": "offhand", - "120": "armor", - "121": "creative", - "122": "hotbar", - "123": "fixed_inventory", - "124": "ui", - "-100": "drop_contents", - "-24": "beacon", - "-23": "trading_output", - "-22": "trading_use_inputs", - "-21": "trading_input_2", - "-20": "trading_input_1", - "-17": "enchant_output", - "-16": "enchant_material", - "-15": "enchant_input", - "-13": "anvil_output", - "-12": "anvil_result", - "-11": "anvil_material", - "-10": "container_input", - "-5": "crafting_use_ingredient", - "-4": "crafting_result", - "-3": "crafting_remove_ingredient", - "-2": "crafting_add_ingredient", - "-1": "none" - } - } - ], - "WindowType": [ - "mapper", - { - "type": "i8", - "mappings": { - "0": "container", - "1": "workbench", - "2": "furnace", - "3": "enchantment", - "4": "brewing_stand", - "5": "anvil", - "6": "dispenser", - "7": "dropper", - "8": "hopper", - "9": "cauldron", - "10": "minecart_chest", - "11": "minecart_hopper", - "12": "horse", - "13": "beacon", - "14": "structure_editor", - "15": "trading", - "16": "command_block", - "17": "jukebox", - "18": "armor", - "19": "hand", - "20": "compound_creator", - "21": "element_constructor", - "22": "material_reducer", - "23": "lab_table", - "24": "loom", - "25": "lectern", - "26": "grindstone", - "27": "blast_furnace", - "28": "smoker", - "29": "stonecutter", - "30": "cartography", - "31": "hud", - "32": "jigsaw_editor", - "33": "smithing_table", - "-9": "none", - "-1": "inventory" - } - } - ], - "ContainerSlotType": [ - "mapper", - { - "type": "u8", - "mappings": { - "0": "anvil_input", - "1": "anvil_material", - "2": "anvil_result", - "3": "smithing_table_input", - "4": "smithing_table_material", - "5": "smithing_table_result", - "6": "armor", - "7": "container", - "8": "beacon_payment", - "9": "brewing_input", - "10": "brewing_result", - "11": "brewing_fuel", - "12": "hotbar_and_inventory", - "13": "crafting_input", - "14": "crafting_output", - "15": "recipe_construction", - "16": "recipe_nature", - "17": "recipe_items", - "18": "recipe_search", - "19": "recipe_search_bar", - "20": "recipe_equipment", - "21": "enchanting_input", - "22": "enchanting_lapis", - "23": "furnace_fuel", - "24": "furnace_ingredient", - "25": "furnace_output", - "26": "horse_equip", - "27": "hotbar", - "28": "inventory", - "29": "shulker", - "30": "trade_ingredient1", - "31": "trade_ingredient2", - "32": "trade_result", - "33": "offhand", - "34": "compcreate_input", - "35": "compcreate_output", - "36": "elemconstruct_output", - "37": "matreduce_input", - "38": "matreduce_output", - "39": "labtable_input", - "40": "loom_input", - "41": "loom_dye", - "42": "loom_material", - "43": "loom_result", - "44": "blast_furnace_ingredient", - "45": "smoker_ingredient", - "46": "trade2_ingredient1", - "47": "trade2_ingredient2", - "48": "trade2_result", - "49": "grindstone_input", - "50": "grindstone_additional", - "51": "grindstone_result", - "52": "stonecutter_input", - "53": "stonecutter_result", - "54": "cartography_input", - "55": "cartography_additional", - "56": "cartography_result", - "57": "barrel", - "58": "cursor", - "59": "creative_output" - } - } - ], - "SoundType": [ - "mapper", - { - "type": "varint", - "mappings": { - "0": "ItemUseOn", - "1": "Hit", - "2": "Step", - "3": "Fly", - "4": "Jump", - "5": "Break", - "6": "Place", - "7": "HeavyStep", - "8": "Gallop", - "9": "Fall", - "10": "Ambient", - "11": "AmbientBaby", - "12": "AmbientInWater", - "13": "Breathe", - "14": "Death", - "15": "DeathInWater", - "16": "DeathToZombie", - "17": "Hurt", - "18": "HurtInWater", - "19": "Mad", - "20": "Boost", - "21": "Bow", - "22": "SquishBig", - "23": "SquishSmall", - "24": "FallBig", - "25": "FallSmall", - "26": "Splash", - "27": "Fizz", - "28": "Flap", - "29": "Swim", - "30": "Drink", - "31": "Eat", - "32": "Takeoff", - "33": "Shake", - "34": "Plop", - "35": "Land", - "36": "Saddle", - "37": "Armor", - "38": "MobArmorStandPlace", - "39": "AddChest", - "40": "Throw", - "41": "Attack", - "42": "AttackNoDamage", - "43": "AttackStrong", - "44": "Warn", - "45": "Shear", - "46": "Milk", - "47": "Thunder", - "48": "Explode", - "49": "Fire", - "50": "Ignite", - "51": "Fuse", - "52": "Stare", - "53": "Spawn", - "54": "Shoot", - "55": "BreakBlock", - "56": "Launch", - "57": "Blast", - "58": "LargeBlast", - "59": "Twinkle", - "60": "Remedy", - "61": "Infect", - "62": "LevelUp", - "63": "BowHit", - "64": "BulletHit", - "65": "ExtinguishFire", - "66": "ItemFizz", - "67": "ChestOpen", - "68": "ChestClosed", - "69": "ShulkerBoxOpen", - "70": "ShulkerBoxClosed", - "71": "EnderChestOpen", - "72": "EnderChestClosed", - "73": "PowerOn", - "74": "PowerOff", - "75": "Attach", - "76": "Detach", - "77": "Deny", - "78": "Tripod", - "79": "Pop", - "80": "DropSlot", - "81": "Note", - "82": "Thorns", - "83": "PistonIn", - "84": "PistonOut", - "85": "Portal", - "86": "Water", - "87": "LavaPop", - "88": "Lava", - "89": "Burp", - "90": "BucketFillWater", - "91": "BucketFillLava", - "92": "BucketEmptyWater", - "93": "BucketEmptyLava", - "94": "ArmorEquipChain", - "95": "ArmorEquipDiamond", - "96": "ArmorEquipGeneric", - "97": "ArmorEquipGold", - "98": "ArmorEquipIron", - "99": "ArmorEquipLeather", - "100": "ArmorEquipElytra", - "101": "Record13", - "102": "RecordCat", - "103": "RecordBlocks", - "104": "RecordChirp", - "105": "RecordFar", - "106": "RecordMall", - "107": "RecordMellohi", - "108": "RecordStal", - "109": "RecordStrad", - "110": "RecordWard", - "111": "Record11", - "112": "RecordWait", - "113": "unknown1", - "114": "Flop", - "115": "ElderGuardianCurse", - "116": "MobWarning", - "117": "MobWarningBaby", - "118": "Teleport", - "119": "ShulkerOpen", - "120": "ShulkerClose", - "121": "Haggle", - "122": "HaggleYes", - "123": "HaggleNo", - "124": "HaggleIdle", - "125": "ChorusGrow", - "126": "ChorusDeath", - "127": "Glass", - "128": "PotionBrewed", - "129": "CastSpell", - "130": "PrepareAttack", - "131": "PrepareSummon", - "132": "PrepareWololo", - "133": "Fang", - "134": "Charge", - "135": "CameraTakePicture", - "136": "LeashKnotPlace", - "137": "LeashKnotBreak", - "138": "Growl", - "139": "Whine", - "140": "Pant", - "141": "Purr", - "142": "Purreow", - "143": "DeathMinVolume", - "144": "DeathMidVolume", - "145": "unknown2", - "146": "ImitateCaveSpider", - "147": "ImitateCreeper", - "148": "ImitateElderGuardian", - "149": "ImitateEnderDragon", - "150": "ImitateEnderman", - "151": "unknown3", - "152": "ImitateEvocationIllager", - "153": "ImitateGhast", - "154": "ImitateHusk", - "155": "ImitateIllusionIllager", - "156": "ImitateMagmaCube", - "157": "ImitatePolarBear", - "158": "ImitateShulker", - "159": "ImitateSilverfish", - "160": "ImitateSkeleton", - "161": "ImitateSlime", - "162": "ImitateSpider", - "163": "ImitateStray", - "164": "ImitateVex", - "165": "ImitateVindicationIllager", - "166": "ImitateWitch", - "167": "ImitateWither", - "168": "ImitateWitherSkeleton", - "169": "ImitateWolf", - "170": "ImitateZombie", - "171": "ImitateZombiePigman", - "172": "ImitateZombieVillager", - "173": "BlockEndPortalFrameFill", - "174": "BlockEndPortalSpawn", - "175": "RandomAnvilUse", - "176": "BottleDragonBreath", - "177": "PortalTravel", - "178": "ItemTridentHit", - "179": "ItemTridentReturn", - "180": "ItemTridentRiptide1", - "181": "ItemTridentRiptide2", - "182": "ItemTridentRiptide3", - "183": "ItemTridentThrow", - "184": "ItemTridentThunder", - "185": "ItemTridentHitGround", - "186": "Default", - "187": "BlockFletchingTableUse", - "188": "ElemConstructOpen", - "189": "IceBombHit", - "190": "BalloonPop", - "191": "LtReactionIceBomb", - "192": "LtReactionBleach", - "193": "LtReactionEPaste", - "194": "LtReactionEPaste2", - "195": "LtReactionFertilizer", - "196": "LtReactionFireball", - "197": "LtReactionMgsalt", - "198": "LtReactionMiscfire", - "199": "LtReactionFire", - "200": "LtReactionMiscexplosion", - "201": "LtReactionMiscmystical", - "202": "LtReactionMiscmystical2", - "203": "LtReactionProduct", - "204": "SparklerUse", - "205": "GlowstickUse", - "206": "SparklerActive", - "207": "ConvertToDrowned", - "208": "BucketFillFish", - "209": "BucketEmptyFish", - "210": "BubbleUp", - "211": "BubbleDown", - "212": "BubblePop", - "213": "BubbleUpInside", - "214": "BubbleDownInside", - "215": "HurtBaby", - "216": "DeathBaby", - "217": "StepBaby", - "218": "BabySpawn", - "219": "Born", - "220": "BlockTurtleEggBreak", - "221": "BlockTurtleEggCrack", - "222": "BlockTurtleEggHatch", - "223": "TurtleLayEgg", - "224": "BlockTurtleEggAttack", - "225": "BeaconActivate", - "226": "BeaconAmbient", - "227": "BeaconDeactivate", - "228": "BeaconPower", - "229": "ConduitActivate", - "230": "ConduitAmbient", - "231": "ConduitAttack", - "232": "ConduitDeactivate", - "233": "ConduitShort", - "234": "Swoop", - "235": "BlockBambooSaplingPlace", - "236": "PreSneeze", - "237": "Sneeze", - "238": "AmbientTame", - "239": "Scared", - "240": "BlockScaffoldingClimb", - "241": "CrossbowLoadingStart", - "242": "CrossbowLoadingMiddle", - "243": "CrossbowLoadingEnd", - "244": "CrossbowShoot", - "245": "CrossbowQuickChargeStart", - "246": "CrossbowQuickChargeMiddle", - "247": "CrossbowQuickChargeEnd", - "248": "AmbientAggressive", - "249": "AmbientWorried", - "250": "CantBreed", - "251": "ItemShieldBlock", - "252": "ItemBookPut", - "253": "BlockGrindstoneUse", - "254": "BlockBellHit", - "255": "BlockCampfireCrackle", - "256": "Roar", - "257": "Stun", - "258": "BlockSweetBerryBushHurt", - "259": "BlockSweetBerryBushPick", - "260": "UICartographyTableTakeResult", - "261": "UIStoneCutterTakeResult", - "262": "BlockComposterEmpty", - "263": "BlockComposterFill", - "264": "BlockComposterFillSuccess", - "265": "BlockComposterReady", - "266": "BlockBarrelOpen", - "267": "BlockBarrelClose", - "268": "RaidHorn", - "269": "BlockLoomUse", - "270": "AmbientRaid", - "271": "UICartographyTableUse", - "272": "UIStoneCutterUse", - "273": "UILoomUse", - "274": "SmokerUse", - "275": "BlastFurnaceUse", - "276": "SmithingTableUse", - "277": "Screech", - "278": "Sleep", - "279": "FurnaceUse", - "280": "MooshroomConvert", - "281": "MilkSuspiciously", - "282": "Celebrate", - "283": "JumpPrevent", - "284": "AmbientPollinate", - "285": "BeeHiveDrip", - "286": "BeeHiveEnter", - "287": "BeeHiveExit", - "288": "BeeHiveWork", - "289": "BeeHiveShear", - "290": "HoneyBottleDrink", - "291": "AmbientCave", - "292": "Retreat", - "293": "ConvertToZombified", - "294": "Admire", - "295": "StepLava", - "296": "Tempt", - "297": "Panic", - "298": "Angry", - "299": "AmbientWarpedForest", - "300": "AmbientSoulsandValley", - "301": "AmbientNetherWastes", - "302": "AmbientBasaltDeltas", - "303": "AmbientCrimsonForest", - "304": "RespawnAnchorCharge", - "305": "RespawnAnchorDeplete", - "306": "RespawnAnchorSetSpawn", - "307": "RespawnAnchorAmbient", - "308": "SoulEscapeQuiet", - "309": "SoulEscapeLoud", - "310": "RecordPigstep", - "311": "LinkCompassToLodestone", - "312": "BlockSmithingTableUse", - "313": "EquipNetherite", - "314": "AmbientLoopWarpedForest", - "315": "AmbientLoopSoulsandValley", - "316": "AmbientLoopNetherWastes", - "317": "AmbientLoopBasaltDeltas", - "318": "AmbientLoopCrimsonForest", - "319": "AmbientAdditionWarpedForest", - "320": "AmbientAdditionSoulsandValley", - "321": "AmbientAdditionNetherWastes", - "322": "AmbientAdditionBasaltDeltas", - "323": "AmbientAdditionCrimsonForest", - "324": "SculkSensorPowerOn", - "325": "SculkSensorPowerOff", - "326": "BucketFillPowderSnow", - "327": "BucketEmptyPowderSnow", - "328": "PointedDripstoneCauldronDripWater", - "329": "PointedDripstoneCauldronDripLava", - "330": "PointedDripstoneDripWater", - "331": "PointedDripstoneDripLava", - "332": "CaveVinesPickBerries", - "333": "BigDripleafTiltDown", - "334": "BigDripleafTiltUp", - "335": "unknown335", - "336": "unknown336", - "337": "unknown337", - "338": "unknown338", - "339": "copper_wax_on", - "340": "copper_wax_off", - "341": "scrape", - "342": "player_hurt_drown", - "343": "player_hurt_on_fire", - "344": "player_hurt_freeze", - "345": "use_spyglass", - "346": "stop_using_spyglass", - "347": "amethyst_block_chime", - "348": "ambient_screamer", - "349": "hurt_screamer", - "350": "death_screamer", - "351": "milk_screamer", - "352": "jump_to_block", - "353": "pre_ram", - "354": "pre_ram_screamer", - "355": "ram_impact", - "356": "ram_impact_screamer", - "357": "squid_ink_squirt", - "358": "glow_squid_ink_squirt", - "359": "convert_to_stray", - "360": "Undefined" - } - } - ], - "LegacyEntityType": [ - "mapper", - { - "type": "li32", - "mappings": { - "10": "chicken", - "11": "cow", - "12": "pig", - "13": "sheep", - "14": "wolf", - "15": "villager", - "16": "mooshroom", - "17": "squid", - "18": "rabbit", - "19": "bat", - "20": "iron_golem", - "21": "snow_golem", - "22": "ocelot", - "23": "horse", - "24": "donkey", - "25": "mule", - "26": "skeleton_horse", - "27": "zombie_horse", - "28": "polar_bear", - "29": "llama", - "30": "parrot", - "31": "dolphin", - "32": "zombie", - "33": "creeper", - "34": "skeleton", - "35": "spider", - "36": "zombie_pigman", - "37": "slime", - "38": "enderman", - "39": "silverfish", - "40": "cave_spider", - "41": "ghast", - "42": "magma_cube", - "43": "blaze", - "44": "zombie_villager", - "45": "witch", - "46": "stray", - "47": "husk", - "48": "wither_skeleton", - "49": "guardian", - "50": "elder_guardian", - "51": "npc", - "52": "wither", - "53": "ender_dragon", - "54": "shulker", - "55": "endermite", - "56": "agent", - "57": "vindicator", - "58": "phantom", - "61": "armor_stand", - "62": "tripod_camera", - "63": "player", - "64": "item", - "65": "tnt", - "66": "falling_block", - "67": "moving_block", - "68": "xp_bottle", - "69": "xp_orb", - "70": "eye_of_ender_signal", - "71": "ender_crystal", - "72": "fireworks_rocket", - "73": "thrown_trident", - "74": "turtle", - "75": "cat", - "76": "shulker_bullet", - "77": "fishing_hook", - "78": "chalkboard", - "79": "dragon_fireball", - "80": "arrow", - "81": "snowball", - "82": "egg", - "83": "painting", - "84": "minecart", - "85": "fireball", - "86": "splash_potion", - "87": "ender_pearl", - "88": "leash_knot", - "89": "wither_skull", - "90": "boat", - "91": "wither_skull_dangerous", - "93": "lightning_bolt", - "94": "small_fireball", - "95": "area_effect_cloud", - "96": "hopper_minecart", - "97": "tnt_minecart", - "98": "chest_minecart", - "100": "command_block_minecart", - "101": "lingering_potion", - "102": "llama_spit", - "103": "evocation_fang", - "104": "evocation_illager", - "105": "vex", - "106": "ice_bomb", - "107": "balloon", - "108": "pufferfish", - "109": "salmon", - "110": "drowned", - "111": "tropicalfish", - "112": "cod", - "113": "panda" - } - } - ], - "mcpe_packet": [ - "container", - [ - { - "name": "name", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "1": "login", - "2": "play_status", - "3": "server_to_client_handshake", - "4": "client_to_server_handshake", - "5": "disconnect", - "6": "resource_packs_info", - "7": "resource_pack_stack", - "8": "resource_pack_client_response", - "9": "text", - "10": "set_time", - "11": "start_game", - "12": "add_player", - "13": "add_entity", - "14": "remove_entity", - "15": "add_item_entity", - "17": "take_item_entity", - "18": "move_entity", - "19": "move_player", - "20": "rider_jump", - "21": "update_block", - "22": "add_painting", - "23": "tick_sync", - "24": "level_sound_event_old", - "25": "level_event", - "26": "block_event", - "27": "entity_event", - "28": "mob_effect", - "29": "update_attributes", - "30": "inventory_transaction", - "31": "mob_equipment", - "32": "mob_armor_equipment", - "33": "interact", - "34": "block_pick_request", - "35": "entity_pick_request", - "36": "player_action", - "38": "hurt_armor", - "39": "set_entity_data", - "40": "set_entity_motion", - "41": "set_entity_link", - "42": "set_health", - "43": "set_spawn_position", - "44": "animate", - "45": "respawn", - "46": "container_open", - "47": "container_close", - "48": "player_hotbar", - "49": "inventory_content", - "50": "inventory_slot", - "51": "container_set_data", - "52": "crafting_data", - "53": "crafting_event", - "54": "gui_data_pick_item", - "55": "adventure_settings", - "56": "block_entity_data", - "57": "player_input", - "58": "level_chunk", - "59": "set_commands_enabled", - "60": "set_difficulty", - "61": "change_dimension", - "62": "set_player_game_type", - "63": "player_list", - "64": "simple_event", - "65": "event", - "66": "spawn_experience_orb", - "67": "clientbound_map_item_data", - "68": "map_info_request", - "69": "request_chunk_radius", - "70": "chunk_radius_update", - "71": "item_frame_drop_item", - "72": "game_rules_changed", - "73": "camera", - "74": "boss_event", - "75": "show_credits", - "76": "available_commands", - "77": "command_request", - "78": "command_block_update", - "79": "command_output", - "80": "update_trade", - "81": "update_equipment", - "82": "resource_pack_data_info", - "83": "resource_pack_chunk_data", - "84": "resource_pack_chunk_request", - "85": "transfer", - "86": "play_sound", - "87": "stop_sound", - "88": "set_title", - "89": "add_behavior_tree", - "90": "structure_block_update", - "91": "show_store_offer", - "92": "purchase_receipt", - "93": "player_skin", - "94": "sub_client_login", - "95": "initiate_web_socket_connection", - "96": "set_last_hurt_by", - "97": "book_edit", - "98": "npc_request", - "99": "photo_transfer", - "100": "modal_form_request", - "101": "modal_form_response", - "102": "server_settings_request", - "103": "server_settings_response", - "104": "show_profile", - "105": "set_default_game_type", - "106": "remove_objective", - "107": "set_display_objective", - "108": "set_score", - "109": "lab_table", - "110": "update_block_synced", - "111": "move_entity_delta", - "112": "set_scoreboard_identity", - "113": "set_local_player_as_initialized", - "114": "update_soft_enum", - "115": "network_stack_latency", - "117": "script_custom_event", - "118": "spawn_particle_effect", - "119": "available_entity_identifiers", - "120": "level_sound_event_v2", - "121": "network_chunk_publisher_update", - "122": "biome_definition_list", - "123": "level_sound_event", - "124": "level_event_generic", - "125": "lectern_update", - "126": "video_stream_connect", - "127": "add_ecs_entity", - "128": "remove_ecs_entity", - "129": "client_cache_status", - "130": "on_screen_texture_animation", - "131": "map_create_locked_copy", - "132": "structure_template_data_export_request", - "133": "structure_template_data_export_response", - "134": "update_block_properties", - "135": "client_cache_blob_status", - "136": "client_cache_miss_response", - "137": "education_settings", - "139": "multiplayer_settings", - "140": "settings_command", - "141": "anvil_damage", - "142": "completed_using_item", - "143": "network_settings", - "144": "player_auth_input", - "145": "creative_content", - "146": "player_enchant_options", - "147": "item_stack_request", - "148": "item_stack_response", - "149": "player_armor_damage", - "151": "update_player_game_type", - "153": "position_tracking_db_broadcast", - "154": "position_tracking_db_request", - "156": "packet_violation_warning", - "157": "motion_prediction_hints", - "158": "animate_entity", - "159": "camera_shake", - "160": "player_fog", - "161": "correct_player_move_prediction", - "162": "item_component", - "163": "filter_text_packet", - "164": "debug_renderer", - "165": "sync_entity_property", - "166": "add_volume_entity", - "167": "remove_volume_entity" - } - } - ] - }, - { - "name": "params", - "type": [ - "switch", - { - "compareTo": "name", - "fields": { - "login": "packet_login", - "play_status": "packet_play_status", - "server_to_client_handshake": "packet_server_to_client_handshake", - "client_to_server_handshake": "packet_client_to_server_handshake", - "disconnect": "packet_disconnect", - "resource_packs_info": "packet_resource_packs_info", - "resource_pack_stack": "packet_resource_pack_stack", - "resource_pack_client_response": "packet_resource_pack_client_response", - "text": "packet_text", - "set_time": "packet_set_time", - "start_game": "packet_start_game", - "add_player": "packet_add_player", - "add_entity": "packet_add_entity", - "remove_entity": "packet_remove_entity", - "add_item_entity": "packet_add_item_entity", - "take_item_entity": "packet_take_item_entity", - "move_entity": "packet_move_entity", - "move_player": "packet_move_player", - "rider_jump": "packet_rider_jump", - "update_block": "packet_update_block", - "add_painting": "packet_add_painting", - "tick_sync": "packet_tick_sync", - "level_sound_event_old": "packet_level_sound_event_old", - "level_event": "packet_level_event", - "block_event": "packet_block_event", - "entity_event": "packet_entity_event", - "mob_effect": "packet_mob_effect", - "update_attributes": "packet_update_attributes", - "inventory_transaction": "packet_inventory_transaction", - "mob_equipment": "packet_mob_equipment", - "mob_armor_equipment": "packet_mob_armor_equipment", - "interact": "packet_interact", - "block_pick_request": "packet_block_pick_request", - "entity_pick_request": "packet_entity_pick_request", - "player_action": "packet_player_action", - "hurt_armor": "packet_hurt_armor", - "set_entity_data": "packet_set_entity_data", - "set_entity_motion": "packet_set_entity_motion", - "set_entity_link": "packet_set_entity_link", - "set_health": "packet_set_health", - "set_spawn_position": "packet_set_spawn_position", - "animate": "packet_animate", - "respawn": "packet_respawn", - "container_open": "packet_container_open", - "container_close": "packet_container_close", - "player_hotbar": "packet_player_hotbar", - "inventory_content": "packet_inventory_content", - "inventory_slot": "packet_inventory_slot", - "container_set_data": "packet_container_set_data", - "crafting_data": "packet_crafting_data", - "crafting_event": "packet_crafting_event", - "gui_data_pick_item": "packet_gui_data_pick_item", - "adventure_settings": "packet_adventure_settings", - "block_entity_data": "packet_block_entity_data", - "player_input": "packet_player_input", - "level_chunk": "packet_level_chunk", - "set_commands_enabled": "packet_set_commands_enabled", - "set_difficulty": "packet_set_difficulty", - "change_dimension": "packet_change_dimension", - "set_player_game_type": "packet_set_player_game_type", - "player_list": "packet_player_list", - "simple_event": "packet_simple_event", - "event": "packet_event", - "spawn_experience_orb": "packet_spawn_experience_orb", - "clientbound_map_item_data": "packet_clientbound_map_item_data", - "map_info_request": "packet_map_info_request", - "request_chunk_radius": "packet_request_chunk_radius", - "chunk_radius_update": "packet_chunk_radius_update", - "item_frame_drop_item": "packet_item_frame_drop_item", - "game_rules_changed": "packet_game_rules_changed", - "camera": "packet_camera", - "boss_event": "packet_boss_event", - "show_credits": "packet_show_credits", - "available_commands": "packet_available_commands", - "command_request": "packet_command_request", - "command_block_update": "packet_command_block_update", - "command_output": "packet_command_output", - "update_trade": "packet_update_trade", - "update_equipment": "packet_update_equipment", - "resource_pack_data_info": "packet_resource_pack_data_info", - "resource_pack_chunk_data": "packet_resource_pack_chunk_data", - "resource_pack_chunk_request": "packet_resource_pack_chunk_request", - "transfer": "packet_transfer", - "play_sound": "packet_play_sound", - "stop_sound": "packet_stop_sound", - "set_title": "packet_set_title", - "add_behavior_tree": "packet_add_behavior_tree", - "structure_block_update": "packet_structure_block_update", - "show_store_offer": "packet_show_store_offer", - "purchase_receipt": "packet_purchase_receipt", - "player_skin": "packet_player_skin", - "sub_client_login": "packet_sub_client_login", - "initiate_web_socket_connection": "packet_initiate_web_socket_connection", - "set_last_hurt_by": "packet_set_last_hurt_by", - "book_edit": "packet_book_edit", - "npc_request": "packet_npc_request", - "photo_transfer": "packet_photo_transfer", - "modal_form_request": "packet_modal_form_request", - "modal_form_response": "packet_modal_form_response", - "server_settings_request": "packet_server_settings_request", - "server_settings_response": "packet_server_settings_response", - "show_profile": "packet_show_profile", - "set_default_game_type": "packet_set_default_game_type", - "remove_objective": "packet_remove_objective", - "set_display_objective": "packet_set_display_objective", - "set_score": "packet_set_score", - "lab_table": "packet_lab_table", - "update_block_synced": "packet_update_block_synced", - "move_entity_delta": "packet_move_entity_delta", - "set_scoreboard_identity": "packet_set_scoreboard_identity", - "set_local_player_as_initialized": "packet_set_local_player_as_initialized", - "update_soft_enum": "packet_update_soft_enum", - "network_stack_latency": "packet_network_stack_latency", - "script_custom_event": "packet_script_custom_event", - "spawn_particle_effect": "packet_spawn_particle_effect", - "available_entity_identifiers": "packet_available_entity_identifiers", - "level_sound_event_v2": "packet_level_sound_event_v2", - "network_chunk_publisher_update": "packet_network_chunk_publisher_update", - "biome_definition_list": "packet_biome_definition_list", - "level_sound_event": "packet_level_sound_event", - "level_event_generic": "packet_level_event_generic", - "lectern_update": "packet_lectern_update", - "video_stream_connect": "packet_video_stream_connect", - "add_ecs_entity": "packet_add_ecs_entity", - "remove_ecs_entity": "packet_remove_ecs_entity", - "client_cache_status": "packet_client_cache_status", - "on_screen_texture_animation": "packet_on_screen_texture_animation", - "map_create_locked_copy": "packet_map_create_locked_copy", - "structure_template_data_export_request": "packet_structure_template_data_export_request", - "structure_template_data_export_response": "packet_structure_template_data_export_response", - "update_block_properties": "packet_update_block_properties", - "client_cache_blob_status": "packet_client_cache_blob_status", - "client_cache_miss_response": "packet_client_cache_miss_response", - "education_settings": "packet_education_settings", - "multiplayer_settings": "packet_multiplayer_settings", - "settings_command": "packet_settings_command", - "anvil_damage": "packet_anvil_damage", - "completed_using_item": "packet_completed_using_item", - "network_settings": "packet_network_settings", - "player_auth_input": "packet_player_auth_input", - "creative_content": "packet_creative_content", - "player_enchant_options": "packet_player_enchant_options", - "item_stack_request": "packet_item_stack_request", - "item_stack_response": "packet_item_stack_response", - "player_armor_damage": "packet_player_armor_damage", - "update_player_game_type": "packet_update_player_game_type", - "position_tracking_db_request": "packet_position_tracking_db_request", - "position_tracking_db_broadcast": "packet_position_tracking_db_broadcast", - "packet_violation_warning": "packet_packet_violation_warning", - "motion_prediction_hints": "packet_motion_prediction_hints", - "animate_entity": "packet_animate_entity", - "camera_shake": "packet_camera_shake", - "player_fog": "packet_player_fog", - "correct_player_move_prediction": "packet_correct_player_move_prediction", - "item_component": "packet_item_component", - "filter_text_packet": "packet_filter_text_packet", - "debug_renderer": "packet_debug_renderer", - "sync_entity_property": "packet_sync_entity_property", - "add_volume_entity": "packet_add_volume_entity", - "remove_volume_entity": "packet_remove_volume_entity" - }, - "default": "void" - } - ] - } - ] - ], - "packet_login": [ - "container", - [ - { - "name": "protocol_version", - "type": "i32" - }, - { - "name": "tokens", - "type": [ - "encapsulated", - { - "lengthType": "varint", - "type": "LoginTokens" - } - ] - } - ] - ], - "LoginTokens": [ - "container", - [ - { - "name": "identity", - "type": "LittleString" - }, - { - "name": "client", - "type": "LittleString" - } - ] - ], - "packet_play_status": [ - "container", - [ - { - "name": "status", - "type": [ - "mapper", - { - "type": "i32", - "mappings": { - "0": "login_success", - "1": "failed_client", - "2": "failed_spawn", - "3": "player_spawn", - "4": "failed_invalid_tenant", - "5": "failed_vanilla_edu", - "6": "failed_edu_vanilla", - "7": "failed_server_full" - } - } - ] - } - ] - ], - "packet_server_to_client_handshake": [ - "container", - [ - { - "name": "token", - "type": "string" - } - ] - ], - "packet_client_to_server_handshake": [ - "container", - [] - ], - "packet_disconnect": [ - "container", - [ - { - "name": "hide_disconnect_reason", - "type": "bool" - }, - { - "name": "message", - "type": "string" - } - ] - ], - "packet_resource_packs_info": [ - "container", - [ - { - "name": "must_accept", - "type": "bool" - }, - { - "name": "has_scripts", - "type": "bool" - }, - { - "name": "behaviour_packs", - "type": "BehaviourPackInfos" - }, - { - "name": "texture_packs", - "type": "TexturePackInfos" - } - ] - ], - "packet_resource_pack_stack": [ - "container", - [ - { - "name": "must_accept", - "type": "bool" - }, - { - "name": "behavior_packs", - "type": "ResourcePackIdVersions" - }, - { - "name": "resource_packs", - "type": "ResourcePackIdVersions" - }, - { - "name": "game_version", - "type": "string" - }, - { - "name": "experiments", - "type": "Experiments" - }, - { - "name": "experiments_previously_used", - "type": "bool" - } - ] - ], - "packet_resource_pack_client_response": [ - "container", - [ - { - "name": "response_status", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "0": "none", - "1": "refused", - "2": "send_packs", - "3": "have_all_packs", - "4": "completed" - } - } - ] - }, - { - "name": "resourcepackids", - "type": "ResourcePackIds" - } - ] - ], - "packet_text": [ - "container", - [ - { - "name": "type", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "0": "raw", - "1": "chat", - "2": "translation", - "3": "popup", - "4": "jukebox_popup", - "5": "tip", - "6": "system", - "7": "whisper", - "8": "announcement", - "9": "json_whisper", - "10": "json" - } - } - ] - }, - { - "name": "needs_translation", - "type": "bool" - }, - { - "anon": true, - "type": [ - "switch", - { - "compareTo": "type", - "fields": { - "chat": [ - "container", - [ - { - "name": "source_name", - "type": "string" - }, - { - "name": "message", - "type": "string" - } - ] - ], - "whisper": [ - "container", - [ - { - "name": "source_name", - "type": "string" - }, - { - "name": "message", - "type": "string" - } - ] - ], - "announcement": [ - "container", - [ - { - "name": "source_name", - "type": "string" - }, - { - "name": "message", - "type": "string" - } - ] - ], - "raw": [ - "container", - [ - { - "name": "message", - "type": "string" - } - ] - ], - "tip": [ - "container", - [ - { - "name": "message", - "type": "string" - } - ] - ], - "system": [ - "container", - [ - { - "name": "message", - "type": "string" - } - ] - ], - "json_whisper": [ - "container", - [ - { - "name": "message", - "type": "string" - } - ] - ], - "json": [ - "container", - [ - { - "name": "message", - "type": "string" - } - ] - ], - "translation": [ - "container", - [ - { - "name": "message", - "type": "string" - }, - { - "name": "paramaters", - "type": [ - "array", - { - "countType": "varint", - "type": "string" - } - ] - } - ] - ], - "popup": [ - "container", - [ - { - "name": "message", - "type": "string" - }, - { - "name": "paramaters", - "type": [ - "array", - { - "countType": "varint", - "type": "string" - } - ] - } - ] - ], - "jukebox_popup": [ - "container", - [ - { - "name": "message", - "type": "string" - }, - { - "name": "paramaters", - "type": [ - "array", - { - "countType": "varint", - "type": "string" - } - ] - } - ] - ] - }, - "default": "void" - } - ] - }, - { - "name": "xuid", - "type": "string" - }, - { - "name": "platform_chat_id", - "type": "string" - } - ] - ], - "packet_set_time": [ - "container", - [ - { - "name": "time", - "type": "zigzag32" - } - ] - ], - "packet_start_game": [ - "container", - [ - { - "name": "entity_id", - "type": "zigzag64" - }, - { - "name": "runtime_entity_id", - "type": "varint64" - }, - { - "name": "player_gamemode", - "type": "GameMode" - }, - { - "name": "player_position", - "type": "vec3f" - }, - { - "name": "rotation", - "type": "vec2f" - }, - { - "name": "seed", - "type": "zigzag32" - }, - { - "name": "biome_type", - "type": "li16" - }, - { - "name": "biome_name", - "type": "string" - }, - { - "name": "dimension", - "type": "zigzag32" - }, - { - "name": "generator", - "type": "zigzag32" - }, - { - "name": "world_gamemode", - "type": "GameMode" - }, - { - "name": "difficulty", - "type": "zigzag32" - }, - { - "name": "spawn_position", - "type": "BlockCoordinates" - }, - { - "name": "achievements_disabled", - "type": "bool" - }, - { - "name": "day_cycle_stop_time", - "type": "zigzag32" - }, - { - "name": "edu_offer", - "type": "zigzag32" - }, - { - "name": "edu_features_enabled", - "type": "bool" - }, - { - "name": "edu_product_uuid", - "type": "string" - }, - { - "name": "rain_level", - "type": "lf32" - }, - { - "name": "lightning_level", - "type": "lf32" - }, - { - "name": "has_confirmed_platform_locked_content", - "type": "bool" - }, - { - "name": "is_multiplayer", - "type": "bool" - }, - { - "name": "broadcast_to_lan", - "type": "bool" - }, - { - "name": "xbox_live_broadcast_mode", - "type": "varint" - }, - { - "name": "platform_broadcast_mode", - "type": "varint" - }, - { - "name": "enable_commands", - "type": "bool" - }, - { - "name": "is_texturepacks_required", - "type": "bool" - }, - { - "name": "gamerules", - "type": "GameRules" - }, - { - "name": "experiments", - "type": "Experiments" - }, - { - "name": "experiments_previously_used", - "type": "bool" - }, - { - "name": "bonus_chest", - "type": "bool" - }, - { - "name": "map_enabled", - "type": "bool" - }, - { - "name": "permission_level", - "type": "zigzag32" - }, - { - "name": "server_chunk_tick_range", - "type": "li32" - }, - { - "name": "has_locked_behavior_pack", - "type": "bool" - }, - { - "name": "has_locked_resource_pack", - "type": "bool" - }, - { - "name": "is_from_locked_world_template", - "type": "bool" - }, - { - "name": "msa_gamertags_only", - "type": "bool" - }, - { - "name": "is_from_world_template", - "type": "bool" - }, - { - "name": "is_world_template_option_locked", - "type": "bool" - }, - { - "name": "only_spawn_v1_villagers", - "type": "bool" - }, - { - "name": "game_version", - "type": "string" - }, - { - "name": "limited_world_width", - "type": "li32" - }, - { - "name": "limited_world_length", - "type": "li32" - }, - { - "name": "is_new_nether", - "type": "bool" - }, - { - "name": "experimental_gameplay_override", - "type": "bool" - }, - { - "name": "level_id", - "type": "string" - }, - { - "name": "world_name", - "type": "string" - }, - { - "name": "premium_world_template_id", - "type": "string" - }, - { - "name": "is_trial", - "type": "bool" - }, - { - "name": "movement_authority", - "type": [ - "mapper", - { - "type": "zigzag32", - "mappings": { - "0": "client", - "1": "server", - "2": "server_with_rewind" - } - } - ] - }, - { - "name": "rewind_history_size", - "type": "zigzag32" - }, - { - "name": "server_authoritative_block_breaking", - "type": "bool" - }, - { - "name": "current_tick", - "type": "li64" - }, - { - "name": "enchantment_seed", - "type": "zigzag32" - }, - { - "name": "block_properties", - "type": "BlockProperties" - }, - { - "name": "itemstates", - "type": "Itemstates" - }, - { - "name": "multiplayer_correlation_id", - "type": "string" - }, - { - "name": "server_authoritative_inventory", - "type": "bool" - }, - { - "name": "engine", - "type": "string" - } - ] - ], - "packet_add_player": [ - "container", - [ - { - "name": "uuid", - "type": "uuid" - }, - { - "name": "username", - "type": "string" - }, - { - "name": "entity_id_self", - "type": "zigzag64" - }, - { - "name": "runtime_entity_id", - "type": "varint64" - }, - { - "name": "platform_chat_id", - "type": "string" - }, - { - "name": "position", - "type": "vec3f" - }, - { - "name": "velocity", - "type": "vec3f" - }, - { - "name": "pitch", - "type": "lf32" - }, - { - "name": "yaw", - "type": "lf32" - }, - { - "name": "head_yaw", - "type": "lf32" - }, - { - "name": "held_item", - "type": "Item" - }, - { - "name": "metadata", - "type": "MetadataDictionary" - }, - { - "name": "flags", - "type": "varint" - }, - { - "name": "command_permission", - "type": "varint" - }, - { - "name": "action_permissions", - "type": "varint" - }, - { - "name": "permission_level", - "type": "varint" - }, - { - "name": "custom_stored_permissions", - "type": "varint" - }, - { - "name": "user_id", - "type": "li64" - }, - { - "name": "links", - "type": "Links" - }, - { - "name": "device_id", - "type": "string" - }, - { - "name": "device_os", - "type": "li32" - } - ] - ], - "packet_add_entity": [ - "container", - [ - { - "name": "entity_id_self", - "type": "zigzag64" - }, - { - "name": "runtime_entity_id", - "type": "varint64" - }, - { - "name": "entity_type", - "type": "string" - }, - { - "name": "position", - "type": "vec3f" - }, - { - "name": "velocity", - "type": "vec3f" - }, - { - "name": "pitch", - "type": "lf32" - }, - { - "name": "yaw", - "type": "lf32" - }, - { - "name": "head_yaw", - "type": "lf32" - }, - { - "name": "attributes", - "type": "EntityAttributes" - }, - { - "name": "metadata", - "type": "MetadataDictionary" - }, - { - "name": "links", - "type": "Links" - } - ] - ], - "packet_remove_entity": [ - "container", - [ - { - "name": "entity_id_self", - "type": "zigzag64" - } - ] - ], - "packet_add_item_entity": [ - "container", - [ - { - "name": "entity_id_self", - "type": "zigzag64" - }, - { - "name": "runtime_entity_id", - "type": "varint64" - }, - { - "name": "item", - "type": "Item" - }, - { - "name": "position", - "type": "vec3f" - }, - { - "name": "velocity", - "type": "vec3f" - }, - { - "name": "metadata", - "type": "MetadataDictionary" - }, - { - "name": "is_from_fishing", - "type": "bool" - } - ] - ], - "packet_take_item_entity": [ - "container", - [ - { - "name": "runtime_entity_id", - "type": "varint64" - }, - { - "name": "target", - "type": "varint" - } - ] - ], - "packet_move_entity": [ - "container", - [ - { - "name": "runtime_entity_id", - "type": "varint64" - }, - { - "name": "flags", - "type": "u8" - }, - { - "name": "position", - "type": "vec3f" - }, - { - "name": "rotation", - "type": "Rotation" - } - ] - ], - "packet_move_player": [ - "container", - [ - { - "name": "runtime_id", - "type": "varint" - }, - { - "name": "position", - "type": "vec3f" - }, - { - "name": "pitch", - "type": "lf32" - }, - { - "name": "yaw", - "type": "lf32" - }, - { - "name": "head_yaw", - "type": "lf32" - }, - { - "name": "mode", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "0": "normal", - "1": "reset", - "2": "teleport", - "3": "rotation" - } - } - ] - }, - { - "name": "on_ground", - "type": "bool" - }, - { - "name": "ridden_runtime_id", - "type": "varint" - }, - { - "name": "teleport", - "type": [ - "switch", - { - "compareTo": "mode", - "fields": { - "teleport": [ - "container", - [ - { - "name": "cause", - "type": [ - "mapper", - { - "type": "li32", - "mappings": { - "0": "unknown", - "1": "projectile", - "2": "chorus_fruit", - "3": "command", - "4": "behavior" - } - } - ] - }, - { - "name": "source_entity_type", - "type": "LegacyEntityType" - } - ] - ] - }, - "default": "void" - } - ] - }, - { - "name": "tick", - "type": "varint64" - } - ] - ], - "packet_rider_jump": [ - "container", - [ - { - "name": "jump_strength", - "type": "zigzag32" - } - ] - ], - "packet_update_block": [ - "container", - [ - { - "name": "position", - "type": "BlockCoordinates" - }, - { - "name": "block_runtime_id", - "type": "varint" - }, - { - "name": "flags", - "type": "UpdateBlockFlags" - }, - { - "name": "layer", - "type": "varint" - } - ] - ], - "packet_add_painting": [ - "container", - [ - { - "name": "entity_id_self", - "type": "zigzag64" - }, - { - "name": "runtime_entity_id", - "type": "varint64" - }, - { - "name": "coordinates", - "type": "vec3f" - }, - { - "name": "direction", - "type": "zigzag32" - }, - { - "name": "title", - "type": "string" - } - ] - ], - "packet_tick_sync": [ - "container", - [ - { - "name": "request_time", - "type": "li64" - }, - { - "name": "response_time", - "type": "li64" - } - ] - ], - "packet_level_sound_event_old": [ - "container", - [ - { - "name": "sound_id", - "type": "u8" - }, - { - "name": "position", - "type": "vec3f" - }, - { - "name": "block_id", - "type": "zigzag32" - }, - { - "name": "entity_type", - "type": "zigzag32" - }, - { - "name": "is_baby_mob", - "type": "bool" - }, - { - "name": "is_global", - "type": "bool" - } - ] - ], - "packet_level_event": [ - "container", - [ - { - "name": "event", - "type": [ - "mapper", - { - "type": "zigzag32", - "mappings": { - "1000": "sound_click", - "1001": "sound_click_fail", - "1002": "sound_shoot", - "1003": "sound_door", - "1004": "sound_fizz", - "1005": "sound_ignite", - "1007": "sound_ghast", - "1008": "sound_ghast_shoot", - "1009": "sound_blaze_shoot", - "1010": "sound_door_bump", - "1012": "sound_door_crash", - "1018": "sound_enderman_teleport", - "1020": "sound_anvil_break", - "1021": "sound_anvil_use", - "1022": "sound_anvil_fall", - "1030": "sound_pop", - "1032": "sound_portal", - "1040": "sound_itemframe_add_item", - "1041": "sound_itemframe_remove", - "1042": "sound_itemframe_place", - "1043": "sound_itemframe_remove_item", - "1044": "sound_itemframe_rotate_item", - "1050": "sound_camera", - "1051": "sound_orb", - "1052": "sound_totem", - "1060": "sound_armor_stand_break", - "1061": "sound_armor_stand_hit", - "1062": "sound_armor_stand_fall", - "1063": "sound_armor_stand_place", - "1064": "pointed_dripstone_land", - "1065": "dye_used", - "1066": "ink_sack_used", - "2000": "particle_shoot", - "2001": "particle_destroy", - "2002": "particle_splash", - "2003": "particle_eye_despawn", - "2004": "particle_spawn", - "2005": "particle_crop_growth", - "2006": "particle_guardian_curse", - "2007": "particle_death_smoke", - "2008": "particle_block_force_field", - "2009": "particle_projectile_hit", - "2010": "particle_dragon_egg_teleport", - "2011": "particle_crop_eaten", - "2012": "particle_critical", - "2013": "particle_enderman_teleport", - "2014": "particle_punch_block", - "2015": "particle_bubble", - "2016": "particle_evaporate", - "2017": "particle_destroy_armor_stand", - "2018": "particle_breaking_egg", - "2019": "particle_destroy_egg", - "2020": "particle_evaporate_water", - "2021": "particle_destroy_block_no_sound", - "2022": "particle_knockback_roar", - "2023": "particle_teleport_trail", - "2024": "particle_point_cloud", - "2025": "particle_explosion", - "2026": "particle_block_explosion", - "2027": "particle_vibration_signal", - "2028": "particle_dripstone_drip", - "2029": "particle_fizz_effect", - "2030": "particle_wax_on", - "2031": "particle_wax_off", - "2032": "particle_scrape", - "2033": "particle_electric_spark", - "3001": "start_rain", - "3002": "start_thunder", - "3003": "stop_rain", - "3004": "stop_thunder", - "3005": "pause_game", - "3006": "pause_game_no_screen", - "3007": "set_game_speed", - "3500": "redstone_trigger", - "3501": "cauldron_explode", - "3502": "cauldron_dye_armor", - "3503": "cauldron_clean_armor", - "3504": "cauldron_fill_potion", - "3505": "cauldron_take_potion", - "3506": "cauldron_fill_water", - "3507": "cauldron_take_water", - "3508": "cauldron_add_dye", - "3509": "cauldron_clean_banner", - "3600": "block_start_break", - "3601": "block_stop_break", - "4000": "set_data", - "9800": "players_sleeping", - "16384": "add_particle_mask" - } - } - ] - }, - { - "name": "position", - "type": "vec3f" - }, - { - "name": "data", - "type": "zigzag32" - } - ] - ], - "packet_block_event": [ - "container", - [ - { - "name": "position", - "type": "BlockCoordinates" - }, - { - "name": "type", - "type": [ - "mapper", - { - "type": "zigzag32", - "mappings": { - "0": "sound", - "1": "change_state" - } - } - ] - }, - { - "name": "data", - "type": "zigzag32" - } - ] - ], - "packet_entity_event": [ - "container", - [ - { - "name": "runtime_entity_id", - "type": "varint64" - }, - { - "name": "event_id", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "1": "jump", - "2": "hurt_animation", - "3": "death_animation", - "4": "arm_swing", - "5": "stop_attack", - "6": "tame_fail", - "7": "tame_success", - "8": "shake_wet", - "9": "use_item", - "10": "eat_grass_animation", - "11": "fish_hook_bubble", - "12": "fish_hook_position", - "13": "fish_hook_hook", - "14": "fish_hook_tease", - "15": "squid_ink_cloud", - "16": "zombie_villager_cure", - "18": "respawn", - "19": "iron_golem_offer_flower", - "20": "iron_golem_withdraw_flower", - "21": "love_particles", - "22": "villager_angry", - "23": "villager_happy", - "24": "witch_spell_particles", - "25": "firework_particles", - "26": "in_love_particles", - "27": "silverfish_spawn_animation", - "28": "guardian_attack", - "29": "witch_drink_potion", - "30": "witch_throw_potion", - "31": "minecart_tnt_prime_fuse", - "32": "creeper_prime_fuse", - "33": "air_supply_expired", - "34": "player_add_xp_levels", - "35": "elder_guardian_curse", - "36": "agent_arm_swing", - "37": "ender_dragon_death", - "38": "dust_particles", - "39": "arrow_shake", - "57": "eating_item", - "60": "baby_animal_feed", - "61": "death_smoke_cloud", - "62": "complete_trade", - "63": "remove_leash", - "65": "consume_totem", - "66": "player_check_treasure_hunter_achievement", - "67": "entity_spawn", - "68": "dragon_puke", - "69": "item_entity_merge", - "70": "start_swim", - "71": "balloon_pop", - "72": "treasure_hunt", - "73": "agent_summon", - "74": "charged_crossbow", - "75": "fall" - } - } - ] - }, - { - "name": "data", - "type": "zigzag32" - } - ] - ], - "packet_mob_effect": [ - "container", - [ - { - "name": "runtime_entity_id", - "type": "varint64" - }, - { - "name": "event_id", - "type": "u8" - }, - { - "name": "effect_id", - "type": "zigzag32" - }, - { - "name": "amplifier", - "type": "zigzag32" - }, - { - "name": "particles", - "type": "bool" - }, - { - "name": "duration", - "type": "zigzag32" - } - ] - ], - "packet_update_attributes": [ - "container", - [ - { - "name": "runtime_entity_id", - "type": "varint64" - }, - { - "name": "attributes", - "type": "PlayerAttributes" - }, - { - "name": "tick", - "type": "varint64" - } - ] - ], - "packet_inventory_transaction": [ - "container", - [ - { - "name": "transaction", - "type": "Transaction" - } - ] - ], - "packet_mob_equipment": [ - "container", - [ - { - "name": "runtime_entity_id", - "type": "varint64" - }, - { - "name": "item", - "type": "Item" - }, - { - "name": "slot", - "type": "u8" - }, - { - "name": "selected_slot", - "type": "u8" - }, - { - "name": "window_id", - "type": "WindowID" - } - ] - ], - "packet_mob_armor_equipment": [ - "container", - [ - { - "name": "runtime_entity_id", - "type": "varint64" - }, - { - "name": "helmet", - "type": "Item" - }, - { - "name": "chestplate", - "type": "Item" - }, - { - "name": "leggings", - "type": "Item" - }, - { - "name": "boots", - "type": "Item" - } - ] - ], - "packet_interact": [ - "container", - [ - { - "name": "action_id", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "3": "leave_vehicle", - "4": "mouse_over_entity", - "6": "open_inventory" - } - } - ] - }, - { - "name": "target_entity_id", - "type": "varint64" - }, - { - "name": "position", - "type": [ - "switch", - { - "compareTo": "action_id", - "fields": { - "mouse_over_entity": "vec3f", - "leave_vehicle": "vec3f" - }, - "default": "void" - } - ] - } - ] - ], - "packet_block_pick_request": [ - "container", - [ - { - "name": "x", - "type": "zigzag32" - }, - { - "name": "y", - "type": "zigzag32" - }, - { - "name": "z", - "type": "zigzag32" - }, - { - "name": "add_user_data", - "type": "bool" - }, - { - "name": "selected_slot", - "type": "u8" - } - ] - ], - "packet_entity_pick_request": [ - "container", - [ - { - "name": "runtime_entity_id", - "type": "lu64" - }, - { - "name": "selected_slot", - "type": "u8" - } - ] - ], - "packet_player_action": [ - "container", - [ - { - "name": "runtime_entity_id", - "type": "varint64" - }, - { - "name": "action", - "type": "Action" - }, - { - "name": "position", - "type": "BlockCoordinates" - }, - { - "name": "face", - "type": "zigzag32" - } - ] - ], - "packet_hurt_armor": [ - "container", - [ - { - "name": "health", - "type": "zigzag32" - } - ] - ], - "packet_set_entity_data": [ - "container", - [ - { - "name": "runtime_entity_id", - "type": "varint64" - }, - { - "name": "metadata", - "type": "MetadataDictionary" - }, - { - "name": "tick", - "type": "varint" - } - ] - ], - "packet_set_entity_motion": [ - "container", - [ - { - "name": "runtime_entity_id", - "type": "varint64" - }, - { - "name": "velocity", - "type": "vec3f" - } - ] - ], - "packet_set_entity_link": [ - "container", - [ - { - "name": "link", - "type": "Link" - } - ] - ], - "packet_set_health": [ - "container", - [ - { - "name": "health", - "type": "zigzag32" - } - ] - ], - "packet_set_spawn_position": [ - "container", - [ - { - "name": "spawn_type", - "type": [ - "mapper", - { - "type": "zigzag32", - "mappings": { - "0": "player", - "1": "world" - } - } - ] - }, - { - "name": "player_position", - "type": "BlockCoordinates" - }, - { - "name": "dimension", - "type": "zigzag32" - }, - { - "name": "world_position", - "type": "BlockCoordinates" - } - ] - ], - "packet_animate": [ - "container", - [ - { - "name": "action_id", - "type": [ - "mapper", - { - "type": "zigzag32", - "mappings": { - "0": "none", - "1": "swing_arm", - "2": "unknown", - "3": "wake_up", - "4": "critical_hit", - "5": "magic_critical_hit", - "6": "row_right", - "7": "row_left" - } - } - ] - }, - { - "name": "runtime_entity_id", - "type": "varint64" - } - ] - ], - "packet_respawn": [ - "container", - [ - { - "name": "position", - "type": "vec3f" - }, - { - "name": "state", - "type": "u8" - }, - { - "name": "runtime_entity_id", - "type": "varint64" - } - ] - ], - "packet_container_open": [ - "container", - [ - { - "name": "window_id", - "type": "WindowID" - }, - { - "name": "window_type", - "type": "WindowType" - }, - { - "name": "coordinates", - "type": "BlockCoordinates" - }, - { - "name": "runtime_entity_id", - "type": "zigzag64" - } - ] - ], - "packet_container_close": [ - "container", - [ - { - "name": "window_id", - "type": "WindowID" - }, - { - "name": "server", - "type": "bool" - } - ] - ], - "packet_player_hotbar": [ - "container", - [ - { - "name": "selected_slot", - "type": "varint" - }, - { - "name": "window_id", - "type": "WindowID" - }, - { - "name": "select_slot", - "type": "bool" - } - ] - ], - "packet_inventory_content": [ - "container", - [ - { - "name": "window_id", - "type": "WindowIDVarint" - }, - { - "name": "input", - "type": "ItemStacks" - } - ] - ], - "packet_inventory_slot": [ - "container", - [ - { - "name": "window_id", - "type": "WindowIDVarint" - }, - { - "name": "slot", - "type": "varint" - }, - { - "name": "item", - "type": "Item" - } - ] - ], - "packet_container_set_data": [ - "container", - [ - { - "name": "window_id", - "type": "WindowID" - }, - { - "name": "property", - "type": "zigzag32" - }, - { - "name": "value", - "type": "zigzag32" - } - ] - ], - "packet_crafting_data": [ - "container", - [ - { - "name": "recipes", - "type": "Recipes" - }, - { - "name": "potion_type_recipes", - "type": "PotionTypeRecipes" - }, - { - "name": "potion_container_recipes", - "type": "PotionContainerChangeRecipes" - }, - { - "name": "is_clean", - "type": "bool" - } - ] - ], - "packet_crafting_event": [ - "container", - [ - { - "name": "window_id", - "type": "WindowID" - }, - { - "name": "recipe_type", - "type": [ - "mapper", - { - "type": "zigzag32", - "mappings": { - "0": "inventory", - "1": "crafting", - "2": "workbench" - } - } - ] - }, - { - "name": "recipe_id", - "type": "uuid" - }, - { - "name": "input", - "type": [ - "array", - { - "countType": "varint", - "type": "Item" - } - ] - }, - { - "name": "result", - "type": [ - "array", - { - "countType": "varint", - "type": "Item" - } - ] - } - ] - ], - "packet_gui_data_pick_item": [ - "container", - [ - { - "name": "item_name", - "type": "string" - }, - { - "name": "item_effects", - "type": "string" - }, - { - "name": "hotbar_slot", - "type": "li32" - } - ] - ], - "packet_adventure_settings": [ - "container", - [ - { - "name": "flags", - "type": "AdventureFlags" - }, - { - "name": "command_permission", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "0": "normal", - "1": "operator", - "2": "host", - "3": "automation", - "4": "admin" - } - } - ] - }, - { - "name": "action_permissions", - "type": "ActionPermissions" - }, - { - "name": "permission_level", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "0": "visitor", - "1": "member", - "2": "operator", - "3": "custom" - } - } - ] - }, - { - "name": "custom_stored_permissions", - "type": "varint" - }, - { - "name": "user_id", - "type": "li64" - } - ] - ], - "packet_block_entity_data": [ - "container", - [ - { - "name": "position", - "type": "BlockCoordinates" - }, - { - "name": "nbt", - "type": "nbt" - } - ] - ], - "packet_player_input": [ - "container", - [ - { - "name": "motion_x", - "type": "lf32" - }, - { - "name": "motion_z", - "type": "lf32" - }, - { - "name": "jumping", - "type": "bool" - }, - { - "name": "sneaking", - "type": "bool" - } - ] - ], - "packet_level_chunk": [ - "container", - [ - { - "name": "x", - "type": "zigzag32" - }, - { - "name": "z", - "type": "zigzag32" - }, - { - "name": "sub_chunk_count", - "type": "varint" - }, - { - "name": "cache_enabled", - "type": "bool" - }, - { - "name": "blobs", - "type": [ - "switch", - { - "compareTo": "cache_enabled", - "fields": { - "true": [ - "container", - [ - { - "name": "hashes", - "type": [ - "array", - { - "countType": "varint", - "type": "lu64" - } - ] - } - ] - ] - }, - "default": "void" - } - ] - }, - { - "name": "payload", - "type": "ByteArray" - } - ] - ], - "packet_set_commands_enabled": [ - "container", - [ - { - "name": "enabled", - "type": "bool" - } - ] - ], - "packet_set_difficulty": [ - "container", - [ - { - "name": "difficulty", - "type": "varint" - } - ] - ], - "packet_change_dimension": [ - "container", - [ - { - "name": "dimension", - "type": "zigzag32" - }, - { - "name": "position", - "type": "vec3f" - }, - { - "name": "respawn", - "type": "bool" - } - ] - ], - "packet_set_player_game_type": [ - "container", - [ - { - "name": "gamemode", - "type": "GameMode" - } - ] - ], - "packet_player_list": [ - "container", - [ - { - "name": "records", - "type": "PlayerRecords" - } - ] - ], - "packet_simple_event": [ - "container", - [ - { - "name": "event_type", - "type": "lu16" - } - ] - ], - "packet_event": [ - "container", - [ - { - "name": "runtime_id", - "type": "varint64" - }, - { - "name": "event_type", - "type": [ - "mapper", - { - "type": "zigzag32", - "mappings": { - "0": "achievement_awarded", - "1": "entity_interact", - "2": "portal_built", - "3": "portal_used", - "4": "mob_killed", - "5": "cauldron_used", - "6": "player_death", - "7": "boss_killed", - "8": "agent_command", - "9": "agent_created", - "10": "banner_pattern_removed", - "11": "commaned_executed", - "12": "fish_bucketed", - "13": "mob_born", - "14": "pet_died", - "15": "cauldron_block_used", - "16": "composter_block_used", - "17": "bell_block_used", - "18": "actor_definition", - "19": "raid_update", - "20": "player_movement_anomaly", - "21": "player_moement_corrected", - "22": "honey_harvested", - "23": "target_block_hit", - "24": "piglin_barter", - "25": "waxed_or_unwaxed_copper" - } - } - ] - }, - { - "name": "use_player_id", - "type": "u8" - }, - { - "name": "event_data", - "type": "restBuffer" - } - ] - ], - "packet_spawn_experience_orb": [ - "container", - [ - { - "name": "position", - "type": "vec3f" - }, - { - "name": "count", - "type": "zigzag32" - } - ] - ], - "packet_clientbound_map_item_data": [ - "container", - [ - { - "name": "map_id", - "type": "zigzag64" - }, - { - "name": "update_flags", - "type": "UpdateMapFlags" - }, - { - "name": "dimension", - "type": "u8" - }, - { - "name": "locked", - "type": "bool" - }, - { - "name": "included_in", - "type": [ - "switch", - { - "compareTo": "update_flags.initialisation", - "fields": { - "true": [ - "array", - { - "countType": "varint", - "type": "zigzag64" - } - ] - }, - "default": "void" - } - ] - }, - { - "name": "scale", - "type": [ - "switch", - { - "compareTo": "update_flags.initialisation || update_flags.decoration || update_flags.texture", - "fields": { - "true": "u8" - }, - "default": "void" - } - ] - }, - { - "name": "tracked", - "type": [ - "switch", - { - "compareTo": "update_flags.decoration", - "fields": { - "true": [ - "container", - [ - { - "name": "objects", - "type": [ - "array", - { - "countType": "varint", - "type": "TrackedObject" - } - ] - }, - { - "name": "decorations", - "type": [ - "array", - { - "countType": "varint", - "type": "MapDecoration" - } - ] - } - ] - ] - }, - "default": "void" - } - ] - }, - { - "name": "texture", - "type": [ - "switch", - { - "compareTo": "update_flags.texture", - "fields": { - "true": [ - "container", - [ - { - "name": "width", - "type": "zigzag32" - }, - { - "name": "height", - "type": "zigzag32" - }, - { - "name": "x_offset", - "type": "zigzag32" - }, - { - "name": "y_offset", - "type": "zigzag32" - }, - { - "name": "pixels", - "type": [ - "array", - { - "countType": "varint", - "type": "varint" - } - ] - } - ] - ] - }, - "default": "void" - } - ] - } - ] - ], - "packet_map_info_request": [ - "container", - [ - { - "name": "map_id", - "type": "zigzag64" - } - ] - ], - "packet_request_chunk_radius": [ - "container", - [ - { - "name": "chunk_radius", - "type": "zigzag32" - } - ] - ], - "packet_chunk_radius_update": [ - "container", - [ - { - "name": "chunk_radius", - "type": "zigzag32" - } - ] - ], - "packet_item_frame_drop_item": [ - "container", - [ - { - "name": "coordinates", - "type": "BlockCoordinates" - } - ] - ], - "packet_game_rules_changed": [ - "container", - [ - { - "name": "rules", - "type": "GameRules" - } - ] - ], - "packet_camera": [ - "container", - [ - { - "name": "camera_entity_unique_id", - "type": "zigzag64" - }, - { - "name": "target_player_unique_id", - "type": "zigzag64" - } - ] - ], - "packet_boss_event": [ - "container", - [ - { - "name": "boss_entity_id", - "type": "zigzag64" - }, - { - "name": "type", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "0": "show_bar", - "1": "register_player", - "2": "hide_bar", - "3": "unregister_player", - "4": "set_bar_progress", - "5": "set_bar_title", - "6": "update_properties", - "7": "texture" - } - } - ] - }, - { - "anon": true, - "type": [ - "switch", - { - "compareTo": "type", - "fields": { - "show_bar": [ - "container", - [ - { - "name": "title", - "type": "string" - }, - { - "name": "progress", - "type": "lf32" - }, - { - "name": "screen_darkening", - "type": "li16" - }, - { - "name": "color", - "type": "varint" - }, - { - "name": "overlay", - "type": "varint" - } - ] - ], - "register_player": [ - "container", - [ - { - "name": "player_id", - "type": "zigzag64" - } - ] - ], - "unregister_player": [ - "container", - [ - { - "name": "player_id", - "type": "zigzag64" - } - ] - ], - "set_bar_progress": [ - "container", - [ - { - "name": "progress", - "type": "lf32" - } - ] - ], - "set_bar_title": [ - "container", - [ - { - "name": "title", - "type": "string" - } - ] - ], - "update_properties": [ - "container", - [ - { - "name": "screen_darkening", - "type": "li16" - }, - { - "name": "color", - "type": "varint" - }, - { - "name": "overlay", - "type": "varint" - } - ] - ], - "texture": [ - "container", - [ - { - "name": "color", - "type": "varint" - }, - { - "name": "overlay", - "type": "varint" - } - ] - ] - }, - "default": "void" - } - ] - } - ] - ], - "packet_show_credits": [ - "container", - [ - { - "name": "runtime_entity_id", - "type": "varint64" - }, - { - "name": "status", - "type": "zigzag32" - } - ] - ], - "packet_available_commands": [ - "container", - [ - { - "name": "values_len", - "type": "varint" - }, - { - "name": "_enum_type", - "type": [ - "enum_size_based_on_values_len" - ] - }, - { - "name": "enum_values", - "type": [ - "array", - { - "count": "values_len", - "type": "string" - } - ] - }, - { - "name": "suffixes", - "type": [ - "array", - { - "countType": "varint", - "type": "string" - } - ] - }, - { - "name": "enums", - "type": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "values", - "type": [ - "array", - { - "countType": "varint", - "type": [ - "switch", - { - "compareTo": "../_enum_type", - "fields": { - "byte": "u8", - "short": "lu16", - "int": "lu32" - }, - "default": "void" - } - ] - } - ] - } - ] - ] - } - ] - }, - { - "name": "command_data", - "type": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "description", - "type": "string" - }, - { - "name": "flags", - "type": "u8" - }, - { - "name": "permission_level", - "type": "u8" - }, - { - "name": "alias", - "type": "li32" - }, - { - "name": "overloads", - "type": [ - "array", - { - "countType": "varint", - "type": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "paramater_name", - "type": "string" - }, - { - "name": "value_type", - "type": [ - "mapper", - { - "type": "lu16", - "mappings": { - "1": "int", - "2": "float", - "3": "value", - "4": "wildcard_int", - "5": "operator", - "6": "target", - "16": "file_path", - "32": "string", - "40": "position", - "44": "message", - "46": "raw_text", - "50": "json", - "63": "command" - } - } - ] - }, - { - "name": "enum_type", - "type": [ - "mapper", - { - "type": "lu16", - "mappings": { - "16": "valid", - "32": "enum", - "256": "suffixed", - "1024": "soft_enum" - } - } - ] - }, - { - "name": "optional", - "type": "bool" - }, - { - "name": "options", - "type": "CommandFlags" - } - ] - ] - } - ] - } - ] - } - ] - ] - } - ] - }, - { - "name": "dynamic_enums", - "type": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "values", - "type": [ - "array", - { - "countType": "varint", - "type": "string" - } - ] - } - ] - ] - } - ] - }, - { - "name": "enum_constraints", - "type": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "value_index", - "type": "li32" - }, - { - "name": "enum_index", - "type": "li32" - }, - { - "name": "constraints", - "type": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "constraint", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "0": "cheats_enabled", - "1": "operator_permissions", - "2": "host_permissions" - } - } - ] - } - ] - ] - } - ] - } - ] - ] - } - ] - } - ] - ], - "packet_command_request": [ - "container", - [ - { - "name": "command", - "type": "string" - }, - { - "name": "origin", - "type": "CommandOrigin" - }, - { - "name": "interval", - "type": "bool" - } - ] - ], - "packet_command_block_update": [ - "container", - [ - { - "name": "is_block", - "type": "bool" - }, - { - "anon": true, - "type": [ - "switch", - { - "compareTo": "is_block", - "fields": { - "true": [ - "container", - [ - { - "name": "position", - "type": "BlockCoordinates" - }, - { - "name": "mode", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "0": "impulse", - "1": "repeat", - "2": "chain" - } - } - ] - }, - { - "name": "needs_redstone", - "type": "bool" - }, - { - "name": "conditional", - "type": "bool" - } - ] - ] - }, - "default": [ - "container", - [ - { - "name": "minecart_entity_runtime_id", - "type": "varint64" - } - ] - ] - } - ] - }, - { - "name": "command", - "type": "string" - }, - { - "name": "last_output", - "type": "string" - }, - { - "name": "name", - "type": "string" - }, - { - "name": "should_track_output", - "type": "bool" - }, - { - "name": "tick_delay", - "type": "li32" - }, - { - "name": "execute_on_first_tick", - "type": "bool" - } - ] - ], - "packet_command_output": [ - "container", - [ - { - "name": "origin", - "type": "CommandOrigin" - }, - { - "name": "output_type", - "type": [ - "mapper", - { - "type": "i8", - "mappings": { - "1": "last", - "2": "silent", - "3": "all", - "4": "data_set" - } - } - ] - }, - { - "name": "success_count", - "type": "varint" - }, - { - "name": "output", - "type": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "success", - "type": "bool" - }, - { - "name": "message_id", - "type": "string" - }, - { - "name": "paramaters", - "type": [ - "array", - { - "countType": "varint", - "type": "string" - } - ] - } - ] - ] - } - ] - }, - { - "name": "data_set", - "type": [ - "switch", - { - "compareTo": "output_type", - "fields": { - "data_set": "string" - }, - "default": "void" - } - ] - } - ] - ], - "packet_update_trade": [ - "container", - [ - { - "name": "window_id", - "type": "WindowID" - }, - { - "name": "window_type", - "type": "WindowType" - }, - { - "name": "size", - "type": "varint" - }, - { - "name": "trade_tier", - "type": "varint" - }, - { - "name": "villager_unique_id", - "type": "varint64" - }, - { - "name": "entity_unique_id", - "type": "varint64" - }, - { - "name": "display_name", - "type": "string" - }, - { - "name": "new_trading_ui", - "type": "bool" - }, - { - "name": "economic_trades", - "type": "bool" - }, - { - "name": "offers", - "type": "nbt" - } - ] - ], - "packet_update_equipment": [ - "container", - [ - { - "name": "window_id", - "type": "WindowID" - }, - { - "name": "window_type", - "type": "WindowType" - }, - { - "name": "size", - "type": "u8" - }, - { - "name": "entity_id", - "type": "zigzag64" - }, - { - "name": "inventory", - "type": "nbt" - } - ] - ], - "packet_resource_pack_data_info": [ - "container", - [ - { - "name": "pack_id", - "type": "string" - }, - { - "name": "max_chunk_size", - "type": "lu32" - }, - { - "name": "chunk_count", - "type": "lu32" - }, - { - "name": "size", - "type": "lu64" - }, - { - "name": "hash", - "type": "ByteArray" - }, - { - "name": "is_premium", - "type": "bool" - }, - { - "name": "pack_type", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "1": "addon", - "2": "cached", - "3": "copy_protected", - "4": "behavior", - "5": "persona_piece", - "6": "resources", - "7": "skins", - "8": "world_template" - } - } - ] - } - ] - ], - "packet_resource_pack_chunk_data": [ - "container", - [ - { - "name": "pack_id", - "type": "string" - }, - { - "name": "chunk_index", - "type": "lu32" - }, - { - "name": "progress", - "type": "lu64" - }, - { - "name": "payload", - "type": "ByteArray" - } - ] - ], - "packet_resource_pack_chunk_request": [ - "container", - [ - { - "name": "pack_id", - "type": "string" - }, - { - "name": "chunk_index", - "type": "lu32" - } - ] - ], - "packet_transfer": [ - "container", - [ - { - "name": "server_address", - "type": "string" - }, - { - "name": "port", - "type": "lu16" - } - ] - ], - "packet_play_sound": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "coordinates", - "type": "BlockCoordinates" - }, - { - "name": "volume", - "type": "lf32" - }, - { - "name": "pitch", - "type": "lf32" - } - ] - ], - "packet_stop_sound": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "stop_all", - "type": "bool" - } - ] - ], - "packet_set_title": [ - "container", - [ - { - "name": "type", - "type": [ - "mapper", - { - "type": "zigzag32", - "mappings": { - "0": "clear", - "1": "reset", - "2": "set_title", - "3": "set_subtitle", - "4": "action_bar_message", - "5": "set_durations", - "6": "set_title_json", - "7": "set_subtitle_json", - "8": "action_bar_message_json" - } - } - ] - }, - { - "name": "text", - "type": "string" - }, - { - "name": "fade_in_time", - "type": "zigzag32" - }, - { - "name": "stay_time", - "type": "zigzag32" - }, - { - "name": "fade_out_time", - "type": "zigzag32" - } - ] - ], - "packet_add_behavior_tree": [ - "container", - [ - { - "name": "behaviortree", - "type": "string" - } - ] - ], - "packet_structure_block_update": [ - "container", - [ - { - "name": "position", - "type": "BlockCoordinates" - }, - { - "name": "structure_name", - "type": "string" - }, - { - "name": "data_field", - "type": "string" - }, - { - "name": "include_players", - "type": "bool" - }, - { - "name": "show_bounding_box", - "type": "bool" - }, - { - "name": "structure_block_type", - "type": "zigzag32" - }, - { - "name": "settings", - "type": "StructureBlockSettings" - }, - { - "name": "redstone_save_mode", - "type": "zigzag32" - }, - { - "name": "should_trigger", - "type": "bool" - } - ] - ], - "packet_show_store_offer": [ - "container", - [ - { - "name": "offer_id", - "type": "string" - }, - { - "name": "show_all", - "type": "bool" - } - ] - ], - "packet_purchase_receipt": [ - "container", - [ - { - "name": "receipts", - "type": [ - "array", - { - "countType": "varint", - "type": "string" - } - ] - } - ] - ], - "packet_player_skin": [ - "container", - [ - { - "name": "uuid", - "type": "uuid" - }, - { - "name": "skin", - "type": "Skin" - }, - { - "name": "skin_name", - "type": "string" - }, - { - "name": "old_skin_name", - "type": "string" - }, - { - "name": "is_verified", - "type": "bool" - } - ] - ], - "packet_sub_client_login": [ - "container", - [ - { - "name": "tokens", - "type": [ - "encapsulated", - { - "lengthType": "varint", - "type": "LoginTokens" - } - ] - } - ] - ], - "packet_initiate_web_socket_connection": [ - "container", - [ - { - "name": "server", - "type": "string" - } - ] - ], - "packet_set_last_hurt_by": [ - "container", - [ - { - "name": "entity_type", - "type": "varint" - } - ] - ], - "packet_book_edit": [ - "container", - [ - { - "name": "type", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "0": "replace_page", - "1": "add_page", - "2": "delete_page", - "3": "swap_pages", - "4": "sign" - } - } - ] - }, - { - "name": "slot", - "type": "u8" - }, - { - "anon": true, - "type": [ - "switch", - { - "compareTo": "type", - "fields": { - "replace_page": [ - "container", - [ - { - "name": "page_number", - "type": "u8" - }, - { - "name": "text", - "type": "string" - }, - { - "name": "photo_name", - "type": "string" - } - ] - ], - "add_page": [ - "container", - [ - { - "name": "page_number", - "type": "u8" - }, - { - "name": "text", - "type": "string" - }, - { - "name": "photo_name", - "type": "string" - } - ] - ], - "delete_page": [ - "container", - [ - { - "name": "page_number", - "type": "u8" - } - ] - ], - "swap_pages": [ - "container", - [ - { - "name": "page1", - "type": "u8" - }, - { - "name": "page2", - "type": "u8" - } - ] - ], - "sign": [ - "container", - [ - { - "name": "title", - "type": "string" - }, - { - "name": "author", - "type": "string" - }, - { - "name": "xuid", - "type": "string" - } - ] - ] - }, - "default": "void" - } - ] - } - ] - ], - "packet_npc_request": [ - "container", - [ - { - "name": "runtime_entity_id", - "type": "varint64" - }, - { - "name": "request_type", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "0": "set_actions", - "1": "execute_action", - "2": "execute_closing_commands", - "3": "set_name", - "4": "set_skin", - "5": "set_interaction_text" - } - } - ] - }, - { - "name": "command", - "type": "string" - }, - { - "name": "action_type", - "type": "u8" - } - ] - ], - "packet_photo_transfer": [ - "container", - [ - { - "name": "image_name", - "type": "string" - }, - { - "name": "image_data", - "type": "string" - }, - { - "name": "book_id", - "type": "string" - } - ] - ], - "packet_modal_form_request": [ - "container", - [ - { - "name": "form_id", - "type": "varint" - }, - { - "name": "data", - "type": "string" - } - ] - ], - "packet_modal_form_response": [ - "container", - [ - { - "name": "form_id", - "type": "varint" - }, - { - "name": "data", - "type": "string" - } - ] - ], - "packet_server_settings_request": [ - "container", - [] - ], - "packet_server_settings_response": [ - "container", - [ - { - "name": "form_id", - "type": "varint" - }, - { - "name": "data", - "type": "string" - } - ] - ], - "packet_show_profile": [ - "container", - [ - { - "name": "xuid", - "type": "string" - } - ] - ], - "packet_set_default_game_type": [ - "container", - [ - { - "name": "gamemode", - "type": "GameMode" - } - ] - ], - "packet_remove_objective": [ - "container", - [ - { - "name": "objective_name", - "type": "string" - } - ] - ], - "packet_set_display_objective": [ - "container", - [ - { - "name": "display_slot", - "type": "string" - }, - { - "name": "objective_name", - "type": "string" - }, - { - "name": "display_name", - "type": "string" - }, - { - "name": "criteria_name", - "type": "string" - }, - { - "name": "sort_order", - "type": "zigzag32" - } - ] - ], - "packet_set_score": [ - "container", - [ - { - "name": "action", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "0": "change", - "1": "remove" - } - } - ] - }, - { - "name": "entries", - "type": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "scoreboard_id", - "type": "zigzag64" - }, - { - "name": "objective_name", - "type": "string" - }, - { - "name": "score", - "type": "li32" - }, - { - "anon": true, - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "change": [ - "container", - [ - { - "name": "entry_type", - "type": [ - "mapper", - { - "type": "i8", - "mappings": { - "1": "player", - "2": "entity", - "3": "fake_player" - } - } - ] - }, - { - "name": "entity_unique_id", - "type": [ - "switch", - { - "compareTo": "entry_type", - "fields": { - "player": "zigzag64", - "entity": "zigzag64" - }, - "default": "void" - } - ] - }, - { - "name": "custom_name", - "type": [ - "switch", - { - "compareTo": "entry_type", - "fields": { - "fake_player": "string" - }, - "default": "void" - } - ] - } - ] - ] - }, - "default": "void" - } - ] - } - ] - ] - } - ] - } - ] - ], - "packet_lab_table": [ - "container", - [ - { - "name": "action_type", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "0": "combine", - "1": "react" - } - } - ] - }, - { - "name": "position", - "type": "vec3u" - }, - { - "name": "reaction_type", - "type": "u8" - } - ] - ], - "packet_update_block_synced": [ - "container", - [ - { - "name": "position", - "type": "BlockCoordinates" - }, - { - "name": "block_runtime_id", - "type": "varint" - }, - { - "name": "flags", - "type": "UpdateBlockFlags" - }, - { - "name": "layer", - "type": "varint" - }, - { - "name": "entity_unique_id", - "type": "zigzag64" - }, - { - "name": "transition_type", - "type": [ - "mapper", - { - "type": "varint64", - "mappings": { - "0": "entity", - "1": "create", - "2": "destroy" - } - } - ] - } - ] - ], - "packet_move_entity_delta": [ - "container", - [ - { - "name": "runtime_entity_id", - "type": "varint64" - }, - { - "name": "flags", - "type": "DeltaMoveFlags" - }, - { - "name": "x", - "type": [ - "switch", - { - "compareTo": "flags.has_x", - "fields": { - "true": "lf32" - }, - "default": "void" - } - ] - }, - { - "name": "y", - "type": [ - "switch", - { - "compareTo": "flags.has_y", - "fields": { - "true": "lf32" - }, - "default": "void" - } - ] - }, - { - "name": "z", - "type": [ - "switch", - { - "compareTo": "flags.has_z", - "fields": { - "true": "lf32" - }, - "default": "void" - } - ] - }, - { - "name": "rot_x", - "type": [ - "switch", - { - "compareTo": "flags.has_rot_x", - "fields": { - "true": "u8" - }, - "default": "void" - } - ] - }, - { - "name": "rot_y", - "type": [ - "switch", - { - "compareTo": "flags.has_rot_y", - "fields": { - "true": "u8" - }, - "default": "void" - } - ] - }, - { - "name": "rot_z", - "type": [ - "switch", - { - "compareTo": "flags.has_rot_z", - "fields": { - "true": "u8" - }, - "default": "void" - } - ] - } - ] - ], - "packet_set_scoreboard_identity": [ - "container", - [ - { - "name": "action", - "type": [ - "mapper", - { - "type": "i8", - "mappings": { - "0": "register_identity", - "1": "clear_identity" - } - } - ] - }, - { - "name": "entries", - "type": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "scoreboard_id", - "type": "zigzag64" - }, - { - "name": "entity_unique_id", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "register_identity": "zigzag64" - }, - "default": "void" - } - ] - } - ] - ] - } - ] - } - ] - ], - "packet_set_local_player_as_initialized": [ - "container", - [ - { - "name": "runtime_entity_id", - "type": "varint64" - } - ] - ], - "packet_update_soft_enum": [ - "container", - [] - ], - "packet_network_stack_latency": [ - "container", - [ - { - "name": "timestamp", - "type": "lu64" - }, - { - "name": "needs_response", - "type": "u8" - } - ] - ], - "packet_script_custom_event": [ - "container", - [ - { - "name": "event_name", - "type": "string" - }, - { - "name": "event_data", - "type": "string" - } - ] - ], - "packet_spawn_particle_effect": [ - "container", - [ - { - "name": "dimension", - "type": "u8" - }, - { - "name": "entity_id", - "type": "zigzag64" - }, - { - "name": "position", - "type": "vec3f" - }, - { - "name": "particle_name", - "type": "string" - } - ] - ], - "packet_available_entity_identifiers": [ - "container", - [ - { - "name": "nbt", - "type": "nbt" - } - ] - ], - "packet_level_sound_event_v2": [ - "container", - [ - { - "name": "sound_id", - "type": "u8" - }, - { - "name": "position", - "type": "vec3f" - }, - { - "name": "block_id", - "type": "zigzag32" - }, - { - "name": "entity_type", - "type": "string" - }, - { - "name": "is_baby_mob", - "type": "bool" - }, - { - "name": "is_global", - "type": "bool" - } - ] - ], - "packet_network_chunk_publisher_update": [ - "container", - [ - { - "name": "coordinates", - "type": "BlockCoordinates" - }, - { - "name": "radius", - "type": "varint" - } - ] - ], - "packet_biome_definition_list": [ - "container", - [ - { - "name": "nbt", - "type": "nbt" - } - ] - ], - "packet_level_sound_event": [ - "container", - [ - { - "name": "sound_id", - "type": "SoundType" - }, - { - "name": "position", - "type": "vec3f" - }, - { - "name": "extra_data", - "type": "zigzag32" - }, - { - "name": "entity_type", - "type": "string" - }, - { - "name": "is_baby_mob", - "type": "bool" - }, - { - "name": "is_global", - "type": "bool" - } - ] - ], - "packet_level_event_generic": [ - "container", - [ - { - "name": "event_id", - "type": "varint" - }, - { - "name": "nbt", - "type": "nbtLoop" - } - ] - ], - "packet_lectern_update": [ - "container", - [ - { - "name": "page", - "type": "u8" - }, - { - "name": "page_count", - "type": "u8" - }, - { - "name": "position", - "type": "vec3i" - }, - { - "name": "drop_book", - "type": "bool" - } - ] - ], - "packet_video_stream_connect": [ - "container", - [ - { - "name": "server_uri", - "type": "string" - }, - { - "name": "frame_send_frequency", - "type": "lf32" - }, - { - "name": "action", - "type": "u8" - }, - { - "name": "resolution_x", - "type": "li32" - }, - { - "name": "resolution_y", - "type": "li32" - } - ] - ], - "packet_add_ecs_entity": [ - "container", - [ - { - "name": "network_id", - "type": "varint64" - } - ] - ], - "packet_remove_ecs_entity": [ - "container", - [ - { - "name": "network_id", - "type": "varint64" - } - ] - ], - "packet_client_cache_status": [ - "container", - [ - { - "name": "enabled", - "type": "bool" - } - ] - ], - "packet_on_screen_texture_animation": [ - "container", - [ - { - "name": "animation_type", - "type": "lu32" - } - ] - ], - "packet_map_create_locked_copy": [ - "container", - [ - { - "name": "original_map_id", - "type": "zigzag64" - }, - { - "name": "new_map_id", - "type": "zigzag64" - } - ] - ], - "packet_structure_template_data_export_request": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "position", - "type": "BlockCoordinates" - }, - { - "name": "settings", - "type": "StructureBlockSettings" - }, - { - "name": "request_type", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "1": "export_from_save", - "2": "export_from_load", - "3": "query_saved_structure" - } - } - ] - } - ] - ], - "packet_structure_template_data_export_response": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "success", - "type": "bool" - }, - { - "name": "nbt", - "type": [ - "switch", - { - "compareTo": "success", - "fields": { - "true": "nbt" - }, - "default": "void" - } - ] - }, - { - "name": "response_type", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "1": "export", - "2": "query" - } - } - ] - } - ] - ], - "packet_update_block_properties": [ - "container", - [ - { - "name": "nbt", - "type": "nbt" - } - ] - ], - "packet_client_cache_blob_status": [ - "container", - [ - { - "name": "misses", - "type": "varint" - }, - { - "name": "haves", - "type": "varint" - }, - { - "name": "missing", - "type": [ - "array", - { - "count": "misses", - "type": "lu64" - } - ] - }, - { - "name": "have", - "type": [ - "array", - { - "count": "haves", - "type": "lu64" - } - ] - } - ] - ], - "packet_client_cache_miss_response": [ - "container", - [ - { - "name": "blobs", - "type": [ - "array", - { - "countType": "varint", - "type": "Blob" - } - ] - } - ] - ], - "packet_education_settings": [ - "container", - [ - { - "name": "CodeBuilderDefaultURI", - "type": "string" - }, - { - "name": "CodeBuilderTitle", - "type": "string" - }, - { - "name": "CanResizeCodeBuilder", - "type": "bool" - }, - { - "name": "HasOverrideURI", - "type": "bool" - }, - { - "name": "OverrideURI", - "type": [ - "switch", - { - "compareTo": "HasOverrideURI", - "fields": { - "true": "string" - }, - "default": "void" - } - ] - }, - { - "name": "HasQuiz", - "type": "bool" - } - ] - ], - "packet_multiplayer_settings": [ - "container", - [ - { - "name": "action_type", - "type": [ - "mapper", - { - "type": "zigzag32", - "mappings": { - "0": "enable_multiplayer", - "1": "disable_multiplayer", - "2": "refresh_join_code" - } - } - ] - } - ] - ], - "packet_settings_command": [ - "container", - [ - { - "name": "command_line", - "type": "string" - }, - { - "name": "suppress_output", - "type": "bool" - } - ] - ], - "packet_anvil_damage": [ - "container", - [ - { - "name": "damage", - "type": "u8" - }, - { - "name": "position", - "type": "BlockCoordinates" - } - ] - ], - "packet_completed_using_item": [ - "container", - [ - { - "name": "used_item_id", - "type": "li16" - }, - { - "name": "use_method", - "type": [ - "mapper", - { - "type": "li32", - "mappings": { - "0": "equip_armor", - "1": "eat", - "2": "attack", - "3": "consume", - "4": "throw", - "5": "shoot", - "6": "place", - "7": "fill_bottle", - "8": "fill_bucket", - "9": "pour_bucket", - "10": "use_tool", - "11": "interact", - "12": "retrieved", - "13": "dyed", - "14": "traded" - } - } - ] - } - ] - ], - "packet_network_settings": [ - "container", - [ - { - "name": "compression_threshold", - "type": "u16" - } - ] - ], - "packet_player_auth_input": [ - "container", - [ - { - "name": "pitch", - "type": "lf32" - }, - { - "name": "yaw", - "type": "lf32" - }, - { - "name": "position", - "type": "vec3f" - }, - { - "name": "move_vector", - "type": "vec2f" - }, - { - "name": "head_yaw", - "type": "lf32" - }, - { - "name": "input_data", - "type": "InputFlag" - }, - { - "name": "input_mode", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "0": "unknown", - "1": "mouse", - "2": "touch", - "3": "game_pad", - "4": "motion_controller" - } - } - ] - }, - { - "name": "play_mode", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "0": "normal", - "1": "teaser", - "2": "screen", - "3": "viewer", - "4": "reality", - "5": "placement", - "6": "living_room", - "7": "exit_level", - "8": "exit_level_living_room", - "9": "num_modes" - } - } - ] - }, - { - "name": "gaze_direction", - "type": [ - "switch", - { - "compareTo": "play_mode", - "fields": { - "reality": "vec3f" - }, - "default": "void" - } - ] - }, - { - "name": "tick", - "type": "varint64" - }, - { - "name": "delta", - "type": "vec3f" - }, - { - "name": "transaction", - "type": [ - "switch", - { - "compareTo": "input_data.item_interact", - "fields": { - "true": [ - "container", - [ - { - "name": "legacy", - "type": "TransactionLegacy" - }, - { - "name": "actions", - "type": "TransactionActions" - }, - { - "name": "data", - "type": "TransactionUseItem" - } - ] - ] - }, - "default": "void" - } - ] - }, - { - "name": "item_stack_request", - "type": [ - "switch", - { - "compareTo": "input_data.item_stack_request", - "fields": { - "true": "ItemStackRequest" - }, - "default": "void" - } - ] - }, - { - "name": "block_action", - "type": [ - "switch", - { - "compareTo": "input_data.block_action", - "fields": { - "true": [ - "array", - { - "countType": "zigzag32", - "type": [ - "container", - [ - { - "name": "action", - "type": "Action" - }, - { - "anon": true, - "type": [ - "switch", - { - "compareTo": "action", - "fields": { - "start_break": [ - "container", - [ - { - "name": "position", - "type": "BlockCoordinates" - }, - { - "name": "face", - "type": "zigzag32" - } - ] - ], - "abort_break": [ - "container", - [ - { - "name": "position", - "type": "BlockCoordinates" - }, - { - "name": "face", - "type": "zigzag32" - } - ] - ], - "crack_break": [ - "container", - [ - { - "name": "position", - "type": "BlockCoordinates" - }, - { - "name": "face", - "type": "zigzag32" - } - ] - ], - "predict_break": [ - "container", - [ - { - "name": "position", - "type": "BlockCoordinates" - }, - { - "name": "face", - "type": "zigzag32" - } - ] - ], - "continue_break": [ - "container", - [ - { - "name": "position", - "type": "BlockCoordinates" - }, - { - "name": "face", - "type": "zigzag32" - } - ] - ] - }, - "default": "void" - } - ] - } - ] - ] - } - ] - }, - "default": "void" - } - ] - } - ] - ], - "packet_creative_content": [ - "container", - [ - { - "name": "items", - "type": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "entry_id", - "type": "varint" - }, - { - "name": "item", - "type": "ItemLegacy" - } - ] - ] - } - ] - } - ] - ], - "packet_player_enchant_options": [ - "container", - [ - { - "name": "options", - "type": [ - "array", - { - "countType": "varint", - "type": "EnchantOption" - } - ] - } - ] - ], - "packet_item_stack_request": [ - "container", - [ - { - "name": "requests", - "type": [ - "array", - { - "countType": "varint", - "type": "ItemStackRequest" - } - ] - } - ] - ], - "packet_item_stack_response": [ - "container", - [ - { - "name": "responses", - "type": "ItemStackResponses" - } - ] - ], - "packet_player_armor_damage": [ - "container", - [ - { - "name": "type", - "type": "ArmorDamageType" - }, - { - "name": "helmet_damage", - "type": [ - "switch", - { - "compareTo": "type.head", - "fields": { - "true": "zigzag32" - }, - "default": "void" - } - ] - }, - { - "name": "chestplate_damage", - "type": [ - "switch", - { - "compareTo": "type.chest", - "fields": { - "true": "zigzag32" - }, - "default": "void" - } - ] - }, - { - "name": "leggings_damage", - "type": [ - "switch", - { - "compareTo": "type.legs", - "fields": { - "true": "zigzag32" - }, - "default": "void" - } - ] - }, - { - "name": "boots_damage", - "type": [ - "switch", - { - "compareTo": "type.feet", - "fields": { - "true": "zigzag32" - }, - "default": "void" - } - ] - } - ] - ], - "packet_update_player_game_type": [ - "container", - [ - { - "name": "gamemode", - "type": "GameMode" - }, - { - "name": "player_unique_id", - "type": "zigzag64" - } - ] - ], - "packet_position_tracking_db_request": [ - "container", - [ - { - "name": "action", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "0": "query" - } - } - ] - }, - { - "name": "tracking_id", - "type": "zigzag32" - } - ] - ], - "packet_position_tracking_db_broadcast": [ - "container", - [ - { - "name": "broadcast_action", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "0": "update", - "1": "destory", - "2": "not_found" - } - } - ] - }, - { - "name": "tracking_id", - "type": "zigzag32" - }, - { - "name": "nbt", - "type": "nbt" - } - ] - ], - "packet_packet_violation_warning": [ - "container", - [ - { - "name": "violation_type", - "type": [ - "mapper", - { - "type": "zigzag32", - "mappings": { - "0": "malformed" - } - } - ] - }, - { - "name": "severity", - "type": [ - "mapper", - { - "type": "zigzag32", - "mappings": { - "0": "warning", - "1": "final_warning", - "2": "terminating" - } - } - ] - }, - { - "name": "packet_id", - "type": "zigzag32" - }, - { - "name": "reason", - "type": "string" - } - ] - ], - "packet_motion_prediction_hints": [ - "container", - [ - { - "name": "entity_runtime_id", - "type": "varint64" - }, - { - "name": "velocity", - "type": "vec3f" - }, - { - "name": "on_ground", - "type": "bool" - } - ] - ], - "packet_animate_entity": [ - "container", - [ - { - "name": "animation", - "type": "string" - }, - { - "name": "next_state", - "type": "string" - }, - { - "name": "stop_condition", - "type": "string" - }, - { - "name": "controller", - "type": "string" - }, - { - "name": "blend_out_time", - "type": "lf32" - }, - { - "name": "runtime_entity_ids", - "type": [ - "array", - { - "countType": "varint", - "type": "varint64" - } - ] - } - ] - ], - "packet_camera_shake": [ - "container", - [ - { - "name": "intensity", - "type": "lf32" - }, - { - "name": "duration", - "type": "lf32" - }, - { - "name": "type", - "type": "u8" - }, - { - "name": "action", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "0": "add", - "1": "stop" - } - } - ] - } - ] - ], - "packet_player_fog": [ - "container", - [ - { - "name": "stack", - "type": [ - "array", - { - "countType": "varint", - "type": "string" - } - ] - } - ] - ], - "packet_correct_player_move_prediction": [ - "container", - [ - { - "name": "position", - "type": "vec3f" - }, - { - "name": "delta", - "type": "vec3f" - }, - { - "name": "on_ground", - "type": "bool" - }, - { - "name": "tick", - "type": "varint64" - } - ] - ], - "packet_item_component": [ - "container", - [ - { - "name": "entries", - "type": "ItemComponentList" - } - ] - ], - "packet_filter_text_packet": [ - "container", - [ - { - "name": "text", - "type": "string" - }, - { - "name": "from_server", - "type": "bool" - } - ] - ], - "packet_debug_renderer": [ - "container", - [ - { - "name": "type", - "type": [ - "mapper", - { - "type": "li32", - "mappings": { - "1": "clear", - "2": "add_cube" - } - } - ] - }, - { - "anon": true, - "type": [ - "switch", - { - "compareTo": "type", - "fields": { - "clear": "void", - "add_cube": [ - "container", - [ - { - "name": "text", - "type": "string" - }, - { - "name": "position", - "type": "vec3f" - }, - { - "name": "red", - "type": "lf32" - }, - { - "name": "green", - "type": "lf32" - }, - { - "name": "blue", - "type": "lf32" - }, - { - "name": "alpha", - "type": "lf32" - }, - { - "name": "duration", - "type": "li64" - } - ] - ] - }, - "default": "void" - } - ] - } - ] - ], - "packet_sync_entity_property": [ - "container", - [ - { - "name": "nbt", - "type": "nbt" - } - ] - ], - "packet_add_volume_entity": [ - "container", - [ - { - "name": "entity_id", - "type": "varint64" - }, - { - "name": "nbt", - "type": "nbt" - } - ] - ], - "packet_remove_volume_entity": [ - "container", - [ - { - "name": "entity_id", - "type": "varint64" - } - ] - ], - "string": [ - "pstring", - { - "countType": "varint" - } - ], - "ByteArray": [ - "buffer", - { - "countType": "varint" - } - ], - "SignedByteArray": [ - "buffer", - { - "countType": "zigzag32" - } - ], - "LittleString": [ - "pstring", - { - "countType": "li32" - } - ], - "ShortArray": [ - "buffer", - { - "countType": "li16" - } - ], - "MetadataFlags1": [ - "bitflags", - { - "type": "zigzag64", - "big": true, - "flags": [ - "onfire", - "sneaking", - "riding", - "sprinting", - "action", - "invisible", - "tempted", - "inlove", - "saddled", - "powered", - "ignited", - "baby", - "converting", - "critical", - "can_show_nametag", - "always_show_nametag", - "no_ai", - "silent", - "wallclimbing", - "can_climb", - "swimmer", - "can_fly", - "walker", - "resting", - "sitting", - "angry", - "interested", - "charged", - "tamed", - "orphaned", - "leashed", - "sheared", - "gliding", - "elder", - "moving", - "breathing", - "chested", - "stackable", - "showbase", - "rearing", - "vibrating", - "idling", - "evoker_spell", - "charge_attack", - "wasd_controlled", - "can_power_jump", - "linger", - "has_collision", - "affected_by_gravity", - "fire_immune", - "dancing", - "enchanted", - "show_trident_rope", - "container_private", - "transforming", - "spin_attack", - "swimming", - "bribed", - "pregnant", - "laying_egg", - "rider_can_pick", - "transition_sitting", - "eating", - "laying_down" - ] - } - ], - "MetadataFlags2": [ - "bitflags", - { - "type": "zigzag64", - "big": true, - "flags": [ - "sneezing", - "trusting", - "rolling", - "scared", - "in_scaffolding", - "over_scaffolding", - "fall_through_scaffolding", - "blocking", - "transition_blocking", - "blocked_using_shield", - "blocked_using_damaged_shield", - "sleeping", - "wants_to_wake", - "trade_interest", - "door_breaker", - "breaking_obstruction", - "door_opener", - "illager_captain", - "stunned", - "roaring", - "delayed_attacking", - "avoiding_mobs", - "avoiding_block", - "facing_target_to_range_attack", - "hidden_when_invisible", - "is_in_ui", - "stalking", - "emoting", - "celebrating", - "admiring", - "celebrating_special", - "unknown95", - "ram_attack", - "playing_dead" - ] - } - ], - "UpdateBlockFlags": [ - "bitflags", - { - "type": "varint", - "flags": { - "neighbors": 1, - "network": 2, - "no_graphic": 4, - "unused": 8, - "priority": 16 - } - } - ], - "AdventureFlags": [ - "bitflags", - { - "type": "varint", - "flags": { - "world_immutable": 1, - "no_pvp": 2, - "auto_jump": 32, - "allow_flight": 64, - "no_clip": 128, - "world_builder": 256, - "flying": 512, - "muted": 1024 - } - } - ], - "ActionPermissions": [ - "bitflags", - { - "type": "varint", - "flags": { - "mine": 65537, - "doors_and_switches": 65538, - "open_containers": 65540, - "attack_players": 65544, - "attack_mobs": 65552, - "operator": 65568, - "teleport": 65664, - "build": 65792, - "default": 66048 - } - } - ], - "UpdateMapFlags": [ - "bitflags", - { - "type": "varint", - "flags": [ - "void", - "texture", - "decoration", - "initialisation" - ] - } - ], - "CommandFlags": [ - "bitfield", - [ - { - "name": "unused", - "size": 6, - "signed": false - }, - { - "name": "has_semantic_constraint", - "size": 1, - "signed": false - }, - { - "name": "collapse_enum", - "size": 1, - "signed": false - } - ] - ], - "DeltaMoveFlags": [ - "bitflags", - { - "type": "lu16", - "flags": { - "has_x": 1, - "has_y": 2, - "has_z": 4, - "has_rot_x": 8, - "has_rot_y": 16, - "has_rot_z": 32, - "on_ground": 64, - "teleport": 128, - "force_move": 256 - } - } - ], - "InputFlag": [ - "bitflags", - { - "type": "varint64", - "big": true, - "flags": [ - "ascend", - "descend", - "north_jump", - "jump_down", - "sprint_down", - "change_height", - "jumping", - "auto_jumping_in_water", - "sneaking", - "sneak_down", - "up", - "down", - "left", - "right", - "up_left", - "up_right", - "want_up", - "want_down", - "want_down_slow", - "want_up_slow", - "sprinting", - "ascend_scaffolding", - "descend_scaffolding", - "sneak_toggle_down", - "persist_sneak", - "start_sprinting", - "stop_sprinting", - "start_sneaking", - "stop_sneaking", - "start_swimming", - "stop_swimming", - "start_jumping", - "start_gliding", - "stop_gliding", - "item_interact", - "block_action", - "item_stack_request" - ] - } - ], - "ArmorDamageType": [ - "bitflags", - { - "type": "u8", - "flags": { - "head": 1, - "chest": 2, - "legs": 4, - "feet": 8 - } - } - ] - } -} \ No newline at end of file diff --git a/data/1.17.10/protocol.json b/data/1.17.10/protocol.json deleted file mode 100644 index 21d4fac..0000000 --- a/data/1.17.10/protocol.json +++ /dev/null @@ -1,9081 +0,0 @@ -{ - "types": { - "varint64": "native", - "zigzag32": "native", - "zigzag64": "native", - "uuid": "native", - "byterot": "native", - "bitflags": "native", - "restBuffer": "native", - "encapsulated": "native", - "nbt": "native", - "lnbt": "native", - "nbtLoop": "native", - "enum_size_based_on_values_len": "native", - "MapInfo": "native", - "BehaviourPackInfos": [ - "array", - { - "countType": "li16", - "type": [ - "container", - [ - { - "name": "uuid", - "type": "string" - }, - { - "name": "version", - "type": "string" - }, - { - "name": "size", - "type": "lu64" - }, - { - "name": "content_key", - "type": "string" - }, - { - "name": "sub_pack_name", - "type": "string" - }, - { - "name": "content_identity", - "type": "string" - }, - { - "name": "has_scripts", - "type": "bool" - } - ] - ] - } - ], - "TexturePackInfos": [ - "array", - { - "countType": "li16", - "type": [ - "container", - [ - { - "name": "uuid", - "type": "string" - }, - { - "name": "version", - "type": "string" - }, - { - "name": "size", - "type": "lu64" - }, - { - "name": "content_key", - "type": "string" - }, - { - "name": "sub_pack_name", - "type": "string" - }, - { - "name": "content_identity", - "type": "string" - }, - { - "name": "has_scripts", - "type": "bool" - }, - { - "name": "rtx_enabled", - "type": "bool" - } - ] - ] - } - ], - "ResourcePackIdVersions": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "uuid", - "type": "string" - }, - { - "name": "version", - "type": "string" - }, - { - "name": "name", - "type": "string" - } - ] - ] - } - ], - "ResourcePackIds": [ - "array", - { - "countType": "li16", - "type": "string" - } - ], - "Experiment": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "enabled", - "type": "bool" - } - ] - ], - "Experiments": [ - "array", - { - "countType": "li32", - "type": "Experiment" - } - ], - "GameMode": [ - "mapper", - { - "type": "zigzag32", - "mappings": { - "0": "survival", - "1": "creative", - "2": "adventure", - "3": "survival_spectator", - "4": "creative_spectator", - "5": "fallback" - } - } - ], - "GameRule": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "editable", - "type": "bool" - }, - { - "name": "type", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "1": "bool", - "2": "int", - "3": "float" - } - } - ] - }, - { - "name": "value", - "type": [ - "switch", - { - "compareTo": "type", - "fields": { - "bool": "bool", - "int": "zigzag32", - "float": "lf32" - }, - "default": "void" - } - ] - } - ] - ], - "GameRules": [ - "array", - { - "countType": "varint", - "type": "GameRule" - } - ], - "Blob": [ - "container", - [ - { - "name": "hash", - "type": "lu64" - }, - { - "name": "payload", - "type": "ByteArray" - } - ] - ], - "BlockProperties": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "state", - "type": "nbt" - } - ] - ] - } - ], - "Itemstates": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "runtime_id", - "type": "li16" - }, - { - "name": "component_based", - "type": "bool" - } - ] - ] - } - ], - "ItemExtraDataWithBlockingTick": [ - "container", - [ - { - "name": "has_nbt", - "type": [ - "mapper", - { - "type": "lu16", - "mappings": { - "0": "false", - "65535": "true" - } - } - ] - }, - { - "name": "nbt", - "type": [ - "switch", - { - "compareTo": "has_nbt", - "fields": { - "true": [ - "container", - [ - { - "name": "version", - "type": "u8" - }, - { - "name": "nbt", - "type": "lnbt" - } - ] - ] - }, - "default": "void" - } - ] - }, - { - "name": "can_place_on", - "type": [ - "array", - { - "countType": "li32", - "type": "ShortArray" - } - ] - }, - { - "name": "can_destroy", - "type": [ - "array", - { - "countType": "li32", - "type": "ShortArray" - } - ] - }, - { - "name": "blocking_tick", - "type": "li64" - } - ] - ], - "ItemExtraDataWithoutBlockingTick": [ - "container", - [ - { - "name": "has_nbt", - "type": [ - "mapper", - { - "type": "lu16", - "mappings": { - "0": "false", - "65535": "true" - } - } - ] - }, - { - "name": "nbt", - "type": [ - "switch", - { - "compareTo": "has_nbt", - "fields": { - "true": [ - "container", - [ - { - "name": "version", - "type": "u8" - }, - { - "name": "nbt", - "type": "lnbt" - } - ] - ] - }, - "default": "void" - } - ] - }, - { - "name": "can_place_on", - "type": [ - "array", - { - "countType": "li32", - "type": "ShortArray" - } - ] - }, - { - "name": "can_destroy", - "type": [ - "array", - { - "countType": "li32", - "type": "ShortArray" - } - ] - } - ] - ], - "ItemLegacy": [ - "container", - [ - { - "name": "network_id", - "type": "zigzag32" - }, - { - "anon": true, - "type": [ - "switch", - { - "compareTo": "network_id", - "fields": { - "0": "void" - }, - "default": [ - "container", - [ - { - "name": "count", - "type": "lu16" - }, - { - "name": "metadata", - "type": "varint" - }, - { - "name": "block_runtime_id", - "type": "zigzag32" - }, - { - "name": "extra", - "type": [ - "switch", - { - "compareTo": "network_id", - "fields": { - "/ShieldItemID": [ - "encapsulated", - { - "lengthType": "varint", - "type": "ItemExtraDataWithBlockingTick" - } - ] - }, - "default": [ - "encapsulated", - { - "lengthType": "varint", - "type": "ItemExtraDataWithoutBlockingTick" - } - ] - } - ] - } - ] - ] - } - ] - } - ] - ], - "Item": [ - "container", - [ - { - "name": "network_id", - "type": "zigzag32" - }, - { - "anon": true, - "type": [ - "switch", - { - "compareTo": "network_id", - "fields": { - "0": "void" - }, - "default": [ - "container", - [ - { - "name": "count", - "type": "lu16" - }, - { - "name": "metadata", - "type": "varint" - }, - { - "name": "has_stack_id", - "type": "u8" - }, - { - "name": "stack_id", - "type": [ - "switch", - { - "compareTo": "has_stack_id", - "fields": { - "0": "void" - }, - "default": "zigzag32" - } - ] - }, - { - "name": "block_runtime_id", - "type": "zigzag32" - }, - { - "name": "extra", - "type": [ - "switch", - { - "compareTo": "network_id", - "fields": { - "/ShieldItemID": [ - "encapsulated", - { - "lengthType": "varint", - "type": "ItemExtraDataWithBlockingTick" - } - ] - }, - "default": [ - "encapsulated", - { - "lengthType": "varint", - "type": "ItemExtraDataWithoutBlockingTick" - } - ] - } - ] - } - ] - ] - } - ] - } - ] - ], - "vec3i": [ - "container", - [ - { - "name": "x", - "type": "zigzag32" - }, - { - "name": "y", - "type": "zigzag32" - }, - { - "name": "z", - "type": "zigzag32" - } - ] - ], - "vec3u": [ - "container", - [ - { - "name": "x", - "type": "varint" - }, - { - "name": "y", - "type": "varint" - }, - { - "name": "z", - "type": "varint" - } - ] - ], - "vec3f": [ - "container", - [ - { - "name": "x", - "type": "lf32" - }, - { - "name": "y", - "type": "lf32" - }, - { - "name": "z", - "type": "lf32" - } - ] - ], - "vec2f": [ - "container", - [ - { - "name": "x", - "type": "lf32" - }, - { - "name": "z", - "type": "lf32" - } - ] - ], - "MetadataDictionary": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "key", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "0": "flags", - "1": "health", - "2": "variant", - "3": "color", - "4": "nametag", - "5": "owner_eid", - "6": "target_eid", - "7": "air", - "8": "potion_color", - "9": "potion_ambient", - "10": "jump_duration", - "11": "hurt_time", - "12": "hurt_direction", - "13": "paddle_time_left", - "14": "paddle_time_right", - "15": "experience_value", - "16": "minecart_display_block", - "17": "minecart_display_offset", - "18": "minecart_has_display", - "20": "old_swell", - "21": "swell_dir", - "22": "charge_amount", - "23": "enderman_held_runtime_id", - "24": "entity_age", - "26": "player_flags", - "27": "player_index", - "28": "player_bed_position", - "29": "fireball_power_x", - "30": "fireball_power_y", - "31": "fireball_power_z", - "32": "aux_power", - "33": "fish_x", - "34": "fish_z", - "35": "fish_angle", - "36": "potion_aux_value", - "37": "lead_holder_eid", - "38": "scale", - "39": "interactive_tag", - "40": "npc_skin_id", - "41": "url_tag", - "42": "max_airdata_max_air", - "43": "mark_variant", - "44": "container_type", - "45": "container_base_size", - "46": "container_extra_slots_per_strength", - "47": "block_target", - "48": "wither_invulnerable_ticks", - "49": "wither_target_1", - "50": "wither_target_2", - "51": "wither_target_3", - "52": "aerial_attack", - "53": "boundingbox_width", - "54": "boundingbox_height", - "55": "fuse_length", - "56": "rider_seat_position", - "57": "rider_rotation_locked", - "58": "rider_max_rotation", - "59": "rider_min_rotation", - "60": "rider_rotation_offset", - "61": "area_effect_cloud_radius", - "62": "area_effect_cloud_waiting", - "63": "area_effect_cloud_particle_id", - "64": "shulker_peek_id", - "65": "shulker_attach_face", - "66": "shulker_attached", - "67": "shulker_attach_pos", - "68": "trading_player_eid", - "69": "trading_career", - "70": "has_command_block", - "71": "command_block_command", - "72": "command_block_last_output", - "73": "command_block_track_output", - "74": "controlling_rider_seat_number", - "75": "strength", - "76": "max_strength", - "77": "spell_casting_color", - "78": "limited_life", - "79": "armor_stand_pose_index", - "80": "ender_crystal_time_offset", - "81": "always_show_nametag", - "82": "color_2", - "83": "name_author", - "84": "score_tag", - "85": "balloon_attached_entity", - "86": "pufferfish_size", - "87": "bubble_time", - "88": "agent", - "89": "sitting_amount", - "90": "sitting_amount_previous", - "91": "eating_counter", - "92": "flags_extended", - "93": "laying_amount", - "94": "laying_amount_previous", - "95": "duration", - "96": "spawn_time", - "97": "change_rate", - "98": "change_on_pickup", - "99": "pickup_count", - "100": "interact_text", - "101": "trade_tier", - "102": "max_trade_tier", - "103": "trade_experience", - "104": "skin_id", - "105": "spawning_frames", - "106": "command_block_tick_delay", - "107": "command_block_execute_on_first_tick", - "108": "ambient_sound_interval", - "109": "ambient_sound_interval_range", - "110": "ambient_sound_event_name", - "111": "fall_damage_multiplier", - "112": "name_raw_text", - "113": "can_ride_target", - "114": "low_tier_cured_discount", - "115": "high_tier_cured_discount", - "116": "nearby_cured_discount", - "117": "nearby_cured_discount_timestamp", - "118": "hitbox", - "119": "is_buoyant", - "120": "base_runtime_id", - "121": "freezing_effect_strength", - "122": "buoyancy_data", - "123": "goat_horn_count", - "124": "update_properties" - } - } - ] - }, - { - "name": "type", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "0": "byte", - "1": "short", - "2": "int", - "3": "float", - "4": "string", - "5": "compound", - "6": "vec3i", - "7": "long", - "8": "vec3f" - } - } - ] - }, - { - "name": "value", - "type": [ - "switch", - { - "compareTo": "key", - "fields": { - "flags": "MetadataFlags1", - "flags_extended": "MetadataFlags2" - }, - "default": [ - "switch", - { - "compareTo": "type", - "fields": { - "byte": "i8", - "short": "li16", - "int": "zigzag32", - "float": "lf32", - "string": "string", - "compound": "nbt", - "vec3i": "vec3i", - "long": "zigzag64", - "vec3f": "vec3f" - }, - "default": "void" - } - ] - } - ] - } - ] - ] - } - ], - "Link": [ - "container", - [ - { - "name": "ridden_entity_id", - "type": "zigzag64" - }, - { - "name": "rider_entity_id", - "type": "zigzag64" - }, - { - "name": "type", - "type": "u8" - }, - { - "name": "immediate", - "type": "bool" - }, - { - "name": "rider_initiated", - "type": "bool" - } - ] - ], - "Links": [ - "array", - { - "countType": "varint", - "type": "Link" - } - ], - "EntityAttributes": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "min", - "type": "lf32" - }, - { - "name": "value", - "type": "lf32" - }, - { - "name": "max", - "type": "lf32" - } - ] - ] - } - ], - "Rotation": [ - "container", - [ - { - "name": "yaw", - "type": "byterot" - }, - { - "name": "pitch", - "type": "byterot" - }, - { - "name": "head_yaw", - "type": "byterot" - } - ] - ], - "BlockCoordinates": [ - "container", - [ - { - "name": "x", - "type": "zigzag32" - }, - { - "name": "y", - "type": "varint" - }, - { - "name": "z", - "type": "zigzag32" - } - ] - ], - "PlayerAttributes": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "min", - "type": "lf32" - }, - { - "name": "max", - "type": "lf32" - }, - { - "name": "current", - "type": "lf32" - }, - { - "name": "default", - "type": "lf32" - }, - { - "name": "name", - "type": "string" - } - ] - ] - } - ], - "TransactionUseItem": [ - "container", - [ - { - "name": "action_type", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "0": "click_block", - "1": "click_air", - "2": "break_block" - } - } - ] - }, - { - "name": "block_position", - "type": "vec3i" - }, - { - "name": "face", - "type": "varint" - }, - { - "name": "hotbar_slot", - "type": "varint" - }, - { - "name": "held_item", - "type": "Item" - }, - { - "name": "player_pos", - "type": "vec3f" - }, - { - "name": "click_pos", - "type": "vec3f" - }, - { - "name": "block_runtime_id", - "type": "varint" - } - ] - ], - "TransactionActions": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "source_type", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "0": "container", - "1": "global", - "2": "world_interaction", - "3": "creative", - "100": "craft_slot", - "99999": "craft" - } - } - ] - }, - { - "anon": true, - "type": [ - "switch", - { - "compareTo": "source_type", - "fields": { - "container": [ - "container", - [ - { - "name": "inventory_id", - "type": "WindowIDVarint" - } - ] - ], - "craft": [ - "container", - [ - { - "name": "action", - "type": "varint" - } - ] - ], - "world_interaction": [ - "container", - [ - { - "name": "flags", - "type": "varint" - } - ] - ], - "craft_slot": [ - "container", - [ - { - "name": "action", - "type": "varint" - } - ] - ] - }, - "default": "void" - } - ] - }, - { - "name": "slot", - "type": "varint" - }, - { - "name": "old_item", - "type": "Item" - }, - { - "name": "new_item", - "type": "Item" - } - ] - ] - } - ], - "TransactionLegacy": [ - "container", - [ - { - "name": "legacy_request_id", - "type": "zigzag32" - }, - { - "name": "legacy_transactions", - "type": [ - "switch", - { - "compareTo": "legacy_request_id", - "fields": { - "0": "void" - }, - "default": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "container_id", - "type": "u8" - }, - { - "name": "changed_slots", - "type": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "slot_id", - "type": "u8" - } - ] - ] - } - ] - } - ] - ] - } - ] - } - ] - } - ] - ], - "Transaction": [ - "container", - [ - { - "name": "legacy", - "type": "TransactionLegacy" - }, - { - "name": "transaction_type", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "0": "normal", - "1": "inventory_mismatch", - "2": "item_use", - "3": "item_use_on_entity", - "4": "item_release" - } - } - ] - }, - { - "name": "actions", - "type": "TransactionActions" - }, - { - "name": "transaction_data", - "type": [ - "switch", - { - "compareTo": "transaction_type", - "fields": { - "normal": "void", - "inventory_mismatch": "void", - "item_use": "TransactionUseItem", - "item_use_on_entity": [ - "container", - [ - { - "name": "entity_runtime_id", - "type": "varint64" - }, - { - "name": "action_type", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "0": "interact", - "1": "attack" - } - } - ] - }, - { - "name": "hotbar_slot", - "type": "zigzag32" - }, - { - "name": "held_item", - "type": "Item" - }, - { - "name": "player_pos", - "type": "vec3f" - }, - { - "name": "click_pos", - "type": "vec3f" - } - ] - ], - "item_release": [ - "container", - [ - { - "name": "action_type", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "0": "release", - "1": "consume" - } - } - ] - }, - { - "name": "hotbar_slot", - "type": "zigzag32" - }, - { - "name": "held_item", - "type": "Item" - }, - { - "name": "head_pos", - "type": "vec3f" - } - ] - ] - }, - "default": "void" - } - ] - } - ] - ], - "ItemStacks": [ - "array", - { - "countType": "varint", - "type": "Item" - } - ], - "RecipeIngredient": [ - "container", - [ - { - "name": "network_id", - "type": "zigzag32" - }, - { - "anon": true, - "type": [ - "switch", - { - "compareTo": "network_id", - "fields": { - "0": "void" - }, - "default": [ - "container", - [ - { - "name": "network_data", - "type": "zigzag32" - }, - { - "name": "count", - "type": "zigzag32" - } - ] - ] - } - ] - } - ] - ], - "PotionTypeRecipes": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "input_item_id", - "type": "zigzag32" - }, - { - "name": "input_item_meta", - "type": "zigzag32" - }, - { - "name": "ingredient_id", - "type": "zigzag32" - }, - { - "name": "ingredient_meta", - "type": "zigzag32" - }, - { - "name": "output_item_id", - "type": "zigzag32" - }, - { - "name": "output_item_meta", - "type": "zigzag32" - } - ] - ] - } - ], - "PotionContainerChangeRecipes": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "input_item_id", - "type": "zigzag32" - }, - { - "name": "ingredient_id", - "type": "zigzag32" - }, - { - "name": "output_item_id", - "type": "zigzag32" - } - ] - ] - } - ], - "Recipes": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "type", - "type": [ - "mapper", - { - "type": "zigzag32", - "mappings": { - "0": "shapeless", - "1": "shaped", - "2": "furnace", - "3": "furnace_with_metadata", - "4": "multi", - "5": "shulker_box", - "6": "shapeless_chemistry", - "7": "shaped_chemistry" - } - } - ] - }, - { - "name": "recipe", - "type": [ - "switch", - { - "compareTo": "type", - "fields": { - "shapeless": [ - "container", - [ - { - "name": "recipe_id", - "type": "string" - }, - { - "name": "input", - "type": [ - "array", - { - "countType": "varint", - "type": "RecipeIngredient" - } - ] - }, - { - "name": "output", - "type": [ - "array", - { - "countType": "varint", - "type": "ItemLegacy" - } - ] - }, - { - "name": "uuid", - "type": "uuid" - }, - { - "name": "block", - "type": "string" - }, - { - "name": "priority", - "type": "zigzag32" - }, - { - "name": "network_id", - "type": "varint" - } - ] - ], - "shulker_box": [ - "container", - [ - { - "name": "recipe_id", - "type": "string" - }, - { - "name": "input", - "type": [ - "array", - { - "countType": "varint", - "type": "RecipeIngredient" - } - ] - }, - { - "name": "output", - "type": [ - "array", - { - "countType": "varint", - "type": "ItemLegacy" - } - ] - }, - { - "name": "uuid", - "type": "uuid" - }, - { - "name": "block", - "type": "string" - }, - { - "name": "priority", - "type": "zigzag32" - }, - { - "name": "network_id", - "type": "varint" - } - ] - ], - "shapeless_chemistry": [ - "container", - [ - { - "name": "recipe_id", - "type": "string" - }, - { - "name": "input", - "type": [ - "array", - { - "countType": "varint", - "type": "RecipeIngredient" - } - ] - }, - { - "name": "output", - "type": [ - "array", - { - "countType": "varint", - "type": "ItemLegacy" - } - ] - }, - { - "name": "uuid", - "type": "uuid" - }, - { - "name": "block", - "type": "string" - }, - { - "name": "priority", - "type": "zigzag32" - }, - { - "name": "network_id", - "type": "varint" - } - ] - ], - "shaped": [ - "container", - [ - { - "name": "recipe_id", - "type": "string" - }, - { - "name": "width", - "type": "zigzag32" - }, - { - "name": "height", - "type": "zigzag32" - }, - { - "name": "input", - "type": [ - "array", - { - "count": "width", - "type": [ - "array", - { - "count": "height", - "type": "RecipeIngredient" - } - ] - } - ] - }, - { - "name": "output", - "type": [ - "array", - { - "countType": "varint", - "type": "ItemLegacy" - } - ] - }, - { - "name": "uuid", - "type": "uuid" - }, - { - "name": "block", - "type": "string" - }, - { - "name": "priority", - "type": "zigzag32" - }, - { - "name": "network_id", - "type": "varint" - } - ] - ], - "shaped_chemistry": [ - "container", - [ - { - "name": "recipe_id", - "type": "string" - }, - { - "name": "width", - "type": "zigzag32" - }, - { - "name": "height", - "type": "zigzag32" - }, - { - "name": "input", - "type": [ - "array", - { - "count": "width", - "type": [ - "array", - { - "count": "height", - "type": "RecipeIngredient" - } - ] - } - ] - }, - { - "name": "output", - "type": [ - "array", - { - "countType": "varint", - "type": "ItemLegacy" - } - ] - }, - { - "name": "uuid", - "type": "uuid" - }, - { - "name": "block", - "type": "string" - }, - { - "name": "priority", - "type": "zigzag32" - }, - { - "name": "network_id", - "type": "varint" - } - ] - ], - "furnace": [ - "container", - [ - { - "name": "input_id", - "type": "zigzag32" - }, - { - "name": "output", - "type": "ItemLegacy" - }, - { - "name": "block", - "type": "string" - } - ] - ], - "furnace_with_metadata": [ - "container", - [ - { - "name": "input_id", - "type": "zigzag32" - }, - { - "name": "input_meta", - "type": "zigzag32" - }, - { - "name": "output", - "type": "ItemLegacy" - }, - { - "name": "block", - "type": "string" - } - ] - ], - "multi": [ - "container", - [ - { - "name": "uuid", - "type": "uuid" - }, - { - "name": "network_id", - "type": "varint" - } - ] - ] - }, - "default": "void" - } - ] - } - ] - ] - } - ], - "SkinImage": [ - "container", - [ - { - "name": "width", - "type": "li32" - }, - { - "name": "height", - "type": "li32" - }, - { - "name": "data", - "type": "ByteArray" - } - ] - ], - "Skin": [ - "container", - [ - { - "name": "skin_id", - "type": "string" - }, - { - "name": "play_fab_id", - "type": "string" - }, - { - "name": "skin_resource_pack", - "type": "string" - }, - { - "name": "skin_data", - "type": "SkinImage" - }, - { - "name": "animations", - "type": [ - "array", - { - "countType": "li32", - "type": [ - "container", - [ - { - "name": "skin_image", - "type": "SkinImage" - }, - { - "name": "animation_type", - "type": "li32" - }, - { - "name": "animation_frames", - "type": "lf32" - }, - { - "name": "expression_type", - "type": "lf32" - } - ] - ] - } - ] - }, - { - "name": "cape_data", - "type": "SkinImage" - }, - { - "name": "geometry_data", - "type": "string" - }, - { - "name": "animation_data", - "type": "string" - }, - { - "name": "premium", - "type": "bool" - }, - { - "name": "persona", - "type": "bool" - }, - { - "name": "cape_on_classic", - "type": "bool" - }, - { - "name": "cape_id", - "type": "string" - }, - { - "name": "full_skin_id", - "type": "string" - }, - { - "name": "arm_size", - "type": "string" - }, - { - "name": "skin_color", - "type": "string" - }, - { - "name": "personal_pieces", - "type": [ - "array", - { - "countType": "li32", - "type": [ - "container", - [ - { - "name": "piece_id", - "type": "string" - }, - { - "name": "piece_type", - "type": "string" - }, - { - "name": "pack_id", - "type": "string" - }, - { - "name": "is_default_piece", - "type": "bool" - }, - { - "name": "product_id", - "type": "string" - } - ] - ] - } - ] - }, - { - "name": "piece_tint_colors", - "type": [ - "array", - { - "countType": "li32", - "type": [ - "container", - [ - { - "name": "piece_type", - "type": "string" - }, - { - "name": "colors", - "type": [ - "array", - { - "countType": "li32", - "type": "string" - } - ] - } - ] - ] - } - ] - } - ] - ], - "PlayerRecords": [ - "container", - [ - { - "name": "type", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "0": "add", - "1": "remove" - } - } - ] - }, - { - "name": "records_count", - "type": "varint" - }, - { - "name": "records", - "type": [ - "array", - { - "count": "records_count", - "type": [ - "switch", - { - "compareTo": "type", - "fields": { - "add": [ - "container", - [ - { - "name": "uuid", - "type": "uuid" - }, - { - "name": "entity_unique_id", - "type": "zigzag64" - }, - { - "name": "username", - "type": "string" - }, - { - "name": "xbox_user_id", - "type": "string" - }, - { - "name": "platform_chat_id", - "type": "string" - }, - { - "name": "build_platform", - "type": "li32" - }, - { - "name": "skin_data", - "type": "Skin" - }, - { - "name": "is_teacher", - "type": "bool" - }, - { - "name": "is_host", - "type": "bool" - } - ] - ], - "remove": [ - "container", - [ - { - "name": "uuid", - "type": "uuid" - } - ] - ] - }, - "default": "void" - } - ] - } - ] - }, - { - "name": "verified", - "type": [ - "switch", - { - "compareTo": "type", - "fields": { - "add": [ - "array", - { - "count": "records_count", - "type": "bool" - } - ] - }, - "default": "void" - } - ] - } - ] - ], - "Enchant": [ - "container", - [ - { - "name": "id", - "type": "u8" - }, - { - "name": "level", - "type": "u8" - } - ] - ], - "EnchantOption": [ - "container", - [ - { - "name": "cost", - "type": "varint" - }, - { - "name": "slot_flags", - "type": "li32" - }, - { - "name": "equip_enchants", - "type": [ - "array", - { - "countType": "varint", - "type": "Enchant" - } - ] - }, - { - "name": "held_enchants", - "type": [ - "array", - { - "countType": "varint", - "type": "Enchant" - } - ] - }, - { - "name": "self_enchants", - "type": [ - "array", - { - "countType": "varint", - "type": "Enchant" - } - ] - }, - { - "name": "name", - "type": "string" - }, - { - "name": "option_id", - "type": "zigzag32" - } - ] - ], - "Action": [ - "mapper", - { - "type": "zigzag32", - "mappings": { - "0": "start_break", - "1": "abort_break", - "2": "stop_break", - "3": "get_updated_block", - "4": "drop_item", - "5": "start_sleeping", - "6": "stop_sleeping", - "7": "respawn", - "8": "jump", - "9": "start_sprint", - "10": "stop_sprint", - "11": "start_sneak", - "12": "stop_sneak", - "13": "creative_player_destroy_block", - "14": "dimension_change_ack", - "15": "start_glide", - "16": "stop_glide", - "17": "build_denied", - "18": "crack_break", - "19": "change_skin", - "20": "set_enchatnment_seed", - "21": "swimming", - "22": "stop_swimming", - "23": "start_spin_attack", - "24": "stop_spin_attack", - "25": "interact_block", - "26": "predict_break", - "27": "continue_break" - } - } - ], - "StackRequestSlotInfo": [ - "container", - [ - { - "name": "slot_type", - "type": "ContainerSlotType" - }, - { - "name": "slot", - "type": "u8" - }, - { - "name": "stack_id", - "type": "zigzag32" - } - ] - ], - "ItemStackRequest": [ - "container", - [ - { - "name": "request_id", - "type": "varint" - }, - { - "name": "actions", - "type": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "type_id", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "0": "take", - "1": "place", - "2": "swap", - "3": "drop", - "4": "destroy", - "5": "consume", - "6": "create", - "7": "lab_table_combine", - "8": "beacon_payment", - "9": "mine_block", - "10": "craft_recipe", - "11": "craft_recipe_auto", - "12": "craft_creative", - "13": "optional", - "14": "non_implemented", - "15": "results_deprecated" - } - } - ] - }, - { - "anon": true, - "type": [ - "switch", - { - "compareTo": "type_id", - "fields": { - "take": [ - "container", - [ - { - "name": "count", - "type": "u8" - }, - { - "name": "source", - "type": "StackRequestSlotInfo" - }, - { - "name": "destination", - "type": "StackRequestSlotInfo" - } - ] - ], - "place": [ - "container", - [ - { - "name": "count", - "type": "u8" - }, - { - "name": "source", - "type": "StackRequestSlotInfo" - }, - { - "name": "destination", - "type": "StackRequestSlotInfo" - } - ] - ], - "swap": [ - "container", - [ - { - "name": "source", - "type": "StackRequestSlotInfo" - }, - { - "name": "destination", - "type": "StackRequestSlotInfo" - } - ] - ], - "drop": [ - "container", - [ - { - "name": "count", - "type": "u8" - }, - { - "name": "source", - "type": "StackRequestSlotInfo" - }, - { - "name": "randomly", - "type": "bool" - } - ] - ], - "destroy": [ - "container", - [ - { - "name": "count", - "type": "u8" - }, - { - "name": "source", - "type": "StackRequestSlotInfo" - } - ] - ], - "consume": [ - "container", - [ - { - "name": "count", - "type": "u8" - }, - { - "name": "source", - "type": "StackRequestSlotInfo" - } - ] - ], - "create": [ - "container", - [ - { - "name": "result_slot_id", - "type": "u8" - } - ] - ], - "beacon_payment": [ - "container", - [ - { - "name": "primary_effect", - "type": "zigzag32" - }, - { - "name": "secondary_effect", - "type": "zigzag32" - } - ] - ], - "mine_block": [ - "container", - [ - { - "name": "unknown1", - "type": "zigzag32" - }, - { - "name": "predicted_durability", - "type": "zigzag32" - }, - { - "name": "network_id", - "type": "zigzag32" - } - ] - ], - "craft_recipe": [ - "container", - [ - { - "name": "recipe_network_id", - "type": "varint" - } - ] - ], - "craft_recipe_auto": [ - "container", - [ - { - "name": "recipe_network_id", - "type": "varint" - } - ] - ], - "craft_creative": [ - "container", - [ - { - "name": "item_id", - "type": "varint" - } - ] - ], - "optional": [ - "container", - [ - { - "name": "recipe_network_id", - "type": "varint" - }, - { - "name": "filtered_string_index", - "type": "li32" - } - ] - ], - "non_implemented": "void", - "results_deprecated": [ - "container", - [ - { - "name": "result_items", - "type": [ - "array", - { - "countType": "varint", - "type": "ItemLegacy" - } - ] - }, - { - "name": "times_crafted", - "type": "u8" - } - ] - ] - }, - "default": "void" - } - ] - } - ] - ] - } - ] - }, - { - "name": "custom_names", - "type": [ - "array", - { - "countType": "varint", - "type": "string" - } - ] - } - ] - ], - "ItemStackResponses": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "status", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "0": "ok", - "1": "error" - } - } - ] - }, - { - "name": "request_id", - "type": "varint" - }, - { - "anon": true, - "type": [ - "switch", - { - "compareTo": "status", - "fields": { - "ok": [ - "container", - [ - { - "name": "containers", - "type": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "slot_type", - "type": "ContainerSlotType" - }, - { - "name": "slots", - "type": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "slot", - "type": "u8" - }, - { - "name": "hotbar_slot", - "type": "u8" - }, - { - "name": "count", - "type": "u8" - }, - { - "name": "item_stack_id", - "type": "varint" - }, - { - "name": "custom_name", - "type": "string" - }, - { - "name": "durability_correction", - "type": "zigzag32" - } - ] - ] - } - ] - } - ] - ] - } - ] - } - ] - ] - }, - "default": "void" - } - ] - } - ] - ] - } - ], - "ItemComponentList": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "nbt", - "type": "nbt" - } - ] - ] - } - ], - "CommandOrigin": [ - "container", - [ - { - "name": "type", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "0": "player", - "1": "block", - "2": "minecart_block", - "3": "dev_console", - "4": "test", - "5": "automation_player", - "6": "client_automation", - "7": "dedicated_server", - "8": "entity", - "9": "virtual", - "10": "game_argument", - "11": "entity_server", - "12": "precompiled", - "13": "game_director_entity_server", - "14": "script" - } - } - ] - }, - { - "name": "uuid", - "type": "uuid" - }, - { - "name": "request_id", - "type": "string" - }, - { - "name": "player_entity_id", - "type": [ - "switch", - { - "compareTo": "type", - "fields": { - "dev_console": [ - "container", - [ - { - "name": "player_entity_id", - "type": "zigzag64" - } - ] - ], - "test": [ - "container", - [ - { - "name": "player_entity_id", - "type": "zigzag64" - } - ] - ] - }, - "default": "void" - } - ] - } - ] - ], - "TrackedObject": [ - "container", - [ - { - "name": "type", - "type": [ - "mapper", - { - "type": "li32", - "mappings": { - "0": "entity", - "1": "block" - } - } - ] - }, - { - "name": "entity_unique_id", - "type": [ - "switch", - { - "compareTo": "type", - "fields": { - "entity": "zigzag64" - }, - "default": "void" - } - ] - }, - { - "name": "block_position", - "type": [ - "switch", - { - "compareTo": "type", - "fields": { - "block": "BlockCoordinates" - }, - "default": "void" - } - ] - } - ] - ], - "MapDecoration": [ - "container", - [ - { - "name": "type", - "type": "u8" - }, - { - "name": "rotation", - "type": "u8" - }, - { - "name": "x", - "type": "u8" - }, - { - "name": "y", - "type": "u8" - }, - { - "name": "label", - "type": "string" - }, - { - "name": "color_abgr", - "type": "varint" - } - ] - ], - "StructureBlockSettings": [ - "container", - [ - { - "name": "palette_name", - "type": "string" - }, - { - "name": "ignore_entities", - "type": "bool" - }, - { - "name": "ignore_blocks", - "type": "bool" - }, - { - "name": "size", - "type": "BlockCoordinates" - }, - { - "name": "structure_offset", - "type": "BlockCoordinates" - }, - { - "name": "last_editing_player_unique_id", - "type": "zigzag64" - }, - { - "name": "rotation", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "0": "none", - "1": "90_deg", - "2": "180_deg", - "3": "270_deg" - } - } - ] - }, - { - "name": "mirror", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "0": "none", - "1": "x_axis", - "2": "z_axis", - "3": "both_axes" - } - } - ] - }, - { - "name": "animation_mode", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "0": "none", - "1": "layers", - "2": "blocks" - } - } - ] - }, - { - "name": "animation_duration", - "type": "lf32" - }, - { - "name": "integrity", - "type": "lf32" - }, - { - "name": "seed", - "type": "lu32" - }, - { - "name": "pivot", - "type": "vec3f" - } - ] - ], - "WindowID": [ - "mapper", - { - "type": "i8", - "mappings": { - "0": "inventory", - "1": "first", - "100": "last", - "119": "offhand", - "120": "armor", - "121": "creative", - "122": "hotbar", - "123": "fixed_inventory", - "124": "ui", - "-100": "drop_contents", - "-24": "beacon", - "-23": "trading_output", - "-22": "trading_use_inputs", - "-21": "trading_input_2", - "-20": "trading_input_1", - "-17": "enchant_output", - "-16": "enchant_material", - "-15": "enchant_input", - "-13": "anvil_output", - "-12": "anvil_result", - "-11": "anvil_material", - "-10": "container_input", - "-5": "crafting_use_ingredient", - "-4": "crafting_result", - "-3": "crafting_remove_ingredient", - "-2": "crafting_add_ingredient", - "-1": "none" - } - } - ], - "WindowIDVarint": [ - "mapper", - { - "type": "varint", - "mappings": { - "0": "inventory", - "1": "first", - "100": "last", - "119": "offhand", - "120": "armor", - "121": "creative", - "122": "hotbar", - "123": "fixed_inventory", - "124": "ui", - "-100": "drop_contents", - "-24": "beacon", - "-23": "trading_output", - "-22": "trading_use_inputs", - "-21": "trading_input_2", - "-20": "trading_input_1", - "-17": "enchant_output", - "-16": "enchant_material", - "-15": "enchant_input", - "-13": "anvil_output", - "-12": "anvil_result", - "-11": "anvil_material", - "-10": "container_input", - "-5": "crafting_use_ingredient", - "-4": "crafting_result", - "-3": "crafting_remove_ingredient", - "-2": "crafting_add_ingredient", - "-1": "none" - } - } - ], - "WindowType": [ - "mapper", - { - "type": "i8", - "mappings": { - "0": "container", - "1": "workbench", - "2": "furnace", - "3": "enchantment", - "4": "brewing_stand", - "5": "anvil", - "6": "dispenser", - "7": "dropper", - "8": "hopper", - "9": "cauldron", - "10": "minecart_chest", - "11": "minecart_hopper", - "12": "horse", - "13": "beacon", - "14": "structure_editor", - "15": "trading", - "16": "command_block", - "17": "jukebox", - "18": "armor", - "19": "hand", - "20": "compound_creator", - "21": "element_constructor", - "22": "material_reducer", - "23": "lab_table", - "24": "loom", - "25": "lectern", - "26": "grindstone", - "27": "blast_furnace", - "28": "smoker", - "29": "stonecutter", - "30": "cartography", - "31": "hud", - "32": "jigsaw_editor", - "33": "smithing_table", - "-9": "none", - "-1": "inventory" - } - } - ], - "ContainerSlotType": [ - "mapper", - { - "type": "u8", - "mappings": { - "0": "anvil_input", - "1": "anvil_material", - "2": "anvil_result", - "3": "smithing_table_input", - "4": "smithing_table_material", - "5": "smithing_table_result", - "6": "armor", - "7": "container", - "8": "beacon_payment", - "9": "brewing_input", - "10": "brewing_result", - "11": "brewing_fuel", - "12": "hotbar_and_inventory", - "13": "crafting_input", - "14": "crafting_output", - "15": "recipe_construction", - "16": "recipe_nature", - "17": "recipe_items", - "18": "recipe_search", - "19": "recipe_search_bar", - "20": "recipe_equipment", - "21": "enchanting_input", - "22": "enchanting_lapis", - "23": "furnace_fuel", - "24": "furnace_ingredient", - "25": "furnace_output", - "26": "horse_equip", - "27": "hotbar", - "28": "inventory", - "29": "shulker", - "30": "trade_ingredient1", - "31": "trade_ingredient2", - "32": "trade_result", - "33": "offhand", - "34": "compcreate_input", - "35": "compcreate_output", - "36": "elemconstruct_output", - "37": "matreduce_input", - "38": "matreduce_output", - "39": "labtable_input", - "40": "loom_input", - "41": "loom_dye", - "42": "loom_material", - "43": "loom_result", - "44": "blast_furnace_ingredient", - "45": "smoker_ingredient", - "46": "trade2_ingredient1", - "47": "trade2_ingredient2", - "48": "trade2_result", - "49": "grindstone_input", - "50": "grindstone_additional", - "51": "grindstone_result", - "52": "stonecutter_input", - "53": "stonecutter_result", - "54": "cartography_input", - "55": "cartography_additional", - "56": "cartography_result", - "57": "barrel", - "58": "cursor", - "59": "creative_output" - } - } - ], - "SoundType": [ - "mapper", - { - "type": "varint", - "mappings": { - "0": "ItemUseOn", - "1": "Hit", - "2": "Step", - "3": "Fly", - "4": "Jump", - "5": "Break", - "6": "Place", - "7": "HeavyStep", - "8": "Gallop", - "9": "Fall", - "10": "Ambient", - "11": "AmbientBaby", - "12": "AmbientInWater", - "13": "Breathe", - "14": "Death", - "15": "DeathInWater", - "16": "DeathToZombie", - "17": "Hurt", - "18": "HurtInWater", - "19": "Mad", - "20": "Boost", - "21": "Bow", - "22": "SquishBig", - "23": "SquishSmall", - "24": "FallBig", - "25": "FallSmall", - "26": "Splash", - "27": "Fizz", - "28": "Flap", - "29": "Swim", - "30": "Drink", - "31": "Eat", - "32": "Takeoff", - "33": "Shake", - "34": "Plop", - "35": "Land", - "36": "Saddle", - "37": "Armor", - "38": "MobArmorStandPlace", - "39": "AddChest", - "40": "Throw", - "41": "Attack", - "42": "AttackNoDamage", - "43": "AttackStrong", - "44": "Warn", - "45": "Shear", - "46": "Milk", - "47": "Thunder", - "48": "Explode", - "49": "Fire", - "50": "Ignite", - "51": "Fuse", - "52": "Stare", - "53": "Spawn", - "54": "Shoot", - "55": "BreakBlock", - "56": "Launch", - "57": "Blast", - "58": "LargeBlast", - "59": "Twinkle", - "60": "Remedy", - "61": "Infect", - "62": "LevelUp", - "63": "BowHit", - "64": "BulletHit", - "65": "ExtinguishFire", - "66": "ItemFizz", - "67": "ChestOpen", - "68": "ChestClosed", - "69": "ShulkerBoxOpen", - "70": "ShulkerBoxClosed", - "71": "EnderChestOpen", - "72": "EnderChestClosed", - "73": "PowerOn", - "74": "PowerOff", - "75": "Attach", - "76": "Detach", - "77": "Deny", - "78": "Tripod", - "79": "Pop", - "80": "DropSlot", - "81": "Note", - "82": "Thorns", - "83": "PistonIn", - "84": "PistonOut", - "85": "Portal", - "86": "Water", - "87": "LavaPop", - "88": "Lava", - "89": "Burp", - "90": "BucketFillWater", - "91": "BucketFillLava", - "92": "BucketEmptyWater", - "93": "BucketEmptyLava", - "94": "ArmorEquipChain", - "95": "ArmorEquipDiamond", - "96": "ArmorEquipGeneric", - "97": "ArmorEquipGold", - "98": "ArmorEquipIron", - "99": "ArmorEquipLeather", - "100": "ArmorEquipElytra", - "101": "Record13", - "102": "RecordCat", - "103": "RecordBlocks", - "104": "RecordChirp", - "105": "RecordFar", - "106": "RecordMall", - "107": "RecordMellohi", - "108": "RecordStal", - "109": "RecordStrad", - "110": "RecordWard", - "111": "Record11", - "112": "RecordWait", - "113": "unknown1", - "114": "Flop", - "115": "ElderGuardianCurse", - "116": "MobWarning", - "117": "MobWarningBaby", - "118": "Teleport", - "119": "ShulkerOpen", - "120": "ShulkerClose", - "121": "Haggle", - "122": "HaggleYes", - "123": "HaggleNo", - "124": "HaggleIdle", - "125": "ChorusGrow", - "126": "ChorusDeath", - "127": "Glass", - "128": "PotionBrewed", - "129": "CastSpell", - "130": "PrepareAttack", - "131": "PrepareSummon", - "132": "PrepareWololo", - "133": "Fang", - "134": "Charge", - "135": "CameraTakePicture", - "136": "LeashKnotPlace", - "137": "LeashKnotBreak", - "138": "Growl", - "139": "Whine", - "140": "Pant", - "141": "Purr", - "142": "Purreow", - "143": "DeathMinVolume", - "144": "DeathMidVolume", - "145": "unknown2", - "146": "ImitateCaveSpider", - "147": "ImitateCreeper", - "148": "ImitateElderGuardian", - "149": "ImitateEnderDragon", - "150": "ImitateEnderman", - "151": "unknown3", - "152": "ImitateEvocationIllager", - "153": "ImitateGhast", - "154": "ImitateHusk", - "155": "ImitateIllusionIllager", - "156": "ImitateMagmaCube", - "157": "ImitatePolarBear", - "158": "ImitateShulker", - "159": "ImitateSilverfish", - "160": "ImitateSkeleton", - "161": "ImitateSlime", - "162": "ImitateSpider", - "163": "ImitateStray", - "164": "ImitateVex", - "165": "ImitateVindicationIllager", - "166": "ImitateWitch", - "167": "ImitateWither", - "168": "ImitateWitherSkeleton", - "169": "ImitateWolf", - "170": "ImitateZombie", - "171": "ImitateZombiePigman", - "172": "ImitateZombieVillager", - "173": "BlockEndPortalFrameFill", - "174": "BlockEndPortalSpawn", - "175": "RandomAnvilUse", - "176": "BottleDragonBreath", - "177": "PortalTravel", - "178": "ItemTridentHit", - "179": "ItemTridentReturn", - "180": "ItemTridentRiptide1", - "181": "ItemTridentRiptide2", - "182": "ItemTridentRiptide3", - "183": "ItemTridentThrow", - "184": "ItemTridentThunder", - "185": "ItemTridentHitGround", - "186": "Default", - "187": "BlockFletchingTableUse", - "188": "ElemConstructOpen", - "189": "IceBombHit", - "190": "BalloonPop", - "191": "LtReactionIceBomb", - "192": "LtReactionBleach", - "193": "LtReactionEPaste", - "194": "LtReactionEPaste2", - "195": "LtReactionFertilizer", - "196": "LtReactionFireball", - "197": "LtReactionMgsalt", - "198": "LtReactionMiscfire", - "199": "LtReactionFire", - "200": "LtReactionMiscexplosion", - "201": "LtReactionMiscmystical", - "202": "LtReactionMiscmystical2", - "203": "LtReactionProduct", - "204": "SparklerUse", - "205": "GlowstickUse", - "206": "SparklerActive", - "207": "ConvertToDrowned", - "208": "BucketFillFish", - "209": "BucketEmptyFish", - "210": "BubbleUp", - "211": "BubbleDown", - "212": "BubblePop", - "213": "BubbleUpInside", - "214": "BubbleDownInside", - "215": "HurtBaby", - "216": "DeathBaby", - "217": "StepBaby", - "218": "BabySpawn", - "219": "Born", - "220": "BlockTurtleEggBreak", - "221": "BlockTurtleEggCrack", - "222": "BlockTurtleEggHatch", - "223": "TurtleLayEgg", - "224": "BlockTurtleEggAttack", - "225": "BeaconActivate", - "226": "BeaconAmbient", - "227": "BeaconDeactivate", - "228": "BeaconPower", - "229": "ConduitActivate", - "230": "ConduitAmbient", - "231": "ConduitAttack", - "232": "ConduitDeactivate", - "233": "ConduitShort", - "234": "Swoop", - "235": "BlockBambooSaplingPlace", - "236": "PreSneeze", - "237": "Sneeze", - "238": "AmbientTame", - "239": "Scared", - "240": "BlockScaffoldingClimb", - "241": "CrossbowLoadingStart", - "242": "CrossbowLoadingMiddle", - "243": "CrossbowLoadingEnd", - "244": "CrossbowShoot", - "245": "CrossbowQuickChargeStart", - "246": "CrossbowQuickChargeMiddle", - "247": "CrossbowQuickChargeEnd", - "248": "AmbientAggressive", - "249": "AmbientWorried", - "250": "CantBreed", - "251": "ItemShieldBlock", - "252": "ItemBookPut", - "253": "BlockGrindstoneUse", - "254": "BlockBellHit", - "255": "BlockCampfireCrackle", - "256": "Roar", - "257": "Stun", - "258": "BlockSweetBerryBushHurt", - "259": "BlockSweetBerryBushPick", - "260": "UICartographyTableTakeResult", - "261": "UIStoneCutterTakeResult", - "262": "BlockComposterEmpty", - "263": "BlockComposterFill", - "264": "BlockComposterFillSuccess", - "265": "BlockComposterReady", - "266": "BlockBarrelOpen", - "267": "BlockBarrelClose", - "268": "RaidHorn", - "269": "BlockLoomUse", - "270": "AmbientRaid", - "271": "UICartographyTableUse", - "272": "UIStoneCutterUse", - "273": "UILoomUse", - "274": "SmokerUse", - "275": "BlastFurnaceUse", - "276": "SmithingTableUse", - "277": "Screech", - "278": "Sleep", - "279": "FurnaceUse", - "280": "MooshroomConvert", - "281": "MilkSuspiciously", - "282": "Celebrate", - "283": "JumpPrevent", - "284": "AmbientPollinate", - "285": "BeeHiveDrip", - "286": "BeeHiveEnter", - "287": "BeeHiveExit", - "288": "BeeHiveWork", - "289": "BeeHiveShear", - "290": "HoneyBottleDrink", - "291": "AmbientCave", - "292": "Retreat", - "293": "ConvertToZombified", - "294": "Admire", - "295": "StepLava", - "296": "Tempt", - "297": "Panic", - "298": "Angry", - "299": "AmbientWarpedForest", - "300": "AmbientSoulsandValley", - "301": "AmbientNetherWastes", - "302": "AmbientBasaltDeltas", - "303": "AmbientCrimsonForest", - "304": "RespawnAnchorCharge", - "305": "RespawnAnchorDeplete", - "306": "RespawnAnchorSetSpawn", - "307": "RespawnAnchorAmbient", - "308": "SoulEscapeQuiet", - "309": "SoulEscapeLoud", - "310": "RecordPigstep", - "311": "LinkCompassToLodestone", - "312": "BlockSmithingTableUse", - "313": "EquipNetherite", - "314": "AmbientLoopWarpedForest", - "315": "AmbientLoopSoulsandValley", - "316": "AmbientLoopNetherWastes", - "317": "AmbientLoopBasaltDeltas", - "318": "AmbientLoopCrimsonForest", - "319": "AmbientAdditionWarpedForest", - "320": "AmbientAdditionSoulsandValley", - "321": "AmbientAdditionNetherWastes", - "322": "AmbientAdditionBasaltDeltas", - "323": "AmbientAdditionCrimsonForest", - "324": "SculkSensorPowerOn", - "325": "SculkSensorPowerOff", - "326": "BucketFillPowderSnow", - "327": "BucketEmptyPowderSnow", - "328": "PointedDripstoneCauldronDripWater", - "329": "PointedDripstoneCauldronDripLava", - "330": "PointedDripstoneDripWater", - "331": "PointedDripstoneDripLava", - "332": "CaveVinesPickBerries", - "333": "BigDripleafTiltDown", - "334": "BigDripleafTiltUp", - "335": "unknown335", - "336": "unknown336", - "337": "unknown337", - "338": "unknown338", - "339": "copper_wax_on", - "340": "copper_wax_off", - "341": "scrape", - "342": "player_hurt_drown", - "343": "player_hurt_on_fire", - "344": "player_hurt_freeze", - "345": "use_spyglass", - "346": "stop_using_spyglass", - "347": "amethyst_block_chime", - "348": "ambient_screamer", - "349": "hurt_screamer", - "350": "death_screamer", - "351": "milk_screamer", - "352": "jump_to_block", - "353": "pre_ram", - "354": "pre_ram_screamer", - "355": "ram_impact", - "356": "ram_impact_screamer", - "357": "squid_ink_squirt", - "358": "glow_squid_ink_squirt", - "359": "convert_to_stray", - "360": "extinguish_candle", - "361": "ambient_candle", - "362": "Undefined" - } - } - ], - "LegacyEntityType": [ - "mapper", - { - "type": "li32", - "mappings": { - "10": "chicken", - "11": "cow", - "12": "pig", - "13": "sheep", - "14": "wolf", - "15": "villager", - "16": "mooshroom", - "17": "squid", - "18": "rabbit", - "19": "bat", - "20": "iron_golem", - "21": "snow_golem", - "22": "ocelot", - "23": "horse", - "24": "donkey", - "25": "mule", - "26": "skeleton_horse", - "27": "zombie_horse", - "28": "polar_bear", - "29": "llama", - "30": "parrot", - "31": "dolphin", - "32": "zombie", - "33": "creeper", - "34": "skeleton", - "35": "spider", - "36": "zombie_pigman", - "37": "slime", - "38": "enderman", - "39": "silverfish", - "40": "cave_spider", - "41": "ghast", - "42": "magma_cube", - "43": "blaze", - "44": "zombie_villager", - "45": "witch", - "46": "stray", - "47": "husk", - "48": "wither_skeleton", - "49": "guardian", - "50": "elder_guardian", - "51": "npc", - "52": "wither", - "53": "ender_dragon", - "54": "shulker", - "55": "endermite", - "56": "agent", - "57": "vindicator", - "58": "phantom", - "61": "armor_stand", - "62": "tripod_camera", - "63": "player", - "64": "item", - "65": "tnt", - "66": "falling_block", - "67": "moving_block", - "68": "xp_bottle", - "69": "xp_orb", - "70": "eye_of_ender_signal", - "71": "ender_crystal", - "72": "fireworks_rocket", - "73": "thrown_trident", - "74": "turtle", - "75": "cat", - "76": "shulker_bullet", - "77": "fishing_hook", - "78": "chalkboard", - "79": "dragon_fireball", - "80": "arrow", - "81": "snowball", - "82": "egg", - "83": "painting", - "84": "minecart", - "85": "fireball", - "86": "splash_potion", - "87": "ender_pearl", - "88": "leash_knot", - "89": "wither_skull", - "90": "boat", - "91": "wither_skull_dangerous", - "93": "lightning_bolt", - "94": "small_fireball", - "95": "area_effect_cloud", - "96": "hopper_minecart", - "97": "tnt_minecart", - "98": "chest_minecart", - "100": "command_block_minecart", - "101": "lingering_potion", - "102": "llama_spit", - "103": "evocation_fang", - "104": "evocation_illager", - "105": "vex", - "106": "ice_bomb", - "107": "balloon", - "108": "pufferfish", - "109": "salmon", - "110": "drowned", - "111": "tropicalfish", - "112": "cod", - "113": "panda" - } - } - ], - "mcpe_packet": [ - "container", - [ - { - "name": "name", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "1": "login", - "2": "play_status", - "3": "server_to_client_handshake", - "4": "client_to_server_handshake", - "5": "disconnect", - "6": "resource_packs_info", - "7": "resource_pack_stack", - "8": "resource_pack_client_response", - "9": "text", - "10": "set_time", - "11": "start_game", - "12": "add_player", - "13": "add_entity", - "14": "remove_entity", - "15": "add_item_entity", - "17": "take_item_entity", - "18": "move_entity", - "19": "move_player", - "20": "rider_jump", - "21": "update_block", - "22": "add_painting", - "23": "tick_sync", - "24": "level_sound_event_old", - "25": "level_event", - "26": "block_event", - "27": "entity_event", - "28": "mob_effect", - "29": "update_attributes", - "30": "inventory_transaction", - "31": "mob_equipment", - "32": "mob_armor_equipment", - "33": "interact", - "34": "block_pick_request", - "35": "entity_pick_request", - "36": "player_action", - "38": "hurt_armor", - "39": "set_entity_data", - "40": "set_entity_motion", - "41": "set_entity_link", - "42": "set_health", - "43": "set_spawn_position", - "44": "animate", - "45": "respawn", - "46": "container_open", - "47": "container_close", - "48": "player_hotbar", - "49": "inventory_content", - "50": "inventory_slot", - "51": "container_set_data", - "52": "crafting_data", - "53": "crafting_event", - "54": "gui_data_pick_item", - "55": "adventure_settings", - "56": "block_entity_data", - "57": "player_input", - "58": "level_chunk", - "59": "set_commands_enabled", - "60": "set_difficulty", - "61": "change_dimension", - "62": "set_player_game_type", - "63": "player_list", - "64": "simple_event", - "65": "event", - "66": "spawn_experience_orb", - "67": "clientbound_map_item_data", - "68": "map_info_request", - "69": "request_chunk_radius", - "70": "chunk_radius_update", - "71": "item_frame_drop_item", - "72": "game_rules_changed", - "73": "camera", - "74": "boss_event", - "75": "show_credits", - "76": "available_commands", - "77": "command_request", - "78": "command_block_update", - "79": "command_output", - "80": "update_trade", - "81": "update_equipment", - "82": "resource_pack_data_info", - "83": "resource_pack_chunk_data", - "84": "resource_pack_chunk_request", - "85": "transfer", - "86": "play_sound", - "87": "stop_sound", - "88": "set_title", - "89": "add_behavior_tree", - "90": "structure_block_update", - "91": "show_store_offer", - "92": "purchase_receipt", - "93": "player_skin", - "94": "sub_client_login", - "95": "initiate_web_socket_connection", - "96": "set_last_hurt_by", - "97": "book_edit", - "98": "npc_request", - "99": "photo_transfer", - "100": "modal_form_request", - "101": "modal_form_response", - "102": "server_settings_request", - "103": "server_settings_response", - "104": "show_profile", - "105": "set_default_game_type", - "106": "remove_objective", - "107": "set_display_objective", - "108": "set_score", - "109": "lab_table", - "110": "update_block_synced", - "111": "move_entity_delta", - "112": "set_scoreboard_identity", - "113": "set_local_player_as_initialized", - "114": "update_soft_enum", - "115": "network_stack_latency", - "117": "script_custom_event", - "118": "spawn_particle_effect", - "119": "available_entity_identifiers", - "120": "level_sound_event_v2", - "121": "network_chunk_publisher_update", - "122": "biome_definition_list", - "123": "level_sound_event", - "124": "level_event_generic", - "125": "lectern_update", - "126": "video_stream_connect", - "127": "add_ecs_entity", - "128": "remove_ecs_entity", - "129": "client_cache_status", - "130": "on_screen_texture_animation", - "131": "map_create_locked_copy", - "132": "structure_template_data_export_request", - "133": "structure_template_data_export_response", - "134": "update_block_properties", - "135": "client_cache_blob_status", - "136": "client_cache_miss_response", - "137": "education_settings", - "139": "multiplayer_settings", - "140": "settings_command", - "141": "anvil_damage", - "142": "completed_using_item", - "143": "network_settings", - "144": "player_auth_input", - "145": "creative_content", - "146": "player_enchant_options", - "147": "item_stack_request", - "148": "item_stack_response", - "149": "player_armor_damage", - "151": "update_player_game_type", - "153": "position_tracking_db_broadcast", - "154": "position_tracking_db_request", - "156": "packet_violation_warning", - "157": "motion_prediction_hints", - "158": "animate_entity", - "159": "camera_shake", - "160": "player_fog", - "161": "correct_player_move_prediction", - "162": "item_component", - "163": "filter_text_packet", - "164": "debug_renderer", - "165": "sync_entity_property", - "166": "add_volume_entity", - "167": "remove_volume_entity", - "168": "simulation_type", - "169": "npc_dialogue" - } - } - ] - }, - { - "name": "params", - "type": [ - "switch", - { - "compareTo": "name", - "fields": { - "login": "packet_login", - "play_status": "packet_play_status", - "server_to_client_handshake": "packet_server_to_client_handshake", - "client_to_server_handshake": "packet_client_to_server_handshake", - "disconnect": "packet_disconnect", - "resource_packs_info": "packet_resource_packs_info", - "resource_pack_stack": "packet_resource_pack_stack", - "resource_pack_client_response": "packet_resource_pack_client_response", - "text": "packet_text", - "set_time": "packet_set_time", - "start_game": "packet_start_game", - "add_player": "packet_add_player", - "add_entity": "packet_add_entity", - "remove_entity": "packet_remove_entity", - "add_item_entity": "packet_add_item_entity", - "take_item_entity": "packet_take_item_entity", - "move_entity": "packet_move_entity", - "move_player": "packet_move_player", - "rider_jump": "packet_rider_jump", - "update_block": "packet_update_block", - "add_painting": "packet_add_painting", - "tick_sync": "packet_tick_sync", - "level_sound_event_old": "packet_level_sound_event_old", - "level_event": "packet_level_event", - "block_event": "packet_block_event", - "entity_event": "packet_entity_event", - "mob_effect": "packet_mob_effect", - "update_attributes": "packet_update_attributes", - "inventory_transaction": "packet_inventory_transaction", - "mob_equipment": "packet_mob_equipment", - "mob_armor_equipment": "packet_mob_armor_equipment", - "interact": "packet_interact", - "block_pick_request": "packet_block_pick_request", - "entity_pick_request": "packet_entity_pick_request", - "player_action": "packet_player_action", - "hurt_armor": "packet_hurt_armor", - "set_entity_data": "packet_set_entity_data", - "set_entity_motion": "packet_set_entity_motion", - "set_entity_link": "packet_set_entity_link", - "set_health": "packet_set_health", - "set_spawn_position": "packet_set_spawn_position", - "animate": "packet_animate", - "respawn": "packet_respawn", - "container_open": "packet_container_open", - "container_close": "packet_container_close", - "player_hotbar": "packet_player_hotbar", - "inventory_content": "packet_inventory_content", - "inventory_slot": "packet_inventory_slot", - "container_set_data": "packet_container_set_data", - "crafting_data": "packet_crafting_data", - "crafting_event": "packet_crafting_event", - "gui_data_pick_item": "packet_gui_data_pick_item", - "adventure_settings": "packet_adventure_settings", - "block_entity_data": "packet_block_entity_data", - "player_input": "packet_player_input", - "level_chunk": "packet_level_chunk", - "set_commands_enabled": "packet_set_commands_enabled", - "set_difficulty": "packet_set_difficulty", - "change_dimension": "packet_change_dimension", - "set_player_game_type": "packet_set_player_game_type", - "player_list": "packet_player_list", - "simple_event": "packet_simple_event", - "event": "packet_event", - "spawn_experience_orb": "packet_spawn_experience_orb", - "clientbound_map_item_data": "packet_clientbound_map_item_data", - "map_info_request": "packet_map_info_request", - "request_chunk_radius": "packet_request_chunk_radius", - "chunk_radius_update": "packet_chunk_radius_update", - "item_frame_drop_item": "packet_item_frame_drop_item", - "game_rules_changed": "packet_game_rules_changed", - "camera": "packet_camera", - "boss_event": "packet_boss_event", - "show_credits": "packet_show_credits", - "available_commands": "packet_available_commands", - "command_request": "packet_command_request", - "command_block_update": "packet_command_block_update", - "command_output": "packet_command_output", - "update_trade": "packet_update_trade", - "update_equipment": "packet_update_equipment", - "resource_pack_data_info": "packet_resource_pack_data_info", - "resource_pack_chunk_data": "packet_resource_pack_chunk_data", - "resource_pack_chunk_request": "packet_resource_pack_chunk_request", - "transfer": "packet_transfer", - "play_sound": "packet_play_sound", - "stop_sound": "packet_stop_sound", - "set_title": "packet_set_title", - "add_behavior_tree": "packet_add_behavior_tree", - "structure_block_update": "packet_structure_block_update", - "show_store_offer": "packet_show_store_offer", - "purchase_receipt": "packet_purchase_receipt", - "player_skin": "packet_player_skin", - "sub_client_login": "packet_sub_client_login", - "initiate_web_socket_connection": "packet_initiate_web_socket_connection", - "set_last_hurt_by": "packet_set_last_hurt_by", - "book_edit": "packet_book_edit", - "npc_request": "packet_npc_request", - "photo_transfer": "packet_photo_transfer", - "modal_form_request": "packet_modal_form_request", - "modal_form_response": "packet_modal_form_response", - "server_settings_request": "packet_server_settings_request", - "server_settings_response": "packet_server_settings_response", - "show_profile": "packet_show_profile", - "set_default_game_type": "packet_set_default_game_type", - "remove_objective": "packet_remove_objective", - "set_display_objective": "packet_set_display_objective", - "set_score": "packet_set_score", - "lab_table": "packet_lab_table", - "update_block_synced": "packet_update_block_synced", - "move_entity_delta": "packet_move_entity_delta", - "set_scoreboard_identity": "packet_set_scoreboard_identity", - "set_local_player_as_initialized": "packet_set_local_player_as_initialized", - "update_soft_enum": "packet_update_soft_enum", - "network_stack_latency": "packet_network_stack_latency", - "script_custom_event": "packet_script_custom_event", - "spawn_particle_effect": "packet_spawn_particle_effect", - "available_entity_identifiers": "packet_available_entity_identifiers", - "level_sound_event_v2": "packet_level_sound_event_v2", - "network_chunk_publisher_update": "packet_network_chunk_publisher_update", - "biome_definition_list": "packet_biome_definition_list", - "level_sound_event": "packet_level_sound_event", - "level_event_generic": "packet_level_event_generic", - "lectern_update": "packet_lectern_update", - "video_stream_connect": "packet_video_stream_connect", - "add_ecs_entity": "packet_add_ecs_entity", - "remove_ecs_entity": "packet_remove_ecs_entity", - "client_cache_status": "packet_client_cache_status", - "on_screen_texture_animation": "packet_on_screen_texture_animation", - "map_create_locked_copy": "packet_map_create_locked_copy", - "structure_template_data_export_request": "packet_structure_template_data_export_request", - "structure_template_data_export_response": "packet_structure_template_data_export_response", - "update_block_properties": "packet_update_block_properties", - "client_cache_blob_status": "packet_client_cache_blob_status", - "client_cache_miss_response": "packet_client_cache_miss_response", - "education_settings": "packet_education_settings", - "multiplayer_settings": "packet_multiplayer_settings", - "settings_command": "packet_settings_command", - "anvil_damage": "packet_anvil_damage", - "completed_using_item": "packet_completed_using_item", - "network_settings": "packet_network_settings", - "player_auth_input": "packet_player_auth_input", - "creative_content": "packet_creative_content", - "player_enchant_options": "packet_player_enchant_options", - "item_stack_request": "packet_item_stack_request", - "item_stack_response": "packet_item_stack_response", - "player_armor_damage": "packet_player_armor_damage", - "update_player_game_type": "packet_update_player_game_type", - "position_tracking_db_request": "packet_position_tracking_db_request", - "position_tracking_db_broadcast": "packet_position_tracking_db_broadcast", - "packet_violation_warning": "packet_packet_violation_warning", - "motion_prediction_hints": "packet_motion_prediction_hints", - "animate_entity": "packet_animate_entity", - "camera_shake": "packet_camera_shake", - "player_fog": "packet_player_fog", - "correct_player_move_prediction": "packet_correct_player_move_prediction", - "item_component": "packet_item_component", - "filter_text_packet": "packet_filter_text_packet", - "debug_renderer": "packet_debug_renderer", - "sync_entity_property": "packet_sync_entity_property", - "add_volume_entity": "packet_add_volume_entity", - "remove_volume_entity": "packet_remove_volume_entity", - "simulation_type": "packet_simulation_type", - "npc_dialogue": "packet_npc_dialogue" - }, - "default": "void" - } - ] - } - ] - ], - "packet_login": [ - "container", - [ - { - "name": "protocol_version", - "type": "i32" - }, - { - "name": "tokens", - "type": [ - "encapsulated", - { - "lengthType": "varint", - "type": "LoginTokens" - } - ] - } - ] - ], - "LoginTokens": [ - "container", - [ - { - "name": "identity", - "type": "LittleString" - }, - { - "name": "client", - "type": "LittleString" - } - ] - ], - "packet_play_status": [ - "container", - [ - { - "name": "status", - "type": [ - "mapper", - { - "type": "i32", - "mappings": { - "0": "login_success", - "1": "failed_client", - "2": "failed_spawn", - "3": "player_spawn", - "4": "failed_invalid_tenant", - "5": "failed_vanilla_edu", - "6": "failed_edu_vanilla", - "7": "failed_server_full" - } - } - ] - } - ] - ], - "packet_server_to_client_handshake": [ - "container", - [ - { - "name": "token", - "type": "string" - } - ] - ], - "packet_client_to_server_handshake": [ - "container", - [] - ], - "packet_disconnect": [ - "container", - [ - { - "name": "hide_disconnect_reason", - "type": "bool" - }, - { - "name": "message", - "type": "string" - } - ] - ], - "packet_resource_packs_info": [ - "container", - [ - { - "name": "must_accept", - "type": "bool" - }, - { - "name": "has_scripts", - "type": "bool" - }, - { - "name": "force_server_packs", - "type": "bool" - }, - { - "name": "behaviour_packs", - "type": "BehaviourPackInfos" - }, - { - "name": "texture_packs", - "type": "TexturePackInfos" - } - ] - ], - "packet_resource_pack_stack": [ - "container", - [ - { - "name": "must_accept", - "type": "bool" - }, - { - "name": "behavior_packs", - "type": "ResourcePackIdVersions" - }, - { - "name": "resource_packs", - "type": "ResourcePackIdVersions" - }, - { - "name": "game_version", - "type": "string" - }, - { - "name": "experiments", - "type": "Experiments" - }, - { - "name": "experiments_previously_used", - "type": "bool" - } - ] - ], - "packet_resource_pack_client_response": [ - "container", - [ - { - "name": "response_status", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "0": "none", - "1": "refused", - "2": "send_packs", - "3": "have_all_packs", - "4": "completed" - } - } - ] - }, - { - "name": "resourcepackids", - "type": "ResourcePackIds" - } - ] - ], - "packet_text": [ - "container", - [ - { - "name": "type", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "0": "raw", - "1": "chat", - "2": "translation", - "3": "popup", - "4": "jukebox_popup", - "5": "tip", - "6": "system", - "7": "whisper", - "8": "announcement", - "9": "json_whisper", - "10": "json" - } - } - ] - }, - { - "name": "needs_translation", - "type": "bool" - }, - { - "anon": true, - "type": [ - "switch", - { - "compareTo": "type", - "fields": { - "chat": [ - "container", - [ - { - "name": "source_name", - "type": "string" - }, - { - "name": "message", - "type": "string" - } - ] - ], - "whisper": [ - "container", - [ - { - "name": "source_name", - "type": "string" - }, - { - "name": "message", - "type": "string" - } - ] - ], - "announcement": [ - "container", - [ - { - "name": "source_name", - "type": "string" - }, - { - "name": "message", - "type": "string" - } - ] - ], - "raw": [ - "container", - [ - { - "name": "message", - "type": "string" - } - ] - ], - "tip": [ - "container", - [ - { - "name": "message", - "type": "string" - } - ] - ], - "system": [ - "container", - [ - { - "name": "message", - "type": "string" - } - ] - ], - "json_whisper": [ - "container", - [ - { - "name": "message", - "type": "string" - } - ] - ], - "json": [ - "container", - [ - { - "name": "message", - "type": "string" - } - ] - ], - "translation": [ - "container", - [ - { - "name": "message", - "type": "string" - }, - { - "name": "paramaters", - "type": [ - "array", - { - "countType": "varint", - "type": "string" - } - ] - } - ] - ], - "popup": [ - "container", - [ - { - "name": "message", - "type": "string" - }, - { - "name": "paramaters", - "type": [ - "array", - { - "countType": "varint", - "type": "string" - } - ] - } - ] - ], - "jukebox_popup": [ - "container", - [ - { - "name": "message", - "type": "string" - }, - { - "name": "paramaters", - "type": [ - "array", - { - "countType": "varint", - "type": "string" - } - ] - } - ] - ] - }, - "default": "void" - } - ] - }, - { - "name": "xuid", - "type": "string" - }, - { - "name": "platform_chat_id", - "type": "string" - } - ] - ], - "packet_set_time": [ - "container", - [ - { - "name": "time", - "type": "zigzag32" - } - ] - ], - "packet_start_game": [ - "container", - [ - { - "name": "entity_id", - "type": "zigzag64" - }, - { - "name": "runtime_entity_id", - "type": "varint64" - }, - { - "name": "player_gamemode", - "type": "GameMode" - }, - { - "name": "player_position", - "type": "vec3f" - }, - { - "name": "rotation", - "type": "vec2f" - }, - { - "name": "seed", - "type": "zigzag32" - }, - { - "name": "biome_type", - "type": "li16" - }, - { - "name": "biome_name", - "type": "string" - }, - { - "name": "dimension", - "type": "zigzag32" - }, - { - "name": "generator", - "type": "zigzag32" - }, - { - "name": "world_gamemode", - "type": "GameMode" - }, - { - "name": "difficulty", - "type": "zigzag32" - }, - { - "name": "spawn_position", - "type": "BlockCoordinates" - }, - { - "name": "achievements_disabled", - "type": "bool" - }, - { - "name": "day_cycle_stop_time", - "type": "zigzag32" - }, - { - "name": "edu_offer", - "type": "zigzag32" - }, - { - "name": "edu_features_enabled", - "type": "bool" - }, - { - "name": "edu_product_uuid", - "type": "string" - }, - { - "name": "rain_level", - "type": "lf32" - }, - { - "name": "lightning_level", - "type": "lf32" - }, - { - "name": "has_confirmed_platform_locked_content", - "type": "bool" - }, - { - "name": "is_multiplayer", - "type": "bool" - }, - { - "name": "broadcast_to_lan", - "type": "bool" - }, - { - "name": "xbox_live_broadcast_mode", - "type": "varint" - }, - { - "name": "platform_broadcast_mode", - "type": "varint" - }, - { - "name": "enable_commands", - "type": "bool" - }, - { - "name": "is_texturepacks_required", - "type": "bool" - }, - { - "name": "gamerules", - "type": "GameRules" - }, - { - "name": "experiments", - "type": "Experiments" - }, - { - "name": "experiments_previously_used", - "type": "bool" - }, - { - "name": "bonus_chest", - "type": "bool" - }, - { - "name": "map_enabled", - "type": "bool" - }, - { - "name": "permission_level", - "type": "zigzag32" - }, - { - "name": "server_chunk_tick_range", - "type": "li32" - }, - { - "name": "has_locked_behavior_pack", - "type": "bool" - }, - { - "name": "has_locked_resource_pack", - "type": "bool" - }, - { - "name": "is_from_locked_world_template", - "type": "bool" - }, - { - "name": "msa_gamertags_only", - "type": "bool" - }, - { - "name": "is_from_world_template", - "type": "bool" - }, - { - "name": "is_world_template_option_locked", - "type": "bool" - }, - { - "name": "only_spawn_v1_villagers", - "type": "bool" - }, - { - "name": "game_version", - "type": "string" - }, - { - "name": "limited_world_width", - "type": "li32" - }, - { - "name": "limited_world_length", - "type": "li32" - }, - { - "name": "is_new_nether", - "type": "bool" - }, - { - "name": "experimental_gameplay_override", - "type": "bool" - }, - { - "name": "level_id", - "type": "string" - }, - { - "name": "world_name", - "type": "string" - }, - { - "name": "premium_world_template_id", - "type": "string" - }, - { - "name": "is_trial", - "type": "bool" - }, - { - "name": "movement_authority", - "type": [ - "mapper", - { - "type": "zigzag32", - "mappings": { - "0": "client", - "1": "server", - "2": "server_with_rewind" - } - } - ] - }, - { - "name": "rewind_history_size", - "type": "zigzag32" - }, - { - "name": "server_authoritative_block_breaking", - "type": "bool" - }, - { - "name": "current_tick", - "type": "li64" - }, - { - "name": "enchantment_seed", - "type": "zigzag32" - }, - { - "name": "block_properties", - "type": "BlockProperties" - }, - { - "name": "itemstates", - "type": "Itemstates" - }, - { - "name": "multiplayer_correlation_id", - "type": "string" - }, - { - "name": "server_authoritative_inventory", - "type": "bool" - }, - { - "name": "engine", - "type": "string" - } - ] - ], - "packet_add_player": [ - "container", - [ - { - "name": "uuid", - "type": "uuid" - }, - { - "name": "username", - "type": "string" - }, - { - "name": "entity_id_self", - "type": "zigzag64" - }, - { - "name": "runtime_entity_id", - "type": "varint64" - }, - { - "name": "platform_chat_id", - "type": "string" - }, - { - "name": "position", - "type": "vec3f" - }, - { - "name": "velocity", - "type": "vec3f" - }, - { - "name": "pitch", - "type": "lf32" - }, - { - "name": "yaw", - "type": "lf32" - }, - { - "name": "head_yaw", - "type": "lf32" - }, - { - "name": "held_item", - "type": "Item" - }, - { - "name": "metadata", - "type": "MetadataDictionary" - }, - { - "name": "flags", - "type": "varint" - }, - { - "name": "command_permission", - "type": "varint" - }, - { - "name": "action_permissions", - "type": "varint" - }, - { - "name": "permission_level", - "type": "varint" - }, - { - "name": "custom_stored_permissions", - "type": "varint" - }, - { - "name": "user_id", - "type": "li64" - }, - { - "name": "links", - "type": "Links" - }, - { - "name": "device_id", - "type": "string" - }, - { - "name": "device_os", - "type": "li32" - } - ] - ], - "packet_add_entity": [ - "container", - [ - { - "name": "entity_id_self", - "type": "zigzag64" - }, - { - "name": "runtime_entity_id", - "type": "varint64" - }, - { - "name": "entity_type", - "type": "string" - }, - { - "name": "position", - "type": "vec3f" - }, - { - "name": "velocity", - "type": "vec3f" - }, - { - "name": "pitch", - "type": "lf32" - }, - { - "name": "yaw", - "type": "lf32" - }, - { - "name": "head_yaw", - "type": "lf32" - }, - { - "name": "attributes", - "type": "EntityAttributes" - }, - { - "name": "metadata", - "type": "MetadataDictionary" - }, - { - "name": "links", - "type": "Links" - } - ] - ], - "packet_remove_entity": [ - "container", - [ - { - "name": "entity_id_self", - "type": "zigzag64" - } - ] - ], - "packet_add_item_entity": [ - "container", - [ - { - "name": "entity_id_self", - "type": "zigzag64" - }, - { - "name": "runtime_entity_id", - "type": "varint64" - }, - { - "name": "item", - "type": "Item" - }, - { - "name": "position", - "type": "vec3f" - }, - { - "name": "velocity", - "type": "vec3f" - }, - { - "name": "metadata", - "type": "MetadataDictionary" - }, - { - "name": "is_from_fishing", - "type": "bool" - } - ] - ], - "packet_take_item_entity": [ - "container", - [ - { - "name": "runtime_entity_id", - "type": "varint64" - }, - { - "name": "target", - "type": "varint" - } - ] - ], - "packet_move_entity": [ - "container", - [ - { - "name": "runtime_entity_id", - "type": "varint64" - }, - { - "name": "flags", - "type": "u8" - }, - { - "name": "position", - "type": "vec3f" - }, - { - "name": "rotation", - "type": "Rotation" - } - ] - ], - "packet_move_player": [ - "container", - [ - { - "name": "runtime_id", - "type": "varint" - }, - { - "name": "position", - "type": "vec3f" - }, - { - "name": "pitch", - "type": "lf32" - }, - { - "name": "yaw", - "type": "lf32" - }, - { - "name": "head_yaw", - "type": "lf32" - }, - { - "name": "mode", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "0": "normal", - "1": "reset", - "2": "teleport", - "3": "rotation" - } - } - ] - }, - { - "name": "on_ground", - "type": "bool" - }, - { - "name": "ridden_runtime_id", - "type": "varint" - }, - { - "name": "teleport", - "type": [ - "switch", - { - "compareTo": "mode", - "fields": { - "teleport": [ - "container", - [ - { - "name": "cause", - "type": [ - "mapper", - { - "type": "li32", - "mappings": { - "0": "unknown", - "1": "projectile", - "2": "chorus_fruit", - "3": "command", - "4": "behavior" - } - } - ] - }, - { - "name": "source_entity_type", - "type": "LegacyEntityType" - } - ] - ] - }, - "default": "void" - } - ] - }, - { - "name": "tick", - "type": "varint64" - } - ] - ], - "packet_rider_jump": [ - "container", - [ - { - "name": "jump_strength", - "type": "zigzag32" - } - ] - ], - "packet_update_block": [ - "container", - [ - { - "name": "position", - "type": "BlockCoordinates" - }, - { - "name": "block_runtime_id", - "type": "varint" - }, - { - "name": "flags", - "type": "UpdateBlockFlags" - }, - { - "name": "layer", - "type": "varint" - } - ] - ], - "packet_add_painting": [ - "container", - [ - { - "name": "entity_id_self", - "type": "zigzag64" - }, - { - "name": "runtime_entity_id", - "type": "varint64" - }, - { - "name": "coordinates", - "type": "vec3f" - }, - { - "name": "direction", - "type": "zigzag32" - }, - { - "name": "title", - "type": "string" - } - ] - ], - "packet_tick_sync": [ - "container", - [ - { - "name": "request_time", - "type": "li64" - }, - { - "name": "response_time", - "type": "li64" - } - ] - ], - "packet_level_sound_event_old": [ - "container", - [ - { - "name": "sound_id", - "type": "u8" - }, - { - "name": "position", - "type": "vec3f" - }, - { - "name": "block_id", - "type": "zigzag32" - }, - { - "name": "entity_type", - "type": "zigzag32" - }, - { - "name": "is_baby_mob", - "type": "bool" - }, - { - "name": "is_global", - "type": "bool" - } - ] - ], - "packet_level_event": [ - "container", - [ - { - "name": "event", - "type": [ - "mapper", - { - "type": "zigzag32", - "mappings": { - "1000": "sound_click", - "1001": "sound_click_fail", - "1002": "sound_shoot", - "1003": "sound_door", - "1004": "sound_fizz", - "1005": "sound_ignite", - "1007": "sound_ghast", - "1008": "sound_ghast_shoot", - "1009": "sound_blaze_shoot", - "1010": "sound_door_bump", - "1012": "sound_door_crash", - "1018": "sound_enderman_teleport", - "1020": "sound_anvil_break", - "1021": "sound_anvil_use", - "1022": "sound_anvil_fall", - "1030": "sound_pop", - "1032": "sound_portal", - "1040": "sound_itemframe_add_item", - "1041": "sound_itemframe_remove", - "1042": "sound_itemframe_place", - "1043": "sound_itemframe_remove_item", - "1044": "sound_itemframe_rotate_item", - "1050": "sound_camera", - "1051": "sound_orb", - "1052": "sound_totem", - "1060": "sound_armor_stand_break", - "1061": "sound_armor_stand_hit", - "1062": "sound_armor_stand_fall", - "1063": "sound_armor_stand_place", - "1064": "pointed_dripstone_land", - "1065": "dye_used", - "1066": "ink_sack_used", - "2000": "particle_shoot", - "2001": "particle_destroy", - "2002": "particle_splash", - "2003": "particle_eye_despawn", - "2004": "particle_spawn", - "2005": "particle_crop_growth", - "2006": "particle_guardian_curse", - "2007": "particle_death_smoke", - "2008": "particle_block_force_field", - "2009": "particle_projectile_hit", - "2010": "particle_dragon_egg_teleport", - "2011": "particle_crop_eaten", - "2012": "particle_critical", - "2013": "particle_enderman_teleport", - "2014": "particle_punch_block", - "2015": "particle_bubble", - "2016": "particle_evaporate", - "2017": "particle_destroy_armor_stand", - "2018": "particle_breaking_egg", - "2019": "particle_destroy_egg", - "2020": "particle_evaporate_water", - "2021": "particle_destroy_block_no_sound", - "2022": "particle_knockback_roar", - "2023": "particle_teleport_trail", - "2024": "particle_point_cloud", - "2025": "particle_explosion", - "2026": "particle_block_explosion", - "2027": "particle_vibration_signal", - "2028": "particle_dripstone_drip", - "2029": "particle_fizz_effect", - "2030": "particle_wax_on", - "2031": "particle_wax_off", - "2032": "particle_scrape", - "2033": "particle_electric_spark", - "3001": "start_rain", - "3002": "start_thunder", - "3003": "stop_rain", - "3004": "stop_thunder", - "3005": "pause_game", - "3006": "pause_game_no_screen", - "3007": "set_game_speed", - "3500": "redstone_trigger", - "3501": "cauldron_explode", - "3502": "cauldron_dye_armor", - "3503": "cauldron_clean_armor", - "3504": "cauldron_fill_potion", - "3505": "cauldron_take_potion", - "3506": "cauldron_fill_water", - "3507": "cauldron_take_water", - "3508": "cauldron_add_dye", - "3509": "cauldron_clean_banner", - "3600": "block_start_break", - "3601": "block_stop_break", - "4000": "set_data", - "9800": "players_sleeping", - "16384": "add_particle_mask", - "16385": "particle_bubble", - "16386": "particle_bubble_manual", - "16387": "particle_critical", - "16388": "particle_block_force_field", - "16389": "particle_smoke", - "16390": "particle_explode", - "16391": "particle_evaporation", - "16392": "particle_flame", - "16393": "particle_candle_flame", - "16394": "particle_lava", - "16395": "particle_large_smoke", - "16396": "particle_redstone", - "16397": "particle_rising_red_dust", - "16398": "particle_item_break", - "16399": "particle_snowball_poof", - "16400": "particle_huge_explode", - "16401": "particle_huge_explode_seed", - "16402": "particle_mob_flame", - "16403": "particle_heart", - "16404": "particle_terrain", - "16405": "particle_town_aura", - "16406": "particle_portal", - "16408": "particle_water_splash", - "16409": "particle_water_splash_manual", - "16410": "particle_water_wake", - "16411": "particle_drip_water", - "16412": "particle_drip_lava", - "16413": "particle_drip_honey", - "16414": "particle_stalactite_drip_water", - "16415": "particle_stalactite_drip_lava", - "16416": "particle_falling_dust", - "16417": "particle_mob_spell", - "16418": "particle_mob_spell_ambient", - "16419": "particle_mob_spell_instantaneous", - "16420": "particle_ink", - "16421": "particle_slime", - "16422": "particle_rain_splash", - "16423": "particle_villager_angry", - "16424": "particle_villager_happy", - "16425": "particle_enchantment_table", - "16426": "particle_tracking_emitter", - "16427": "particle_note", - "16428": "particle_witch_spell", - "16429": "particle_carrot", - "16430": "particle_mob_appearance", - "16431": "particle_end_rod", - "16432": "particle_dragons_breath", - "16433": "particle_spit", - "16434": "particle_totem", - "16435": "particle_food", - "16436": "particle_fireworks_starter", - "16437": "particle_fireworks_spark", - "16438": "particle_fireworks_overlay", - "16439": "particle_balloon_gas", - "16440": "particle_colored_flame", - "16441": "particle_sparkler", - "16442": "particle_conduit", - "16443": "particle_bubble_column_up", - "16444": "particle_bubble_column_down", - "16445": "particle_sneeze", - "16446": "particle_shulker_bullet", - "16447": "particle_bleach", - "16448": "particle_dragon_destroy_block", - "16449": "particle_mycelium_dust", - "16450": "particle_falling_red_dust", - "16451": "particle_campfire_smoke", - "16452": "particle_tall_campfire_smoke", - "16453": "particle_dragon_breath_fire", - "16454": "particle_dragon_breath_trail", - "16455": "particle_blue_flame", - "16456": "particle_soul", - "16457": "particle_obsidian_tear", - "16458": "particle_portal_reverse", - "16459": "particle_snowflake", - "16460": "particle_vibration_signal", - "16461": "particle_sculk_sensor_redstone", - "16462": "particle_spore_blossom_shower", - "16463": "particle_spore_blossom_ambient", - "16464": "particle_wax", - "16465": "particle_electric_spark" - } - } - ] - }, - { - "name": "position", - "type": "vec3f" - }, - { - "name": "data", - "type": "zigzag32" - } - ] - ], - "packet_block_event": [ - "container", - [ - { - "name": "position", - "type": "BlockCoordinates" - }, - { - "name": "type", - "type": [ - "mapper", - { - "type": "zigzag32", - "mappings": { - "0": "sound", - "1": "change_state" - } - } - ] - }, - { - "name": "data", - "type": "zigzag32" - } - ] - ], - "packet_entity_event": [ - "container", - [ - { - "name": "runtime_entity_id", - "type": "varint64" - }, - { - "name": "event_id", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "1": "jump", - "2": "hurt_animation", - "3": "death_animation", - "4": "arm_swing", - "5": "stop_attack", - "6": "tame_fail", - "7": "tame_success", - "8": "shake_wet", - "9": "use_item", - "10": "eat_grass_animation", - "11": "fish_hook_bubble", - "12": "fish_hook_position", - "13": "fish_hook_hook", - "14": "fish_hook_tease", - "15": "squid_ink_cloud", - "16": "zombie_villager_cure", - "18": "respawn", - "19": "iron_golem_offer_flower", - "20": "iron_golem_withdraw_flower", - "21": "love_particles", - "22": "villager_angry", - "23": "villager_happy", - "24": "witch_spell_particles", - "25": "firework_particles", - "26": "in_love_particles", - "27": "silverfish_spawn_animation", - "28": "guardian_attack", - "29": "witch_drink_potion", - "30": "witch_throw_potion", - "31": "minecart_tnt_prime_fuse", - "32": "creeper_prime_fuse", - "33": "air_supply_expired", - "34": "player_add_xp_levels", - "35": "elder_guardian_curse", - "36": "agent_arm_swing", - "37": "ender_dragon_death", - "38": "dust_particles", - "39": "arrow_shake", - "57": "eating_item", - "60": "baby_animal_feed", - "61": "death_smoke_cloud", - "62": "complete_trade", - "63": "remove_leash", - "65": "consume_totem", - "66": "player_check_treasure_hunter_achievement", - "67": "entity_spawn", - "68": "dragon_puke", - "69": "item_entity_merge", - "70": "start_swim", - "71": "balloon_pop", - "72": "treasure_hunt", - "73": "agent_summon", - "74": "charged_crossbow", - "75": "fall" - } - } - ] - }, - { - "name": "data", - "type": "zigzag32" - } - ] - ], - "packet_mob_effect": [ - "container", - [ - { - "name": "runtime_entity_id", - "type": "varint64" - }, - { - "name": "event_id", - "type": "u8" - }, - { - "name": "effect_id", - "type": "zigzag32" - }, - { - "name": "amplifier", - "type": "zigzag32" - }, - { - "name": "particles", - "type": "bool" - }, - { - "name": "duration", - "type": "zigzag32" - } - ] - ], - "packet_update_attributes": [ - "container", - [ - { - "name": "runtime_entity_id", - "type": "varint64" - }, - { - "name": "attributes", - "type": "PlayerAttributes" - }, - { - "name": "tick", - "type": "varint64" - } - ] - ], - "packet_inventory_transaction": [ - "container", - [ - { - "name": "transaction", - "type": "Transaction" - } - ] - ], - "packet_mob_equipment": [ - "container", - [ - { - "name": "runtime_entity_id", - "type": "varint64" - }, - { - "name": "item", - "type": "Item" - }, - { - "name": "slot", - "type": "u8" - }, - { - "name": "selected_slot", - "type": "u8" - }, - { - "name": "window_id", - "type": "WindowID" - } - ] - ], - "packet_mob_armor_equipment": [ - "container", - [ - { - "name": "runtime_entity_id", - "type": "varint64" - }, - { - "name": "helmet", - "type": "Item" - }, - { - "name": "chestplate", - "type": "Item" - }, - { - "name": "leggings", - "type": "Item" - }, - { - "name": "boots", - "type": "Item" - } - ] - ], - "packet_interact": [ - "container", - [ - { - "name": "action_id", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "3": "leave_vehicle", - "4": "mouse_over_entity", - "6": "open_inventory" - } - } - ] - }, - { - "name": "target_entity_id", - "type": "varint64" - }, - { - "name": "position", - "type": [ - "switch", - { - "compareTo": "action_id", - "fields": { - "mouse_over_entity": "vec3f", - "leave_vehicle": "vec3f" - }, - "default": "void" - } - ] - } - ] - ], - "packet_block_pick_request": [ - "container", - [ - { - "name": "x", - "type": "zigzag32" - }, - { - "name": "y", - "type": "zigzag32" - }, - { - "name": "z", - "type": "zigzag32" - }, - { - "name": "add_user_data", - "type": "bool" - }, - { - "name": "selected_slot", - "type": "u8" - } - ] - ], - "packet_entity_pick_request": [ - "container", - [ - { - "name": "runtime_entity_id", - "type": "lu64" - }, - { - "name": "selected_slot", - "type": "u8" - } - ] - ], - "packet_player_action": [ - "container", - [ - { - "name": "runtime_entity_id", - "type": "varint64" - }, - { - "name": "action", - "type": "Action" - }, - { - "name": "position", - "type": "BlockCoordinates" - }, - { - "name": "face", - "type": "zigzag32" - } - ] - ], - "packet_hurt_armor": [ - "container", - [ - { - "name": "health", - "type": "zigzag32" - } - ] - ], - "packet_set_entity_data": [ - "container", - [ - { - "name": "runtime_entity_id", - "type": "varint64" - }, - { - "name": "metadata", - "type": "MetadataDictionary" - }, - { - "name": "tick", - "type": "varint" - } - ] - ], - "packet_set_entity_motion": [ - "container", - [ - { - "name": "runtime_entity_id", - "type": "varint64" - }, - { - "name": "velocity", - "type": "vec3f" - } - ] - ], - "packet_set_entity_link": [ - "container", - [ - { - "name": "link", - "type": "Link" - } - ] - ], - "packet_set_health": [ - "container", - [ - { - "name": "health", - "type": "zigzag32" - } - ] - ], - "packet_set_spawn_position": [ - "container", - [ - { - "name": "spawn_type", - "type": [ - "mapper", - { - "type": "zigzag32", - "mappings": { - "0": "player", - "1": "world" - } - } - ] - }, - { - "name": "player_position", - "type": "BlockCoordinates" - }, - { - "name": "dimension", - "type": "zigzag32" - }, - { - "name": "world_position", - "type": "BlockCoordinates" - } - ] - ], - "packet_animate": [ - "container", - [ - { - "name": "action_id", - "type": [ - "mapper", - { - "type": "zigzag32", - "mappings": { - "0": "none", - "1": "swing_arm", - "2": "unknown", - "3": "wake_up", - "4": "critical_hit", - "5": "magic_critical_hit", - "6": "row_right", - "7": "row_left" - } - } - ] - }, - { - "name": "runtime_entity_id", - "type": "varint64" - } - ] - ], - "packet_respawn": [ - "container", - [ - { - "name": "position", - "type": "vec3f" - }, - { - "name": "state", - "type": "u8" - }, - { - "name": "runtime_entity_id", - "type": "varint64" - } - ] - ], - "packet_container_open": [ - "container", - [ - { - "name": "window_id", - "type": "WindowID" - }, - { - "name": "window_type", - "type": "WindowType" - }, - { - "name": "coordinates", - "type": "BlockCoordinates" - }, - { - "name": "runtime_entity_id", - "type": "zigzag64" - } - ] - ], - "packet_container_close": [ - "container", - [ - { - "name": "window_id", - "type": "WindowID" - }, - { - "name": "server", - "type": "bool" - } - ] - ], - "packet_player_hotbar": [ - "container", - [ - { - "name": "selected_slot", - "type": "varint" - }, - { - "name": "window_id", - "type": "WindowID" - }, - { - "name": "select_slot", - "type": "bool" - } - ] - ], - "packet_inventory_content": [ - "container", - [ - { - "name": "window_id", - "type": "WindowIDVarint" - }, - { - "name": "input", - "type": "ItemStacks" - } - ] - ], - "packet_inventory_slot": [ - "container", - [ - { - "name": "window_id", - "type": "WindowIDVarint" - }, - { - "name": "slot", - "type": "varint" - }, - { - "name": "item", - "type": "Item" - } - ] - ], - "packet_container_set_data": [ - "container", - [ - { - "name": "window_id", - "type": "WindowID" - }, - { - "name": "property", - "type": "zigzag32" - }, - { - "name": "value", - "type": "zigzag32" - } - ] - ], - "packet_crafting_data": [ - "container", - [ - { - "name": "recipes", - "type": "Recipes" - }, - { - "name": "potion_type_recipes", - "type": "PotionTypeRecipes" - }, - { - "name": "potion_container_recipes", - "type": "PotionContainerChangeRecipes" - }, - { - "name": "is_clean", - "type": "bool" - } - ] - ], - "packet_crafting_event": [ - "container", - [ - { - "name": "window_id", - "type": "WindowID" - }, - { - "name": "recipe_type", - "type": [ - "mapper", - { - "type": "zigzag32", - "mappings": { - "0": "inventory", - "1": "crafting", - "2": "workbench" - } - } - ] - }, - { - "name": "recipe_id", - "type": "uuid" - }, - { - "name": "input", - "type": [ - "array", - { - "countType": "varint", - "type": "Item" - } - ] - }, - { - "name": "result", - "type": [ - "array", - { - "countType": "varint", - "type": "Item" - } - ] - } - ] - ], - "packet_gui_data_pick_item": [ - "container", - [ - { - "name": "item_name", - "type": "string" - }, - { - "name": "item_effects", - "type": "string" - }, - { - "name": "hotbar_slot", - "type": "li32" - } - ] - ], - "packet_adventure_settings": [ - "container", - [ - { - "name": "flags", - "type": "AdventureFlags" - }, - { - "name": "command_permission", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "0": "normal", - "1": "operator", - "2": "host", - "3": "automation", - "4": "admin" - } - } - ] - }, - { - "name": "action_permissions", - "type": "ActionPermissions" - }, - { - "name": "permission_level", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "0": "visitor", - "1": "member", - "2": "operator", - "3": "custom" - } - } - ] - }, - { - "name": "custom_stored_permissions", - "type": "varint" - }, - { - "name": "user_id", - "type": "li64" - } - ] - ], - "packet_block_entity_data": [ - "container", - [ - { - "name": "position", - "type": "BlockCoordinates" - }, - { - "name": "nbt", - "type": "nbt" - } - ] - ], - "packet_player_input": [ - "container", - [ - { - "name": "motion_x", - "type": "lf32" - }, - { - "name": "motion_z", - "type": "lf32" - }, - { - "name": "jumping", - "type": "bool" - }, - { - "name": "sneaking", - "type": "bool" - } - ] - ], - "packet_level_chunk": [ - "container", - [ - { - "name": "x", - "type": "zigzag32" - }, - { - "name": "z", - "type": "zigzag32" - }, - { - "name": "sub_chunk_count", - "type": "varint" - }, - { - "name": "cache_enabled", - "type": "bool" - }, - { - "name": "blobs", - "type": [ - "switch", - { - "compareTo": "cache_enabled", - "fields": { - "true": [ - "container", - [ - { - "name": "hashes", - "type": [ - "array", - { - "countType": "varint", - "type": "lu64" - } - ] - } - ] - ] - }, - "default": "void" - } - ] - }, - { - "name": "payload", - "type": "ByteArray" - } - ] - ], - "packet_set_commands_enabled": [ - "container", - [ - { - "name": "enabled", - "type": "bool" - } - ] - ], - "packet_set_difficulty": [ - "container", - [ - { - "name": "difficulty", - "type": "varint" - } - ] - ], - "packet_change_dimension": [ - "container", - [ - { - "name": "dimension", - "type": "zigzag32" - }, - { - "name": "position", - "type": "vec3f" - }, - { - "name": "respawn", - "type": "bool" - } - ] - ], - "packet_set_player_game_type": [ - "container", - [ - { - "name": "gamemode", - "type": "GameMode" - } - ] - ], - "packet_player_list": [ - "container", - [ - { - "name": "records", - "type": "PlayerRecords" - } - ] - ], - "packet_simple_event": [ - "container", - [ - { - "name": "event_type", - "type": "lu16" - } - ] - ], - "packet_event": [ - "container", - [ - { - "name": "runtime_id", - "type": "varint64" - }, - { - "name": "event_type", - "type": [ - "mapper", - { - "type": "zigzag32", - "mappings": { - "0": "achievement_awarded", - "1": "entity_interact", - "2": "portal_built", - "3": "portal_used", - "4": "mob_killed", - "5": "cauldron_used", - "6": "player_death", - "7": "boss_killed", - "8": "agent_command", - "9": "agent_created", - "10": "banner_pattern_removed", - "11": "commaned_executed", - "12": "fish_bucketed", - "13": "mob_born", - "14": "pet_died", - "15": "cauldron_block_used", - "16": "composter_block_used", - "17": "bell_block_used", - "18": "actor_definition", - "19": "raid_update", - "20": "player_movement_anomaly", - "21": "player_moement_corrected", - "22": "honey_harvested", - "23": "target_block_hit", - "24": "piglin_barter", - "25": "waxed_or_unwaxed_copper" - } - } - ] - }, - { - "name": "use_player_id", - "type": "u8" - }, - { - "name": "event_data", - "type": "restBuffer" - } - ] - ], - "packet_spawn_experience_orb": [ - "container", - [ - { - "name": "position", - "type": "vec3f" - }, - { - "name": "count", - "type": "zigzag32" - } - ] - ], - "packet_clientbound_map_item_data": [ - "container", - [ - { - "name": "map_id", - "type": "zigzag64" - }, - { - "name": "update_flags", - "type": "UpdateMapFlags" - }, - { - "name": "dimension", - "type": "u8" - }, - { - "name": "locked", - "type": "bool" - }, - { - "name": "included_in", - "type": [ - "switch", - { - "compareTo": "update_flags.initialisation", - "fields": { - "true": [ - "array", - { - "countType": "varint", - "type": "zigzag64" - } - ] - }, - "default": "void" - } - ] - }, - { - "name": "scale", - "type": [ - "switch", - { - "compareTo": "update_flags.initialisation || update_flags.decoration || update_flags.texture", - "fields": { - "true": "u8" - }, - "default": "void" - } - ] - }, - { - "name": "tracked", - "type": [ - "switch", - { - "compareTo": "update_flags.decoration", - "fields": { - "true": [ - "container", - [ - { - "name": "objects", - "type": [ - "array", - { - "countType": "varint", - "type": "TrackedObject" - } - ] - }, - { - "name": "decorations", - "type": [ - "array", - { - "countType": "varint", - "type": "MapDecoration" - } - ] - } - ] - ] - }, - "default": "void" - } - ] - }, - { - "name": "texture", - "type": [ - "switch", - { - "compareTo": "update_flags.texture", - "fields": { - "true": [ - "container", - [ - { - "name": "width", - "type": "zigzag32" - }, - { - "name": "height", - "type": "zigzag32" - }, - { - "name": "x_offset", - "type": "zigzag32" - }, - { - "name": "y_offset", - "type": "zigzag32" - }, - { - "name": "pixels", - "type": [ - "array", - { - "countType": "varint", - "type": "varint" - } - ] - } - ] - ] - }, - "default": "void" - } - ] - } - ] - ], - "packet_map_info_request": [ - "container", - [ - { - "name": "map_id", - "type": "zigzag64" - } - ] - ], - "packet_request_chunk_radius": [ - "container", - [ - { - "name": "chunk_radius", - "type": "zigzag32" - } - ] - ], - "packet_chunk_radius_update": [ - "container", - [ - { - "name": "chunk_radius", - "type": "zigzag32" - } - ] - ], - "packet_item_frame_drop_item": [ - "container", - [ - { - "name": "coordinates", - "type": "BlockCoordinates" - } - ] - ], - "packet_game_rules_changed": [ - "container", - [ - { - "name": "rules", - "type": "GameRules" - } - ] - ], - "packet_camera": [ - "container", - [ - { - "name": "camera_entity_unique_id", - "type": "zigzag64" - }, - { - "name": "target_player_unique_id", - "type": "zigzag64" - } - ] - ], - "packet_boss_event": [ - "container", - [ - { - "name": "boss_entity_id", - "type": "zigzag64" - }, - { - "name": "type", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "0": "show_bar", - "1": "register_player", - "2": "hide_bar", - "3": "unregister_player", - "4": "set_bar_progress", - "5": "set_bar_title", - "6": "update_properties", - "7": "texture" - } - } - ] - }, - { - "anon": true, - "type": [ - "switch", - { - "compareTo": "type", - "fields": { - "show_bar": [ - "container", - [ - { - "name": "title", - "type": "string" - }, - { - "name": "progress", - "type": "lf32" - }, - { - "name": "screen_darkening", - "type": "li16" - }, - { - "name": "color", - "type": "varint" - }, - { - "name": "overlay", - "type": "varint" - } - ] - ], - "register_player": [ - "container", - [ - { - "name": "player_id", - "type": "zigzag64" - } - ] - ], - "unregister_player": [ - "container", - [ - { - "name": "player_id", - "type": "zigzag64" - } - ] - ], - "set_bar_progress": [ - "container", - [ - { - "name": "progress", - "type": "lf32" - } - ] - ], - "set_bar_title": [ - "container", - [ - { - "name": "title", - "type": "string" - } - ] - ], - "update_properties": [ - "container", - [ - { - "name": "screen_darkening", - "type": "li16" - }, - { - "name": "color", - "type": "varint" - }, - { - "name": "overlay", - "type": "varint" - } - ] - ], - "texture": [ - "container", - [ - { - "name": "color", - "type": "varint" - }, - { - "name": "overlay", - "type": "varint" - } - ] - ] - }, - "default": "void" - } - ] - } - ] - ], - "packet_show_credits": [ - "container", - [ - { - "name": "runtime_entity_id", - "type": "varint64" - }, - { - "name": "status", - "type": "zigzag32" - } - ] - ], - "packet_available_commands": [ - "container", - [ - { - "name": "values_len", - "type": "varint" - }, - { - "name": "_enum_type", - "type": [ - "enum_size_based_on_values_len" - ] - }, - { - "name": "enum_values", - "type": [ - "array", - { - "count": "values_len", - "type": "string" - } - ] - }, - { - "name": "suffixes", - "type": [ - "array", - { - "countType": "varint", - "type": "string" - } - ] - }, - { - "name": "enums", - "type": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "values", - "type": [ - "array", - { - "countType": "varint", - "type": [ - "switch", - { - "compareTo": "../_enum_type", - "fields": { - "byte": "u8", - "short": "lu16", - "int": "lu32" - }, - "default": "void" - } - ] - } - ] - } - ] - ] - } - ] - }, - { - "name": "command_data", - "type": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "description", - "type": "string" - }, - { - "name": "flags", - "type": "lu16" - }, - { - "name": "permission_level", - "type": "u8" - }, - { - "name": "alias", - "type": "li32" - }, - { - "name": "overloads", - "type": [ - "array", - { - "countType": "varint", - "type": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "paramater_name", - "type": "string" - }, - { - "name": "value_type", - "type": [ - "mapper", - { - "type": "lu16", - "mappings": { - "1": "int", - "2": "float", - "3": "value", - "4": "wildcard_int", - "5": "operator", - "6": "target", - "16": "file_path", - "32": "string", - "40": "position", - "44": "message", - "46": "raw_text", - "50": "json", - "63": "command" - } - } - ] - }, - { - "name": "enum_type", - "type": [ - "mapper", - { - "type": "lu16", - "mappings": { - "16": "valid", - "32": "enum", - "256": "suffixed", - "1024": "soft_enum" - } - } - ] - }, - { - "name": "optional", - "type": "bool" - }, - { - "name": "options", - "type": "CommandFlags" - } - ] - ] - } - ] - } - ] - } - ] - ] - } - ] - }, - { - "name": "dynamic_enums", - "type": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "values", - "type": [ - "array", - { - "countType": "varint", - "type": "string" - } - ] - } - ] - ] - } - ] - }, - { - "name": "enum_constraints", - "type": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "value_index", - "type": "li32" - }, - { - "name": "enum_index", - "type": "li32" - }, - { - "name": "constraints", - "type": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "constraint", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "0": "cheats_enabled", - "1": "operator_permissions", - "2": "host_permissions" - } - } - ] - } - ] - ] - } - ] - } - ] - ] - } - ] - } - ] - ], - "packet_command_request": [ - "container", - [ - { - "name": "command", - "type": "string" - }, - { - "name": "origin", - "type": "CommandOrigin" - }, - { - "name": "interval", - "type": "bool" - } - ] - ], - "packet_command_block_update": [ - "container", - [ - { - "name": "is_block", - "type": "bool" - }, - { - "anon": true, - "type": [ - "switch", - { - "compareTo": "is_block", - "fields": { - "true": [ - "container", - [ - { - "name": "position", - "type": "BlockCoordinates" - }, - { - "name": "mode", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "0": "impulse", - "1": "repeat", - "2": "chain" - } - } - ] - }, - { - "name": "needs_redstone", - "type": "bool" - }, - { - "name": "conditional", - "type": "bool" - } - ] - ] - }, - "default": [ - "container", - [ - { - "name": "minecart_entity_runtime_id", - "type": "varint64" - } - ] - ] - } - ] - }, - { - "name": "command", - "type": "string" - }, - { - "name": "last_output", - "type": "string" - }, - { - "name": "name", - "type": "string" - }, - { - "name": "should_track_output", - "type": "bool" - }, - { - "name": "tick_delay", - "type": "li32" - }, - { - "name": "execute_on_first_tick", - "type": "bool" - } - ] - ], - "packet_command_output": [ - "container", - [ - { - "name": "origin", - "type": "CommandOrigin" - }, - { - "name": "output_type", - "type": [ - "mapper", - { - "type": "i8", - "mappings": { - "1": "last", - "2": "silent", - "3": "all", - "4": "data_set" - } - } - ] - }, - { - "name": "success_count", - "type": "varint" - }, - { - "name": "output", - "type": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "success", - "type": "bool" - }, - { - "name": "message_id", - "type": "string" - }, - { - "name": "paramaters", - "type": [ - "array", - { - "countType": "varint", - "type": "string" - } - ] - } - ] - ] - } - ] - }, - { - "name": "data_set", - "type": [ - "switch", - { - "compareTo": "output_type", - "fields": { - "data_set": "string" - }, - "default": "void" - } - ] - } - ] - ], - "packet_update_trade": [ - "container", - [ - { - "name": "window_id", - "type": "WindowID" - }, - { - "name": "window_type", - "type": "WindowType" - }, - { - "name": "size", - "type": "varint" - }, - { - "name": "trade_tier", - "type": "varint" - }, - { - "name": "villager_unique_id", - "type": "varint64" - }, - { - "name": "entity_unique_id", - "type": "varint64" - }, - { - "name": "display_name", - "type": "string" - }, - { - "name": "new_trading_ui", - "type": "bool" - }, - { - "name": "economic_trades", - "type": "bool" - }, - { - "name": "offers", - "type": "nbt" - } - ] - ], - "packet_update_equipment": [ - "container", - [ - { - "name": "window_id", - "type": "WindowID" - }, - { - "name": "window_type", - "type": "WindowType" - }, - { - "name": "size", - "type": "u8" - }, - { - "name": "entity_id", - "type": "zigzag64" - }, - { - "name": "inventory", - "type": "nbt" - } - ] - ], - "packet_resource_pack_data_info": [ - "container", - [ - { - "name": "pack_id", - "type": "string" - }, - { - "name": "max_chunk_size", - "type": "lu32" - }, - { - "name": "chunk_count", - "type": "lu32" - }, - { - "name": "size", - "type": "lu64" - }, - { - "name": "hash", - "type": "ByteArray" - }, - { - "name": "is_premium", - "type": "bool" - }, - { - "name": "pack_type", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "1": "addon", - "2": "cached", - "3": "copy_protected", - "4": "behavior", - "5": "persona_piece", - "6": "resources", - "7": "skins", - "8": "world_template" - } - } - ] - } - ] - ], - "packet_resource_pack_chunk_data": [ - "container", - [ - { - "name": "pack_id", - "type": "string" - }, - { - "name": "chunk_index", - "type": "lu32" - }, - { - "name": "progress", - "type": "lu64" - }, - { - "name": "payload", - "type": "ByteArray" - } - ] - ], - "packet_resource_pack_chunk_request": [ - "container", - [ - { - "name": "pack_id", - "type": "string" - }, - { - "name": "chunk_index", - "type": "lu32" - } - ] - ], - "packet_transfer": [ - "container", - [ - { - "name": "server_address", - "type": "string" - }, - { - "name": "port", - "type": "lu16" - } - ] - ], - "packet_play_sound": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "coordinates", - "type": "BlockCoordinates" - }, - { - "name": "volume", - "type": "lf32" - }, - { - "name": "pitch", - "type": "lf32" - } - ] - ], - "packet_stop_sound": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "stop_all", - "type": "bool" - } - ] - ], - "packet_set_title": [ - "container", - [ - { - "name": "type", - "type": [ - "mapper", - { - "type": "zigzag32", - "mappings": { - "0": "clear", - "1": "reset", - "2": "set_title", - "3": "set_subtitle", - "4": "action_bar_message", - "5": "set_durations", - "6": "set_title_json", - "7": "set_subtitle_json", - "8": "action_bar_message_json" - } - } - ] - }, - { - "name": "text", - "type": "string" - }, - { - "name": "fade_in_time", - "type": "zigzag32" - }, - { - "name": "stay_time", - "type": "zigzag32" - }, - { - "name": "fade_out_time", - "type": "zigzag32" - }, - { - "name": "xuid", - "type": "string" - }, - { - "name": "platform_online_id", - "type": "string" - } - ] - ], - "packet_add_behavior_tree": [ - "container", - [ - { - "name": "behaviortree", - "type": "string" - } - ] - ], - "packet_structure_block_update": [ - "container", - [ - { - "name": "position", - "type": "BlockCoordinates" - }, - { - "name": "structure_name", - "type": "string" - }, - { - "name": "data_field", - "type": "string" - }, - { - "name": "include_players", - "type": "bool" - }, - { - "name": "show_bounding_box", - "type": "bool" - }, - { - "name": "structure_block_type", - "type": "zigzag32" - }, - { - "name": "settings", - "type": "StructureBlockSettings" - }, - { - "name": "redstone_save_mode", - "type": "zigzag32" - }, - { - "name": "should_trigger", - "type": "bool" - } - ] - ], - "packet_show_store_offer": [ - "container", - [ - { - "name": "offer_id", - "type": "string" - }, - { - "name": "show_all", - "type": "bool" - } - ] - ], - "packet_purchase_receipt": [ - "container", - [ - { - "name": "receipts", - "type": [ - "array", - { - "countType": "varint", - "type": "string" - } - ] - } - ] - ], - "packet_player_skin": [ - "container", - [ - { - "name": "uuid", - "type": "uuid" - }, - { - "name": "skin", - "type": "Skin" - }, - { - "name": "skin_name", - "type": "string" - }, - { - "name": "old_skin_name", - "type": "string" - }, - { - "name": "is_verified", - "type": "bool" - } - ] - ], - "packet_sub_client_login": [ - "container", - [ - { - "name": "tokens", - "type": [ - "encapsulated", - { - "lengthType": "varint", - "type": "LoginTokens" - } - ] - } - ] - ], - "packet_initiate_web_socket_connection": [ - "container", - [ - { - "name": "server", - "type": "string" - } - ] - ], - "packet_set_last_hurt_by": [ - "container", - [ - { - "name": "entity_type", - "type": "varint" - } - ] - ], - "packet_book_edit": [ - "container", - [ - { - "name": "type", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "0": "replace_page", - "1": "add_page", - "2": "delete_page", - "3": "swap_pages", - "4": "sign" - } - } - ] - }, - { - "name": "slot", - "type": "u8" - }, - { - "anon": true, - "type": [ - "switch", - { - "compareTo": "type", - "fields": { - "replace_page": [ - "container", - [ - { - "name": "page_number", - "type": "u8" - }, - { - "name": "text", - "type": "string" - }, - { - "name": "photo_name", - "type": "string" - } - ] - ], - "add_page": [ - "container", - [ - { - "name": "page_number", - "type": "u8" - }, - { - "name": "text", - "type": "string" - }, - { - "name": "photo_name", - "type": "string" - } - ] - ], - "delete_page": [ - "container", - [ - { - "name": "page_number", - "type": "u8" - } - ] - ], - "swap_pages": [ - "container", - [ - { - "name": "page1", - "type": "u8" - }, - { - "name": "page2", - "type": "u8" - } - ] - ], - "sign": [ - "container", - [ - { - "name": "title", - "type": "string" - }, - { - "name": "author", - "type": "string" - }, - { - "name": "xuid", - "type": "string" - } - ] - ] - }, - "default": "void" - } - ] - } - ] - ], - "packet_npc_request": [ - "container", - [ - { - "name": "runtime_entity_id", - "type": "varint64" - }, - { - "name": "request_type", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "0": "set_actions", - "1": "execute_action", - "2": "execute_closing_commands", - "3": "set_name", - "4": "set_skin", - "5": "set_interaction_text" - } - } - ] - }, - { - "name": "command", - "type": "string" - }, - { - "name": "action_type", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "0": "set_actions", - "1": "execute_action", - "2": "execute_closing_commands", - "3": "set_name", - "4": "set_skin", - "5": "set_interact_text", - "6": "execute_openining_commands" - } - } - ] - }, - { - "name": "scene_name", - "type": "string" - } - ] - ], - "packet_photo_transfer": [ - "container", - [ - { - "name": "image_name", - "type": "string" - }, - { - "name": "image_data", - "type": "string" - }, - { - "name": "book_id", - "type": "string" - } - ] - ], - "packet_modal_form_request": [ - "container", - [ - { - "name": "form_id", - "type": "varint" - }, - { - "name": "data", - "type": "string" - } - ] - ], - "packet_modal_form_response": [ - "container", - [ - { - "name": "form_id", - "type": "varint" - }, - { - "name": "data", - "type": "string" - } - ] - ], - "packet_server_settings_request": [ - "container", - [] - ], - "packet_server_settings_response": [ - "container", - [ - { - "name": "form_id", - "type": "varint" - }, - { - "name": "data", - "type": "string" - } - ] - ], - "packet_show_profile": [ - "container", - [ - { - "name": "xuid", - "type": "string" - } - ] - ], - "packet_set_default_game_type": [ - "container", - [ - { - "name": "gamemode", - "type": "GameMode" - } - ] - ], - "packet_remove_objective": [ - "container", - [ - { - "name": "objective_name", - "type": "string" - } - ] - ], - "packet_set_display_objective": [ - "container", - [ - { - "name": "display_slot", - "type": "string" - }, - { - "name": "objective_name", - "type": "string" - }, - { - "name": "display_name", - "type": "string" - }, - { - "name": "criteria_name", - "type": "string" - }, - { - "name": "sort_order", - "type": "zigzag32" - } - ] - ], - "packet_set_score": [ - "container", - [ - { - "name": "action", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "0": "change", - "1": "remove" - } - } - ] - }, - { - "name": "entries", - "type": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "scoreboard_id", - "type": "zigzag64" - }, - { - "name": "objective_name", - "type": "string" - }, - { - "name": "score", - "type": "li32" - }, - { - "anon": true, - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "change": [ - "container", - [ - { - "name": "entry_type", - "type": [ - "mapper", - { - "type": "i8", - "mappings": { - "1": "player", - "2": "entity", - "3": "fake_player" - } - } - ] - }, - { - "name": "entity_unique_id", - "type": [ - "switch", - { - "compareTo": "entry_type", - "fields": { - "player": "zigzag64", - "entity": "zigzag64" - }, - "default": "void" - } - ] - }, - { - "name": "custom_name", - "type": [ - "switch", - { - "compareTo": "entry_type", - "fields": { - "fake_player": "string" - }, - "default": "void" - } - ] - } - ] - ] - }, - "default": "void" - } - ] - } - ] - ] - } - ] - } - ] - ], - "packet_lab_table": [ - "container", - [ - { - "name": "action_type", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "0": "combine", - "1": "react" - } - } - ] - }, - { - "name": "position", - "type": "vec3u" - }, - { - "name": "reaction_type", - "type": "u8" - } - ] - ], - "packet_update_block_synced": [ - "container", - [ - { - "name": "position", - "type": "BlockCoordinates" - }, - { - "name": "block_runtime_id", - "type": "varint" - }, - { - "name": "flags", - "type": "UpdateBlockFlags" - }, - { - "name": "layer", - "type": "varint" - }, - { - "name": "entity_unique_id", - "type": "zigzag64" - }, - { - "name": "transition_type", - "type": [ - "mapper", - { - "type": "varint64", - "mappings": { - "0": "entity", - "1": "create", - "2": "destroy" - } - } - ] - } - ] - ], - "packet_move_entity_delta": [ - "container", - [ - { - "name": "runtime_entity_id", - "type": "varint64" - }, - { - "name": "flags", - "type": "DeltaMoveFlags" - }, - { - "name": "x", - "type": [ - "switch", - { - "compareTo": "flags.has_x", - "fields": { - "true": "lf32" - }, - "default": "void" - } - ] - }, - { - "name": "y", - "type": [ - "switch", - { - "compareTo": "flags.has_y", - "fields": { - "true": "lf32" - }, - "default": "void" - } - ] - }, - { - "name": "z", - "type": [ - "switch", - { - "compareTo": "flags.has_z", - "fields": { - "true": "lf32" - }, - "default": "void" - } - ] - }, - { - "name": "rot_x", - "type": [ - "switch", - { - "compareTo": "flags.has_rot_x", - "fields": { - "true": "u8" - }, - "default": "void" - } - ] - }, - { - "name": "rot_y", - "type": [ - "switch", - { - "compareTo": "flags.has_rot_y", - "fields": { - "true": "u8" - }, - "default": "void" - } - ] - }, - { - "name": "rot_z", - "type": [ - "switch", - { - "compareTo": "flags.has_rot_z", - "fields": { - "true": "u8" - }, - "default": "void" - } - ] - } - ] - ], - "packet_set_scoreboard_identity": [ - "container", - [ - { - "name": "action", - "type": [ - "mapper", - { - "type": "i8", - "mappings": { - "0": "register_identity", - "1": "clear_identity" - } - } - ] - }, - { - "name": "entries", - "type": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "scoreboard_id", - "type": "zigzag64" - }, - { - "name": "entity_unique_id", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "register_identity": "zigzag64" - }, - "default": "void" - } - ] - } - ] - ] - } - ] - } - ] - ], - "packet_set_local_player_as_initialized": [ - "container", - [ - { - "name": "runtime_entity_id", - "type": "varint64" - } - ] - ], - "packet_update_soft_enum": [ - "container", - [] - ], - "packet_network_stack_latency": [ - "container", - [ - { - "name": "timestamp", - "type": "lu64" - }, - { - "name": "needs_response", - "type": "u8" - } - ] - ], - "packet_script_custom_event": [ - "container", - [ - { - "name": "event_name", - "type": "string" - }, - { - "name": "event_data", - "type": "string" - } - ] - ], - "packet_spawn_particle_effect": [ - "container", - [ - { - "name": "dimension", - "type": "u8" - }, - { - "name": "entity_id", - "type": "zigzag64" - }, - { - "name": "position", - "type": "vec3f" - }, - { - "name": "particle_name", - "type": "string" - } - ] - ], - "packet_available_entity_identifiers": [ - "container", - [ - { - "name": "nbt", - "type": "nbt" - } - ] - ], - "packet_level_sound_event_v2": [ - "container", - [ - { - "name": "sound_id", - "type": "u8" - }, - { - "name": "position", - "type": "vec3f" - }, - { - "name": "block_id", - "type": "zigzag32" - }, - { - "name": "entity_type", - "type": "string" - }, - { - "name": "is_baby_mob", - "type": "bool" - }, - { - "name": "is_global", - "type": "bool" - } - ] - ], - "packet_network_chunk_publisher_update": [ - "container", - [ - { - "name": "coordinates", - "type": "BlockCoordinates" - }, - { - "name": "radius", - "type": "varint" - } - ] - ], - "packet_biome_definition_list": [ - "container", - [ - { - "name": "nbt", - "type": "nbt" - } - ] - ], - "packet_level_sound_event": [ - "container", - [ - { - "name": "sound_id", - "type": "SoundType" - }, - { - "name": "position", - "type": "vec3f" - }, - { - "name": "extra_data", - "type": "zigzag32" - }, - { - "name": "entity_type", - "type": "string" - }, - { - "name": "is_baby_mob", - "type": "bool" - }, - { - "name": "is_global", - "type": "bool" - } - ] - ], - "packet_level_event_generic": [ - "container", - [ - { - "name": "event_id", - "type": "varint" - }, - { - "name": "nbt", - "type": "nbtLoop" - } - ] - ], - "packet_lectern_update": [ - "container", - [ - { - "name": "page", - "type": "u8" - }, - { - "name": "page_count", - "type": "u8" - }, - { - "name": "position", - "type": "vec3i" - }, - { - "name": "drop_book", - "type": "bool" - } - ] - ], - "packet_video_stream_connect": [ - "container", - [ - { - "name": "server_uri", - "type": "string" - }, - { - "name": "frame_send_frequency", - "type": "lf32" - }, - { - "name": "action", - "type": "u8" - }, - { - "name": "resolution_x", - "type": "li32" - }, - { - "name": "resolution_y", - "type": "li32" - } - ] - ], - "packet_add_ecs_entity": [ - "container", - [ - { - "name": "network_id", - "type": "varint64" - } - ] - ], - "packet_remove_ecs_entity": [ - "container", - [ - { - "name": "network_id", - "type": "varint64" - } - ] - ], - "packet_client_cache_status": [ - "container", - [ - { - "name": "enabled", - "type": "bool" - } - ] - ], - "packet_on_screen_texture_animation": [ - "container", - [ - { - "name": "animation_type", - "type": "lu32" - } - ] - ], - "packet_map_create_locked_copy": [ - "container", - [ - { - "name": "original_map_id", - "type": "zigzag64" - }, - { - "name": "new_map_id", - "type": "zigzag64" - } - ] - ], - "packet_structure_template_data_export_request": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "position", - "type": "BlockCoordinates" - }, - { - "name": "settings", - "type": "StructureBlockSettings" - }, - { - "name": "request_type", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "1": "export_from_save", - "2": "export_from_load", - "3": "query_saved_structure" - } - } - ] - } - ] - ], - "packet_structure_template_data_export_response": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "success", - "type": "bool" - }, - { - "name": "nbt", - "type": [ - "switch", - { - "compareTo": "success", - "fields": { - "true": "nbt" - }, - "default": "void" - } - ] - }, - { - "name": "response_type", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "1": "export", - "2": "query" - } - } - ] - } - ] - ], - "packet_update_block_properties": [ - "container", - [ - { - "name": "nbt", - "type": "nbt" - } - ] - ], - "packet_client_cache_blob_status": [ - "container", - [ - { - "name": "misses", - "type": "varint" - }, - { - "name": "haves", - "type": "varint" - }, - { - "name": "missing", - "type": [ - "array", - { - "count": "misses", - "type": "lu64" - } - ] - }, - { - "name": "have", - "type": [ - "array", - { - "count": "haves", - "type": "lu64" - } - ] - } - ] - ], - "packet_client_cache_miss_response": [ - "container", - [ - { - "name": "blobs", - "type": [ - "array", - { - "countType": "varint", - "type": "Blob" - } - ] - } - ] - ], - "packet_education_settings": [ - "container", - [ - { - "name": "CodeBuilderDefaultURI", - "type": "string" - }, - { - "name": "CodeBuilderTitle", - "type": "string" - }, - { - "name": "CanResizeCodeBuilder", - "type": "bool" - }, - { - "name": "HasOverrideURI", - "type": "bool" - }, - { - "name": "OverrideURI", - "type": [ - "switch", - { - "compareTo": "HasOverrideURI", - "fields": { - "true": "string" - }, - "default": "void" - } - ] - }, - { - "name": "HasQuiz", - "type": "bool" - } - ] - ], - "packet_multiplayer_settings": [ - "container", - [ - { - "name": "action_type", - "type": [ - "mapper", - { - "type": "zigzag32", - "mappings": { - "0": "enable_multiplayer", - "1": "disable_multiplayer", - "2": "refresh_join_code" - } - } - ] - } - ] - ], - "packet_settings_command": [ - "container", - [ - { - "name": "command_line", - "type": "string" - }, - { - "name": "suppress_output", - "type": "bool" - } - ] - ], - "packet_anvil_damage": [ - "container", - [ - { - "name": "damage", - "type": "u8" - }, - { - "name": "position", - "type": "BlockCoordinates" - } - ] - ], - "packet_completed_using_item": [ - "container", - [ - { - "name": "used_item_id", - "type": "li16" - }, - { - "name": "use_method", - "type": [ - "mapper", - { - "type": "li32", - "mappings": { - "0": "equip_armor", - "1": "eat", - "2": "attack", - "3": "consume", - "4": "throw", - "5": "shoot", - "6": "place", - "7": "fill_bottle", - "8": "fill_bucket", - "9": "pour_bucket", - "10": "use_tool", - "11": "interact", - "12": "retrieved", - "13": "dyed", - "14": "traded" - } - } - ] - } - ] - ], - "packet_network_settings": [ - "container", - [ - { - "name": "compression_threshold", - "type": "u16" - } - ] - ], - "packet_player_auth_input": [ - "container", - [ - { - "name": "pitch", - "type": "lf32" - }, - { - "name": "yaw", - "type": "lf32" - }, - { - "name": "position", - "type": "vec3f" - }, - { - "name": "move_vector", - "type": "vec2f" - }, - { - "name": "head_yaw", - "type": "lf32" - }, - { - "name": "input_data", - "type": "InputFlag" - }, - { - "name": "input_mode", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "0": "unknown", - "1": "mouse", - "2": "touch", - "3": "game_pad", - "4": "motion_controller" - } - } - ] - }, - { - "name": "play_mode", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "0": "normal", - "1": "teaser", - "2": "screen", - "3": "viewer", - "4": "reality", - "5": "placement", - "6": "living_room", - "7": "exit_level", - "8": "exit_level_living_room", - "9": "num_modes" - } - } - ] - }, - { - "name": "gaze_direction", - "type": [ - "switch", - { - "compareTo": "play_mode", - "fields": { - "reality": "vec3f" - }, - "default": "void" - } - ] - }, - { - "name": "tick", - "type": "varint64" - }, - { - "name": "delta", - "type": "vec3f" - }, - { - "name": "transaction", - "type": [ - "switch", - { - "compareTo": "input_data.item_interact", - "fields": { - "true": [ - "container", - [ - { - "name": "legacy", - "type": "TransactionLegacy" - }, - { - "name": "actions", - "type": "TransactionActions" - }, - { - "name": "data", - "type": "TransactionUseItem" - } - ] - ] - }, - "default": "void" - } - ] - }, - { - "name": "item_stack_request", - "type": [ - "switch", - { - "compareTo": "input_data.item_stack_request", - "fields": { - "true": "ItemStackRequest" - }, - "default": "void" - } - ] - }, - { - "name": "block_action", - "type": [ - "switch", - { - "compareTo": "input_data.block_action", - "fields": { - "true": [ - "array", - { - "countType": "zigzag32", - "type": [ - "container", - [ - { - "name": "action", - "type": "Action" - }, - { - "anon": true, - "type": [ - "switch", - { - "compareTo": "action", - "fields": { - "start_break": [ - "container", - [ - { - "name": "position", - "type": "BlockCoordinates" - }, - { - "name": "face", - "type": "zigzag32" - } - ] - ], - "abort_break": [ - "container", - [ - { - "name": "position", - "type": "BlockCoordinates" - }, - { - "name": "face", - "type": "zigzag32" - } - ] - ], - "crack_break": [ - "container", - [ - { - "name": "position", - "type": "BlockCoordinates" - }, - { - "name": "face", - "type": "zigzag32" - } - ] - ], - "predict_break": [ - "container", - [ - { - "name": "position", - "type": "BlockCoordinates" - }, - { - "name": "face", - "type": "zigzag32" - } - ] - ], - "continue_break": [ - "container", - [ - { - "name": "position", - "type": "BlockCoordinates" - }, - { - "name": "face", - "type": "zigzag32" - } - ] - ] - }, - "default": "void" - } - ] - } - ] - ] - } - ] - }, - "default": "void" - } - ] - } - ] - ], - "packet_creative_content": [ - "container", - [ - { - "name": "items", - "type": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "entry_id", - "type": "varint" - }, - { - "name": "item", - "type": "ItemLegacy" - } - ] - ] - } - ] - } - ] - ], - "packet_player_enchant_options": [ - "container", - [ - { - "name": "options", - "type": [ - "array", - { - "countType": "varint", - "type": "EnchantOption" - } - ] - } - ] - ], - "packet_item_stack_request": [ - "container", - [ - { - "name": "requests", - "type": [ - "array", - { - "countType": "varint", - "type": "ItemStackRequest" - } - ] - } - ] - ], - "packet_item_stack_response": [ - "container", - [ - { - "name": "responses", - "type": "ItemStackResponses" - } - ] - ], - "packet_player_armor_damage": [ - "container", - [ - { - "name": "type", - "type": "ArmorDamageType" - }, - { - "name": "helmet_damage", - "type": [ - "switch", - { - "compareTo": "type.head", - "fields": { - "true": "zigzag32" - }, - "default": "void" - } - ] - }, - { - "name": "chestplate_damage", - "type": [ - "switch", - { - "compareTo": "type.chest", - "fields": { - "true": "zigzag32" - }, - "default": "void" - } - ] - }, - { - "name": "leggings_damage", - "type": [ - "switch", - { - "compareTo": "type.legs", - "fields": { - "true": "zigzag32" - }, - "default": "void" - } - ] - }, - { - "name": "boots_damage", - "type": [ - "switch", - { - "compareTo": "type.feet", - "fields": { - "true": "zigzag32" - }, - "default": "void" - } - ] - } - ] - ], - "packet_update_player_game_type": [ - "container", - [ - { - "name": "gamemode", - "type": "GameMode" - }, - { - "name": "player_unique_id", - "type": "zigzag64" - } - ] - ], - "packet_position_tracking_db_request": [ - "container", - [ - { - "name": "action", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "0": "query" - } - } - ] - }, - { - "name": "tracking_id", - "type": "zigzag32" - } - ] - ], - "packet_position_tracking_db_broadcast": [ - "container", - [ - { - "name": "broadcast_action", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "0": "update", - "1": "destory", - "2": "not_found" - } - } - ] - }, - { - "name": "tracking_id", - "type": "zigzag32" - }, - { - "name": "nbt", - "type": "nbt" - } - ] - ], - "packet_packet_violation_warning": [ - "container", - [ - { - "name": "violation_type", - "type": [ - "mapper", - { - "type": "zigzag32", - "mappings": { - "0": "malformed" - } - } - ] - }, - { - "name": "severity", - "type": [ - "mapper", - { - "type": "zigzag32", - "mappings": { - "0": "warning", - "1": "final_warning", - "2": "terminating" - } - } - ] - }, - { - "name": "packet_id", - "type": "zigzag32" - }, - { - "name": "reason", - "type": "string" - } - ] - ], - "packet_motion_prediction_hints": [ - "container", - [ - { - "name": "entity_runtime_id", - "type": "varint64" - }, - { - "name": "velocity", - "type": "vec3f" - }, - { - "name": "on_ground", - "type": "bool" - } - ] - ], - "packet_animate_entity": [ - "container", - [ - { - "name": "animation", - "type": "string" - }, - { - "name": "next_state", - "type": "string" - }, - { - "name": "stop_condition", - "type": "string" - }, - { - "name": "controller", - "type": "string" - }, - { - "name": "blend_out_time", - "type": "lf32" - }, - { - "name": "runtime_entity_ids", - "type": [ - "array", - { - "countType": "varint", - "type": "varint64" - } - ] - } - ] - ], - "packet_camera_shake": [ - "container", - [ - { - "name": "intensity", - "type": "lf32" - }, - { - "name": "duration", - "type": "lf32" - }, - { - "name": "type", - "type": "u8" - }, - { - "name": "action", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "0": "add", - "1": "stop" - } - } - ] - } - ] - ], - "packet_player_fog": [ - "container", - [ - { - "name": "stack", - "type": [ - "array", - { - "countType": "varint", - "type": "string" - } - ] - } - ] - ], - "packet_correct_player_move_prediction": [ - "container", - [ - { - "name": "position", - "type": "vec3f" - }, - { - "name": "delta", - "type": "vec3f" - }, - { - "name": "on_ground", - "type": "bool" - }, - { - "name": "tick", - "type": "varint64" - } - ] - ], - "packet_item_component": [ - "container", - [ - { - "name": "entries", - "type": "ItemComponentList" - } - ] - ], - "packet_filter_text_packet": [ - "container", - [ - { - "name": "text", - "type": "string" - }, - { - "name": "from_server", - "type": "bool" - } - ] - ], - "packet_debug_renderer": [ - "container", - [ - { - "name": "type", - "type": [ - "mapper", - { - "type": "li32", - "mappings": { - "1": "clear", - "2": "add_cube" - } - } - ] - }, - { - "anon": true, - "type": [ - "switch", - { - "compareTo": "type", - "fields": { - "clear": "void", - "add_cube": [ - "container", - [ - { - "name": "text", - "type": "string" - }, - { - "name": "position", - "type": "vec3f" - }, - { - "name": "red", - "type": "lf32" - }, - { - "name": "green", - "type": "lf32" - }, - { - "name": "blue", - "type": "lf32" - }, - { - "name": "alpha", - "type": "lf32" - }, - { - "name": "duration", - "type": "li64" - } - ] - ] - }, - "default": "void" - } - ] - } - ] - ], - "packet_sync_entity_property": [ - "container", - [ - { - "name": "nbt", - "type": "nbt" - } - ] - ], - "packet_add_volume_entity": [ - "container", - [ - { - "name": "entity_id", - "type": "varint64" - }, - { - "name": "nbt", - "type": "nbt" - } - ] - ], - "packet_remove_volume_entity": [ - "container", - [ - { - "name": "entity_id", - "type": "varint64" - } - ] - ], - "packet_simulation_type": [ - "container", - [ - { - "name": "type", - "type": [ - "mapper", - { - "type": "u8", - "mappings": { - "0": "game", - "1": "editor", - "2": "test", - "3": "invalid" - } - } - ] - } - ] - ], - "packet_npc_dialogue": [ - "container", - [ - { - "name": "entity_id", - "type": "lu64" - }, - { - "name": "action_type", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "0": "open", - "1": "close" - } - } - ] - }, - { - "name": "dialogue", - "type": "string" - }, - { - "name": "screen_name", - "type": "string" - }, - { - "name": "npc_name", - "type": "string" - }, - { - "name": "action_json", - "type": "string" - } - ] - ], - "string": [ - "pstring", - { - "countType": "varint" - } - ], - "ByteArray": [ - "buffer", - { - "countType": "varint" - } - ], - "SignedByteArray": [ - "buffer", - { - "countType": "zigzag32" - } - ], - "LittleString": [ - "pstring", - { - "countType": "li32" - } - ], - "ShortArray": [ - "buffer", - { - "countType": "li16" - } - ], - "MetadataFlags1": [ - "bitflags", - { - "type": "zigzag64", - "big": true, - "flags": [ - "onfire", - "sneaking", - "riding", - "sprinting", - "action", - "invisible", - "tempted", - "inlove", - "saddled", - "powered", - "ignited", - "baby", - "converting", - "critical", - "can_show_nametag", - "always_show_nametag", - "no_ai", - "silent", - "wallclimbing", - "can_climb", - "swimmer", - "can_fly", - "walker", - "resting", - "sitting", - "angry", - "interested", - "charged", - "tamed", - "orphaned", - "leashed", - "sheared", - "gliding", - "elder", - "moving", - "breathing", - "chested", - "stackable", - "showbase", - "rearing", - "vibrating", - "idling", - "evoker_spell", - "charge_attack", - "wasd_controlled", - "can_power_jump", - "linger", - "has_collision", - "affected_by_gravity", - "fire_immune", - "dancing", - "enchanted", - "show_trident_rope", - "container_private", - "transforming", - "spin_attack", - "swimming", - "bribed", - "pregnant", - "laying_egg", - "rider_can_pick", - "transition_sitting", - "eating", - "laying_down" - ] - } - ], - "MetadataFlags2": [ - "bitflags", - { - "type": "zigzag64", - "big": true, - "flags": [ - "sneezing", - "trusting", - "rolling", - "scared", - "in_scaffolding", - "over_scaffolding", - "fall_through_scaffolding", - "blocking", - "transition_blocking", - "blocked_using_shield", - "blocked_using_damaged_shield", - "sleeping", - "wants_to_wake", - "trade_interest", - "door_breaker", - "breaking_obstruction", - "door_opener", - "illager_captain", - "stunned", - "roaring", - "delayed_attacking", - "avoiding_mobs", - "avoiding_block", - "facing_target_to_range_attack", - "hidden_when_invisible", - "is_in_ui", - "stalking", - "emoting", - "celebrating", - "admiring", - "celebrating_special", - "unknown95", - "ram_attack", - "playing_dead" - ] - } - ], - "UpdateBlockFlags": [ - "bitflags", - { - "type": "varint", - "flags": { - "neighbors": 1, - "network": 2, - "no_graphic": 4, - "unused": 8, - "priority": 16 - } - } - ], - "AdventureFlags": [ - "bitflags", - { - "type": "varint", - "flags": { - "world_immutable": 1, - "no_pvp": 2, - "auto_jump": 32, - "allow_flight": 64, - "no_clip": 128, - "world_builder": 256, - "flying": 512, - "muted": 1024 - } - } - ], - "ActionPermissions": [ - "bitflags", - { - "type": "varint", - "flags": { - "mine": 65537, - "doors_and_switches": 65538, - "open_containers": 65540, - "attack_players": 65544, - "attack_mobs": 65552, - "operator": 65568, - "teleport": 65664, - "build": 65792, - "default": 66048 - } - } - ], - "UpdateMapFlags": [ - "bitflags", - { - "type": "varint", - "flags": [ - "void", - "texture", - "decoration", - "initialisation" - ] - } - ], - "CommandFlags": [ - "bitfield", - [ - { - "name": "unused", - "size": 6, - "signed": false - }, - { - "name": "has_semantic_constraint", - "size": 1, - "signed": false - }, - { - "name": "collapse_enum", - "size": 1, - "signed": false - } - ] - ], - "DeltaMoveFlags": [ - "bitflags", - { - "type": "lu16", - "flags": { - "has_x": 1, - "has_y": 2, - "has_z": 4, - "has_rot_x": 8, - "has_rot_y": 16, - "has_rot_z": 32, - "on_ground": 64, - "teleport": 128, - "force_move": 256 - } - } - ], - "InputFlag": [ - "bitflags", - { - "type": "varint64", - "big": true, - "flags": [ - "ascend", - "descend", - "north_jump", - "jump_down", - "sprint_down", - "change_height", - "jumping", - "auto_jumping_in_water", - "sneaking", - "sneak_down", - "up", - "down", - "left", - "right", - "up_left", - "up_right", - "want_up", - "want_down", - "want_down_slow", - "want_up_slow", - "sprinting", - "ascend_block", - "descend_block", - "sneak_toggle_down", - "persist_sneak", - "start_sprinting", - "stop_sprinting", - "start_sneaking", - "stop_sneaking", - "start_swimming", - "stop_swimming", - "start_jumping", - "start_gliding", - "stop_gliding", - "item_interact", - "block_action", - "item_stack_request" - ] - } - ], - "ArmorDamageType": [ - "bitflags", - { - "type": "u8", - "flags": { - "head": 1, - "chest": 2, - "legs": 4, - "feet": 8 - } - } - ] - } -} \ No newline at end of file diff --git a/data/latest/proto.yml b/data/latest/proto.yml deleted file mode 100644 index d2998d1..0000000 --- a/data/latest/proto.yml +++ /dev/null @@ -1,3171 +0,0 @@ -# Created from MiNET and gophertunnel docs -# The version below is the latest version this protocol schema was updated for. -# The output protocol.json will be in the folder for the version -!version: 1.17.10 - -# Some ProtoDef aliases -string: ["pstring",{"countType":"varint"}] # String / array types -ByteArray: ["buffer",{"countType":"varint"}] -SignedByteArray: ["buffer",{"countType":"zigzag32"}] -LittleString: ["pstring",{"countType":"li32"}] -ShortArray: ["buffer",{"countType":"li16"}] -varint64: native # Some primitives -zigzag32: native -zigzag64: native -uuid: native # Data types & special handling -byterot: native -bitflags: native -restBuffer: native -encapsulated: native -nbt: native # NBT -lnbt: native -nbtLoop: native -enum_size_based_on_values_len: native # Packet-specific custom logic -MapInfo: native - -# load the packet map file (auto-generated) -!import: packet_map.yml - -!StartDocs: Packets - -# # Login Sequence -# The login process is as follows: -# -# * C→S: [Login](#packet_login) -# * S→C: [Server To Client Handshake](#packet_server_to_client_handshake) -# * C→S: [Client To Server Handshake](#packet_client_to_server_handshake) -# * S→C: [Play Status (Login success)](#packet_play_status) -# * To spawn, the following packets should be sent, in order, after the ones above: -# * S→C: [Resource Packs Info](#packet_resource_packs_info) -# * C→S: [Resource Pack Client Response](#packet_resource_pack_client_response) -# * S→C: [Resource Pack Stack](#packet_resource_pack_stack) -# * C→S: [Resource Pack Client Response](#packet_resource_pack_client_response) -# * S→C: [Start Game](#packet_start_game) -# * S→C: [Creative Content](#packet_creative_content) -# * S→C: [Biome Definition List](#packet_biome_definition_list) -# * S→C: [Chunks](#packet_level_chunk) -# * S→C: [Play Status (Player spawn)](#packet_play_status) -# -# If there are no resource packs being sent, a Resource Pack Stack can be sent directly -# after Resource Packs Info to avoid the client responses. -# -# === - -packet_login: - !id: 0x01 - !bound: server - # Protocol version (Big Endian!) - protocol_version: i32 - tokens: '["encapsulated", { "lengthType": "varint", "type": "LoginTokens" }]' - -LoginTokens: - # JSON array of JWT data: contains the display name, UUID and XUID - # It should be signed by the Mojang public key - identity: LittleString - # Skin related data - client: LittleString - -packet_play_status: - !id: 0x02 - !bound: client - status: i32 => - # Sent after Login has been successfully decoded and the player has logged in - 0: login_success - # Displays "Could not connect: Outdated client!" - 1: failed_client - # Displays "Could not connect: Outdated server!" - 2: failed_spawn - # Sent after world data to spawn the player - 3: player_spawn - # Displays "Unable to connect to world. Your school does not have access to this server." - 4: failed_invalid_tenant - # Displays "The server is not running Minecraft: Education Edition. Failed to connect." - 5: failed_vanilla_edu - # Displays "The server is running an incompatible edition of Minecraft. Failed to connect." - 6: failed_edu_vanilla - # Displays "Wow this server is popular! Check back later to see if space opens up. Server Full" - 7: failed_server_full - - -packet_server_to_client_handshake: - !id: 0x03 - !bound: client - # Contains the salt to complete the Diffie-Hellman key exchange - token: string - - -# Sent by the client in response to a Server To Client Handshake packet -# sent by the server. It is the first encrypted packet in the login handshake -# and serves as a confirmation that encryption is correctly initialized client side. -# It has no fields. -packet_client_to_server_handshake: - !id: 0x04 - !bound: server - -# Sent by the server to disconnect a client. -packet_disconnect: - !id: 0x05 - !bound: client - # Specifies if the disconnection screen should be hidden when the client is disconnected, - # meaning it will be sent directly to the main menu. - hide_disconnect_reason: bool - # An optional message to show when disconnected. - message: string - - -packet_resource_packs_info: - !id: 0x06 - !bound: client - # If the resource pack requires the client accept it. - must_accept: bool - # If scripting is enabled. - has_scripts: bool - # ForcingServerPacks is currently an unclear field. - force_server_packs: bool - # A list of behaviour packs that the client needs to download before joining the server. - # All of these behaviour packs will be applied together. - behaviour_packs: BehaviourPackInfos - # A list of resource packs that the client needs to download before joining the server. - # The order of these resource packs is not relevant in this packet. It is however important in the Resource Pack Stack packet. - texture_packs: TexturePackInfos - -packet_resource_pack_stack: - !id: 0x07 - !bound: client - # If the resource pack must be accepted for the player to join the server. - must_accept: bool - # [inline] - behavior_packs: ResourcePackIdVersions - # [inline] - resource_packs: ResourcePackIdVersions - game_version: string - experiments: Experiments # ??? such random fields - experiments_previously_used: bool - -packet_resource_pack_client_response: - !id: 0x08 - !bound: server - response_status: u8 => - 0: none - 1: refused - 2: send_packs - 3: have_all_packs - 4: completed - # All of the pack IDs. - resourcepackids: ResourcePackIds - -# Sent by the client to the server to send chat messages, and by the server to the client -# to forward or send messages, which may be chat, popups, tips etc. -## https://github.com/pmmp/PocketMine-MP/blob/a43b46a93cb127f037c879b5d8c29cda251dd60c/src/pocketmine/network/mcpe/protocol/TextPacket.php -## https://github.com/Sandertv/gophertunnel/blob/05ac3f843dd60d48b9ca0ab275cda8d9e85d8c43/minecraft/protocol/packet/text.go -packet_text: - !id: 0x09 - !bound: both - # TextType is the type of the text sent. When a client sends this to the server, it should always be - # TextTypeChat. If the server sends it, it may be one of the other text types above. - type: u8 => - 0: raw - 1: chat - 2: translation - 3: popup - 4: jukebox_popup - 5: tip - 6: system - 7: whisper - 8: announcement - 9: json_whisper - 10: json - # NeedsTranslation specifies if any of the messages need to be translated. It seems that where % is found - # in translatable text types, these are translated regardless of this bool. Translatable text types - # include TextTypeTip, TextTypePopup and TextTypeJukeboxPopup. - needs_translation: bool - _: type? - if chat or whisper or announcement: - source_name: string - message: string - if raw or tip or system or json_whisper or json: - message: string - if translation or popup or jukebox_popup: - message: string - paramaters: string[]varint - # The XUID of the player who sent this message. - xuid: string - # PlatformChatID is an identifier only set for particular platforms when chatting (presumably only for - # Nintendo Switch). It is otherwise an empty string, and is used to decide which players are able to - # chat with each other. - platform_chat_id: string -# For additional information and examples of all the chat types above, see here: https://imgur.com/a/KhcFscg - - -# Sent by the server to update the current time client-side. The client actually advances time -# client-side by itself, so this packet does not need to be sent each tick. It is merely a means -# of synchronizing time between server and client. -packet_set_time: - !id: 0x0a - !bound: client - # Time is the current time. The time is not limited to 24000 (time of day), but continues - # progressing after that. - time: zigzag32 - -# Sent by the server to send information about the world the player will be spawned in. -packet_start_game: - !id: 0x0b - !bound: client - # The unique ID of the player. The unique ID is a value that remains consistent across - # different sessions of the same world, but most unofficial servers simply fill the - # runtime ID of the entity out for this field. - entity_id: zigzag64 - # The runtime ID of the player. The runtime ID is unique for each world session, - # and entities are generally identified in packets using this runtime ID. - runtime_entity_id: varint64 - # PlayerGameMode is the game mode the player currently has. It is a value from 0-4, with 0 being - # survival mode, 1 being creative mode, 2 being adventure mode, 3 being survival spectator and 4 being - # creative spectator. - # This field may be set to 5 to make the client fall back to the game mode set in the WorldGameMode - # field. - player_gamemode: GameMode - # The spawn position of the player in the world. In servers this is often the same as the - # world's spawn position found below. - player_position: vec3f - # The pitch and yaw of the player - rotation: vec2f - # The seed used to generate the world. Unlike in Java edition, the seed is a 32bit Integer here. - seed: zigzag32 - biome_type: li16 - biome_name: string - # Dimension is the ID of the dimension that the player spawns in. It is a value from 0-2, - # with 0 being the overworld, 1 being the nether and 2 being the end. - dimension: zigzag32 - # Generator is the generator used for the world. It is a value from 0-4, with 0 being old - # limited worlds, 1 being infinite worlds, 2 being flat worlds, 3 being nether worlds and - # 4 being end worlds. A value of 0 will actually make the client stop rendering chunks you - # send beyond the world limit. - generator: zigzag32 - # The world game mode that a player gets when it first spawns in the world. It is shown in the - # settings and is used if the Player Gamemode is set to 5. - world_gamemode: GameMode - # Difficulty is the difficulty of the world. It is a value from 0-3, with 0 being peaceful, - # 1 being easy, 2 being normal and 3 being hard. - difficulty: zigzag32 - # The block on which the world spawn of the world. This coordinate has no effect on the place - # that the client spawns, but it does have an effect on the direction that a compass poInts. - spawn_position: BlockCoordinates - # Defines if achievements are disabled in the world. The client crashes if this value is set - # to true while the player's or the world's game mode is creative, and it's recommended to simply - # always set this to false as a server. - achievements_disabled: bool - # The time at which the day cycle was locked if the day cycle is disabled using the respective - # game rule. The client will maIntain this time as Boolean as the day cycle is disabled. - day_cycle_stop_time: zigzag32 - # Some Minecraft: Education Edition field that specifies what 'region' the world was from, - # with 0 being None, 1 being RestOfWorld, and 2 being China. The actual use of this field is unknown. - edu_offer: zigzag32 - # Specifies if the world has education edition features enabled, such as the blocks or entities - # specific to education edition. - edu_features_enabled: bool - edu_product_uuid: string - # The level specifying the Intensity of the rain falling. When set to 0, no rain falls at all. - rain_level: lf32 - lightning_level: lf32 - # The level specifying the Intensity of the thunder. This may actually be set independently - # from the rain level, meaning dark clouds can be produced without rain. - has_confirmed_platform_locked_content: bool - # Specifies if the world is a multi-player game. This should always be set to true for servers. - is_multiplayer: bool - # Specifies if LAN broadcast was Intended to be enabled for the world. - broadcast_to_lan: bool - # The mode used to broadcast the joined game across XBOX Live. - xbox_live_broadcast_mode: varint - # The mode used to broadcast the joined game across the platform. - platform_broadcast_mode: varint - # If commands are enabled for the player. It is recommended to always set this to true on the - # server, as setting it to false means the player cannot, under any circumstance, use a command. - enable_commands: bool - # Specifies if the texture pack the world might hold is required, meaning the client was - # forced to download it before joining. - is_texturepacks_required: bool - # Defines game rules currently active with their respective values. The value of these game - # rules may be either 'bool', 'Int32' or 'Float32'. Some game rules are server side only, - # and don't necessarily need to be sent to the client. - gamerules: GameRules - experiments: Experiments - experiments_previously_used: bool - # Specifies if the world had the bonus map setting enabled when generating it. - # It does not have any effect client-side. - bonus_chest: bool - # Specifies if the world has the start with map setting enabled, meaning each - # joining player obtains a map. This should always be set to false, because the - # client obtains a map all on its own accord if this is set to true. - map_enabled: bool - # The permission level of the player. It is a value from 0-3, with 0 being visitor, - # 1 being member, 2 being operator and 3 being custom. - permission_level: zigzag32 - # The radius around the player in which chunks are ticked. Most servers set this value - # to a fixed number, as it does not necessarily affect anything client-side. - server_chunk_tick_range: li32 - # Specifies if the texture pack of the world is locked, meaning it cannot be disabled - # from the world. This is typically set for worlds on the marketplace that have a dedicated - # texture pack. - has_locked_behavior_pack: bool - # Specifies if the texture pack of the world is locked, meaning it cannot be disabled from the - # world. This is typically set for worlds on the marketplace that have a dedicated texture pack. - has_locked_resource_pack: bool - # Specifies if the world from the server was from a locked world template. - # For servers this should always be set to false. - is_from_locked_world_template: bool - msa_gamertags_only: bool - # Specifies if the world from the server was from a locked world template. - # For servers this should always be set to false. - is_from_world_template: bool - # Specifies if the world was a template that locks all settings that change properties - # above in the settings GUI. It is recommended to set this to true for servers that - # do not allow things such as setting game rules through the GUI. - is_world_template_option_locked: bool - # A hack that Mojang put in place to preserve backwards compatibility with old villagers. - # The his never actually read though, so it has no functionality. - only_spawn_v1_villagers: bool - # The version of the game from which Vanilla features will be used. - # The exact function of this field isn't clear. - game_version: string - limited_world_width: li32 - limited_world_length: li32 - is_new_nether: bool - experimental_gameplay_override: bool - # A base64 encoded world ID that is used to identify the world. - level_id: string - # The name of the world that the player is joining. Note that this field shows up - # above the player list for the rest of the game session, and cannot be changed. - # Setting the server name to this field is recommended. - world_name: string - # A UUID specific to the premium world template that might have been used to - # generate the world. Servers should always fill out an empty String for this. - premium_world_template_id: string - # Specifies if the world was a trial world, meaning features are limited and there - # is a time limit on the world. - is_trial: bool - - # MovementType specifies the way the server handles player movement. Available options are - # packet.AuthoritativeMovementModeClient, packet.AuthoritativeMovementModeServer and - # packet.AuthoritativeMovementModeServerWithRewind, where server the server authoritative types result - # in the client sending PlayerAuthInput packets instead of MovePlayer packets and the rewind mode - # requires sending the tick of movement and several actions. - # - # Specifies if the client or server is authoritative over the movement of the player, - # meaning it controls the movement of it. - ## https://github.com/pmmp/PocketMine-MP/blob/a43b46a93cb127f037c879b5d8c29cda251dd60c/src/pocketmine/network/mcpe/protocol/types/PlayerMovementType.php#L26 - movement_authority: zigzag32 => - 0: client - 1: server - # PlayerAuthInputPacket + a bunch of junk that solves a nonexisting problem - 2: server_with_rewind - # RewindHistorySize is the amount of history to keep at maximum if MovementType is - # packet.AuthoritativeMovementModeServerWithRewind. - rewind_history_size: zigzag32 - # ServerAuthoritativeBlockBreaking specifies if block breaking should be sent through - # packet.PlayerAuthInput or not. This field is somewhat redundant as it is always enabled if - # MovementType is packet.AuthoritativeMovementModeServer or - # packet.AuthoritativeMovementModeServerWithRewind - server_authoritative_block_breaking: bool - - # The total time in ticks that has elapsed since the start of the world. - current_tick: li64 - # The seed used to seed the random used to produce enchantments in the enchantment table. - # Note that the exact correct random implementation must be used to produce the correct - # results both client- and server-side. - enchantment_seed: zigzag32 - - # BlockProperties is a list of all the custom blocks registered on the server. - block_properties: BlockProperties - # A list of all items with their legacy IDs which are available in the game. - # Failing to send any of the items that are in the game will crash mobile clients. - itemstates: Itemstates - # A unique ID specifying the multi-player session of the player. - # A random UUID should be filled out for this field. - multiplayer_correlation_id: string - # ServerAuthoritativeInventory specifies if the server authoritative inventory system is enabled. This - # is a new system introduced in 1.16. Backwards compatibility with the inventory transactions has to - # some extent been preserved, but will eventually be removed. - server_authoritative_inventory: bool - # The server's engine version, used for telemetry - engine: string - -packet_add_player: - !id: 0x0c - !bound: client - # UUID is the UUID of the player. It is the same UUID that the client sent in the - # Login packet at the start of the session. A player with this UUID must exist - # in the player list (built up using the Player List packet) for it to show up in-game. - uuid: uuid - # Username is the name of the player. This username is the username that will be - # set as the initial name tag of the player. - username: string - # The unique ID of the player. The unique ID is a value that remains consistent - # across different sessions of the same world, but most unoffical servers simply - # fill the runtime ID of the player out for this field. - entity_id_self: zigzag64 - # The runtime ID of the player. The runtime ID is unique for each world session, - # and entities are generally identified in packets using this runtime ID. - runtime_entity_id: varint64 - # An identifier only set for particular platforms when chatting (presumably only for - # Nintendo Switch). It is otherwise an empty string, and is used to decide which players - # are able to chat with each other. - platform_chat_id: string - position: vec3f - velocity: vec3f - pitch: lf32 - yaw: lf32 - head_yaw: lf32 - held_item: Item - metadata: MetadataDictionary - flags: varint - command_permission: varint - action_permissions: varint - permission_level: varint - custom_stored_permissions: varint - user_id: li64 - links: Links - device_id: string - device_os: li32 - -packet_add_entity: - !id: 0x0d - !bound: client - entity_id_self: zigzag64 - runtime_entity_id: varint64 - entity_type: string - position: vec3f - velocity: vec3f - pitch: lf32 - yaw: lf32 - head_yaw: lf32 - attributes: EntityAttributes - metadata: MetadataDictionary - links: Links - -packet_remove_entity: - !id: 0x0e - !bound: client - entity_id_self: zigzag64 - -packet_add_item_entity: - !id: 0x0f - !bound: client - entity_id_self: zigzag64 - runtime_entity_id: varint64 - item: Item - position: vec3f - velocity: vec3f - metadata: MetadataDictionary - is_from_fishing: bool - -packet_take_item_entity: - !id: 0x11 - !bound: client - runtime_entity_id: varint64 - target: varint - -# MoveActorAbsolute is sent by the server to move an entity to an absolute position. It is typically used -# for movements where high accuracy isn't needed, such as for long range teleporting. -packet_move_entity: - !id: 0x12 - !bound: both - # EntityRuntimeID is the runtime ID of the entity. The runtime ID is unique for each world session, and - # entities are generally identified in packets using this runtime ID. - runtime_entity_id: varint64 - # Flags is a combination of flags that specify details of the movement. It is a combination of the flags - # above. - flags: u8 - # Position is the position to spawn the entity on. If the entity is on a distance that the player cannot - # see it, the entity will still show up if the player moves closer. - position: vec3f - # Rotation is a Vec3 holding the X, Y and Z rotation of the entity after the movement. This is a Vec3 for - # the reason that projectiles like arrows don't have yaw/pitch, but do have roll. - rotation: Rotation - -# MovePlayer is sent by players to send their movement to the server, and by the server to update the -# movement of player entities to other players. -packet_move_player: - !id: 0x13 - !bound: both - # EntityRuntimeID is the runtime ID of the player. The runtime ID is unique for each world session, and - # entities are generally identified in packets using this runtime ID. - runtime_id: varint - # Position is the position to spawn the player on. If the player is on a distance that the viewer cannot - # see it, the player will still show up if the viewer moves closer. - position: vec3f - # Pitch is the vertical rotation of the player. Facing straight forward yields a pitch of 0. Pitch is - # measured in degrees. - pitch: lf32 - # Yaw is the horizontal rotation of the player. Yaw is also measured in degrees - yaw: lf32 - # HeadYaw is the same as Yaw, except that it applies specifically to the head of the player. A different - # value for HeadYaw than Yaw means that the player will have its head turned - head_yaw: lf32 - # Mode is the mode of the movement. It specifies the way the player's movement should be shown to other - # players. It is one of the constants below. - mode: u8 => - 0: normal - 1: reset - 2: teleport - 3: rotation - # OnGround specifies if the player is considered on the ground. Note that proxies or hacked clients could - # fake this to always be true, so it should not be taken for granted. - on_ground: bool - # RiddenEntityRuntimeID is the runtime ID of the entity that the player might currently be riding. If not - # riding, this should be left 0. - ridden_runtime_id: varint - teleport: mode ? - if teleport: - # TeleportCause is written only if Mode is MoveModeTeleport. It specifies the cause of the teleportation, - # which is one of the constants above. - cause: li32 => - 0: unknown - 1: projectile - 2: chorus_fruit - 3: command - 4: behavior - # TeleportSourceEntityType is the entity type that caused the teleportation, for example an ender pearl. - # TODO: is this still a integer and not a string? - source_entity_type: LegacyEntityType - tick: varint64 - -packet_rider_jump: - !id: 0x14 - !bound: both - jump_strength: zigzag32 - -# UpdateBlock is sent by the server to update a block client-side, without resending the entire chunk that -# the block is located in. It is particularly useful for small modifications like block breaking/placing. -packet_update_block: - !id: 0x15 - !bound: client - # Position is the block position at which a block is updated. - position: BlockCoordinates - # NewBlockRuntimeID is the runtime ID of the block that is placed at Position after sending the packet - # to the client. - block_runtime_id: varint - # Flags is a combination of flags that specify the way the block is updated client-side. It is a - # combination of the flags above, but typically sending only the BlockUpdateNetwork flag is sufficient. - flags: UpdateBlockFlags - # Layer is the world layer on which the block is updated. For most blocks, this is the first layer, as - # that layer is the default layer to place blocks on, but for blocks inside of each other, this differs. - layer: varint - - -UpdateBlockFlags: [ "bitflags", - { - "type": "varint", - "flags": { - "neighbors": 1, - "network": 2, - "no_graphic": 0b100, - "unused": 0b1000, - "priority": 0b10000, - } - } -] - -packet_add_painting: - !id: 0x16 - !bound: client - entity_id_self: zigzag64 - runtime_entity_id: varint64 - coordinates: vec3f - direction: zigzag32 - title: string - -# TickSync is sent by the client and the server to maintain a synchronized, server-authoritative tick between -# the client and the server. The client sends this packet first, and the server should reply with another one -# of these packets, including the response time. -packet_tick_sync: - !id: 0x17 - !bound: both - # ClientRequestTimestamp is the timestamp on which the client sent this packet to the server. The server - # should fill out that same value when replying. - # The ClientRequestTimestamp is always 0 - request_time: li64 - # ServerReceptionTimestamp is the timestamp on which the server received the packet sent by the client. - # When the packet is sent by the client, this value is 0. - # ServerReceptionTimestamp is generally the current tick of the server. It isn't an actual timestamp, as - # the field implies - response_time: li64 - -packet_level_sound_event_old: - !id: 0x18 - !bound: both - sound_id: u8 - position: vec3f - block_id: zigzag32 - entity_type: zigzag32 - is_baby_mob: bool - is_global: bool - -packet_level_event: - !id: 0x19 - !bound: client - event: zigzag32 => - 1000: sound_click - 1001: sound_click_fail - 1002: sound_shoot - 1003: sound_door - 1004: sound_fizz - 1005: sound_ignite - 1007: sound_ghast - 1008: sound_ghast_shoot - 1009: sound_blaze_shoot - 1010: sound_door_bump - 1012: sound_door_crash - 1018: sound_enderman_teleport - 1020: sound_anvil_break - 1021: sound_anvil_use - 1022: sound_anvil_fall - 1030: sound_pop - 1032: sound_portal - 1040: sound_itemframe_add_item - 1041: sound_itemframe_remove - 1042: sound_itemframe_place - 1043: sound_itemframe_remove_item - 1044: sound_itemframe_rotate_item - 1050: sound_camera - 1051: sound_orb - 1052: sound_totem - 1060: sound_armor_stand_break - 1061: sound_armor_stand_hit - 1062: sound_armor_stand_fall - 1063: sound_armor_stand_place - 1064: pointed_dripstone_land - 1065: dye_used - 1066: ink_sack_used - 2000: particle_shoot #TODO: check 2000-2017 - 2001: particle_destroy - 2002: particle_splash - 2003: particle_eye_despawn - 2004: particle_spawn - 2005: particle_crop_growth - 2006: particle_guardian_curse - 2007: particle_death_smoke - 2008: particle_block_force_field - 2009: particle_projectile_hit - 2010: particle_dragon_egg_teleport - 2011: particle_crop_eaten - 2012: particle_critical - 2013: particle_enderman_teleport - 2014: particle_punch_block - 2015: particle_bubble - 2016: particle_evaporate - 2017: particle_destroy_armor_stand - 2018: particle_breaking_egg - 2019: particle_destroy_egg - 2020: particle_evaporate_water - 2021: particle_destroy_block_no_sound - 2022: particle_knockback_roar - 2023: particle_teleport_trail - 2024: particle_point_cloud - 2025: particle_explosion - 2026: particle_block_explosion - 2027: particle_vibration_signal - 2028: particle_dripstone_drip - 2029: particle_fizz_effect - 2030: particle_wax_on - 2031: particle_wax_off - 2032: particle_scrape - 2033: particle_electric_spark - - 3001: start_rain - 3002: start_thunder - 3003: stop_rain - 3004: stop_thunder - 3005: pause_game #data: 1 to pause, 0 to resume - 3006: pause_game_no_screen #data: 1 to pause, 0 to resume - same effect as normal pause but without screen - 3007: set_game_speed #x coordinate of pos = scale factor (default 1.0) - 3500: redstone_trigger - 3501: cauldron_explode - 3502: cauldron_dye_armor - 3503: cauldron_clean_armor - 3504: cauldron_fill_potion - 3505: cauldron_take_potion - 3506: cauldron_fill_water - 3507: cauldron_take_water - 3508: cauldron_add_dye - 3509: cauldron_clean_banner - 3600: block_start_break - 3601: block_stop_break - 4000: set_data - 9800: players_sleeping - 0x4000: add_particle_mask - # 0x4000 | + particle ID - 16385: particle_bubble # 1 - 16386: particle_bubble_manual # 2 - 16387: particle_critical # 3 - 16388: particle_block_force_field # 4 - 16389: particle_smoke # 5 - 16390: particle_explode # 6 - 16391: particle_evaporation # 7 - 16392: particle_flame # 8 - 16393: particle_candle_flame # 9 - 16394: particle_lava # 10 - 16395: particle_large_smoke # 11 - 16396: particle_redstone # 12 - 16397: particle_rising_red_dust # 13 - 16398: particle_item_break # 14 - 16399: particle_snowball_poof # 15 - 16400: particle_huge_explode # 16 - 16401: particle_huge_explode_seed # 17 - 16402: particle_mob_flame # 18 - 16403: particle_heart # 19 - 16404: particle_terrain # 20 - 16405: particle_town_aura # 21 - 16406: particle_portal # 22 - 16408: particle_water_splash # 24 - 16409: particle_water_splash_manual # 25 - 16410: particle_water_wake # 26 - 16411: particle_drip_water # 27 - 16412: particle_drip_lava # 28 - 16413: particle_drip_honey # 29 - 16414: particle_stalactite_drip_water # 30 - 16415: particle_stalactite_drip_lava # 31 - 16416: particle_falling_dust # 32 - 16417: particle_mob_spell # 33 - 16418: particle_mob_spell_ambient # 34 - 16419: particle_mob_spell_instantaneous # 35 - 16420: particle_ink # 36 - 16421: particle_slime # 37 - 16422: particle_rain_splash # 38 - 16423: particle_villager_angry # 39 - 16424: particle_villager_happy # 40 - 16425: particle_enchantment_table # 41 - 16426: particle_tracking_emitter # 42 - 16427: particle_note # 43 - 16428: particle_witch_spell # 44 - 16429: particle_carrot # 45 - 16430: particle_mob_appearance # 46 - 16431: particle_end_rod # 47 - 16432: particle_dragons_breath # 48 - 16433: particle_spit # 49 - 16434: particle_totem # 50 - 16435: particle_food # 51 - 16436: particle_fireworks_starter # 52 - 16437: particle_fireworks_spark # 53 - 16438: particle_fireworks_overlay # 54 - 16439: particle_balloon_gas # 55 - 16440: particle_colored_flame # 56 - 16441: particle_sparkler # 57 - 16442: particle_conduit # 58 - 16443: particle_bubble_column_up # 59 - 16444: particle_bubble_column_down # 60 - 16445: particle_sneeze # 61 - 16446: particle_shulker_bullet # 62 - 16447: particle_bleach # 63 - 16448: particle_dragon_destroy_block # 64 - 16449: particle_mycelium_dust # 65 - 16450: particle_falling_red_dust # 66 - 16451: particle_campfire_smoke # 67 - 16452: particle_tall_campfire_smoke # 68 - 16453: particle_dragon_breath_fire # 69 - 16454: particle_dragon_breath_trail # 70 - 16455: particle_blue_flame # 71 - 16456: particle_soul # 72 - 16457: particle_obsidian_tear # 73 - 16458: particle_portal_reverse # 74 - 16459: particle_snowflake # 75 - 16460: particle_vibration_signal # 76 - 16461: particle_sculk_sensor_redstone # 77 - 16462: particle_spore_blossom_shower # 78 - 16463: particle_spore_blossom_ambient # 79 - 16464: particle_wax # 80 - 16465: particle_electric_spark # 81 - position: vec3f - data: zigzag32 - -packet_block_event: - !id: 0x1a - !bound: client - # Position is the position of the block that an event occurred at. - position: BlockCoordinates - # EventType is the type of the block event. - # The event type decides the way the event data that follows is used - type: zigzag32 => - 0: sound - 1: change_state - # EventData holds event type specific data. For chests for example, - # opening the chest means the data must be 1 - data: zigzag32 - -packet_entity_event: - !id: 0x1b - !bound: both - runtime_entity_id: varint64 - event_id: u8 => - 1: jump - 2: hurt_animation - 3: death_animation - 4: arm_swing - 5: stop_attack - 6: tame_fail - 7: tame_success - 8: shake_wet - 9: use_item - 10: eat_grass_animation - 11: fish_hook_bubble - 12: fish_hook_position - 13: fish_hook_hook - 14: fish_hook_tease - 15: squid_ink_cloud - 16: zombie_villager_cure - 18: respawn - 19: iron_golem_offer_flower - 20: iron_golem_withdraw_flower - 21: love_particles #breeding - 22: villager_angry - 23: villager_happy - 24: witch_spell_particles - 25: firework_particles - 26: in_love_particles - 27: silverfish_spawn_animation - 28: guardian_attack - 29: witch_drink_potion - 30: witch_throw_potion - 31: minecart_tnt_prime_fuse - 32: creeper_prime_fuse - 33: air_supply_expired - 34: player_add_xp_levels - 35: elder_guardian_curse - 36: agent_arm_swing - 37: ender_dragon_death - 38: dust_particles #not sure what this is - 39: arrow_shake - - 57: eating_item - - 60: baby_animal_feed #green particles, like bonemeal on crops - 61: death_smoke_cloud - 62: complete_trade - 63: remove_leash #data 1 = cut leash - - 65: consume_totem - 66: player_check_treasure_hunter_achievement #mojang... - 67: entity_spawn #used for MinecraftEventing stuff, not needed - 68: dragon_puke #they call this puke particles - 69: item_entity_merge - 70: start_swim - 71: balloon_pop - 72: treasure_hunt - 73: agent_summon - 74: charged_crossbow - 75: fall - data: zigzag32 - -packet_mob_effect: - !id: 0x1c - !bound: client - runtime_entity_id: varint64 - event_id: u8 - effect_id: zigzag32 - amplifier: zigzag32 - particles: bool - duration: zigzag32 - -packet_update_attributes: - !id: 0x1d - !bound: client - runtime_entity_id: varint64 - attributes: PlayerAttributes - tick: varint64 - -# InventoryTransaction is a packet sent by the client. It essentially exists out of multiple sub-packets, -# each of which have something to do with the inventory in one way or another. Some of these sub-packets -# directly relate to the inventory, others relate to interaction with the world, that could potentially -# result in a change in the inventory. -packet_inventory_transaction: - !id: 0x1e - !bound: both - transaction: Transaction - -packet_mob_equipment: - !id: 0x1f - !bound: both - runtime_entity_id: varint64 - item: Item - slot: u8 - selected_slot: u8 - window_id: WindowID - -packet_mob_armor_equipment: - !id: 0x20 - !bound: both - runtime_entity_id: varint64 - helmet: Item - chestplate: Item - leggings: Item - boots: Item - -# Interact is sent by the client when it interacts with another entity in some way. It used to be used for -# normal entity and block interaction, but this is no longer the case now. -packet_interact: - !id: 0x21 - !bound: both - # Action type is the ID of the action that was executed by the player. It is one of the constants that - # may be found above. - action_id: u8 => - 3: leave_vehicle - 4: mouse_over_entity - 6: open_inventory - # TargetEntityRuntimeID is the runtime ID of the entity that the player interacted with. This is empty - # for the InteractActionOpenInventory action type. - target_entity_id: varint64 - # Position associated with the ActionType above. For the InteractActionMouseOverEntity, this is the - # position relative to the entity moused over over which the player hovered with its mouse/touch. For the - # InteractActionLeaveVehicle, this is the position that the player spawns at after leaving the vehicle. - position: action_id ? - if mouse_over_entity or leave_vehicle: vec3f - -packet_block_pick_request: - !id: 0x22 - !bound: server - x: zigzag32 - y: zigzag32 - z: zigzag32 - add_user_data: bool - selected_slot: u8 - -packet_entity_pick_request: - !id: 0x23 - !bound: server - runtime_entity_id: lu64 - selected_slot: u8 - -# PlayerAction is sent by the client when it executes any action, for example starting to sprint, swim, -# starting the breaking of a block, dropping an item, etc. -packet_player_action: - !id: 0x24 - !bound: server - # EntityRuntimeID is the runtime ID of the player. The runtime ID is unique for each world session, and - # entities are generally identified in packets using this runtime ID. - runtime_entity_id: varint64 - # ActionType is the ID of the action that was executed by the player. It is one of the constants that may - # be found above. - action: Action - # BlockPosition is the position of the target block, if the action with the ActionType set concerned a - # block. If that is not the case, the block position will be zero. - position: BlockCoordinates - # BlockFace is the face of the target block that was touched. If the action with the ActionType set - # concerned a block. If not, the face is always 0. - face: zigzag32 - -packet_hurt_armor: - !id: 0x26 - !bound: client - health: zigzag32 - -packet_set_entity_data: - !id: 0x27 - !bound: both - runtime_entity_id: varint64 - metadata: MetadataDictionary - tick: varint - -# SetActorMotion is sent by the server to change the client-side velocity of an entity. It is usually used -# in combination with server-side movement calculation. -packet_set_entity_motion: - !id: 0x28 - !bound: both - # EntityRuntimeID is the runtime ID of the entity. The runtime ID is unique for each world session, and - # entities are generally identified in packets using this runtime ID. - runtime_entity_id: varint64 - # Velocity is the new velocity the entity gets. This velocity will initiate the client-side movement of - # the entity. - velocity: vec3f - -# SetActorLink is sent by the server to initiate an entity link client-side, meaning one entity will start -# riding another. -packet_set_entity_link: - !id: 0x29 - !bound: client - link: Link - -packet_set_health: - !id: 0x2a - !bound: client - health: zigzag32 - -packet_set_spawn_position: - !id: 0x2b - !bound: client - spawn_type: zigzag32 => - 0: player - 1: world - player_position: BlockCoordinates - dimension: zigzag32 - world_position: BlockCoordinates - -packet_animate: - !id: 0x2c - !bound: both - action_id: zigzag32 => - 0: none - 1: swing_arm - 2: unknown - 3: wake_up - 4: critical_hit - 5: magic_critical_hit - 6: row_right - 7: row_left - runtime_entity_id: varint64 - -packet_respawn: - !id: 0x2d - !bound: both - position: vec3f - state: u8 - runtime_entity_id: varint64 - -# ContainerOpen is sent by the server to open a container client-side. This container must be physically -# present in the world, for the packet to have any effect. Unlike Java Edition, Bedrock Edition requires that -# chests for example must be present and in range to open its inventory. -packet_container_open: - !id: 0x2e - !bound: client - # WindowID is the ID representing the window that is being opened. It may be used later to close the - # container using a ContainerClose packet. - window_id: WindowID - # ContainerType is the type ID of the container that is being opened when opening the container at the - # position of the packet. It depends on the block/entity, and could, for example, be the window type of - # a chest or a hopper, but also a horse inventory. - window_type: WindowType - # ContainerPosition is the position of the container opened. The position must point to a block entity - # that actually has a container. If that is not the case, the window will not be opened and the packet - # will be ignored, if a valid ContainerEntityUniqueID has not also been provided. - coordinates: BlockCoordinates - # ContainerEntityUniqueID is the unique ID of the entity container that was opened. It is only used if - # the ContainerType is one that points to an entity, for example a horse. - runtime_entity_id: zigzag64 - -# ContainerClose is sent by the server to close a container the player currently has opened, which was opened -# using the ContainerOpen packet, or by the client to tell the server it closed a particular container, such -# as the crafting grid. -packet_container_close: - !id: 0x2f - !bound: both - # WindowID is the ID representing the window of the container that should be closed. It must be equal to - # the one sent in the ContainerOpen packet to close the designated window. - window_id: WindowID - # ServerSide determines whether or not the container was force-closed by the server. If this value is - # not set correctly, the client may ignore the packet and respond with a PacketViolationWarning. - server: bool - -# PlayerHotBar is sent by the server to the client. It used to be used to link hot bar slots of the player to -# actual slots in the inventory, but as of 1.2, this was changed and hot bar slots are no longer a free -# floating part of the inventory. -# Since 1.2, the packet has been re-purposed, but its new functionality is not clear. -packet_player_hotbar: - !id: 0x30 - !bound: both - selected_slot: varint - window_id: WindowID - select_slot: bool - -# InventoryContent is sent by the server to update the full content of a particular inventory. It is usually -# sent for the main inventory of the player, but also works for other inventories that are currently opened -# by the player. -packet_inventory_content: - !id: 0x31 - !bound: both - # WindowID is the ID that identifies one of the windows that the client currently has opened, or one of - # the consistent windows such as the main inventory. - window_id: WindowIDVarint - # Content is the new content of the inventory. The length of this slice must be equal to the full size of - # the inventory window updated. - input: ItemStacks - -# InventorySlot is sent by the server to update a single slot in one of the inventory windows that the client -# currently has opened. Usually this is the main inventory, but it may also be the off hand or, for example, -# a chest inventory. -packet_inventory_slot: - !id: 0x32 - !bound: both - # WindowID is the ID of the window that the packet modifies. It must point to one of the windows that the - # client currently has opened. - window_id: WindowIDVarint - # Slot is the index of the slot that the packet modifies. The new item will be set to the slot at this - # index. - slot: varint - # NewItem is the item to be put in the slot at Slot. It will overwrite any item that may currently - # be present in that slot. - item: Item - -# ContainerSetData is sent by the server to update specific data of a single container, meaning a block such -# as a furnace or a brewing stand. This data is usually used by the client to display certain features -# client-side. -packet_container_set_data: - !id: 0x33 - !bound: client - # WindowID is the ID of the window that should have its data set. The player must have a window open with - # the window ID passed, or nothing will happen. - window_id: WindowID - # Key is the key of the property. It is one of the constants that can be found above. Multiple properties - # share the same key, but the functionality depends on the type of the container that the data is set to. - # IF FURNACE: - # 0: furnace_tick_count - # 1: furnace_lit_time - # 2: furnace_lit_duration - # 3: furnace_stored_xp - # 4: furnace_fuel_aux - # IF BREWING STAND: - # 0: brew_time - # 1: brew_fuel_amount - # 2: brew_fuel_total - property: zigzag32 - # Value is the value of the property. Its use differs per property. - value: zigzag32 - -packet_crafting_data: - !id: 0x34 - !bound: client - recipes: Recipes - potion_type_recipes: PotionTypeRecipes - potion_container_recipes: PotionContainerChangeRecipes - is_clean: bool - -# CraftingEvent is sent by the client when it crafts a particular item. Note that this packet may be fully -# ignored, as the InventoryTransaction packet provides all the information required. -packet_crafting_event: - !id: 0x35 - !bound: both - # WindowID is the ID representing the window that the player crafted in. - window_id: WindowID - # CraftingType is a type that indicates the way the crafting was done, for example if a crafting table - # was used. - recipe_type: zigzag32 => - 0: inventory - 1: crafting - 2: workbench - # RecipeUUID is the UUID of the recipe that was crafted. It points to the UUID of the recipe that was - # sent earlier in the CraftingData packet. - recipe_id: uuid - # Input is a list of items that the player put into the recipe so that it could create the Output items. - # These items are consumed in the process. - input: Item[]varint - # Output is a list of items that were obtained as a result of crafting the recipe. - result: Item[]varint - -# GUIDataPickItem is sent by the server to make the client 'select' a hot bar slot. It currently appears to -# be broken however, and does not actually set the selected slot to the hot bar slot set in the packet. -packet_gui_data_pick_item: - !id: 0x36 - !bound: client - # ItemName is the name of the item that shows up in the top part of the popup that shows up when - # selecting an item. It is shown as if an item was selected by the player itself. - item_name: string - # ItemEffects is the line under the ItemName, where the effects of the item are usually situated. - item_effects: string - # HotBarSlot is the hot bar slot to be selected/picked. This does not currently work, so it does not - # matter what number this is. - hotbar_slot: li32 - -# AdventureSettings is sent by the server to update game-play related features, in particular permissions to -# access these features for the client. It includes allowing the player to fly, build and mine, and attack -# entities. Most of these flags should be checked server-side instead of using this packet only. -# The client may also send this packet to the server when it updates one of these settings through the -# in-game settings interface. The server should verify if the player actually has permission to update those -# settings. -packet_adventure_settings: - !id: 0x37 - !bound: both - # Flags is a set of flags that specify certain properties of the player, such as whether or not it can - # fly and/or move through blocks. It is one of the AdventureFlag constants above. - flags: AdventureFlags - # CommandPermissionLevel is a permission level that specifies the kind of commands that the player is - # allowed to use. - command_permission: varint => - 0: normal - 1: operator - 2: host - 3: automation - 4: admin - # ActionPermissions is, much like Flags, a set of flags that specify actions that the player is allowed - # to undertake, such as whether it is allowed to edit blocks, open doors etc. It is a combination of the - # ActionPermission constants above. - action_permissions: ActionPermissions - # PermissionLevel is the permission level of the player as it shows up in the player list built up using - # the PlayerList packet. It is one of the PermissionLevel constants above. - permission_level: varint => - 0: visitor - 1: member - 2: operator - 3: custom - # Custom permissions - custom_stored_permissions: varint - # PlayerUniqueID is a unique identifier of the player. It appears it is not required to fill this field - # out with a correct value. Simply writing 0 seems to work. - user_id: li64 - -AdventureFlags: [ "bitflags", - { - "type": "varint", - "flags": { - "world_immutable": 1, - "no_pvp": 2, - "auto_jump": 0x20, - "allow_flight": 0x40, - "no_clip": 0x80, - "world_builder": 0x100, - "flying": 0x200, - "muted": 0x400 - } - } -] - -ActionPermissions: [ "bitflags", - { - "type": "varint", - "flags": { - "mine": 0x10001, - "doors_and_switches": 0x10002, - "open_containers": 0x10004, - "attack_players": 0x10008, - "attack_mobs": 0x10010, - "operator": 0x10020, - "teleport": 0x10080, - "build": 0x10100, - "default": 0x10200 - } - } -] - -packet_block_entity_data: - !id: 0x38 - !bound: both - position: BlockCoordinates - nbt: nbt - -packet_player_input: - !id: 0x39 - !bound: server - motion_x: lf32 - motion_z: lf32 - jumping: bool - sneaking: bool - -# LevelChunk is sent by the server to provide the client with a chunk of a world data (16xYx16 blocks). -# Typically a certain amount of chunks is sent to the client before sending it the spawn PlayStatus packet, -# so that the client spawns in a loaded world. -packet_level_chunk: - !id: 0x3a - !bound: client - # ChunkX is the X coordinate of the chunk sent. (To translate a block's X to a chunk's X: x >> 4) - x: zigzag32 - # ChunkZ is the Z coordinate of the chunk sent. (To translate a block's Z to a chunk's Z: z >> 4) - z: zigzag32 - # SubChunkCount is the amount of sub chunks that are part of the chunk sent. Depending on if the cache - # is enabled, a list of blob hashes will be sent, or, if disabled, the sub chunk data. - sub_chunk_count: varint - # CacheEnabled specifies if the client blob cache should be enabled. This system is based on hashes of - # blobs which are consistent and saved by the client in combination with that blob, so that the server - # does not have to send the same chunk multiple times. If the client does not yet have a blob with the hash sent, - # it will send a ClientCacheBlobStatus packet containing the hashes is does not have the data of. - cache_enabled: bool - blobs: cache_enabled? - if true: - # BlobHashes is a list of all blob hashes used in the chunk. It is composed of SubChunkCount + 1 hashes, - # with the first SubChunkCount hashes being those of the sub chunks and the last one that of the biome - # of the chunk. - # If CacheEnabled is set to false, BlobHashes can be left empty. - hashes: lu64[]varint - # RawPayload is a serialised string of chunk data. The data held depends on if CacheEnabled is set to - # true. If set to false, the payload is composed of multiple sub-chunks, each of which carry a version - # which indicates the way they are serialised, followed by biomes, border blocks and tile entities. If - # CacheEnabled is true, the payload consists out of the border blocks and tile entities only. - payload: ByteArray - -packet_set_commands_enabled: - !id: 0x3b - !bound: client - enabled: bool - -packet_set_difficulty: - !id: 0x3c - !bound: client - difficulty: varint - -packet_change_dimension: - !id: 0x3d - !bound: client - dimension: zigzag32 - position: vec3f - respawn: bool - -# SetPlayerGameType is sent by the server to update the game type (game mode) of the player -packet_set_player_game_type: - !id: 0x3e - !bound: both - # The new gamemode for the player. - # Some of these game types require additional flags to be set in an AdventureSettings packet for - # the game mode to obtain its full functionality. - gamemode: GameMode - -packet_player_list: - !id: 0x3f - !bound: client - records: PlayerRecords - -packet_simple_event: - !id: 0x40 - !bound: client - event_type: lu16 - -# Event is sent by the server to send an event with additional data. It is typically sent to the client for -# telemetry reasons, much like the SimpleEvent packet. -packet_event: - !id: 0x41 - !bound: client - runtime_id: varint64 - event_type: zigzag32 => - 0: achievement_awarded - 1: entity_interact - 2: portal_built - 3: portal_used - 4: mob_killed - 5: cauldron_used - 6: player_death - 7: boss_killed - 8: agent_command - 9: agent_created - 10: banner_pattern_removed - 11: commaned_executed - 12: fish_bucketed - 13: mob_born - 14: pet_died - 15: cauldron_block_used - 16: composter_block_used - 17: bell_block_used - 18: actor_definition - 19: raid_update - 20: player_movement_anomaly - 21: player_moement_corrected - 22: honey_harvested - 23: target_block_hit - 24: piglin_barter - 25: waxed_or_unwaxed_copper - use_player_id: u8 - event_data: restBuffer # Unknown data, TODO: add - -packet_spawn_experience_orb: - !id: 0x42 - !bound: client - position: vec3f - count: zigzag32 - -UpdateMapFlags: [ "bitflags", { - "type": "varint", - "flags": [ - "void", - "texture", - "decoration", - "initialisation" - ] -}] - -# ClientBoundMapItemData is sent by the server to the client to update the data of a map shown to the client. -# It is sent with a combination of flags that specify what data is updated. -# The ClientBoundMapItemData packet may be used to update specific parts of the map only. It is not required -# to send the entire map each time when updating one part. -packet_clientbound_map_item_data: - !id: 0x43 - !bound: client - # MapID is the unique identifier that represents the map that is updated over network. It remains - # consistent across sessions. - map_id: zigzag64 - # UpdateFlags is a combination of flags found above that indicate what parts of the map should be updated - # client-side. - update_flags: UpdateMapFlags - # Dimension is the dimension of the map that should be updated, for example the overworld (0), the nether - # (1) or the end (2). - dimension: u8 - # LockedMap specifies if the map that was updated was a locked map, which may be done using a cartography - # table. - locked: bool - # The following fields apply only for the MapUpdateFlagInitialisation. - # MapsIncludedIn holds an array of map IDs that the map updated is included in. This has to do with the - # scale of the map: Each map holds its own map ID and all map IDs of maps that include this map and have - # a bigger scale. This means that a scale 0 map will have 5 map IDs in this slice, whereas a scale 4 map - # will have only 1 (its own). - # The actual use of this field remains unknown. - included_in: update_flags.initialisation ? - if true: zigzag64[]varint - # Scale is the scale of the map as it is shown in-game. It is written when any of the MapUpdateFlags are - # set to the UpdateFlags field. - scale: update_flags.initialisation || update_flags.decoration || update_flags.texture ? - if true: u8 - # The following fields apply only for the MapUpdateFlagDecoration. - # TrackedObjects is a list of tracked objects on the map, which may either be entities or blocks. The - # client makes sure these tracked objects are actually tracked. (position updated etc.) - tracked: update_flags.decoration ? - if true: - objects: TrackedObject[]varint - decorations: MapDecoration[]varint - # Updates to the map contents itself (texture) - texture: update_flags.texture ? - if true: - # Width is the width of the texture area that was updated. The width may be a subset of the total width - # of the map. - width: zigzag32 - # Height is the height of the texture area that was updated. The height may be a subset of the total - # height of the map - height: zigzag32 - # XOffset is the X offset in pixels at which the updated texture area starts. From this X, the updated - # texture will extend exactly Width pixels to the right. - x_offset: zigzag32 - # YOffset is the Y offset in pixels at which the updated texture area starts. From this Y, the updated - # texture will extend exactly Height pixels up. - y_offset: zigzag32 - # Pixels is a list of pixel colours for the new texture of the map. It is indexed as Pixels[y][x], with - # the length of the outer slice having to be exactly Height long and the inner slices exactly Width long. - # To access this array, use $width * y + x - pixels: varint[]varint - - -packet_map_info_request: - !id: 0x44 - !bound: both - map_id: zigzag64 - -# RequestChunkRadius is sent by the client to the server to update the server on the chunk view radius that -# it has set in the settings. The server may respond with a ChunkRadiusUpdated packet with either the chunk -# radius requested, or a different chunk radius if the server chooses so. -packet_request_chunk_radius: - !id: 0x45 - !bound: both - # ChunkRadius is the requested chunk radius. This value is always the value set in the settings of the - # player. - chunk_radius: zigzag32 - -# ChunkRadiusUpdated is sent by the server in response to a RequestChunkRadius packet. It defines the chunk -# radius that the server allows the client to have. This may be lower than the chunk radius requested by the -# client in the RequestChunkRadius packet. -packet_chunk_radius_update: - !id: 0x46 - !bound: client - # ChunkRadius is the final chunk radius that the client will adapt when it receives the packet. It does - # not have to be the same as the requested chunk radius. - chunk_radius: zigzag32 - -packet_item_frame_drop_item: - !id: 0x47 - !bound: both - coordinates: BlockCoordinates - -packet_game_rules_changed: - !id: 0x48 - !bound: client - rules: GameRules - -# Camera is sent by the server to use an Education Edition camera on a player. It produces an image -# client-side. -packet_camera: - !id: 0x49 - !bound: client - # CameraEntityUniqueID is the unique ID of the camera entity from which the picture was taken. - camera_entity_unique_id: zigzag64 - # TargetPlayerUniqueID is the unique ID of the target player. The unique ID is a value that remains - # consistent across different sessions of the same world, but most servers simply fill the runtime ID of - # the player out for this field. - target_player_unique_id: zigzag64 - -packet_boss_event: - !id: 0x4a - !bound: both - boss_entity_id: zigzag64 - type: varint => - # S2C: Shows the boss-bar to the player. - 0: show_bar - # C2S: Registers a player to a boss fight. - 1: register_player - # S2C: Removes the boss-bar from the client. - 2: hide_bar - # C2S: Unregisters a player from a boss fight. - 3: unregister_player - # S2C: Sets the bar percentage. - 4: set_bar_progress - # S2C: Sets title of the bar. - 5: set_bar_title - # S2C: darkens the sky - 6: update_properties - # S2C: Not implemented :( Intended to alter bar appearance, but these currently produce no effect on client-side whatsoever. - 7: texture - _: type? - if show_bar: - # BossBarTitle is the title shown above the boss bar. It currently does not function, and instead uses - # the name tag of the boss entity at all times. It is only set if the EventType is BossEventShow or - # BossEventTitle. - title: string - # HealthPercentage is the percentage of health that is shown in the boss bar. It currently does not - # function, and instead uses the health percentage of the boss entity at all times. It is only set if the - # EventType is BossEventShow or BossEventHealthPercentage. - progress: lf32 - # ScreenDarkening currently seems not to do anything. - screen_darkening: li16 - # Colour is the colour of the boss bar that is shown when a player is subscribed. It currently does not - # function. It is only set if the EventType is BossEventShow, BossEventAppearanceProperties or - # BossEventTexture. - # Format is ARGB - color: varint - # Overlay is the overlay of the boss bar that is shown on top of the boss bar when a player is - # subscribed. It currently does not function. It is only set if the EventType is BossEventShow, - # BossEventAppearanceProperties or BossEventTexture. - overlay: varint - if register_player or unregister_player: - # PlayerUniqueID is the unique ID of the player that is registered to or unregistered from the boss - # fight. It is set if EventType is either BossEventRegisterPlayer or BossEventUnregisterPlayer. - player_id: zigzag64 - if set_bar_progress: - progress: lf32 - if set_bar_title: - title: string - if update_properties: - screen_darkening: li16 - color: varint - overlay: varint - if texture: - color: varint - overlay: varint - -packet_show_credits: - !id: 0x4b - !bound: client - runtime_entity_id: varint64 - status: zigzag32 - -# This packet sends a list of commands to the client. Commands can have -# arguments, and some of those arguments can have 'enum' values, which are a list of possible -# values for the argument. The serialization is rather complex and involves palettes like chunks. -## In bedrock-protocol, listen to on('client.commands') for a simpler representation -packet_available_commands: - !id: 0x4c - !bound: client - # The length of the enums for all the command paramaters in this packet - values_len: varint - # Not read from stream: instead calculated from the `values_len` field - # - # If the values_len < 0xff => byte, - # If the values_len < 0xffff => short, - # If the values_len < 0xffffff => int - _enum_type: '["enum_size_based_on_values_len"]' - # Here all the enum values for all of the possible commands are stored to one array palette - enum_values: string[]$values_len - # Integer paramaters may sometimes have a prefix, such as the XP command: - # /xp [player: target] <- here, the xp command gives experience points - # /xp L [player: target] <- here, the xp command gives experience levels - # This is the palette of suffixes - suffixes: string[]varint - # The list of enum objects - enums: []varint - # The name of the enum - name: string - # The values in the enum - values: []varint - # The indexes to value in the palette - _: ../_enum_type? - if byte: u8 - if short: lu16 - if int: lu32 - command_data: []varint - name: string - description: string - flags: lu16 - permission_level: u8 - alias: li32 - # The list of overload paramaters for this command - overloads: []varint - # Each of the paramaters gets an array of posible overloads - _: []varint - # The name of the paramater shown to the user (the `amount` in `/xp `) - paramater_name: string - value_type: lu16 => - 1: int - 2: float - 3: value - 4: wildcard_int - 5: operator - 6: target - 16: file_path - 32: string - 40: position - 44: message - 46: raw_text - 50: json - 63: command - # In MC, this + prior field are combined to one 32bit bitfield - enum_type: lu16 => - 0x10: valid - 0x20: enum - 0x100: suffixed - 0x400: soft_enum - # Is this paramater required? - optional: bool - # Additinal options for this command (thanks macroshaft...) - options: CommandFlags - # There are two types of enums: static enums which cannot be changed after sending AvaliableCommands, - # (unless you resend the whole packet) and 'soft' or 'dynamic' enums like below which is an array - # that can be updated with the UpdateSoftEnum packet - dynamic_enums: []varint - name: string - values: string[]varint - enum_constraints: []varint - value_index: li32 - enum_index: li32 - constraints: []varint - constraint: u8 => - 0: cheats_enabled - 1: operator_permissions - 2: host_permissions - -# ParamOptionCollapseEnum specifies if the enum (only if the Type is actually an enum type. If not, -# setting this to true has no effect) should be collapsed. This means that the options of the enum are -# never shown in the actual usage of the command, but only as auto-completion, like it automatically does -# with enums that have a big amount of options. To illustrate, it can make -# <$Name: bool>. -CommandFlags: [ "bitfield", [ - { "name": "unused", "size": 6, "signed": false }, # 6 unused upper bits - { "name": "has_semantic_constraint", "size": 1, "signed": false }, - { "name": "collapse_enum", "size": 1, "signed": false } -]] - -# enum_size_based_on_values_len: native - -# CommandRequest is sent by the client to request the execution of a server-side command. Although some -# servers support sending commands using the Text packet, this packet is guaranteed to have the correct -# result. -packet_command_request: - !id: 0x4d - !bound: server - # CommandLine is the raw entered command line. The client does no parsing of the command line by itself - # (unlike it did in the early stages), but lets the server do that. - command: string - # Origin holds information about the command sender that will be returnd back in the command response - origin: CommandOrigin - # Internal specifies if the command request internal. Setting it to false seems to work and the usage of - # this field is not known. - interval: bool - - -# CommandBlockUpdate is sent by the client to update a command block at a specific position. The command -# block may be either a physical block or an entity. -packet_command_block_update: - !id: 0x4e - !bound: server - # Block specifies if the command block updated was an actual physical block. If false, the command block - # is in a minecart and has an entity runtime ID instead. - is_block: bool - # Position is the position of the command block updated. It is only set if Block is set to true. Nothing - # happens if no command block is set at this position. - _: is_block ? - if true: - # Position is the position of the command block updated. It is only set if Block is set to true. Nothing - # happens if no command block is set at this position. - position: BlockCoordinates - # Mode is the mode of the command block. It is either CommandBlockImpulse, CommandBlockChain or - # CommandBlockRepeat. It is only set if Block is set to true. - mode: varint => - 0: impulse - 1: repeat - 2: chain - # NeedsRedstone specifies if the command block needs to be powered by redstone to be activated. If false, - # the command block is always active. The field is only set if Block is set to true. - needs_redstone: bool - # Conditional specifies the behaviour of the command block if the command block before it (the opposite - # side of the direction the arrow if facing) fails to execute. If set to false, it will activate at all - # times, whereas if set to true, it will activate only if the previous command block executed - # successfully. The field is only set if Block is set to true. - conditional: bool - default: - minecart_entity_runtime_id: varint64 - # Command is the command currently entered in the command block. This is the command that is executed - # when the command block is activated. - command: string - # LastOutput is the output of the last command executed by the command block. It may be left empty to - # show simply no output at all, in combination with setting ShouldTrackOutput to false. - last_output: string - # Name is the name of the command block updated. If not empty, it will show this name hovering above the - # command block when hovering over the block with the cursor. - name: string - # ShouldTrackOutput specifies if the command block tracks output. If set to false, the output box won't - # be shown within the command block. - should_track_output: bool - # TickDelay is the delay in ticks between executions of a command block, if it is a repeating command - # block. - tick_delay: li32 - # ExecuteOnFirstTick specifies if the command block should execute on the first tick, AKA as soon as the - # command block is enabled. - execute_on_first_tick: bool - -packet_command_output: - !id: 0x4f - !bound: client - # CommandOrigin is the data specifying the origin of the command. In other words, the source that the - # command request was from, such as the player itself or a websocket server. The client forwards the - # messages in this packet to the right origin, depending on what is sent here. - origin: CommandOrigin - # OutputType specifies the type of output that is sent. - output_type: i8 => - 1: last - 2: silent - 3: all - 4: data_set - # SuccessCount is the amount of times that a command was executed successfully as a result of the command - # that was requested. For servers, this is usually a rather meaningless fields, but for vanilla, this is - # applicable for commands created with Functions. - success_count: varint - # OutputMessages is a list of all output messages that should be sent to the player. Whether they are - # shown or not, depends on the type of the messages. - output: []varint - # Success indicates if the output message was one of a successful command execution. If set to true, the - # output message is by default coloured white, whereas if set to false, the message is by default - # coloured red. - success: bool - # Message is the message that is sent to the client in the chat window. It may either be simply a - # message or a translated built-in string like 'commands.tp.success.coordinates', combined with specific - # parameters below. - message_id: string - # Parameters is a list of parameters that serve to supply the message sent with additional information, - # such as the position that a player was teleported to or the effect that was applied to an entity. - # These parameters only apply for the Minecraft built-in command output. - paramaters: string[]varint - data_set: output_type ? - if data_set: string - default: void - - -# UpdateTrade is sent by the server to update the trades offered by a villager to a player. It is sent at the -# moment that a player interacts with a villager. -packet_update_trade: - !id: 0x50 - !bound: client - # WindowID is the ID that identifies the trading window that the client currently has opened. - window_id: WindowID - # WindowType is an identifier specifying the type of the window opened. In vanilla, it appears this is - # always filled out with 15. - window_type: WindowType - # Size is the amount of trading options that the villager has. - size: varint - # TradeTier is the tier of the villager that the player is trading with. The tier starts at 0 with a - # first two offers being available, after which two additional offers are unlocked each time the tier - # becomes one higher. - trade_tier: varint - # VillagerUniqueID is the unique ID of the villager entity that the player is trading with. The - # TradeTier sent above applies to this villager. - villager_unique_id: varint64 - # EntityUniqueID is the unique ID of the entity (usually a player) for which the trades are updated. The - # updated trades may apply only to this entity. - entity_unique_id: varint64 - # DisplayName is the name displayed at the top of the trading UI. It is usually used to represent the - # profession of the villager in the UI. - display_name: string - # NewTradeUI specifies if the villager should be using the new trade UI (The one added in 1.11.) rather - # than the old one. This should usually be set to true. - new_trading_ui: bool - # Trading based on Minecraft economy - specifies if the prices of the villager's offers are modified by an increase in - # demand for the item. (A mechanic added in 1.11.) Buying more of the same item will increase the price - # of that particular item. - # https://minecraft.gamepedia.com/Trading#Economics - economic_trades: bool - # NBT serialised compound of offers that the villager has. - offers: nbt - -# UpdateEquip is sent by the server to the client upon opening a horse inventory. It is used to set the -# content of the inventory and specify additional properties, such as the items that are allowed to be put -# in slots of the inventory. -packet_update_equipment: - !id: 0x51 - !bound: client - # WindowID is the identifier associated with the window that the UpdateEquip packet concerns. It is the - # ID sent for the horse inventory that was opened before this packet was sent. - window_id: WindowID - # WindowType is the type of the window that was opened. Generally, this is the type of a horse inventory, - # as the packet is specifically made for that. - window_type: WindowType - # Size is the size of the horse inventory that should be opened. A bigger size does, in fact, change the - # amount of slots displayed. - size: u8 - # EntityUniqueID is the unique ID of the entity whose equipment was 'updated' to the player. It is - # typically the horse entity that had its inventory opened. - entity_id: zigzag64 - # `inventory` is a network NBT serialised compound holding the content of the inventory of - # the entity (the equipment) and additional data such as the allowed items for a particular slot, used to - # make sure only saddles can be put in the saddle slot etc. - inventory: nbt - - -# ResourcePackDataInfo is sent by the server to the client to inform the client about the data contained in -# one of the resource packs that are about to be sent. -packet_resource_pack_data_info: - !id: 0x52 - !bound: client - # UUID is the unique ID of the resource pack that the info concerns. - pack_id: string - # DataChunkSize is the maximum size in bytes of the chunks in which the total size of the resource pack - # to be sent will be divided. A size of 1MB (1024*1024) means that a resource pack of 15.5MB will be - # split into 16 data chunks. - max_chunk_size: lu32 - # ChunkCount is the total amount of data chunks that the sent resource pack will exist out of. It is the - # total size of the resource pack divided by the DataChunkSize field. - # The client doesn't actually seem to use this field. Rather, it divides the size by the chunk size to - # calculate it itself. - chunk_count: lu32 - # Size is the total size in bytes that the resource pack occupies. This is the size of the compressed - # archive (zip) of the resource pack. - size: lu64 - # Hash is a SHA256 hash of the content of the resource pack. - hash: ByteArray - # Premium specifies if the resource pack was a premium resource pack, meaning it was bought from the - # Minecraft store. - is_premium: bool - # PackType is the type of the resource pack. It is one of the resource pack types listed. - pack_type: u8 => - 1: addon - 2: cached - 3: copy_protected - 4: behavior - 5: persona_piece - 6: resources - 7: skins - 8: world_template - -# ResourcePackChunkData is sent to the client so that the client can download the resource pack. Each packet -# holds a chunk of the compressed resource pack, of which the size is defined in the ResourcePackDataInfo -# packet sent before. -packet_resource_pack_chunk_data: - !id: 0x53 - !bound: client - # UUID is the unique ID of the resource pack that the chunk of data is taken out of. - pack_id: string - # ChunkIndex is the current chunk index of the chunk. It is a number that starts at 0 and is incremented - # for each resource pack data chunk sent to the client. - chunk_index: lu32 - # DataOffset is the current progress in bytes or offset in the data that the resource pack data chunk is - # taken from. - progress: lu64 - # RawPayload is a byte slice containing a chunk of data from the resource pack. It must be of the same size or - # less than the DataChunkSize set in the ResourcePackDataInfo packet. - payload: ByteArray - -# ResourcePackChunkRequest is sent by the client to request a chunk of data from a particular resource pack, -# that it has obtained information about in a ResourcePackDataInfo packet. -packet_resource_pack_chunk_request: - !id: 0x54 - !bound: server - # UUID is the unique ID of the resource pack that the chunk of data is requested from. - pack_id: string - # ChunkIndex is the requested chunk index of the chunk. It is a number that starts at 0 and is - # incremented for each resource pack data chunk requested. - chunk_index: lu32 - -packet_transfer: - !id: 0x55 - !bound: client - server_address: string - port: lu16 - -packet_play_sound: - !id: 0x56 - !bound: client - name: string - coordinates: BlockCoordinates - volume: lf32 - pitch: lf32 - -packet_stop_sound: - !id: 0x57 - !bound: client - name: string - stop_all: bool - -# SetTitle is sent by the server to make a title, subtitle or action bar shown to a player. It has several -# fields that allow setting the duration of the titles. -packet_set_title: - !id: 0x58 - !bound: client - # ActionType is the type of the action that should be executed upon the title of a player. It is one of - # the constants above and specifies the response of the client to the packet. - type: zigzag32 => - 0: clear - 1: reset - 2: set_title - 3: set_subtitle - 4: action_bar_message - 5: set_durations - 6: set_title_json - 7: set_subtitle_json - 8: action_bar_message_json - # Text is the text of the title, which has a different meaning depending on the ActionType that the - # packet has. The text is the text of a title, subtitle or action bar, depending on the type set. - text: string - # FadeInDuration is the duration that the title takes to fade in on the screen of the player. It is - # measured in 20ths of a second (AKA in ticks). - fade_in_time: zigzag32 - # RemainDuration is the duration that the title remains on the screen of the player. It is measured in - # 20ths of a second (AKA in ticks). - stay_time: zigzag32 - # FadeOutDuration is the duration that the title takes to fade out of the screen of the player. It is - # measured in 20ths of a second (AKA in ticks). - fade_out_time: zigzag32 - # XUID is the XBOX Live user ID of the player, which will remain consistent as long as the player is - # logged in with the XBOX Live account. It is empty if the user is not logged into its XBL account. - xuid: string - # PlatformOnlineID is either a uint64 or an empty string. - platform_online_id: string - -packet_add_behavior_tree: - !id: 0x59 - !bound: client - behaviortree: string - -# StructureBlockUpdate is sent by the client when it updates a structure block using the in-game UI. The -# data it contains depends on the type of structure block that it is. In Minecraft Bedrock Edition v1.11, -# there is only the Export structure block type, but in v1.13 the ones present in Java Edition will, -# according to the wiki, be added too. -packet_structure_block_update: - !id: 0x5a - !bound: client - # Position is the position of the structure block that is updated. - position: BlockCoordinates - # StructureName is the name of the structure that was set in the structure block's UI. This is the name - # used to export the structure to a file. - structure_name: string - # DataField is the name of a function to run, usually used during natural generation. A description can - # be found here: https://minecraft.gamepedia.com/Structure_Block#Data. - data_field: string - # IncludePlayers specifies if the 'Include Players' toggle has been enabled, meaning players are also - # exported by the structure block. - include_players: bool - # ShowBoundingBox specifies if the structure block should have its bounds outlined. A thin line will - # encapsulate the bounds of the structure if set to true. - show_bounding_box: bool - # StructureBlockType is the type of the structure block updated. A list of structure block types that - # will be used can be found in the constants above. - structure_block_type: zigzag32 - # Settings is a struct of settings that should be used for exporting the structure. These settings are - # identical to the last sent in the StructureBlockUpdate packet by the client. - settings: StructureBlockSettings - # RedstoneSaveMode is the mode that should be used to save the structure when used with redstone. In - # Java Edition, this is always stored in memory, but in Bedrock Edition it can be stored either to disk - # or memory. See the constants above for the options. - redstone_save_mode: zigzag32 - # ShouldTrigger specifies if the structure block should be triggered immediately after this packet - # reaches the server. - should_trigger: bool - -# ShowStoreOffer is sent by the server to show a Marketplace store offer to a player. It opens a window -# client-side that displays the item. -# The ShowStoreOffer packet only works on the partnered servers: Servers that are not partnered will not have -# a store buttons show up in the in-game pause menu and will, as a result, not be able to open store offers -# on the client side. Sending the packet does therefore not work when using a proxy that is not connected to -# with the domain of one of the partnered servers. -packet_show_store_offer: - !id: 0x5b - !bound: client - # OfferID is a string that identifies the offer for which a window should be opened. While typically a - # UUID, the ID could be anything. - offer_id: string - # ShowAll specifies if all other offers of the same 'author' as the one of the offer associated with the - # OfferID should also be displayed, alongside the target offer. - show_all: bool - - -# PurchaseReceipt is sent by the client to the server to notify the server it purchased an item from the -# Marketplace store that was offered by the server. The packet is only used for partnered servers. -packet_purchase_receipt: - !id: 0x5c - !bound: server - # Receipts is a list of receipts, or proofs of purchases, for the offers that have been purchased by the - # player. - receipts: string[]varint - -packet_player_skin: - !id: 0x5d - !bound: both - uuid: uuid - skin: Skin - skin_name: string - old_skin_name: string - is_verified: bool - -# SubClientLogin is sent when a sub-client joins the server while another client is already connected to it. -# The packet is sent as a result of split-screen game play, and allows up to four players to play using the -# same network connection. After an initial Login packet from the 'main' client, each sub-client that -# connects sends a SubClientLogin to request their own login. -packet_sub_client_login: - !id: 0x5e - !bound: client - # ConnectionRequest is a string containing information about the player and JWTs that may be used to - # verify if the player is connected to XBOX Live. The connection request also contains the necessary - # client public key to initiate encryption. - # The ConnectionRequest in this packet is identical to the one found in the Login packet. - tokens: '["encapsulated", { "lengthType": "varint", "type": "LoginTokens" }]' - -# AutomationClientConnect is used to make the client connect to a websocket server. This websocket server has -# the ability to execute commands on the behalf of the client and it can listen for certain events fired by -# the client. -packet_initiate_web_socket_connection: - !id: 0x5f - !bound: client - # ServerURI is the URI to make the client connect to. It can be, for example, 'localhost:8000/ws' to - # connect to a websocket server on the localhost at port 8000. - server: string - - -# SetLastHurtBy is sent by the server to let the client know what entity type it was last hurt by. At this -# moment, the packet is useless and should not be used. There is no behaviour that depends on if this -# packet is sent or not. -packet_set_last_hurt_by: - !id: 0x60 - !bound: client - entity_type: varint - -# BookEdit is sent by the client when it edits a book. It is sent each time a modification was made and the -# player stops its typing 'session', rather than simply after closing the book. -packet_book_edit: - !id: 0x61 - !bound: client - type: u8 => - 0: replace_page - 1: add_page - 2: delete_page - 3: swap_pages - 4: sign - slot: u8 - _: type? - if replace_page or add_page: - page_number: u8 - text: string - # Only available on Education Edition. - photo_name: string - if delete_page: - page_number: u8 - if swap_pages: - page1: u8 - page2: u8 - if sign: - title: string - author: string - xuid: string - - -# NPCRequest is sent by the client when it interacts with an NPC. -# The packet is specifically made for Education Edition, where NPCs are available to use. -packet_npc_request: - !id: 0x62 - !bound: both - # EntityRuntimeID is the runtime ID of the NPC entity that the player interacted with. It is the same - # as sent by the server when spawning the entity. - runtime_entity_id: varint64 - # RequestType is the type of the request, which depends on the permission that the player has. It will - # be either a type that indicates that the NPC should show its dialog, or that it should open the - # editing window. - request_type: u8 => - 0: set_actions - 1: execute_action - 2: execute_closing_commands - 3: set_name - 4: set_skin - 5: set_interaction_text - # CommandString is the command string set in the NPC. It may consist of multiple commands, depending on - # what the player set in it. - command: string - # ActionType is the type of the action to execute. - action_type: u8 => - 0: set_actions - 1: execute_action - 2: execute_closing_commands - 3: set_name - 4: set_skin - 5: set_interact_text - 6: execute_openining_commands - # SceneName is the name of the scene. - scene_name: string - -# PhotoTransfer is sent by the server to transfer a photo (image) file to the client. It is typically used -# to transfer photos so that the client can display it in a portfolio in Education Edition. -# While previously usable in the default Bedrock Edition, the displaying of photos in books was disabled and -# the packet now has little use anymore. -packet_photo_transfer: - !id: 0x63 - !bound: server - # PhotoName is the name of the photo to transfer. It is the exact file name that the client will download - # the photo as, including the extension of the file. - image_name: string - # PhotoData is the raw data of the photo image. The format of this data may vary: Formats such as JPEG or - # PNG work, as long as PhotoName has the correct extension. - image_data: string - # BookID is the ID of the book that the photo is associated with. If the PhotoName in a book with this ID - # is set to PhotoName, it will display the photo (provided Education Edition is used). - # The photo image is downloaded to a sub-folder with this book ID. - book_id: string - -# ModalFormRequest is sent by the server to make the client open a form. This form may be either a modal form -# which has two options, a menu form for a selection of options and a custom form for properties. -packet_modal_form_request: - !id: 0x64 - !bound: client - # FormID is an ID used to identify the form. The ID is saved by the client and sent back when the player - # submits the form, so that the server can identify which form was submitted. - form_id: varint - # FormData is a JSON encoded object of form data. The content of the object differs, depending on the - # type of the form sent, which is also set in the JSON. - data: string - -# ModalFormResponse is sent by the client in response to a ModalFormRequest, after the player has submitted -# the form sent. It contains the options/properties selected by the player, or a JSON encoded 'null' if -# the form was closed by clicking the X at the top right corner of the form. -packet_modal_form_response: - !id: 0x65 - !bound: server - # FormID is the form ID of the form the client has responded to. It is the same as the ID sent in the - # ModalFormRequest, and may be used to identify which form was submitted. - form_id: varint - # ResponseData is a JSON encoded value representing the response of the player. If the form was - # cancelled, a JSON encoded 'null' is in the response. For a modal form, the response is either true or - # false, for a menu form, the response is an integer specifying the index of the button clicked, and for - # a custom form, the response is an array containing a value for each element. - data: string - -# ServerSettingsRequest is sent by the client to request the settings specific to the server. These settings -# are shown in a separate tab client-side, and have the same structure as a custom form. -# ServerSettingsRequest has no fields. -packet_server_settings_request: - !id: 0x66 - !bound: server - -# ServerSettingsResponse is optionally sent by the server in response to a ServerSettingsRequest from the -# client. It is structured the same as a ModalFormRequest packet, and if filled out correctly, will show -# a specific tab for the server in the settings of the client. A ModalFormResponse packet is sent by the -# client in response to a ServerSettingsResponse, when the client fills out the settings and closes the -# settings again. -packet_server_settings_response: - !id: 0x67 - !bound: client - # FormID is an ID used to identify the form. The ID is saved by the client and sent back when the player - # submits the form, so that the server can identify which form was submitted. - form_id: varint - # FormData is a JSON encoded object of form data. The content of the object differs, depending on the - # type of the form sent, which is also set in the JSON. - data: string - -# ShowProfile is sent by the server to show the XBOX Live profile of one player to another. -packet_show_profile: - !id: 0x68 - !bound: client - # XUID is the XBOX Live User ID of the player whose profile should be shown to the player. If it is not - # a valid XUID, the client ignores the packet. - xuid: string - -# SetDefaultGameType is sent by the client when it toggles the default game type in the settings UI, and is -# sent by the server when it actually changes the default game type, resulting in the toggle being changed -# in the settings UI. -packet_set_default_game_type: - !id: 0x69 - !bound: client - # GameType is the new game type that is set. When sent by the client, this is the requested new default - # game type. - gamemode: GameMode - -# RemoveObjective is sent by the server to remove a scoreboard objective. It is used to stop showing a -# scoreboard to a player. -packet_remove_objective: - !id: 0x6a - !bound: client - # ObjectiveName is the name of the objective that the scoreboard currently active has. This name must - # be identical to the one sent in the SetDisplayObjective packet. - objective_name: string - -# SetDisplayObjective is sent by the server to display an object as a scoreboard to the player. Once sent, -# it should be followed up by a SetScore packet to set the lines of the packet. -packet_set_display_objective: - !id: 0x6b - !bound: client - # DisplaySlot is the slot in which the scoreboard should be displayed. Available options can be found in - # the constants above. - display_slot: string - # ObjectiveName is the name of the objective that the scoreboard displays. Filling out a random unique - # value for this field works: It is not displayed in the scoreboard. - objective_name: string - # DisplayName is the name, or title, that is displayed at the top of the scoreboard. - display_name: string - # CriteriaName is the name of the criteria that need to be fulfilled in order for the score to be - # increased. This can be any kind of string and does not show up client-side. - criteria_name: string - # SortOrder is the order in which entries on the scoreboard should be sorted. It is one of the constants - # that may be found above. - sort_order: zigzag32 - -# SetScore is sent by the server to send the contents of a scoreboard to the player. It may be used to either -# add, remove or edit entries on the scoreboard. -packet_set_score: - !id: 0x6c - !bound: client - # ActionType is the type of the action to execute upon the scoreboard with the entries that the packet - # has. If ActionType is ScoreboardActionModify, all entries will be added to the scoreboard if not yet - # present, or modified if already present. If set to ScoreboardActionRemove, all scoreboard entries set - # will be removed from the scoreboard. - action: u8 => - 0: change - 1: remove - entries: []varint - scoreboard_id: zigzag64 - objective_name: string - score: li32 - _: ../action ? - if change: - entry_type: i8 => - 1: player - 2: entity - 3: fake_player - entity_unique_id: entry_type ? - if player or entity: zigzag64 - custom_name: entry_type ? - if fake_player: string - -# LabTable is sent by the client to let the server know it started a chemical reaction in Education Edition, -# and is sent by the server to other clients to show the effects. -# The packet is only functional if Education features are enabled. -packet_lab_table: - !id: 0x6d - !bound: both - # ActionType is the type of the action that was executed. It is one of the constants above. Typically, - # only LabTableActionCombine is sent by the client, whereas LabTableActionReact is sent by the server. - action_type: u8 => - 0: combine - 1: react - # Position is the position at which the lab table used was located. - position: vec3u - # ReactionType is the type of the reaction that took place as a result of the items put into the lab - # table. The reaction type can be either that of an item or a particle, depending on whatever the result - # was of the reaction. - reaction_type: u8 - -# UpdateBlockSynced is sent by the server to synchronise the falling of a falling block entity with the -# transitioning back and forth from and to a solid block. It is used to prevent the entity from flickering, -# and is used in places such as the pushing of blocks with pistons. -packet_update_block_synced: - !id: 0x6e - !bound: client - # Position is the block position at which a block is updated. - position: BlockCoordinates - # NewBlockRuntimeID is the runtime ID of the block that is placed at Position after sending the packet - # to the client. - block_runtime_id: varint - # Flags is a combination of flags that specify the way the block is updated client-side. It is a - # combination of the flags above, but typically sending only the BlockUpdateNetwork flag is sufficient. - flags: UpdateBlockFlags - # Layer is the world layer on which the block is updated. For most blocks, this is the first layer, as - # that layer is the default layer to place blocks on, but for blocks inside of each other, this differs. - layer: varint - # EntityUniqueID is the unique ID of the falling block entity that the block transitions to or that the - # entity transitions from. - # Note that for both possible values for TransitionType, the EntityUniqueID should point to the falling - # block entity involved. - entity_unique_id: zigzag64 - # TransitionType is the type of the transition that happened. It is either BlockToEntityTransition, when - # a block placed becomes a falling entity, or EntityToBlockTransition, when a falling entity hits the - # ground and becomes a solid block again. - transition_type: varint64 => - # For falling sand, when a sand turns to an entity - 0: entity - # When sand turns back to a new block - 1: create - 2: destroy - - -# MoveActorDelta is sent by the server to move an entity. The packet is specifically optimised to save as -# much space as possible, by only writing non-zero fields. -# As of 1.16.100, this packet no longer actually contains any deltas. -packet_move_entity_delta: - !id: 0x6f - !bound: client - # EntityRuntimeID is the runtime ID of the entity that is being moved. The packet works provided a - # non-player entity with this runtime ID is present. - runtime_entity_id: varint64 - # Flags is a list of flags that specify what data is in the packet. - flags: DeltaMoveFlags - x: flags.has_x? - if true: lf32 - y: flags.has_y? - if true: lf32 - z: flags.has_z? - if true: lf32 - rot_x: flags.has_rot_x? - if true: u8 # TODO: * implement ByteFloat - rot_y: flags.has_rot_y? - if true: u8 - rot_z: flags.has_rot_z? - if true: u8 - -DeltaMoveFlags: [ "bitflags", - { - "type": "lu16", - "flags": { - "has_x": 0x01, - "has_y": 0x02, - "has_z": 0x04, - "has_rot_x": 0x08, - "has_rot_y": 0x10, - "has_rot_z": 0x20, - "on_ground": 0x40, - "teleport": 0x80, - "force_move": 0x100 - } - } -] - -# SetScoreboardIdentity is sent by the server to change the identity type of one of the entries on a -# scoreboard. This is used to change, for example, an entry pointing to a player, to a fake player when it -# leaves the server, and to change it back to a real player when it joins again. -# In non-vanilla situations, the packet is quite useless. -packet_set_scoreboard_identity: - !id: 0x70 - !bound: client - # ActionType is the type of the action to execute. The action is either ScoreboardIdentityActionRegister - # to associate an identity with the entry, or ScoreboardIdentityActionClear to remove associations with - # an entity. - action: i8 => - 0: register_identity - 1: clear_identity - # Entries is a list of all entries in the packet. Each of these entries points to one of the entries on - # a scoreboard. Depending on ActionType, their identity will either be registered or cleared. - entries: []varint - scoreboard_id: zigzag64 - entity_unique_id: ../action ? - if register_identity: zigzag64 - default: void - - -# SetLocalPlayerAsInitialised is sent by the client in response to a PlayStatus packet with the status set -# to spawn. The packet marks the moment at which the client is fully initialised and can receive any packet -# without discarding it. -packet_set_local_player_as_initialized: - !id: 0x71 - !bound: server - # EntityRuntimeID is the entity runtime ID the player was assigned earlier in the login sequence in the - # StartGame packet. - runtime_entity_id: varint64 - -packet_update_soft_enum: - !id: 0x72 - !bound: client - -# NetworkStackLatency is sent by the server (and the client, on development builds) to measure the latency -# over the entire Minecraft stack, rather than the RakNet latency. It has other usages too, such as the -# ability to be used as some kind of acknowledgement packet, to know when the client has received a certain -# other packet. -packet_network_stack_latency: - !id: 0x73 - !bound: both - # Timestamp is the timestamp of the network stack latency packet. The client will, if NeedsResponse is - # set to true, send a NetworkStackLatency packet with this same timestamp packet in response. - timestamp: lu64 - # NeedsResponse specifies if the sending side of this packet wants a response to the packet, meaning that - # the other side should send a NetworkStackLatency packet back. - needs_response: u8 - -# ScriptCustomEvent is sent by both the client and the server. It is a way to let scripts communicate with -# the server, so that the client can let the server know it triggered an event, or the other way around. -# It is essentially an RPC kind of system. -packet_script_custom_event: - !id: 0x75 - !bound: both - # EventName is the name of the event. The script and the server will use this event name to identify the - # data that is sent. - event_name: string - # EventData is the data of the event. This data is typically a JSON encoded string, that the script is - # able to encode and decode too. - event_data: string - -# SpawnParticleEffect is sent by the server to spawn a particle effect client-side. Unlike other packets that -# result in the appearing of particles, this packet can show particles that are not hardcoded in the client. -# They can be added and changed through behaviour packs to implement custom particles. -packet_spawn_particle_effect: - !id: 0x76 - !bound: client - # Dimension is the dimension that the particle is spawned in. Its exact usage is not clear, as the - # dimension has no direct effect on the particle. - dimension: u8 - # EntityUniqueID is the unique ID of the entity that the spawned particle may be attached to. If this ID - # is not -1, the Position below will be interpreted as relative to the position of the entity associated - # with this unique ID. - entity_id: zigzag64 - # Position is the position that the particle should be spawned at. If the position is too far away from - # the player, it will not show up. - # If EntityUniqueID is not -1, the position will be relative to the position of the entity. - position: vec3f - # ParticleName is the name of the particle that should be shown. This name may point to a particle effect - # that is built-in, or to one implemented by behaviour packs. - particle_name: string - -# AvailableActorIdentifiers is sent by the server at the start of the game to let the client know all -# entities that are available on the server. -packet_available_entity_identifiers: - !id: 0x77 - !bound: client - # SerialisedEntityIdentifiers is a network NBT serialised compound of all entity identifiers that are - # available in the server. - nbt: nbt - -# Not used. Use `packet_level_sound_event`. -packet_level_sound_event_v2: - !id: 0x78 - !bound: both - sound_id: u8 - position: vec3f - block_id: zigzag32 - entity_type: string - is_baby_mob: bool - is_global: bool - -# NetworkChunkPublisherUpdate is sent by the server to change the point around which chunks are and remain -# loaded. This is useful for mini-game servers, where only one area is ever loaded, in which case the -# NetworkChunkPublisherUpdate packet can be sent in the middle of it, so that no chunks ever need to be -# additionally sent during the course of the game. -# In reality, the packet is not extraordinarily useful, and most servers just send it constantly at the -# position of the player. -# If the packet is not sent at all, no chunks will be shown to the player, regardless of where they are sent. -packet_network_chunk_publisher_update: - !id: 0x79 - !bound: client - # Position is the block position around which chunks loaded will remain shown to the client. Most servers - # set this position to the position of the player itself. - coordinates: BlockCoordinates - # Radius is the radius in blocks around Position that chunks sent show up in and will remain loaded in. - # Unlike the RequestChunkRadius and ChunkRadiusUpdated packets, this radius is in blocks rather than - # chunks, so the chunk radius needs to be multiplied by 16. (Or shifted to the left by 4.) - radius: varint - -# BiomeDefinitionList is sent by the server to let the client know all biomes that are available and -# implemented on the server side. It is much like the AvailableActorIdentifiers packet, but instead -# functions for biomes. -packet_biome_definition_list: - !id: 0x7a - !bound: client - # SerialisedBiomeDefinitions is a network NBT serialised compound of all definitions of biomes that are - # available on the server. - nbt: nbt - -# LevelSoundEvent is sent by the server to make any kind of built-in sound heard to a player. It is sent to, -# for example, play a stepping sound or a shear sound. The packet is also sent by the client, in which case -# it could be forwarded by the server to the other players online. If possible, the packets from the client -# should be ignored however, and the server should play them on its own accord. -packet_level_sound_event: - !id: 0x7b - !bound: both - # SoundType is the type of the sound to play. Some of the sound types - # require additional data, which is set in the EventData field. - sound_id: SoundType - # Position is the position of the sound event. The player will be able to hear the direction of the sound - # based on what position is sent here. - position: vec3f - # ExtraData is a packed integer that some sound types use to provide extra data. An example of this is - # the note sound, which is composed of a pitch and an instrument type. - extra_data: zigzag32 - # EntityType is the string entity type of the entity that emitted the sound, for example - # 'minecraft:skeleton'. Some sound types use this entity type for additional data. - entity_type: string - # BabyMob specifies if the sound should be that of a baby mob. It is most notably used for parrot - # imitations, which will change based on if this field is set to true or not. - is_baby_mob: bool - # DisableRelativeVolume specifies if the sound should be played relatively or not. If set to true, the - # sound will have full volume, regardless of where the Position is, whereas if set to false, the sound's - # volume will be based on the distance to Position. - is_global: bool - -# LevelEventGeneric is sent by the server to send a 'generic' level event to the client. This packet sends an -# NBT serialised object and may for that reason be used for any event holding additional data. -packet_level_event_generic: - !id: 0x7c - !bound: client - # EventID is a unique identifier that identifies the event called. The data that follows has fields in - # the NBT depending on what event it is. - event_id: varint - # SerialisedEventData is a network little endian serialised object of event data, with fields that vary - # depending on EventID. - # Unlike many other NBT structures, this data is not actually in a compound but just loosely floating - # NBT tags. To decode using the nbt package, you would need to append 0x0a00 at the start (compound id - # and name length) and add 0x00 at the end, to manually wrap it in a compound. Likewise, you would have - # to remove these bytes when encoding. - nbt: nbtLoop - -# LecternUpdate is sent by the client to update the server on which page was opened in a book on a lectern, -# or if the book should be removed from it. -packet_lectern_update: - !id: 0x7d - !bound: client - # Page is the page number in the book that was opened by the player on the lectern. - page: u8 - # PageCount is the number of pages that the book opened in the lectern has. - page_count: u8 - # Position is the position of the lectern that was updated. If no lectern is at the block position, - # the packet should be ignored. - position: vec3i - # DropBook specifies if the book currently set on display in the lectern should be dropped server-side. - drop_book: bool - -# This packet was removed. -packet_video_stream_connect: - !id: 0x7e - !bound: client - server_uri: string - frame_send_frequency: lf32 - action: u8 - resolution_x: li32 - resolution_y: li32 - -# This is NOT a Minecraft entity, but an entity in the Entity Component System (ECS) -# for the game engine Minecrat Bedrock uses. Internally, all 'Minecraft entities' are -# known as Actors including in packet names and fields. However, these are irrelevant -# internal details so we don't do the renames in these protocol definitions, for simplicity we just use Entity. -# -# AddEntity is sent by the server to the client. Its function is not entirely clear: It does not add an -# entity in the sense of an in-game entity, but has to do with the ECS that Minecraft uses. -packet_add_ecs_entity: - !id: 0x7f - !bound: client - # EntityNetworkID is the network ID of the entity that should be added. - network_id: varint64 - -# RemoveEntity is sent by the server to the client. Its function is not entirely clear: It does not remove an -# entity in the sense of an in-game entity, but has to do with the ECS that Minecraft uses -packet_remove_ecs_entity: - !id: 0x80 - !bound: client - # EntityNetworkID is the network ID of the entity that should be removed. - network_id: varint64 - -# ClientCacheStatus is sent by the client to the server at the start of the game. It is sent to let the -# server know if it supports the client-side blob cache. Clients such as Nintendo Switch do not support the -# cache, and attempting to use it anyway will fail. -packet_client_cache_status: - !id: 0x81 - !bound: both - # Enabled specifies if the blob cache is enabled. If false, the server should not attempt to use the - # blob cache. If true, it may do so, but it may also choose not to use it. - enabled: bool - -# OnScreenTextureAnimation is sent by the server to show a certain animation on the screen of the player. -# The packet is used, as an example, for when a raid is triggered and when a raid is defeated. -packet_on_screen_texture_animation: - !id: 0x82 - !bound: client - # AnimationType is the type of the animation to show. The packet provides no further extra data to allow - # modifying the duration or other properties of the animation. - animation_type: lu32 - - -# MapCreateLockedCopy is sent by the server to create a locked copy of one map into another map. In vanilla, -# it is used in the cartography table to create a map that is locked and cannot be modified. -packet_map_create_locked_copy: - !id: 0x83 - !bound: client - # OriginalMapID is the ID of the map that is being copied. The locked copy will obtain all content that - # is visible on this map, except the content will not change. - original_map_id: zigzag64 - # NewMapID is the ID of the map that holds the locked copy of the map that OriginalMapID points to. Its - # contents will be impossible to change. - new_map_id: zigzag64 - - -# StructureTemplateDataRequest is sent by the client to request data of a structure. -packet_structure_template_data_export_request: - !id: 0x84 - !bound: client - # StructureName is the name of the structure that was set in the structure block's UI. This is the name - # used to export the structure to a file. - name: string - # Position is the position of the structure block that has its template data requested. - position: BlockCoordinates - # Settings is a struct of settings that should be used for exporting the structure. These settings are - # identical to the last sent in the StructureBlockUpdate packet by the client. - settings: StructureBlockSettings - # RequestType specifies the type of template data request that the player sent. - request_type: u8 => - 1: export_from_save - 2: export_from_load - 3: query_saved_structure - -# StructureTemplateDataResponse is sent by the server to send data of a structure to the client in response -# to a StructureTemplateDataRequest packet. -packet_structure_template_data_export_response: - !id: 0x85 - !bound: client - name: string - success: bool - nbt: success ? - if true: nbt - # ResponseType specifies the response type of the packet. This depends on the RequestType field sent in - # the StructureTemplateDataRequest packet and is one of the constants above. - response_type: u8 => - 1: export - 2: query - -# No longer used. -packet_update_block_properties: - !id: 0x86 - !bound: client - nbt: nbt - -# ClientCacheBlobStatus is part of the blob cache protocol. It is sent by the client to let the server know -# what blobs it needs and which blobs it already has, in an ACK type system. -packet_client_cache_blob_status: - !id: 0x87 - !bound: client - # The number of MISSes in this packet - misses: varint - # The number of HITs in this packet - haves: varint - # A list of blob hashes that the client does not have a blob available for. The server - # should send the blobs matching these hashes as soon as possible. - missing: lu64[]$misses - # A list of hashes that the client does have a cached blob for. Server doesn't need to send. - have: lu64[]$haves - -# ClientCacheMissResponse is part of the blob cache protocol. It is sent by the server in response to a -# ClientCacheBlobStatus packet and contains the blob data of all blobs that the client acknowledged not to -# have yet. -packet_client_cache_miss_response: - !id: 0x88 - !bound: client - blobs: Blob[]varint - -# EducationSettings is a packet sent by the server to update Minecraft: Education Edition related settings. -# It is unused by the normal base game. -packet_education_settings: - !id: 0x89 - !bound: client - # CodeBuilderDefaultURI is the default URI that the code builder is ran on. Using this, a Code Builder - # program can make code directly affect the server. - CodeBuilderDefaultURI: string - # CodeBuilderTitle is the title of the code builder shown when connected to the CodeBuilderDefaultURI. - CodeBuilderTitle: string - # CanResizeCodeBuilder specifies if clients connected to the world should be able to resize the code - # builder when it is opened. - CanResizeCodeBuilder: bool - HasOverrideURI: bool - OverrideURI: HasOverrideURI? - if true: string - # HasQuiz specifies if the world has a quiz connected to it. - HasQuiz: bool - -# MultiPlayerSettings is sent by the client to update multi-player related settings server-side and sent back -# to online players by the server. -# The MultiPlayerSettings packet is a Minecraft: Education Edition packet. It has no functionality for the -# base game. -packet_multiplayer_settings: - !id: 0x8b - !bound: server - # ActionType is the action that should be done when this packet is sent. It is one of the constants that - # may be found above. - action_type: zigzag32 => - 0: enable_multiplayer - 1: disable_multiplayer - 2: refresh_join_code - -# SettingsCommand is sent by the client when it changes a setting in the settings that results in the issuing -# of a command to the server, such as when Show Coordinates is enabled. -packet_settings_command: - !id: 0x8c - !bound: server - # CommandLine is the full command line that was sent to the server as a result of the setting that the - # client changed. - command_line: string - # SuppressOutput specifies if the client requests the suppressing of the output of the command that was - # executed. Generally this is set to true, as the client won't need a message to confirm the output of - # the change. - suppress_output: bool - -# AnvilDamage is sent by the client to request the dealing damage to an anvil. This packet is completely -# pointless and the server should never listen to it. -packet_anvil_damage: - !id: 0x8d - !bound: server - # Damage is the damage that the client requests to be dealt to the anvil. - damage: u8 - # AnvilPosition is the position in the world that the anvil can be found at. - position: BlockCoordinates - -# CompletedUsingItem is sent by the server to tell the client that it should be done using the item it is -# currently using. -packet_completed_using_item: - !id: 0x8e - !bound: client - # UsedItemID is the item ID of the item that the client completed using. This should typically be the - # ID of the item held in the hand. - used_item_id: li16 - # UseMethod is the method of the using of the item that was completed. It is one of the constants that - # may be found above. - use_method: li32 => - 0: equip_armor - 1: eat - 2: attack - 3: consume - 4: throw - 5: shoot - 6: place - 7: fill_bottle - 8: fill_bucket - 9: pour_bucket - 10: use_tool - 11: interact - 12: retrieved - 13: dyed - 14: traded - -# NetworkSettings is sent by the server to update a variety of network settings. These settings modify the -# way packets are sent over the network stack. -packet_network_settings: - !id: 0x8f - !bound: both - # CompressionThreshold is the minimum size of a packet that is compressed when sent. If the size of a - # packet is under this value, it is not compressed. - # When set to 0, all packets will be left uncompressed. - compression_threshold: u16 - - -# PlayerAuthInput is sent by the client to allow for server authoritative movement. It is used to synchronise -# the player input with the position server-side. -# The client sends this packet when the ServerAuthoritativeMovementMode field in the StartGame packet is set -# to true, instead of the MovePlayer packet. The client will send this packet once every tick. -packet_player_auth_input: - !id: 0x90 - !bound: server - # Pitch that the player reports it has. - pitch: lf32 - # Yaw that player reports it has. - yaw: lf32 - # Position holds the position that the player reports it has. - position: vec3f - # MoveVector is a Vec2 that specifies the direction in which the player moved, as a combination of X/Z - # values which are created using the WASD/controller stick state. - move_vector: vec2f - # HeadYaw is the horizontal rotation of the head that the player reports it has. - head_yaw: lf32 - # InputData is a combination of bit flags that together specify the way the player moved last tick. It - # is a combination of the flags above. - input_data: InputFlag - # InputMode specifies the way that the client inputs data to the screen. It is one of the constants that - # may be found above. - input_mode: varint => - 0: unknown - 1: mouse - 2: touch - 3: game_pad - 4: motion_controller - # PlayMode specifies the way that the player is playing. The values it holds, which are rather random, - # may be found above. - play_mode: varint => - 0: normal - 1: teaser - 2: screen - 3: viewer - 4: reality - 5: placement - 6: living_room - 7: exit_level - 8: exit_level_living_room - 9: num_modes - # GazeDirection is the direction in which the player is gazing, when the PlayMode is PlayModeReality: In - # other words, when the player is playing in virtual reality. - gaze_direction: play_mode ? - if reality: vec3f - # Tick is the server tick at which the packet was sent. It is used in relation to - # CorrectPlayerMovePrediction. - tick: varint64 - # Delta was the delta between the old and the new position. There isn't any practical use for this field - # as it can be calculated by the server itself. - delta: vec3f - transaction: input_data.item_interact ? - if true: - legacy: TransactionLegacy - actions: TransactionActions - data: TransactionUseItem - item_stack_request: input_data.item_stack_request ? - if true: ItemStackRequest - block_action: input_data.block_action ? - if true: []zigzag32 - action: Action - _: action? - if start_break or abort_break or crack_break or predict_break or continue_break: - # BlockPosition is the position of the target block, if the action with the ActionType set concerned a - # block. If that is not the case, the block position will be zero. - position: BlockCoordinates - # BlockFace is the face of the target block that was touched. If the action with the ActionType set - # concerned a block. If not, the face is always 0. - face: zigzag32 - -#TODO: update to use the new `shift` option in bitflags -InputFlag: [ "bitflags", { - "type": "varint64", "big": true, - "flags": [ - "ascend", - "descend", - "north_jump", - "jump_down", - "sprint_down", - "change_height", - "jumping", - "auto_jumping_in_water", - "sneaking", - "sneak_down", - "up", - "down", - "left", - "right", - "up_left", - "up_right", - "want_up", - "want_down", - "want_down_slow", - "want_up_slow", - "sprinting", - "ascend_block", - "descend_block", - "sneak_toggle_down", - "persist_sneak", - "start_sprinting", - "stop_sprinting", - "start_sneaking", - "stop_sneaking", - "start_swimming", - "stop_swimming", - "start_jumping", - "start_gliding", - "stop_gliding", - "item_interact", - "block_action", - "item_stack_request" - ] -}] - -# CreativeContent is a packet sent by the server to set the creative inventory's content for a player. -# Introduced in 1.16, this packet replaces the previous method - sending an InventoryContent packet with -# creative inventory window ID. -# As of v1.16.100, this packet must be sent during the login sequence. Not sending it will stop the client -# from joining the server. -packet_creative_content: - !id: 0x91 - !bound: client - # Items is a list of the items that should be added to the creative inventory. - items: []varint - entry_id: varint - item: ItemLegacy - -# PlayerEnchantOptions is sent by the server to update the enchantment options displayed when the user opens -# the enchantment table and puts an item in. This packet was added in 1.16 and allows the server to decide on -# the enchantments that can be selected by the player. -# The PlayerEnchantOptions packet should be sent once for every slot update of the enchantment table. The -# vanilla server sends an empty PlayerEnchantOptions packet when the player opens the enchantment table -# (air is present in the enchantment table slot) and sends the packet with actual enchantments in it when -# items are put in that can have enchantments. -packet_player_enchant_options: - !id: 0x92 - !bound: client - # Options is a list of possible enchantment options for the item that was put into the enchantment table. - options: EnchantOption[]varint - -# ItemStackRequest is sent by the client to change item stacks in an inventory. It is essentially a -# replacement of the InventoryTransaction packet added in 1.16 for inventory specific actions, such as moving -# items around or crafting. The InventoryTransaction packet is still used for actions such as placing blocks -# and interacting with entities. -packet_item_stack_request: - !id: 0x93 - !bound: server - requests: ItemStackRequest[]varint - -# ItemStackResponse is sent by the server in response to an ItemStackRequest packet from the client. This -# packet is used to either approve or reject ItemStackRequests from the client. If a request is approved, the -# client will simply continue as normal. If rejected, the client will undo the actions so that the inventory -# should be in sync with the server again. -packet_item_stack_response: - !id: 0x94 - !bound: client - # Responses is a list of responses to ItemStackRequests sent by the client before. Responses either - # approve or reject a request from the client. - # Vanilla limits the size of this slice to 4096. - responses: ItemStackResponses - -# PlayerArmourDamage is sent by the server to damage the armour of a player. It is a very efficient packet, -# but generally it's much easier to just send a slot update for the damaged armour. -packet_player_armor_damage: - !id: 0x95 - !bound: client - # Bitset holds a bitset of 4 bits that indicate which pieces of armour need to have damage dealt to them. - # The first bit, when toggled, is for a helmet, the second for the chestplate, the third for the leggings - # and the fourth for boots. - type: ArmorDamageType - helmet_damage: type.head ? - if true: zigzag32 - chestplate_damage: type.chest ? - if true: zigzag32 - leggings_damage: type.legs ? - if true: zigzag32 - boots_damage: type.feet ? - if true: zigzag32 - -ArmorDamageType: [ "bitflags", - { - "type": "u8", - "flags": { - "head": 0b1, - "chest": 0b10, - "legs": 0b100, - "feet": 0b1000 - } - } -] - -# UpdatePlayerGameType is sent by the server to change the game mode of a player. It is functionally -# identical to the SetPlayerGameType packet. -packet_update_player_game_type: - !id: 0x97 - !bound: server - # GameType is the new game type of the player. It is one of the constants that can be found in - # set_player_game_type.go. Some of these game types require additional flags to be set in an - # AdventureSettings packet for the game mode to obtain its full functionality. - gamemode: GameMode - # PlayerUniqueID is the entity unique ID of the player that should have its game mode updated. If this - # packet is sent to other clients with the player unique ID of another player, nothing happens. - player_unique_id: zigzag64 - - -# PositionTrackingDBClientRequest is a packet sent by the client to request the position and dimension of a -# 'tracking ID'. These IDs are tracked in a database by the server. In 1.16, this is used for lodestones. -# The client will send this request to find the position a lodestone compass needs to point to. If found, it -# will point to the lodestone. If not, it will start spinning around. -# A PositionTrackingDBServerBroadcast packet should be sent in response to this packet. -packet_position_tracking_db_request: - !id: 0x9a - !bound: server - # RequestAction is the action that should be performed upon the receiving of the packet. It is one of the - # constants found above. - action: u8 => - 0: query - # TrackingID is a unique ID used to identify the request. The server responds with a - # PositionTrackingDBServerBroadcast packet holding the same ID, so that the client can find out what that - # packet was in response to. - tracking_id: zigzag32 - -# PositionTrackingDBServerBroadcast is sent by the server in response to the -# PositionTrackingDBClientRequest packet. This packet is, as of 1.16, currently only used for lodestones. The -# server maintains a database with tracking IDs and their position and dimension. The client will request -# these tracking IDs, (NBT tag set on the lodestone compass with the tracking ID?) and the server will -# respond with the status of those tracking IDs. -# What is actually done with the data sent depends on what the client chooses to do with it. For the -# lodestone compass, it is used to make the compass point towards lodestones and to make it spin if the -# lodestone at a position is no longer there. -packet_position_tracking_db_broadcast: - !id: 0x99 - !bound: client - # BroadcastAction specifies the status of the position tracking DB response. It is one of the constants - # above, specifying the result of the request with the ID below. - # The Update action is sent for setting the position of a lodestone compass, the Destroy and NotFound to - # indicate that there is not (no longer) a lodestone at that position. - broadcast_action: u8 => - 0: update - 1: destory - 2: not_found - # TrackingID is the ID of the PositionTrackingDBClientRequest packet that this packet was in response to. - # The tracking ID is also present as the 'id' field in the SerialisedData field. - tracking_id: zigzag32 - nbt: nbt - -# PacketViolationWarning is sent by the client when it receives an invalid packet from the server. It holds -# some information on the error that occurred. -packet_packet_violation_warning: - !id: 0x9c - !bound: server - violation_type: zigzag32 => - 0: malformed - # Severity specifies the severity of the packet violation. The action the client takes after this - # violation depends on the severity sent. - severity: zigzag32 => - 0: warning - 1: final_warning - 2: terminating - # PacketID is the ID of the invalid packet that was received. - packet_id: zigzag32 - # ViolationContext holds a description on the violation of the packet. - reason: string - - -# MotionPredictionHints is sent by the server to the client. There is a predictive movement component for -# entities. This packet fills the "history" of that component and entity movement is computed based on the -# points. Vanilla sends this packet instead of the SetActorMotion packet when 'spatial optimisations' are -# enabled. -packet_motion_prediction_hints: - !id: 0x9d - !bound: client - # EntityRuntimeID is the runtime ID of the entity whose velocity is sent to the client. - entity_runtime_id: varint64 - # Velocity is the server-calculated velocity of the entity at the point of sending the packet. - velocity: vec3f - # OnGround specifies if the server currently thinks the entity is on the ground. - on_ground: bool - - -# AnimateEntity is sent by the server to animate an entity client-side. It may be used to play a single -# animation, or to activate a controller which can start a sequence of animations based on different -# conditions specified in an animation controller. -# Much of the documentation of this packet can be found at -# https://minecraft.gamepedia.com/Bedrock_Edition_beta_animation_documentation. -packet_animate_entity: - !id: 0x9e - !bound: client - # Animation is the name of a single animation to start playing. - animation: string - # NextState is the first state to start with. These states are declared in animation controllers (which, - # in themselves, are animations too). These states in turn may have animations and transitions to move to - # a next state. - next_state: string - # StopCondition is a MoLang expression that specifies when the animation should be stopped. - stop_condition: string - # Controller is the animation controller that is used to manage animations. These controllers decide when - # to play which animation. - controller: string - # How long to move from the previous animation to the next. - blend_out_time: lf32 - # EntityRuntimeIDs is list of runtime IDs of entities that the animation should be applied to. - runtime_entity_ids: varint64[]varint - -# CameraShake is sent by the server to make the camera shake client-side. This feature was added for map- -# making partners. -packet_camera_shake: - !id: 0x9f - !bound: client - # Intensity is the intensity of the shaking. The client limits this value to 4, so anything higher may - # not work. - intensity: lf32 - # Duration is the number of seconds the camera will shake for. - duration: lf32 - # Type is the type of shake, and is one of the constants listed above. The different type affects how - # the shake looks in game. - type: u8 - # Action is the action to be performed, and is one of the constants listed above. Currently the - # different actions will either add or stop shaking the client. - action: u8 => - 0: add - 1: stop - -# PlayerFog is sent by the server to render the different fogs in the Stack. The types of fog are controlled -# by resource packs to change how they are rendered, and the ability to create custom fog. -packet_player_fog: - !id: 0xa0 - !bound: client - # Stack is a list of fog identifiers to be sent to the client. Examples of fog identifiers are - # "minecraft:fog_ocean" and "minecraft:fog_hell". - stack: string[]varint - - -# CorrectPlayerMovePrediction is sent by the server if and only if StartGame.ServerAuthoritativeMovementMode -# is set to AuthoritativeMovementModeServerWithRewind. The packet is used to correct movement at a specific -# point in time. -packet_correct_player_move_prediction: - !id: 0xa1 - !bound: client - # Position is the position that the player is supposed to be at at the tick written in the field below. - # The client will change its current position based on movement after that tick starting from the - # Position. - position: vec3f - # Delta is the change in position compared to what the client sent as its position at that specific tick. - delta: vec3f - # OnGround specifies if the player was on the ground at the time of the tick below. - on_ground: bool - # Tick is the tick of the movement which was corrected by this packet. - tick: varint64 - -# ItemComponent is sent by the server to attach client-side components to a custom item. -packet_item_component: - !id: 0xa2 - !bound: client - # `entries` holds a list of all custom items with their respective components set. - entries: ItemComponentList - -# FilterText is sent by the both the client and the server. The client sends the packet to the server to -# allow the server to filter the text server-side. The server then responds with the same packet and the -# safer version of the text. -packet_filter_text_packet: - !id: 0xa3 - !bound: client - # Text is either the text from the client or the safer version of the text sent by the server. - text: string - # FromServer indicates if the packet was sent by the server or not. - from_server: bool - -# ClientBoundDebugRenderer is sent by the server to spawn an outlined cube on client-side. -packet_debug_renderer: - !id: 0xa4 - !bound: client - # Type is the type of action. It is one of the constants above. - type: li32 => - 1: clear - 2: add_cube - _: type ? - if clear: void - if add_cube: - # Text is the text that is displayed above the debug. - text: string - # Position is the position to spawn the debug on. - position: vec3f - # Red is the red value from the RGBA colour rendered on the debug. - red: lf32 - # Green is the green value from the RGBA colour rendered on the debug. - green: lf32 - # Blue is the blue value from the RGBA colour rendered on the debug. - blue: lf32 - # Alpha is the alpha value from the RGBA colour rendered on the debug. - alpha: lf32 - # Duration is how long the debug will last in the world for. It is measured in milliseconds. - duration: li64 - -# Sent by the server to synchronize/update entity properties as NBT, an alternative to Set Entity Data. -packet_sync_entity_property: - !id: 0xa5 - !bound: client - nbt: nbt - -# AddVolumeEntity sends a volume entity's definition and components from server to client. -packet_add_volume_entity: - !id: 0xa6 - !bound: client - # The Runtime Entity ID - entity_id: varint64 - nbt: nbt - -# RemoveVolumeEntity indicates a volume entity to be removed from server to client. -packet_remove_volume_entity: - !id: 0xa7 - !bound: client - # The Runtime Entity ID - entity_id: varint64 - -# SimulationType is an in-progress packet. We currently do not know the use case. -packet_simulation_type: - !id: 0xa8 - # SimulationType is the simulation type selected - type: u8 => - 0: game - 1: editor - 2: test - 3: invalid - -# NPCDialogue is a packet that allows the client to display dialog boxes for interacting with NPCs. -packet_npc_dialogue: - !id: 0xa9 - # ActorUniqueID is the ID of the NPC being requested. - entity_id: lu64 - # ActionType is the type of action for the packet. - action_type: varint => - 0: open - 1: close - # Dialogue is the text that the client should see. - dialogue: string - # SceneName is the scene the data was pulled from for the client. - screen_name: string - # NPCName is the name of the NPC to be displayed to the client. - npc_name: string - # ActionJSON is the JSON string of the buttons/actions the server can perform. - action_json: string \ No newline at end of file diff --git a/data/latest/types.yaml b/data/latest/types.yaml deleted file mode 100644 index f88fba0..0000000 --- a/data/latest/types.yaml +++ /dev/null @@ -1,1703 +0,0 @@ -!StartDocs: Types - -BehaviourPackInfos: []li16 - uuid: string - version: string - size: lu64 - content_key: string - sub_pack_name: string - content_identity: string - has_scripts: bool - -TexturePackInfos: []li16 - uuid: string - version: string - size: lu64 - content_key: string - sub_pack_name: string - content_identity: string - has_scripts: bool - rtx_enabled: bool - -ResourcePackIdVersions: []varint - # The ID of the resource pack. - uuid: string - # The version of the resource pack. - version: string - # The subpack name of the resource pack. - name: string - -ResourcePackIds: string[]li16 - -Experiment: - name: string - enabled: bool - -Experiments: Experiment[]li32 - -GameMode: zigzag32 => - 0: survival - 1: creative - 2: adventure - 3: survival_spectator - 4: creative_spectator - 5: fallback - -GameRule: - name: string - editable: bool - type: varint => - 1: bool - 2: int - 3: float - value: type? - if bool: bool - if int: zigzag32 - if float: lf32 - -GameRules: GameRule[]varint - -# CacheBlob represents a blob as used in the client side blob cache protocol. It holds a hash of its data and -# the full data of it. -Blob: - # Hash is the hash of the blob. The hash is computed using xxHash, and must be deterministic for the same - # chunk data. - hash: lu64 - # Payload is the data of the blob. When sent, the client will associate the Hash of the blob with the - # Payload in it. - payload: ByteArray - -BlockProperties: []varint - name: string - state: nbt - -Itemstates: []varint - name: string - runtime_id: li16 - component_based: bool - - - -ItemExtraDataWithBlockingTick: - has_nbt: lu16 => - 0xffff: 'true' - 0x0000: 'false' - nbt: has_nbt ? - if true: - version: u8 - nbt: lnbt - default: void - can_place_on: ShortArray[]li32 - can_destroy: ShortArray[]li32 - blocking_tick: li64 - -ItemExtraDataWithoutBlockingTick: - has_nbt: lu16 => - 0xffff: 'true' - 0x0000: 'false' - nbt: has_nbt ? - if true: - version: u8 - nbt: lnbt - default: void - can_place_on: ShortArray[]li32 - can_destroy: ShortArray[]li32 - -# Same as below but without a "networkStackID" boolean -ItemLegacy: - network_id: zigzag32 - _: network_id? - if 0: void - default: - count: lu16 - metadata: varint - block_runtime_id: zigzag32 - extra: network_id ? - # The Shield Item ID is sent in the StartGame packet. It is usually 355 in vanilla. - if /ShieldItemID: '["encapsulated", { "lengthType": "varint", "type": "ItemExtraDataWithBlockingTick" }]' - default: '["encapsulated", { "lengthType": "varint", "type": "ItemExtraDataWithoutBlockingTick" }]' - -# An "ItemStack" here represents an Item instance. You can think about it like a pointer -# to an item class. The data for the class gets updated with the data in the `item` field -# As of 1.16.220, now functionally the same as `Item` just without an extra boolean when -# server auth inventories is disabled. -Item: - network_id: zigzag32 - _: network_id? - if 0: void - default: - count: lu16 - metadata: varint - # When server authoritative inventory is enabled, all allocated items have a unique ID used to identify - # a specifc item instance. - has_stack_id: u8 - # StackNetworkID is the network ID of this item *instance*. If the stack is empty, 0 is always written for this - # field. If not, the field should be set to 1 if the server authoritative inventories are disabled in the - # StartGame packet, or to a unique stack ID if it is enabled. - stack_id: has_stack_id ? - if 0: void - default: zigzag32 - block_runtime_id: zigzag32 - extra: network_id ? - # The Shield Item ID is sent in the StartGame packet. It is usually 355 in vanilla. - ## Really bad compiler hack to allow us to use a global variable - if /ShieldItemID: '["encapsulated", { "lengthType": "varint", "type": "ItemExtraDataWithBlockingTick" }]' - default: '["encapsulated", { "lengthType": "varint", "type": "ItemExtraDataWithoutBlockingTick" }]' - -vec3i: - x: zigzag32 - y: zigzag32 - z: zigzag32 - -vec3u: - x: varint - y: varint - z: varint - -vec3f: - x: lf32 - y: lf32 - z: lf32 - -vec2f: - x: lf32 - z: lf32 - -MetadataDictionary: []varint - # https://github.com/pmmp/PocketMine-MP/blob/stable/src/pocketmine/entity/Entity.php#L101 - key: varint => - 0: flags - 1: health #int (minecart/boat) - 2: variant #int - 3: color #byte - 4: nametag #string - 5: owner_eid #long - 6: target_eid #long - 7: air #short - 8: potion_color #int (ARGB!) - 9: potion_ambient #byte - 10: jump_duration #long - 11: hurt_time #int (minecart/boat) - 12: hurt_direction #int (minecart/boat) - 13: paddle_time_left #float - 14: paddle_time_right #float - 15: experience_value #int (xp orb) - 16: minecart_display_block #int (id | (data << 16)) - 17: minecart_display_offset #int - 18: minecart_has_display #byte (must be 1 for minecart to show block inside) - 20: old_swell - 21: swell_dir - 22: charge_amount - 23: enderman_held_runtime_id #short - 24: entity_age #short - 26: player_flags - 27: player_index - 28: player_bed_position #block coords - 29: fireball_power_x #float - 30: fireball_power_y - 31: fireball_power_z - 32: aux_power - 33: fish_x - 34: fish_z - 35: fish_angle - 36: potion_aux_value #short - 37: lead_holder_eid #long - 38: scale - 39: interactive_tag #string - 40: npc_skin_id #string - 41: url_tag #string - 42: max_airdata_max_air - 43: mark_variant #int - 44: container_type #byte - 45: container_base_size #int - 46: container_extra_slots_per_strength #int - 47: block_target - 48: wither_invulnerable_ticks #int - 49: wither_target_1 #long - 50: wither_target_2 #long - 51: wither_target_3 #long - 52: aerial_attack - 53: boundingbox_width - 54: boundingbox_height - 55: fuse_length - 56: rider_seat_position #vector3f - 57: rider_rotation_locked #byte - 58: rider_max_rotation #float - 59: rider_min_rotation #float - 60: rider_rotation_offset - 61: area_effect_cloud_radius #float - 62: area_effect_cloud_waiting #int - 63: area_effect_cloud_particle_id #int - 64: shulker_peek_id #int - 65: shulker_attach_face #byte - 66: shulker_attached #short - 67: shulker_attach_pos - 68: trading_player_eid #long - 69: trading_career - 70: has_command_block - 71: command_block_command #string - 72: command_block_last_output #string - 73: command_block_track_output #byte - 74: controlling_rider_seat_number #byte - 75: strength #int - 76: max_strength #int - 77: spell_casting_color #int - 78: limited_life - 79: armor_stand_pose_index # int - 80: ender_crystal_time_offset # int - 81: always_show_nametag # byte - 82: color_2 # byte - 83: name_author - 84: score_tag #String - 85: balloon_attached_entity # long - 86: pufferfish_size - 87: bubble_time - 88: agent - 89: sitting_amount - 90: sitting_amount_previous - 91: eating_counter - 92: flags_extended - 93: laying_amount - 94: laying_amount_previous - 95: duration - 96: spawn_time - 97: change_rate - 98: change_on_pickup - 99: pickup_count - 100: interact_text - 101: trade_tier - 102: max_trade_tier - 103: trade_experience - 104: skin_id - 105: spawning_frames - 106: command_block_tick_delay - 107: command_block_execute_on_first_tick - 108: ambient_sound_interval - 109: ambient_sound_interval_range - 110: ambient_sound_event_name - 111: fall_damage_multiplier - 112: name_raw_text - 113: can_ride_target - 114: low_tier_cured_discount - 115: high_tier_cured_discount - 116: nearby_cured_discount - 117: nearby_cured_discount_timestamp - 118: hitbox - 119: is_buoyant - 120: base_runtime_id - 121: freezing_effect_strength - 122: buoyancy_data - 123: goat_horn_count - 124: update_properties - type: varint => - 0: byte - 1: short - 2: int - 3: float - 4: string - 5: compound - 6: vec3i - 7: long - 8: vec3f - value: key ? - if flags: MetadataFlags1 - if flags_extended: MetadataFlags2 - default: type ? - if byte: i8 - if short: li16 - if int: zigzag32 - if float: lf32 - if string: string - if compound: nbt - if vec3i: vec3i - if long: zigzag64 - if vec3f: vec3f - -MetadataFlags1: [ "bitflags", { - "type": "zigzag64", - "big": true, - "flags": [ - "onfire", - "sneaking", - "riding", - "sprinting", - "action", - "invisible", - "tempted", - "inlove", - "saddled", - "powered", - "ignited", - "baby", - "converting", - "critical", - "can_show_nametag", - "always_show_nametag", - "no_ai", - "silent", - "wallclimbing", - "can_climb", - "swimmer", - "can_fly", - "walker", - "resting", - "sitting", - "angry", - "interested", - "charged", - "tamed", - "orphaned", - "leashed", - "sheared", - "gliding", - "elder", - "moving", - "breathing", - "chested", - "stackable", - "showbase", - "rearing", - "vibrating", - "idling", - "evoker_spell", - "charge_attack", - "wasd_controlled", - "can_power_jump", - "linger", - "has_collision", - "affected_by_gravity", - "fire_immune", - "dancing", - "enchanted", - "show_trident_rope", # tridents show an animated rope when enchanted with loyalty after they are thrown and return to their owner. to be combined with data_owner_eid - "container_private", #inventory is private, doesn't drop contents when killed if true - "transforming", - "spin_attack", - "swimming", - "bribed", #dolphins have this set when they go to find treasure for the player - "pregnant", - "laying_egg", - "rider_can_pick", #??? - "transition_sitting", - "eating", - "laying_down" - ] -}] - -MetadataFlags2: [ "bitflags", { - "type": "zigzag64", - "big": true, - "flags": [ - "sneezing", - "trusting", - "rolling", - "scared", - "in_scaffolding", - "over_scaffolding", - "fall_through_scaffolding", - "blocking", #shield - "transition_blocking", - "blocked_using_shield", - "blocked_using_damaged_shield", - "sleeping", - "wants_to_wake", - "trade_interest", - "door_breaker", #... - "breaking_obstruction", - "door_opener", #... - "illager_captain", - "stunned", - "roaring", - "delayed_attacking", - "avoiding_mobs", - "avoiding_block", - "facing_target_to_range_attack", - "hidden_when_invisible", #?????????????????? - "is_in_ui", - "stalking", - "emoting", - "celebrating", - "admiring", - "celebrating_special", - "unknown95", # 95 - "ram_attack", - "playing_dead" - ] -}] - -Link: - ridden_entity_id: zigzag64 - rider_entity_id: zigzag64 - type: u8 - immediate: bool - rider_initiated: bool - -Links: Link[]varint - -EntityAttributes: []varint - name: string - min: lf32 - value: lf32 - max: lf32 - -Rotation: - yaw: byterot - pitch: byterot - head_yaw: byterot - -BlockCoordinates: # mojang... - x: zigzag32 - y: varint - z: zigzag32 - -PlayerAttributes: []varint - min: lf32 - max: lf32 - current: lf32 - default: lf32 - name: string - -# UseItemTransactionData represents an inventory transaction data object sent when the client uses an item on -# a block. Also used in PlayerAuthoritativeInput packet -TransactionUseItem: - # ActionType is the type of the UseItem inventory transaction. It is one of the action types found above, - # and specifies the way the player interacted with the block. - action_type: varint => - 0: click_block - 1: click_air - 2: break_block - # BlockPosition is the position of the block that was interacted with. This is only really a correct - # block position if ActionType is not UseItemActionClickAir. - block_position: vec3i - # BlockFace is the face of the block that was interacted with. When clicking the block, it is the face - # clicked. When breaking the block, it is the face that was last being hit until the block broke. - face: varint - # HotBarSlot is the hot bar slot that the player was holding while clicking the block. It should be used - # to ensure that the hot bar slot and held item are correctly synchronised with the server. - hotbar_slot: varint - # HeldItem is the item that was held to interact with the block. The server should check if this item - # is actually present in the HotBarSlot. - held_item: Item - # Position is the position of the player at the time of interaction. For clicking a block, this is the - # position at that time, whereas for breaking the block it is the position at the time of breaking. - player_pos: vec3f - # ClickedPosition is the position that was clicked relative to the block's base coordinate. It can be - # used to find out exactly where a player clicked the block. - click_pos: vec3f - # BlockRuntimeID is the runtime ID of the block that was clicked. It may be used by the server to verify - # that the player's world client-side is synchronised with the server's. - block_runtime_id: varint - -# Actions is a list of actions that took place, that form the inventory transaction together. Each of -# these actions hold one slot in which one item was changed to another. In general, the combination of -# all of these actions results in a balanced inventory transaction. This should be checked to ensure that -# no items are cheated into the inventory. -TransactionActions: []varint - source_type: varint => - 0: container - 1: global - 2: world_interaction - 3: creative - 100: craft_slot - 99999: craft - _: source_type? - if container or craft: - inventory_id: WindowIDVarint - if world_interaction: - flags: varint - if craft or craft_slot: - action: varint - default: void - slot: varint - old_item: Item - new_item: Item - -# The Minecraft bedrock inventory system was refactored, but not all inventory actions use the new packet. -# This data structure holds actions that have not been updated to the new system. -TransactionLegacy: - # LegacyRequestID is an ID that is only non-zero at times when sent by the client. The server should - # always send 0 for this. When this field is not 0, the LegacySetItemSlots slice below will have values - # in it. - # LegacyRequestID ties in with the ItemStackResponse packet. If this field is non-0, the server should - # respond with an ItemStackResponse packet. Some inventory actions such as dropping an item out of the - # hotbar are still one using this packet, and the ItemStackResponse packet needs to tie in with it. - legacy_request_id: zigzag32 - # `legacy_transactions` are only present if the LegacyRequestID is non-zero. These item slots inform the - # server of the slots that were changed during the inventory transaction, and the server should send - # back an ItemStackResponse packet with these slots present in it. (Or false with no slots, if rejected.) - legacy_transactions: legacy_request_id? - if 0: void - default: []varint - container_id: u8 - changed_slots: []varint - slot_id: u8 - -Transaction: - # Old transaction system data - legacy: TransactionLegacy - # What type of transaction took place - transaction_type: varint => - 0: normal - 1: inventory_mismatch - 2: item_use - 3: item_use_on_entity - 4: item_release - # The list of inventory internal actions in this packet, e.g. inventory GUI actions - actions: TransactionActions - # Extra data if an intenal inventory transaction did not take place, e.g. use of an item - transaction_data: transaction_type? - if normal or inventory_mismatch: void - # UseItemTransactionData represents an inventory transaction data object sent when the client uses an item on - # a block. - if item_use: TransactionUseItem - # UseItemOnEntityTransactionData represents an inventory transaction data object sent when the client uses - # an item on an entity. - if item_use_on_entity: - # TargetEntityRuntimeID is the entity runtime ID of the target that was clicked. It is the runtime ID - # that was assigned to it in the AddEntity packet. - entity_runtime_id: varint64 - # ActionType is the type of the UseItemOnEntity inventory transaction. It is one of the action types - # found in the constants above, and specifies the way the player interacted with the entity. - action_type: varint => - 0: interact - 1: attack - # HotBarSlot is the hot bar slot that the player was holding while clicking the entity. It should be used - # to ensure that the hot bar slot and held item are correctly synchronised with the server. - hotbar_slot: zigzag32 - # HeldItem is the item that was held to interact with the entity. The server should check if this item - # is actually present in the HotBarSlot. - held_item: Item - # Position is the position of the player at the time of clicking the entity. - player_pos: vec3f - # ClickedPosition is the position that was clicked relative to the entity's base coordinate. It can be - # used to find out exactly where a player clicked the entity. - click_pos: vec3f - # ReleaseItemTransactionData represents an inventory transaction data object sent when the client releases - # the item it was using, for example when stopping while eating or stopping the charging of a bow. - if item_release: - # ActionType is the type of the ReleaseItem inventory transaction. It is one of the action types found - # in the constants above, and specifies the way the item was released. - # As of 1.13, the ActionType is always 0. This field can be ignored, because releasing food (by consuming - # it) or releasing a bow (to shoot an arrow) is essentially the same. - action_type: varint => - 0: release - 1: consume - # HotBarSlot is the hot bar slot that the player was holding while releasing the item. It should be used - # to ensure that the hot bar slot and held item are correctly synchronised with the server. - hotbar_slot: zigzag32 - # HeldItem is the item that was released. The server should check if this item is actually present in the - # HotBarSlot. - held_item: Item - # HeadPosition is the position of the player's head at the time of releasing the item. This is used - # mainly for purposes such as spawning eating particles at that position. - head_pos: vec3f - -ItemStacks: Item[]varint - -RecipeIngredient: - network_id: zigzag32 - _: network_id? - if 0: void - default: - network_data: zigzag32 - count: zigzag32 - -PotionTypeRecipes: []varint - input_item_id: zigzag32 - input_item_meta: zigzag32 - ingredient_id: zigzag32 - ingredient_meta: zigzag32 - output_item_id: zigzag32 - output_item_meta: zigzag32 - -PotionContainerChangeRecipes: []varint - input_item_id: zigzag32 - ingredient_id: zigzag32 - output_item_id: zigzag32 - -Recipes: []varint - type: zigzag32 => - 0: shapeless #'ENTRY_SHAPELESS', - 1: shaped #'ENTRY_SHAPED', - 2: furnace # 'ENTRY_FURNACE', - # `furnace_with_metadata` is a recipe specifically used for furnace-type crafting stations. It is equal to - # `furnace`, except it has an input item with a specific metadata value, instead of any metadata value. - 3: furnace_with_metadata # 'ENTRY_FURNACE_DATA', // has metadata - 4: multi #'ENTRY_MULTI', //TODO - 5: shulker_box #'ENTRY_SHULKER_BOX', //TODO - 6: shapeless_chemistry #'ENTRY_SHAPELESS_CHEMISTRY', //TODO - 7: shaped_chemistry #'ENTRY_SHAPED_CHEMISTRY', //TODO - recipe: type? - if shapeless or shulker_box or shapeless_chemistry: - recipe_id: string - input: RecipeIngredient[]varint - output: ItemLegacy[]varint - uuid: uuid - block: string - priority: zigzag32 - network_id: varint - if shaped or shaped_chemistry: - recipe_id: string - width: zigzag32 - height: zigzag32 - # 2D input array, size of width*height - input: []$width - _: RecipeIngredient[]$height - output: ItemLegacy[]varint - uuid: uuid - block: string - priority: zigzag32 - network_id: varint - if furnace: - input_id: zigzag32 - output: ItemLegacy - block: string - if furnace_with_metadata: - input_id: zigzag32 - input_meta: zigzag32 - output: ItemLegacy - block: string - if multi: - uuid: uuid - network_id: varint - -SkinImage: - width: li32 - height: li32 - data: ByteArray - -Skin: - skin_id: string - play_fab_id: string - skin_resource_pack: string - skin_data: SkinImage - animations: []li32 - skin_image: SkinImage - animation_type: li32 - animation_frames: lf32 - expression_type: lf32 - cape_data: SkinImage - geometry_data: string - animation_data: string - premium: bool - persona: bool - cape_on_classic: bool - cape_id: string - full_skin_id: string - arm_size: string - skin_color: string - personal_pieces: []li32 - piece_id: string - piece_type: string - pack_id: string - is_default_piece: bool - product_id: string - piece_tint_colors: []li32 - piece_type: string - colors: string[]li32 - -PlayerRecords: - type: u8 => - 0: add - 1: remove - records_count: varint - records: []$records_count - _: type? - if add: - uuid: uuid - entity_unique_id: zigzag64 - username: string - xbox_user_id: string - platform_chat_id: string - build_platform: li32 - skin_data: Skin - is_teacher: bool - is_host: bool - if remove: - uuid: uuid - verified: type ? - if add: bool[]$records_count - -Enchant: - id: u8 - level: u8 - -EnchantOption: - cost: varint - slot_flags: li32 - equip_enchants: Enchant[]varint - held_enchants: Enchant[]varint - self_enchants: Enchant[]varint - name: string - option_id: zigzag32 - -Action: zigzag32 => - 0: start_break - 1: abort_break - 2: stop_break - 3: get_updated_block - 4: drop_item - 5: start_sleeping - 6: stop_sleeping - 7: respawn - 8: jump - 9: start_sprint - 10: stop_sprint - 11: start_sneak - 12: stop_sneak - 13: creative_player_destroy_block - # sent when spawning in a different dimension to tell the server we spawned - 14: dimension_change_ack - 15: start_glide - 16: stop_glide - 17: build_denied - 18: crack_break - 19: change_skin - # no longer used - 20: set_enchatnment_seed - 21: swimming - 22: stop_swimming - 23: start_spin_attack - 24: stop_spin_attack - 25: interact_block - 26: predict_break - 27: continue_break - -# Source and Destination point to the source slot from which Count of the item stack were taken and the -# destination slot to which this item was moved. -StackRequestSlotInfo: - # ContainerID is the ID of the container that the slot was in. - slot_type: ContainerSlotType - # Slot is the index of the slot within the container with the ContainerID above. - slot: u8 - # StackNetworkID is the unique stack ID that the client assumes to be present in this slot. The server - # must check if these IDs match. If they do not match, servers should reject the stack request that the - # action holding this info was in. - stack_id: zigzag32 - -# ItemStackRequest is sent by the client to change item stacks in an inventory. It is essentially a -# replacement of the InventoryTransaction packet added in 1.16 for inventory specific actions, such as moving -# items around or crafting. The InventoryTransaction packet is still used for actions such as placing blocks -# and interacting with entities. -ItemStackRequest: - # RequestID is a unique ID for the request. This ID is used by the server to send a response for this - # specific request in the ItemStackResponse packet. - request_id: varint - actions: []varint - type_id: u8 => - # TakeStackRequestAction is sent by the client to the server to take x amount of items from one slot in a - # container to the cursor. - 0: take - # PlaceStackRequestAction is sent by the client to the server to place x amount of items from one slot into - # another slot, such as when shift clicking an item in the inventory to move it around or when moving an item - # in the cursor into a slot. - 1: place - # SwapStackRequestAction is sent by the client to swap the item in its cursor with an item present in another - # container. The two item stacks swap places. - 2: swap - # DropStackRequestAction is sent by the client when it drops an item out of the inventory when it has its - # inventory opened. This action is not sent when a player drops an item out of the hotbar using the Q button - # (or the equivalent on mobile). The InventoryTransaction packet is still used for that action, regardless of - # whether the item stack network IDs are used or not. - 3: drop - # DestroyStackRequestAction is sent by the client when it destroys an item in creative mode by moving it - # back into the creative inventory. - 4: destroy - # ConsumeStackRequestAction is sent by the client when it uses an item to craft another item. The original - # item is 'consumed'. - 5: consume - # CreateStackRequestAction is sent by the client when an item is created through being used as part of a - # recipe. For example, when milk is used to craft a cake, the buckets are leftover. The buckets are moved to - # the slot sent by the client here. - # Note that before this is sent, an action for consuming all items in the crafting table/grid is sent. Items - # that are not fully consumed when used for a recipe should not be destroyed there, but instead, should be - # turned into their respective resulting items. - 6: create - # LabTableCombineStackRequestAction is sent by the client when it uses a lab table to combine item stacks. - 7: lab_table_combine - # BeaconPaymentStackRequestAction is sent by the client when it submits an item to enable effects from a - # beacon. These items will have been moved into the beacon item slot in advance. - 8: beacon_payment - # MineBlockStackRequestAction is sent by the client when it breaks a block. - 9: mine_block - # CraftRecipeStackRequestAction is sent by the client the moment it begins crafting an item. This is the - # first action sent, before the Consume and Create item stack request actions. - # This action is also sent when an item is enchanted. Enchanting should be treated mostly the same way as - # crafting, where the old item is consumed. - 10: craft_recipe - # AutoCraftRecipeStackRequestAction is sent by the client similarly to the CraftRecipeStackRequestAction. The - # only difference is that the recipe is automatically created and crafted by shift clicking the recipe book. - 11: craft_recipe_auto #recipe book? - # CraftCreativeStackRequestAction is sent by the client when it takes an item out fo the creative inventory. - # The item is thus not really crafted, but instantly created. - 12: craft_creative - # CraftRecipeOptionalStackRequestAction is sent when using an anvil. When this action is sent, the - # CustomNames field in the respective stack request is non-empty and contains the name of the item created - # using the anvil. - 13: optional - # CraftNonImplementedStackRequestAction is an action sent for inventory actions that aren't yet implemented - # in the new system. These include, for example, anvils. - 14: non_implemented #anvils aren't fully implemented yet - # CraftResultsDeprecatedStackRequestAction is an additional, deprecated packet sent by the client after - # crafting. It holds the final results and the amount of times the recipe was crafted. It shouldn't be used. - # This action is also sent when an item is enchanted. Enchanting should be treated mostly the same way as - # crafting, where the old item is consumed. - 15: results_deprecated - _: type_id ? - if take or place: - count: u8 - source: StackRequestSlotInfo - destination: StackRequestSlotInfo - if swap: - # Source and Destination point to the source slot from which Count of the item stack were taken and the - # destination slot to which this item was moved. - source: StackRequestSlotInfo - destination: StackRequestSlotInfo - if drop: - # Count is the count of the item in the source slot that was taken towards the destination slot. - count: u8 - # Source is the source slot from which items were dropped to the ground. - source: StackRequestSlotInfo - # Randomly seems to be set to false in most cases. I'm not entirely sure what this does, but this is what - # vanilla calls this field. - randomly: bool - if destroy or consume: - # Count is the count of the item in the source slot that was destroyed. - count: u8 - # Source is the source slot from which items came that were destroyed by moving them into the creative - # inventory. - source: StackRequestSlotInfo - if create: - # ResultsSlot is the slot in the inventory in which the results of the crafting ingredients are to be - # placed. - result_slot_id: u8 - if beacon_payment: - # PrimaryEffect and SecondaryEffect are the effects that were selected from the beacon. - primary_effect: zigzag32 - secondary_effect: zigzag32 - if mine_block: - # // Unknown1 ... TODO: Find out what this is for - unknown1: zigzag32 - # PredictedDurability is the durability of the item that the client assumes to be present at the time - predicted_durability: zigzag32 - # StackNetworkID is the unique stack ID that the client assumes to be present at the time. The server - # must check if these IDs match. If they do not match, servers should reject the stack request that the - # action holding this info was in. - network_id: zigzag32 - if craft_recipe or craft_recipe_auto: - # RecipeNetworkID is the network ID of the recipe that is about to be crafted. This network ID matches - # one of the recipes sent in the CraftingData packet, where each of the recipes have a RecipeNetworkID as - # of 1.16. - recipe_network_id: varint - if craft_creative: - # The stack ID of the creative item that is being created. This is one of the - # creative item stack IDs sent in the CreativeContent packet. - item_id: varint - if optional: - # For the cartography table, if a certain MULTI recipe is being called, this points to the network ID that was assigned. - recipe_network_id: varint - # Most likely the index in the request's filter strings that this action is using - filtered_string_index: li32 - if non_implemented: void - if results_deprecated: - result_items: ItemLegacy[]varint - times_crafted: u8 - # CustomNames is a list of custom names involved in the request. This is typically filled with one string - # when an anvil is used. - # * Used for the server to determine which strings should be filtered. Used in anvils to verify a renamed item. - custom_names: string[]varint - -# ItemStackResponse is a response to an individual ItemStackRequest. -ItemStackResponses: []varint - # Status specifies if the request with the RequestID below was successful. If this is the case, the - # ContainerInfo below will have information on what slots ended up changing. If not, the container info - # will be empty. - # A non-0 status means an error occurred and will result in the action being reverted. - status: u8 => - 0: ok - 1: error - # RequestID is the unique ID of the request that this response is in reaction to. If rejected, the client - # will undo the actions from the request with this ID. - request_id: varint - _: status ? - if ok: - # ContainerInfo holds information on the containers that had their contents changed as a result of the - # request. - containers: []varint - # ContainerID is the container ID of the container that the slots that follow are in. For the main - # inventory, this value seems to be 0x1b. For the cursor, this value seems to be 0x3a. For the crafting - # grid, this value seems to be 0x0d. - # * actually, this is ContainerSlotType - used by the inventory system that specifies the type of slot - slot_type: ContainerSlotType - # SlotInfo holds information on what item stack should be present in specific slots in the container. - slots: []varint - # Slot and HotbarSlot seem to be the same value every time: The slot that was actually changed. I'm not - # sure if these slots ever differ. - slot: u8 - hotbar_slot: u8 - # Count is the total count of the item stack. This count will be shown client-side after the response is - # sent to the client. - count: u8 - # StackNetworkID is the network ID of the new stack at a specific slot. - item_stack_id: varint - # CustomName is the custom name of the item stack. It is used in relation to text filtering. - custom_name: string - # DurabilityCorrection is the current durability of the item stack. This durability will be shown - # client-side after the response is sent to the client. - durability_correction: zigzag32 - - -ItemComponentList: []varint - # Name is the name of the item, which is a name like 'minecraft:stick'. - name: string - # Data is a map containing the components and properties of the item. - nbt: nbt - -CommandOrigin: - # Origin is one of the values above that specifies the origin of the command. The origin may change, - # depending on what part of the client actually called the command. The command may be issued by a - # websocket server, for example. - type: varint => - 0: player - 1: block - 2: minecart_block - 3: dev_console - 4: test - 5: automation_player - 6: client_automation - 7: dedicated_server - 8: entity - 9: virtual - 10: game_argument - 11: entity_server - 12: precompiled - 13: game_director_entity_server # ? - 14: script - - # UUID is the UUID of the command called. This UUID is a bit odd as it is not specified by the server. It - # is not clear what exactly this UUID is meant to identify, but it is unique for each command called. - uuid: uuid - # RequestID is an ID that identifies the request of the client. The server should send a CommandOrigin - # with the same request ID to ensure it can be matched with the request by the caller of the command. - # This is especially important for websocket servers and it seems that this field is only non-empty for - # these websocket servers. - request_id: string - # PlayerUniqueID is an ID that identifies the player, the same as the one found in the AdventureSettings - # packet. Filling it out with 0 seems to work. - # PlayerUniqueID is only written if Origin is CommandOriginDevConsole or CommandOriginTest. - player_entity_id: type? - if dev_console or test: - player_entity_id: zigzag64 - -# MapTrackedObject is an object on a map that is 'tracked' by the client, such as an entity or a block. This -# object may move, which is handled client-side. -TrackedObject: - # Type is the type of the tracked object. It is either MapObjectTypeEntity or MapObjectTypeBlock. - type: li32 => - 0: entity - 1: block - # EntityUniqueID is the unique ID of the entity, if the tracked object was an entity. It needs not to be - # filled out if Type is not MapObjectTypeEntity. - entity_unique_id: type ? - if entity: zigzag64 - # BlockPosition is the position of the block, if the tracked object was a block. It needs not to be - # filled out if Type is not MapObjectTypeBlock. - block_position: type ? - if block: BlockCoordinates - -# MapDecoration is a fixed decoration on a map: Its position or other properties do not change automatically -# client-side. -MapDecoration: - type: u8 - # Rotation is the rotation of the map decoration. It is byte due to the 16 fixed directions that the - # map decoration may face. - rotation: u8 - # X is the offset on the X axis in pixels of the decoration. - x: u8 - # Y is the offset on the Y axis in pixels of the decoration. - y: u8 - # Label is the name of the map decoration. This name may be of any value. - label: string - # Colour is the colour of the map decoration. Some map decoration types have a specific colour set - # automatically, whereas others may be changed. - color_abgr: varint - - -StructureBlockSettings: - # PaletteName is the name of the palette used in the structure. Currently, it seems that this field is - # always 'default'. - palette_name: string - # IgnoreEntities specifies if the structure should ignore entities or include them. If set to false, - # entities will also show up in the exported structure. - ignore_entities: bool - # IgnoreBlocks specifies if the structure should ignore blocks or include them. If set to false, blocks - # will show up in the exported structure. - ignore_blocks: bool - # Size is the size of the area that is about to be exported. The area exported will start at the - # Position + Offset, and will extend as far as Size specifies. - size: BlockCoordinates - # Offset is the offset position that was set in the structure block. The area exported is offset by this - # position. - # **TODO**: This will be renamed to offset soon - structure_offset: BlockCoordinates - # LastEditingPlayerUniqueID is the unique ID of the player that last edited the structure block that - # these settings concern. - last_editing_player_unique_id: zigzag64 - # Rotation is the rotation that the structure block should obtain. See the constants above for available - # options. - rotation: u8 => - 0: none - 1: 90_deg - 2: 180_deg - 3: 270_deg - # Mirror specifies the way the structure should be mirrored. It is either no mirror at all, mirror on the - # x/z axis or both. - mirror: u8 => - 0: none - 1: x_axis - 2: z_axis - 3: both_axes - animation_mode: u8 => - 0: none - 1: layers - 2: blocks - # How long the duration for this animation is - animation_duration: lf32 - # Integrity is usually 1, but may be set to a number between 0 and 1 to omit blocks randomly, using - # the Seed that follows. - integrity: lf32 - # Seed is the seed used to omit blocks if Integrity is not equal to one. If the Seed is 0, a random - # seed is selected to omit blocks. - seed: lu32 - # Pivot is the pivot around which the structure may be rotated. - pivot: vec3f - -# List of Window IDs. When a new container is opened (container_open), a new sequential Window ID is created. -# Below window IDs are hard-coded and created when the game starts and the server does not -# send a `container_open` for them. -WindowID: i8 => - -100: drop_contents - -24: beacon - -23: trading_output - -22: trading_use_inputs - -21: trading_input_2 - -20: trading_input_1 - -17: enchant_output - -16: enchant_material - -15: enchant_input - -13: anvil_output - -12: anvil_result - -11: anvil_material - -10: container_input - -5: crafting_use_ingredient - -4: crafting_result - -3: crafting_remove_ingredient - -2: crafting_add_ingredient - -1: none - 0: inventory - 1: first - 100: last - 119: offhand - 120: armor - 121: creative - 122: hotbar - 123: fixed_inventory - 124: ui - -WindowIDVarint: varint => - -100: drop_contents - -24: beacon - -23: trading_output - -22: trading_use_inputs - -21: trading_input_2 - -20: trading_input_1 - -17: enchant_output - -16: enchant_material - -15: enchant_input - -13: anvil_output - -12: anvil_result - -11: anvil_material - -10: container_input - -5: crafting_use_ingredient - -4: crafting_result - -3: crafting_remove_ingredient - -2: crafting_add_ingredient - -1: none - 0: inventory - 1: first - 100: last - 119: offhand - 120: armor - 121: creative - 122: hotbar - 123: fixed_inventory - 124: ui - -WindowType: i8 => - -9: none - -1: inventory - 0: container - 1: workbench - 2: furnace - 3: enchantment - 4: brewing_stand - 5: anvil - 6: dispenser - 7: dropper - 8: hopper - 9: cauldron - 10: minecart_chest - 11: minecart_hopper - 12: horse - 13: beacon - 14: structure_editor - 15: trading - 16: command_block - 17: jukebox - 18: armor - 19: hand - 20: compound_creator - 21: element_constructor - 22: material_reducer - 23: lab_table - 24: loom - 25: lectern - 26: grindstone - 27: blast_furnace - 28: smoker - 29: stonecutter - 30: cartography - 31: hud - 32: jigsaw_editor - 33: smithing_table - -# Used in inventory transactions. -ContainerSlotType: u8 => - - anvil_input - - anvil_material - - anvil_result - - smithing_table_input - - smithing_table_material - - smithing_table_result - - armor - - container - - beacon_payment - - brewing_input - - brewing_result - - brewing_fuel - - hotbar_and_inventory - - crafting_input - - crafting_output - - recipe_construction - - recipe_nature - - recipe_items - - recipe_search - - recipe_search_bar - - recipe_equipment - - enchanting_input - - enchanting_lapis - - furnace_fuel - - furnace_ingredient - - furnace_output - - horse_equip - - hotbar - - inventory - - shulker - - trade_ingredient1 - - trade_ingredient2 - - trade_result - - offhand - - compcreate_input - - compcreate_output - - elemconstruct_output - - matreduce_input - - matreduce_output - - labtable_input - - loom_input - - loom_dye - - loom_material - - loom_result - - blast_furnace_ingredient - - smoker_ingredient - - trade2_ingredient1 - - trade2_ingredient2 - - trade2_result - - grindstone_input - - grindstone_additional - - grindstone_result - - stonecutter_input - - stonecutter_result - - cartography_input - - cartography_additional - - cartography_result - - barrel - - cursor - - creative_output - -SoundType: varint => - - ItemUseOn - - Hit - - Step - - Fly - - Jump - - Break - - Place - - HeavyStep - - Gallop - - Fall - - Ambient - - AmbientBaby - - AmbientInWater - - Breathe - - Death - - DeathInWater - - DeathToZombie - - Hurt - - HurtInWater - - Mad - - Boost - - Bow - - SquishBig - - SquishSmall - - FallBig - - FallSmall - - Splash - - Fizz - - Flap - - Swim - - Drink - - Eat - - Takeoff - - Shake - - Plop - - Land - - Saddle - - Armor - - MobArmorStandPlace - - AddChest - - Throw - - Attack - - AttackNoDamage - - AttackStrong - - Warn - - Shear - - Milk - - Thunder - - Explode - - Fire - - Ignite - - Fuse - - Stare - - Spawn - - Shoot - - BreakBlock - - Launch - - Blast - - LargeBlast - - Twinkle - - Remedy - - Infect - - LevelUp - - BowHit - - BulletHit - - ExtinguishFire - - ItemFizz - - ChestOpen - - ChestClosed - - ShulkerBoxOpen - - ShulkerBoxClosed - - EnderChestOpen - - EnderChestClosed - - PowerOn - - PowerOff - - Attach - - Detach - - Deny - - Tripod - - Pop - - DropSlot - - Note - - Thorns - - PistonIn - - PistonOut - - Portal - - Water - - LavaPop - - Lava - - Burp - - BucketFillWater - - BucketFillLava - - BucketEmptyWater - - BucketEmptyLava - - ArmorEquipChain - - ArmorEquipDiamond - - ArmorEquipGeneric - - ArmorEquipGold - - ArmorEquipIron - - ArmorEquipLeather - - ArmorEquipElytra - - Record13 - - RecordCat - - RecordBlocks - - RecordChirp - - RecordFar - - RecordMall - - RecordMellohi - - RecordStal - - RecordStrad - - RecordWard - - Record11 - - RecordWait - - unknown1 - - Flop - - ElderGuardianCurse - - MobWarning - - MobWarningBaby - - Teleport - - ShulkerOpen - - ShulkerClose - - Haggle - - HaggleYes - - HaggleNo - - HaggleIdle - - ChorusGrow - - ChorusDeath - - Glass - - PotionBrewed - - CastSpell - - PrepareAttack - - PrepareSummon - - PrepareWololo - - Fang - - Charge - - CameraTakePicture - - LeashKnotPlace - - LeashKnotBreak - - Growl - - Whine - - Pant - - Purr - - Purreow - - DeathMinVolume - - DeathMidVolume - - unknown2 - - ImitateCaveSpider - - ImitateCreeper - - ImitateElderGuardian - - ImitateEnderDragon - - ImitateEnderman - - unknown3 - - ImitateEvocationIllager - - ImitateGhast - - ImitateHusk - - ImitateIllusionIllager - - ImitateMagmaCube - - ImitatePolarBear - - ImitateShulker - - ImitateSilverfish - - ImitateSkeleton - - ImitateSlime - - ImitateSpider - - ImitateStray - - ImitateVex - - ImitateVindicationIllager - - ImitateWitch - - ImitateWither - - ImitateWitherSkeleton - - ImitateWolf - - ImitateZombie - - ImitateZombiePigman - - ImitateZombieVillager - - BlockEndPortalFrameFill - - BlockEndPortalSpawn - - RandomAnvilUse - - BottleDragonBreath - - PortalTravel - - ItemTridentHit - - ItemTridentReturn - - ItemTridentRiptide1 - - ItemTridentRiptide2 - - ItemTridentRiptide3 - - ItemTridentThrow - - ItemTridentThunder - - ItemTridentHitGround - - Default - - BlockFletchingTableUse - - ElemConstructOpen - - IceBombHit - - BalloonPop - - LtReactionIceBomb - - LtReactionBleach - - LtReactionEPaste - - LtReactionEPaste2 - - LtReactionFertilizer - - LtReactionFireball - - LtReactionMgsalt - - LtReactionMiscfire - - LtReactionFire - - LtReactionMiscexplosion - - LtReactionMiscmystical - - LtReactionMiscmystical2 - - LtReactionProduct - - SparklerUse - - GlowstickUse - - SparklerActive - - ConvertToDrowned - - BucketFillFish - - BucketEmptyFish - - BubbleUp - - BubbleDown - - BubblePop - - BubbleUpInside - - BubbleDownInside - - HurtBaby - - DeathBaby - - StepBaby - - BabySpawn - - Born - - BlockTurtleEggBreak - - BlockTurtleEggCrack - - BlockTurtleEggHatch - - TurtleLayEgg - - BlockTurtleEggAttack - - BeaconActivate - - BeaconAmbient - - BeaconDeactivate - - BeaconPower - - ConduitActivate - - ConduitAmbient - - ConduitAttack - - ConduitDeactivate - - ConduitShort - - Swoop - - BlockBambooSaplingPlace - - PreSneeze - - Sneeze - - AmbientTame - - Scared - - BlockScaffoldingClimb - - CrossbowLoadingStart - - CrossbowLoadingMiddle - - CrossbowLoadingEnd - - CrossbowShoot - - CrossbowQuickChargeStart - - CrossbowQuickChargeMiddle - - CrossbowQuickChargeEnd - - AmbientAggressive - - AmbientWorried - - CantBreed - - ItemShieldBlock - - ItemBookPut - - BlockGrindstoneUse - - BlockBellHit - - BlockCampfireCrackle - - Roar - - Stun - - BlockSweetBerryBushHurt - - BlockSweetBerryBushPick - - UICartographyTableTakeResult - - UIStoneCutterTakeResult - - BlockComposterEmpty - - BlockComposterFill - - BlockComposterFillSuccess - - BlockComposterReady - - BlockBarrelOpen - - BlockBarrelClose - - RaidHorn - - BlockLoomUse - - AmbientRaid - - UICartographyTableUse - - UIStoneCutterUse - - UILoomUse - - SmokerUse - - BlastFurnaceUse - - SmithingTableUse - - Screech - - Sleep - - FurnaceUse - - MooshroomConvert - - MilkSuspiciously - - Celebrate - - JumpPrevent - - AmbientPollinate - - BeeHiveDrip - - BeeHiveEnter - - BeeHiveExit - - BeeHiveWork - - BeeHiveShear - - HoneyBottleDrink - - AmbientCave - - Retreat - - ConvertToZombified - - Admire - - StepLava - - Tempt - - Panic - - Angry - - AmbientWarpedForest - - AmbientSoulsandValley - - AmbientNetherWastes - - AmbientBasaltDeltas - - AmbientCrimsonForest - - RespawnAnchorCharge - - RespawnAnchorDeplete - - RespawnAnchorSetSpawn - - RespawnAnchorAmbient - - SoulEscapeQuiet - - SoulEscapeLoud - - RecordPigstep - - LinkCompassToLodestone - - BlockSmithingTableUse - - EquipNetherite - - AmbientLoopWarpedForest - - AmbientLoopSoulsandValley - - AmbientLoopNetherWastes - - AmbientLoopBasaltDeltas - - AmbientLoopCrimsonForest - - AmbientAdditionWarpedForest - - AmbientAdditionSoulsandValley - - AmbientAdditionNetherWastes - - AmbientAdditionBasaltDeltas - - AmbientAdditionCrimsonForest - - SculkSensorPowerOn - - SculkSensorPowerOff - - BucketFillPowderSnow - - BucketEmptyPowderSnow - - PointedDripstoneCauldronDripWater - - PointedDripstoneCauldronDripLava - - PointedDripstoneDripWater - - PointedDripstoneDripLava - - CaveVinesPickBerries - - BigDripleafTiltDown - - BigDripleafTiltUp - - unknown335 - - unknown336 - - unknown337 - - unknown338 - - copper_wax_on - - copper_wax_off - - scrape - - player_hurt_drown - - player_hurt_on_fire - - player_hurt_freeze - - use_spyglass - - stop_using_spyglass - - amethyst_block_chime - - ambient_screamer - - hurt_screamer - - death_screamer - - milk_screamer - - jump_to_block - - pre_ram - - pre_ram_screamer - - ram_impact - - ram_impact_screamer - - squid_ink_squirt - - glow_squid_ink_squirt - - convert_to_stray - - extinguish_candle - - ambient_candle - - Undefined - -# TODO: remove? -LegacyEntityType: li32 => - 10: chicken - 11: cow - 12: pig - 13: sheep - 14: wolf - 15: villager - 16: mooshroom - 17: squid - 18: rabbit - 19: bat - 20: iron_golem - 21: snow_golem - 22: ocelot - 23: horse - 24: donkey - 25: mule - 26: skeleton_horse - 27: zombie_horse - 28: polar_bear - 29: llama - 30: parrot - 31: dolphin - 32: zombie - 33: creeper - 34: skeleton - 35: spider - 36: zombie_pigman - 37: slime - 38: enderman - 39: silverfish - 40: cave_spider - 41: ghast - 42: magma_cube - 43: blaze - 44: zombie_villager - 45: witch - 46: stray - 47: husk - 48: wither_skeleton - 49: guardian - 50: elder_guardian - 51: npc - 52: wither - 53: ender_dragon - 54: shulker - 55: endermite - 56: agent # LEARN_TO_CODE_MASCOT - 57: vindicator - 58: phantom - 61: armor_stand - 62: tripod_camera - 63: player - 64: item - 65: tnt - 66: falling_block - 67: moving_block - 68: xp_bottle - 69: xp_orb - 70: eye_of_ender_signal - 71: ender_crystal - 72: fireworks_rocket - 73: thrown_trident - 74: turtle - 75: cat - 76: shulker_bullet - 77: fishing_hook - 78: chalkboard - 79: dragon_fireball - 80: arrow - 81: snowball - 82: egg - 83: painting - 84: minecart - 85: fireball - 86: splash_potion - 87: ender_pearl - 88: leash_knot - 89: wither_skull - 90: boat - 91: wither_skull_dangerous - 93: lightning_bolt - 94: small_fireball - 95: area_effect_cloud - 96: hopper_minecart - 97: tnt_minecart - 98: chest_minecart - 100: command_block_minecart - 101: lingering_potion - 102: llama_spit - 103: evocation_fang - 104: evocation_illager - 105: vex - 106: ice_bomb - 107: balloon - 108: pufferfish - 109: salmon - 110: drowned - 111: tropicalfish - 112: cod - 113: panda \ No newline at end of file diff --git a/data/provider.js b/data/provider.js deleted file mode 100644 index 6ad1af7..0000000 --- a/data/provider.js +++ /dev/null @@ -1,44 +0,0 @@ -const { Versions } = require('../src/options') -const { getFiles } = require('../src/datatypes/util') -const { join } = require('path') - -let fileMap = {} - -// Walks all the directories for each of the supported versions in options.js -// then builds a file map for each version -// { 'protocol.json': { '1.16.200': '1.16.200/protocol.json', '1.16.210': '1.16.210/...' } } -function loadVersions () { - for (const version in Versions) { - let files = [] - try { - files = getFiles(join(__dirname, '/', version)) - } catch {} - for (const file of files) { - const rfile = file.replace(join(__dirname, '/', version) + '/', '') - fileMap[rfile] = fileMap[rfile] ?? [] - fileMap[rfile].push([Versions[version], file]) - fileMap[rfile].sort().reverse() - } - } -} - -module.exports = (protocolVersion) => { - fileMap = {} - loadVersions() - return { - // Returns the most recent file based on the specified protocolVersion - // e.g. if `version` is 1.16 and a file for 1.16 doesn't exist, load from 1.15 file - getPath (file) { - if (!fileMap[file]) { - throw Error('Unknown file ' + file) - } - for (const [pver, path] of fileMap[file]) { - if (pver <= protocolVersion) { - // console.debug('for', file, 'returining', path) - return path - } - } - throw Error('unknown file ' + file) - } - } -} diff --git a/examples/server/server.js b/examples/server/server.js index 8e4e74d..7d247a0 100644 --- a/examples/server/server.js +++ b/examples/server/server.js @@ -16,9 +16,9 @@ process.env.DEBUG = 'minecraft-protocol' // packet logging const { Server } = require('bedrock-protocol') const { hasDumps } = require('../../tools/genPacketDumps') -const DataProvider = require('../../data/provider') const { waitFor } = require('../../src/datatypes/util') const { loadWorld } = require('./serverChunks') +const { join } = require('path') async function startServer (version = '1.17.10', ok) { if (!hasDumps(version)) { @@ -30,7 +30,7 @@ async function startServer (version = '1.17.10', ok) { const server = new Server({ host: '0.0.0.0', port, version }) let loop - const getPath = (packetPath) => DataProvider(server.options.protocolVersion).getPath(packetPath) + const getPath = (packetPath) => join(__dirname, `../data/${server.options.version}/${packetPath}`) const get = (packetName) => require(getPath(`sample/packets/${packetName}.json`)) server.listen() diff --git a/package.json b/package.json index 44bdda2..a8aadfb 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,6 @@ "main": "index.js", "scripts": { "build": "cd tools && node compileProtocol.js", - "prepare": "npm run build", "test": "mocha --bail", "pretest": "npm run lint", "lint": "standard", @@ -24,6 +23,7 @@ "debug": "^4.3.1", "jsonwebtoken": "^8.5.1", "jsp-raknet": "^2.1.3", + "minecraft-data": "^2.89.4", "minecraft-folder-path": "^1.2.0", "prismarine-auth": "^1.1.0", "prismarine-nbt": "^1.5.0", diff --git a/src/createClient.js b/src/createClient.js index e79b9a7..4485acb 100644 --- a/src/createClient.js +++ b/src/createClient.js @@ -15,7 +15,7 @@ function createClient (options) { client.ping().then(data => { const advert = advertisement.fromServerName(data) console.log(`Connecting to server ${advert.motd} (${advert.name}), version ${advert.version}`) - client.version = options.version ?? advert.version + client.options.version = options.version ?? advert.version connect(client) }, client) } diff --git a/src/handshake/login.js b/src/handshake/login.js index e4a9be8..4fd0163 100644 --- a/src/handshake/login.js +++ b/src/handshake/login.js @@ -1,15 +1,10 @@ -const fs = require('fs') const JWT = require('jsonwebtoken') -const DataProvider = require('../../data/provider') const { nextUUID } = require('../datatypes/util') const { PUBLIC_KEY } = require('./constants') const algorithm = 'ES384' module.exports = (client, server, options) => { - const dp = DataProvider(options.protocolVersion) - const skinTex = fs.readFileSync(dp.getPath('steveSkin.bin')).toString('base64') - const skinGeom = fs.readFileSync(dp.getPath('steveGeometry.json')).toString('base64') - const skinData = JSON.parse(fs.readFileSync(dp.getPath('steve.json'), 'utf-8')) + const skinData = require('minecraft-data')('bedrock_' + options.version).defaultSkin client.createClientChain = (mojangKey, offline) => { const privateKey = client.ecdhKeyPair.privateKey @@ -60,8 +55,6 @@ module.exports = (client, server, options) => { SelfSignedId: nextUUID(), ServerAddress: `${options.host}:${options.port}`, - SkinData: skinTex, - SkinGeometryData: skinGeom, ThirdPartyName: client.profile.name, ThirdPartyNameOnly: false, diff --git a/src/options.js b/src/options.js index 32d7d93..ac06ac7 100644 --- a/src/options.js +++ b/src/options.js @@ -1,15 +1,11 @@ +const mcData = require('minecraft-data') + // Minimum supported version (< will be kicked) const MIN_VERSION = '1.16.201' -// Currently supported verson +// Currently supported verson. Note, clients with newer versions can still connect as long as data is in minecraft-data const CURRENT_VERSION = '1.17.10' -const Versions = { - '1.17.10': 448, - '1.17.0': 440, - '1.16.220': 431, - '1.16.210': 428, - '1.16.201': 422 -} +const Versions = Object.fromEntries(mcData.versions.bedrock.filter(e => e.releaseType === 'release').map(e => [e.minecraftVersion, e.version])) const defaultOptions = { // https://minecraft.gamepedia.com/Protocol_version#Bedrock_Edition_2 diff --git a/src/transforms/serializer.js b/src/transforms/serializer.js index 4a6102f..7311698 100644 --- a/src/transforms/serializer.js +++ b/src/transforms/serializer.js @@ -27,10 +27,13 @@ class Parser extends FullPacketParser { // Compiles the ProtoDef schema at runtime function createProtocol (version) { - const protocol = require(join(__dirname, `../../data/${version}/protocol.json`)).types + // Try and load from .js if available + try { require(`../../data/${version}/size.js`); return getProtocol(version) } catch {} + + const protocol = require('minecraft-data')('bedrock_' + version).protocol const compiler = new ProtoDefCompiler() - compiler.addTypesToCompile(protocol) - compiler.addTypes(require(join(__dirname, '../datatypes/compiler-minecraft'))) + compiler.addTypesToCompile(protocol.types) + compiler.addTypes(require('../datatypes/compiler-minecraft')) compiler.addTypes(require('prismarine-nbt/compiler-zigzag')) const compiledProto = compiler.compileProtoDefSync() @@ -54,17 +57,18 @@ function getProtocol (version) { } function createSerializer (version) { - const proto = getProtocol(version) + const proto = createProtocol(version) return new Serializer(proto, 'mcpe_packet') } function createDeserializer (version) { - const proto = getProtocol(version) + const proto = createProtocol(version) return new Parser(proto, 'mcpe_packet') } module.exports = { - createDeserializer: createDeserializer, - createSerializer: createSerializer, - createProtocol: createProtocol + createDeserializer, + createSerializer, + createProtocol, + getProtocol } diff --git a/test/internal.js b/test/internal.js index fd318c4..c03a498 100644 --- a/test/internal.js +++ b/test/internal.js @@ -1,8 +1,8 @@ const { Server, Client } = require('../') const { dumpPackets } = require('../tools/genPacketDumps') -const DataProvider = require('../data/provider') const { ping } = require('../src/createClient') const { CURRENT_VERSION } = require('../src/options') +const { join } = require('path') // First we need to dump some packets that a vanilla server would send a vanilla // client. Then we can replay those back in our custom server. @@ -17,7 +17,7 @@ async function startTest (version = CURRENT_VERSION, ok) { const server = new Server({ host: '0.0.0.0', port, version, offline: true }) function getPath (packetPath) { - return DataProvider(server.options.protocolVersion).getPath(packetPath) + return join(__dirname, `../data/${server.options.version}/${packetPath}`) } function get (packetPath) { diff --git a/tools/compileProtocol.js b/tools/compileProtocol.js index bed7b2c..079dca3 100644 --- a/tools/compileProtocol.js +++ b/tools/compileProtocol.js @@ -1,56 +1,19 @@ /** - * This is a utility script that converts the YAML here into ProtoDef schema code and (soon) docs/typescript definitions. - * It also pre-compiles JS code from the schema for easier development. - * + * Pre-compiles JS code from the schema for easier development. * You can run this with `npm run build` - * */ const fs = require('fs') const { ProtoDefCompiler } = require('protodef').Compiler -const { Versions } = require('../src/options') +const { convert } = require('minecraft-data/minecraft-data/tools/js/compileProtocol') +const mcData = require('minecraft-data') const { join } = require('path') - -function getJSON (path) { - return JSON.parse(fs.readFileSync(path, 'utf-8')) -} - -// Parse the YML files and turn to JSON -function genProtoSchema () { - const { parse, compile } = require('protodef-yaml/compiler') - - // Create the packet_map.yml from proto.yml - const parsed = parse('./proto.yml') - const version = parsed['!version'] - const packets = [] - for (const key in parsed) { - if (key.startsWith('%container')) { - const [, name] = key.split(',') - if (name.startsWith('packet_')) { - const children = parsed[key] - const packetName = name.replace('packet_', '') - const packetID = children['!id'] - packets.push([packetID, packetName, name]) - } - } - } - let l1 = '' - let l2 = '' - for (const [id, name, fname] of packets) { - l1 += ` 0x${id.toString(16).padStart(2, '0')}: ${name}\n` - l2 += ` if ${name}: ${fname}\n` - } - // TODO: skip creating packet_map.yml and just generate the ProtoDef map JSON directly - const t = `#Auto-generated from proto.yml, do not modify\n!import: types.yaml\nmcpe_packet:\n name: varint =>\n${l1}\n params: name ?\n${l2}` - fs.writeFileSync('./packet_map.yml', t) - - compile('./proto.yml', 'proto.json') - return version -} +// Filter versions we support +const versions = mcData.versions.bedrock.filter(e => e.releaseType === 'release').map(e => e.minecraftVersion) // Compile the ProtoDef JSON into JS -function createProtocol () { +function createProtocol (version) { const compiler = new ProtoDefCompiler() - const protocol = getJSON('./protocol.json').types + const protocol = mcData('bedrock_' + version).protocol.types compiler.addTypes(require('../src/datatypes/compiler-minecraft')) compiler.addTypes(require('prismarine-nbt/compiler-zigzag')) compiler.addTypesToCompile(protocol) @@ -63,27 +26,19 @@ function createProtocol () { return compiledProto } -function copyLatest () { - process.chdir(join(__dirname, '/../data/latest')) - const version = genProtoSchema() - try { fs.mkdirSync(`../${version}`) } catch {} - fs.writeFileSync(`../${version}/protocol.json`, JSON.stringify({ types: getJSON('./proto.json') }, null, 2)) - fs.unlinkSync('./proto.json') // remove temp file - fs.unlinkSync('./packet_map.yml') // remove temp file - return version -} - function main (ver = 'latest') { - if (ver === 'latest') ver = copyLatest() - process.chdir(join(__dirname, '/../data/', ver)) + // Put the .js files into the data/ dir, we also use the data dir when dumping packets for tests + const dir = join(__dirname, '/../data/', ver) + if (!fs.existsSync(dir)) fs.mkdirSync(dir, { recursive: true }) + process.chdir(dir) console.log('Generating JS...', ver) createProtocol(ver) } // If no argument, build everything if (!process.argv[2]) { - copyLatest() - for (const version in Versions) { + convert('latest') + for (const version of versions) { main(version) } } else { // build the specified version From 72a4743993cedaf39fcb3ee0eadcd314cda5212c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Sep 2021 21:22:07 +0200 Subject: [PATCH 040/273] Bump mocha from 8.4.0 to 9.1.2 (#138) Bumps [mocha](https://github.com/mochajs/mocha) from 8.4.0 to 9.1.2. - [Release notes](https://github.com/mochajs/mocha/releases) - [Changelog](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md) - [Commits](https://github.com/mochajs/mocha/compare/v8.4.0...v9.1.2) --- updated-dependencies: - dependency-name: mocha dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a8aadfb..bb886ab 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "bedrock-protocol": "file:.", "bedrock-provider": "^1.0.0", "leveldb-zlib": "^1.0.1", - "mocha": "^8.3.2", + "mocha": "^9.1.2", "protodef-yaml": "^1.1.0", "standard": "^16.0.3" }, From 10feeea4cafc0fd09cdd31266ab35bb8ac557211 Mon Sep 17 00:00:00 2001 From: extremeheat Date: Mon, 4 Oct 2021 13:27:38 -0400 Subject: [PATCH 041/273] Release 3.6.0 (#141) --- HISTORY.md | 4 ++++ README.md | 2 +- index.d.ts | 2 +- package.json | 2 +- src/options.js | 2 +- 5 files changed, 8 insertions(+), 4 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index ac57572..d63898e 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,3 +1,7 @@ +## 3.6.0 +* 1.17.30 support +* minecraft-data used for protocol data + ## 3.5.1 * Fix 1.17.10 npc packet serialization (#119) diff --git a/README.md b/README.md index a4ca346..7507132 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Minecraft Bedrock Edition (aka MCPE) protocol library, supporting authentication ## Features - - Supports Minecraft Bedrock version 1.16.201, 1.16.210, 1.16.220, 1.17.0, 1.17.10 + - Supports Minecraft Bedrock version 1.16.201, 1.16.210, 1.16.220, 1.17.0, 1.17.10, 1.17.30 - Parse and serialize packets as JavaScript objects - Automatically respond to keep-alive packets - [Proxy and mitm connections](docs/API.md#proxy-docs) diff --git a/index.d.ts b/index.d.ts index 3e9d801..e3eeb55 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,7 +1,7 @@ import EventEmitter from "events" declare module "bedrock-protocol" { - type Version = '1.17.10' | '1.17.0' | '1.16.220' | '1.16.210' | '1.16.201' + type Version = '1.17.32' | '1.17.30' | '1.17.11' | '1.17.10' | '1.17.0' | '1.16.220' | '1.16.210' | '1.16.201' enum title { MinecraftNintendoSwitch, MinecraftJava } diff --git a/package.json b/package.json index bb886ab..003ee35 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bedrock-protocol", - "version": "3.5.1", + "version": "3.6.0", "description": "Minecraft Bedrock Edition protocol library", "main": "index.js", "scripts": { diff --git a/src/options.js b/src/options.js index ac06ac7..776293b 100644 --- a/src/options.js +++ b/src/options.js @@ -3,7 +3,7 @@ const mcData = require('minecraft-data') // Minimum supported version (< will be kicked) const MIN_VERSION = '1.16.201' // Currently supported verson. Note, clients with newer versions can still connect as long as data is in minecraft-data -const CURRENT_VERSION = '1.17.10' +const CURRENT_VERSION = '1.17.30' const Versions = Object.fromEntries(mcData.versions.bedrock.filter(e => e.releaseType === 'release').map(e => [e.minecraftVersion, e.version])) From ac2e9852bef29f21a81d6a7856fb5a70d4b1808a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=BF=B7=E6=B8=A1?= Date: Tue, 5 Oct 2021 07:20:12 +0800 Subject: [PATCH 042/273] fix `spawn` event (#139) --- docs/API.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/API.md b/docs/API.md index 35db115..5062fb6 100644 --- a/docs/API.md +++ b/docs/API.md @@ -104,7 +104,7 @@ const client = bedrock.createClient({ client.on('join', client => console.log('Player has joined!')) // The 'spawn' event is emitted. The chunks have been sent and all is well. -client.on('join', client => console.log('Player has spawned!')) +client.on('spawn', client => console.log('Player has spawned!')) // We can listen for text packets. See proto.yml for documentation. client.on('text', (packet) => { From adfa248e2d67eaf24690ba9cf39ab73429f147b2 Mon Sep 17 00:00:00 2001 From: extremeheat Date: Fri, 8 Oct 2021 05:56:10 -0400 Subject: [PATCH 043/273] Default createClient to latest version, fix server motd version (#144) * Default createClient to latest version, fix server motd version * Update vanilla.js --- docs/API.md | 2 +- package.json | 2 +- src/createClient.js | 9 +++++---- src/server.js | 2 +- src/server/advertisement.js | 7 +++---- test/internal.js | 2 +- test/vanilla.js | 2 -- tools/genPacketDumps.js | 1 + 8 files changed, 13 insertions(+), 14 deletions(-) diff --git a/docs/API.md b/docs/API.md index 5062fb6..3f9baa9 100644 --- a/docs/API.md +++ b/docs/API.md @@ -61,7 +61,7 @@ const server = bedrock.createServer({ port: 19132, // optional, port to bind to, default 19132 offline: false, // default false. verify connections with XBL motd: { - name: 'Funtime Server', // Top level message shown in server list + motd: 'Funtime Server', // Top level message shown in server list levelName: 'Wonderland' // Sub-level header } }) diff --git a/package.json b/package.json index 003ee35..c9b3b6a 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "debug": "^4.3.1", "jsonwebtoken": "^8.5.1", "jsp-raknet": "^2.1.3", - "minecraft-data": "^2.89.4", + "minecraft-data": "^2.95.0", "minecraft-folder-path": "^1.2.0", "prismarine-auth": "^1.1.0", "prismarine-nbt": "^1.5.0", diff --git a/src/createClient.js b/src/createClient.js index 4485acb..a7e9fd4 100644 --- a/src/createClient.js +++ b/src/createClient.js @@ -1,8 +1,9 @@ const { Client } = require('./client') const { RakClient } = require('./rak')(true) +const { Versions, CURRENT_VERSION } = require('./options') +const { sleep } = require('./datatypes/util') const assert = require('assert') const advertisement = require('./server/advertisement') -const { sleep } = require('./datatypes/util') /** @param {{ version?: number, host: string, port?: number, connectTimeout?: number, skipPing?: boolean }} options */ function createClient (options) { @@ -13,9 +14,9 @@ function createClient (options) { connect(client) } else { // Try to ping client.ping().then(data => { - const advert = advertisement.fromServerName(data) - console.log(`Connecting to server ${advert.motd} (${advert.name}), version ${advert.version}`) - client.options.version = options.version ?? advert.version + const ad = advertisement.fromServerName(data) + client.options.version = options.version ?? (Versions[ad.version] ? ad.version : CURRENT_VERSION) + console.log(`Connecting to server ${ad.motd} (${ad.name}), version ${ad.version}`, client.options.version !== ad.version ? ` (as ${client.options.version})` : undefined) connect(client) }, client) } diff --git a/src/server.js b/src/server.js index e13ca92..3a7684e 100644 --- a/src/server.js +++ b/src/server.js @@ -16,7 +16,7 @@ class Server extends EventEmitter { this.serializer = createSerializer(this.options.version) this.deserializer = createDeserializer(this.options.version) - this.advertisement = new ServerAdvertisement(this.options.motd) + this.advertisement = new ServerAdvertisement(this.options.motd, this.options.version) this.advertisement.playersMax = options.maxPlayers ?? 3 /** @type {Object} */ this.clients = {} diff --git a/src/server/advertisement.js b/src/server/advertisement.js index 3a2fee8..3e069db 100644 --- a/src/server/advertisement.js +++ b/src/server/advertisement.js @@ -3,16 +3,15 @@ const { Versions, CURRENT_VERSION } = require('../options') class ServerAdvertisement { motd = 'Bedrock Protocol Server' levelName = 'bedrock-protocol' - protocol = Versions[CURRENT_VERSION] - version = CURRENT_VERSION playersOnline = 0 playersMax = 5 - gamemode = 'Creative' serverId = '0' - constructor (obj, version) { + constructor (obj, version = CURRENT_VERSION) { if (obj?.name) obj.motd = obj.name + this.protocol = Versions[version] + this.version = version Object.assign(this, obj) } diff --git a/test/internal.js b/test/internal.js index c03a498..de1c95f 100644 --- a/test/internal.js +++ b/test/internal.js @@ -205,5 +205,5 @@ async function timedTest (version, timeout = 1000 * 220) { console.info('✔ ok') } -if (!module.parent) timedTest() +// if (!module.parent) timedTest() module.exports = { startTest, timedTest, requestChunks } diff --git a/test/vanilla.js b/test/vanilla.js index 13c6069..5d20b89 100644 --- a/test/vanilla.js +++ b/test/vanilla.js @@ -3,7 +3,6 @@ const vanillaServer = require('../tools/startVanillaServer') const { Client } = require('../src/client') const { waitFor } = require('../src/datatypes/util') const { ChunkColumn, Version } = require('bedrock-provider') -const { CURRENT_VERSION } = require('../src/options') async function test (version) { // Start the server, wait for it to accept clients, throws on timeout @@ -67,5 +66,4 @@ async function test (version) { clearInterval(loop) } -if (!module.parent) test(CURRENT_VERSION) module.exports = { clientTest: test } diff --git a/tools/genPacketDumps.js b/tools/genPacketDumps.js index a0a676f..a6741ea 100644 --- a/tools/genPacketDumps.js +++ b/tools/genPacketDumps.js @@ -21,6 +21,7 @@ async function dump (version, force = true) { const random = ((Math.random() * 100) | 0) const port = 19130 + random + console.log('Starting dump server', version) const handle = await vanillaServer.startServerAndWait(version || CURRENT_VERSION, 1000 * 120, { 'server-port': port }) console.log('Started dump server', version) From 8569b9823fec36a0d8ccca628e47444c9b89e3c1 Mon Sep 17 00:00:00 2001 From: extremeheat Date: Fri, 8 Oct 2021 16:13:34 -0400 Subject: [PATCH 044/273] Release 3.6.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c9b3b6a..278ca29 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bedrock-protocol", - "version": "3.6.0", + "version": "3.6.1", "description": "Minecraft Bedrock Edition protocol library", "main": "index.js", "scripts": { From 75bf22d619f017a3b030440386ff01e482dc1a36 Mon Sep 17 00:00:00 2001 From: extremeheat Date: Sun, 7 Nov 2021 06:47:45 -0500 Subject: [PATCH 045/273] 1.17.40 update (#150) * 1.17.40 * Update mcdata to 2.96.0 Co-authored-by: Romain Beaumont --- README.md | 2 +- index.d.ts | 2 +- package.json | 2 +- src/options.js | 2 +- test/internal.js | 3 ++- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 7507132..a735626 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Minecraft Bedrock Edition (aka MCPE) protocol library, supporting authentication ## Features - - Supports Minecraft Bedrock version 1.16.201, 1.16.210, 1.16.220, 1.17.0, 1.17.10, 1.17.30 + - Supports Minecraft Bedrock version 1.16.201, 1.16.210, 1.16.220, 1.17.0, 1.17.10, 1.17.30, 1.17.40 - Parse and serialize packets as JavaScript objects - Automatically respond to keep-alive packets - [Proxy and mitm connections](docs/API.md#proxy-docs) diff --git a/index.d.ts b/index.d.ts index e3eeb55..7c2360e 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,7 +1,7 @@ import EventEmitter from "events" declare module "bedrock-protocol" { - type Version = '1.17.32' | '1.17.30' | '1.17.11' | '1.17.10' | '1.17.0' | '1.16.220' | '1.16.210' | '1.16.201' + type Version = '1.17.41' | '1.17.40' | '1.17.34' | '1.17.30' | '1.17.11' | '1.17.10' | '1.17.0' | '1.16.220' | '1.16.210' | '1.16.201' enum title { MinecraftNintendoSwitch, MinecraftJava } diff --git a/package.json b/package.json index 278ca29..90ab9e7 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "debug": "^4.3.1", "jsonwebtoken": "^8.5.1", "jsp-raknet": "^2.1.3", - "minecraft-data": "^2.95.0", + "minecraft-data": "^2.96.0", "minecraft-folder-path": "^1.2.0", "prismarine-auth": "^1.1.0", "prismarine-nbt": "^1.5.0", diff --git a/src/options.js b/src/options.js index 776293b..d34c302 100644 --- a/src/options.js +++ b/src/options.js @@ -3,7 +3,7 @@ const mcData = require('minecraft-data') // Minimum supported version (< will be kicked) const MIN_VERSION = '1.16.201' // Currently supported verson. Note, clients with newer versions can still connect as long as data is in minecraft-data -const CURRENT_VERSION = '1.17.30' +const CURRENT_VERSION = '1.17.40' const Versions = Object.fromEntries(mcData.versions.bedrock.filter(e => e.releaseType === 'release').map(e => [e.minecraftVersion, e.version])) diff --git a/test/internal.js b/test/internal.js index de1c95f..7617d28 100644 --- a/test/internal.js +++ b/test/internal.js @@ -198,7 +198,8 @@ async function requestChunks (x, z, radius) { async function timedTest (version, timeout = 1000 * 220) { await waitFor((res) => { - startTest(version, res) + // mocha eats up stack traces... + startTest(version, res).catch(console.error) }, timeout, () => { throw Error('timed out') }) From 389a68b98f26926d9f9a54886870fddb50ac90be Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 7 Nov 2021 12:48:01 +0100 Subject: [PATCH 046/273] Bump prismarine-nbt from 1.6.0 to 2.0.0 (#148) Bumps [prismarine-nbt](https://github.com/prismarinejs/prismarine-nbt) from 1.6.0 to 2.0.0. - [Release notes](https://github.com/prismarinejs/prismarine-nbt/releases) - [Changelog](https://github.com/PrismarineJS/prismarine-nbt/blob/master/HISTORY.md) - [Commits](https://github.com/prismarinejs/prismarine-nbt/compare/1.6.0...2.0.0) --- updated-dependencies: - dependency-name: prismarine-nbt dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 90ab9e7..758fcb3 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "minecraft-data": "^2.96.0", "minecraft-folder-path": "^1.2.0", "prismarine-auth": "^1.1.0", - "prismarine-nbt": "^1.5.0", + "prismarine-nbt": "^2.0.0", "protodef": "^1.14.0", "uuid-1345": "^1.0.2" }, From 214c34c44b5f784d61f823831c1622d5a08a37d3 Mon Sep 17 00:00:00 2001 From: Romain Beaumont Date: Sun, 7 Nov 2021 12:55:11 +0100 Subject: [PATCH 047/273] Release 3.7.0 --- HISTORY.md | 3 +++ package.json | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/HISTORY.md b/HISTORY.md index d63898e..eaca46e 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,3 +1,6 @@ +## 3.7.0 +* 1.7.40 support + ## 3.6.0 * 1.17.30 support * minecraft-data used for protocol data diff --git a/package.json b/package.json index 758fcb3..0b5bd48 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bedrock-protocol", - "version": "3.6.1", + "version": "3.7.0", "description": "Minecraft Bedrock Edition protocol library", "main": "index.js", "scripts": { From 1b422ac4ceabdccc37e228c55b3ec2e5efc03c19 Mon Sep 17 00:00:00 2001 From: extremeheat Date: Fri, 12 Nov 2021 16:14:15 -0500 Subject: [PATCH 048/273] Update prismarine-auth usage (#153) --- README.md | 4 +--- docs/API.md | 2 ++ examples/client/client.js | 4 +--- examples/createRelay.js | 3 +-- src/client/auth.js | 8 ++++++-- 5 files changed, 11 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index a735626..4d4f50a 100644 --- a/README.md +++ b/README.md @@ -46,9 +46,7 @@ const client = bedrock.createClient({ host: 'localhost', // optional port: 19132, // optional, default 19132 username: 'Notch', // the username you want to join as, optional if online mode - offline: true, // optional, default false. if true, do not login with Xbox Live. You will not be asked to sign-in if set to true. - // Optional for some servers which verify the title ID: - // authTitle: bedrock.title.MinecraftNintendoSwitch + offline: true // optional, default false. if true, do not login with Xbox Live. You will not be asked to sign-in if set to true. }) client.on('text', (packet) => { // Listen for chat messages and echo them back. diff --git a/docs/API.md b/docs/API.md index 3f9baa9..8aadf2e 100644 --- a/docs/API.md +++ b/docs/API.md @@ -20,6 +20,8 @@ Returns a `Client` instance and connects to the server. | autoInitPlayer | *optional* | default to true, If we should send SetPlayerInitialized to the server after getting play_status spawn. | | skipPing | *optional* | Whether pinging the server to check its version should be skipped. | | useNativeRaknet | *optional* | Whether to use the C++ version of RakNet. Set to false to use JS. | +| authTitle | *optional* | The client ID to sign in as, defaults to Minecraft for Nintendo Switch. Set false to sign in through Azure. See prismarine-auth | +| deviceType | *optional* | The device type to sign in as, defaults to "Nintendo". See prismarine-auth | ## be.createServer(options) : Server diff --git a/examples/client/client.js b/examples/client/client.js index 09a29b5..c10710a 100644 --- a/examples/client/client.js +++ b/examples/client/client.js @@ -4,9 +4,7 @@ const client = bedrock.createClient({ host: 'localhost', // optional port: 19132, // optional, default 19132 username: 'Notch', // the username you want to join as, optional if online mode - offline: false, // optional, default false. if true, do not login with Xbox Live. You will not be asked to sign-in if set to true. - // Optional for some servers which verify the title ID: - // authTitle: bedrock.title.MinecraftNintendoSwitch + offline: false // optional, default false. if true, do not login with Xbox Live. You will not be asked to sign-in if set to true. }) client.on('text', (packet) => { // Listen for chat messages and echo them back. diff --git a/examples/createRelay.js b/examples/createRelay.js index f99a0ee..8b910ef 100644 --- a/examples/createRelay.js +++ b/examples/createRelay.js @@ -1,4 +1,4 @@ -const { Relay, title } = require('bedrock-protocol') +const { Relay } = require('bedrock-protocol') function createRelay () { console.log('Creating relay') @@ -8,7 +8,6 @@ function createRelay () { host: '0.0.0.0', port: 19130, offline: false, - authTitle: title.MinecraftNintendoSwitch, /* Where to send upstream packets to */ destination: { host: '127.0.0.1', diff --git a/src/client/auth.js b/src/client/auth.js index 98c334d..62f2a2f 100644 --- a/src/client/auth.js +++ b/src/client/auth.js @@ -16,12 +16,16 @@ async function authenticate (client, options) { if (!options.profilesFolder) { options.profilesFolder = path.join(minecraftFolderPath, 'nmp-cache') } - if (!options.authTitle) { + if (options.authTitle === undefined) { options.authTitle = Titles.MinecraftNintendoSwitch + options.deviceType = 'Nintendo' } try { const Authflow = new PrismarineAuth(options.username, options.profilesFolder, options, options.onMsaCode) - const chains = await Authflow.getMinecraftBedrockToken(client.clientX509) + const chains = await Authflow.getMinecraftBedrockToken(client.clientX509).catch(e => { + if (options.password) console.warn('Sign in failed, try removing the password field') + throw e + }) debug('chains', chains) From b0856e0cc7d15fd51a72e0691689bab4987c0bce Mon Sep 17 00:00:00 2001 From: extremeheat Date: Sun, 28 Nov 2021 00:57:41 -0500 Subject: [PATCH 049/273] update docs and error handling (#155) --- docs/API.md | 11 +++++++++++ index.d.ts | 5 +++++ src/client.js | 9 +++++++++ src/handshake/keyExchange.js | 2 +- src/rakWorker.js | 2 +- src/server.js | 3 ++- src/serverPlayer.js | 3 +-- src/transforms/encryption.js | 6 ++++-- 8 files changed, 34 insertions(+), 7 deletions(-) diff --git a/docs/API.md b/docs/API.md index 8aadf2e..8900876 100644 --- a/docs/API.md +++ b/docs/API.md @@ -23,6 +23,14 @@ Returns a `Client` instance and connects to the server. | authTitle | *optional* | The client ID to sign in as, defaults to Minecraft for Nintendo Switch. Set false to sign in through Azure. See prismarine-auth | | deviceType | *optional* | The device type to sign in as, defaults to "Nintendo". See prismarine-auth | +The following events are emitted by the client: +* 'status' - When the client's login sequence status has changed +* 'join' - When the client has joined the server after authenticating +* 'spawn' - When the client has spawned into the game world, as it is getting chunks +* 'kick' - The server has kicked the client +* 'close' - The server has closed the connection +* 'error' - An recoverable exception has happened. Not catching will throw an exception + ## be.createServer(options) : Server Returns a `Server` instance and starts listening for clients. All clients will be @@ -88,6 +96,9 @@ Order of server client event emissions: * 'join' - the client is ready to recieve game packets after successful server-client handshake/encryption * 'spawn' - emitted after the client lets the server know that it has successfully spawned + +'error' event is emitted when a catchable exception happens with a client (for example receiving a bad encrypted packet). + ## Client docs You can create a server as such: diff --git a/index.d.ts b/index.d.ts index 7c2360e..a6c71a0 100644 --- a/index.d.ts +++ b/index.d.ts @@ -92,6 +92,11 @@ declare module "bedrock-protocol" { * Close the connection, leave the server. */ close() + + /** + * Send a disconnect packet and close the connection + */ + disconnect() } /** diff --git a/src/client.js b/src/client.js index 3e4c9b6..5909667 100644 --- a/src/client.js +++ b/src/client.js @@ -141,6 +141,15 @@ class Client extends Connection { } } + disconnect (reason = 'Client leaving', hide = false) { + if (this.status === ClientStatus.Disconnected) return + this.write('disconnect', { + hide_disconnect_screen: hide, + message: reason + }) + this.close(reason) + } + close () { if (this.status !== ClientStatus.Disconnected) { this.emit('close') // Emit close once diff --git a/src/handshake/keyExchange.js b/src/handshake/keyExchange.js index a732dc8..8a90041 100644 --- a/src/handshake/keyExchange.js +++ b/src/handshake/keyExchange.js @@ -52,7 +52,7 @@ function KeyExchange (client, server, options) { debug('[encrypt] Starting serverbound encryption', token) const jwt = token?.token if (!jwt) { - throw Error('Server did not return a valid JWT, cannot start encryption!') + throw Error('Server did not return a valid JWT, cannot start encryption') } // No verification here, not needed diff --git a/src/rakWorker.js b/src/rakWorker.js index 06cd736..b67af0b 100644 --- a/src/rakWorker.js +++ b/src/rakWorker.js @@ -40,7 +40,7 @@ function main () { }) raknet.on('raw', (buffer, inetAddr) => { - console.log('Raw packet', buffer, inetAddr) + debug('Raw packet', buffer, inetAddr) }) } else if (evt.type === 'queueEncapsulated') { const sendPacket = new EncapsulatedPacket() diff --git a/src/server.js b/src/server.js index 3a7684e..3192889 100644 --- a/src/server.js +++ b/src/server.js @@ -54,7 +54,8 @@ class Server extends EventEmitter { onEncapsulated = (buffer, address) => { const client = this.clients[address] if (!client) { - throw new Error(`packet from unknown inet addr: ${address}`) + this.emit('error', new Error(`packet from unknown inet addr: ${address}`)) + return } client.handle(buffer) } diff --git a/src/serverPlayer.js b/src/serverPlayer.js index 52693b8..967a9f8 100644 --- a/src/serverPlayer.js +++ b/src/serverPlayer.js @@ -56,8 +56,7 @@ class Player extends Connection { try { var { key, userData, skinData } = this.decodeLoginJWT(authChain.chain, skinChain) // eslint-disable-line } catch (e) { - console.error(e) - console.debug(authChain.chain, skinChain) + debug(this.address, e) this.disconnect('Server authentication error') return } diff --git a/src/transforms/encryption.js b/src/transforms/encryption.js index c878c8d..31f9ae2 100644 --- a/src/transforms/encryption.js +++ b/src/transforms/encryption.js @@ -66,8 +66,10 @@ function createDecryptor (client, iv) { const computedCheckSum = computeCheckSum(packet, client.receiveCounter, client.secretKeyBytes) client.receiveCounter++ - if (Buffer.compare(checksum, computedCheckSum) !== 0) { - throw Error(`Checksum mismatch ${checksum.toString('hex')} != ${computedCheckSum.toString('hex')}`) + if (!checksum.equals(computedCheckSum)) { + client.emit('error', Error(`Checksum mismatch ${checksum.toString('hex')} != ${computedCheckSum.toString('hex')}`)) + client.disconnect('disconnectionScreen.badPacket') + return } Zlib.inflateRaw(chunk, { chunkSize: 1024 * 1024 * 2 }, (err, buffer) => { From 1a1fa618e4b430a5bafe4288843018014dea3a90 Mon Sep 17 00:00:00 2001 From: extremeheat Date: Sat, 4 Dec 2021 01:10:47 -0500 Subject: [PATCH 050/273] 1.18 update (#157) --- README.md | 2 +- src/options.js | 4 ++-- test/internal.js | 2 +- tools/startVanillaServer.js | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 4d4f50a..4efd7ea 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Minecraft Bedrock Edition (aka MCPE) protocol library, supporting authentication ## Features - - Supports Minecraft Bedrock version 1.16.201, 1.16.210, 1.16.220, 1.17.0, 1.17.10, 1.17.30, 1.17.40 + - Supports Minecraft Bedrock version 1.16.201, 1.16.210, 1.16.220, 1.17.0, 1.17.10, 1.17.30, 1.17.40, 1.18.0 - Parse and serialize packets as JavaScript objects - Automatically respond to keep-alive packets - [Proxy and mitm connections](docs/API.md#proxy-docs) diff --git a/src/options.js b/src/options.js index d34c302..78b1eaa 100644 --- a/src/options.js +++ b/src/options.js @@ -3,9 +3,9 @@ const mcData = require('minecraft-data') // Minimum supported version (< will be kicked) const MIN_VERSION = '1.16.201' // Currently supported verson. Note, clients with newer versions can still connect as long as data is in minecraft-data -const CURRENT_VERSION = '1.17.40' +const CURRENT_VERSION = '1.18.0' -const Versions = Object.fromEntries(mcData.versions.bedrock.filter(e => e.releaseType === 'release').map(e => [e.minecraftVersion, e.version])) +const Versions = Object.fromEntries(mcData.versions.bedrock.filter(e => e.releaseType === 'release').map(e => [e.minecraftVersion, e.version]).reverse()) const defaultOptions = { // https://minecraft.gamepedia.com/Protocol_version#Bedrock_Edition_2 diff --git a/test/internal.js b/test/internal.js index 7617d28..7e61306 100644 --- a/test/internal.js +++ b/test/internal.js @@ -206,5 +206,5 @@ async function timedTest (version, timeout = 1000 * 220) { console.info('✔ ok') } -// if (!module.parent) timedTest() +// if (!module.parent) timedTest('1.17.40') module.exports = { startTest, timedTest, requestChunks } diff --git a/tools/startVanillaServer.js b/tools/startVanillaServer.js index 157f458..e2ba4d9 100644 --- a/tools/startVanillaServer.js +++ b/tools/startVanillaServer.js @@ -12,7 +12,7 @@ const get = (url, out) => cp.execSync(`curl -o ${out} ${url}`) function fetchLatestStable () { get('https://raw.githubusercontent.com/minecraft-linux/mcpelauncher-versiondb/master/versions.json', 'versions.json') const versions = JSON.parse(fs.readFileSync('./versions.json')) - const latest = versions[versions.length - 1] + const latest = versions[0] return latest.version_name } From 572b83047c9d7d4c59ec42db73e41b57575a8282 Mon Sep 17 00:00:00 2001 From: extremeheat Date: Sat, 4 Dec 2021 10:48:14 -0500 Subject: [PATCH 051/273] Release 3.8.0 --- HISTORY.md | 5 ++++- package.json | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index eaca46e..bc4d371 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,5 +1,8 @@ +## 3.8.0 +* 1.18.0 support + ## 3.7.0 -* 1.7.40 support +* 1.17.40 support ## 3.6.0 * 1.17.30 support diff --git a/package.json b/package.json index 0b5bd48..721e845 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bedrock-protocol", - "version": "3.7.0", + "version": "3.8.0", "description": "Minecraft Bedrock Edition protocol library", "main": "index.js", "scripts": { From e3e553bf91be463143b31d5e8835eb295baffca0 Mon Sep 17 00:00:00 2001 From: extremeheat Date: Tue, 7 Dec 2021 23:23:53 -0500 Subject: [PATCH 052/273] index.d.ts: update version enum --- index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.d.ts b/index.d.ts index a6c71a0..fe15ac4 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,7 +1,7 @@ import EventEmitter from "events" declare module "bedrock-protocol" { - type Version = '1.17.41' | '1.17.40' | '1.17.34' | '1.17.30' | '1.17.11' | '1.17.10' | '1.17.0' | '1.16.220' | '1.16.210' | '1.16.201' + type Version = '1.18.1' | '1.18.0' | '1.17.41' | '1.17.40' | '1.17.34' | '1.17.30' | '1.17.11' | '1.17.10' | '1.17.0' | '1.16.220' | '1.16.210' | '1.16.201' enum title { MinecraftNintendoSwitch, MinecraftJava } From bb2179a8cb9c193cd1496ede25b04042fce2bcaa Mon Sep 17 00:00:00 2001 From: extremeheat Date: Wed, 15 Dec 2021 23:55:32 -0500 Subject: [PATCH 053/273] Fix port collision caused by race condition in tests (#164) * Fix port collision caused by race condition in tests The ipv6 port is not randomized, if the previous ports for the last test didn't get freed in time, the server can crash on launch * try again * Update index.d.ts * Update genPacketDumps.js --- index.d.ts | 2 ++ tools/genPacketDumps.js | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/index.d.ts b/index.d.ts index fe15ac4..5b0c8c2 100644 --- a/index.d.ts +++ b/index.d.ts @@ -24,6 +24,8 @@ declare module "bedrock-protocol" { } export interface ClientOptions extends Options { + // The username to connect to the server as + username: string, // The view distance in chunks viewDistance?: number, // Specifies which game edition to sign in as. Optional, but some servers verify this. diff --git a/tools/genPacketDumps.js b/tools/genPacketDumps.js index a6741ea..4176b65 100644 --- a/tools/genPacketDumps.js +++ b/tools/genPacketDumps.js @@ -18,11 +18,11 @@ function hasDumps (version) { let loop async function dump (version, force = true) { - const random = ((Math.random() * 100) | 0) - const port = 19130 + random + const random = (Math.random() * 1000) | 0 + const [port, v6] = [19132 + random, 19133 + random] console.log('Starting dump server', version) - const handle = await vanillaServer.startServerAndWait(version || CURRENT_VERSION, 1000 * 120, { 'server-port': port }) + const handle = await vanillaServer.startServerAndWait(version || CURRENT_VERSION, 1000 * 120, { 'server-port': port, 'server-portv6': v6 }) console.log('Started dump server', version) const client = new Client({ From 7acacc1a138381ee27abf3123bf1b9a7d10f8573 Mon Sep 17 00:00:00 2001 From: extremeheat Date: Sun, 26 Dec 2021 09:53:49 -0500 Subject: [PATCH 054/273] Update docs (#165) * Update API.md * Update CONTRIBUTING.md --- CONTRIBUTING.md | 25 ++++++++++++++++++++----- docs/API.md | 2 +- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 746f349..fd23544 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,16 +1,31 @@ CONTRIBUTING.md -Contributions are always welcome :) +Contributions are always welcome :). If you have any questions, please discuss on the Discord or in a Discussion. ## Updating Good sources for the Minecraft bedrock protocol are [gophertunnel](https://github.com/Sandertv/gophertunnel/tree/master/minecraft/protocol/packet), [ClouburstMC's protocol library](https://github.com/CloudburstMC/Protocol) and [PocketMine](https://github.com/pmmp/PocketMine-MP/tree/stable/src/pocketmine/network/mcpe/protocol). +Protocol updates need to happen in two places: in minecraft-data to update the protocol schema (the actual data structures for the packets) and here in the protocol library side. If no changes to the underlying protocol are made aside from packet structure changes (add, remove, modify packets) then the only change needed in bedrock-protocol is to update the README documentation and some constants in `src/options.js` (update the CURRENT_VERSION). + Steps to update: -* Add the version to src/options.js -* Open [data/latest/proto.yml](https://github.com/PrismarineJS/bedrock-protocol/tree/new/data/latest) and add, remove or modify the updated packets (see the [Packet serialization](#Packet_serialization) notes at the bottom for info on syntax) -* Save and make sure to update the !version field at the top of the file -* Run `npm run build` and `npm test` to test +* Update the protocol data in minecraft-data : see the instructions [here](https://github.com/PrismarineJS/minecraft-data/blob/master/doc/bedrock.md). + * Find the relevant changes to the protocol for the current version + * Update the [.YML files](https://github.com/PrismarineJS/minecraft-data/tree/master/data/bedrock/latest) in minecraft-data accordingly (see the [Packet serialization](#Packet_serialization) notes at the bottom here for info on syntax) + * Then follow the steps to build the protocol .YML files into JSON + * Do a release of the minecraft-data package +* Add the version to `src/options.js` here +* Run `npm run build` and `npm test` to test that everything is OK + +### Development + +For development purposes, you can easily alter the protocol locally without a remote minecraft-data release : +* Run `npm install` on the root of this repo after git cloning +* Open `node_modules/minecraft-data/minecraft-data/data/bedrock/latest/` and update the .YML files as you need, following the schema at the bottom (make sure to update '!version' if you are changing version) +* Go back to the root of this repo and run `npm run build`. +* Then `npm test` ; the protocol changes should be automatically applied + +For example, [here](https://github.com/PrismarineJS/minecraft-data/pull/467/files) is a PR for the update to 1.17.30 in minecraft-data - [here](https://github.com/PrismarineJS/bedrock-protocol/pull/150/files) is an accompanying change for bedrock-protocol. ## Code structure diff --git a/docs/API.md b/docs/API.md index 8900876..677f12f 100644 --- a/docs/API.md +++ b/docs/API.md @@ -133,7 +133,7 @@ Order of client event emissions: ### Protocol docs -For documentation on the protocol, and packets/fields see the [proto.yml](data/latest/proto.yml) and [types.yml](data/latest/proto.yml) files. More information on syntax can be found in CONTRIBUTING.md. When sending a packet, you must fill out all of the required fields. +For documentation on the protocol, and packets/fields see the [the protocol doc](https://minecraft-data.prismarine.js.org/?v=bedrock_1.18.0&d=protocol) (the emitted event names are the Packet types in lower case without the "packet_" prefix). More information on syntax can be found in CONTRIBUTING.md. When sending a packet, you must fill out all of the required fields. ### Proxy docs From 49fd2b69ee5ad0087ba1211dab5942cc8aac2222 Mon Sep 17 00:00:00 2001 From: extremeheat Date: Fri, 31 Dec 2021 15:16:18 +0000 Subject: [PATCH 055/273] client: make console connection logging optional --- docs/API.md | 3 ++- src/client.js | 11 ++++++++--- src/createClient.js | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/docs/API.md b/docs/API.md index 677f12f..d6e23ed 100644 --- a/docs/API.md +++ b/docs/API.md @@ -13,12 +13,12 @@ Returns a `Client` instance and connects to the server. | version | *optional* | Version to connect as. If not specified, automatically match server version. | | offline | *optional* | default to **false**. Set this to true to disable Microsoft/Xbox auth. | | username | Conditional | Required if `offline` set to true : Username to connect to server as. | -| authTitle | *optional* | The title ID to connect as, see the README for usage. | | connectTimeout | *optional* | default to **9000ms**. How long to wait in milliseconds while trying to connect to server. | | onMsaCode | *optional* | Callback called when signing in with a microsoft account with device code auth, `data` is an object documented [here](https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-device-code#device-authorization-response) | | profilesFolder | *optional* | Where to store cached authentication tokens. Defaults to .minecraft, or the node_modules folder if not found. | | autoInitPlayer | *optional* | default to true, If we should send SetPlayerInitialized to the server after getting play_status spawn. | | skipPing | *optional* | Whether pinging the server to check its version should be skipped. | +| conLog | *optional* | Where to log connection information (server join, kick messages to). Defaults to console.log, set to `null` to not log anywhere. | | useNativeRaknet | *optional* | Whether to use the C++ version of RakNet. Set to false to use JS. | | authTitle | *optional* | The client ID to sign in as, defaults to Minecraft for Nintendo Switch. Set false to sign in through Azure. See prismarine-auth | | deviceType | *optional* | The device type to sign in as, defaults to "Nintendo". See prismarine-auth | @@ -48,6 +48,7 @@ authenticated unless offline is set to true. | kickTimeout | *[Future][1]* | How long to wait before kicking a unresponsive client. | | motd | *optional* | The "message of the day" for the server, the message shown to players in the server list. See usage below. | | advertisementFn | *optional* | optional. Custom function to call that should return a ServerAdvertisement, used for setting the RakNet server PONG data. Overrides `motd`. | +| conLog | *optional* | Where to log connection information (server join, kick messages to). Default to log only in DEBUG mode. | ## be.ping({ host, port }) : ServerAdvertisement diff --git a/src/client.js b/src/client.js index 5909667..76e4bcb 100644 --- a/src/client.js +++ b/src/client.js @@ -41,6 +41,7 @@ class Client extends Connection { this.inLog = (...args) => debug('C ->', ...args) this.outLog = (...args) => debug('C <-', ...args) } + this.conLog = this.options.conLog === undefined ? console.log : this.options.conLog } connect () { @@ -82,7 +83,9 @@ class Client extends Connection { try { return await this.connection.ping(this.options.connectTimeout) } catch (e) { - console.warn(`Unable to connect to [${this.options.host}]/${this.options.port}. Is the server running?`) + // TODO: workaround bug in standardjs, waiting for https://github.com/standard/eslint-config-standard/pull/193 + const t = `Unable to connect to [${this.options.host}]/${this.options.port}. Is the server running?` + this.conLog?.(t) throw e } } @@ -126,7 +129,9 @@ class Client extends Connection { } onDisconnectRequest (packet) { - console.warn(`Server requested ${packet.hide_disconnect_reason ? 'silent disconnect' : 'disconnect'}: ${packet.message}`) + // TODO: workaround bug in standardjs, waiting for https://github.com/standard/eslint-config-standard/pull/193 + const t = `Server requested ${packet.hide_disconnect_reason ? 'silent disconnect' : 'disconnect'}: ${packet.message}` + this.conLog?.(t) this.emit('kick', packet) this.close() } @@ -172,7 +177,7 @@ class Client extends Connection { return } const pakData = { name: des.data.name, params: des.data.params } - this.inLog?.('-> C', pakData.name, this.options.loggging ? serialize(pakData.params) : '') + this.inLog?.('-> C', pakData.name, this.options.logging ? serialize(pakData.params) : '') this.emit('packet', des) if (debugging) { diff --git a/src/createClient.js b/src/createClient.js index a7e9fd4..59b6ceb 100644 --- a/src/createClient.js +++ b/src/createClient.js @@ -16,7 +16,7 @@ function createClient (options) { client.ping().then(data => { const ad = advertisement.fromServerName(data) client.options.version = options.version ?? (Versions[ad.version] ? ad.version : CURRENT_VERSION) - console.log(`Connecting to server ${ad.motd} (${ad.name}), version ${ad.version}`, client.options.version !== ad.version ? ` (as ${client.options.version})` : undefined) + if (client.conLog) client.conLog(`Connecting to server ${ad.motd} (${ad.name}), version ${ad.version}`, client.options.version !== ad.version ? ` (as ${client.options.version})` : '') connect(client) }, client) } From a1698d712fe7083e31ffd9e5f8ecc03dece50ddb Mon Sep 17 00:00:00 2001 From: extremeheat Date: Fri, 31 Dec 2021 15:18:46 +0000 Subject: [PATCH 056/273] relay: fix empty chunk loading issues, make chunk caching optional --- index.d.ts | 6 +++++- src/relay.js | 32 ++++++++++++++++++++++++++------ 2 files changed, 31 insertions(+), 7 deletions(-) diff --git a/index.d.ts b/index.d.ts index 5b0c8c2..a14500d 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,7 +1,7 @@ import EventEmitter from "events" declare module "bedrock-protocol" { - type Version = '1.18.1' | '1.18.0' | '1.17.41' | '1.17.40' | '1.17.34' | '1.17.30' | '1.17.11' | '1.17.10' | '1.17.0' | '1.16.220' | '1.16.210' | '1.16.201' + type Version = '1.18.2' | '1.18.1' | '1.18.0' | '1.17.41' | '1.17.40' | '1.17.34' | '1.17.30' | '1.17.11' | '1.17.10' | '1.17.0' | '1.16.220' | '1.16.210' | '1.16.201' enum title { MinecraftNintendoSwitch, MinecraftJava } @@ -34,6 +34,8 @@ declare module "bedrock-protocol" { connectTimeout?: number // whether to skip initial ping and immediately connect skipPing?: boolean + // where to log connection information to (default to console.log) + conLog? } export interface ServerOptions extends Options { @@ -149,6 +151,8 @@ declare module "bedrock-protocol" { // Skip authentication connecting to the remote server? offline: false, } + // Whether to enable chunk caching (default: false) + enableChunkCaching?: boolean } export class Relay extends Server { diff --git a/src/relay.js b/src/relay.js index b78662f..6aac5a3 100644 --- a/src/relay.js +++ b/src/relay.js @@ -31,6 +31,7 @@ class RelayPlayer extends Player { this.outLog = this.downOutLog this.inLog = this.downInLog this.chunkSendCache = [] + this.sentStartGame = false this.respawnPacket = [] } @@ -52,8 +53,25 @@ class RelayPlayer extends Player { this.server.deserializer.verify(des, this.server.serializer) } - this.emit('clientbound', des.data) - this.queue(name, params) + this.emit('clientbound', des.data, des) + + if (!des.canceled) { + if (name === 'start_game') { + this.sentStartGame = true + } else if (name === 'level_chunk' && !this.sentStartGame) { + this.chunkSendCache.push(params) + return + } + + this.queue(name, params) + } + + if (this.chunkSendCache.length > 0 && this.sentStartGame) { + for (const entry of this.chunkSendCache) { + this.queue('level_chunk', entry) + } + this.chunkSendCache = [] + } } // Send queued packets to the connected client @@ -102,16 +120,17 @@ class RelayPlayer extends Player { this.server.deserializer.verify(des, this.server.serializer) } - this.emit('serverbound', des.data) + this.emit('serverbound', des.data, des) + if (des.canceled) return switch (des.data.name) { case 'client_cache_status': // Force the chunk cache off. - this.upstream.queue('client_cache_status', { enabled: false }) + this.upstream.queue('client_cache_status', { enabled: this.enableChunkCaching }) break case 'set_local_player_as_initialized': this.status = 3 - // falls through + // falls through default: // Emit the packet as-is back to the upstream server this.downInLog('Relaying', des.data) @@ -139,6 +158,7 @@ class Relay extends Server { this.forceSingle = true this.upstreams = new Map() this.conLog = debug + this.enableChunkCaching = options.enableChunkCaching } // Called after a new player joins our proxy. We first create a new Client to connect to @@ -167,7 +187,7 @@ class Relay extends Server { // Tell the server to disable chunk cache for this connection as a client. // Wait a bit for the server to ack and process, the continue with proxying // otherwise the player can get stuck in an empty world. - client.write('client_cache_status', { enabled: false }) + client.write('client_cache_status', { enabled: this.enableChunkCaching }) ds.upstream = client ds.flushUpQueue() this.conLog('Connected to upstream server') From abc14449293f0b519e0bd32f679cf2e116c3790b Mon Sep 17 00:00:00 2001 From: extremeheat Date: Fri, 31 Dec 2021 15:20:10 +0000 Subject: [PATCH 057/273] Add missing login field --- src/handshake/login.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/handshake/login.js b/src/handshake/login.js index 4fd0163..5035a3d 100644 --- a/src/handshake/login.js +++ b/src/handshake/login.js @@ -35,6 +35,7 @@ module.exports = (client, server, options) => { client.createClientUserChain = (privateKey) => { let payload = { ...skinData, + SkinGeometryDataEngineVersion: '', // 1.17.30 ClientRandomId: Date.now(), CurrentInputMode: 1, From 058c280b66c3361a333de964e275d4a604ee7575 Mon Sep 17 00:00:00 2001 From: extremeheat Date: Fri, 31 Dec 2021 15:22:58 +0000 Subject: [PATCH 058/273] fix relay connection close issue --- src/relay.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/relay.js b/src/relay.js index 6aac5a3..53bd4f7 100644 --- a/src/relay.js +++ b/src/relay.js @@ -142,7 +142,7 @@ class RelayPlayer extends Player { } close (reason) { - this.upstream.close(reason) + this.upstream?.close(reason) super.close(reason) } } From eb5ebc665016b40dcb2ad24d4baee5eab04a406f Mon Sep 17 00:00:00 2001 From: extremeheat Date: Fri, 7 Jan 2022 18:36:38 -0500 Subject: [PATCH 059/273] Bump bedrock-provider in tests (#172) --- examples/client/clientInternal.js | 4 ++-- package.json | 2 +- test/internal.js | 29 +++++++++++++++-------------- test/vanilla.js | 5 +++-- 4 files changed, 21 insertions(+), 19 deletions(-) diff --git a/examples/client/clientInternal.js b/examples/client/clientInternal.js index f30fe23..10da7f5 100644 --- a/examples/client/clientInternal.js +++ b/examples/client/clientInternal.js @@ -3,7 +3,7 @@ */ process.env.DEBUG = 'minecraft-protocol raknet' const { Client } = require('bedrock-protocol') -const { ChunkColumn, Version } = require('bedrock-provider') +const ChunkColumn = require('bedrock-provider').chunk('bedrock_1.17.10') async function test () { const client = new Client({ @@ -33,7 +33,7 @@ async function test () { }) client.on('level_chunk', async packet => { - const cc = new ChunkColumn(Version.v1_4_0, packet.x, packet.z) + const cc = new ChunkColumn(packet.x, packet.z) await cc.networkDecodeNoCache(packet.payload, packet.sub_chunk_count) const blocks = [] for (let x = 0; x < 16; x++) { diff --git a/package.json b/package.json index 721e845..f747300 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "@babel/eslint-parser": "^7.13.10", "babel-eslint": "^10.1.0", "bedrock-protocol": "file:.", - "bedrock-provider": "^1.0.0", + "bedrock-provider": "^2.0.0", "leveldb-zlib": "^1.0.1", "mocha": "^9.1.2", "protodef-yaml": "^1.1.0", diff --git a/test/internal.js b/test/internal.js index 7e61306..63e492e 100644 --- a/test/internal.js +++ b/test/internal.js @@ -3,6 +3,7 @@ const { dumpPackets } = require('../tools/genPacketDumps') const { ping } = require('../src/createClient') const { CURRENT_VERSION } = require('../src/options') const { join } = require('path') +const { waitFor } = require('../src/datatypes/util') // First we need to dump some packets that a vanilla server would send a vanilla // client. Then we can replay those back in our custom server. @@ -31,7 +32,7 @@ async function startTest (version = CURRENT_VERSION, ok) { console.assert(pongData, 'did not get valid pong data from server') const respawnPacket = get('packets/respawn.json') - const chunks = await requestChunks(respawnPacket.x, respawnPacket.z, 1) + const chunks = await requestChunks(version, respawnPacket.x, respawnPacket.z, 1) let loop @@ -150,31 +151,31 @@ async function startTest (version = CURRENT_VERSION, ok) { client.connect() } -const { ChunkColumn, Version } = require('bedrock-provider') -const { waitFor } = require('../src/datatypes/util') -const mcData = require('minecraft-data')('1.16') +async function requestChunks (version, x, z, radius) { + const ChunkColumn = require('bedrock-provider').chunk('bedrock_1.17.10') + // const mcData = require('minecraft-data')('1.16') -async function requestChunks (x, z, radius) { const cxStart = (x >> 4) - radius const cxEnd = (x >> 4) + radius const czStart = (z >> 4) - radius const czEnd = (z >> 4) + radius - const stone = mcData.blocksByName.stone + // const stone = mcData.blocksByName.stone const chunks = [] for (let cx = cxStart; cx < cxEnd; cx++) { for (let cz = czStart; cz < czEnd; cz++) { console.log('reading chunk at ', cx, cz) - const cc = new ChunkColumn(Version.v1_2_0_bis, x, z) + const cc = new ChunkColumn(x, z) - for (let x = 0; x < 16; x++) { - for (let y = 0; y < 60; y++) { - for (let z = 0; z < 16; z++) { - cc.setBlock(x, y, z, stone) - } - } - } + // Temporarily disable until 1.18 PR in bedrock-provider goes through + // for (let x = 0; x < 16; x++) { + // for (let y = 0; y < 60; y++) { + // for (let z = 0; z < 16; z++) { + // cc.setBlock({ x, y, z }, stone) + // } + // } + // } if (!cc) { console.log('no chunk') diff --git a/test/vanilla.js b/test/vanilla.js index 5d20b89..41033cc 100644 --- a/test/vanilla.js +++ b/test/vanilla.js @@ -2,9 +2,10 @@ const vanillaServer = require('../tools/startVanillaServer') const { Client } = require('../src/client') const { waitFor } = require('../src/datatypes/util') -const { ChunkColumn, Version } = require('bedrock-provider') async function test (version) { + const ChunkColumn = require('bedrock-provider').chunk('bedrock_' + version) + // Start the server, wait for it to accept clients, throws on timeout const handle = await vanillaServer.startServerAndWait(version, 1000 * 220) console.log('Started server') @@ -45,7 +46,7 @@ async function test (version) { }, 200) client.on('level_chunk', async packet => { // Chunk read test - const cc = new ChunkColumn(Version.v1_4_0, packet.x, packet.z) + const cc = new ChunkColumn(packet.x, packet.z) await cc.networkDecodeNoCache(packet.payload, packet.sub_chunk_count) }) From 2aa3b9826a75d3309c41d3f94fa4f7652546047d Mon Sep 17 00:00:00 2001 From: extremeheat Date: Sat, 8 Jan 2022 13:40:22 -0500 Subject: [PATCH 060/273] Release 3.9.0 (#173) --- HISTORY.md | 3 +++ package.json | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/HISTORY.md b/HISTORY.md index bc4d371..58c7b88 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,3 +1,6 @@ +## 3.9.0 +* Proxy fixes, logging and doc updates [#169](https://github.com/PrismarineJS/bedrock-protocol/pull/169) + ## 3.8.0 * 1.18.0 support diff --git a/package.json b/package.json index f747300..c710c0a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bedrock-protocol", - "version": "3.8.0", + "version": "3.9.0", "description": "Minecraft Bedrock Edition protocol library", "main": "index.js", "scripts": { From 14af5fe04fc93c1bec0e324dbed3a3b170452936 Mon Sep 17 00:00:00 2001 From: extremeheat Date: Fri, 4 Feb 2022 20:30:21 -0500 Subject: [PATCH 061/273] Switch to sync zlib with 512k chunks, adjustable compression level (#174) * Switch to sync zlib with 512k chunks, adjustable compression level * update serverPlayer --- docs/API.md | 6 +++-- index.d.ts | 4 ++++ src/client.js | 8 ++++++- src/connection.js | 45 +++++++++++++++++++----------------- src/createClient.js | 9 +++++--- src/server.js | 1 + src/serverPlayer.js | 1 + src/transforms/encryption.js | 16 +++++-------- src/transforms/framer.js | 30 +++++++++++------------- 9 files changed, 66 insertions(+), 54 deletions(-) diff --git a/docs/API.md b/docs/API.md index d6e23ed..6401d3b 100644 --- a/docs/API.md +++ b/docs/API.md @@ -20,8 +20,8 @@ Returns a `Client` instance and connects to the server. | skipPing | *optional* | Whether pinging the server to check its version should be skipped. | | conLog | *optional* | Where to log connection information (server join, kick messages to). Defaults to console.log, set to `null` to not log anywhere. | | useNativeRaknet | *optional* | Whether to use the C++ version of RakNet. Set to false to use JS. | -| authTitle | *optional* | The client ID to sign in as, defaults to Minecraft for Nintendo Switch. Set false to sign in through Azure. See prismarine-auth | -| deviceType | *optional* | The device type to sign in as, defaults to "Nintendo". See prismarine-auth | +| compressionLevel | *optional* | What zlib compression level to use, default to **7** | +| batchingInterval | *optional* | How frequently, in milliseconds to flush and write the packet queue (default: 20ms) | The following events are emitted by the client: * 'status' - When the client's login sequence status has changed @@ -30,6 +30,8 @@ The following events are emitted by the client: * 'kick' - The server has kicked the client * 'close' - The server has closed the connection * 'error' - An recoverable exception has happened. Not catching will throw an exception +* 'connect_allowed' - Emitted after the client has pinged the server and gets version information. +* 'heartbeat' - Emitted after two successful tick_sync (keepalive) packets have been sent bidirectionally ## be.createServer(options) : Server diff --git a/index.d.ts b/index.d.ts index a14500d..6e9964f 100644 --- a/index.d.ts +++ b/index.d.ts @@ -21,6 +21,10 @@ declare module "bedrock-protocol" { useNativeRaknet?: boolean, // If using JS implementation of RakNet, should we use workers? (This only affects the client) useRaknetWorker?: boolean + // Compression level for zlib, default to 7 + compressionLevel?: number + // How frequently the packet queue should be flushed in milliseconds, defaults to 20ms + batchingInterval?: number } export interface ClientOptions extends Options { diff --git a/src/client.js b/src/client.js index 76e4bcb..f403463 100644 --- a/src/client.js +++ b/src/client.js @@ -68,6 +68,7 @@ class Client extends Connection { if (this.options.protocolVersion < Options.MIN_VERSION) { throw new Error(`Protocol version < ${Options.MIN_VERSION} : ${this.options.protocolVersion}, too old`) } + this.compressionLevel = this.options.compressionLevel || 7 } get entityId () { @@ -140,7 +141,12 @@ class Client extends Connection { if (this.status === ClientStatus.Initializing && this.options.autoInitPlayer === true) { if (statusPacket.status === 'player_spawn') { this.status = ClientStatus.Initialized - this.write('set_local_player_as_initialized', { runtime_entity_id: this.entityId }) + if (!this.entityId) { + // We need to wait for start_game in the rare event we get a player_spawn before start_game race condition + this.on('start_game', () => this.write('set_local_player_as_initialized', { runtime_entity_id: this.entityId })) + } else { + this.write('set_local_player_as_initialized', { runtime_entity_id: this.entityId }) + } this.emit('spawn') } } diff --git a/src/connection.js b/src/connection.js index ce15507..ddd60b1 100644 --- a/src/connection.js +++ b/src/connection.js @@ -60,7 +60,7 @@ class Connection extends EventEmitter { write (name, params) { this.outLog?.(name, params) if (name === 'start_game') this.updateItemPalette(params.itemstates) - const batch = new Framer() + const batch = new Framer(this.compressionLevel) const packet = this.serializer.createPacketBuffer({ name, params }) batch.addEncodedPacket(packet) @@ -84,21 +84,25 @@ class Connection extends EventEmitter { this.sendIds.push(name) } + _tick () { + if (this.sendQ.length) { + const batch = new Framer(this.compressionLevel) + batch.addEncodedPackets(this.sendQ) + this.sendQ = [] + this.sendIds = [] + if (this.encryptionEnabled) { + this.sendEncryptedBatch(batch) + } else { + this.sendDecryptedBatch(batch) + } + } + } + + onTick = this._tick.bind(this) + startQueue () { this.sendQ = [] - this.loop = setInterval(() => { - if (this.sendQ.length) { - const batch = new Framer() - batch.addEncodedPackets(this.sendQ) - this.sendQ = [] - this.sendIds = [] - if (this.encryptionEnabled) { - this.sendEncryptedBatch(batch) - } else { - this.sendDecryptedBatch(batch) - } - } - }, 20) + this.loop = setInterval(this.onTick, this.options.batchingInterval || 20) } /** @@ -106,7 +110,7 @@ class Connection extends EventEmitter { */ sendBuffer (buffer, immediate = false) { if (immediate) { - const batch = new Framer() + const batch = new Framer(this.compressionLevel) batch.addEncodedPacket(buffer) if (this.encryptionEnabled) { this.sendEncryptedBatch(batch) @@ -121,7 +125,7 @@ class Connection extends EventEmitter { sendDecryptedBatch (batch) { // send to raknet - batch.encode(buf => this.sendMCPE(buf, true)) + this.sendMCPE(batch.encode(), true) } sendEncryptedBatch (batch) { @@ -158,11 +162,10 @@ class Connection extends EventEmitter { if (this.encryptionEnabled) { this.decrypt(buffer.slice(1)) } else { - Framer.decode(buffer, packets => { - for (const packet of packets) { - this.readPacket(packet) - } - }) + const packets = Framer.decode(buffer) + for (const packet of packets) { + this.readPacket(packet) + } } } } diff --git a/src/createClient.js b/src/createClient.js index 59b6ceb..7aff088 100644 --- a/src/createClient.js +++ b/src/createClient.js @@ -17,6 +17,7 @@ function createClient (options) { const ad = advertisement.fromServerName(data) client.options.version = options.version ?? (Versions[ad.version] ? ad.version : CURRENT_VERSION) if (client.conLog) client.conLog(`Connecting to server ${ad.motd} (${ad.name}), version ${ad.version}`, client.options.version !== ad.version ? ` (as ${client.options.version})` : '') + client.emit('connect_allowed') connect(client) }, client) } @@ -46,15 +47,17 @@ function connect (client) { sleep(500).then(() => client.queue('request_chunk_radius', { chunk_radius: client.viewDistance || 10 })) }) - const KEEPALIVE_INTERVAL = 10 // Send tick sync packets every 10 ticks + // Send tick sync packets every 10 ticks + const keepAliveInterval = 10 + const keepAliveIntervalBig = BigInt(keepAliveInterval) let keepalive client.tick = 0n client.once('spawn', () => { keepalive = setInterval(() => { // Client fills out the request_time and the server does response_time in its reply. client.queue('tick_sync', { request_time: client.tick, response_time: 0n }) - client.tick += BigInt(KEEPALIVE_INTERVAL) - }, 50 * KEEPALIVE_INTERVAL) + client.tick += keepAliveIntervalBig + }, 50 * keepAliveInterval) client.on('tick_sync', async packet => { client.emit('heartbeat', packet.response_time) diff --git a/src/server.js b/src/server.js index 3192889..8a2d723 100644 --- a/src/server.js +++ b/src/server.js @@ -33,6 +33,7 @@ class Server extends EventEmitter { if (this.options.protocolVersion < Options.MIN_VERSION) { throw new Error(`Protocol version < ${Options.MIN_VERSION} : ${this.options.protocolVersion}, too old`) } + this.compressionLevel = this.options.compressionLevel || 7 } onOpenConnection = (conn) => { diff --git a/src/serverPlayer.js b/src/serverPlayer.js index 967a9f8..906f3f2 100644 --- a/src/serverPlayer.js +++ b/src/serverPlayer.js @@ -15,6 +15,7 @@ class Player extends Connection { this.deserializer = server.deserializer this.connection = connection this.options = server.options + this.compressionLevel = server.compressionLevel KeyExchange(this, server, server.options) Login(this, server, server.options) diff --git a/src/transforms/encryption.js b/src/transforms/encryption.js index 31f9ae2..b02351b 100644 --- a/src/transforms/encryption.js +++ b/src/transforms/encryption.js @@ -36,12 +36,10 @@ function createEncryptor (client, iv) { // The send counter is represented as a little-endian 64-bit long and incremented after each packet. function process (chunk) { - Zlib.deflateRaw(chunk, { level: 7 }, (err, buffer) => { - if (err) throw err - const packet = Buffer.concat([buffer, computeCheckSum(buffer, client.sendCounter, client.secretKeyBytes)]) - client.sendCounter++ - client.cipher.write(packet) - }) + const buffer = Zlib.deflateRawSync(chunk, { level: client.compressionLevel }) + const packet = Buffer.concat([buffer, computeCheckSum(buffer, client.sendCounter, client.secretKeyBytes)]) + client.sendCounter++ + client.cipher.write(packet) } client.cipher.on('data', client.onEncryptedPacket) @@ -72,10 +70,8 @@ function createDecryptor (client, iv) { return } - Zlib.inflateRaw(chunk, { chunkSize: 1024 * 1024 * 2 }, (err, buffer) => { - if (err) throw err - client.onDecryptedPacket(buffer) - }) + const buffer = Zlib.inflateRawSync(chunk, { chunkSize: 512000 }) + client.onDecryptedPacket(buffer) } client.decipher.on('data', verify) diff --git a/src/transforms/framer.js b/src/transforms/framer.js index 77f41e9..c31b8d8 100644 --- a/src/transforms/framer.js +++ b/src/transforms/framer.js @@ -3,34 +3,30 @@ const zlib = require('zlib') // Concatenates packets into one batch packet, and adds length prefixs. class Framer { - constructor () { + constructor (compressionLevel) { // Encoding this.packets = [] - this.compressionLevel = 7 + this.compressionLevel = compressionLevel } - static decode (buf, cb) { + static decode (buf) { // Read header if (buf[0] !== 0xfe) throw Error('bad batch packet header ' + buf[0]) const buffer = buf.slice(1) - // Decode the payload - zlib.inflateRaw(buffer, { chunkSize: 1024 * 1024 * 2 }, (err, inflated) => { - if (err) { // Try to decode without compression - Framer.getPackets(buffer) - return - } - cb(Framer.getPackets(inflated)) - }) + // Decode the payload with 512kb buffer + try { + const inflated = zlib.inflateRawSync(buffer, { chunkSize: 512000 }) + return Framer.getPackets(inflated) + } catch (e) { // Try to decode without compression + return Framer.getPackets(buffer) + } } - encode (cb) { + encode () { const buf = Buffer.concat(this.packets) - zlib.deflateRaw(buf, { level: this.compressionLevel }, (err, def) => { - if (err) throw err - const ret = Buffer.concat([Buffer.from([0xfe]), def]) - cb(ret) - }) + const def = zlib.deflateRawSync(buf, { level: this.compressionLevel }) + return Buffer.concat([Buffer.from([0xfe]), def]) } addEncodedPacket (chunk) { From 957c83995ab93730ca021e9cb0886a0a60986bd6 Mon Sep 17 00:00:00 2001 From: extremeheat Date: Wed, 9 Feb 2022 12:15:35 -0500 Subject: [PATCH 062/273] 1.18.11 (#179) * Fix js raknet client disconnection * 1.18.11 --- index.d.ts | 2 +- src/client.js | 2 +- src/options.js | 2 +- src/rak.js | 19 +++++++++++++++---- src/rakWorker.js | 9 ++++++--- src/server.js | 1 + test/internal.js | 2 +- 7 files changed, 26 insertions(+), 11 deletions(-) diff --git a/index.d.ts b/index.d.ts index 6e9964f..5b79a6f 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,7 +1,7 @@ import EventEmitter from "events" declare module "bedrock-protocol" { - type Version = '1.18.2' | '1.18.1' | '1.18.0' | '1.17.41' | '1.17.40' | '1.17.34' | '1.17.30' | '1.17.11' | '1.17.10' | '1.17.0' | '1.16.220' | '1.16.210' | '1.16.201' + type Version = '1.18.11' | '1.18.10' | '1.18.2' | '1.18.1' | '1.18.0' | '1.17.41' | '1.17.40' | '1.17.34' | '1.17.30' | '1.17.11' | '1.17.10' | '1.17.0' | '1.16.220' | '1.16.210' | '1.16.201' enum title { MinecraftNintendoSwitch, MinecraftJava } diff --git a/src/client.js b/src/client.js index f403463..c41aa33 100644 --- a/src/client.js +++ b/src/client.js @@ -94,7 +94,7 @@ class Client extends Connection { _connect = async (sessionData) => { debug('[client] connecting to', this.options.host, this.options.port, sessionData, this.connection) this.connection.onConnected = () => this.sendLogin() - this.connection.onCloseConnection = () => this.close() + this.connection.onCloseConnection = (reason) => this.close() this.connection.onEncapsulated = this.onEncapsulated this.connection.connect() diff --git a/src/options.js b/src/options.js index 78b1eaa..7949f85 100644 --- a/src/options.js +++ b/src/options.js @@ -3,7 +3,7 @@ const mcData = require('minecraft-data') // Minimum supported version (< will be kicked) const MIN_VERSION = '1.16.201' // Currently supported verson. Note, clients with newer versions can still connect as long as data is in minecraft-data -const CURRENT_VERSION = '1.18.0' +const CURRENT_VERSION = '1.18.11' const Versions = Object.fromEntries(mcData.versions.bedrock.filter(e => e.releaseType === 'release').map(e => [e.minecraftVersion, e.version]).reverse()) diff --git a/src/rak.js b/src/rak.js index 32a3b31..182ef09 100644 --- a/src/rak.js +++ b/src/rak.js @@ -86,6 +86,7 @@ class RakNativeServer extends EventEmitter { protocolVersion: 10, message: server.getAdvertisement().toBuffer() }) + this.onClose = () => {} this.updateAdvertisement = () => { this.raknet.setOfflineMessage(server.getAdvertisement().toBuffer()) @@ -106,6 +107,8 @@ class RakNativeServer extends EventEmitter { this.raknet.on('encapsulated', ({ buffer, address }) => { this.onEncapsulated(buffer, address) }) + + this.raknet.on('close', (reason) => this.onClose(reason)) } listen () { @@ -122,6 +125,7 @@ class RakJsClient extends EventEmitter { super() this.options = options this.onConnected = () => { } + this.onCloseConnection = () => { } this.onEncapsulated = () => { } if (options.useWorkers) { this.connect = this.workerConnect @@ -151,6 +155,10 @@ class RakJsClient extends EventEmitter { } case 'pong': this.pongCb?.(evt.args) + break + case 'disconnect': + this.onCloseConnection() + break } }) } @@ -164,7 +172,8 @@ class RakJsClient extends EventEmitter { }) this.raknet.on('connected', this.onConnected) - this.raknet.on('encapsulated', (encapsulated, addr) => this.onEncapsulated(encapsulated.buffer, addr.hash)) + this.raknet.on('encapsulated', (encapsulated, addr) => this.onEncapsulated(encapsulated, addr.hash)) + this.raknet.on('disconnect', (reason) => this.onCloseConnection(reason)) } workerSendReliable (buffer, immediate) { @@ -175,8 +184,8 @@ class RakJsClient extends EventEmitter { const sendPacket = new EncapsulatedPacket() sendPacket.reliability = Reliability.ReliableOrdered sendPacket.buffer = buffer - this.connection.addEncapsulatedToQueue(sendPacket) - if (immediate) this.connection.sendQueue() + this.raknet.connection.addEncapsulatedToQueue(sendPacket) + if (immediate) this.raknet.connection.sendQueue() } async ping (timeout = 1000) { @@ -205,8 +214,9 @@ class RakJsServer extends EventEmitter { this.onOpenConnection = () => { } this.onCloseConnection = () => { } this.onEncapsulated = (packet, address) => server.onEncapsulated(packet.buffer, address) + this.onClose = () => {} this.updateAdvertisement = () => { - // TODO + this.raknet.setPongAdvertisement(server.getAdvertisement()) } if (options.useWorkers) { throw Error('nyi') @@ -229,6 +239,7 @@ class RakJsServer extends EventEmitter { }) this.raknet.on('closeConnection', this.onCloseConnection) this.raknet.on('encapsulated', this.onEncapsulated) + this.raknet.on('close', this.onClose) } close () { diff --git a/src/rakWorker.js b/src/rakWorker.js index b67af0b..9717e62 100644 --- a/src/rakWorker.js +++ b/src/rakWorker.js @@ -34,9 +34,12 @@ function main () { }) raknet.on('encapsulated', (...args) => { - setTimeout(() => { - parentPort.postMessage({ type: 'encapsulated', args }) - }, 100) + parentPort.postMessage({ type: 'encapsulated', args }) + }) + + raknet.on('disconnect', (reason) => { + debug('[worker] disconnected!') + parentPort.postMessage({ type: 'disconnect', reason }) }) raknet.on('raw', (buffer, inetAddr) => { diff --git a/src/server.js b/src/server.js index 8a2d723..7329b63 100644 --- a/src/server.js +++ b/src/server.js @@ -81,6 +81,7 @@ class Server extends EventEmitter { this.raknet.onOpenConnection = this.onOpenConnection this.raknet.onCloseConnection = this.onCloseConnection this.raknet.onEncapsulated = this.onEncapsulated + this.raknet.onClose = (reason) => this.close(reason || 'Raknet closed') this.serverTimer = setInterval(() => { this.raknet.updateAdvertisement() diff --git a/test/internal.js b/test/internal.js index 63e492e..50335fd 100644 --- a/test/internal.js +++ b/test/internal.js @@ -207,5 +207,5 @@ async function timedTest (version, timeout = 1000 * 220) { console.info('✔ ok') } -// if (!module.parent) timedTest('1.17.40') +// if (!module.parent) timedTest('1.18.11') module.exports = { startTest, timedTest, requestChunks } From 330c819e7f8b883ad33a2122cbda959d172691fa Mon Sep 17 00:00:00 2001 From: extremeheat Date: Wed, 9 Feb 2022 13:07:50 -0500 Subject: [PATCH 063/273] Release 3.10.0 (#180) * Update HISTORY.md * Update package.json * Update README.md --- HISTORY.md | 4 ++++ README.md | 2 +- package.json | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index 58c7b88..6d2017f 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,3 +1,7 @@ +## 3.10.0 +* Support 1.18.11 (#179) @extremeheat +* Switch to sync zlib with 512k chunks, adjustable compression level (#174) @extremeheat + ## 3.9.0 * Proxy fixes, logging and doc updates [#169](https://github.com/PrismarineJS/bedrock-protocol/pull/169) diff --git a/README.md b/README.md index 4efd7ea..c4c67f2 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Minecraft Bedrock Edition (aka MCPE) protocol library, supporting authentication ## Features - - Supports Minecraft Bedrock version 1.16.201, 1.16.210, 1.16.220, 1.17.0, 1.17.10, 1.17.30, 1.17.40, 1.18.0 + - Supports Minecraft Bedrock version 1.16.201, 1.16.210, 1.16.220, 1.17.0, 1.17.10, 1.17.30, 1.17.40, 1.18.0, 1.18.11 - Parse and serialize packets as JavaScript objects - Automatically respond to keep-alive packets - [Proxy and mitm connections](docs/API.md#proxy-docs) diff --git a/package.json b/package.json index c710c0a..5ec29b4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bedrock-protocol", - "version": "3.9.0", + "version": "3.10.0", "description": "Minecraft Bedrock Edition protocol library", "main": "index.js", "scripts": { From 817fd918ce4c5cd3aa0185961b0107147b89f81e Mon Sep 17 00:00:00 2001 From: extremeheat Date: Mon, 21 Feb 2022 04:35:24 -0500 Subject: [PATCH 064/273] Ignore unconnected packets, remove babel (#185) * Ignore unconnected packets, remove babel * re-enable proxy test on ubuntu runner --- .eslintignore | 1 - .gitignore | 2 -- .npmignore | 1 - babel.config.js | 3 --- examples/viewer/client/ProxyProvider.js | 2 +- examples/viewer/client/movements.js | 7 +++---- examples/viewer/index.js | 2 +- index.d.ts | 2 +- package.json | 7 +------ src/client.js | 11 +++-------- src/relay.js | 13 +++++++++---- src/server.js | 3 ++- src/transforms/serializer.js | 9 +++++---- test/internal.test.js | 19 +++++++------------ 14 files changed, 33 insertions(+), 49 deletions(-) delete mode 100644 .eslintignore delete mode 100644 babel.config.js diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index 61743e4..0000000 --- a/.eslintignore +++ /dev/null @@ -1 +0,0 @@ -examples/viewer \ No newline at end of file diff --git a/.gitignore b/.gitignore index 72abbbc..bc2d2f9 100644 --- a/.gitignore +++ b/.gitignore @@ -2,9 +2,7 @@ node_modules/ npm-debug.log package-lock.json __* -src/**/*.json # Runtime generated data data/ tools/bds* -tools/*/* *.txt \ No newline at end of file diff --git a/.npmignore b/.npmignore index 1dab2b5..da98b5e 100644 --- a/.npmignore +++ b/.npmignore @@ -1,7 +1,6 @@ node_modules/ npm-debug.log __* -src/**/*.json # Runtime generated data data/ tools/bds* diff --git a/babel.config.js b/babel.config.js deleted file mode 100644 index 7db9b6f..0000000 --- a/babel.config.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = { - presets: ['@babel/preset-env'] -} diff --git a/examples/viewer/client/ProxyProvider.js b/examples/viewer/client/ProxyProvider.js index 29f74c7..8ffc599 100644 --- a/examples/viewer/client/ProxyProvider.js +++ b/examples/viewer/client/ProxyProvider.js @@ -44,7 +44,7 @@ class ProxyProvider extends BotProvider { this.movements.pushCameraControl(params, 1) // Log Movement deltas - { + { // eslint-disable-line this.lastMovePacket = params if (this.firstPlayerMovePacket) { const id = diff(this.firstPlayerMovePacket.input_data, params.input_data) diff --git a/examples/viewer/client/movements.js b/examples/viewer/client/movements.js index d359bea..92b6630 100644 --- a/examples/viewer/client/movements.js +++ b/examples/viewer/client/movements.js @@ -187,11 +187,11 @@ class MovementManager { }, PHYSICS_INTERVAL_MS) } - get sprinting() { + get sprinting () { return this.player.sprinting } - set sprinting(val) { + set sprinting (val) { this.player.events.startSprint = val this.player.events.stopSprint = !val if (val && !this.player.sprinting) { @@ -219,7 +219,7 @@ class MovementManager { const isAxis = AXES.includes(control) let hasOtherAxisKeyDown = false for (const c of AXES) { - if (this.controls[c] && c != control) { + if (this.controls[c] && c !== control) { hasOtherAxisKeyDown = true } } @@ -278,7 +278,6 @@ class MovementManager { globalThis.debugYaw = [yaw, yawRad] } - // Called when a proxy player sends a PlayerInputPacket. We need to apply these inputs tick-by-tick // as these packets are sent by the client every tick. pushCameraControl (state, id = 1) { diff --git a/examples/viewer/index.js b/examples/viewer/index.js index 954d4b6..2147fd5 100644 --- a/examples/viewer/index.js +++ b/examples/viewer/index.js @@ -1,7 +1,7 @@ const path = require('path') const { app, BrowserWindow, globalShortcut } = require('electron') -function createMainWindow() { +function createMainWindow () { const window = new BrowserWindow({ webPreferences: { nodeIntegration: true, diff --git a/index.d.ts b/index.d.ts index 5b79a6f..b02d208 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,7 +1,7 @@ import EventEmitter from "events" declare module "bedrock-protocol" { - type Version = '1.18.11' | '1.18.10' | '1.18.2' | '1.18.1' | '1.18.0' | '1.17.41' | '1.17.40' | '1.17.34' | '1.17.30' | '1.17.11' | '1.17.10' | '1.17.0' | '1.16.220' | '1.16.210' | '1.16.201' + type Version = '1.18.12' | '1.18.11' | '1.18.10' | '1.18.2' | '1.18.1' | '1.18.0' | '1.17.41' | '1.17.40' | '1.17.34' | '1.17.30' | '1.17.11' | '1.17.10' | '1.17.0' | '1.16.220' | '1.16.210' | '1.16.201' enum title { MinecraftNintendoSwitch, MinecraftJava } diff --git a/package.json b/package.json index 5ec29b4..4f13295 100644 --- a/package.json +++ b/package.json @@ -34,17 +34,12 @@ "raknet-native": "^1.0.3" }, "devDependencies": { - "@babel/eslint-parser": "^7.13.10", - "babel-eslint": "^10.1.0", "bedrock-protocol": "file:.", "bedrock-provider": "^2.0.0", "leveldb-zlib": "^1.0.1", "mocha": "^9.1.2", "protodef-yaml": "^1.1.0", - "standard": "^16.0.3" - }, - "standard": { - "parser": "babel-eslint" + "standard": "^17.0.0-2" }, "repository": { "type": "git", diff --git a/src/client.js b/src/client.js index c41aa33..219dcec 100644 --- a/src/client.js +++ b/src/client.js @@ -84,9 +84,7 @@ class Client extends Connection { try { return await this.connection.ping(this.options.connectTimeout) } catch (e) { - // TODO: workaround bug in standardjs, waiting for https://github.com/standard/eslint-config-standard/pull/193 - const t = `Unable to connect to [${this.options.host}]/${this.options.port}. Is the server running?` - this.conLog?.(t) + this.conLog?.(`Unable to connect to [${this.options.host}]/${this.options.port}. Is the server running?`) throw e } } @@ -130,9 +128,7 @@ class Client extends Connection { } onDisconnectRequest (packet) { - // TODO: workaround bug in standardjs, waiting for https://github.com/standard/eslint-config-standard/pull/193 - const t = `Server requested ${packet.hide_disconnect_reason ? 'silent disconnect' : 'disconnect'}: ${packet.message}` - this.conLog?.(t) + this.conLog?.(`Server requested ${packet.hide_disconnect_reason ? 'silent disconnect' : 'disconnect'}: ${packet.message}`) this.emit('kick', packet) this.close() } @@ -221,8 +217,7 @@ class Client extends Connection { break default: if (this.status !== ClientStatus.Initializing && this.status !== ClientStatus.Initialized) { - // TODO: standardjs bug happens here with ?.(`something ${des.data.name}`) - if (this.inLog) this.inLog(`Can't accept ${des.data.name}, client not yet authenticated : ${this.status}`) + this.inLog?.(`Can't accept ${des.data.name}, client not yet authenticated : ${this.status}`) return } } diff --git a/src/relay.js b/src/relay.js index 53bd4f7..de88107 100644 --- a/src/relay.js +++ b/src/relay.js @@ -57,7 +57,9 @@ class RelayPlayer extends Player { if (!des.canceled) { if (name === 'start_game') { - this.sentStartGame = true + setTimeout(() => { + this.sentStartGame = true + }, 500) } else if (name === 'level_chunk' && !this.sentStartGame) { this.chunkSendCache.push(params) return @@ -104,7 +106,8 @@ class RelayPlayer extends Player { if (this.startRelaying) { // Upstream is still connecting/handshaking if (!this.upstream) { - this.downInLog('Got downstream connected packet but upstream is not connected yet, added to q', this.upQ.length) + const des = this.server.deserializer.parsePacketBuffer(packet) + this.downInLog('Got downstream connected packet but upstream is not connected yet, added to q', des) this.upQ.push(packet) // Put into a queue return } @@ -178,8 +181,10 @@ class Relay extends Server { autoInitPlayer: false }) // Set the login payload unless `noLoginForward` option - if (!client.noLoginForward) client.skinData = ds.skinData - client.connect() + if (!client.noLoginForward) client.options.skinData = ds.skinData + client.ping().then(pongData => { + client.connect() + }) this.conLog('Connecting to', this.options.destination.host, this.options.destination.port) client.outLog = ds.upOutLog client.inLog = ds.upInLog diff --git a/src/server.js b/src/server.js index 7329b63..50f3ddf 100644 --- a/src/server.js +++ b/src/server.js @@ -55,7 +55,8 @@ class Server extends EventEmitter { onEncapsulated = (buffer, address) => { const client = this.clients[address] if (!client) { - this.emit('error', new Error(`packet from unknown inet addr: ${address}`)) + // Ignore packets from clients that are not connected. + debug(`ignoring packet from unknown inet addr: ${address}`) return } client.handle(buffer) diff --git a/src/transforms/serializer.js b/src/transforms/serializer.js index 7311698..c763599 100644 --- a/src/transforms/serializer.js +++ b/src/transforms/serializer.js @@ -17,10 +17,11 @@ class Parser extends FullPacketParser { const oldBuffer = deserialized.fullBuffer const newBuffer = serializer.createPacketBuffer({ name, params }) if (!newBuffer.equals(oldBuffer)) { - console.warn('New', newBuffer.toString('hex')) - console.warn('Old', oldBuffer.toString('hex')) - console.log('Failed to re-encode', name, params) - process.exit(1) + const fs = require('fs') + fs.writeFileSync('new.bin', newBuffer) + fs.writeFileSync('old.bin', oldBuffer) + fs.writeFileSync('failed.json', JSON.stringify(params, (k, v) => typeof v === 'bigint' ? v.toString() : v, 2)) + console.warn('Failed to re-encode', name) } } } diff --git a/test/internal.test.js b/test/internal.test.js index 6e81c43..d6c11d8 100644 --- a/test/internal.test.js +++ b/test/internal.test.js @@ -17,17 +17,12 @@ describe('internal client/server test', function () { }) } - if (process.env.CI && process.platform === 'linux') { - // Don't run the test, see : - // https://github.com/PrismarineJS/bedrock-protocol/issues/124 - } else { - for (const version in Versions) { - it('proxies ' + version, async () => { - console.debug(version) - await proxyTest(version) - await sleep(5000) - console.debug('Done', version) - }) - } + for (const version in Versions) { + it('proxies ' + version, async () => { + console.debug(version) + await proxyTest(version) + await sleep(5000) + console.debug('Done', version) + }) } }) From 550b1a19b4214dad77bcbf71029a371fd6ccdf43 Mon Sep 17 00:00:00 2001 From: extremeheat Date: Sun, 20 Mar 2022 17:51:17 -0400 Subject: [PATCH 065/273] Mark raknet-native as required dependency (#188) JS raknet implementation needs some fixes, don't allow silent fail of this dep --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 4f13295..12c09c9 100644 --- a/package.json +++ b/package.json @@ -28,10 +28,10 @@ "prismarine-auth": "^1.1.0", "prismarine-nbt": "^2.0.0", "protodef": "^1.14.0", - "uuid-1345": "^1.0.2" + "uuid-1345": "^1.0.2", + "raknet-native": "^1.0.3" }, "optionalDependencies": { - "raknet-native": "^1.0.3" }, "devDependencies": { "bedrock-protocol": "file:.", From 92785a1167bc641690e27864c6091a1a93ea852a Mon Sep 17 00:00:00 2001 From: circuit10 Date: Fri, 25 Mar 2022 16:21:47 +0000 Subject: [PATCH 066/273] Pass relay onMsaCode to client (#190) --- src/relay.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/relay.js b/src/relay.js index de88107..e77256f 100644 --- a/src/relay.js +++ b/src/relay.js @@ -178,6 +178,7 @@ class Relay extends Server { version: this.options.version, host: this.options.destination.host, port: this.options.destination.port, + onMsaCode: this.options.onMsaCode, autoInitPlayer: false }) // Set the login payload unless `noLoginForward` option From 72c07bb7a01a8bca4b71f1d1c9b90186d3d0748f Mon Sep 17 00:00:00 2001 From: circuit10 Date: Sat, 26 Mar 2022 02:25:55 +0000 Subject: [PATCH 067/273] Emit error from relay when server can't be pinged (#191) --- src/relay.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/relay.js b/src/relay.js index e77256f..080c67c 100644 --- a/src/relay.js +++ b/src/relay.js @@ -185,6 +185,8 @@ class Relay extends Server { if (!client.noLoginForward) client.options.skinData = ds.skinData client.ping().then(pongData => { client.connect() + }).catch(err => { + this.emit('error', err) }) this.conLog('Connecting to', this.options.destination.host, this.options.destination.port) client.outLog = ds.upOutLog From 0dc586db9ce4716f1975003ccb8b365daabdc146 Mon Sep 17 00:00:00 2001 From: CreeperG16 <86970314+CreeperG16@users.noreply.github.com> Date: Sat, 26 Mar 2022 19:31:54 +0100 Subject: [PATCH 068/273] Add profilesFolder to Relay (#192) --- src/relay.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/relay.js b/src/relay.js index 080c67c..086b0be 100644 --- a/src/relay.js +++ b/src/relay.js @@ -165,7 +165,7 @@ class Relay extends Server { } // Called after a new player joins our proxy. We first create a new Client to connect to - // the remote server. Then we listen to soem events and proxy them over. The queue and + // the remote server. Then we listen to some events and proxy them over. The queue and // flushing logic is more of an accessory to make sure the server or client recieves // a packet, no matter what state it's in. For example, if the client wants to send a // packet to the server but it's not connected, it will add to the queue and send as soon @@ -179,6 +179,7 @@ class Relay extends Server { host: this.options.destination.host, port: this.options.destination.port, onMsaCode: this.options.onMsaCode, + profilesFolder: this.options.profilesFolder, autoInitPlayer: false }) // Set the login payload unless `noLoginForward` option From dfff13867dfaead208fe77b729b20ea7164d4743 Mon Sep 17 00:00:00 2001 From: extremeheat Date: Sun, 27 Mar 2022 16:15:20 -0400 Subject: [PATCH 069/273] Refactor client connection sequence (#189) * Refactor client connection sequence Allow connection info to come in after Client construction, emit "connect_allowed" similar to nmp * Fix breaking ping behavior change * fix createClient connect callback * correct behavior * remove comments * refactor impl * fix incorrect use of `this` --- src/client.js | 38 +++++++++++++++++++++++--------------- src/client/auth.js | 30 ++++++++++++++++++++---------- src/createClient.js | 33 +++++++++++++++++++++------------ 3 files changed, 64 insertions(+), 37 deletions(-) diff --git a/src/client.js b/src/client.js index 219dcec..85f48df 100644 --- a/src/client.js +++ b/src/client.js @@ -4,7 +4,7 @@ const { serialize, isDebug } = require('./datatypes/util') const debug = require('debug')('minecraft-protocol') const Options = require('./options') const auth = require('./client/auth') - +const initRaknet = require('./rak') const { KeyExchange } = require('./handshake/keyExchange') const Login = require('./handshake/login') const LoginVerify = require('./handshake/loginVerify') @@ -19,20 +19,6 @@ class Client extends Connection { constructor (options) { super() this.options = { ...Options.defaultOptions, ...options } - this.validateOptions() - - const { RakClient } = require('./rak')(this.options.useNativeRaknet) - - this.serializer = createSerializer(this.options.version) - this.deserializer = createDeserializer(this.options.version) - - KeyExchange(this, null, this.options) - Login(this, null, this.options) - LoginVerify(this, null, this.options) - - const host = this.options.host - const port = this.options.port - this.connection = new RakClient({ useWorkers: this.options.useRaknetWorkers, host, port }) this.startGameData = {} this.clientRuntimeId = null @@ -42,9 +28,31 @@ class Client extends Connection { this.outLog = (...args) => debug('C <-', ...args) } this.conLog = this.options.conLog === undefined ? console.log : this.options.conLog + + if (!options.delayedInit) { + this.init() + } + } + + init () { + this.validateOptions() + this.serializer = createSerializer(this.options.version) + this.deserializer = createDeserializer(this.options.version) + + KeyExchange(this, null, this.options) + Login(this, null, this.options) + LoginVerify(this, null, this.options) + + const { RakClient } = initRaknet(this.options.useNativeRaknet) + const host = this.options.host + const port = this.options.port + this.connection = new RakClient({ useWorkers: this.options.useRaknetWorkers, host, port }) + + this.emit('connect_allowed') } connect () { + if (!this.connection) throw new Error('Connect not currently allowed') // must wait for `connect_allowed`, or use `createClient` this.on('session', this._connect) if (this.options.offline) { diff --git a/src/client/auth.js b/src/client/auth.js index 62f2a2f..72a44cc 100644 --- a/src/client/auth.js +++ b/src/client/auth.js @@ -4,6 +4,21 @@ const minecraftFolderPath = require('minecraft-folder-path') const debug = require('debug')('minecraft-protocol') const { uuidFrom } = require('../datatypes/util') +function validateOptions (options) { + if (!options.profilesFolder) { + options.profilesFolder = path.join(minecraftFolderPath, 'nmp-cache') + } + if (options.authTitle === undefined) { + options.authTitle = Titles.MinecraftNintendoSwitch + options.deviceType = 'Nintendo' + } +} + +async function realmAuthenticate (options) { + validateOptions(options) + throw new Error('Not implemented') +} + /** * Authenticates to Minecraft via device code based Microsoft auth, * then connects to the specified server in Client Options @@ -13,16 +28,10 @@ const { uuidFrom } = require('../datatypes/util') * @param {object} options - Client Options */ async function authenticate (client, options) { - if (!options.profilesFolder) { - options.profilesFolder = path.join(minecraftFolderPath, 'nmp-cache') - } - if (options.authTitle === undefined) { - options.authTitle = Titles.MinecraftNintendoSwitch - options.deviceType = 'Nintendo' - } + validateOptions(options) try { - const Authflow = new PrismarineAuth(options.username, options.profilesFolder, options, options.onMsaCode) - const chains = await Authflow.getMinecraftBedrockToken(client.clientX509).catch(e => { + const authflow = options.authflow || new PrismarineAuth(options.username, options.profilesFolder, options, options.onMsaCode) + const chains = await authflow.getMinecraftBedrockToken(client.clientX509).catch(e => { if (options.password) console.warn('Sign in failed, try removing the password field') throw e }) @@ -71,5 +80,6 @@ function postAuthenticate (client, profile, chains) { module.exports = { createOfflineSession, - authenticate + authenticate, + realmAuthenticate } diff --git a/src/createClient.js b/src/createClient.js index 7aff088..eec4412 100644 --- a/src/createClient.js +++ b/src/createClient.js @@ -1,27 +1,36 @@ const { Client } = require('./client') const { RakClient } = require('./rak')(true) -const { Versions, CURRENT_VERSION } = require('./options') const { sleep } = require('./datatypes/util') const assert = require('assert') +const Options = require('./options') const advertisement = require('./server/advertisement') +const auth = require('./client/auth') /** @param {{ version?: number, host: string, port?: number, connectTimeout?: number, skipPing?: boolean }} options */ function createClient (options) { assert(options) - const client = new Client({ port: 19132, ...options }) + const client = new Client({ port: 19132, ...options, delayedInit: true }) - if (options.skipPing) { - connect(client) - } else { // Try to ping - client.ping().then(data => { - const ad = advertisement.fromServerName(data) - client.options.version = options.version ?? (Versions[ad.version] ? ad.version : CURRENT_VERSION) - if (client.conLog) client.conLog(`Connecting to server ${ad.motd} (${ad.name}), version ${ad.version}`, client.options.version !== ad.version ? ` (as ${client.options.version})` : '') - client.emit('connect_allowed') - connect(client) - }, client) + function onServerInfo () { + if (options.skipPing) { + client.init() + } else { + ping(options).then(ad => { + const adVersion = ad.version?.split('.').slice(0, 3).join('.') // Only 3 version units + client.options.version = options.version ?? (Options.Versions[adVersion] ? adVersion : Options.CURRENT_VERSION) + client.conLog?.(`Connecting to server ${ad.motd} (${ad.name}), version ${ad.version}`, client.options.version !== ad.version ? ` (as ${client.options.version})` : '') + client.init() + }) + } } + if (options.realms) { + auth.realmAuthenticate(client.options).then(onServerInfo).catch(e => client.emit('error', e)) + } else { + onServerInfo() + } + + client.on('connect_allowed', () => connect(client)) return client } From cde600d51efcaaa1e6ea6222e2000b5a3e7330be Mon Sep 17 00:00:00 2001 From: LucienHH <66429271+LucienHH@users.noreply.github.com> Date: Sat, 9 Apr 2022 18:11:12 +0100 Subject: [PATCH 070/273] Implement Realm joining (#193) * Pass client options to ping * Implement RealmAPI to auth * Add Realm join example * Update package.json * Update README.md * Update index.d.ts * Show one option, remove listener * Fix wording * Explain options * Optional fields * Fix typo * Moved retry ad host/port extraction to prealms * Add docs * Fix lint * Depend on prealms release Co-authored-by: LucienHH --- README.md | 13 +++++++++++++ docs/API.md | 22 +++++++++++++++++++++- examples/client/realm.js | 13 +++++++++++++ index.d.ts | 9 +++++++++ package.json | 1 + src/client/auth.js | 31 ++++++++++++++++++++++++++++++- src/createClient.js | 2 +- 7 files changed, 88 insertions(+), 3 deletions(-) create mode 100644 examples/client/realm.js diff --git a/README.md b/README.md index c4c67f2..752b8bd 100644 --- a/README.md +++ b/README.md @@ -59,6 +59,19 @@ client.on('text', (packet) => { // Listen for chat messages and echo them back. }) ``` +### Client example joining a Realm + +Example to connect to a Realm that the authenticating account is owner of or has been invited to: + +```js +const bedrock = require('bedrock-protocol') +const client = bedrock.createClient({ + realms: { + pickRealm: (realms) => realms[0] // Function which recieves an array of joined/owned Realms and must return a single Realm. Can be async + } +}) +``` + ### Server example *Can't connect locally on Windows? See the [faq](docs/FAQ.md)* diff --git a/docs/API.md b/docs/API.md index 6401d3b..c1da683 100644 --- a/docs/API.md +++ b/docs/API.md @@ -8,7 +8,7 @@ Returns a `Client` instance and connects to the server. | Parameter | Optionality | Description | | ----------- | ----------- |-| -| host | **Required** | host to connect to, for example `127.0.0.1`. | +| host | Conditional | Not required if `realms` is set. host to connect to, for example `127.0.0.1`. | | port | *optional* | port to connect to, default to **19132** | | version | *optional* | Version to connect as. If not specified, automatically match server version. | | offline | *optional* | default to **false**. Set this to true to disable Microsoft/Xbox auth. | @@ -22,6 +22,10 @@ Returns a `Client` instance and connects to the server. | useNativeRaknet | *optional* | Whether to use the C++ version of RakNet. Set to false to use JS. | | compressionLevel | *optional* | What zlib compression level to use, default to **7** | | batchingInterval | *optional* | How frequently, in milliseconds to flush and write the packet queue (default: 20ms) | +| realms | *optional* | An object which should contain one of the following properties: `realmId`, `realmInvite`, `pickRealm`. When defined will attempt to join a Realm without needing to specify host/port. **The authenticated account must either own the Realm or have been invited to it** | +| realms.realmId | *optional* | The id of the Realm to join. | +| realms.realmInvite | *optional* | The invite link/code of the Realm to join. | +| realms.pickRealm | *optional* | A function which will have an array of the user Realms (joined/owned) passed to it. The function should return a Realm. | The following events are emitted by the client: * 'status' - When the client's login sequence status has changed @@ -134,6 +138,22 @@ Order of client event emissions: * 'join' - the client is ready to recieve game packets after successful server-client handshake * 'spawn' - emitted after the client has permission from the server to spawn +### Realm docs + +To make joining a Realm easier we've added an optional `realm` property to the client. It accepts the following options `realmId`, `realmInvite`, and `pickRealm`, supplying one of these will fetch host/port information for the specified Realm and then attempt to connect the bot. + - `realmId` - The id of the Realm to join. + - `realmInvite` - The invite code/link of the Realm to join. + - `pickRealm` - A function that will be called with a list of Realms to pick from. The function should return the Realm to join. + +```js +const bedrock = require('bedrock-protocol') +const client = bedrock.createClient({ + realms: { + pickRealm: (realms) => realms[0] // Function which recieves an array of joined/owned Realms and must return a single Realm. Can be async + } +}) +``` + ### Protocol docs For documentation on the protocol, and packets/fields see the [the protocol doc](https://minecraft-data.prismarine.js.org/?v=bedrock_1.18.0&d=protocol) (the emitted event names are the Packet types in lower case without the "packet_" prefix). More information on syntax can be found in CONTRIBUTING.md. When sending a packet, you must fill out all of the required fields. diff --git a/examples/client/realm.js b/examples/client/realm.js new file mode 100644 index 0000000..ac52282 --- /dev/null +++ b/examples/client/realm.js @@ -0,0 +1,13 @@ +/* eslint-disable */ +const bedrock = require('bedrock-protocol') +const client = bedrock.createClient({ + realms: { + // realmId: '1234567', // Connect the client to a Realm using the Realms ID + // realmInvite: 'https://realms.gg/AB1CD2EFA3B', // Connect the client to a Realm using the Realms invite URL or code + pickRealm: (realms) => realms.find(e => e.name === 'Realm Name') // Connect the client to a Realm using a function that returns a Realm + } +}) + +client.on('text', (packet) => { // Listen for chat messages + console.log('Received Text:', packet) +}) diff --git a/index.d.ts b/index.d.ts index b02d208..c828688 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,4 +1,5 @@ import EventEmitter from "events" +import { Realm } from "prismarine-realms" declare module "bedrock-protocol" { type Version = '1.18.12' | '1.18.11' | '1.18.10' | '1.18.2' | '1.18.1' | '1.18.0' | '1.17.41' | '1.17.40' | '1.17.34' | '1.17.30' | '1.17.11' | '1.17.10' | '1.17.0' | '1.16.220' | '1.16.210' | '1.16.201' @@ -40,6 +41,8 @@ declare module "bedrock-protocol" { skipPing?: boolean // where to log connection information to (default to console.log) conLog? + // used to join a Realm instead of supplying a host/port + realms?: RealmsOptions } export interface ServerOptions extends Options { @@ -174,6 +177,12 @@ declare module "bedrock-protocol" { serverId: string } + export interface RealmsOptions { + realmId?: string + realmInvite?: string + pickRealm?: (realms: Realm[]) => Realm + } + export function createClient(options: ClientOptions): Client export function createServer(options: ServerOptions): Server diff --git a/package.json b/package.json index 12c09c9..b0ee475 100644 --- a/package.json +++ b/package.json @@ -27,6 +27,7 @@ "minecraft-folder-path": "^1.2.0", "prismarine-auth": "^1.1.0", "prismarine-nbt": "^2.0.0", + "prismarine-realms": "^1.1.0", "protodef": "^1.14.0", "uuid-1345": "^1.0.2", "raknet-native": "^1.0.3" diff --git a/src/client/auth.js b/src/client/auth.js index 72a44cc..6e31da7 100644 --- a/src/client/auth.js +++ b/src/client/auth.js @@ -3,6 +3,7 @@ const { Authflow: PrismarineAuth, Titles } = require('prismarine-auth') const minecraftFolderPath = require('minecraft-folder-path') const debug = require('debug')('minecraft-protocol') const { uuidFrom } = require('../datatypes/util') +const { RealmAPI } = require('prismarine-realms') function validateOptions (options) { if (!options.profilesFolder) { @@ -16,7 +17,35 @@ function validateOptions (options) { async function realmAuthenticate (options) { validateOptions(options) - throw new Error('Not implemented') + + options.authflow = new PrismarineAuth(options.username, options.profilesFolder, options, options.onMsaCode) + + const api = RealmAPI.from(options.authflow, 'bedrock') + const realms = await api.getRealms() + + debug('realms', realms) + + if (!realms || !realms.length) throw Error('Couldn\'t find any Realms for the authenticated account') + + let realm + + if (options.realms.realmId) { + realm = realms.find(e => e.id === Number(options.realms.realmId)) + } else if (options.realms.realmInvite) { + realm = await api.getRealmFromInvite(options.realms.realmInvite) + } else if (options.realms.pickRealm) { + if (typeof options.realms.pickRealm !== 'function') throw Error('realms.pickRealm must be a function') + realm = await options.realms.pickRealm(realms) + } + + if (!realm) throw Error('Couldn\'t find a Realm to connect to. Authenticated account must be the owner or has been invited to the Realm.') + + const { host, port } = await realm.getAddress() + + debug('realms connection', { host, port }) + + options.host = host + options.port = port } /** diff --git a/src/createClient.js b/src/createClient.js index eec4412..3c19928 100644 --- a/src/createClient.js +++ b/src/createClient.js @@ -15,7 +15,7 @@ function createClient (options) { if (options.skipPing) { client.init() } else { - ping(options).then(ad => { + ping(client.options).then(ad => { const adVersion = ad.version?.split('.').slice(0, 3).join('.') // Only 3 version units client.options.version = options.version ?? (Options.Versions[adVersion] ? adVersion : Options.CURRENT_VERSION) client.conLog?.(`Connecting to server ${ad.motd} (${ad.name}), version ${ad.version}`, client.options.version !== ad.version ? ` (as ${client.options.version})` : '') From 9a4c7f03ea411b40b24ee5b0753547081d8de4cb Mon Sep 17 00:00:00 2001 From: extremeheat Date: Sat, 9 Apr 2022 20:18:11 -0400 Subject: [PATCH 071/273] Release 3.11.0 (#194) --- HISTORY.md | 9 +++++++++ package.json | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/HISTORY.md b/HISTORY.md index 6d2017f..6d11679 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,3 +1,12 @@ +## 3.11.0 +* Implement Realm joining (#193) @LucienHH +* Refactor client connection sequence (#189) @extremeheat +* Add profilesFolder to Relay (#192) @CreeperG16 +* Emit error from relay when server can't be pinged (#191) +* Pass relay onMsaCode to client (#190) @Heath123 +* Mark raknet-native as required dependency (#188) +* Ignore unconnected packets, remove babel (#185) + ## 3.10.0 * Support 1.18.11 (#179) @extremeheat * Switch to sync zlib with 512k chunks, adjustable compression level (#174) @extremeheat diff --git a/package.json b/package.json index b0ee475..4e4cc9e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bedrock-protocol", - "version": "3.10.0", + "version": "3.11.0", "description": "Minecraft Bedrock Edition protocol library", "main": "index.js", "scripts": { From 5f90777bd717ec0a692f1bb314d1380e26e29fde Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 19 Apr 2022 14:03:54 -0400 Subject: [PATCH 072/273] Bump minecraft-data from 2.221.0 to 3.0.0 (#195) Bumps [minecraft-data](https://github.com/PrismarineJS/node-minecraft-data) from 2.221.0 to 3.0.0. - [Release notes](https://github.com/PrismarineJS/node-minecraft-data/releases) - [Changelog](https://github.com/PrismarineJS/node-minecraft-data/blob/master/doc/history.md) - [Commits](https://github.com/PrismarineJS/node-minecraft-data/compare/2.221.0...3.0.0) --- updated-dependencies: - dependency-name: minecraft-data dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4e4cc9e..2ab8d85 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "debug": "^4.3.1", "jsonwebtoken": "^8.5.1", "jsp-raknet": "^2.1.3", - "minecraft-data": "^2.96.0", + "minecraft-data": "^3.0.0", "minecraft-folder-path": "^1.2.0", "prismarine-auth": "^1.1.0", "prismarine-nbt": "^2.0.0", From 930d90ea3079569ce4b4010aa15846192025865d Mon Sep 17 00:00:00 2001 From: extremeheat Date: Tue, 19 Apr 2022 14:07:13 -0400 Subject: [PATCH 073/273] Release 3.11.1 (#197) * Update package.json * Update HISTORY.md --- HISTORY.md | 3 +++ package.json | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/HISTORY.md b/HISTORY.md index 6d11679..a7737b8 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,3 +1,6 @@ +## 3.11.1 +* Bump minecraft-data version + ## 3.11.0 * Implement Realm joining (#193) @LucienHH * Refactor client connection sequence (#189) @extremeheat diff --git a/package.json b/package.json index 2ab8d85..744c599 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bedrock-protocol", - "version": "3.11.0", + "version": "3.11.1", "description": "Minecraft Bedrock Edition protocol library", "main": "index.js", "scripts": { From dc3fb5629eb940ab8075c9b1d4c8770562af018c Mon Sep 17 00:00:00 2001 From: extremeheat Date: Wed, 20 Apr 2022 16:11:02 -0400 Subject: [PATCH 074/273] 1.18.30 (#198) --- src/options.js | 4 ++-- tools/compileProtocol.js | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/options.js b/src/options.js index 7949f85..ed45ddf 100644 --- a/src/options.js +++ b/src/options.js @@ -3,9 +3,9 @@ const mcData = require('minecraft-data') // Minimum supported version (< will be kicked) const MIN_VERSION = '1.16.201' // Currently supported verson. Note, clients with newer versions can still connect as long as data is in minecraft-data -const CURRENT_VERSION = '1.18.11' +const CURRENT_VERSION = '1.18.30' -const Versions = Object.fromEntries(mcData.versions.bedrock.filter(e => e.releaseType === 'release').map(e => [e.minecraftVersion, e.version]).reverse()) +const Versions = Object.fromEntries(mcData.versions.bedrock.filter(e => e.releaseType === 'release').map(e => [e.minecraftVersion, e.version])) const defaultOptions = { // https://minecraft.gamepedia.com/Protocol_version#Bedrock_Edition_2 diff --git a/tools/compileProtocol.js b/tools/compileProtocol.js index 079dca3..a51cfc1 100644 --- a/tools/compileProtocol.js +++ b/tools/compileProtocol.js @@ -35,6 +35,8 @@ function main (ver = 'latest') { createProtocol(ver) } +require('minecraft-data/bin/generate_data') + // If no argument, build everything if (!process.argv[2]) { convert('latest') From 20c53c49d7b08fa28574bd64e27ab0cfa5a01f5a Mon Sep 17 00:00:00 2001 From: extremeheat Date: Thu, 21 Apr 2022 14:04:10 -0400 Subject: [PATCH 075/273] Release 3.12.0 (#199) --- HISTORY.md | 3 +++ README.md | 2 +- package.json | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index a7737b8..d50387c 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,3 +1,6 @@ +## 3.12.0 +* 1.18.30 support + ## 3.11.1 * Bump minecraft-data version diff --git a/README.md b/README.md index 752b8bd..8eba17c 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Minecraft Bedrock Edition (aka MCPE) protocol library, supporting authentication ## Features - - Supports Minecraft Bedrock version 1.16.201, 1.16.210, 1.16.220, 1.17.0, 1.17.10, 1.17.30, 1.17.40, 1.18.0, 1.18.11 + - Supports Minecraft Bedrock version 1.16.201, 1.16.210, 1.16.220, 1.17.0, 1.17.10, 1.17.30, 1.17.40, 1.18.0, 1.18.11, 1.18.30 - Parse and serialize packets as JavaScript objects - Automatically respond to keep-alive packets - [Proxy and mitm connections](docs/API.md#proxy-docs) diff --git a/package.json b/package.json index 744c599..9863cd3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bedrock-protocol", - "version": "3.11.1", + "version": "3.12.0", "description": "Minecraft Bedrock Edition protocol library", "main": "index.js", "scripts": { From f2d39a071b99c9d457fbc31850a91184fa4541ac Mon Sep 17 00:00:00 2001 From: extremeheat Date: Thu, 21 Apr 2022 22:28:38 -0400 Subject: [PATCH 076/273] Update index.d.ts --- index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.d.ts b/index.d.ts index c828688..83e7a9e 100644 --- a/index.d.ts +++ b/index.d.ts @@ -2,7 +2,7 @@ import EventEmitter from "events" import { Realm } from "prismarine-realms" declare module "bedrock-protocol" { - type Version = '1.18.12' | '1.18.11' | '1.18.10' | '1.18.2' | '1.18.1' | '1.18.0' | '1.17.41' | '1.17.40' | '1.17.34' | '1.17.30' | '1.17.11' | '1.17.10' | '1.17.0' | '1.16.220' | '1.16.210' | '1.16.201' + type Version = '1.18.30' | '1.18.12' | '1.18.11' | '1.18.10' | '1.18.2' | '1.18.1' | '1.18.0' | '1.17.41' | '1.17.40' | '1.17.34' | '1.17.30' | '1.17.11' | '1.17.10' | '1.17.0' | '1.16.220' | '1.16.210' | '1.16.201' enum title { MinecraftNintendoSwitch, MinecraftJava } From 52156a002473b9752e97bd13bf15a18645256667 Mon Sep 17 00:00:00 2001 From: extremeheat Date: Sat, 30 Apr 2022 19:02:56 -0400 Subject: [PATCH 077/273] Add XUID field for client offline mode client chain (#203) * Add XUID field for client offline mode client chain * Update serverPlayer.js handle alternative casing * test/internal.js: randomize test port * fix * test server starting retry --- src/handshake/login.js | 3 ++- src/serverPlayer.js | 2 +- test/internal.js | 6 +++--- test/vanilla.js | 2 +- tools/startVanillaServer.js | 11 ++++++++++- 5 files changed, 17 insertions(+), 7 deletions(-) diff --git a/src/handshake/login.js b/src/handshake/login.js index 5035a3d..cf76d96 100644 --- a/src/handshake/login.js +++ b/src/handshake/login.js @@ -15,7 +15,8 @@ module.exports = (client, server, options) => { extraData: { displayName: client.username, identity: client.profile.uuid, - titleId: '89692877' + titleId: '89692877', + XUID: '0' }, certificateAuthority: true, identityPublicKey: client.clientX509 diff --git a/src/serverPlayer.js b/src/serverPlayer.js index 906f3f2..7edfea2 100644 --- a/src/serverPlayer.js +++ b/src/serverPlayer.js @@ -69,7 +69,7 @@ class Player extends Connection { this.profile = { name: userData.extraData?.displayName, uuid: userData.extraData?.identity, - xuid: userData.extraData?.xuid + xuid: userData.extraData?.xuid || userData.extraData?.XUID } this.version = clientVer this.emit('login', { user: userData.extraData }) // emit events for user diff --git a/test/internal.js b/test/internal.js index 50335fd..22c6c87 100644 --- a/test/internal.js +++ b/test/internal.js @@ -14,7 +14,7 @@ function prepare (version) { async function startTest (version = CURRENT_VERSION, ok) { await prepare(version) const Item = require('../types/Item')(version) - const port = 19130 + const port = 19130 + Math.floor(Math.random() * 100) const server = new Server({ host: '0.0.0.0', port, version, offline: true }) function getPath (packetPath) { @@ -25,6 +25,7 @@ async function startTest (version = CURRENT_VERSION, ok) { return require(getPath('sample/' + packetPath)) } + console.log('Starting internal server') server.listen() console.log('Started server') @@ -190,7 +191,6 @@ async function requestChunks (version, x, z, radius) { blobs: [], payload: cbuf }) - // console.log('Ht',cc.sectionsLen,cc.sections) } } @@ -207,5 +207,5 @@ async function timedTest (version, timeout = 1000 * 220) { console.info('✔ ok') } -// if (!module.parent) timedTest('1.18.11') +// if (!module.parent) timedTest('1.16.210') module.exports = { startTest, timedTest, requestChunks } diff --git a/test/vanilla.js b/test/vanilla.js index 41033cc..3f3aa0c 100644 --- a/test/vanilla.js +++ b/test/vanilla.js @@ -7,7 +7,7 @@ async function test (version) { const ChunkColumn = require('bedrock-provider').chunk('bedrock_' + version) // Start the server, wait for it to accept clients, throws on timeout - const handle = await vanillaServer.startServerAndWait(version, 1000 * 220) + const handle = await vanillaServer.startServerAndWait2(version, 1000 * 220) console.log('Started server') const client = new Client({ diff --git a/tools/startVanillaServer.js b/tools/startVanillaServer.js index e2ba4d9..74e4360 100644 --- a/tools/startVanillaServer.js +++ b/tools/startVanillaServer.js @@ -110,9 +110,18 @@ async function startServerAndWait (version, withTimeout, options) { return handle } +async function startServerAndWait2 (version, withTimeout, options) { + try { + return await startServerAndWait(version, withTimeout, options) + } catch (e) { + console.log(e, 'tring once more to start server...') + return await startServerAndWait(version, withTimeout, options) + } +} + if (!module.parent) { // if (process.argv.length < 3) throw Error('Missing version argument') startServer(process.argv[2] || '1.17.10', null, process.argv[3] ? { 'server-port': process.argv[3], 'online-mode': !!process.argv[4] } : undefined) } -module.exports = { fetchLatestStable, startServer, startServerAndWait } +module.exports = { fetchLatestStable, startServer, startServerAndWait, startServerAndWait2 } From fbe7ff79e807e8ac45185493c3f633a32671d7a8 Mon Sep 17 00:00:00 2001 From: ATXLtheAxolotl <49346095+ATXLtheAxolotl@users.noreply.github.com> Date: Sat, 30 Apr 2022 19:18:00 -0400 Subject: [PATCH 078/273] Emit generic 'packet' event for server clients (#205) * Send out an all event on ServerPlayer For debugging purposes * Add a space for linter * Changed to be similar to Client's all * A space :| * Update serverPlayer.js --- src/serverPlayer.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/serverPlayer.js b/src/serverPlayer.js index 7edfea2..f8c9763 100644 --- a/src/serverPlayer.js +++ b/src/serverPlayer.js @@ -152,6 +152,7 @@ class Player extends Connection { } } this.emit(des.data.name, des.data.params) + this.emit('packet', des) } } From 63d11c24bbe200bf32b6f5ecd9d5d338a2a6a4f3 Mon Sep 17 00:00:00 2001 From: extremeheat Date: Sat, 30 Apr 2022 19:22:35 -0400 Subject: [PATCH 079/273] Update API documentation --- docs/API.md | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/docs/API.md b/docs/API.md index c1da683..c1f0b7f 100644 --- a/docs/API.md +++ b/docs/API.md @@ -27,7 +27,7 @@ Returns a `Client` instance and connects to the server. | realms.realmInvite | *optional* | The invite link/code of the Realm to join. | | realms.pickRealm | *optional* | A function which will have an array of the user Realms (joined/owned) passed to it. The function should return a Realm. | -The following events are emitted by the client: +The following special events are emitted by the client on top of protocol packets: * 'status' - When the client's login sequence status has changed * 'join' - When the client has joined the server after authenticating * 'spawn' - When the client has spawned into the game world, as it is getting chunks @@ -36,6 +36,7 @@ The following events are emitted by the client: * 'error' - An recoverable exception has happened. Not catching will throw an exception * 'connect_allowed' - Emitted after the client has pinged the server and gets version information. * 'heartbeat' - Emitted after two successful tick_sync (keepalive) packets have been sent bidirectionally +* 'packet' - Emitted for all packets received by client ## be.createServer(options) : Server @@ -97,15 +98,17 @@ server.on('connect', (client) => { ``` -Order of server client event emissions: +Server event emissions: * 'connect' - emitted by `Server` after a client first joins the server. Second paramater is a `ServerPlayer` instance. -* 'login' - emitted by client after the client has been authenticated by the server -* 'join' - the client is ready to recieve game packets after successful server-client handshake/encryption -* 'spawn' - emitted after the client lets the server know that it has successfully spawned - 'error' event is emitted when a catchable exception happens with a client (for example receiving a bad encrypted packet). +A ServerPlayer instance also emits the following special events: +* 'join' - the client is ready to recieve game packets after successful server-client handshake/encryption +* 'login' - emitted by client after the client has been authenticated by the server +* 'spawn' - emitted after the client lets the server know that it has successfully spawned +* 'packet' - Emitted for all packets received by client + ## Client docs You can create a server as such: From f4bd49dca01d4c72a97d95a7626deaf95b4dc5e5 Mon Sep 17 00:00:00 2001 From: extremeheat Date: Sat, 30 Apr 2022 19:25:33 -0400 Subject: [PATCH 080/273] Add 1.18.31 to types --- index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.d.ts b/index.d.ts index 83e7a9e..c2bc9f9 100644 --- a/index.d.ts +++ b/index.d.ts @@ -2,7 +2,7 @@ import EventEmitter from "events" import { Realm } from "prismarine-realms" declare module "bedrock-protocol" { - type Version = '1.18.30' | '1.18.12' | '1.18.11' | '1.18.10' | '1.18.2' | '1.18.1' | '1.18.0' | '1.17.41' | '1.17.40' | '1.17.34' | '1.17.30' | '1.17.11' | '1.17.10' | '1.17.0' | '1.16.220' | '1.16.210' | '1.16.201' + type Version = '1.18.31' | '1.18.30' | '1.18.12' | '1.18.11' | '1.18.10' | '1.18.2' | '1.18.1' | '1.18.0' | '1.17.41' | '1.17.40' | '1.17.34' | '1.17.30' | '1.17.11' | '1.17.10' | '1.17.0' | '1.16.220' | '1.16.210' | '1.16.201' enum title { MinecraftNintendoSwitch, MinecraftJava } From f7c556ec9440307ba0c07a9f8b00710c41a72e2e Mon Sep 17 00:00:00 2001 From: extremeheat Date: Wed, 4 May 2022 16:11:53 -0400 Subject: [PATCH 081/273] Release 3.13.0 (#208) --- HISTORY.md | 5 +++++ package.json | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/HISTORY.md b/HISTORY.md index d50387c..855c610 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,3 +1,8 @@ +## 3.13.0 +* Update API documentation +* Emit generic 'packet' event for server clients (#205) @ATXLtheAxolotl +* Add XUID field for client offline mode client chain (#203) + ## 3.12.0 * 1.18.30 support diff --git a/package.json b/package.json index 9863cd3..f9ec44f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bedrock-protocol", - "version": "3.12.0", + "version": "3.13.0", "description": "Minecraft Bedrock Edition protocol library", "main": "index.js", "scripts": { From 2d7c210acc4137d064425535581d3762292c8d5a Mon Sep 17 00:00:00 2001 From: Erik <33035080+ErikPDev@users.noreply.github.com> Date: Tue, 7 Jun 2022 10:47:21 +0300 Subject: [PATCH 082/273] Server: correct body.protocol_version to body.params.protocol_version (#221) packet.data is ```json { name: 'login', params: { protocol_version: 503, tokens: { identity: '...' } } } ``` Therefore `body.protocol_version` outputs undefined. --- src/serverPlayer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/serverPlayer.js b/src/serverPlayer.js index f8c9763..83f25ec 100644 --- a/src/serverPlayer.js +++ b/src/serverPlayer.js @@ -38,7 +38,7 @@ class Player extends Connection { const body = packet.data this.emit('loggingIn', body) - const clientVer = body.protocol_version + const clientVer = body.params.protocol_version if (this.server.options.protocolVersion) { if (this.server.options.protocolVersion < clientVer) { this.sendDisconnectStatus('failed_spawn') From df31b5d63ac20daf9ba66ed119742e85a8dfef59 Mon Sep 17 00:00:00 2001 From: extremeheat Date: Thu, 9 Jun 2022 13:08:51 -0400 Subject: [PATCH 083/273] test/vanilla: temporary hack to allow 1.19 chunk tests to pass --- test/vanilla.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/vanilla.js b/test/vanilla.js index 3f3aa0c..ac1cdda 100644 --- a/test/vanilla.js +++ b/test/vanilla.js @@ -4,7 +4,7 @@ const { Client } = require('../src/client') const { waitFor } = require('../src/datatypes/util') async function test (version) { - const ChunkColumn = require('bedrock-provider').chunk('bedrock_' + version) + const ChunkColumn = require('bedrock-provider').chunk('bedrock_' + (version.includes('1.19') ? '1.18.30' : version)) // TODO: Fix prismarine-chunk // Start the server, wait for it to accept clients, throws on timeout const handle = await vanillaServer.startServerAndWait2(version, 1000 * 220) From aacd4b4256933ee68b0d9adf0f4e868c9fe43673 Mon Sep 17 00:00:00 2001 From: Stephen O'Connor Date: Thu, 9 Jun 2022 10:45:58 -0700 Subject: [PATCH 084/273] Better handle ping timeout, update documentation (#218) * Better handle ping_timeout, update documentation * Remove extra semicolon * Change ping_timeout to client.emit('error', e) for more normalized handling * Remove extra RakTimeout import --- docs/API.md | 1 + src/createClient.js | 13 +++++++------ src/rak.js | 12 +++++++----- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/docs/API.md b/docs/API.md index c1f0b7f..6955f91 100644 --- a/docs/API.md +++ b/docs/API.md @@ -37,6 +37,7 @@ The following special events are emitted by the client on top of protocol packet * 'connect_allowed' - Emitted after the client has pinged the server and gets version information. * 'heartbeat' - Emitted after two successful tick_sync (keepalive) packets have been sent bidirectionally * 'packet' - Emitted for all packets received by client +* 'session' - When the client has finished authenticating and connecting ## be.createServer(options) : Server diff --git a/src/createClient.js b/src/createClient.js index 3c19928..f48b1a3 100644 --- a/src/createClient.js +++ b/src/createClient.js @@ -12,6 +12,7 @@ function createClient (options) { const client = new Client({ port: 19132, ...options, delayedInit: true }) function onServerInfo () { + client.on('connect_allowed', () => connect(client)) if (options.skipPing) { client.init() } else { @@ -20,7 +21,7 @@ function createClient (options) { client.options.version = options.version ?? (Options.Versions[adVersion] ? adVersion : Options.CURRENT_VERSION) client.conLog?.(`Connecting to server ${ad.motd} (${ad.name}), version ${ad.version}`, client.options.version !== ad.version ? ` (as ${client.options.version})` : '') client.init() - }) + }).catch(e => client.emit('error', e)) } } @@ -29,8 +30,6 @@ function createClient (options) { } else { onServerInfo() } - - client.on('connect_allowed', () => connect(client)) return client } @@ -81,9 +80,11 @@ function connect (client) { async function ping ({ host, port }) { const con = new RakClient({ host, port }) - const ret = await con.ping() - con.close() - return advertisement.fromServerName(ret) + try { + return advertisement.fromServerName(await con.ping()) + } finally { + con.close() + } } module.exports = { createClient, ping } diff --git a/src/rak.js b/src/rak.js index 182ef09..19f313c 100644 --- a/src/rak.js +++ b/src/rak.js @@ -4,11 +4,13 @@ const { waitFor } = require('./datatypes/util') let Client, Server, PacketPriority, EncapsulatedPacket, PacketReliability, Reliability +class RakTimeout extends Error {}; + module.exports = nativeRaknet => { if (nativeRaknet) { try { ({ Client, Server, PacketPriority, PacketReliability } = require('raknet-native')) - return { RakServer: RakNativeServer, RakClient: RakNativeClient } + return { RakServer: RakNativeServer, RakClient: RakNativeClient, RakTimeout } } catch (e) { ({ Client, Server, EncapsulatedPacket, Reliability } = require('jsp-raknet')) console.debug('[raknet] native not found, using js', e) @@ -17,7 +19,7 @@ module.exports = nativeRaknet => { } else { ({ Client, Server, EncapsulatedPacket, Reliability } = require('jsp-raknet')) } - return { RakServer: RakJsServer, RakClient: RakJsClient } + return { RakServer: RakJsServer, RakClient: RakJsClient, RakTimeout } } class RakNativeClient extends EventEmitter { @@ -54,7 +56,7 @@ class RakNativeClient extends EventEmitter { done(ret.extra.toString()) } }) - }, timeout, () => { throw new Error('Ping timed out') }) + }, timeout, () => { throw new RakTimeout('Ping timed out') }) } connect () { @@ -193,7 +195,7 @@ class RakJsClient extends EventEmitter { this.worker.postMessage({ type: 'ping' }) return waitFor(res => { this.pongCb = data => res(data) - }, timeout, () => { throw new Error('Ping timed out') }) + }, timeout, () => { throw new RakTimeout('Ping timed out') }) } else { if (!this.raknet) this.raknet = new Client(this.options.host, this.options.port) return waitFor(res => { @@ -201,7 +203,7 @@ class RakJsClient extends EventEmitter { this.raknet.close() res(data) }) - }, timeout, () => { throw new Error('Ping timed out') }) + }, timeout, () => { throw new RakTimeout('Ping timed out') }) } } } From b6d0ab3765fc5caf7933b46d40395d91840d4d61 Mon Sep 17 00:00:00 2001 From: extremeheat Date: Thu, 9 Jun 2022 14:46:05 -0400 Subject: [PATCH 085/273] Make CI more reliable (#217) * Use 2-attempt server start method in dump test * Update startVanillaServer.js replace download from curl to nodejs https * fix syntax error * corrections * rm some logging * fix --- tools/genPacketDumps.js | 2 +- tools/startVanillaServer.js | 19 +++++++++++++++++-- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/tools/genPacketDumps.js b/tools/genPacketDumps.js index 4176b65..cd28d47 100644 --- a/tools/genPacketDumps.js +++ b/tools/genPacketDumps.js @@ -22,7 +22,7 @@ async function dump (version, force = true) { const [port, v6] = [19132 + random, 19133 + random] console.log('Starting dump server', version) - const handle = await vanillaServer.startServerAndWait(version || CURRENT_VERSION, 1000 * 120, { 'server-port': port, 'server-portv6': v6 }) + const handle = await vanillaServer.startServerAndWait2(version || CURRENT_VERSION, 1000 * 120, { 'server-port': port, 'server-portv6': v6 }) console.log('Started dump server', version) const client = new Client({ diff --git a/tools/startVanillaServer.js b/tools/startVanillaServer.js index 74e4360..8cd1565 100644 --- a/tools/startVanillaServer.js +++ b/tools/startVanillaServer.js @@ -2,10 +2,23 @@ const http = require('https') const fs = require('fs') const cp = require('child_process') const debug = require('debug')('minecraft-protocol') +const https = require('https') const { getFiles, waitFor } = require('../src/datatypes/util') const head = (url) => new Promise((resolve, reject) => http.request(url, { method: 'HEAD' }, resolve).on('error', reject).end()) -const get = (url, out) => cp.execSync(`curl -o ${out} ${url}`) +function get (url, outPath) { + const file = fs.createWriteStream(outPath) + return new Promise((resolve, reject) => { + https.get(url, { timeout: 1000 * 20 }, response => { + if (response.statusCode !== 200) return reject(new Error('Server returned code ' + response.statusCode)) + response.pipe(file) + file.on('finish', () => { + file.close() + resolve() + }) + }) + }) +} // Get the latest versions // TODO: once we support multi-versions @@ -45,7 +58,7 @@ async function download (os, version, path = 'bds-') { } if (!found) throw Error('did not find server bin for ' + os + ' ' + version) console.info('🔻 Downloading', found) - get(found, 'bds.zip') + await get(found, 'bds.zip') console.info('⚡ Unzipping') // Unzip server if (process.platform === 'linux') cp.execSync('unzip bds.zip && chmod +777 ./bedrock_server') @@ -115,6 +128,8 @@ async function startServerAndWait2 (version, withTimeout, options) { return await startServerAndWait(version, withTimeout, options) } catch (e) { console.log(e, 'tring once more to start server...') + process.chdir(__dirname) + fs.rmSync('bds-' + version, { recursive: true }) return await startServerAndWait(version, withTimeout, options) } } From 9fac48e948fe5af734ebe1b5752b5fc7aada2b79 Mon Sep 17 00:00:00 2001 From: extremeheat Date: Thu, 9 Jun 2022 15:44:20 -0400 Subject: [PATCH 086/273] 1.19 support (#224) --- src/options.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/options.js b/src/options.js index ed45ddf..db3bee2 100644 --- a/src/options.js +++ b/src/options.js @@ -3,7 +3,7 @@ const mcData = require('minecraft-data') // Minimum supported version (< will be kicked) const MIN_VERSION = '1.16.201' // Currently supported verson. Note, clients with newer versions can still connect as long as data is in minecraft-data -const CURRENT_VERSION = '1.18.30' +const CURRENT_VERSION = '1.19.1' const Versions = Object.fromEntries(mcData.versions.bedrock.filter(e => e.releaseType === 'release').map(e => [e.minecraftVersion, e.version])) From c7b825820e84bfd4482a49970dd2aa000584c1d6 Mon Sep 17 00:00:00 2001 From: extremeheat Date: Thu, 9 Jun 2022 16:06:38 -0400 Subject: [PATCH 087/273] Release 3.14.0 (#225) --- HISTORY.md | 4 ++++ README.md | 2 +- package.json | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index 855c610..c5e1156 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,3 +1,7 @@ +## 3.14.0 +* 1.19 support +* Better handle ping timeout, update documentation (#218) @stevarino + ## 3.13.0 * Update API documentation * Emit generic 'packet' event for server clients (#205) @ATXLtheAxolotl diff --git a/README.md b/README.md index 8eba17c..3707b1d 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Minecraft Bedrock Edition (aka MCPE) protocol library, supporting authentication ## Features - - Supports Minecraft Bedrock version 1.16.201, 1.16.210, 1.16.220, 1.17.0, 1.17.10, 1.17.30, 1.17.40, 1.18.0, 1.18.11, 1.18.30 + - Supports Minecraft Bedrock version 1.16.201, 1.16.210, 1.16.220, 1.17.0, 1.17.10, 1.17.30, 1.17.40, 1.18.0, 1.18.11, 1.18.30, 1.19.1 - Parse and serialize packets as JavaScript objects - Automatically respond to keep-alive packets - [Proxy and mitm connections](docs/API.md#proxy-docs) diff --git a/package.json b/package.json index f9ec44f..2977877 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bedrock-protocol", - "version": "3.13.0", + "version": "3.14.0", "description": "Minecraft Bedrock Edition protocol library", "main": "index.js", "scripts": { From 6e73a75138d255e0c3a12cf9c2d2bd3b34f8c446 Mon Sep 17 00:00:00 2001 From: ATXLtheAxolotl <49346095+ATXLtheAxolotl@users.noreply.github.com> Date: Fri, 17 Jun 2022 05:55:50 -0400 Subject: [PATCH 088/273] Add Realm support to Relay (#226) * add(): realm relay * fix(): Non-async solution to realm proxy * fix(): follow the guidlines of the strict linter * fix(): Use Client constructor instead of createClient function * types(): Update index.d.ts to include realms option in destination --- examples/realmRelay.js | 29 +++++++++++++++++++++++++++++ index.d.ts | 1 + src/relay.js | 16 ++++++++++++---- 3 files changed, 42 insertions(+), 4 deletions(-) create mode 100644 examples/realmRelay.js diff --git a/examples/realmRelay.js b/examples/realmRelay.js new file mode 100644 index 0000000..2f40d8a --- /dev/null +++ b/examples/realmRelay.js @@ -0,0 +1,29 @@ +const { Relay } = require('bedrock-protocol') + +function createRelay () { + console.log('Creating relay') + /* Example to create a non-transparent proxy (or 'Relay') connection to destination server */ + const relay = new Relay({ + /* host and port for clients to listen to */ + host: '0.0.0.0', + port: 19130, + offline: false, + /* Where to send upstream packets to */ + destination: { + realms: { + pickRealm: (realms) => realms.find(e => e.name === 'Realm Name') + }, + offline: false + } + }) + relay.conLog = console.debug + relay.listen() + relay.on('connect', player => { + // Server is sending a message to the client. + player.on('clientbound', ({ name, params }) => { + if (name === 'text') console.log(params) + }) + }) +} + +createRelay() diff --git a/index.d.ts b/index.d.ts index c2bc9f9..746506f 100644 --- a/index.d.ts +++ b/index.d.ts @@ -153,6 +153,7 @@ declare module "bedrock-protocol" { authTitle: title | string // Where to proxy requests to. destination: { + realms?: RealmsOptions host: string, port: number, // Skip authentication connecting to the remote server? diff --git a/src/relay.js b/src/relay.js index 086b0be..bcb1295 100644 --- a/src/relay.js +++ b/src/relay.js @@ -1,6 +1,7 @@ const { Client } = require('./client') const { Server } = require('./server') const { Player } = require('./serverPlayer') +const { realmAuthenticate } = require('./client/auth') const debug = globalThis.isElectron ? console.debug : require('debug')('minecraft-protocol') const debugging = false // Do re-encoding tests @@ -170,18 +171,25 @@ class Relay extends Server { // a packet, no matter what state it's in. For example, if the client wants to send a // packet to the server but it's not connected, it will add to the queue and send as soon // as a connection with the server is established. - openUpstreamConnection (ds, clientAddr) { - const client = new Client({ + async openUpstreamConnection (ds, clientAddr) { + const options = { authTitle: this.options.authTitle, offline: this.options.destination.offline ?? this.options.offline, username: this.options.offline ? ds.profile.name : null, version: this.options.version, + realms: this.options.destination.realms, host: this.options.destination.host, port: this.options.destination.port, onMsaCode: this.options.onMsaCode, profilesFolder: this.options.profilesFolder, autoInitPlayer: false - }) + } + + if (this.options.destination.realms) { + await realmAuthenticate(options) + } + + const client = new Client(options) // Set the login payload unless `noLoginForward` option if (!client.noLoginForward) client.options.skinData = ds.skinData client.ping().then(pongData => { @@ -189,7 +197,7 @@ class Relay extends Server { }).catch(err => { this.emit('error', err) }) - this.conLog('Connecting to', this.options.destination.host, this.options.destination.port) + this.conLog('Connecting to', options.host, options.port) client.outLog = ds.upOutLog client.inLog = ds.upInLog client.once('join', () => { From 19bc2519e7d29ce79e8d2107d42b52eaef783f96 Mon Sep 17 00:00:00 2001 From: extremeheat Date: Wed, 22 Jun 2022 14:57:33 -0400 Subject: [PATCH 089/273] types: add 1.19.2 to versions Add 1.19.2 to versions --- index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.d.ts b/index.d.ts index 746506f..37ff132 100644 --- a/index.d.ts +++ b/index.d.ts @@ -2,7 +2,7 @@ import EventEmitter from "events" import { Realm } from "prismarine-realms" declare module "bedrock-protocol" { - type Version = '1.18.31' | '1.18.30' | '1.18.12' | '1.18.11' | '1.18.10' | '1.18.2' | '1.18.1' | '1.18.0' | '1.17.41' | '1.17.40' | '1.17.34' | '1.17.30' | '1.17.11' | '1.17.10' | '1.17.0' | '1.16.220' | '1.16.210' | '1.16.201' + type Version = '1.19.2' | '1.19.1' | '1.18.31' | '1.18.30' | '1.18.12' | '1.18.11' | '1.18.10' | '1.18.2' | '1.18.1' | '1.18.0' | '1.17.41' | '1.17.40' | '1.17.34' | '1.17.30' | '1.17.11' | '1.17.10' | '1.17.0' | '1.16.220' | '1.16.210' | '1.16.201' enum title { MinecraftNintendoSwitch, MinecraftJava } From bdaf21b8edba3ecb5a02a823d2f601567fd3fe7f Mon Sep 17 00:00:00 2001 From: extremeheat Date: Fri, 24 Jun 2022 04:31:22 -0400 Subject: [PATCH 090/273] CI: increase timeout to 12min --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 79e0818..da29ac7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,7 +18,7 @@ jobs: os: [ubuntu-latest, windows-latest] node-version: [16.x] runs-on: ${{ matrix.os }} - timeout-minutes: 10 + timeout-minutes: 12 steps: - uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.node-version }} From 149b4fe182ae5c2f87065c48f90c22057adeae0e Mon Sep 17 00:00:00 2001 From: LucienHH <66429271+LucienHH@users.noreply.github.com> Date: Fri, 24 Jun 2022 23:48:33 +0100 Subject: [PATCH 091/273] Update auth.js (#231) --- src/client/auth.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/client/auth.js b/src/client/auth.js index 6e31da7..a16b41a 100644 --- a/src/client/auth.js +++ b/src/client/auth.js @@ -21,20 +21,24 @@ async function realmAuthenticate (options) { options.authflow = new PrismarineAuth(options.username, options.profilesFolder, options, options.onMsaCode) const api = RealmAPI.from(options.authflow, 'bedrock') - const realms = await api.getRealms() - debug('realms', realms) - - if (!realms || !realms.length) throw Error('Couldn\'t find any Realms for the authenticated account') + const getRealms = async () => { + const realms = await api.getRealms() + debug('realms', realms) + if (!realms.length) throw Error('Couldn\'t find any Realms for the authenticated account') + return realms + } let realm if (options.realms.realmId) { + const realms = await getRealms() realm = realms.find(e => e.id === Number(options.realms.realmId)) } else if (options.realms.realmInvite) { realm = await api.getRealmFromInvite(options.realms.realmInvite) } else if (options.realms.pickRealm) { if (typeof options.realms.pickRealm !== 'function') throw Error('realms.pickRealm must be a function') + const realms = await getRealms() realm = await options.realms.pickRealm(realms) } From 7263714562b72b437958ea638c7e9b88034ff33b Mon Sep 17 00:00:00 2001 From: Jonathan Nagy Date: Tue, 28 Jun 2022 11:49:54 +1000 Subject: [PATCH 092/273] Fix chat echo sample (#233) * Fix chat echo sample The `client.options.username` reference is optional for online connections. Referencing it here when it is null will not filter out the echo text, causing an infinite loop. * Update client.js --- README.md | 2 +- examples/client/client.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 3707b1d..a72aea1 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ const client = bedrock.createClient({ }) client.on('text', (packet) => { // Listen for chat messages and echo them back. - if (packet.source_name != client.options.username) { + if (packet.source_name != client.username) { client.queue('text', { type: 'chat', needs_translation: false, source_name: client.username, xuid: '', platform_chat_id: '', message: `${packet.source_name} said: ${packet.message} on ${new Date().toLocaleString()}` diff --git a/examples/client/client.js b/examples/client/client.js index c10710a..7bbd028 100644 --- a/examples/client/client.js +++ b/examples/client/client.js @@ -8,10 +8,10 @@ const client = bedrock.createClient({ }) client.on('text', (packet) => { // Listen for chat messages and echo them back. - if (packet.source_name != client.options.username) { + if (packet.source_name != client.username) { client.queue('text', { type: 'chat', needs_translation: false, source_name: client.username, xuid: '', platform_chat_id: '', message: `${packet.source_name} said: ${packet.message} on ${new Date().toLocaleString()}` }) } -}) \ No newline at end of file +}) From 87a958e4abf034d225446804681c88e11edf9fb6 Mon Sep 17 00:00:00 2001 From: extremeheat Date: Mon, 18 Jul 2022 16:33:58 -0400 Subject: [PATCH 093/273] Prereq update for 1.19.10 changes to server join flow --- test/internal.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/internal.js b/test/internal.js index 22c6c87..51e1f71 100644 --- a/test/internal.js +++ b/test/internal.js @@ -65,7 +65,10 @@ async function startTest (version = CURRENT_VERSION, ok) { client.queue('set_time', { time: 5433771 }) client.queue('set_difficulty', { difficulty: 1 }) client.queue('set_commands_enabled', { enabled: true }) - client.queue('adventure_settings', get('packets/adventure_settings.json')) + + if (client.versionLessThan('1.19.10')) { + client.queue('adventure_settings', get('packets/adventure_settings.json')) + } client.queue('biome_definition_list', get('packets/biome_definition_list.json')) client.queue('available_entity_identifiers', get('packets/available_entity_identifiers.json')) @@ -207,5 +210,5 @@ async function timedTest (version, timeout = 1000 * 220) { console.info('✔ ok') } -// if (!module.parent) timedTest('1.16.210') +// if (!module.parent) timedTest('1.19.10') module.exports = { startTest, timedTest, requestChunks } From 1542ab63d191895640730e5dc33abf263d223f4f Mon Sep 17 00:00:00 2001 From: extremeheat Date: Mon, 18 Jul 2022 22:03:01 -0400 Subject: [PATCH 094/273] Release 3.15.0 (#236) * Update options.js * Update package.json * Update README.md * Update index.d.ts * Update HISTORY.md --- HISTORY.md | 5 +++++ README.md | 2 +- index.d.ts | 2 +- package.json | 2 +- src/options.js | 2 +- 5 files changed, 9 insertions(+), 4 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index c5e1156..5528d70 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,3 +1,8 @@ +## 3.15.0 +* 1.19.10 support +* Remove Realm fetch when joining via invite (#228) @LucienHH +* Add Realm support to Relay (#226) @ATXLtheAxolotl + ## 3.14.0 * 1.19 support * Better handle ping timeout, update documentation (#218) @stevarino diff --git a/README.md b/README.md index a72aea1..0c2a1db 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Minecraft Bedrock Edition (aka MCPE) protocol library, supporting authentication ## Features - - Supports Minecraft Bedrock version 1.16.201, 1.16.210, 1.16.220, 1.17.0, 1.17.10, 1.17.30, 1.17.40, 1.18.0, 1.18.11, 1.18.30, 1.19.1 + - Supports Minecraft Bedrock version 1.16.201, 1.16.210, 1.16.220, 1.17.0, 1.17.10, 1.17.30, 1.17.40, 1.18.0, 1.18.11, 1.18.30, 1.19.1, 1.19.10 - Parse and serialize packets as JavaScript objects - Automatically respond to keep-alive packets - [Proxy and mitm connections](docs/API.md#proxy-docs) diff --git a/index.d.ts b/index.d.ts index 37ff132..5570ae3 100644 --- a/index.d.ts +++ b/index.d.ts @@ -2,7 +2,7 @@ import EventEmitter from "events" import { Realm } from "prismarine-realms" declare module "bedrock-protocol" { - type Version = '1.19.2' | '1.19.1' | '1.18.31' | '1.18.30' | '1.18.12' | '1.18.11' | '1.18.10' | '1.18.2' | '1.18.1' | '1.18.0' | '1.17.41' | '1.17.40' | '1.17.34' | '1.17.30' | '1.17.11' | '1.17.10' | '1.17.0' | '1.16.220' | '1.16.210' | '1.16.201' + type Version = '1.19.10' | '1.19.2' | '1.19.1' | '1.18.31' | '1.18.30' | '1.18.12' | '1.18.11' | '1.18.10' | '1.18.2' | '1.18.1' | '1.18.0' | '1.17.41' | '1.17.40' | '1.17.34' | '1.17.30' | '1.17.11' | '1.17.10' | '1.17.0' | '1.16.220' | '1.16.210' | '1.16.201' enum title { MinecraftNintendoSwitch, MinecraftJava } diff --git a/package.json b/package.json index 2977877..f4aaeb6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bedrock-protocol", - "version": "3.14.0", + "version": "3.15.0", "description": "Minecraft Bedrock Edition protocol library", "main": "index.js", "scripts": { diff --git a/src/options.js b/src/options.js index db3bee2..a4288fb 100644 --- a/src/options.js +++ b/src/options.js @@ -3,7 +3,7 @@ const mcData = require('minecraft-data') // Minimum supported version (< will be kicked) const MIN_VERSION = '1.16.201' // Currently supported verson. Note, clients with newer versions can still connect as long as data is in minecraft-data -const CURRENT_VERSION = '1.19.1' +const CURRENT_VERSION = '1.19.10' const Versions = Object.fromEntries(mcData.versions.bedrock.filter(e => e.releaseType === 'release').map(e => [e.minecraftVersion, e.version])) From 370ca96f2e7e2adcf5c42672acc129b5d7cc68ea Mon Sep 17 00:00:00 2001 From: extremeheat Date: Thu, 21 Jul 2022 06:24:15 -0400 Subject: [PATCH 095/273] Update startVanillaServer.js Debug log on CI --- tools/startVanillaServer.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/startVanillaServer.js b/tools/startVanillaServer.js index 8cd1565..cbd9870 100644 --- a/tools/startVanillaServer.js +++ b/tools/startVanillaServer.js @@ -1,7 +1,7 @@ const http = require('https') const fs = require('fs') const cp = require('child_process') -const debug = require('debug')('minecraft-protocol') +const debug = process.env.CI ? console.debug : require('debug')('minecraft-protocol') const https = require('https') const { getFiles, waitFor } = require('../src/datatypes/util') @@ -31,6 +31,7 @@ function fetchLatestStable () { // Download + extract vanilla server and enter the directory async function download (os, version, path = 'bds-') { + debug('Downloading server', os, version, 'into', path) process.chdir(__dirname) const verStr = version.split('.').slice(0, 3).join('.') const dir = path + version From d221da76134ab867f3dac0ebc7ab2f8a4b8c529a Mon Sep 17 00:00:00 2001 From: extremeheat Date: Tue, 26 Jul 2022 21:05:51 -0400 Subject: [PATCH 096/273] Update version list for 1.19.11 Update index.d.ts --- index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.d.ts b/index.d.ts index 5570ae3..e03ef61 100644 --- a/index.d.ts +++ b/index.d.ts @@ -2,7 +2,7 @@ import EventEmitter from "events" import { Realm } from "prismarine-realms" declare module "bedrock-protocol" { - type Version = '1.19.10' | '1.19.2' | '1.19.1' | '1.18.31' | '1.18.30' | '1.18.12' | '1.18.11' | '1.18.10' | '1.18.2' | '1.18.1' | '1.18.0' | '1.17.41' | '1.17.40' | '1.17.34' | '1.17.30' | '1.17.11' | '1.17.10' | '1.17.0' | '1.16.220' | '1.16.210' | '1.16.201' + type Version = '1.19.11' | '1.19.10' | '1.19.2' | '1.19.1' | '1.18.31' | '1.18.30' | '1.18.12' | '1.18.11' | '1.18.10' | '1.18.2' | '1.18.1' | '1.18.0' | '1.17.41' | '1.17.40' | '1.17.34' | '1.17.30' | '1.17.11' | '1.17.10' | '1.17.0' | '1.16.220' | '1.16.210' | '1.16.201' enum title { MinecraftNintendoSwitch, MinecraftJava } From b36c55e11237d025118b298a6c6062a1b92fecf3 Mon Sep 17 00:00:00 2001 From: b23r0 Date: Tue, 9 Aug 2022 15:39:27 +0800 Subject: [PATCH 097/273] Add new raknet library option (raknet-node) (#211) * add new raknet library option (raknet-node) * fix lint * fix lint & add new options * fix lint * fix user option & add rust-raknet test. * fix lint. * add raknet backend option. * remove useNativeRaknet option. * add not found log. * add test timeout size. * fix js raknet return error. * restore useNativeRaknet option. * update doc. * update options handling, back compat * fix server doc * Fix tests * fix tests. * fix lint. * delay timeout. * Update rak.js * update raknet-node version. * increase timeout. * Update vanilla.js * Update proxy.js * Update internal.js * update raknet-node version. * update rust-raknet version. * increase timeout test time * increase timeout test time * update backend version. * change timeout Co-authored-by: extremeheat --- docs/API.md | 7 ++++++- package.json | 5 +++-- src/client.js | 13 ++----------- src/createClient.js | 2 +- src/options.js | 21 ++++++++++++++++++--- src/rak.js | 21 +++++++++++---------- src/relay.js | 1 + src/server.js | 12 ++---------- test/proxy.js | 11 +++++++---- test/vanilla.js | 1 + 10 files changed, 52 insertions(+), 42 deletions(-) diff --git a/docs/API.md b/docs/API.md index 6955f91..8d0b545 100644 --- a/docs/API.md +++ b/docs/API.md @@ -19,7 +19,7 @@ Returns a `Client` instance and connects to the server. | autoInitPlayer | *optional* | default to true, If we should send SetPlayerInitialized to the server after getting play_status spawn. | | skipPing | *optional* | Whether pinging the server to check its version should be skipped. | | conLog | *optional* | Where to log connection information (server join, kick messages to). Defaults to console.log, set to `null` to not log anywhere. | -| useNativeRaknet | *optional* | Whether to use the C++ version of RakNet. Set to false to use JS. | +| raknetBackend | *optional* | Specifies the raknet implementation to use. Possible options are 'raknet-native' (default, original C++ implementation), 'jsp-raknet' (JS port), and 'raknet-node' (Rust port). Please note when using the non-JS implementation you may the need approporate build tools on your system (for example a C++ or Rust compiler). | | compressionLevel | *optional* | What zlib compression level to use, default to **7** | | batchingInterval | *optional* | How frequently, in milliseconds to flush and write the packet queue (default: 20ms) | | realms | *optional* | An object which should contain one of the following properties: `realmId`, `realmInvite`, `pickRealm`. When defined will attempt to join a Realm without needing to specify host/port. **The authenticated account must either own the Realm or have been invited to it** | @@ -27,6 +27,8 @@ Returns a `Client` instance and connects to the server. | realms.realmInvite | *optional* | The invite link/code of the Realm to join. | | realms.pickRealm | *optional* | A function which will have an array of the user Realms (joined/owned) passed to it. The function should return a Realm. | +*`useNativeRaknet` is deprecated. Setting to true will use 'raknet-native' for `raknetBackend` and setting it to false will use a JavaScript implemenation (jsp-raknet)* + The following special events are emitted by the client on top of protocol packets: * 'status' - When the client's login sequence status has changed * 'join' - When the client has joined the server after authenticating @@ -57,6 +59,9 @@ authenticated unless offline is set to true. | motd | *optional* | The "message of the day" for the server, the message shown to players in the server list. See usage below. | | advertisementFn | *optional* | optional. Custom function to call that should return a ServerAdvertisement, used for setting the RakNet server PONG data. Overrides `motd`. | | conLog | *optional* | Where to log connection information (server join, kick messages to). Default to log only in DEBUG mode. | +| raknetBackend | *optional* | Specifies the raknet implementation to use. Possible options are 'raknet-native' (default, original C++ implementation), 'jsp-raknet' (JS port), and 'raknet-node' (Rust port). Please note when using the non-JS implementation you may the need approporate build tools on your system (for example a C++ or Rust compiler). | + +*`useNativeRaknet` is deprecated. Setting to true will use 'raknet-native' for `raknetBackend` and setting it to false will use a JavaScript implemenation (jsp-raknet)* ## be.ping({ host, port }) : ServerAdvertisement diff --git a/package.json b/package.json index f4aaeb6..d29f497 100644 --- a/package.json +++ b/package.json @@ -29,10 +29,11 @@ "prismarine-nbt": "^2.0.0", "prismarine-realms": "^1.1.0", "protodef": "^1.14.0", - "uuid-1345": "^1.0.2", - "raknet-native": "^1.0.3" + "raknet-native": "^1.0.3", + "uuid-1345": "^1.0.2" }, "optionalDependencies": { + "raknet-node": "^0.4.6" }, "devDependencies": { "bedrock-protocol": "file:.", diff --git a/src/client.js b/src/client.js index 85f48df..7ec612b 100644 --- a/src/client.js +++ b/src/client.js @@ -43,7 +43,7 @@ class Client extends Connection { Login(this, null, this.options) LoginVerify(this, null, this.options) - const { RakClient } = initRaknet(this.options.useNativeRaknet) + const { RakClient } = initRaknet(this.options.raknetBackend) const host = this.options.host const port = this.options.port this.connection = new RakClient({ useWorkers: this.options.useRaknetWorkers, host, port }) @@ -67,16 +67,7 @@ class Client extends Connection { validateOptions () { if (!this.options.host || this.options.port == null) throw Error('Invalid host/port') - - if (!Options.Versions[this.options.version]) { - console.warn('Supported versions: ', Options.Versions) - throw Error(`Unsupported version ${this.options.version}`) - } - this.options.protocolVersion = Options.Versions[this.options.version] - if (this.options.protocolVersion < Options.MIN_VERSION) { - throw new Error(`Protocol version < ${Options.MIN_VERSION} : ${this.options.protocolVersion}, too old`) - } - this.compressionLevel = this.options.compressionLevel || 7 + Options.validateOptions(this.options) } get entityId () { diff --git a/src/createClient.js b/src/createClient.js index f48b1a3..a642c7c 100644 --- a/src/createClient.js +++ b/src/createClient.js @@ -1,5 +1,5 @@ const { Client } = require('./client') -const { RakClient } = require('./rak')(true) +const { RakClient } = require('./rak')('raknet-native') const { sleep } = require('./datatypes/util') const assert = require('assert') const Options = require('./options') diff --git a/src/options.js b/src/options.js index a4288fb..ae57abe 100644 --- a/src/options.js +++ b/src/options.js @@ -18,10 +18,25 @@ const defaultOptions = { offline: false, // Milliseconds to wait before aborting connection attempt connectTimeout: 9000, - // Whether or not to use C++ version of RakNet - useNativeRaknet: true, + // Specifies the raknet implementation to use + raknetBackend: 'raknet-native', // If using JS implementation of RakNet, should we use workers? (This only affects the client) useRaknetWorkers: true } -module.exports = { defaultOptions, MIN_VERSION, CURRENT_VERSION, Versions } +function validateOptions (options) { + if (!Versions[options.version]) { + console.warn('Supported versions', Versions) + throw Error(`Unsupported version ${options.version}`) + } + + options.protocolVersion = Versions[options.version] + if (options.protocolVersion < MIN_VERSION) { + throw new Error(`Protocol version < ${MIN_VERSION} : ${options.protocolVersion}, too old`) + } + this.compressionLevel = options.compressionLevel || 7 + if (options.useNativeRaknet === true) options.raknetBackend = 'raknet-native' + if (options.useNativeRaknet === false) options.raknetBackend = 'jsp-raknet' +} + +module.exports = { defaultOptions, MIN_VERSION, CURRENT_VERSION, Versions, validateOptions } diff --git a/src/rak.js b/src/rak.js index 19f313c..7b1e2f1 100644 --- a/src/rak.js +++ b/src/rak.js @@ -3,21 +3,22 @@ const ConnWorker = require('./rakWorker') const { waitFor } = require('./datatypes/util') let Client, Server, PacketPriority, EncapsulatedPacket, PacketReliability, Reliability - class RakTimeout extends Error {}; -module.exports = nativeRaknet => { - if (nativeRaknet) { - try { - ({ Client, Server, PacketPriority, PacketReliability } = require('raknet-native')) - return { RakServer: RakNativeServer, RakClient: RakNativeClient, RakTimeout } - } catch (e) { +module.exports = (backend) => { + try { + if (backend === 'jsp-raknet') { ({ Client, Server, EncapsulatedPacket, Reliability } = require('jsp-raknet')) - console.debug('[raknet] native not found, using js', e) - console.debug('You can suppress the error above by disabling `useNativeRaknet` in your options') + return { RakServer: RakJsServer, RakClient: RakJsClient, RakTimeout } } - } else { + // We need to explicitly name the require()s for bundlers + if (backend === 'raknet-node') ({ Client, Server, PacketPriority, PacketReliability } = require('raknet-node')) + if (backend === 'raknet-native') ({ Client, Server, PacketPriority, PacketReliability } = require('raknet-native')) + else ({ Client, Server, PacketPriority, PacketReliability } = require(backend)) + return { RakServer: RakNativeServer, RakClient: RakNativeClient, RakTimeout } + } catch (e) { ({ Client, Server, EncapsulatedPacket, Reliability } = require('jsp-raknet')) + console.debug('[raknet] ' + backend + ' library not found, defaulting to jsp-raknet. Correct the "raknetBackend" option to avoid this error.', e) } return { RakServer: RakJsServer, RakClient: RakJsClient, RakTimeout } } diff --git a/src/relay.js b/src/relay.js index bcb1295..8f8ba1b 100644 --- a/src/relay.js +++ b/src/relay.js @@ -182,6 +182,7 @@ class Relay extends Server { port: this.options.destination.port, onMsaCode: this.options.onMsaCode, profilesFolder: this.options.profilesFolder, + backend: this.options.backend, autoInitPlayer: false } diff --git a/src/server.js b/src/server.js index 50f3ddf..ffa5d77 100644 --- a/src/server.js +++ b/src/server.js @@ -12,7 +12,7 @@ class Server extends EventEmitter { this.options = { ...Options.defaultOptions, ...options } this.validateOptions() - this.RakServer = require('./rak')(this.options.useNativeRaknet).RakServer + this.RakServer = require('./rak')(this.options.raknetBackend).RakServer this.serializer = createSerializer(this.options.version) this.deserializer = createDeserializer(this.options.version) @@ -25,15 +25,7 @@ class Server extends EventEmitter { } validateOptions () { - if (!Options.Versions[this.options.version]) { - console.warn('Supported versions', Options.Versions) - throw Error(`Unsupported version ${this.options.version}`) - } - this.options.protocolVersion = Options.Versions[this.options.version] - if (this.options.protocolVersion < Options.MIN_VERSION) { - throw new Error(`Protocol version < ${Options.MIN_VERSION} : ${this.options.protocolVersion}, too old`) - } - this.compressionLevel = this.options.compressionLevel || 7 + Options.validateOptions(this.options) } onOpenConnection = (conn) => { diff --git a/test/proxy.js b/test/proxy.js index 2d94e05..a69b93c 100644 --- a/test/proxy.js +++ b/test/proxy.js @@ -1,7 +1,8 @@ const { createClient, createServer, Relay } = require('bedrock-protocol') const { sleep, waitFor } = require('../src/datatypes/util') -function proxyTest (version, timeout = 1000 * 40) { +function proxyTest (version, raknetBackend = 'raknet-node', timeout = 1000 * 40) { + console.log('with raknet backend', raknetBackend) return waitFor(res => { const SERVER_PORT = 19000 + ((Math.random() * 100) | 0) const CLIENT_PORT = 19000 + ((Math.random() * 100) | 0) @@ -9,6 +10,7 @@ function proxyTest (version, timeout = 1000 * 40) { host: '0.0.0.0', // optional port: SERVER_PORT, // optional offline: true, + raknetBackend, version // The server version }) @@ -34,14 +36,15 @@ function proxyTest (version, timeout = 1000 * 40) { destination: { host: '127.0.0.1', port: SERVER_PORT - } + }, + raknetBackend }) relay.conLog = console.debug relay.listen() console.debug('Proxy started', server.options.version) - const client = createClient({ host: '127.0.0.1', port: CLIENT_PORT, version, username: 'Boat', offline: true }) + const client = createClient({ host: '127.0.0.1', port: CLIENT_PORT, version, username: 'Boat', offline: true, raknetBackend }) console.debug('Client started') @@ -59,7 +62,7 @@ function proxyTest (version, timeout = 1000 * 40) { } if (!module.parent) { - proxyTest('1.16.220') + proxyTest('1.16.220', 'raknet-native') } module.exports = { proxyTest } diff --git a/test/vanilla.js b/test/vanilla.js index ac1cdda..e67bdaa 100644 --- a/test/vanilla.js +++ b/test/vanilla.js @@ -15,6 +15,7 @@ async function test (version) { port: 19130, username: 'Notch', version, + raknetBackend: 'raknet-node', offline: true }) From d1ba61978813ed65f8e3a26af2fa43300a2e1e06 Mon Sep 17 00:00:00 2001 From: extremeheat Date: Wed, 10 Aug 2022 13:29:46 -0400 Subject: [PATCH 098/273] Fix proxy test waiting condition (#250) * Fix proxy test waiting condition * update test command * Update proxy.js * Update proxy.js * Update proxy.js --- package.json | 2 +- test/proxy.js | 15 +++++++-------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index d29f497..ac756e1 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "main": "index.js", "scripts": { "build": "cd tools && node compileProtocol.js", - "test": "mocha --bail", + "test": "mocha --bail --exit", "pretest": "npm run lint", "lint": "standard", "vanillaServer": "node tools/startVanillaServer.js", diff --git a/test/proxy.js b/test/proxy.js index a69b93c..a1df25e 100644 --- a/test/proxy.js +++ b/test/proxy.js @@ -1,18 +1,19 @@ -const { createClient, createServer, Relay } = require('bedrock-protocol') +const { createClient, Server, Relay } = require('bedrock-protocol') const { sleep, waitFor } = require('../src/datatypes/util') function proxyTest (version, raknetBackend = 'raknet-node', timeout = 1000 * 40) { console.log('with raknet backend', raknetBackend) - return waitFor(res => { + return waitFor(async res => { const SERVER_PORT = 19000 + ((Math.random() * 100) | 0) const CLIENT_PORT = 19000 + ((Math.random() * 100) | 0) - const server = createServer({ + const server = new Server({ host: '0.0.0.0', // optional port: SERVER_PORT, // optional offline: true, raknetBackend, version // The server version }) + await server.listen() server.on('connect', client => { console.debug('Client has connected') @@ -40,16 +41,14 @@ function proxyTest (version, raknetBackend = 'raknet-node', timeout = 1000 * 40) raknetBackend }) relay.conLog = console.debug - relay.listen() + await relay.listen() console.debug('Proxy started', server.options.version) - const client = createClient({ host: '127.0.0.1', port: CLIENT_PORT, version, username: 'Boat', offline: true, raknetBackend }) - + const client = createClient({ host: '127.0.0.1', port: CLIENT_PORT, version, username: 'Boat', offline: true, raknetBackend, skipPing: true }) console.debug('Client started') - + client.on('error', console.log) client.on('packet', console.log) - client.on('disconnect', packet => { console.assert(packet.message === 'Hello world !') From 0c77d8e25240de60bba15b75e801992ba82bf78d Mon Sep 17 00:00:00 2001 From: extremeheat Date: Thu, 11 Aug 2022 21:16:32 -0400 Subject: [PATCH 099/273] 1.19.20 support (#251) * Update options.js * Update README.md --- README.md | 2 +- src/options.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0c2a1db..4333feb 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Minecraft Bedrock Edition (aka MCPE) protocol library, supporting authentication ## Features - - Supports Minecraft Bedrock version 1.16.201, 1.16.210, 1.16.220, 1.17.0, 1.17.10, 1.17.30, 1.17.40, 1.18.0, 1.18.11, 1.18.30, 1.19.1, 1.19.10 + - Supports Minecraft Bedrock version 1.16.201, 1.16.210, 1.16.220, 1.17.0, 1.17.10, 1.17.30, 1.17.40, 1.18.0, 1.18.11, 1.18.30, 1.19.1, 1.19.10, 1.19.20 - Parse and serialize packets as JavaScript objects - Automatically respond to keep-alive packets - [Proxy and mitm connections](docs/API.md#proxy-docs) diff --git a/src/options.js b/src/options.js index ae57abe..3289893 100644 --- a/src/options.js +++ b/src/options.js @@ -3,7 +3,7 @@ const mcData = require('minecraft-data') // Minimum supported version (< will be kicked) const MIN_VERSION = '1.16.201' // Currently supported verson. Note, clients with newer versions can still connect as long as data is in minecraft-data -const CURRENT_VERSION = '1.19.10' +const CURRENT_VERSION = '1.19.20' const Versions = Object.fromEntries(mcData.versions.bedrock.filter(e => e.releaseType === 'release').map(e => [e.minecraftVersion, e.version])) From e10c6133ec831c95a9d22b147905cbb1404a97bc Mon Sep 17 00:00:00 2001 From: extremeheat Date: Thu, 11 Aug 2022 21:49:53 -0400 Subject: [PATCH 100/273] Release 3.16.0 (#252) * Update package.json * Update HISTORY.md --- HISTORY.md | 4 ++++ package.json | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/HISTORY.md b/HISTORY.md index 5528d70..0faaedb 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,3 +1,7 @@ +## 3.16.0 +* 1.19.20 support (#251) +* Add new raknet library option (raknet-node) (#211) @b23r0 + ## 3.15.0 * 1.19.10 support * Remove Realm fetch when joining via invite (#228) @LucienHH diff --git a/package.json b/package.json index ac756e1..3f4d628 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bedrock-protocol", - "version": "3.15.0", + "version": "3.16.0", "description": "Minecraft Bedrock Edition protocol library", "main": "index.js", "scripts": { From 3a0071f0ef027b9c2f7a8b746b2c05b826de021b Mon Sep 17 00:00:00 2001 From: CleSucre <47931504+CleSucre@users.noreply.github.com> Date: Wed, 17 Aug 2022 05:25:24 +0200 Subject: [PATCH 101/273] Add fields from 1.19.20 to login chain data (#259) * Update Properties * Ci Fix --- src/handshake/login.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/handshake/login.js b/src/handshake/login.js index cf76d96..3c47e47 100644 --- a/src/handshake/login.js +++ b/src/handshake/login.js @@ -60,7 +60,10 @@ module.exports = (client, server, options) => { ThirdPartyName: client.profile.name, ThirdPartyNameOnly: false, - UIProfile: 0 + UIProfile: 0, + + IsEditorMode: false, + TrustedSkin: false } const customPayload = options.skinData || {} payload = { ...payload, ...customPayload } From ce06762dce92079426bdc99e0fc93dfe827faf27 Mon Sep 17 00:00:00 2001 From: Miniontoby <47940064+Miniontoby@users.noreply.github.com> Date: Wed, 24 Aug 2022 06:34:14 +0200 Subject: [PATCH 102/273] test: Add -u flag unzipping vanilla server (#262) * Fixed startVanillaServer.js I fixed the CI by editing startVanillaServer.js and adding -u to unzip and tar * Update startVanillaServer.js --- tools/startVanillaServer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/startVanillaServer.js b/tools/startVanillaServer.js index cbd9870..4740bef 100644 --- a/tools/startVanillaServer.js +++ b/tools/startVanillaServer.js @@ -62,7 +62,7 @@ async function download (os, version, path = 'bds-') { await get(found, 'bds.zip') console.info('⚡ Unzipping') // Unzip server - if (process.platform === 'linux') cp.execSync('unzip bds.zip && chmod +777 ./bedrock_server') + if (process.platform === 'linux') cp.execSync('unzip -u bds.zip && chmod +777 ./bedrock_server') else cp.execSync('tar -xf bds.zip') return verStr } From c395f0b05b1ba820aa172995c19bb89ecd0fc9ba Mon Sep 17 00:00:00 2001 From: extremeheat Date: Wed, 24 Aug 2022 00:41:12 -0400 Subject: [PATCH 103/273] relay: Add multi-user login support (#258) * relay: add multi-user login support * relay: Fix close handling, connect username --- docs/API.md | 2 +- index.d.ts | 12 ++++++++++++ src/relay.js | 29 +++++++++++++++++++++++++---- 3 files changed, 38 insertions(+), 5 deletions(-) diff --git a/docs/API.md b/docs/API.md index 8d0b545..2f23b2d 100644 --- a/docs/API.md +++ b/docs/API.md @@ -170,7 +170,7 @@ For documentation on the protocol, and packets/fields see the [the protocol doc] ### Proxy docs -You can create a proxy ("Relay") to create a machine-in-the-middle (MITM) connection to a server. You can observe and intercept packets as they go through. The Relay is a server+client combo with some special packet handling and forwarding that takes care of the authentication and encryption on the server side. You'll be asked to login if `offline` is not specified once you connect. +You can create a proxy ("Relay") to create a machine-in-the-middle (MITM) connection to a server. You can observe and intercept packets as they go through. The Relay is a server+client combo with some special packet handling and forwarding that takes care of the authentication and encryption on the server side. Clients will be asked to login if `offline` is not specified on connection. ```js const { Relay } = require('bedrock-protocol') diff --git a/index.d.ts b/index.d.ts index e03ef61..140a05a 100644 --- a/index.d.ts +++ b/index.d.ts @@ -131,6 +131,10 @@ declare module "bedrock-protocol" { * Close the connection. Already called by disconnect. Call this to manually close RakNet connection. */ close() + + on(event: 'login', cb: () => void) + on(event: 'join', cb: () => void) + on(event: 'close', cb: (reason: string) => void) } export class Server extends EventEmitter { @@ -161,6 +165,14 @@ declare module "bedrock-protocol" { } // Whether to enable chunk caching (default: false) enableChunkCaching?: boolean + + // Only allow one client to connect at a time (default: false) + forceSinge: boolean + + // Dispatched when a new client has logged in, and we need authentication + // tokens to join the backend server. Cached after the first login. + // If this is not specified, the client will be disconnected with a login prompt. + onMsaCode(data, client) } export class Relay extends Server { diff --git a/src/relay.js b/src/relay.js index 8f8ba1b..385ebf3 100644 --- a/src/relay.js +++ b/src/relay.js @@ -159,7 +159,7 @@ class Relay extends Server { constructor (options) { super(options) this.RelayPlayer = options.relayPlayer || RelayPlayer - this.forceSingle = true + this.forceSingle = options.forceSingle this.upstreams = new Map() this.conLog = debug this.enableChunkCaching = options.enableChunkCaching @@ -175,12 +175,18 @@ class Relay extends Server { const options = { authTitle: this.options.authTitle, offline: this.options.destination.offline ?? this.options.offline, - username: this.options.offline ? ds.profile.name : null, + username: this.options.offline ? ds.profile.name : ds.profile.xuid, version: this.options.version, realms: this.options.destination.realms, host: this.options.destination.host, port: this.options.destination.port, - onMsaCode: this.options.onMsaCode, + onMsaCode: (code) => { + if (this.options.onMsaCode) { + this.options.onMsaCode(code, ds) + } else { + ds.disconnect("It's your first time joining. Please sign in and reconnect to join this server:\n\n" + code.message) + } + }, profilesFolder: this.options.profilesFolder, backend: this.options.backend, autoInitPlayer: false @@ -213,6 +219,16 @@ class Relay extends Server { this.emit('join', /* client connected to proxy */ ds, /* backend server */ client) }) + client.on('error', (err) => { + ds.disconnect('Server error: ' + err.message) + debug(clientAddr, 'was disconnected because of error', err) + this.upstreams.delete(clientAddr.hash) + }) + client.on('close', (reason) => { + ds.disconnect('Backend server closed connection') + this.upstreams.delete(clientAddr.hash) + }) + this.upstreams.set(clientAddr.hash, client) } @@ -225,7 +241,7 @@ class Relay extends Server { this.conLog('closed upstream connection', clientAddr) } - // Called when a new player connects to our proxy server. Once the player has authenticted, + // Called when a new player connects to our proxy server. Once the player has authenticated, // we can open an upstream connection to the backend server. onOpenConnection = (conn) => { if (this.forceSingle && this.clientCount > 0) { @@ -240,6 +256,11 @@ class Relay extends Server { player.on('login', () => { this.openUpstreamConnection(player, conn.address) }) + player.on('close', (reason) => { + this.conLog('player disconnected', conn.address, reason) + this.clientCount-- + delete this.clients[conn.address] + }) } } From f5c91ba1c920860162389eb2fcbd5871c4b6467c Mon Sep 17 00:00:00 2001 From: extremeheat Date: Wed, 24 Aug 2022 00:50:01 -0400 Subject: [PATCH 104/273] Fix nbt encoding size on single null tag NBT (#264) --- src/datatypes/minecraft.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/datatypes/minecraft.js b/src/datatypes/minecraft.js index a52d9c8..5b93bc0 100644 --- a/src/datatypes/minecraft.js +++ b/src/datatypes/minecraft.js @@ -39,17 +39,21 @@ function sizeOfNbt (value) { function readNbtLE (buffer, offset) { const r = protoLE.read(buffer, offset, 'nbt') - if (r.value.type === 'end') return { value: r.value, size: 0 } + // End size is 3 for some reason + if (r.value.type === 'end') return { value: r.value, size: 1 } return r } function writeNbtLE (value, buffer, offset) { - if (value.type === 'end') return offset + if (value.type === 'end') { + buffer.writeInt8(0, offset) + return offset + 1 + } return protoLE.write(value, buffer, offset, 'nbt') } function sizeOfNbtLE (value) { - if (value.type === 'end') return 0 + if (value.type === 'end') return 1 return protoLE.sizeOf(value, 'nbt') } From 262a4eee00fd0cbce7280b934c8413b1e971730c Mon Sep 17 00:00:00 2001 From: extremeheat Date: Wed, 24 Aug 2022 04:45:44 -0400 Subject: [PATCH 105/273] Release 3.17.0 (#265) --- HISTORY.md | 6 ++++++ package.json | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/HISTORY.md b/HISTORY.md index 0faaedb..b6c84f2 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,3 +1,9 @@ +## 3.17.0 +* relay: Add multi-user login support (#258) +* Add fields from 1.19.20 to login chain data (#259) @CleSucre +* Fix nbt encoding size on single null tag NBT (#264) +* test: Add -u flag unzipping vanilla server (#262) + ## 3.16.0 * 1.19.20 support (#251) * Add new raknet library option (raknet-node) (#211) @b23r0 diff --git a/package.json b/package.json index 3f4d628..860ba94 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bedrock-protocol", - "version": "3.16.0", + "version": "3.17.0", "description": "Minecraft Bedrock Edition protocol library", "main": "index.js", "scripts": { From 7264cbe31267196994706d55fa85394c3c794f7e Mon Sep 17 00:00:00 2001 From: extremeheat Date: Thu, 25 Aug 2022 12:06:57 -0400 Subject: [PATCH 106/273] 1.19.21 support (#266) * Update options.js * Update README.md --- README.md | 2 +- src/options.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4333feb..7acad89 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Minecraft Bedrock Edition (aka MCPE) protocol library, supporting authentication ## Features - - Supports Minecraft Bedrock version 1.16.201, 1.16.210, 1.16.220, 1.17.0, 1.17.10, 1.17.30, 1.17.40, 1.18.0, 1.18.11, 1.18.30, 1.19.1, 1.19.10, 1.19.20 + - Supports Minecraft Bedrock version 1.16.201, 1.16.210, 1.16.220, 1.17.0, 1.17.10, 1.17.30, 1.17.40, 1.18.0, 1.18.11, 1.18.30, 1.19.1, 1.19.10, 1.19.20, 1.19.21 - Parse and serialize packets as JavaScript objects - Automatically respond to keep-alive packets - [Proxy and mitm connections](docs/API.md#proxy-docs) diff --git a/src/options.js b/src/options.js index 3289893..e081536 100644 --- a/src/options.js +++ b/src/options.js @@ -3,7 +3,7 @@ const mcData = require('minecraft-data') // Minimum supported version (< will be kicked) const MIN_VERSION = '1.16.201' // Currently supported verson. Note, clients with newer versions can still connect as long as data is in minecraft-data -const CURRENT_VERSION = '1.19.20' +const CURRENT_VERSION = '1.19.21' const Versions = Object.fromEntries(mcData.versions.bedrock.filter(e => e.releaseType === 'release').map(e => [e.minecraftVersion, e.version])) From 8913d48f42cd1a89ed78f1a99426dbefb2667927 Mon Sep 17 00:00:00 2001 From: extremeheat Date: Thu, 25 Aug 2022 12:49:43 -0400 Subject: [PATCH 107/273] Release 3.18.0 (#267) * Update HISTORY.md * Update package.json --- HISTORY.md | 3 +++ package.json | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/HISTORY.md b/HISTORY.md index b6c84f2..eef8822 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,3 +1,6 @@ +## 3.18.0 +* 1.19.21 support (#266) + ## 3.17.0 * relay: Add multi-user login support (#258) * Add fields from 1.19.20 to login chain data (#259) @CleSucre diff --git a/package.json b/package.json index 860ba94..bcd4e44 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bedrock-protocol", - "version": "3.17.0", + "version": "3.18.0", "description": "Minecraft Bedrock Edition protocol library", "main": "index.js", "scripts": { From ffe0fb42b5849d63ff8f8315ff4fb377d0491219 Mon Sep 17 00:00:00 2001 From: extremeheat Date: Thu, 25 Aug 2022 14:05:14 -0400 Subject: [PATCH 108/273] Update index.d.ts --- index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.d.ts b/index.d.ts index 140a05a..91e491b 100644 --- a/index.d.ts +++ b/index.d.ts @@ -2,7 +2,7 @@ import EventEmitter from "events" import { Realm } from "prismarine-realms" declare module "bedrock-protocol" { - type Version = '1.19.11' | '1.19.10' | '1.19.2' | '1.19.1' | '1.18.31' | '1.18.30' | '1.18.12' | '1.18.11' | '1.18.10' | '1.18.2' | '1.18.1' | '1.18.0' | '1.17.41' | '1.17.40' | '1.17.34' | '1.17.30' | '1.17.11' | '1.17.10' | '1.17.0' | '1.16.220' | '1.16.210' | '1.16.201' + type Version = '1.19.21' | '1.19.20' | '1.19.11' | '1.19.10' | '1.19.2' | '1.19.1' | '1.18.31' | '1.18.30' | '1.18.12' | '1.18.11' | '1.18.10' | '1.18.2' | '1.18.1' | '1.18.0' | '1.17.41' | '1.17.40' | '1.17.34' | '1.17.30' | '1.17.11' | '1.17.10' | '1.17.0' | '1.16.220' | '1.16.210' | '1.16.201' enum title { MinecraftNintendoSwitch, MinecraftJava } From 9d717744b6441791f67c680d3bef086d3fd2514d Mon Sep 17 00:00:00 2001 From: extremeheat Date: Thu, 1 Sep 2022 15:37:45 -0400 Subject: [PATCH 109/273] Add 1.19.22 to types --- index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.d.ts b/index.d.ts index 91e491b..54a44be 100644 --- a/index.d.ts +++ b/index.d.ts @@ -2,7 +2,7 @@ import EventEmitter from "events" import { Realm } from "prismarine-realms" declare module "bedrock-protocol" { - type Version = '1.19.21' | '1.19.20' | '1.19.11' | '1.19.10' | '1.19.2' | '1.19.1' | '1.18.31' | '1.18.30' | '1.18.12' | '1.18.11' | '1.18.10' | '1.18.2' | '1.18.1' | '1.18.0' | '1.17.41' | '1.17.40' | '1.17.34' | '1.17.30' | '1.17.11' | '1.17.10' | '1.17.0' | '1.16.220' | '1.16.210' | '1.16.201' + type Version = '1.19.22' | '1.19.21' | '1.19.20' | '1.19.11' | '1.19.10' | '1.19.2' | '1.19.1' | '1.18.31' | '1.18.30' | '1.18.12' | '1.18.11' | '1.18.10' | '1.18.2' | '1.18.1' | '1.18.0' | '1.17.41' | '1.17.40' | '1.17.34' | '1.17.30' | '1.17.11' | '1.17.10' | '1.17.0' | '1.16.220' | '1.16.210' | '1.16.201' enum title { MinecraftNintendoSwitch, MinecraftJava } From bf2de1dcf4f44e33f72a06480aa851055de1eab8 Mon Sep 17 00:00:00 2001 From: Stephen O'Connor Date: Sun, 11 Sep 2022 20:19:32 -0700 Subject: [PATCH 110/273] Add Get-AppxPackage command to FAQ.md (#276) --- docs/FAQ.md | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/docs/FAQ.md b/docs/FAQ.md index 556eedf..852d884 100644 --- a/docs/FAQ.md +++ b/docs/FAQ.md @@ -5,6 +5,21 @@ This issue occurs due to loopback restrictions on Windows 10 UWP apps. To lift t ```ps CheckNetIsolation LoopbackExempt -a -n="Microsoft.MinecraftUWP_8wekyb3d8bbwe" ``` + +If you are running a preview or beta release, you can run the following command to unlock that version: + +```ps +CheckNetIsolation LoopbackExempt -a -n="Microsoft.MinecraftWindowsBeta" +``` + +If that still doesn't work, you can inspect what Minecraft versions are available on your system with: + +```ps +Get-AppxPackage -AllUsers | Where Name -Match ".*Minecraft.*" | Select Name,InstallLocation,PackageFullName +``` + +Use the PackageFullName field in place of the `Microsoft.MinecraftUWP_8wekyb3d8bbwe` for the command above. + ## Kicked during login -Some servers can kick you if you don't set `authTitle` as explained in the README. \ No newline at end of file +Some servers can kick you if you don't set `authTitle` as explained in the README. From d3a085a2606a0424d6c8e584570e0cc429f01c7f Mon Sep 17 00:00:00 2001 From: Stephen O'Connor Date: Wed, 14 Sep 2022 19:31:31 -0700 Subject: [PATCH 111/273] Add Port Redirect Functionality (#278) --- src/createClient.js | 7 ++++++- src/server/advertisement.js | 12 ++++++++++-- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/src/createClient.js b/src/createClient.js index a642c7c..7fe0d9b 100644 --- a/src/createClient.js +++ b/src/createClient.js @@ -19,7 +19,12 @@ function createClient (options) { ping(client.options).then(ad => { const adVersion = ad.version?.split('.').slice(0, 3).join('.') // Only 3 version units client.options.version = options.version ?? (Options.Versions[adVersion] ? adVersion : Options.CURRENT_VERSION) - client.conLog?.(`Connecting to server ${ad.motd} (${ad.name}), version ${ad.version}`, client.options.version !== ad.version ? ` (as ${client.options.version})` : '') + + if (ad.port) { + client.options.port = ad.port + } + + client.conLog?.(`Connecting to ${client.options.host}:${client.options.port} ${ad.motd} (${ad.levelName}), version ${ad.version}`, client.options.version !== ad.version ? ` (as ${client.options.version})` : '') client.init() }).catch(e => client.emit('error', e)) } diff --git a/src/server/advertisement.js b/src/server/advertisement.js index 3e069db..ff5f08a 100644 --- a/src/server/advertisement.js +++ b/src/server/advertisement.js @@ -7,6 +7,9 @@ class ServerAdvertisement { playersMax = 5 gamemode = 'Creative' serverId = '0' + gamemodeId = 1 + port = undefined + portV6 = undefined constructor (obj, version = CURRENT_VERSION) { if (obj?.name) obj.motd = obj.name @@ -16,8 +19,13 @@ class ServerAdvertisement { } fromString (str) { - const [header, motd, protocol, version, playersOnline, playersMax, serverId, levelName, gamemode] = str.split(';') - Object.assign(this, { header, motd, protocol, version, playersOnline, playersMax, serverId, levelName, gamemode }) + const [header, motd, protocol, version, playersOnline, playersMax, serverId, levelName, gamemode, gamemodeId, port, portV6] = str.split(';') + Object.assign(this, { header, motd, protocol, version, playersOnline, playersMax, serverId, levelName, gamemode, gamemodeId, port, portV6 }) + for (const numeric of ['playersOnline', 'playersMax', 'gamemodeId', 'port', 'portV6']) { + if (this[numeric] !== undefined) { + this[numeric] = parseInt(this[numeric]) + } + } return this } From 99153c2de296a46880f637f9c10f8b6dc9dd66fd Mon Sep 17 00:00:00 2001 From: extremeheat Date: Thu, 22 Sep 2022 15:14:49 -0400 Subject: [PATCH 112/273] Add option for port redirection, fix Realm handling (#282) * Port Redirect Fix - Only Redirect on Unspecified Port * Update to use `followPort` option Co-authored-by: Stephen O'Connor --- docs/API.md | 3 ++- index.d.ts | 2 ++ src/createClient.js | 6 +++--- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/docs/API.md b/docs/API.md index 2f23b2d..97b616f 100644 --- a/docs/API.md +++ b/docs/API.md @@ -16,8 +16,9 @@ Returns a `Client` instance and connects to the server. | connectTimeout | *optional* | default to **9000ms**. How long to wait in milliseconds while trying to connect to server. | | onMsaCode | *optional* | Callback called when signing in with a microsoft account with device code auth, `data` is an object documented [here](https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-device-code#device-authorization-response) | | profilesFolder | *optional* | Where to store cached authentication tokens. Defaults to .minecraft, or the node_modules folder if not found. | -| autoInitPlayer | *optional* | default to true, If we should send SetPlayerInitialized to the server after getting play_status spawn. | | skipPing | *optional* | Whether pinging the server to check its version should be skipped. | +| followPort | *optional* | Update the options' port parameter to match the port broadcast on the server's ping data (default to true if `realms` not specified) | +| autoInitPlayer | *optional* | default to true, If we should send SetPlayerInitialized to the server after getting play_status spawn. | | conLog | *optional* | Where to log connection information (server join, kick messages to). Defaults to console.log, set to `null` to not log anywhere. | | raknetBackend | *optional* | Specifies the raknet implementation to use. Possible options are 'raknet-native' (default, original C++ implementation), 'jsp-raknet' (JS port), and 'raknet-node' (Rust port). Please note when using the non-JS implementation you may the need approporate build tools on your system (for example a C++ or Rust compiler). | | compressionLevel | *optional* | What zlib compression level to use, default to **7** | diff --git a/index.d.ts b/index.d.ts index 54a44be..a439d28 100644 --- a/index.d.ts +++ b/index.d.ts @@ -39,6 +39,8 @@ declare module "bedrock-protocol" { connectTimeout?: number // whether to skip initial ping and immediately connect skipPing?: boolean + // Update the options' port parameter to match the port broadcast on the server's ping data (default to true if `realms` not specified) + followPort?: boolean // where to log connection information to (default to console.log) conLog? // used to join a Realm instead of supplying a host/port diff --git a/src/createClient.js b/src/createClient.js index 7fe0d9b..17b9d31 100644 --- a/src/createClient.js +++ b/src/createClient.js @@ -9,7 +9,7 @@ const auth = require('./client/auth') /** @param {{ version?: number, host: string, port?: number, connectTimeout?: number, skipPing?: boolean }} options */ function createClient (options) { assert(options) - const client = new Client({ port: 19132, ...options, delayedInit: true }) + const client = new Client({ port: 19132, followPort: !options.realms, ...options, delayedInit: true }) function onServerInfo () { client.on('connect_allowed', () => connect(client)) @@ -20,11 +20,11 @@ function createClient (options) { const adVersion = ad.version?.split('.').slice(0, 3).join('.') // Only 3 version units client.options.version = options.version ?? (Options.Versions[adVersion] ? adVersion : Options.CURRENT_VERSION) - if (ad.port) { + if (ad.port && options.followPort) { client.options.port = ad.port } - client.conLog?.(`Connecting to ${client.options.host}:${client.options.port} ${ad.motd} (${ad.levelName}), version ${ad.version}`, client.options.version !== ad.version ? ` (as ${client.options.version})` : '') + client.conLog?.(`Connecting to ${client.options.host}:${client.options.port} ${ad.motd} (${ad.levelName}), version ${ad.version} ${client.options.version !== ad.version ? ` (as ${client.options.version})` : ''}`) client.init() }).catch(e => client.emit('error', e)) } From 30c583fcf3bf9f86764cedc616afd434343a8a73 Mon Sep 17 00:00:00 2001 From: extremeheat Date: Thu, 22 Sep 2022 22:47:17 -0400 Subject: [PATCH 113/273] Release 3.19.0 (#283) * Update HISTORY.md * Update package.json * Remove viewer example * Update HISTORY.md --- HISTORY.md | 6 + examples/viewer/client/BotProvider.js | 58 ----- examples/viewer/client/BotViewer.js | 150 ----------- examples/viewer/client/Chunk.js | 18 -- examples/viewer/client/ClientProvider.js | 114 --------- examples/viewer/client/ProxyProvider.js | 89 ------- examples/viewer/client/app.css | 22 -- examples/viewer/client/index.html | 22 -- examples/viewer/client/index.js | 4 - examples/viewer/client/movements.js | 304 ----------------------- examples/viewer/client/preload.js | 9 - examples/viewer/client/util.js | 22 -- examples/viewer/client/worker.js | 2 - examples/viewer/index.js | 44 ---- examples/viewer/package.json | 15 -- package.json | 2 +- 16 files changed, 7 insertions(+), 874 deletions(-) delete mode 100644 examples/viewer/client/BotProvider.js delete mode 100644 examples/viewer/client/BotViewer.js delete mode 100644 examples/viewer/client/Chunk.js delete mode 100644 examples/viewer/client/ClientProvider.js delete mode 100644 examples/viewer/client/ProxyProvider.js delete mode 100644 examples/viewer/client/app.css delete mode 100644 examples/viewer/client/index.html delete mode 100644 examples/viewer/client/index.js delete mode 100644 examples/viewer/client/movements.js delete mode 100644 examples/viewer/client/preload.js delete mode 100644 examples/viewer/client/util.js delete mode 100644 examples/viewer/client/worker.js delete mode 100644 examples/viewer/index.js delete mode 100644 examples/viewer/package.json diff --git a/HISTORY.md b/HISTORY.md index eef8822..8ac1d94 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,3 +1,9 @@ +## 3.19.0 +* Add option for port redirection, fix Realm handling (#282) +* Add Port Redirect Functionality (#278) @stevarino +* Add Get-AppxPackage command to FAQ.md (#276) @stevarino +* Remove viewer example + ## 3.18.0 * 1.19.21 support (#266) diff --git a/examples/viewer/client/BotProvider.js b/examples/viewer/client/BotProvider.js deleted file mode 100644 index 4d23377..0000000 --- a/examples/viewer/client/BotProvider.js +++ /dev/null @@ -1,58 +0,0 @@ -const { Version } = require('bedrock-provider') -const { WorldView } = require('prismarine-viewer/viewer') -const World = require('prismarine-world')() -const ChunkColumn = require('./Chunk')() -const { MovementManager } = require('./movements') - -class BotProvider extends WorldView { - chunks = {} - lastSentPos - positionUpdated = true - - constructor () { - super() - this.connect() - this.listenToBot() - this.world = new World() - this.movements = new MovementManager(this) - - this.onKeyDown = () => {} - this.onKeyUp = () => {} - - this.removeAllListeners('mouseClick') - } - - raycast () { - // TODO : fix - } - - get entity () { return this.movements.player.entity } - - handleChunk (packet, render = true) { - const hash = (packet.x << 4) + ',' + (packet.z << 4) - if (this.loadChunk[hash]) return - const cc = new ChunkColumn(Version.v1_4_0, packet.x, packet.z) - cc.networkDecodeNoCache(packet.payload, packet.sub_chunk_count).then(() => { - this.loadedChunks[hash] = true - this.world.setColumn(packet.x, packet.z, cc) - const chunk = cc.serialize() - // console.log('Chunk', chunk) - if (render) this.emitter.emit('loadChunk', { x: packet.x << 4, z: packet.z << 4, chunk }) - }) - } - - updatePlayerCamera (id, position, yaw, pitch, updateState) { - this.emit('playerMove', id, { position, yaw, pitch }) - - if (updateState) { - this.movements.updatePosition(position, yaw, pitch) - } - } - - stopBot () { - clearInterval(this.tickLoop) - this.movements.stopPhys() - } -} - -module.exports = { BotProvider } diff --git a/examples/viewer/client/BotViewer.js b/examples/viewer/client/BotViewer.js deleted file mode 100644 index 57f9d16..0000000 --- a/examples/viewer/client/BotViewer.js +++ /dev/null @@ -1,150 +0,0 @@ -/* global THREE */ -const { Viewer, MapControls } = require('prismarine-viewer/viewer') -// const { Vec3 } = require('vec3') -const { ClientProvider } = require('./ClientProvider') -// const { ProxyProvider } = require('./ProxyProvider') -global.THREE = require('three') - -const MCVER = '1.16.1' - -class BotViewer { - start () { - this.bot = new ClientProvider() - // this.bot = new ProxyProvider() - // Create three.js context, add to page - this.renderer = new THREE.WebGLRenderer() - this.renderer.setPixelRatio(window.devicePixelRatio || 1) - this.renderer.setSize(window.innerWidth, window.innerHeight) - document.body.appendChild(this.renderer.domElement) - - // Create viewer - this.viewer = new Viewer(this.renderer) - this.viewer.setVersion(MCVER) - // Attach controls to viewer - this.controls = new MapControls(this.viewer.camera, this.renderer.domElement) - // Enable damping (inertia) on movement - this.controls.enableDamping = true - this.controls.dampingFactor = 0.09 - console.info('Registered handlers') - // Link WorldView and Viewer - this.viewer.listen(this.bot) - - this.bot.on('spawn', ({ position, firstPerson }) => { - // Initialize viewer, load chunks - this.bot.init(position) - // Start listening for keys - this.registerBrowserEvents() - - if (firstPerson && this.bot.movements) { - this.viewer.camera.position.set(position.x, position.y, position.z) - this.firstPerson = true - this.controls.enabled = false - } else { - this.viewer.camera.position.set(position.x, position.y, position.z) - } - }) - - this.bot.on('playerMove', (id, pos) => { - if (this.firstPerson && id < 10) { - this.setFirstPersonCamera(pos) - return - } - - window.viewer.viewer.entities.update({ - name: 'player', - id, - pos: pos.position, - width: 0.6, - height: 1.8, - yaw: pos.yaw, - pitch: pos.pitch - }) - }) - - const oldFov = this.viewer.camera.fov - const sprintFov = this.viewer.camera.fov + 20 - const sneakFov = this.viewer.camera.fov - 10 - - const onSprint = () => { - this.viewer.camera.fov = sprintFov - this.viewer.camera.updateProjectionMatrix() - } - - const onSneak = () => { - this.viewer.camera.fov = sneakFov - this.viewer.camera.updateProjectionMatrix() - } - - const onRelease = () => { - this.viewer.camera.fov = oldFov - this.viewer.camera.updateProjectionMatrix() - } - - this.bot.on('startSprint', onSprint) - this.bot.on('startSneak', onSneak) - this.bot.on('stopSprint', onRelease) - this.bot.on('stopSneak', onRelease) - - this.controls.update() - - // Browser animation loop - const animate = () => { - window.requestAnimationFrame(animate) - if (this.controls && !this.firstPerson) this.controls.update() - this.viewer.update() - this.renderer.render(this.viewer.scene, this.viewer.camera) - } - animate() - - window.addEventListener('resize', () => { - this.viewer.camera.aspect = window.innerWidth / window.innerHeight - this.viewer.camera.updateProjectionMatrix() - this.renderer.setSize(window.innerWidth, window.innerHeight) - }) - } - - onMouseMove = (e) => { - if (this.firstPerson) { - this.bot.entity.pitch -= e.movementY * 0.005 - this.bot.entity.yaw -= e.movementX * 0.004 - } - } - - onPointerLockChange = () => { - const e = this.renderer.domElement - if (document.pointerLockElement === e) { - e.parentElement.addEventListener('mousemove', this.onMouseMove, { passive: true }) - } else { - e.parentElement.removeEventListener('mousemove', this.onMouseMove, false) - } - } - - onMouseDown = () => { - if (this.firstPerson && !document.pointerLockElement) { - this.renderer.domElement.requestPointerLock() - } - } - - registerBrowserEvents () { - const e = this.renderer.domElement - e.parentElement.addEventListener('keydown', this.bot.onKeyDown) - e.parentElement.addEventListener('keyup', this.bot.onKeyUp) - e.parentElement.addEventListener('mousedown', this.onMouseDown) - document.addEventListener('pointerlockchange', this.onPointerLockChange, false) - } - - unregisterBrowserEvents () { - const e = this.renderer.domElement - e.parentElement.removeEventListener('keydown', this.bot.onKeyDown) - e.parentElement.removeEventListener('keyup', this.bot.onKeyUp) - e.parentElement.removeEventListener('mousemove', this.onMouseMove) - e.parentElement.removeEventListener('mousedown', this.onMouseDown) - document.removeEventListener('pointerlockchange', this.onPointerLockChange, false) - } - - setFirstPersonCamera (entity) { - this.viewer.setFirstPersonCamera(entity.position, entity.yaw, entity.pitch * 2) - } -} - -module.exports = { BotViewer } diff --git a/examples/viewer/client/Chunk.js b/examples/viewer/client/Chunk.js deleted file mode 100644 index 7733cc3..0000000 --- a/examples/viewer/client/Chunk.js +++ /dev/null @@ -1,18 +0,0 @@ -const { ChunkColumn } = require('bedrock-provider') - -const Block = require('prismarine-block')('1.16.1') - -class ChunkColumnWrapped extends ChunkColumn { // pchunk compatiblity wrapper - // Block access - setBlockStateId (pos, stateId) { - super.setBlock(pos.x, pos.y, pos.z, Block.fromStateId(stateId)) - } - - getBlockStateId (pos) { - return super.getBlock(pos.x, pos.y, pos.z)?.stateId - } -} - -module.exports = (version) => { - return ChunkColumnWrapped -} diff --git a/examples/viewer/client/ClientProvider.js b/examples/viewer/client/ClientProvider.js deleted file mode 100644 index 73d7b8f..0000000 --- a/examples/viewer/client/ClientProvider.js +++ /dev/null @@ -1,114 +0,0 @@ -const { Client } = require('bedrock-protocol') -const { BotProvider } = require('./BotProvider') - -const controlMap = { - forward: ['KeyW', 'KeyZ'], - back: 'KeyS', - left: ['KeyA', 'KeyQ'], - right: 'KeyD', - sneak: 'ShiftLeft', - jump: 'Space' -} - -class ClientProvider extends BotProvider { - downKeys = new Set() - - connect () { - const client = new Client({ host: '127.0.0.1', version: '1.16.210', username: 'notch', offline: true, port: 19132, connectTimeout: 100000 }) - - client.once('resource_packs_info', (packet) => { - client.write('resource_pack_client_response', { - response_status: 'completed', - resourcepackids: [] - }) - - client.once('resource_pack_stack', (stack) => { - client.write('resource_pack_client_response', { - response_status: 'completed', - resourcepackids: [] - }) - }) - - client.queue('client_cache_status', { enabled: false }) - client.queue('request_chunk_radius', { chunk_radius: 1 }) - - this.heartbeat = setInterval(() => { - client.queue('tick_sync', { request_time: BigInt(Date.now()), response_time: 0n }) - }) - }) - - this.client = client - } - - close () { - this.client?.close() - } - - listenToBot () { - this.client.on('connect', () => { - console.log('Bot has connected!') - }) - this.client.on('start_game', packet => { - this.updatePosition(packet.player_position) - this.movements.init('server', packet.player_position, /* vel */ null, packet.rotation.z || 0, packet.rotation.x || 0, 0) - }) - - this.client.on('spawn', () => { - this.movements.startPhys() - // server allows client to render chunks & spawn in world - this.emit('spawn', { position: this.lastPos, firstPerson: true }) - - this.tickLoop = setInterval(() => { - this.client.queue('tick_sync', { request_time: BigInt(Date.now()), response_time: 0n }) - }) - }) - - this.client.on('level_chunk', packet => { - this.handleChunk(packet) - }) - - this.client.on('move_player', packet => { - if (packet.runtime_id === this.client.entityId) { - this.movements.updatePosition(packet.position, packet.yaw, packet.pitch, packet.head_yaw, packet.tick) - } - }) - - this.client.on('set_entity_motion', packet => { - // if (packet.runtime_id === this.client.entityId) this.updatePosition(packet.position) - }) - - this.client.on('tick_sync', (packet) => { - this.lastTick = packet.response_time - }) - } - - onKeyDown = (evt) => { - const code = evt.code - for (const control in controlMap) { - if (controlMap[control].includes(code)) { - this.movements.setControlState(control, true) - break - } - if (evt.ctrlKey) { - this.movements.setControlState('sprint', true) - } - } - this.downKeys.add(code) - } - - onKeyUp = (evt) => { - const code = evt.code - if (code === 'ControlLeft' && this.downKeys.has('ControlLeft')) { - this.movements.setControlState('sprint', false) - } - for (const control in controlMap) { - if (controlMap[control].includes(code)) { - this.movements.setControlState(control, false) - break - } - } - this.downKeys.delete(code) - } -} - -module.exports = { ClientProvider } diff --git a/examples/viewer/client/ProxyProvider.js b/examples/viewer/client/ProxyProvider.js deleted file mode 100644 index 8ffc599..0000000 --- a/examples/viewer/client/ProxyProvider.js +++ /dev/null @@ -1,89 +0,0 @@ -const { Relay } = require('bedrock-protocol') -const { BotProvider } = require('./BotProvider') -const { diff } = require('./util') - -class ProxyProvider extends BotProvider { - lastPlayerMovePacket - - connect () { - const proxy = new Relay({ - host: '0.0.0.0', - port: 19130, - // logging: true, - destination: { - host: '127.0.0.1', - port: 19132 - } - }) - proxy.listen() - console.info('Waiting for connect') - - proxy.on('join', (client, server) => { - client.on('clientbound', ({ name, params }) => { - if (name === 'level_chunk') { - this.handleChunk(params, true) - } else if (name === 'start_game') { - this.movements.init('', params.player_position, null, params.rotation.z, params.rotation.x, 0) - } else if (name === 'play_status') { - this.movements.startPhys() - this.emit('spawn', { position: this.movements.lastPos, firstPerson: true }) - console.info('Started physics!') - } else if (name === 'move_player') { - console.log('move_player', params) - this.movements.updatePosition(params.position, params.yaw, params.pitch, params.head_yaw, params.tick) - } - - if (name.includes('entity') || name.includes('network_chunk_publisher_update') || name.includes('tick') || name.includes('level')) return - console.log('CB', name) - }) - - client.on('serverbound', ({ name, params }) => { - // { name, params } - if (name === 'player_auth_input') { - this.movements.pushInputState(params.input_data, params.yaw, params.pitch) - this.movements.pushCameraControl(params, 1) - - // Log Movement deltas - { // eslint-disable-line - this.lastMovePacket = params - if (this.firstPlayerMovePacket) { - const id = diff(this.firstPlayerMovePacket.input_data, params.input_data) - const md = diff(this.firstPlayerMovePacket.move_vector, params.move_vector) - const dd = diff(this.firstPlayerMovePacket.delta, params.delta) - if (id || md) { - if (globalThis.logging) console.log('Move', params.position, id, md, dd) - globalThis.movements ??= [] - globalThis.movements.push(params) - } - } - if (!this.firstPlayerMovePacket) { - this.firstPlayerMovePacket = params - for (const key in params.input_data) { - params.input_data[key] = false - } - params.input_data._value = 0n - params.move_vector = { x: 0, z: 0 } - params.delta = { x: 0, y: 0, z: 0 } - } - } - } else if (!name.includes('tick') && !name.includes('level')) { - console.log('Sending', name) - } - }) - console.info('Client and Server Connected!') - }) - - this.proxy = proxy - } - - listenToBot () { - - } - - close () { - this.proxy?.close() - } -} - -module.exports = { ProxyProvider } -globalThis.logging = true diff --git a/examples/viewer/client/app.css b/examples/viewer/client/app.css deleted file mode 100644 index 44c6bea..0000000 --- a/examples/viewer/client/app.css +++ /dev/null @@ -1,22 +0,0 @@ -html { - overflow: hidden; -} - -html, body { - height: 100%; - margin: 0; - padding: 0; - font-family: sans-serif; -} - -a { - text-decoration: none; -} - -canvas { - height: 100%; - width: 100%; - font-size: 0; - margin: 0; - padding: 0; -} diff --git a/examples/viewer/client/index.html b/examples/viewer/client/index.html deleted file mode 100644 index 537be49..0000000 --- a/examples/viewer/client/index.html +++ /dev/null @@ -1,22 +0,0 @@ - - - - - Prismarine Viewer - - - - - -
-
Prismarine Viewer
- -
-
Connecting to 127.0.0.1, port 19132...
-
-
- - - - - \ No newline at end of file diff --git a/examples/viewer/client/index.js b/examples/viewer/client/index.js deleted file mode 100644 index 1b0334d..0000000 --- a/examples/viewer/client/index.js +++ /dev/null @@ -1,4 +0,0 @@ -const { BotViewer } = require('./BotViewer') - -global.viewer = new BotViewer() -global.viewer.start() diff --git a/examples/viewer/client/movements.js b/examples/viewer/client/movements.js deleted file mode 100644 index 92b6630..0000000 --- a/examples/viewer/client/movements.js +++ /dev/null @@ -1,304 +0,0 @@ -const { Physics, PlayerState } = require('prismarine-physics') -const { performance } = require('perf_hooks') -const { d2r, r2d } = require('./util') -const vec3 = require('vec3') - -const PHYSICS_INTERVAL_MS = 50 -const PHYSICS_TIMESTEP = PHYSICS_INTERVAL_MS / 1000 -const AXES = ['forward', 'back', 'left', 'right'] - -class MovementManager { - // Server auth movement : we send inputs, server calculates position & sends back - serverMovements = false - - constructor (bot) { - this.bot = bot - this.world = bot.world - // Physics tick - this.tick = 0n - } - - get lastPos () { return this.player.entity.position.clone() } - set lastPos (newPos) { this.player.entity.position.set(newPos.x, newPos.y, newPos.z) } - get lastRot () { return vec3(this.player.entity.yaw, this.player.entity.pitch, this.player.entity.headYaw) } - set lastRot (rot) { - if (!isNaN(rot.x)) this.player.entity.yaw = rot.x - if (!isNaN(rot.y)) this.player.entity.pitch = rot.y - if (!isNaN(rot.z)) this.player.entity.headYaw = rot.z - } - - // Ask the server to be in a new position - requestPosition (time, inputState) { - const positionUpdated = !this.lastSentPos || !this.lastPos.equals(this.lastSentPos) - const rotationUpdated = !this.lastSentRot || !this.lastRot.equals(this.lastSentRot) - - if (positionUpdated || rotationUpdated) { - this.lastSentPos = this.lastPos.clone() - // console.log('We computed', this.lastPos) - this.bot.updatePlayerCamera(2, this.lastSentPos, this.playerState.yaw, this.playerState.pitch || this.player.entity.pitch) - if (this.serverMovements) { - globalThis.movePayload = { - pitch: r2d(this.player.entity.pitch), - yaw: r2d(this.player.entity.yaw), - position: { - x: this.lastPos.x, - y: this.lastPos.y + 1.62, - z: this.lastPos.z - }, - move_vector: { // Minecraft coords, N: Z+1, S: Z-1, W: X+1, E: X-1 - x: inputState.left ? 1 : (inputState.right ? -1 : 0), - z: inputState.up ? 1 : (inputState.down ? -1 : 0) - }, - head_yaw: r2d(this.player.entity.yaw), - input_data: inputState, - input_mode: 'mouse', - play_mode: 'screen', - tick: this.tick, - delta: this.lastSentPos?.minus(this.lastPos) ?? { x: 0, y: 0, z: 0 } - } - this.bot.client.queue('player_auth_input', globalThis.movePayload) - } - - this.positionUpdated = false - this.lastSentPos = this.lastPos - this.lastSentRot = this.lastRot - } - } - - init (movementAuthority, position, velocity, yaw = 0, pitch = 0, headYaw = 0) { - if (movementAuthority.includes('server')) { - this.serverMovements = true - } - this.player = { - version: '1.16.1', - inventory: { - slots: [] - }, - entity: { - effects: {}, - position: vec3(position), - velocity: vec3(velocity), - onGround: false, - isInWater: false, - isInLava: false, - isInWeb: false, - isCollidedHorizontally: false, - isCollidedVertically: false, - yaw, - pitch, - headYaw // bedrock - }, - events: { // Control events to send next tick - startSprint: false, - stopSprint: false, - startSneak: false, - stopSneak: false - }, - sprinting: false, - jumpTicks: 0, - jumpQueued: false, - downJump: false - } - - const mcData = require('minecraft-data')('1.16.1') - this.physics = Physics(mcData, this.world) - this.controls = { - forward: false, - back: false, - left: false, - right: false, - jump: false, - sprint: false, - sneak: false - } - } - - // This function should be executed each tick (every 0.05 seconds) - // How it works: https://gafferongames.com/post/fix_your_timestep/ - timeAccumulator = 0 - lastPhysicsFrameTime = null - inputQueue = [] - doPhysics () { - const now = performance.now() - const deltaSeconds = (now - this.lastPhysicsFrameTime) / 1000 - this.lastPhysicsFrameTime = now - - this.timeAccumulator += deltaSeconds - - while (this.timeAccumulator >= PHYSICS_TIMESTEP) { - const q = this.inputQueue.shift() - if (q) { - Object.assign(this.playerState.control, q) - if (!isNaN(q.yaw)) this.player.entity.yaw = q.yaw - if (!isNaN(q.pitch)) this.player.entity.pitch = q.pitch - } - this.playerState = new PlayerState(this.player, this.controls) - this.physics.simulatePlayer(this.playerState, this.world.sync).apply(this.player) - this.lastPos = this.playerState.pos - this.requestPosition(PHYSICS_TIMESTEP, { - ascend: false, - descend: false, - // Players bob up and down in water, north jump is true when going up. - // In water this is only true after the player has reached max height before bobbing back down. - north_jump: this.player.jumpTicks > 0, // Jump - jump_down: this.controls.jump, // Jump - sprint_down: this.controls.sprint, - change_height: false, - jumping: this.controls.jump, // Jump - auto_jumping_in_water: false, - sneaking: false, - sneak_down: false, - up: this.controls.forward, - down: this.controls.back, - left: this.controls.right, - right: this.controls.left, - up_left: false, - up_right: false, - want_up: this.controls.jump, // Jump - want_down: false, - want_down_slow: false, - want_up_slow: false, - sprinting: false, - ascend_scaffolding: false, - descend_scaffolding: false, - sneak_toggle_down: false, - persist_sneak: false, - start_sprinting: this.player.events.startSprint || false, - stop_sprinting: this.player.events.stopSprint || false, - start_sneaking: this.player.events.startSneak || false, - stop_sneaking: this.player.events.stopSneak || false, - // Player is Update Aqatic swimming - start_swimming: false, - // Player stops Update Aqatic swimming - stop_swimming: false, - start_jumping: this.player.jumpTicks === 1, // Jump - start_gliding: false, - stop_gliding: false - }) - this.timeAccumulator -= PHYSICS_TIMESTEP - this.tick++ - } - } - - startPhys () { - console.log('Start phys') - this.physicsLoop = setInterval(() => { - this.doPhysics() - }, PHYSICS_INTERVAL_MS) - } - - get sprinting () { - return this.player.sprinting - } - - set sprinting (val) { - this.player.events.startSprint = val - this.player.events.stopSprint = !val - if (val && !this.player.sprinting) { - this.bot.emit('startSprint') - } else { - this.bot.emit('stopSprint') - } - this.player.sprinting = val - } - - _lastInput = { control: '', time: 0 } - - /** - * Sets the active control state and also keeps track of key toggles. - * @param {'forward' | 'back' | 'left' | 'right' | 'jump' | 'sprint' | 'sneak'} control - * @param {boolean} state - */ - setControlState (control, state, time = Date.now()) { - // HACK ! switch left and right, fixes control issue - if (control === 'left') control = 'right' - else if (control === 'right') control = 'left' - - if (this.controls[control] === state) return - - const isAxis = AXES.includes(control) - let hasOtherAxisKeyDown = false - for (const c of AXES) { - if (this.controls[c] && c !== control) { - hasOtherAxisKeyDown = true - } - } - - if (control === 'sprint') { - if (state && hasOtherAxisKeyDown) { // sprint down + a axis movement key - this.sprinting = true - } else if ((!state || !hasOtherAxisKeyDown) && this.sprinting) { // sprint up or movement key up & current sprinting - this.bot.emit('stopSprint') - this.sprinting = false - } - } else if (isAxis && this.controls.sprint) { - if (!state && !hasOtherAxisKeyDown) { - this.sprinting = false - } else if (state && !hasOtherAxisKeyDown) { - this.sprinting = true - } - } else if (control === 'sneak') { - if (state) { - this.player.events.startSneak = true - this.bot.emit('startSneak') - } else { - this.player.events.stopSneak = true - this.bot.emit('stopSneak') - } - } else if (control === 'forward' && this._lastInput.control === 'forward' && (Date.now() - this._lastInput.time) < 100 && !this.controls.sprint) { - // double tap forward within 0.5 seconds, toggle sprint - // this.controls.sprint = true - // this.sprinting = true - } - - this._lastInput = { control, time } - this.controls[control] = state - } - - stopPhys () { - clearInterval(this.physicsLoop) - } - - // Called when a proxy player sends a PlayerInputPacket. We need to apply these inputs tick-by-tick - // as these packets are sent by the client every tick. - pushInputState (state, yaw, pitch) { - const yawRad = d2r(yaw) - const pitchRad = d2r(pitch) - this.inputQueue.push({ - forward: state.up, - back: state.down, // TODO: left and right switched ??? - left: state.right, - right: state.left, - jump: state.jump_down, - sneak: state.sneak_down, - yaw: yawRad, - pitch: pitchRad - }) - // debug - globalThis.debugYaw = [yaw, yawRad] - } - - // Called when a proxy player sends a PlayerInputPacket. We need to apply these inputs tick-by-tick - // as these packets are sent by the client every tick. - pushCameraControl (state, id = 1) { - let { x, y, z } = state.position - if (id === 1) y -= 1.62 // account for player bb - const adjPos = vec3({ x, y, z }) - // Sneak resyncs the position for easy testing - this.bot.updatePlayerCamera(id, adjPos, d2r(state.yaw), d2r(state.pitch), state.input_data.sneak_down) - } - - // Server gives us a new position - updatePosition (pos, yaw, pitch, headYaw, tick) { - this.lastPos = pos - this.lastRot = { x: yaw, y: pitch, z: headYaw } - if (tick) this.tick = tick - } - - // User has moved the camera. Update the movements stored. - onViewerCameraMove (newYaw, newPitch, newHeadYaw) { - this.lastRot = { x: newYaw, y: newPitch, z: newHeadYaw } - } -} - -module.exports = { MovementManager } diff --git a/examples/viewer/client/preload.js b/examples/viewer/client/preload.js deleted file mode 100644 index 58594b5..0000000 --- a/examples/viewer/client/preload.js +++ /dev/null @@ -1,9 +0,0 @@ -// Required to detect electron in prismarine-viewer -globalThis.isElectron = true - -// If you need to disable node integration: -// * Node.js APIs will only be avaliable in this file -// * Use this file to load a viewer manager class -// based on one of the examples -// * Expose this class to the global window -// * Interact with the class in your code diff --git a/examples/viewer/client/util.js b/examples/viewer/client/util.js deleted file mode 100644 index c947af9..0000000 --- a/examples/viewer/client/util.js +++ /dev/null @@ -1,22 +0,0 @@ -const difference = (o1, o2) => Object.keys(o2).reduce((diff, key) => { - if (o1[key] === o2[key]) return diff - return { - ...diff, - [key]: o2[key] - } -}, {}) - -const diff = (o1, o2) => { const dif = difference(o1, o2); return Object.keys(dif).length ? dif : null } - -const d2r = deg => (180 - (deg < 0 ? (360 + deg) : deg)) * (Math.PI / 180) -const r2d = rad => { - let deg = rad * (180 / Math.PI) - deg = deg % 360 - return 180 - deg -} - -module.exports = { - diff, - d2r, - r2d -} diff --git a/examples/viewer/client/worker.js b/examples/viewer/client/worker.js deleted file mode 100644 index 23ff320..0000000 --- a/examples/viewer/client/worker.js +++ /dev/null @@ -1,2 +0,0 @@ -// hack for path resolving -require('prismarine-viewer/viewer/lib/worker') diff --git a/examples/viewer/index.js b/examples/viewer/index.js deleted file mode 100644 index 2147fd5..0000000 --- a/examples/viewer/index.js +++ /dev/null @@ -1,44 +0,0 @@ -const path = require('path') -const { app, BrowserWindow, globalShortcut } = require('electron') - -function createMainWindow () { - const window = new BrowserWindow({ - webPreferences: { - nodeIntegration: true, - nodeIntegrationInWorker: true, - contextIsolation: false, - preload: path.join(__dirname, './client/preload.js') - } - }) - - // Open dev tools on load - window.webContents.openDevTools() - - window.loadFile(path.join(__dirname, './client/index.html')) - - window.webContents.on('devtools-opened', () => { - window.focus() - setImmediate(() => { - window.focus() - }) - }) - - return window -} - -app.on('ready', () => { - const win = createMainWindow() - - globalShortcut.register('CommandOrControl+W', () => { - win.webContents.sendInputEvent({ - type: 'keyDown', - keyCode: 'W' - }) - }) -}) - -app.on('window-all-closed', function () { - app.quit() -}) - -app.allowRendererProcessReuse = false diff --git a/examples/viewer/package.json b/examples/viewer/package.json deleted file mode 100644 index 9895117..0000000 --- a/examples/viewer/package.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "name": "bedrock-protocol-viewer", - "description": "bedrock-protocol prismarine-viewer example", - "scripts": { - "start": "electron ." - }, - "dependencies": { - "bedrock-protocol": "file:../../", - "browserify-cipher": "^1.0.1", - "electron": "^12.0.2", - "patch-package": "^6.4.7", - "prismarine-physics": "^1.2.2", - "prismarine-viewer": "^1.19.1" - } -} diff --git a/package.json b/package.json index bcd4e44..46c0b1b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bedrock-protocol", - "version": "3.18.0", + "version": "3.19.0", "description": "Minecraft Bedrock Edition protocol library", "main": "index.js", "scripts": { From f88c8d0bc4ed252ad24ec3f9ad25da603dbc4db3 Mon Sep 17 00:00:00 2001 From: extremeheat Date: Sat, 24 Sep 2022 13:53:26 -0400 Subject: [PATCH 114/273] 1.19.30 support, improve error handling and server pong data (#284) * Update server advertisement * 1.19.30 protocol support * Handle configurable compressor * Support updated 1.19.30 login flow with NetworkSettings * Improve serialization error handling on client * refactor compressor handling * Fix client on older versions, fix internal error handling * Improve error handling * Log console connection errors; use raknet-native for proxy test --- src/client.js | 43 ++++++++++++++++++++++++++--- src/connection.js | 21 +++++++++------ src/datatypes/util.js | 4 +-- src/options.js | 10 +++++-- src/rak.js | 7 ++--- src/server.js | 35 ++++++++++++++++++++++-- src/server/advertisement.js | 27 ++++++++++++------- src/serverPlayer.js | 52 +++++++++++++++++++++++++++++------- src/transforms/framer.js | 44 +++++++++++++++++++++--------- src/transforms/serializer.js | 7 +---- test/internal.js | 4 +-- test/proxy.js | 8 +++--- tools/startVanillaServer.js | 11 +++++--- 13 files changed, 205 insertions(+), 68 deletions(-) diff --git a/src/client.js b/src/client.js index 7ec612b..ed287aa 100644 --- a/src/client.js +++ b/src/client.js @@ -8,6 +8,7 @@ const initRaknet = require('./rak') const { KeyExchange } = require('./handshake/keyExchange') const Login = require('./handshake/login') const LoginVerify = require('./handshake/loginVerify') +const fs = require('fs') const debugging = false @@ -22,6 +23,10 @@ class Client extends Connection { this.startGameData = {} this.clientRuntimeId = null + // Start off without compression on 1.19.30, zlib on below + this.compressionAlgorithm = this.versionGreaterThanOrEqualTo('1.19.30') ? 'none' : 'deflate' + this.compressionThreshold = 512 + this.compressionLevel = this.options.compressionLevel if (isDebug) { this.inLog = (...args) => debug('C ->', ...args) @@ -46,7 +51,7 @@ class Client extends Connection { const { RakClient } = initRaknet(this.options.raknetBackend) const host = this.options.host const port = this.options.port - this.connection = new RakClient({ useWorkers: this.options.useRaknetWorkers, host, port }) + this.connection = new RakClient({ useWorkers: this.options.useRaknetWorkers, host, port }, this) this.emit('connect_allowed') } @@ -76,7 +81,7 @@ class Client extends Connection { onEncapsulated = (encapsulated, inetAddr) => { const buffer = Buffer.from(encapsulated.buffer) - this.handle(buffer) + process.nextTick(() => this.handle(buffer)) } async ping () { @@ -90,8 +95,18 @@ class Client extends Connection { _connect = async (sessionData) => { debug('[client] connecting to', this.options.host, this.options.port, sessionData, this.connection) - this.connection.onConnected = () => this.sendLogin() - this.connection.onCloseConnection = (reason) => this.close() + this.connection.onConnected = () => { + this.status = ClientStatus.Connecting + if (this.versionGreaterThanOrEqualTo('1.19.30')) { + this.queue('request_network_settings', { client_protocol: this.options.protocolVersion }) + } else { + this.sendLogin() + } + } + this.connection.onCloseConnection = (reason) => { + if (this.status === ClientStatus.Disconnected) this.conLog?.(`Server closed connection: ${reason}`) + this.close() + } this.connection.onEncapsulated = this.onEncapsulated this.connection.connect() @@ -103,6 +118,11 @@ class Client extends Connection { }, this.options.connectTimeout || 9000) } + updateCompressorSettings (packet) { + this.compressionAlgorithm = packet.compression_algorithm || 'deflate' + this.compressionThreshold = packet.compression_threshold + } + sendLogin () { this.status = ClientStatus.Authenticating this.createClientChain(null, this.options.offline) @@ -174,6 +194,15 @@ class Client extends Connection { try { var des = this.deserializer.parsePacketBuffer(packet) // eslint-disable-line } catch (e) { + // Dump information about the packet only if user is not handling error event. + if (this.listenerCount('error') === 0) { + if (packet.length > 1000) { + fs.writeFileSync('packetReadError.txt', packet.toString('hex')) + console.log(`Deserialization failure for packet 0x${packet.slice(0, 1).toString('hex')}. Packet buffer saved in ./packetReadError.txt as buffer was too large (${packet.length} bytes).`) + } else { + console.log('Read failure for 0x' + packet.slice(0, 1).toString('hex'), packet.slice(0, 1000)) + } + } this.emit('error', e) return } @@ -193,6 +222,12 @@ class Client extends Connection { case 'server_to_client_handshake': this.emit('client.server_handshake', des.data.params) break + case 'network_settings': + this.updateCompressorSettings(des.data.params) + if (this.status === ClientStatus.Connecting) { + this.sendLogin() + } + break case 'disconnect': // Client kicked this.emit(des.data.name, des.data.params) // Emit before we kill all listeners. this.onDisconnectRequest(des.data.params) diff --git a/src/connection.js b/src/connection.js index ddd60b1..bc1d56b 100644 --- a/src/connection.js +++ b/src/connection.js @@ -1,14 +1,15 @@ -const Framer = require('./transforms/framer') const cipher = require('./transforms/encryption') const { EventEmitter } = require('events') const { Versions } = require('./options') const debug = require('debug')('minecraft-protocol') +const { Framer } = require('./transforms/framer') const ClientStatus = { Disconnected: 0, - Authenticating: 1, // Handshaking - Initializing: 2, // Authed, need to spawn - Initialized: 3 // play_status spawn sent by server, client responded with SetPlayerInit packet + Connecting: 1, + Authenticating: 2, // Handshaking + Initializing: 3, // Authed, need to spawn + Initialized: 4 // play_status spawn sent by server, client responded with SetPlayerInit packet } class Connection extends EventEmitter { @@ -34,6 +35,10 @@ class Connection extends EventEmitter { return this.options.protocolVersion > (typeof version === 'string' ? Versions[version] : version) } + versionGreaterThanOrEqualTo (version) { + return this.options.protocolVersion >= (typeof version === 'string' ? Versions[version] : version) + } + startEncryption (iv) { this.encryptionEnabled = true this.inLog?.('Started encryption', this.sharedSecret, iv) @@ -60,7 +65,7 @@ class Connection extends EventEmitter { write (name, params) { this.outLog?.(name, params) if (name === 'start_game') this.updateItemPalette(params.itemstates) - const batch = new Framer(this.compressionLevel) + const batch = new Framer(this.compressionAlgorithm, this.compressionLevel, this.compressionThreshold) const packet = this.serializer.createPacketBuffer({ name, params }) batch.addEncodedPacket(packet) @@ -86,7 +91,7 @@ class Connection extends EventEmitter { _tick () { if (this.sendQ.length) { - const batch = new Framer(this.compressionLevel) + const batch = new Framer(this.compressionAlgorithm, this.compressionLevel, this.compressionThreshold) batch.addEncodedPackets(this.sendQ) this.sendQ = [] this.sendIds = [] @@ -110,7 +115,7 @@ class Connection extends EventEmitter { */ sendBuffer (buffer, immediate = false) { if (immediate) { - const batch = new Framer(this.compressionLevel) + const batch = new Framer(this.compressionAlgorithm, this.compressionLevel, this.compressionThreshold) batch.addEncodedPacket(buffer) if (this.encryptionEnabled) { this.sendEncryptedBatch(batch) @@ -162,7 +167,7 @@ class Connection extends EventEmitter { if (this.encryptionEnabled) { this.decrypt(buffer.slice(1)) } else { - const packets = Framer.decode(buffer) + const packets = Framer.decode(this.compressionAlgorithm, buffer) for (const packet of packets) { this.readPacket(packet) } diff --git a/src/datatypes/util.js b/src/datatypes/util.js index 4b29d57..7070ce5 100644 --- a/src/datatypes/util.js +++ b/src/datatypes/util.js @@ -23,11 +23,11 @@ function sleep (ms) { async function waitFor (cb, withTimeout, onTimeout) { let t const ret = await Promise.race([ - new Promise(resolve => cb(resolve)), + new Promise((resolve, reject) => cb(resolve, reject)), new Promise(resolve => { t = setTimeout(() => resolve('timeout'), withTimeout) }) ]) clearTimeout(t) - if (ret === 'timeout') onTimeout() + if (ret === 'timeout') await onTimeout() return ret } diff --git a/src/options.js b/src/options.js index e081536..bd1282f 100644 --- a/src/options.js +++ b/src/options.js @@ -21,7 +21,14 @@ const defaultOptions = { // Specifies the raknet implementation to use raknetBackend: 'raknet-native', // If using JS implementation of RakNet, should we use workers? (This only affects the client) - useRaknetWorkers: true + useRaknetWorkers: true, + + // server: What compression algorithm to use by default, either `none`, `deflate` or `snappy` + compressionAlgorithm: 'deflate', + // server and client: On Deflate, what compression level to use, between 1 and 9 + compressionLevel: 7, + // server: If true, only compress if a payload is larger than compressionThreshold + compressionThreshold: 512 } function validateOptions (options) { @@ -34,7 +41,6 @@ function validateOptions (options) { if (options.protocolVersion < MIN_VERSION) { throw new Error(`Protocol version < ${MIN_VERSION} : ${options.protocolVersion}, too old`) } - this.compressionLevel = options.compressionLevel || 7 if (options.useNativeRaknet === true) options.raknetBackend = 'raknet-native' if (options.useNativeRaknet === false) options.raknetBackend = 'jsp-raknet' } diff --git a/src/rak.js b/src/rak.js index 7b1e2f1..35e82cf 100644 --- a/src/rak.js +++ b/src/rak.js @@ -24,14 +24,15 @@ module.exports = (backend) => { } class RakNativeClient extends EventEmitter { - constructor (options) { + constructor (options, client) { super() this.connected = false this.onConnected = () => { } this.onCloseConnection = () => { } this.onEncapsulated = () => { } - this.raknet = new Client(options.host, options.port, { protocolVersion: 10 }) + const protocolVersion = client?.versionGreaterThanOrEqualTo('1.19.30') ? 11 : 10 + this.raknet = new Client(options.host, options.port, { protocolVersion }) this.raknet.on('encapsulated', ({ buffer, address }) => { if (this.connected) { // Discard packets that are queued to be sent to us after close this.onEncapsulated(buffer, address) @@ -86,7 +87,7 @@ class RakNativeServer extends EventEmitter { this.onEncapsulated = () => { } this.raknet = new Server(options.host, options.port, { maxConnections: options.maxPlayers || 3, - protocolVersion: 10, + protocolVersion: server.versionLessThan('1.19.30') ? 10 : 11, message: server.getAdvertisement().toBuffer() }) this.onClose = () => {} diff --git a/src/server.js b/src/server.js index ffa5d77..bbefdae 100644 --- a/src/server.js +++ b/src/server.js @@ -16,18 +16,49 @@ class Server extends EventEmitter { this.serializer = createSerializer(this.options.version) this.deserializer = createDeserializer(this.options.version) - this.advertisement = new ServerAdvertisement(this.options.motd, this.options.version) + this.advertisement = new ServerAdvertisement(this.options.motd, this.options.port, this.options.version) this.advertisement.playersMax = options.maxPlayers ?? 3 /** @type {Object} */ this.clients = {} this.clientCount = 0 this.conLog = debug + + this.setCompressor(this.options.compressionAlgorithm, this.options.compressionLevel, this.options.compressionThreshold) + } + + setCompressor (algorithm, level = 1, threshold = 256) { + if (algorithm === 'none') { + this.compressionAlgorithm = 'none' + this.compressionLevel = 0 + } else if (algorithm === 'deflate') { + this.compressionAlgorithm = 'deflate' + this.compressionLevel = level + this.compressionThreshold = threshold + } else if (algorithm === 'snappy') { + this.compressionAlgorithm = 'snappy' + this.compressionLevel = level + this.compressionThreshold = threshold + } else { + throw new Error(`Unknown compression algorithm ${algorithm}`) + } } validateOptions () { Options.validateOptions(this.options) } + versionLessThan (version) { + return this.options.protocolVersion < (typeof version === 'string' ? Options.Versions[version] : version) + } + + versionGreaterThan (version) { + return this.options.protocolVersion > (typeof version === 'string' ? Options.Versions[version] : version) + } + + versionGreaterThanOrEqualTo (version) { + return this.options.protocolVersion >= (typeof version === 'string' ? Options.Versions[version] : version) + } + onOpenConnection = (conn) => { this.conLog('new connection', conn?.address) const player = new Player(this, conn) @@ -51,7 +82,7 @@ class Server extends EventEmitter { debug(`ignoring packet from unknown inet addr: ${address}`) return } - client.handle(buffer) + process.nextTick(() => client.handle(buffer)) } getAdvertisement () { diff --git a/src/server/advertisement.js b/src/server/advertisement.js index ff5f08a..c7210d9 100644 --- a/src/server/advertisement.js +++ b/src/server/advertisement.js @@ -6,24 +6,26 @@ class ServerAdvertisement { playersOnline = 0 playersMax = 5 gamemode = 'Creative' - serverId = '0' + serverId = Date.now().toString() gamemodeId = 1 - port = undefined + portV4 = undefined portV6 = undefined - constructor (obj, version = CURRENT_VERSION) { + constructor (obj, port, version = CURRENT_VERSION) { if (obj?.name) obj.motd = obj.name this.protocol = Versions[version] this.version = version + this.portV4 = port + this.portV6 = port Object.assign(this, obj) } fromString (str) { - const [header, motd, protocol, version, playersOnline, playersMax, serverId, levelName, gamemode, gamemodeId, port, portV6] = str.split(';') - Object.assign(this, { header, motd, protocol, version, playersOnline, playersMax, serverId, levelName, gamemode, gamemodeId, port, portV6 }) - for (const numeric of ['playersOnline', 'playersMax', 'gamemodeId', 'port', 'portV6']) { + const [header, motd, protocol, version, playersOnline, playersMax, serverId, levelName, gamemode, gamemodeId, portV4, portV6] = str.split(';') + Object.assign(this, { header, motd, protocol, version, playersOnline, playersMax, serverId, levelName, gamemode, gamemodeId, portV4, portV6 }) + for (const numeric of ['playersOnline', 'playersMax', 'gamemodeId', 'portV4', 'portV6']) { if (this[numeric] !== undefined) { - this[numeric] = parseInt(this[numeric]) + this[numeric] = this[numeric] ? parseInt(this[numeric]) : null } } return this @@ -39,13 +41,20 @@ class ServerAdvertisement { this.playersMax, this.serverId, this.levelName, - this.gamemode + this.gamemode, + this.gamemodeId, + this.portV4, + this.portV6, + '0' ].join(';') + ';' } toBuffer (version) { const str = this.toString(version) - return Buffer.concat([Buffer.from([0, str.length]), Buffer.from(str)]) + const buf = Buffer.alloc(2 + str.length) + buf.writeUInt16BE(str.length, 0) + buf.write(str, 2) + return buf } } diff --git a/src/serverPlayer.js b/src/serverPlayer.js index 83f25ec..ffb1961 100644 --- a/src/serverPlayer.js +++ b/src/serverPlayer.js @@ -4,7 +4,6 @@ const { serialize, isDebug } = require('./datatypes/util') const { KeyExchange } = require('./handshake/keyExchange') const Login = require('./handshake/login') const LoginVerify = require('./handshake/loginVerify') -const fs = require('fs') const debug = require('debug')('minecraft-protocol') class Player extends Connection { @@ -15,7 +14,6 @@ class Player extends Connection { this.deserializer = server.deserializer this.connection = connection this.options = server.options - this.compressionLevel = server.compressionLevel KeyExchange(this, server, server.options) Login(this, server, server.options) @@ -28,24 +26,49 @@ class Player extends Connection { this.inLog = (...args) => debug('S ->', ...args) this.outLog = (...args) => debug('S <-', ...args) } + + // Compression is server-wide + this.compressionAlgorithm = this.server.compressionAlgorithm + this.compressionLevel = this.server.compressionLevel + this.compressionThreshold = this.server.compressionThreshold + + this._sentNetworkSettings = false // 1.19.30+ } getUserData () { return this.userData } + sendNetworkSettings () { + this.write('network_settings', { + compression_threshold: this.server.compressionThreshold, + compression_algorithm: this.server.compressionAlgorithm, + client_throttle: false, + client_throttle_threshold: 0, + client_throttle_scalar: 0 + }) + this._sentNetworkSettings = true + } + + handleClientProtocolVersion (clientVersion) { + if (this.server.options.protocolVersion) { + if (this.server.options.protocolVersion < clientVersion) { + this.sendDisconnectStatus('failed_spawn') // client too new + return false + } + } else if (clientVersion < Options.MIN_VERSION) { + this.sendDisconnectStatus('failed_client') // client too old + return false + } + return true + } + onLogin (packet) { const body = packet.data this.emit('loggingIn', body) const clientVer = body.params.protocol_version - if (this.server.options.protocolVersion) { - if (this.server.options.protocolVersion < clientVer) { - this.sendDisconnectStatus('failed_spawn') - return - } - } else if (clientVer < Options.MIN_VERSION) { - this.sendDisconnectStatus('failed_client') + if (!this.handleClientProtocolVersion(clientVer)) { return } @@ -125,15 +148,24 @@ class Player extends Connection { var des = this.server.deserializer.parsePacketBuffer(packet) // eslint-disable-line } catch (e) { this.disconnect('Server error') - fs.writeFile(`packetdump_${this.connection.address}_${Date.now()}.bin`, packet) + debug('Dropping packet from', this.connection.address, e) return } this.inLog?.(des.data.name, serialize(des.data.params).slice(0, 200)) switch (des.data.name) { + // This is the first packet on 1.19.30 & above + case 'request_network_settings': + if (this.handleClientProtocolVersion(des.data.params.client_protocol)) { + this.sendNetworkSettings() + this.compressionLevel = this.server.compressionLevel + } + return + // Below 1.19.30, this is the first packet. case 'login': this.onLogin(des) + if (!this._sentNetworkSettings) this.sendNetworkSettings() return case 'client_to_server_handshake': // Emit the 'join' event diff --git a/src/transforms/framer.js b/src/transforms/framer.js index c31b8d8..2452f01 100644 --- a/src/transforms/framer.js +++ b/src/transforms/framer.js @@ -3,30 +3,48 @@ const zlib = require('zlib') // Concatenates packets into one batch packet, and adds length prefixs. class Framer { - constructor (compressionLevel) { + constructor (compressor, compressionLevel, compressionThreshold) { // Encoding this.packets = [] + this.compressor = compressor || 'none' this.compressionLevel = compressionLevel + this.compressionThreshold = compressionThreshold } - static decode (buf) { + // No compression in base class + compress (buffer) { + switch (this.compressor) { + case 'deflate': return zlib.deflateRawSync(buffer, { level: this.compressionLevel }) + case 'snappy': throw Error('Snappy compression not implemented') + case 'none': return buffer + } + } + + static decompress (algorithm, buffer) { + try { + switch (algorithm) { + case 'deflate': return zlib.inflateRawSync(buffer, { chunkSize: 512000 }) + case 'snappy': throw Error('Snappy compression not implemented') + case 'none': return buffer + default: throw Error('Unknown compression type ' + this.compressor) + } + } catch { + return buffer + } + } + + static decode (compressor, buf) { // Read header if (buf[0] !== 0xfe) throw Error('bad batch packet header ' + buf[0]) const buffer = buf.slice(1) - - // Decode the payload with 512kb buffer - try { - const inflated = zlib.inflateRawSync(buffer, { chunkSize: 512000 }) - return Framer.getPackets(inflated) - } catch (e) { // Try to decode without compression - return Framer.getPackets(buffer) - } + const decompressed = this.decompress(compressor, buffer) + return Framer.getPackets(decompressed) } encode () { const buf = Buffer.concat(this.packets) - const def = zlib.deflateRawSync(buf, { level: this.compressionLevel }) - return Buffer.concat([Buffer.from([0xfe]), def]) + const compressed = (buf.length > this.compressionThreshold) ? this.compress(buf) : buf + return Buffer.concat([Buffer.from([0xfe]), compressed]) } addEncodedPacket (chunk) { @@ -71,4 +89,4 @@ class Framer { } } -module.exports = Framer +module.exports = { Framer } diff --git a/src/transforms/serializer.js b/src/transforms/serializer.js index c763599..f6b1918 100644 --- a/src/transforms/serializer.js +++ b/src/transforms/serializer.js @@ -4,12 +4,7 @@ const { join } = require('path') class Parser extends FullPacketParser { parsePacketBuffer (buffer) { - try { - return super.parsePacketBuffer(buffer) - } catch (e) { - console.error('While decoding', buffer.toString('hex')) - throw e - } + return super.parsePacketBuffer(buffer) } verify (deserialized, serializer) { diff --git a/test/internal.js b/test/internal.js index 51e1f71..15131a9 100644 --- a/test/internal.js +++ b/test/internal.js @@ -201,9 +201,9 @@ async function requestChunks (version, x, z, radius) { } async function timedTest (version, timeout = 1000 * 220) { - await waitFor((res) => { + await waitFor((resolve, reject) => { // mocha eats up stack traces... - startTest(version, res).catch(console.error) + startTest(version, resolve).catch(reject) }, timeout, () => { throw Error('timed out') }) diff --git a/test/proxy.js b/test/proxy.js index a1df25e..d6b169f 100644 --- a/test/proxy.js +++ b/test/proxy.js @@ -1,7 +1,7 @@ const { createClient, Server, Relay } = require('bedrock-protocol') const { sleep, waitFor } = require('../src/datatypes/util') -function proxyTest (version, raknetBackend = 'raknet-node', timeout = 1000 * 40) { +function proxyTest (version, raknetBackend = 'raknet-native', timeout = 1000 * 40) { console.log('with raknet backend', raknetBackend) return waitFor(async res => { const SERVER_PORT = 19000 + ((Math.random() * 100) | 0) @@ -60,8 +60,8 @@ function proxyTest (version, raknetBackend = 'raknet-node', timeout = 1000 * 40) }, timeout, () => { throw Error('timed out') }) } -if (!module.parent) { - proxyTest('1.16.220', 'raknet-native') -} +// if (!module.parent) { +// proxyTest('1.16.220', 'raknet-native') +// } module.exports = { proxyTest } diff --git a/tools/startVanillaServer.js b/tools/startVanillaServer.js index 4740bef..be63b47 100644 --- a/tools/startVanillaServer.js +++ b/tools/startVanillaServer.js @@ -87,6 +87,8 @@ function run (inheritStdout = true) { return cp.spawn(exe, inheritStdout ? { stdio: 'inherit' } : {}) } +let lastHandle + // Run the server async function startServer (version, onStart, options = {}) { const os = process.platform === 'win32' ? 'win' : process.platform @@ -95,7 +97,7 @@ async function startServer (version, onStart, options = {}) { } await download(os, version, options.path) configure(options) - const handle = run(!onStart) + const handle = lastHandle = run(!onStart) handle.on('error', (...a) => { console.warn('*** THE MINECRAFT PROCESS CRASHED ***', a) handle.kill('SIGKILL') @@ -126,9 +128,12 @@ async function startServerAndWait (version, withTimeout, options) { async function startServerAndWait2 (version, withTimeout, options) { try { - return await startServerAndWait(version, withTimeout, options) + return await startServerAndWait(version, 1000 * 60, options) } catch (e) { - console.log(e, 'tring once more to start server...') + console.log(e) + console.log('^ Tring once more to start server in 10 seconds...') + lastHandle?.kill() + await new Promise(resolve => setTimeout(resolve, 10000)) process.chdir(__dirname) fs.rmSync('bds-' + version, { recursive: true }) return await startServerAndWait(version, withTimeout, options) From dbf15c4feb06bdd088fa667b4f9bbdd1828bc690 Mon Sep 17 00:00:00 2001 From: extremeheat Date: Sat, 24 Sep 2022 15:25:47 -0400 Subject: [PATCH 115/273] use raknet-native for tests (#285) --- test/internal.test.js | 10 ---------- test/proxy.js | 6 +++--- test/proxy.test.js | 18 ++++++++++++++++++ test/vanilla.js | 2 +- 4 files changed, 22 insertions(+), 14 deletions(-) create mode 100644 test/proxy.test.js diff --git a/test/internal.test.js b/test/internal.test.js index d6c11d8..06e0ae3 100644 --- a/test/internal.test.js +++ b/test/internal.test.js @@ -1,7 +1,6 @@ /* eslint-env jest */ const { timedTest } = require('./internal') -const { proxyTest } = require('./proxy') const { Versions } = require('../src/options') const { sleep } = require('../src/datatypes/util') @@ -16,13 +15,4 @@ describe('internal client/server test', function () { await sleep(100) }) } - - for (const version in Versions) { - it('proxies ' + version, async () => { - console.debug(version) - await proxyTest(version) - await sleep(5000) - console.debug('Done', version) - }) - } }) diff --git a/test/proxy.js b/test/proxy.js index d6b169f..1489a01 100644 --- a/test/proxy.js +++ b/test/proxy.js @@ -26,6 +26,7 @@ function proxyTest (version, raknetBackend = 'raknet-native', timeout = 1000 * 4 }) console.debug('Server started', server.options.version) + await new Promise(resolve => setTimeout(resolve, 1000)) const relay = new Relay({ version, @@ -44,6 +45,7 @@ function proxyTest (version, raknetBackend = 'raknet-native', timeout = 1000 * 4 await relay.listen() console.debug('Proxy started', server.options.version) + await new Promise(resolve => setTimeout(resolve, 1000)) const client = createClient({ host: '127.0.0.1', port: CLIENT_PORT, version, username: 'Boat', offline: true, raknetBackend, skipPing: true }) console.debug('Client started') @@ -60,8 +62,6 @@ function proxyTest (version, raknetBackend = 'raknet-native', timeout = 1000 * 4 }, timeout, () => { throw Error('timed out') }) } -// if (!module.parent) { -// proxyTest('1.16.220', 'raknet-native') -// } +// if (!module.parent) { proxyTest('1.16.220', 'raknet-native') } module.exports = { proxyTest } diff --git a/test/proxy.test.js b/test/proxy.test.js new file mode 100644 index 0000000..d6e2abe --- /dev/null +++ b/test/proxy.test.js @@ -0,0 +1,18 @@ +/* eslint-env jest */ +const { proxyTest } = require('./proxy') +const { Versions } = require('../src/options') +const { sleep } = require('../src/datatypes/util') + +describe('proxies client/server', function () { + const vcount = Object.keys(Versions).length + this.timeout(vcount * 30 * 1000) + + for (const version in Versions) { + it('proxies ' + version, async () => { + console.debug(version) + await proxyTest(version) + await sleep(5000) + console.debug('Done', version) + }) + } +}) diff --git a/test/vanilla.js b/test/vanilla.js index e67bdaa..94cdc11 100644 --- a/test/vanilla.js +++ b/test/vanilla.js @@ -15,7 +15,7 @@ async function test (version) { port: 19130, username: 'Notch', version, - raknetBackend: 'raknet-node', + raknetBackend: 'raknet-native', offline: true }) From 72dd749717ecdd4a769bed36bbfbe06dc0056772 Mon Sep 17 00:00:00 2001 From: extremeheat Date: Sat, 24 Sep 2022 15:46:33 -0400 Subject: [PATCH 116/273] tools/vanillaServer: add HEAD request timeout prevent long hangs --- tools/startVanillaServer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/startVanillaServer.js b/tools/startVanillaServer.js index be63b47..3d408c1 100644 --- a/tools/startVanillaServer.js +++ b/tools/startVanillaServer.js @@ -5,7 +5,7 @@ const debug = process.env.CI ? console.debug : require('debug')('minecraft-proto const https = require('https') const { getFiles, waitFor } = require('../src/datatypes/util') -const head = (url) => new Promise((resolve, reject) => http.request(url, { method: 'HEAD' }, resolve).on('error', reject).end()) +const head = (url) => new Promise((resolve, reject) => http.request(url, { method: 'HEAD', timeout: 500 }, resolve).on('error', reject).end()) function get (url, outPath) { const file = fs.createWriteStream(outPath) return new Promise((resolve, reject) => { From 7c716b92323721a839ddaff6a7e8233b6efe2f62 Mon Sep 17 00:00:00 2001 From: extremeheat Date: Sat, 24 Sep 2022 16:47:03 -0400 Subject: [PATCH 117/273] 1.19.30 support (#286) --- README.md | 2 +- index.d.ts | 2 +- src/options.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 7acad89..10ea1a4 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Minecraft Bedrock Edition (aka MCPE) protocol library, supporting authentication ## Features - - Supports Minecraft Bedrock version 1.16.201, 1.16.210, 1.16.220, 1.17.0, 1.17.10, 1.17.30, 1.17.40, 1.18.0, 1.18.11, 1.18.30, 1.19.1, 1.19.10, 1.19.20, 1.19.21 + - Supports Minecraft Bedrock version 1.16.201, 1.16.210, 1.16.220, 1.17.0, 1.17.10, 1.17.30, 1.17.40, 1.18.0, 1.18.11, 1.18.30, 1.19.1, 1.19.10, 1.19.20, 1.19.21, 1.19.30 - Parse and serialize packets as JavaScript objects - Automatically respond to keep-alive packets - [Proxy and mitm connections](docs/API.md#proxy-docs) diff --git a/index.d.ts b/index.d.ts index a439d28..2353220 100644 --- a/index.d.ts +++ b/index.d.ts @@ -2,7 +2,7 @@ import EventEmitter from "events" import { Realm } from "prismarine-realms" declare module "bedrock-protocol" { - type Version = '1.19.22' | '1.19.21' | '1.19.20' | '1.19.11' | '1.19.10' | '1.19.2' | '1.19.1' | '1.18.31' | '1.18.30' | '1.18.12' | '1.18.11' | '1.18.10' | '1.18.2' | '1.18.1' | '1.18.0' | '1.17.41' | '1.17.40' | '1.17.34' | '1.17.30' | '1.17.11' | '1.17.10' | '1.17.0' | '1.16.220' | '1.16.210' | '1.16.201' + type Version = '1.19.30' | '1.19.22' | '1.19.21' | '1.19.20' | '1.19.11' | '1.19.10' | '1.19.2' | '1.19.1' | '1.18.31' | '1.18.30' | '1.18.12' | '1.18.11' | '1.18.10' | '1.18.2' | '1.18.1' | '1.18.0' | '1.17.41' | '1.17.40' | '1.17.34' | '1.17.30' | '1.17.11' | '1.17.10' | '1.17.0' | '1.16.220' | '1.16.210' | '1.16.201' enum title { MinecraftNintendoSwitch, MinecraftJava } diff --git a/src/options.js b/src/options.js index bd1282f..d8cb18a 100644 --- a/src/options.js +++ b/src/options.js @@ -3,7 +3,7 @@ const mcData = require('minecraft-data') // Minimum supported version (< will be kicked) const MIN_VERSION = '1.16.201' // Currently supported verson. Note, clients with newer versions can still connect as long as data is in minecraft-data -const CURRENT_VERSION = '1.19.21' +const CURRENT_VERSION = '1.19.30' const Versions = Object.fromEntries(mcData.versions.bedrock.filter(e => e.releaseType === 'release').map(e => [e.minecraftVersion, e.version])) From 3295c0ddd9419739baec19ebf7119cb8926f1f01 Mon Sep 17 00:00:00 2001 From: extremeheat Date: Sat, 24 Sep 2022 16:55:12 -0400 Subject: [PATCH 118/273] Update doc (#288) * Update API.md * Update README.md * Update API.md --- README.md | 8 ++++---- docs/API.md | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 10ea1a4..b5c91e4 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Minecraft Bedrock Edition (aka MCPE) protocol library, supporting authentication and encryption. Help [contribute](CONTRIBUTING.md). -[Protocol doc](https://minecraft-data.prismarine.js.org/?v=bedrock_1.17.10&d=protocol) +[Protocol doc](https://minecraft-data.prismarine.js.org/?v=bedrock_1.19.10&d=protocol) ## Features @@ -102,11 +102,11 @@ ping({ host: 'play.cubecraft.net', port: 19132 }).then(res => { ## Documentation -For documentation on the protocol, and packets/fields see the [proto.yml](data/latest/proto.yml) and [types.yml](data/latest/proto.yml) files. +For documentation on the protocol, and packets/fields see the [protocol documentation](https://minecraft-data.prismarine.js.org/protocol/). -See [API documentation](docs/API.md) +* See [API documentation](docs/API.md) -See [faq](docs/FAQ.md) +* See [frequently asked questions and answers](docs/FAQ.md)