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

Fails at parkour #70

Closed
popey456963 opened this issue Nov 9, 2020 · 3 comments · Fixed by #85
Closed

Fails at parkour #70

popey456963 opened this issue Nov 9, 2020 · 3 comments · Fixed by #85

Comments

@popey456963
Copy link

If I wanted to contribute the ability to "parkour" to this module, would you be able to point me in the correct direction to do so? What would it take in order to allow the program to make jumps?

@Karang
Copy link
Collaborator

Karang commented Nov 9, 2020

There are 2 steps for adding special moves:

  • Make the pathfinder aware that move is valid (and assign it a cost to compare it to other possible moves)
  • Implement a control algorithm to execute that move (or more likely modify the existing control algorithm)

First step is done by generating the move in the getNeighbors function: https://github.com/PrismarineJS/mineflayer-pathfinder/blob/master/lib/movements.js#L333

Second step is done here https://github.com/PrismarineJS/mineflayer-pathfinder/blob/master/index.js#L327 by adjusting the control states and heading direction.

At the moment, only basic parkour is implemented (1 blocks gaps, towering,..). It would be interesting to add more complex movements (>1 block jumps, fall in water (place bucket), ladders and vines).

@popey456963
Copy link
Author

So, not sure if this deserves a new issue or is under this catergory, but sometimes I see the bot failing at making a simple single block horizontal jump, e.g:

https://v2.femto.pw/d4wy.mp4

It doesn't always happen, take this similary single block jump from standing:

https://v2.femto.pw/4upj.mp4

Here the bot succeeds on the first jump, but then fails the second:

https://v2.femto.pw/m5iw.mp4

All of these are reproducible failures, given the same environment.

@Karang
Copy link
Collaborator

Karang commented Nov 9, 2020

Yeah, that says the control algorithm need to be improved. Feel free to play with it.

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