Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added mode to prevent stepping when player is in a safe hole #295

Merged
merged 4 commits into from
Apr 14, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import com.lambda.client.setting.settings.impl.primitive.BooleanSetting
import com.lambda.client.util.BaritoneUtils
import com.lambda.client.util.Bind
import com.lambda.client.util.EntityUtils.isInOrAboveLiquid
import com.lambda.client.util.combat.SurroundUtils
import com.lambda.client.util.text.MessageSendHelper
import com.lambda.client.util.threads.runSafe
import com.lambda.client.util.threads.safeListener
Expand All @@ -33,6 +34,7 @@ object Step : Module(
private val upStep = setting("Up Step", true)
private val downStep = setting("Down Step", false)
private val entityStep by setting("Entities", true)
private val checkHole by setting("Check Hole", false)
private val height by setting("Height", 1.0f, 0.25f..2.0f, 0.25f)
private val downSpeed by setting("Down Speed", 0.2f, 0.0f..1.0f, 0.05f)
private val bindUpStep by setting("Bind Up Step", Bind())
Expand Down Expand Up @@ -97,6 +99,7 @@ object Step : Module(
&& !player.capabilities.isFlying
&& !player.isOnLadder
&& !player.isInOrAboveLiquid
&& (!checkHole.value || SurrondUtils.checkHole(player) == SurroundUtils.HoleType.NONE)

private fun SafeClientEvent.setStepHeight() {
player.stepHeight = if (upStep.value && player.onGround && player.collidedHorizontally) height else defaultHeight
Expand Down Expand Up @@ -144,4 +147,4 @@ object Step : Module(
BaritoneUtils.settings?.assumeStep?.value = isEnabled && it
}
}
}
}