mirror of
https://github.com/chylex/Better-Controls.git
synced 2025-08-17 16:31:49 +02:00
Compare commits
2 Commits
dfefab3482
...
fabric/1.1
Author | SHA1 | Date | |
---|---|---|---|
32f96a32d1 | |||
16da16c269 |
@@ -7,7 +7,7 @@ yarn_mappings=1.16.4+build.1
|
|||||||
loader_version=0.10.6+build.214
|
loader_version=0.10.6+build.214
|
||||||
|
|
||||||
# Mod Properties
|
# Mod Properties
|
||||||
mod_version=1.1.0
|
mod_version=1.2.0
|
||||||
maven_group=chylex.bettercontrols
|
maven_group=chylex.bettercontrols
|
||||||
archives_base_name=BetterControls-1.16.2+
|
archives_base_name=BetterControls-1.16.2+
|
||||||
|
|
||||||
|
@@ -181,16 +181,6 @@ public final class PlayerTicker{
|
|||||||
player.setVelocity(player.getVelocity().add(0D, flightSpeed * verticalVelocity * direction, 0D));
|
player.setVelocity(player.getVelocity().add(0D, flightSpeed * verticalVelocity * direction, 0D));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cfg().disableFlightInertia){
|
|
||||||
if (input.movementForward == 0F && input.movementSideways == 0F){
|
|
||||||
player.setVelocity(player.getVelocity().multiply(0.0, 1.0, 0.0));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!input.jumping && !input.sneaking){
|
|
||||||
player.setVelocity(player.getVelocity().multiply(1.0, 0.0, 1.0));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cfg().resumeSprintingAfterHittingObstacle){
|
if (cfg().resumeSprintingAfterHittingObstacle){
|
||||||
@@ -256,6 +246,18 @@ public final class PlayerTicker{
|
|||||||
holdingSneakWhileTouchingGround = false;
|
holdingSneakWhileTouchingGround = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (FlightHelper.isFlyingCreativeOrSpectator(player) && cfg().disableFlightInertia){
|
||||||
|
final Input input = player.input;
|
||||||
|
|
||||||
|
if (input.movementForward == 0F && input.movementSideways == 0F){
|
||||||
|
player.setVelocity(player.getVelocity().multiply(0.0, 1.0, 0.0));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!input.jumping && !input.sneaking){
|
||||||
|
player.setVelocity(player.getVelocity().multiply(1.0, 0.0, 1.0));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (player.isCreative()){
|
if (player.isCreative()){
|
||||||
if (Key.wasPressed(cfg().keyToggleFlight)){
|
if (Key.wasPressed(cfg().keyToggleFlight)){
|
||||||
final boolean isFlying = !player.abilities.flying;
|
final boolean isFlying = !player.abilities.flying;
|
||||||
|
Reference in New Issue
Block a user