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 gets stuck on blocks #223

Closed
MyUsernamee opened this issue Dec 13, 2021 · 5 comments
Closed

Bot gets stuck on blocks #223

MyUsernamee opened this issue Dec 13, 2021 · 5 comments

Comments

@MyUsernamee
Copy link

Sometimes the bot will try to move in a way the server doesn't like. This will cause the server to tell the bot to move back to a valid spot. The issue is that the bot will continue to try and make that move even though it may not be valid.

Steps to reproduce:

  1. Create a bot.
  2. Join some dedicated server.
  3. Give the bot a pickaxe.
  4. Mine to bedrock.
  5. Try to resurface.
    Sometimes the bot will clip a block and get stuck. Looking through the prismarine viewer you can see it is be sent back by the server.
@IceTank
Copy link
Collaborator

IceTank commented Dec 14, 2021

You have to give more info on this. If there is an issue with hit boxes you should make an issue in prismarine-physics. If there is an issue with invalid moves that is a different thing. In that case you should give an example with a specific move that does not work. Pathfinder is usually tested on vanilla servers. Is the server you are using a different brand off server compared to vanilla? Does it have any movement related plugins like anti cheat? What version where you using when the issue occurred?

@MyUsernamee
Copy link
Author

Ok, I was on a vanilla minecraft 1.16.5 server.
It looks like it could be a issue with the hit boxes but I am unsure.
It looks like it is a issue with invalid moves, specifically on diagonals with a block in the way of the path. It also seems to happen when the bot clips its head on a downward diagonal.
All movement settings are default.

Here is a example of a illegal move as seen from primarine-viewer and minecraft
ezgif-2-c4f80d02eda5

@MyUsernamee
Copy link
Author

Ok so I think I fixed it, if you add 0.05 to the bot's width and height, it fixes this issue. So it seems like this is a physics issue. Thank you for the help!

@IceTank
Copy link
Collaborator

IceTank commented Dec 16, 2021

Ok so I think I fixed it, if you add 0.05 to the bot's width and height, it fixes this issue. So it seems like this is a physics issue. Thank you for the help!

I think hitboxes changed in 1.8 1.9 somewhere. prismarine-physics might not handle that case correctly if the hitbox is wrong.

@Eld3rly
Copy link

Eld3rly commented Feb 20, 2022

Hey, I'm starting to make my own bots and I have the same problem.
Can you please tell me how you added 0.05 to the height and width of the bot?
Thanks!

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

3 participants