Szum123321 / elytra_swap

Automatic elytra replacement with chestplace and more
https://www.curseforge.com/minecraft/mc-mods/elytra-swap
GNU General Public License v3.0
3 stars 2 forks source link

Handle swapping client-side if possible to more gracefully degrade function on lagging servers #30

Open magneticflux- opened 3 years ago

magneticflux- commented 3 years ago

Use case

On a server a slow or unstable connection, there may be periods of ~1-2 seconds where the server does not respond immediately. If one of those periods occurs while trying to take off or falling, nothing happens and the player either does not take off or takes falling damage unexpectedly.

Details

Right now, flight only happens when the server receives the player's position or item use packets, regardless of if the client has the mod or not. There's nothing we can do if the client doesn't have the mod (they just have to wait for the server response), but if the client does have the mod, we can equip the elytra client-side immediately, knowing that the server will agree with our state when it catches up.