aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 {