mirror of
https://github.com/kami-blue/client
synced 2025-01-18 13:00:47 +00:00
Apply suggestions from code review
This commit is contained in:
parent
f1d0434e72
commit
c4877cfa5a
@ -5,17 +5,21 @@ import org.kamiblue.client.module.Category
|
||||
import org.kamiblue.client.module.Module
|
||||
import org.kamiblue.client.util.threads.safeListener
|
||||
|
||||
|
||||
internal object Parkour : Module(
|
||||
name = "Parkour",
|
||||
description = "Jump at the edge of blocks",
|
||||
description = "Automatically jump at the edge of blocks",
|
||||
category = Category.MOVEMENT
|
||||
) {
|
||||
init {
|
||||
safeListener<TickEvent.ClientTickEvent> {
|
||||
if(player.onGround &&
|
||||
!player.isSneaking &&
|
||||
world.getCollisionBoxes(player, player.entityBoundingBox.offset(0.0, -0.5, 0.0).expand(-0.001, 0.0, -0.001)).isEmpty())
|
||||
player.jump() }
|
||||
if (
|
||||
player.onGround && !player.isSneaking &&
|
||||
world.getCollisionBoxes(player, player.entityBoundingBox
|
||||
.offset(0.0, -0.5, 0.0)
|
||||
.expand(-0.001, 0.0, -0.001)).isEmpty()
|
||||
) {
|
||||
player.jump()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user