26.2-snapshot-1 introduced new physics for bouncing meant to consistently retain the players ‘momentum’ after a bounce. Previously when bouncing on a slime or bed your vertical delta movement was just mirrored, whereas now there is a new gravityCompensation factor given by (movement.y / currentMovement.y) * this.getEffectiveGravity()that gets added additionally. The idea here is that the velocity after the bounce should be continuously increasing depending on the height you’re falling from, but this fails (especially noticable with high values of air_drag_modifier) because this calculation doesn’t consider the role of drag. If portionWithMovement = movement.y / currentMovement.y is very close to 1, then we would want the resulting velocity to be very similar to the velocity after an extra tick of falling. If we denote the velocity before bouncing with v (disregarding - sign), then the current code gives a resulting velocity of close to v + this.getEffectiveGravity(), whereas falling an extra tick would result in the velocity 0.98 * (v + this.getEffectiveGravity()) with usual air drag. A correct implementation would also need to use portionWithMovement to approximate the drag factor of 0.98 or whatever the value needs to be for different air_drag_modifier attribute values.
I have attached a video bounce.mp4 in which the effects of this are clearly noticable when using air_drag_modifier 3.0. Even though I am jumping from almost a block higher, the resulting bounce does not reach as high.
This is related to MC-307398, but I believe that report has been prematurely resolved and a potential fix would probably be greatly appreciated by a lot of players.
Thank you for helping us improve Minecraft! We saved your files: