Within LivingEntity, the travel method applies gravity to all entities after the check
else if (!this.isNoGravity()) {
But this is incorrectly(I assume) applied to the player as well, resulting in a small downwards force whenever a player receives a knockback, which gets magnified significantly by the other issue with knockback(see my other issue).
Proposed solution: add
&& !(this instanceof Player)
as an additional check, since player's gravity is handled client side and servers should not worry about it.
P.S. The downwards motion is -0.08(gravity) * 0.9800000190734863(Movement multiplier) = -0.0784000015258789, which is the downwards motion you get when you are on the ground and takes damage.
Edit: Found a pitfall when attempting to patch it myself, in the Entity class, player's "onGround" status is controlled by the player being falling in the server's perspective, which would cause the player to not be on ground for a majority of the time, to replicate the exact effect of what happens before the patch, the original check of movement.y < 0 should be changed to `movement.y < 0 || this instanceof ServerPlayer && movement.y - (((ServerPlayer) this).hasEffect(MobEffects.SLOW_FALLING)? 0.01D : 0.8D) * 0.9800000190734863D < 0.0D`.
Linked issues
relates to 2
Comments 4
O-o how the heck is "entity gravity" which is not applicable to players because player gravity is client side an "intended feature"?
And the frustrating thing this + high network delay causes is fundamental, either this gets fixed or people are gonna get their jumps eaten after fall damage with a high network delay, absolutely mutually exclusive.
I'd say that this one should be keep open so Mojang can evaluate if this is truly a bug based on the code analysis, as this also might affect other cases than just MC-71781.
Yes, a small amount of downwards motion is added in every motion packet sent to the player.