From df1a6dd8fcf348dfb97ba85e6590fdd40207fcd8 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Fri, 10 Mar 2023 13:00:27 +0100 Subject: Fixed bug in garden level calculation --- .../java/at/hannibal2/skyhanni/features/garden/GardenLevelDisplay.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/main/java') diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenLevelDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenLevelDisplay.kt index f40b4edc3..afef573e3 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenLevelDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenLevelDisplay.kt @@ -13,6 +13,7 @@ import at.hannibal2.skyhanni.utils.RenderUtils.renderString import at.hannibal2.skyhanni.utils.StringUtils.removeColor import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import java.util.regex.Pattern +import kotlin.math.roundToInt class GardenLevelDisplay { private val config get() = SkyHanniMod.feature.garden @@ -57,7 +58,7 @@ class GardenLevelDisplay { for (line in item.getLore()) { val matcher = overflowPattern.matcher(line) if (matcher.matches()) { - overflow = matcher.group(1).replace(",", "").toInt() + overflow = matcher.group(1).replace(",", "").toDouble().roundToInt() break } } -- cgit