简单。每当它连接到hypixel.net时,都会产生大量的块错误并崩溃。它在localhost的minecraft服务器上运行良好。这是错误(非常大):https://pastebin.com/Bt3iiA1T
这是我的代码(不如错误大):
const mineflayer = require('mineflayer');
const navigatePlugin = require('mineflayer-navigate')(mineflayer);
const bot = mineflayer.createBot({ host:"hypixel.net", username: '[email protected]', password:"hehe no" });
// 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 person 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')
}
});
我几乎可以肯定,这与hypixel有关,因为我也看到其他人的机器人也因为这种情况而崩溃。有什么办法可以解决(最好)或忽略(作为最后的解决方法)此错误?
登录时将版本声明为1.8.9可解决此问题