Skip to content

Non vanilla protocol error on bedwars.games #1277

@Ownslo

Description

@Ownslo

Hello I'm simply trying to create a simple bot that selects a lobby, or a game skyblock from a window.

It works fine logging the data, but when I try to bot.clickWindow I get a error.
Here is the error:

PartialReadError: Deserialization error for play.toClient : Read error for undefined : Missing characters in string, found size is 40799 expected size was 420740033
    at new ExtendableError (C:\Users\Nikki\Desktop\npm\node_modules\protodef\src\utils.js:63:13)
    at new PartialReadError (C:\Users\Nikki\Desktop\npm\node_modules\protodef\src\utils.js:70:5)
    at Object.string (eval at compile (C:\Users\Nikki\Desktop\npm\node_modules\protodef\src\compiler.js:245:12), <anonymous>:47:15)
    at eval (eval at compile (C:\Users\Nikki\Desktop\npm\node_modules\protodef\src\compiler.js:245:12), <anonymous>:1733:71)
    at eval (eval at compile (C:\Users\Nikki\Desktop\npm\node_modules\protodef\src\compiler.js:245:12), <anonymous>:1816:11)
    at Object.packet_declare_recipes (eval at compile (C:\Users\Nikki\Desktop\npm\node_modules\protodef\src\compiler.js:245:12), <anonymous>:1821:9)
    at eval (eval at compile (C:\Users\Nikki\Desktop\npm\node_modules\protodef\src\compiler.js:245:12), <anonymous>:1967:70)
    at packet (eval at compile (C:\Users\Nikki\Desktop\npm\node_modules\protodef\src\compiler.js:245:12), <anonymous>:1972:9)
    at CompiledProtodef.read (C:\Users\Nikki\Desktop\npm\node_modules\protodef\src\compiler.js:64:12)
    at e.message (C:\Users\Nikki\Desktop\npm\node_modules\protodef\src\compiler.js:99:49) {
  name: 'PartialReadError',
  partialReadError: true,
  field: 'play.toClient'
}

Here is my script:

const Item = require("prismarine-item")("1.8");
const delay = require('delay')
const mineflayer = require('mineflayer')
const mcData = require("minecraft-data")("1.8.8")


var bot = mineflayer.createBot({
    host: 'bedwars.games',
    port: 25565, // optional
    username: 'MYUSERNAME',
    version: '1.16.1'
})


bot.once('login', () => {
    console.log('Spawned.')
    bot.chat('/login PASSWORD')

    console.log('Logged in')
    //bot.setControlState('jump', true)

    setTimeout(function() {
        bot.setQuickBarSlot(4)
        console.log('Activating Compass.')
        bot.activateItem()

    }, 3000);

})

bot.on('windowOpen', (window) => {
    console.log('Activated Compass')
    bot.clickWindow(13, 1, 0, (err) => {
        console.log(err);
    });
    //console.log(window.selectedItem);
    console.log(window.slots[13]);
    //bot.equip(window.selectedItem,"hand");
})

bot.on('windowClose', (window) => {
    console.log('Window Closed')
})

Can someone help me understand and fix this error? Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Stage1just created by someone new to the project, we don't know yet if it deserves an implementation / a fnon-vanillaquestion

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions