Skip to content

Commit 3af2f41

Browse files
committed
fix: kill aura reach
1 parent f218933 commit 3af2f41

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

common/src/main/kotlin/com/lambda/config/groups/InteractionSettings.kt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,15 @@ import com.lambda.config.Configurable
2121
import com.lambda.threading.runSafe
2222
import net.minecraft.entity.player.PlayerEntity
2323

24+
// TODO: Rewrite the group settings plz
2425
class InteractionSettings(
2526
c: Configurable,
27+
useDefaultReach: Boolean = true,
28+
cReach: Double = 3.0,
2629
vis: () -> Boolean = { true },
2730
) : InteractionConfig {
28-
override val defaultReach by c.setting("Default Reach", true)
29-
private val customReach by c.setting("Reach", 4.5, 0.1..10.0, 0.1, "Players reach / range", " blocks") { vis() && !defaultReach }
31+
override val defaultReach by c.setting("Default Reach", useDefaultReach)
32+
private val customReach by c.setting("Reach", if (!defaultReach) cReach else 4.5, 0.1..10.0, 0.1, "Players reach / range", " blocks") { vis() && !defaultReach }
3033
override val reach: Double
3134
get() = if (defaultReach) runSafe { PlayerEntity.getReachDistance(interaction.currentGameMode.isCreative).toDouble() } ?: 4.5 else customReach
3235
override val useRayCast by c.setting("Raycast", true, "Verify hit vector with ray casting (for very strict ACs)", vis)

common/src/main/kotlin/com/lambda/module/modules/combat/KillAura.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ object KillAura : Module(
6262
private val page by setting("Page", Page.Interact)
6363

6464
// Interact
65-
private val interactionSettings = InteractionSettings(this) { page == Page.Interact }
65+
private val interactionSettings = InteractionSettings(this, useDefaultReach = false) { page == Page.Interact }
6666
private val attackMode by setting("Attack Mode", AttackMode.Cooldown) { page == Page.Interact }
6767
private val delaySync by setting("Client-side Delay", true) { page == Page.Interact && attackMode == AttackMode.Cooldown }
6868
private val cooldownSync by setting("Client-side Cooldown", true) { page == Page.Interact && attackMode == AttackMode.Cooldown }

0 commit comments

Comments
 (0)