From 0eb0b99a609e627a236aec0ca9137f2a57da5e41 Mon Sep 17 00:00:00 2001 From: Sollace Date: Mon, 16 Sep 2024 15:30:46 +0100 Subject: [PATCH] Fixed server flight state desync. Fixes #430, Fixes #421 (probably, cannot reproduce) --- .../minelittlepony/unicopia/entity/player/PlayerPhysics.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/minelittlepony/unicopia/entity/player/PlayerPhysics.java b/src/main/java/com/minelittlepony/unicopia/entity/player/PlayerPhysics.java index b1413ea8..139a6531 100644 --- a/src/main/java/com/minelittlepony/unicopia/entity/player/PlayerPhysics.java +++ b/src/main/java/com/minelittlepony/unicopia/entity/player/PlayerPhysics.java @@ -243,7 +243,7 @@ public class PlayerPhysics extends EntityPhysics implements Tickab public void tick() { super.tick(); - if (pony.isClientPlayer() && isFlying() && (pony.getJumpingHeuristic().hasChanged(Heuristic.ONCE) || pony.sneakingChanged())) { + if (pony.isClientPlayer() && (pony.getJumpingHeuristic().hasChanged(Heuristic.ONCE) || pony.sneakingChanged())) { Channel.FLIGHT_CONTROLS_INPUT.sendToServer(new MsgPlayerFlightControlsInput(pony)); } @@ -370,7 +370,7 @@ public class PlayerPhysics extends EntityPhysics implements Tickab pony.getMagicalReserves().getCharge().set(0); } - if (!creative) { + if (!creative && !pony.isClient()) { checkAvianTakeoffConditions(velocity); } }