Sk1erLLC / Patcher

A Forge mod full of Vanilla bug fixes, Quality of Life improvements, and performance enhancements.
Other
232 stars 60 forks source link

BugFix: 1.8.9 Sneak Glitch #96

Closed SkyyWasTaken closed 2 years ago

SkyyWasTaken commented 2 years ago

This fixes a bug in 1.8.9/1.12.2 that causes the game to stop all momentum before dropping the player off a block if they sneak at the right time. If you take a look at the source code for sneak collision, it checks if the player is on the ground by calling the onGround field. The issue is, onGround is updated after sneak collisions are determined. This means that sneaking within one tick after leaving a block will cause the sneak collision code to stop displacement/reset momentum to prevent you from falling off a block. This is seen as sudden jolt, followed by a fall rather than a smooth fall because the crouch did not connect. I was unable to find a Mojang bug report for this issue but it was fixed in later versions. It is very possible that there was a bug report that I missed.