Fixed clients slinging sneaky superfluous flight control packets. Fixes #267

This commit is contained in:
Sollace 2024-02-22 00:04:39 +00:00
parent 672807e343
commit a11f8d33eb
No known key found for this signature in database
GPG key ID: E52FACE7B5C773DB

View file

@ -234,7 +234,7 @@ public class PlayerPhysics extends EntityPhysics<PlayerEntity> implements Tickab
public void tick() {
super.tick();
if (pony.isClient() && this.isFlying()) {
if (pony.isClientPlayer() && isFlying() && (pony.getJumpingHeuristic().hasChanged(Heuristic.ONCE) || pony.sneakingChanged())) {
Channel.FLIGHT_CONTROLS_INPUT.sendToServer(new MsgPlayerFlightControlsInput(pony));
}