Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bot should backtrack/find other path when stuck #177

Closed
dylanpdx opened this issue Jun 24, 2021 · 2 comments
Closed

Bot should backtrack/find other path when stuck #177

dylanpdx opened this issue Jun 24, 2021 · 2 comments

Comments

@dylanpdx
Copy link

dylanpdx commented Jun 24, 2021

I've noticed a behavior that the bot often gets "dead set" on a certain path and won't deviate from it, even if it's impossible
I set up an example where this happens:
bot.pathfinder.setGoal(new GoalGetToBlock(-9999, 255, 9999))
Placing the bot at Y 255, far away from the goal and above a body of water makes it head directly for the goal, but reach a dead end, even though it has the option of going back, jumping in the water, and then traversing the world below.
issue
I would expect it to find the second best path in this case

@Karang
Copy link
Collaborator

Karang commented Jun 24, 2021

When the goal is unreachable the bot default to the closest position it can get to. The goal you set is at Y=255, if it doesn't have blocks to go up why would it drop to sea level ? If the goal is to get to a position out of the view distance, try to use a XZ goal first to get closer then use an exact GoalGetToBlock when the position is in view.

The bot is already exploring all the possible paths, it just decided that this position was the best according to what you asked him.

@dylanpdx
Copy link
Author

Ah ok, I was thinking it'd behave similar to Baritone, where if the best position doesn't get to the goal, it tries alternative routes, even if it has to change Y levels in the process.
Setting an XZ goal and then a full Block goal seemed to do the trick, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants