diff options
author | hannibal2 <24389977+hannibal002@users.noreply.github.com> | 2024-05-14 09:54:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-14 09:54:21 +0200 |
commit | e7284ce13a701305b49945c153229d4bc5fd2311 (patch) | |
tree | db1ad8856cdf71c4ac77d41758ec0cb7ad3bde3a /src/main/java/at/hannibal2/skyhanni | |
parent | 3fc401f5ecc8d67caae58f39b94ffc2e8f4f616c (diff) | |
download | skyhanni-e7284ce13a701305b49945c153229d4bc5fd2311.tar.gz skyhanni-e7284ce13a701305b49945c153229d4bc5fd2311.tar.bz2 skyhanni-e7284ce13a701305b49945c153229d4bc5fd2311.zip |
Fix: remove bugged minions (#1791)
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt | 2 |
1 files changed, 2 insertions, 0 deletions
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<LorenzVec>() for (location in minions.keys) { + if (location.distanceToPlayer() > 30) continue val entitiesNearby = EntityUtils.getEntities<EntityArmorStand>().map { it.distanceTo(location) } if (!entitiesNearby.any { it == 0.0 }) { removedEntities.add(location) |