Players can avoid taking fall damage by not sending any movement packets
The fall distance is only updated for players from the "processPlayer" method in NetHandlerPlayServer. This allows players to cheat fall damage by simply not sending any movement packets during the fall, and then disconnecting and reconnecting once they're on the ground.
The solution would be to handle fall distance from within the Entity.move method for players too, as with all other entities. However, this would cause problems because of a desync in y position caused by the time it takes for the packets to reach the server. I fixed this in VanillaFix by ignoring the packet's y position during a fall (which also has the effect of checking that the player is not flying and falling at the correct speed): https://github.com/DimensionalDevelopment/VanillaFix/tree/0757aeb6735aef974b1c1ce6e7b81d19b92636d0/src/main/java/org/dimdev/vanillafix/bugs/mixins/MixinNetHandlerPlayServer.java#L59
The rewritten method also fixes many other movement and teleport bugs, like MC-89928, MC-98153, and MC-123364.
2018-06-01, 11:45 PM
2020-05-23, 12:37 AM
2020-05-23, 12:37 AM
0
0
Minecraft 1.12.2, Minecraft 1.13, Minecraft 18w30a
-