From a0bad0e89985728cb182b8acbddec825e47bdfb7 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Tue, 23 Jan 2024 16:20:18 +0100 Subject: Made blocks per second calculation more accurate immediately after start farming. --- .../hannibal2/skyhanni/features/garden/farming/GardenCropSpeed.kt | 6 ++++-- 1 file 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() -- cgit