mineflayer-pathfinder
mineflayer-pathfinder copied to clipboard
Remove none vanilla physics behavior
Pathfinder currently cheats the physics system in some places.
- [ ] Canceling velocity: https://github.com/PrismarineJS/mineflayer-pathfinder/blob/e1e900ae496b2ae470ef274af4758d26c276d317/index.js#L244
- [ ] Teleporting to position: https://github.com/PrismarineJS/mineflayer-pathfinder/blob/e1e900ae496b2ae470ef274af4758d26c276d317/index.js#L252
I tested and this is still needed at the moment. The controller need to be improved to not only control the position but also the velocity. The physic simulation gives us the velocity, so we need to use it to decides which buttons to push.
What sort of system would be needed to achieve this? I image the current implementation has been done in this way to reset the bot within on tick and not have to worry about having to stop over multiple ticks? If there is a system that uses the physics simulation to stop it would need to do so over a longer period I assume.
There are two cases for the stops:
- planned: in this case the smooth stopping is handled as part of the simulation physics
- not planned: shouldn't happen too often, just clear the control state and let the inertia do its job
99% of stoping should be planned anyway (mine/place block, end of path, etc..)
Any progress on this?
I think this might be the reason why bots get kicked by Vulcan and other anti-cheat plugins