1
0
mirror of https://github.com/chylex/Better-Controls.git synced 2025-08-18 19:24:59 +02:00

Fix horizontal flight speed multiplier affecting inertia when sprinting in creative mode

This commit is contained in:
2023-06-16 11:04:12 +02:00
parent e53d76d158
commit b4ecf8b66a

@@ -43,7 +43,7 @@ public abstract class HookPlayerHorizontalFlightSpeed extends LivingEntity {
@SuppressWarnings("ConstantConditions") @SuppressWarnings("ConstantConditions")
final Player me = (Player)(Object)this; final Player me = (Player)(Object)this;
if (me instanceof final LocalPlayer localPlayer) { if (me instanceof final LocalPlayer localPlayer && localPlayer.getAbilities().flying) {
final float multiplier = FlightHelper.getHorizontalSpeedMultiplier(localPlayer); final float multiplier = FlightHelper.getHorizontalSpeedMultiplier(localPlayer);
cir.setReturnValue(Float.valueOf(cir.getReturnValueF() * multiplier)); cir.setReturnValue(Float.valueOf(cir.getReturnValueF() * multiplier));
} }