UNPKG

minecraft-data

Version:
1,210 lines (1,139 loc) 144 kB
# 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.40 # Some ProtoDef aliases string: ["pstring",{"countType":"varint"}] # String / array types ByteArray: ["buffer",{"countType":"varint"}] SignedByteArray: ["buffer",{"countType":"zigzag32"}] LittleString: ["pstring",{"countType":"li32"}] LatinString: ["pstring",{"countType":"varint", "encoding": "latin1"}] ShortArray: ["buffer",{"countType":"li16"}] ShortString: ["pstring",{"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 parameters: 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 edu_resource_uri: EducationSharedResourceURI 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 2034: particle_turtle_egg 2035: particle_sculk_shriek 2036: sculk_catalyst_bloom 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: add_particle_bubble # 1 16386: add_particle_bubble_manual # 2 16387: add_particle_critical # 3 16388: add_particle_block_force_field # 4 16389: add_particle_smoke # 5 16390: add_particle_explode # 6 16391: add_particle_evaporation # 7 16392: add_particle_flame # 8 16393: add_particle_candle_flame # 9 16394: add_particle_lava # 10 16395: add_particle_large_smoke # 11 16396: add_particle_redstone # 12 16397: add_particle_rising_red_dust # 13 16398: add_particle_item_break # 14 16399: add_particle_snowball_poof # 15 16400: add_particle_huge_explode # 16 16401: add_particle_huge_explode_seed # 17 16402: add_particle_mob_flame # 18 16403: add_particle_heart # 19 16404: add_particle_terrain # 20 16405: add_particle_town_aura # 21 16406: add_particle_portal # 22 16408: add_particle_water_splash # 24 16409: add_particle_water_splash_manual # 25 16410: add_particle_water_wake # 26 16411: add_particle_drip_water # 27 16412: add_particle_drip_lava # 28 16413: add_particle_drip_honey # 29 16414: add_particle_stalactite_drip_water # 30 16415: add_particle_stalactite_drip_lava # 31 16416: add_particle_falling_dust # 32 16417: add_particle_mob_spell # 33 16418: add_particle_mob_spell_ambient # 34 16419: add_particle_mob_spell_instantaneous # 35 16420: add_particle_ink # 36 16421: add_particle_slime # 37 16422: add_particle_rain_splash # 38 16423: add_particle_villager_angry # 39 16424: add_particle_villager_happy # 40 16425: add_particle_enchantment_table # 41 16426: add_particle_tracking_emitter # 42 16427: add_particle_note # 43 16428: add_particle_witch_spell # 44 16429: add_particle_carrot # 45 16430: add_particle_mob_appearance # 46 16431: add_particle_end_rod # 47 16432: add_particle_dragons_breath # 48 16433: add_particle_spit # 49 16434: add_particle_totem # 50 16435: add_particle_food # 51 16436: add_particle_fireworks_starter # 52 16437: add_particle_fireworks_spark # 53 16438: add_particle_fireworks_overlay # 54 16439: add_particle_balloon_gas # 55 16440: add_particle_colored_flame # 56 16441: add_particle_sparkler # 57 16442: add_particle_conduit # 58 16443: add_particle_bubble_column_up # 59 16444: add_particle_bubble_column_down # 60 16445: add_particle_sneeze # 61 16446: add_particle_shulker_bullet # 62 16447: add_particle_bleach # 63 16448: add_particle_dragon_destroy_block # 64 16449: add_particle_mycelium_dust # 65 16450: add_particle_falling_red_dust # 66 16451: add_particle_campfire_smoke # 67 16452: add_particle_tall_campfire_smoke # 68 16453: add_particle_dragon_breath_fire # 69 16454: add_particle_dragon_breath_trail # 70 16455: add_particle_blue_flame # 71 16456: add_particle_soul # 72 16457: add_particle_obsidian_tear # 73 16458: add_particle_portal_reverse # 74 16459: add_particle_snowflake # 75 16460: add_particle_vibration_signal # 76 16461: add_particle_sculk_sensor_redstone # 77 16462: add_particle_spore_blossom_shower # 78 16463: add_particle_spore_blossom_ambient # 79 16464: add_particle_wax # 80 16465: add_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_item 75: fall data: zigzag32 packet_mob_effect: !id: 0x1c !bound: client runtime_entity_id: varint64 event_id: u8 => 1: add 2: update 3: remove 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 5: npc_open 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 # WithData is true if the pick request requests the entity metadata. with_data: bool # 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 cause: zigzag32 damage: zigzag32 armor_slots: zigzag64 packet_set_entity_data: !id: 0x27 !bound: both runtime_entity_id: varint64 metadata: MetadataDictionary tick: varint64 # 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 # PotionContainerChangeRecipes is a list of all recipes to convert a potion from one type to another, # such as from a drinkable potion to a splash potion, or from a splash potion to a lingering potion. potion_type_recipes: PotionTypeRecipes # MaterialReducers is a list of all material reducers which is used in education edition chemistry. material_reducers: MaterialReducer[]varint potion_container_recipes: PotionContainerChangeRecipes # ClearRecipes indicates if all recipes currently active on the client should be cleaned. Doing this # means that the client will have no recipes active by itself: Any CraftingData packets previously sent # will also be discarded, and only the recipes in this CraftingData packet will be used. clear_recipes: 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 permiss