PrismarineJS / mineflayer

Create Minecraft bots with a powerful, stable, and high level JavaScript API.
https://prismarinejs.github.io/mineflayer/
MIT License
4.92k stars 904 forks source link

Mineflayer bot error when connecting to hypixel "Chunk size is X but only Y was read" (y smaller than x) #1011

Closed ghost closed 4 years ago

ghost commented 4 years ago

I get a bunch of this error (very big so i put it on pastebin): https://pastebin.com/Bt3iiA1T Here is the code used (taken from the plugin's example)

const mineflayer = require('mineflayer');
const navigatePlugin = require('mineflayer-navigate')(mineflayer);
const bot = mineflayer.createBot({ host:"hypixel.net", username: 'noemailforyou@gmail.com', password:"no password for u " });
// install the plugin
navigatePlugin(bot);
// optional configuration
bot.navigate.blocksToAvoid[132] = true; // avoid tripwire
bot.navigate.blocksToAvoid[59] = false; // ok to trample crops
bot.navigate.on('pathFound', function (path) {
  console.log("found path. I can get there in " + path.length + " moves.");
});
bot.navigate.on('cannotFind', function (closestPath) {
  console.error("unable to find path. getting as close as possible");
  bot.navigate.walk(closestPath);
});
bot.navigate.on('arrived', function () {
  bot.chat("/tell A68AGaming Ok im here now");
});
bot.navigate.on('interrupted', function() {
  console.log("stopping");
});
bot.on('chat', function(username, message) {
  // navigate to whoever talks
  if (username === bot.username) return;
  if (message == 'come') {
    const target = bot.players[username].entity;
    bot.navigate.to(target.position);
  } else if (message == 'stop') {
    bot.navigate.stop();
    bot.chat('/r ok ok i stopped')
  }
});

as you can see, its quite simple. It can pathfind to me. This is almost 1 to 1 with the example. I have tested this on localhost and it works completely as expected (when i say 'come' it comes to me, when i say 'stop' it stops, etc.) I am using the current latest version of mineflayer and the mineflayer-navigate plugin, and my node version is v13.1.0. I am 99.9% certain that this is an issue caused by the server.

ghost commented 4 years ago

using version 1.8.9 fixes it