Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: be4dev <[email protected]>
  • Loading branch information
1zun4 and be4dev authored Nov 15, 2024
1 parent 02acc21 commit 937e535
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ object ModuleKeepSprint : Module("KeepSprint", Category.COMBAT) {

@Suppress("unused")
private val postTickHandler = handler<PlayerPostTickEvent> {
sprinting = mc.player?.isSprinting ?: false
sprinting = player.isSprinting
}

fun getMotion(): Double {
return when {
mc.player?.hurtTime in hurtTicks -> motionWhenHurt
player.hurtTime in hurtTicks -> motionWhenHurt
else -> motion
}.random() / 100.0
}
Expand Down

0 comments on commit 937e535

Please sign in to comment.