mojira.dev
MC-101243

Sneaking and walking distances in statistics are rounded, giving inconsistent results

In the code, movement speeds are quantized to very low distances, meaning that you can be "moving" without being able to see the motion. However, the crouchOneCm and walkOneCm statistics are much less accurate, and will simply round your moved distance to the nearest integer number of centimeters.

If the player is walking and lets go of the walk button, they slow down over the course of a second or two. The walkOneCm statistic will increment more slowly until it stops. But you will keep moving by a tiny amount for a second or so afterwards. This causes the walkOneCm to suddenly increment after it appeared to have stopped.

This causes a problem when trying to detect player movement. If there is a setup testing to see if the walkOneCm statistic incremented in the last tick, it will see the player as having stopped walking, then see them as walking again for a tick.

A similar problem appears when walking backwards. Since backwards walking speed is slower than forwards, the setup I described above will jitter between "walking" and "not walking" very quickly if the player is walking backwards.

Linked issues

Comments 1

Sorry, already reported, attach your findings to MC-97273.

KingSupernova

(Unassigned)

Unconfirmed

Minecraft 1.9.3 Pre-Release 1

Retrieved