Skip to content

Failed to decode packet #3663

@Justinlolxd

Description

@Justinlolxd

Versions

  • mineflayer: 1.8.9-1.21.5 tried all
  • server: Paper (behind BungeeCord proxy)
  • node: latest

Detailed description of a problem

As my Bot tries to switch BungeeCord servers through interacting with a NPC it gets kicked with this error:
"Internal Exception: io.netty.handler.codec.DecoderException: Failed to decode packet 'serverbound/minecraft:accept_teleportation'"

What did you try yet?

Different Versions, different ways to send the packet that interacts with the npc

Your current code

/*
Some code here, replace this
*/

const mineflayer = require('mineflayer')

const bot = mineflayer.createBot({
    host: 'X',
    username: 'X',
    password: 'X',
    auth: 'microsoft',
    version: 'X'
})

bot.once('spawn', async () => {
  await bot.waitForTicks(200)


  bot._client.write('interact_entity', {
    entityId: npc.id,
    type: 2, // INTERACT(Right_click)
    hand: 0, // MAIN_HAND
    sneaking: false
  })

  
})

bot.on('message', (message) => {
  console.log('Server message:', message.toAnsi?.() || message.toString())
})

bot.on('kicked', console.log)
bot.on('error', console.log)

Expected behavior

As the bot clicks the NPC(Lobby) it should be transfered to a Bungeecord Proxy (another Gamemode)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions