-
Notifications
You must be signed in to change notification settings - Fork 45
Physics
Botcraft used to have a custom physics system to perform client side player position update. It was fast and simple, and the physics was good enough to feel "Minecraft like" in most situations. However, it had two problems:
- some non-vanilla server implementations are performing server side physics and will kick the client if it doesn't exactly match vanilla client physics
- most of edge cases that you encounter quite rarely were simply ignored (things like bouncing on a slime block, being stuck in a cobweb etc...)
That's why as of January 2024, this system has been replaced with a brand new one, trying to reproduce Minecraft vanilla player physics with 100% accuracy. It is based on the physics of 1.20.2 and will evolve with the game for future versions. At this point, I am not sure if I will have the motivation to port it back for all older supported versions. It means that your bot will move with 1.20 physics even if you compile botcraft for 1.12.2.
As of writing, the new system does have some tests to check that the physics is vanilla-like for each and every tick. However, Minecraft physics system is just awful to read and follow, and has hundreds of very specific situations (can you guess how fast you should move if you are sneaking on a waterlogged slab placed on soul sand with your head in powder snow and with swift sneak II, depth strider I and dolphin's grace ?). Some specific cases might differ a little and will be considered as bug and fixed when found.
Right now almost all abilities are implemented (including rocket boosting when gliding, blocking stepping down when sneaking etc...). Entity riding is not though, and is currently not planned to be added. Sorry if your dream is to have camel mounted bots).
Tests to specifically check for physics compliance with Minecraft vanilla client can be found here and are disabled by default. They can be run using this command:
botcraft_online_tests [.physics]
Short answer : no, not with latest botcraft version.
Long answer : each physics system requires a custom pathfinding/navigation system to work with. I don't want to have to maintain two different physics system (one of them being a nightmare) with two different navigation systems.