aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-01-23 16:20:18 +0100
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-01-23 16:20:18 +0100
commita0bad0e89985728cb182b8acbddec825e47bdfb7 (patch)
treedc6fee06a16c938a064b26eed41d78d87004e3ae /src/main/java/at
parentf8a5dd64df21d508d1e7de3feac60a74f4b1d14b (diff)
downloadskyhanni-a0bad0e89985728cb182b8acbddec825e47bdfb7.tar.gz
skyhanni-a0bad0e89985728cb182b8acbddec825e47bdfb7.tar.bz2
skyhanni-a0bad0e89985728cb182b8acbddec825e47bdfb7.zip
Made blocks per second calculation more accurate immediately after start farming.
Diffstat (limited to 'src/main/java/at')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenCropSpeed.kt6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenCropSpeed.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenCropSpeed.kt
index d44dcf359..5e0cedacc 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenCropSpeed.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenCropSpeed.kt
@@ -98,8 +98,10 @@ object GardenCropSpeed {
this.add(blocksBroken)
}
}
- averageBlocksPerSecond = if (blocksSpeedList.size > 1) {
- blocksSpeedList.dropLast(1).average()
+ averageBlocksPerSecond = if (blocksSpeedList.size > 5) {
+ blocksSpeedList.drop(3).average()
+ } else if (blocksSpeedList.size > 1) {
+ blocksSpeedList.drop(1).average()
} else 0.0
GardenAPI.getCurrentlyFarmedCrop()?.let {
val heldTool = InventoryUtils.getItemInHand()