diff --git a/src/main/java/net/wurstclient/util/EntityUtils.java b/src/main/java/net/wurstclient/util/EntityUtils.java index 68b00e7921..50d6b95078 100644 --- a/src/main/java/net/wurstclient/util/EntityUtils.java +++ b/src/main/java/net/wurstclient/util/EntityUtils.java @@ -35,7 +35,7 @@ public static Stream getAttackableEntities() .filter(IS_ATTACKABLE); } - public static Predicate IS_ATTACKABLE = e -> e != null + public static final Predicate IS_ATTACKABLE = e -> e != null && !e.isRemoved() && (e instanceof LivingEntity && ((LivingEntity)e).getHealth() > 0 || e instanceof EndCrystalEntity @@ -50,7 +50,7 @@ public static Stream getValidAnimals() .filter(IS_VALID_ANIMAL); } - public static Predicate IS_VALID_ANIMAL = + public static final Predicate IS_VALID_ANIMAL = a -> a != null && !a.isRemoved() && a.getHealth() > 0; /**