@@ -35,8 +35,6 @@ import com.lambda.interaction.visibilty.VisibilityChecker.scanSurfaces
3535import com.lambda.interaction.visibilty.VisibilityChecker.visibleSides
3636import com.lambda.module.Module
3737import com.lambda.module.tag.ModuleTag
38- import com.lambda.threading.runConcurrent
39- import com.lambda.threading.runSafe
4038import com.lambda.util.math.MathUtils.random
4139import com.lambda.util.math.VecUtils.distSq
4240import com.lambda.util.math.VecUtils.plus
@@ -45,7 +43,6 @@ import com.lambda.util.math.lerp
4543import com.lambda.util.player.MovementUtils.moveDiff
4644import com.lambda.util.player.prediction.buildPlayerPrediction
4745import com.lambda.util.world.raycast.RayCastUtils.entityResult
48- import kotlinx.coroutines.delay
4946import net.minecraft.entity.EquipmentSlot
5047import net.minecraft.entity.LivingEntity
5148import net.minecraft.entity.attribute.EntityAttributeModifier
@@ -89,7 +86,8 @@ object KillAura : Module(
8986 private val selfPredict by setting(" Self Predict" , 1.0 , 0.0 .. 2.0 , 0.1 ) { page == Page .Aiming && rotate }
9087 private val targetPredict by setting(" Target Predict" , 0.0 , 0.0 .. 2.0 , 0.1 ) { page == Page .Aiming && rotate }
9188
92- var target: LivingEntity ? = null ; private set
89+ val target: LivingEntity ?
90+ get() = targeting.target()
9391
9492 private var shakeRandom = Vec3d .ZERO
9593
@@ -131,24 +129,13 @@ object KillAura : Module(
131129 }
132130
133131 listen<TickEvent .Pre > {
134- target = targeting.target()
135132 if (! timerSync) attackTicks++
136133
137134 target?.let { entity ->
138135 runAttack(entity)
139136 }
140137 }
141138
142- runConcurrent {
143- while (true ) {
144- delay(50 ) // ToDo: tps sync
145-
146- runSafe {
147- if (timerSync && isEnabled) attackTicks++
148- }
149- }
150- }
151-
152139 listen<PacketEvent .Send .Post > { event ->
153140 if (event.packet !is HandSwingC2SPacket &&
154141 event.packet !is UpdateSelectedSlotC2SPacket &&
@@ -327,7 +314,6 @@ object KillAura : Module(
327314 }
328315
329316 private fun reset (ctx : SafeContext ) = ctx.apply {
330- target = null
331317 attackTicks = player.lastAttackedTicks
332318 rotation.speedMultiplier = 1.0
333319 shakeRandom = Vec3d .ZERO
0 commit comments