From b3068780aef9521c92d1dea39a045ce322746547 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 c2789be6..d1339e66 100644 --- a/src/main/java/com/minelittlepony/unicopia/entity/player/PlayerPhysics.java +++ b/src/main/java/com/minelittlepony/unicopia/entity/player/PlayerPhysics.java @@ -242,7 +242,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)); } @@ -369,7 +369,7 @@ public class PlayerPhysics extends EntityPhysics implements Tickab pony.getMagicalReserves().getCharge().set(0); } - if (!creative) { + if (!creative && !pony.isClient()) { checkAvianTakeoffConditions(velocity); } }