gbl / AntiGhost

Mod that requests the server to send surrounding blocks to you, to get rid of ghost blocks
MIT License
28 stars 16 forks source link

`/ghost` can kick you "for exceeding packet rate limit" #24

Closed James103 closed 2 years ago

James103 commented 2 years ago

https://github.com/gbl/AntiGhost/blob/9d803da143e36fb2ce273fb00872f0cad01fa47b/src/main/java/de/guntram/mcmod/antighost/AntiGhost.java#L53-L62 The above code loops 9 9 9 times, sending 729 ABORT_DESTROY_BLOCK packets in a single client-side game tick. This can cause servers to kick you for sending too many packets.

To fix this,

  1. Wait a few milliseconds between each packet send.
  2. Send the packets from a separate thread (to facilitate item 1).
  3. Add a warning to the description page saying that using the mod may kick you from servers with low packet rate limits.
gbl commented 2 years ago

Normal servers, no matter of Vanilla, Spigot, or Fabric, won't kick you. Nether will ViaVersion which has a rate limiter of 800, so the 729 is well within limits.

If a server owner decides to break their server by setting a lower limit, then it's their decision to do so. I won't take any countermeasures against that - it's the owners responsibility to have a working server, and I won't make my mods work around owners decisions.