From e7284ce13a701305b49945c153229d4bc5fd2311 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal002@users.noreply.github.com> Date: Tue, 14 May 2024 09:54:21 +0200 Subject: Fix: remove bugged minions (#1791) Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com> --- src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/main/java/at') diff --git a/src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt index db2dd184e..7fa5700f0 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt @@ -199,10 +199,12 @@ class MinionFeatures { } private fun removeBuggedMinions() { + if (!IslandType.PRIVATE_ISLAND.isInIsland()) return val minions = minions ?: return val removedEntities = mutableListOf() for (location in minions.keys) { + if (location.distanceToPlayer() > 30) continue val entitiesNearby = EntityUtils.getEntities().map { it.distanceTo(location) } if (!entitiesNearby.any { it == 0.0 }) { removedEntities.add(location) -- cgit