Fixed server flight state desync. Fixes #430, Fixes #421 (probably, cannot reproduce)

This commit is contained in:
Sollace 2024-09-16 15:30:46 +01:00
parent fab6e7b3dd
commit b3068780ae
No known key found for this signature in database
GPG key ID: E52FACE7B5C773DB

View file

@ -242,7 +242,7 @@ public class PlayerPhysics extends EntityPhysics<PlayerEntity> 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<PlayerEntity> implements Tickab
pony.getMagicalReserves().getCharge().set(0);
}
if (!creative) {
if (!creative && !pony.isClient()) {
checkAvianTakeoffConditions(velocity);
}
}