mirror of
https://github.com/chylex/Better-Controls.git
synced 2025-04-30 14:34:04 +02:00
Fix horizontal flight speed multiplier affecting inertia when sprinting in creative mode
This commit is contained in:
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));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user