Skip to content

Commit

Permalink
fix autoL not working if target autoRespawns
Browse files Browse the repository at this point in the history
  • Loading branch information
nxyi committed Sep 11, 2024
1 parent aca7e0a commit a9ad9a7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main/java/com/dark/zewo2/modules/AutoL.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import meteordevelopment.meteorclient.utils.Utils;
import meteordevelopment.meteorclient.utils.player.ChatUtils;
import meteordevelopment.orbit.EventHandler;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.network.packet.s2c.play.EntityStatusS2CPacket;

Expand All @@ -33,9 +34,10 @@ public AutoL() {
@EventHandler
private void OnPacket(PacketEvent.Receive event) {
if (event.packet instanceof EntityStatusS2CPacket packet) {
if (packet.getEntity(mc.world) instanceof PlayerEntity player){
if (packet.getStatus() != 3) return;

if (player.getHealth() > 0) return;
Entity entity = packet.getEntity(mc.world);
if (entity instanceof PlayerEntity player){
if (player.equals(mc.player)) return;

String text = messages.get().get(Utils.random(0, messages.get().size()));
Expand Down

0 comments on commit a9ad9a7

Please sign in to comment.