Merge pull request #833 from wnuke/master

This commit is contained in:
Dominika 2020-05-15 12:14:04 -04:00 committed by GitHub
commit 12f1620f63
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View File

@ -38,6 +38,7 @@ class Aura : Module() {
private val prefer = register(Settings.e<HitMode>("Prefer", HitMode.SWORD))
private val autoTool = register(Settings.b("Auto Weapon", true))
private val sync = register(Settings.b("TPS Sync", false))
private val disableOnDeath = register(Settings.b("Disable On Death", false))
private var waitCounter = 0
enum class HitMode {
@ -49,7 +50,10 @@ class Aura : Module() {
}
override fun onUpdate() {
if (mc.player == null || mc.player.isDead) return
if (mc.player == null || mc.player.isDead) {
if (disableOnDeath.value) disable()
return
}
val autoWaitTick = 20.0f - LagCompensator.INSTANCE.tickRate
val canAttack = mc.player.getCooledAttackStrength(if (sync.value) -autoWaitTick else 0.0f) >= 1

View File

@ -27,6 +27,9 @@ class PacketCancel : Module() {
@EventHandler
private val sendListener = Listener(EventHook { event: PacketEvent.Send ->
if (mc.player == null) {
return@EventHook
}
if (all.value
||
packetInput.value && event.packet is CPacketInput