From 03367368988c5191456e20cc5f48db81532d071a Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Wed, 10 May 2023 21:42:19 +0200 Subject: Fixed average crop milestone sometimes not correct --- .../skyhanni/features/garden/inventory/GardenCropMilestoneAverage.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java/at/hannibal2') diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/GardenCropMilestoneAverage.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/GardenCropMilestoneAverage.kt index 5faaac281..6f16e3f53 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/GardenCropMilestoneAverage.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/GardenCropMilestoneAverage.kt @@ -23,7 +23,7 @@ class GardenCropMilestoneAverage { val tier = GardenCropMilestones.getTierForCrops(counter) tiers.add(tier.toDouble()) } - average = tiers.average().round(2) + average = (tiers.sum() / CropType.values().size).round(2) } @SubscribeEvent -- cgit