diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-08-15 14:21:56 +0200 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-08-15 14:21:56 +0200 |
commit | 2abcfe0a016147e402a47fe14450cb78649acba6 (patch) | |
tree | f0f8b48c9aabdf1c5a25d6bb43b12c9a3c475f5a /src | |
parent | ceef1d3be403db7ee5f8cbda8c49f3370d35df78 (diff) | |
download | skyhanni-2abcfe0a016147e402a47fe14450cb78649acba6.tar.gz skyhanni-2abcfe0a016147e402a47fe14450cb78649acba6.tar.bz2 skyhanni-2abcfe0a016147e402a47fe14450cb78649acba6.zip |
removed distance checks when detecting sea creatures for fishing timer
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/fishing/FishingTimer.kt (renamed from src/main/java/at/hannibal2/skyhanni/features/fishing/BarnFishingTimer.kt) | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/BarnFishingTimer.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingTimer.kt index 557a1a508..65e1442b7 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/fishing/BarnFishingTimer.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingTimer.kt @@ -47,8 +47,7 @@ class BarnFishingTimer { } private fun checkMobs() { - // We ignore sea creatures more than 10 blocks away in crystal hollows - val newCount = if (inHollows) countMobs(10) else countMobs(40) + val newCount = countMobs() if (currentCount == 0 && newCount > 0) { startTime = System.currentTimeMillis() @@ -64,7 +63,7 @@ class BarnFishingTimer { } } - private fun countMobs(radius: Int) = EntityUtils.getEntitiesNextToPlayer<EntityArmorStand>(radius.toDouble()) + private fun countMobs() = EntityUtils.getEntities<EntityArmorStand>() .count { entity -> SeaCreatureManager.allFishingMobNames.any { entity.name.contains(it) } } private fun isRightLocation(): Boolean { |