Closed SonicandTailsCD closed 1 year ago
Also, please don't close this. I've never closed one, so I want to try out closing it.
mineflayer-navigate is deprecated iirc. Use mineflayer-pathfinder instead.
Ok! How do I do that?
Instead of taking code from sources like ChatGPT, try learning the basics of JS and understand each part of your code.
Sorry, but I don't think there's a better way than this.
I know the basics of JS.
But sometimes I need quick answers. Besides, the rest of the code, that was made by me! I only asked ChatGPT to write a function.
No offense, but can you read at all? I typed at the bottom of the issue "The function onPhysicsTick was made by ChatGPT."…
Sorry, the code is from examples/guard.js with some additional code, and I assumed you didn't know the basics because I read:
Did you try any method from the API? No, I don't know how.
Did you try any example? yes
Any error from those? yes
If you want to get started with mineflayer-pathfinder, this might be a good video (I haven't checked if the code still works tho): https://www.youtube.com/watch?v=UWGSf08wQSc&list=PLh_alXmxHmzGy3FKbo95AkPp5D8849PEV&index=2
Okay! I'll try. But one thing: maybe you can help correct my code?
Sorry, the code is from examples/guard.js with some additional code, and I assumed you didn't know the basics because I read:
Did you try any method from the API? No, I don't know how. Did you try any example? yes Any error from those? yes
If you want to get started with mineflayer-pathfinder, this might be a good video (I haven't checked if the code still works tho): https://www.youtube.com/watch?v=UWGSf08wQSc&list=PLh_alXmxHmzGy3FKbo95AkPp5D8849PEV&index=2
No problem, lah. I forgive you :)
Versions
Detailed description of a problem
A clear and concise description of what the problem is, with as much context as possible. The mineflayer-navigate plugin doesn't want to load! What are you building? A script for the Mineflayer bot to follow me What problem are you trying to solve? Plugin doesn't want to load
What did you try yet?
Did you try any method from the API? No, I don't know how. Did you try any example? yes Any error from those? yes
Your current code
Expected behavior
A clear and concise description of what you expected to happen. The bot would join, as soon as I say "guard", the bot follows me.
Additional context
The error was: "node:assert:399 throw err; ^
AssertionError [ERR_ASSERTION]: plugin needs to be a function at EventEmitter.loadPlugin (/Users/adm/Desktop/Bot/node_modules/mineflayer/lib/plugin_loader.js:16:12) at Object. (/Users/adm/Desktop/Bot/bot.js:30:5)
at Module._compile (node:internal/modules/cjs/loader:1099:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:975:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
at node:internal/main/run_main_module:17:47 {
generatedMessage: false,
code: 'ERR_ASSERTION',
actual: false,
expected: true,
operator: '=='
}
Node.js v17.9.1" Also, the function onPhysicsTick was written by ChatGPT. That's all.