1
0
mirror of https://github.com/chylex/Better-Controls.git synced 2025-04-22 18:15:46 +02:00

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

This commit is contained in:
chylex 2023-06-16 11:04:12 +02:00
parent e53d76d158
commit b4ecf8b66a
Signed by: chylex
GPG Key ID: 4DE42C8F19A80548

View File

@ -43,7 +43,7 @@ public abstract class HookPlayerHorizontalFlightSpeed extends LivingEntity {
@SuppressWarnings("ConstantConditions")
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);
cir.setReturnValue(Float.valueOf(cir.getReturnValueF() * multiplier));
}