From 050e3325c7ebe7b6218618262e6ed955232c870d Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal002@users.noreply.github.com> Date: Fri, 16 Aug 2024 11:16:47 +0200 Subject: Fix: ConcurrentModificationException in SeaCreatureManager (#2350) Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com> --- src/main/java/at/hannibal2/skyhanni/features/fishing/FishingTimer.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java/at/hannibal2/skyhanni') diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingTimer.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingTimer.kt index 74cf9294d..012d47f49 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingTimer.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingTimer.kt @@ -125,7 +125,7 @@ object FishingTimer { private fun handle() { if (lastSeaCreatureFished.passedSince() > 2.seconds) return val name = lastNameFished ?: return - val mobs = recentMobs.filter { it.name == name && it !in mobDespawnTime } + val mobs = recentMobs.toSet().filter { it.name == name && it !in mobDespawnTime } .sortedBy { it.baseEntity.distanceToPlayer() } .take(mobsToFind).ifEmpty { return } mobsToFind -= mobs.size -- cgit