1
0
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:
liv 2021-03-25 13:56:59 -04:00 committed by GitHub
parent f1d0434e72
commit c4877cfa5a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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()
}
}
}
}
}