mineflayer-pathfinder icon indicating copy to clipboard operation
mineflayer-pathfinder copied to clipboard

Remove none vanilla physics behavior

Open IceTank opened this issue 2 years ago • 5 comments

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

IceTank avatar Sep 24 '21 19:09 IceTank

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.

Karang avatar Sep 25 '21 02:09 Karang

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.

IceTank avatar Sep 25 '21 10:09 IceTank

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..)

Karang avatar Sep 25 '21 22:09 Karang

Any progress on this?

ItzAmirreza avatar Aug 31 '23 08:08 ItzAmirreza

I think this might be the reason why bots get kicked by Vulcan and other anti-cheat plugins

Clashsoft avatar May 04 '24 10:05 Clashsoft