-
Notifications
You must be signed in to change notification settings - Fork 64
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
[Question] How to follow entity indefinitely/until stopped #30
Comments
In the const goal = new GoalFollow(entity, 0)
bot.pathfinder.setGoal(goal, true) |
This is a problem in mineflayer / prismarine-physics. The item entities movements should be updated by the client and it is not done atm. Can you open an issue in p-physics to request this new feature ? (its a bit more complicated than it sounds because the physic simulation should match exactly the server to not cause desync) |
Wait, is that an issue? I tried a similar script on my bot and it seemed to track the item entity fine. |
You can view the issue with p-viewer, only the first tick seems to be sent by the server (vanilla). Its the same with throwed potions, but i think arrows are updated. I saw that some time ago in 1.13, if someone can check what s going on also for other versions that would be great |
Oh, interesting. I didn't notice that before. Strange. |
Yeah it should, but the server only update the position once, so the event is called once. https://github.com/PrismarineJS/prismarine-viewer/blob/master/lib/mineflayer.js#L82 |
Of course I missed something 🤦♂️ it works now, thank you very much. |
I'm trying to pick up an item after mining, even if this item drops down to somewhere.
For this I am using the GoalFollow goal, but it doesn't seem to work. The bot stops after reaching the item's initial position and the goal_reached event is fired.
I tried this recursive approach but to no avail:
As you can see in this video, the bot never continues: https://youtu.be/VWl5RxJHCPk
The console output looks like this after the bot has stopped:
The bot stops trying to get to the item once it is picked up, by it or by me. This is expected.
Is there a better approach? Did I miss something?
The text was updated successfully, but these errors were encountered: