Problem
Using the pc26_1_2 branch, the bot connects and logs in but gets immediately kicked:
Failed to decode packet 'serverbound/minecraft:chat_session_update'
The bot never sends chat_session_update — the server misinterprets other packets because the IDs in minecraft-data for 26.1.2 are wrong.
What's happening
Protocol 775 added ~15 new serverbound packets that shift all subsequent IDs. The current minecraft-data has 50 serverbound entries, but the real protocol has 69. Same issue on the clientbound side (135 → 141).
A few examples of the mismatch:
| Packet |
Current ID |
Correct ID |
custom_payload |
0x0a |
0x16 |
settings |
0x08 |
0x0e |
keep_alive |
0x10 |
0x1c |
chat_session_update |
0x06 |
0x0a |
So when mineflayer sends custom_payload at 0x0a, the server reads it as chat_session_update and fails to decode it.
How to get the correct IDs
The game ships deobfuscated now, so the correct mappings can be extracted directly from the server jar:
# 1. Extract the inner jar
unzip Minecraft-server-26.1.1.jar "META-INF/versions/26.1.1/server-26.1.1.jar"
unzip META-INF/versions/26.1.1/server-26.1.1.jar -d server-classes
# 2. Read the registration order (IDs are assigned sequentially by addPacket() calls)
javap -cp server-classes -c -p net.minecraft.network.protocol.game.GameProtocols \
| grep "getstatic.*SERVERBOUND"
# 3. Same for clientbound
javap -cp server-classes -c -p net.minecraft.network.protocol.game.GameProtocols \
| grep "getstatic.*CLIENTBOUND"
Note: the bundled jar requires Java 25+ to run, but javap from Java 21 can decompile the classes fine.
Full correct serverbound mappings (69 packets)
0x00 ACCEPT_TELEPORTATION (teleport_confirm)
0x01 ATTACK ← NEW
0x02 BLOCK_ENTITY_TAG_QUERY (query_block_nbt)
0x03 BUNDLE_ITEM_SELECTED ← NEW
0x04 CHANGE_DIFFICULTY (set_difficulty)
0x05 CHANGE_GAME_MODE ← NEW
0x06 CHAT_ACK ← NEW
0x07 CHAT_COMMAND (chat_command)
0x08 CHAT_COMMAND_SIGNED (chat_command_signed) ← missing in current mapping
0x09 CHAT (chat_message)
0x0a CHAT_SESSION_UPDATE (chat_session_update)
0x0b CHUNK_BATCH_RECEIVED (chunk_batch_received)
0x0c CLIENT_COMMAND (client_command)
0x0d CLIENT_TICK_END ← NEW
0x0e CLIENT_INFORMATION (settings)
0x0f COMMAND_SUGGESTION (tab_complete)
0x10 CONFIGURATION_ACKNOWLEDGED (configuration_acknowledged)
0x11 CONTAINER_BUTTON_CLICK (enchant_item)
0x12 CONTAINER_CLICK (window_click)
0x13 CONTAINER_CLOSE (close_window)
0x14 CONTAINER_SLOT_STATE_CHANGED ← NEW
0x15 COOKIE_RESPONSE ← NEW
0x16 CUSTOM_PAYLOAD (custom_payload)
0x17 DEBUG_SUBSCRIPTION_REQUEST (debug_sample_subscription)
0x18 EDIT_BOOK (edit_book)
0x19 ENTITY_TAG_QUERY (query_entity_nbt)
0x1a INTERACT (use_entity)
0x1b JIGSAW_GENERATE (generate_structure)
0x1c KEEP_ALIVE (keep_alive)
0x1d LOCK_DIFFICULTY (lock_difficulty)
0x1e MOVE_PLAYER_POS (position)
0x1f MOVE_PLAYER_POS_ROT (position_look)
0x20 MOVE_PLAYER_ROT (look)
0x21 MOVE_PLAYER_STATUS_ONLY (flying)
0x22 MOVE_VEHICLE (vehicle_move)
0x23 PADDLE_BOAT (steer_boat)
0x24 PICK_ITEM_FROM_BLOCK (pick_item)
0x25 PICK_ITEM_FROM_ENTITY ← NEW
0x26 PING_REQUEST (ping_request)
0x27 PLACE_RECIPE (place_recipe)
0x28 PLAYER_ABILITIES (abilities)
0x29 PLAYER_ACTION (block_dig)
0x2a PLAYER_COMMAND (entity_action)
0x2b PLAYER_INPUT (player_input)
0x2c PLAYER_LOADED ← NEW
0x2d PONG (pong)
0x2e RECIPE_BOOK_CHANGE_SETTINGS (recipe_book_settings)
0x2f RECIPE_BOOK_SEEN_RECIPE (recipe_book)
0x30 RENAME_ITEM (name_item)
0x31 RESOURCE_PACK (resource_pack_receive)
0x32 SEEN_ADVANCEMENTS (advancement_tab)
0x33 SELECT_TRADE (select_trade)
0x34 SET_BEACON (set_beacon_effect)
0x35 SET_CARRIED_ITEM (held_item_slot)
0x36 SET_COMMAND_BLOCK (update_command_block)
0x37 SET_COMMAND_MINECART (update_command_block_minecart)
0x38 SET_CREATIVE_MODE_SLOT (set_creative_slot)
0x39 SET_GAME_RULE ← NEW
0x3a SET_JIGSAW_BLOCK (update_jigsaw_block)
0x3b SET_STRUCTURE_BLOCK (update_structure_block)
0x3c SET_TEST_BLOCK ← NEW
0x3d SIGN_UPDATE (update_sign)
0x3e SPECTATE_ENTITY (spectate)
0x3f SWING (arm_animation)
0x40 TELEPORT_TO_ENTITY ← NEW
0x41 TEST_INSTANCE_BLOCK_ACTION ← NEW
0x42 USE_ITEM_ON (block_place)
0x43 USE_ITEM (use_item)
0x44 CUSTOM_CLICK_ACTION ← NEW
Full correct clientbound mappings (141 packets)
Click to expand
0x00 BUNDLE (bundle_delimiter)
0x01 ADD_ENTITY (spawn_entity)
0x02 ANIMATE (animation)
0x03 AWARD_STATS (statistics)
0x04 BLOCK_CHANGED_ACK (acknowledge_player_digging)
0x05 BLOCK_DESTRUCTION (block_break_animation)
0x06 BLOCK_ENTITY_DATA (tile_entity_data)
0x07 BLOCK_EVENT (block_action)
0x08 BLOCK_UPDATE (block_change)
0x09 BOSS_EVENT (boss_bar)
0x0a CHANGE_DIFFICULTY (difficulty)
0x0b CHUNK_BATCH_FINISHED (chunk_batch_finished)
0x0c CHUNK_BATCH_START (chunk_batch_start)
0x0d CHUNKS_BIOMES (map_chunk_biomes)
0x0e CLEAR_TITLES (clear_titles)
0x0f COMMAND_SUGGESTIONS (tab_complete)
0x10 COMMANDS (declare_commands)
0x11 CONTAINER_CLOSE (close_window)
0x12 CONTAINER_SET_CONTENT (window_items)
0x13 CONTAINER_SET_DATA (craft_progress_bar)
0x14 CONTAINER_SET_SLOT (set_slot)
0x15 COOKIE_REQUEST ← NEW
0x16 COOLDOWN (set_cooldown)
0x17 CUSTOM_CHAT_COMPLETIONS (custom_chat_completions)
0x18 CUSTOM_PAYLOAD (custom_payload)
0x19 DAMAGE_EVENT (damage_event)
0x1a DEBUG_BLOCK_VALUE ← NEW
0x1b DEBUG_CHUNK_VALUE ← NEW
0x1c DEBUG_ENTITY_VALUE ← NEW
0x1d DEBUG_EVENT ← NEW
0x1e DEBUG_SAMPLE (debug_sample)
0x1f DELETE_CHAT (hide_message)
0x20 DISCONNECT (kick_disconnect)
0x21 DISGUISED_CHAT (profileless_chat)
0x22 ENTITY_EVENT (entity_status)
0x23 ENTITY_POSITION_SYNC (entity_position_sync)
0x24 EXPLODE (explosion)
0x25 FORGET_LEVEL_CHUNK (unload_chunk)
0x26 GAME_EVENT (game_state_change)
0x27 GAME_RULE_VALUES ← NEW
0x28 GAME_TEST_HIGHLIGHT_POS ← NEW
0x29 MOUNT_SCREEN_OPEN (open_horse_window)
0x2a HURT_ANIMATION (hurt_animation)
0x2b INITIALIZE_BORDER (initialize_world_border)
0x2c KEEP_ALIVE (keep_alive)
0x2d LEVEL_CHUNK_WITH_LIGHT (map_chunk)
0x2e LEVEL_EVENT (world_event)
0x2f LEVEL_PARTICLES (world_particles)
0x30 LIGHT_UPDATE (update_light)
0x31 LOGIN (login)
0x32 LOW_DISK_SPACE_WARNING ← NEW
0x33 MAP_ITEM_DATA (map)
0x34 MERCHANT_OFFERS (trade_list)
0x35 MOVE_ENTITY_POS (rel_entity_move)
0x36 MOVE_ENTITY_POS_ROT (entity_move_look)
0x37 MOVE_MINECART_ALONG_TRACK ← NEW
0x38 MOVE_ENTITY_ROT (entity_look)
0x39 MOVE_VEHICLE (vehicle_move)
0x3a OPEN_BOOK (open_book)
0x3b OPEN_SCREEN (open_window)
0x3c OPEN_SIGN_EDITOR (open_sign_entity)
0x3d PING (ping)
0x3e PONG_RESPONSE (pong_response)
0x3f PLACE_GHOST_RECIPE (craft_recipe_response)
0x40 PLAYER_ABILITIES (abilities)
0x41 PLAYER_CHAT (player_chat)
0x42 PLAYER_COMBAT_END (combat_end)
0x43 PLAYER_COMBAT_ENTER (combat_enter)
0x44 PLAYER_COMBAT_KILL (combat_kill)
0x45 PLAYER_INFO_REMOVE (player_remove)
0x46 PLAYER_INFO_UPDATE (player_info)
0x47 PLAYER_LOOK_AT (face_player)
0x48 PLAYER_POSITION (position)
0x49 PLAYER_ROTATION ← NEW
0x4a RECIPE_BOOK_ADD (recipe_book_add)
0x4b RECIPE_BOOK_REMOVE (recipe_book_remove)
0x4c RECIPE_BOOK_SETTINGS (recipe_book_settings)
0x4d REMOVE_ENTITIES (entity_destroy)
0x4e REMOVE_MOB_EFFECT (remove_entity_effect)
0x4f RESET_SCORE (reset_score)
0x50 RESOURCE_PACK_POP (resource_pack_remove)
0x51 RESOURCE_PACK_PUSH (resource_pack_send)
0x52 RESPAWN (respawn)
0x53 ROTATE_HEAD (entity_head_rotation)
0x54 SECTION_BLOCKS_UPDATE (multi_block_change)
0x55 SELECT_ADVANCEMENTS_TAB (select_advancement_tab)
0x56 SERVER_DATA (server_data)
0x57 SET_ACTION_BAR_TEXT (action_bar)
0x58 SET_BORDER_CENTER (world_border_center)
0x59 SET_BORDER_LERP_SIZE (world_border_lerp_size)
0x5a SET_BORDER_SIZE (world_border_size)
0x5b SET_BORDER_WARNING_DELAY (world_border_warning_delay)
0x5c SET_BORDER_WARNING_DISTANCE (world_border_warning_reach)
0x5d SET_CAMERA (camera)
0x5e SET_CHUNK_CACHE_CENTER (update_view_position)
0x5f SET_CHUNK_CACHE_RADIUS (update_view_distance)
0x60 SET_CURSOR_ITEM (set_cursor_item)
0x61 SET_DEFAULT_SPAWN_POSITION (spawn_position)
0x62 SET_DISPLAY_OBJECTIVE (scoreboard_display_objective)
0x63 SET_ENTITY_DATA (entity_metadata)
0x64 SET_ENTITY_LINK (attach_entity)
0x65 SET_ENTITY_MOTION (entity_velocity)
0x66 SET_EQUIPMENT (entity_equipment)
0x67 SET_EXPERIENCE (experience)
0x68 SET_HEALTH (update_health)
0x69 SET_HELD_SLOT (held_item_slot)
0x6a SET_OBJECTIVE (scoreboard_objective)
0x6b SET_PASSENGERS (set_passengers)
0x6c SET_PLAYER_INVENTORY (set_player_inventory)
0x6d SET_PLAYER_TEAM (teams)
0x6e SET_SCORE (scoreboard_score)
0x6f SET_SIMULATION_DISTANCE (simulation_distance)
0x70 SET_SUBTITLE_TEXT (set_subtitle_text)
0x71 SET_TIME (update_time)
0x72 SET_TITLE_TEXT (set_title_text)
0x73 SET_TITLES_ANIMATION (set_title_time)
0x74 SOUND_ENTITY (entity_sound_effect)
0x75 SOUND (sound_effect)
0x76 START_CONFIGURATION (start_configuration)
0x77 STOP_SOUND (stop_sound)
0x78 STORE_COOKIE (store_cookie)
0x79 SYSTEM_CHAT (system_chat)
0x7a TAB_LIST (playerlist_header)
0x7b TAG_QUERY (nbt_query_response)
0x7c TAKE_ITEM_ENTITY (collect)
0x7d TELEPORT_ENTITY (entity_teleport)
0x7e TEST_INSTANCE_BLOCK_STATUS ← NEW
0x7f TICKING_STATE (ticking_state)
0x80 TICKING_STEP (ticking_step)
0x81 TRANSFER (transfer)
0x82 UPDATE_ADVANCEMENTS (update_advancements)
0x83 UPDATE_ATTRIBUTES (entity_update_attributes)
0x84 UPDATE_MOB_EFFECT (entity_effect)
0x85 UPDATE_RECIPES (unlock_recipes)
0x86 UPDATE_TAGS (tags)
0x87 PROJECTILE_POWER (projectile_power)
0x88 CUSTOM_REPORT_DETAILS (custom_report_details)
0x89 SERVER_LINKS (server_links)
0x8a WAYPOINT ← NEW
0x8b CLEAR_DIALOG ← NEW
0x8c SHOW_DIALOG ← NEW
After fixing the IDs
With correct mappings, the bot connects, spawns, and sends chat without issues. The remaining errors are in prismarine-chunk (biome/block bit size parsing), not at the protocol level.
Problem
Using the
pc26_1_2branch, the bot connects and logs in but gets immediately kicked:The bot never sends
chat_session_update— the server misinterprets other packets because the IDs inminecraft-datafor 26.1.2 are wrong.What's happening
Protocol 775 added ~15 new serverbound packets that shift all subsequent IDs. The current
minecraft-datahas 50 serverbound entries, but the real protocol has 69. Same issue on the clientbound side (135 → 141).A few examples of the mismatch:
custom_payloadsettingskeep_alivechat_session_updateSo when mineflayer sends
custom_payloadat 0x0a, the server reads it aschat_session_updateand fails to decode it.How to get the correct IDs
The game ships deobfuscated now, so the correct mappings can be extracted directly from the server jar:
Note: the bundled jar requires Java 25+ to run, but
javapfrom Java 21 can decompile the classes fine.Full correct serverbound mappings (69 packets)
Full correct clientbound mappings (141 packets)
Click to expand
After fixing the IDs
With correct mappings, the bot connects, spawns, and sends chat without issues. The remaining errors are in
prismarine-chunk(biome/block bit size parsing), not at the protocol level.