Closed XingYuan55 closed 1 year ago
Update your node-minecraft-protocol
Update your node-minecraft-protocol
How can I update it?
How can I update it?
npm update node-minecraft-protocol
Also, wait for the bot to spawn with the "spawn" event
Update dependencies with
npm update --depth 9999
This will update all the sub dependencies and make sure everything is in sync, as this is how it will appear in fresh install / our CI.
Ok, I'll try it, and continue to follow the post if necessary
Update dependencies with
npm update --depth 9999
This will update all the sub dependencies and make sure everything is in sync, as this is how it will appear in fresh install / our CI.
Also, may I ask, does mineflayer support offline login for bots?
But, annoyingly, after I update it, it still reports this error
You did not update it correctly then. Try the command above again or install to a new folder
您当时没有正确更新它。再次尝试上述命令或安装到新文件夹
Let me try
Oh no! After I moved to the new folder and re-executed the install command with the update command, I ran the code and it still reported the same error. I don't know if it's a problem with Node.js or my computer 😟
Likely you installed mineflayer globally, or there is another node_module folder taking precedence. You can try on a different machine or use an environment like Gitpod.
可能是您全局安装了 mineflayer,或者有另一个优先node_module文件夹。您可以在其他计算机上尝试或使用 Gitpod 等环境。
Yes, you are right. I had installed mineflayer globally. so, I uninstall the global one and it will work? Let me try it.
I don't have any other node_modules folder, and I uninstalled the global installation of mineflayer, but the error is still there.
bot.once('spawn', () => { bot.chat("Hello!") })
哦!谢谢你!成功了!!!! OH!! Thank You!!!! It's OK!
When I use the bot.chat("123") function and pass in arguments, it reports an error saying: bot._client.chat() is not a function. But when I don't pass in any arguments, it asks for them again. I don't know what's going on, but it's been bugging me for a long time. How can I get chat to work I'm having problems doing this in python as well as this. Error message:
Source code: (I made a simple test program because it's my first time using it)
Also, may I ask, does mineflayer support offline login for bots?