Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
sqlerrorthing committed Feb 24, 2025
1 parent 0be1579 commit 967543d
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,17 @@ object ModuleParticles : ClientModule("Particles", category = Category.RENDER) {

@Suppress("unused")
private val attackEvent = handler<AttackEntityEvent> { event ->
if (!(event.entity.shouldBeShown() || chronometer.hasElapsed(230))
if (!event.entity.shouldBeShown()
|| !chronometer.hasElapsed(230)
|| event.isCancelled
) {
return@handler
} else {
chronometer.reset()
}

chronometer.reset()

val center = with (event.entity) {
pos.add(0.0, height / 2.0, 0.0)
boundingBox.center
}

repeat(count.random()) { _ ->
Expand Down

0 comments on commit 967543d

Please sign in to comment.