With no doubt, sprinting and sprint jumping are some of the greatest and most iconic features ever, but their current implementation causes some issues to players (especially on high ping) and server developers as well.
Sprinting has two different effects on the player, it adds a movement_speed modifier and gives a small boost when jumping. The LivingEntity.setSprinting() method correctly sets both of these values, so sprinting works perfectly fine on the client alone, but some problems occur when the server interferes. There are also two ways in which the server can interact with sprinting.
The first is by sending an update attribute packet with a movement_speed modifier, which forces the client to update the modifiers on its end, and the second is by sending an entity metadata packet of index 0, which forces an update on the sprint jump boost flag.
The first issue with this implementation, is when the server applies a new movement_speed modifier or any flag also shared in index 0 of the metadata packet. On high ping, this can cause the two sprinting states to desync, sometimes causing the infamous FOV-jittering bug (MC-4098).
The other problem is that the server always mirrors your sprint inputs and sends them back, making you visibly lose sprint twice on high ping, when only letting go of W for a short time or colliding with a block.
Therefore I think it would be great for QoL-, as well as for anticheating-purposes, if sprinting could be left entirely to the client.
Please sign in to leave a comment.
0 Comments