Skip to content

Commit 1abf25e

Browse files
committed
clamp railgun speed (in more axes)
1 parent 7adec24 commit 1abf25e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/main/java/team/chisel/block/BlockQuickcrete.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ public void speedupPlayer(PlayerTickEvent event) {
3636
if (below == this) {
3737
manualInputCheck.updatePlayerMoveState();
3838
if (manualInputCheck.moveForward != 0 || manualInputCheck.moveStrafe != 0) {
39-
player.motionX = Math.min(1.3f, player.motionX * (Configurations.concreteVelocityMult + speedup));
40-
player.motionZ = Math.min(1.3f, player.motionZ * (Configurations.concreteVelocityMult + speedup));
39+
player.motionX = Math.max(-1.2F, Math.min(1.2f, player.motionX * (Configurations.concreteVelocityMult + speedup)));
40+
player.motionZ = Math.max(-1.2F, Math.min(1.2f, player.motionZ * (Configurations.concreteVelocityMult + speedup)));
4141
}
4242
}
4343
}

0 commit comments

Comments
 (0)