Giter Club home page Giter Club logo

Comments (7)

TheDudeFromCI avatar TheDudeFromCI commented on May 17, 2024

In the setGoal function, you can assign a goal as dynamic to fix this.

const goal = new GoalFollow(entity, 0)
bot.pathfinder.setGoal(goal, true)

from mineflayer-pathfinder.

Karang avatar Karang commented on May 17, 2024

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)

from mineflayer-pathfinder.

TheDudeFromCI avatar TheDudeFromCI commented on May 17, 2024

Wait, is that an issue? I tried a similar script on my bot and it seemed to track the item entity fine.

from mineflayer-pathfinder.

Karang avatar Karang commented on May 17, 2024

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

from mineflayer-pathfinder.

TheDudeFromCI avatar TheDudeFromCI commented on May 17, 2024

Oh, interesting. I didn't notice that before. Strange.
Wouldn't item drop physics triggered on entityMove events, though?

from mineflayer-pathfinder.

Karang avatar Karang commented on May 17, 2024

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

from mineflayer-pathfinder.

Garfield100 avatar Garfield100 commented on May 17, 2024

In the setGoal function, you can assign a goal as dynamic to fix this.

const goal = new GoalFollow(entity, 0)
bot.pathfinder.setGoal(goal, true)

Of course I missed something 🤦‍♂️ it works now, thank you very much.
Not sure what you mean @Karang, it fortunately doesn't seem to cause problems in this case.

from mineflayer-pathfinder.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.