@@ -38,7 +38,9 @@ import com.lambda.util.math.random
3838import com.lambda.util.player.SlotUtils.hotbar
3939import net.minecraft.entity.LivingEntity
4040import net.minecraft.item.ItemStack
41+ import net.minecraft.network.packet.c2s.play.PlayerInteractEntityC2SPacket
4142import net.minecraft.util.Hand
43+ import net.minecraft.world.GameMode
4244
4345object KillAura : Module(
4446 name = " KillAura" ,
@@ -107,10 +109,10 @@ object KillAura : Module(
107109 // Wait until the rotation has a hit result on the entity
108110 if (rotate) runSafeAutomated {
109111 val rotationRequest = RotationRequest (lookAtEntity(entity)?.rotation ? : return @listen, this @KillAura).submit()
110- val canContinue = ! rotationRequest.done || entity != = prevEntity || ! validServerRot
112+ val cantContinue = ! rotationRequest.done || entity != = prevEntity || ! validServerRot
111113 prevEntity = entity
112114 validServerRot = rotationRequest.done
113- if (canContinue ) return @listen
115+ if (cantContinue ) return @listen
114116 }
115117
116118 if (swap) {
@@ -131,7 +133,11 @@ object KillAura : Module(
131133 }
132134
133135 // Attack
134- interaction.attackEntity(player, target)
136+ connection.sendPacket(PlayerInteractEntityC2SPacket .attack(target, player.isSneaking))
137+ if (interaction.gameMode != GameMode .SPECTATOR ) {
138+ player.attack(target)
139+ player.resetTicksSince()
140+ }
135141 if (interactConfig.swing) player.swingHand(Hand .MAIN_HAND )
136142
137143 lastAttackTime = System .currentTimeMillis()
0 commit comments