0

In vanilla survival Minecraft, you can only hit something from ~ 3 blocks away. In creative mode, the vanilla reach is ~ 5 blocks. But when I use this boat desynchronization glitch, I can hit people from ~ 6 blocks away. In testing cheat clients, the reach limit is also ~ 6 blocks.

Why is server-side reach higher than you can actually reach legitimately? It seems that if you wanted to code a server reach limit, you would make it at most the same number as client reach limit...

2

A typical reason this is done is for latency compensation. For instance, take the following scenario:

  • At time T-L, on the server, characters A and B are slightly less than 5 units apart and moving away from each other.
  • At time T, character A's client receives an update from the server describing where A and B were at T-L. A attacks and the client registers a hit on B.
  • At time T+L, the server receives the client's attack, but because of their movement in the intervening time, A and B are further than 5 units apart. If the range of the attack on the server is the same as on the client, the attack is now out of range.

This creates an undesirable user experience, where as far as A can tell, they should've been able to hit but were prevented by the server. By extending ranges slightly on the server side, this situation can be avoided.

0
-1

I'm guessing it may be something to do with latency. When you run a world in minecraft, an internal server is created to run that world. So your latency is low. But if we take hypixel, reach is sometimes scuffed, because of your latency. Again, I'm just guessing.

3
  • Yes, ping allows you to hit outside of usual client-side reach, but why is the hard-coded server limit further than vanilla client reach? It seems you could simply code the server side reach to be the same as the client side reach.
    – Hacker
    Oct 3 at 23:34
  • I just tried to give it my two cents. If you know java, maybe take a look at the net.minecraft.server source code You can find it through Mod Coder Pack Oct 3 at 23:50
  • If the client-side and server-side reach are the same, and one of the entities is moving, then occasionally you'll have a situation where a target appears to be at maximum range (on the client) but, because the server has a more accurate and up-to-date picture of where entities are, it's actually slightly outside maximum range. Then the player's attacks fail for no apparent reason. Making server reach longer helps avoid those situations.
    – Cadence
    Oct 4 at 2:58

Not the answer you're looking for? Browse other questions tagged or ask your own question.