This highlighted bit of code used to be an "else" statement instead of "else if", causing the client to basically send a packet every tick to the server. This change makes Reach, Autoclicker & other serverside anticheat checks more difficult, because you do not know when the client ticks.
Presumably this change has been made to reduce bandwidth usage, but the change should be insignificant: about 1 MB/hour/player saved by this change.
4,608,000 bytes, calculated by 64 byte minimum TCP packet * 20 ticks/second * 60 seconds/minute * 60 minutes/hour
It'd be great to return to this behaviour like in Minecraft 1.8 to make serverside anticheats more reliable. This is also already typical behaviour in Bedrock with server authoritative movement and is also used for serverside anticheats there.
Linked issues
relates to 1
Comments 4
@MojangMoesh
This should still be considered. The net code already has enough issues on it's own and this behavior just makes the life of anticheat developers much harder. And if bandwidth is a concern, a gamerule could be added for this, so every server could decide if this is the behavior that they want. (/gamerule sendIdlePacket, for example)
This issue has no gameplay impact, only mod-developer impact; issues must have vanilla-gameplay impact to be valid.
Additionally,that's not the kind of thing game rules are intended to be used for; they're used to control gameplay aspects, not networking.
Additionally, and modded client could just change that line to an "else if" again, meaning it has no real gain to counter such hacks.
This issue (alongside the 0.03 position threshold) has actually caused vanilla gameplay bugs, see MC-224949
Re-adding the idle packet (and removing the position threshold) is needed to stop client-server position desyncs and the issues that are caused by it. The idle packets existed in 1.8 and they worked just fine.
And even if the issue didn't affect gameplay, there's no reason not to fix it. Both mod makers and players would benefit from it.
Additionally, if a modified client changed the code to remove idle packets, it's easily detectable.
This is a feature request.