PrismarineJS / prismarine-physics

Provide the physics engine for minecraft entities
MIT License
35 stars 41 forks source link

fix hitbox issues on newer versions of minecraft #116

Open SilkePilon opened 4 months ago

SilkePilon commented 4 months ago

In newer versions of minecraft there are some minor changes to the hitbox system

this wont affect older versions.

examples of the bug:

imagdwae

image

rom1504 commented 4 months ago

thoughts @IceTank ?

IceTank commented 4 months ago

@SilkePilon Did you base these changes on any differences you found between the current prismarine-physics code and the Java code? This might trigger anti cheat plugins if horizontal collisions don't line up anymore between Java and prismarine-physics. Nevertheless, this is probably a good solution for the time being that should work for most cases until someone comes up with a better idea.

SilkePilon commented 4 months ago

I made this change at a recommendation of vakore on Discord. Apparently the current system isn't perfect at handling hitbox's. As sometimes the hitbox ends up inside a block and makes the bot unable to move by extending the hitbox a bit this fixes the issue sometimes. Tho it's not a perfect solution and more of a "hack".