You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I know, i should make a catch for NoPath, but cant seem to figure out why it cant find paths outside of its renderdistance. It stops the bot after aboutt 4 blocks of walking and sometimes even before it started.
const err = new Error(message)
^
NoPath: No path to the goal!
at error (/home/pi/Desktop/BBs/node_modules/mineflayer-pathfinder/lib/goto.js:2:15)
at EventEmitter.noPathListener (/home/pi/Desktop/BB/node_modules/mineflayer-pathfinder/lib/goto.js:26:17)
at EventEmitter.emit (node:events:379:20)
at EventEmitter.monitorMovement (/home/pi/Desktop/BB/node_modules/mineflayer-pathfinder/index.js:341:11)
at EventEmitter.emit (node:events:391:22)
at Timeout.doPhysics [as _onTimeout] (/home/pi/Desktop/BB/node_modules/mineflayer/lib/plugins/physics.js:65:13)
at listOnTimeout (node:internal/timers:556:17)
at processTimers (node:internal/timers:499:7)
i'm not sure where this is going wrong. I'm using the code below which in my monkey brain should work just fine?
awaitbot.waitForChunksToLoad()client.channels.cache.get(message.channel.id).send('chunks have been loaded');vargoal=newGoalBlock(Coordsinx,y,zformat(0,0,0))if(message.author.id=="INSERT DISCORD-ID HERE"){goal=newGoalBlock(Coordsinx,y,zformat("INSERT X,Y,Z COORDS HERE"))}else{returnclient.channels.cache.get(message.channel.id).send('you cant use this command');}bot.pathfinder.setMovements(defaultMove)client.channels.cache.get(message.channel.id).send('bot is walking to the destination');awaitbot.pathfinder.goto(goal)
Please help, what am i doing wrong that my lovely bot hates me xD
The text was updated successfully, but these errors were encountered:
I don't think there is a check if pathfinder has reached the edge off unloaded chunks when planing paths. You can try and set a goal like GoalNearXZ that is not specific to one block.
There is also another issue with goto. goto treats noPath as a failure case. But the bot can still path the partial calculated path even when the calculations returned noPath. If you use setGoal instead of goto the bot will path to the loaded chunk edge and recalculate the path when new chunks load.
I know, i should make a catch for NoPath, but cant seem to figure out why it cant find paths outside of its renderdistance. It stops the bot after aboutt 4 blocks of walking and sometimes even before it started.
i'm not sure where this is going wrong. I'm using the code below which in my monkey brain should work just fine?
Please help, what am i doing wrong that my lovely bot hates me xD
The text was updated successfully, but these errors were encountered: