aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-03-10 13:00:27 +0100
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-03-10 13:00:27 +0100
commit7835491a42dbe69117dce2b2129930e90e6824ab (patch)
tree2d278de37976436a3a338cf943224ed8c83c3318
parentf3a0cc2e602879e2a3b2818a1b412aef8935aa23 (diff)
downloadSkyHanni-7835491a42dbe69117dce2b2129930e90e6824ab.tar.gz
SkyHanni-7835491a42dbe69117dce2b2129930e90e6824ab.tar.bz2
SkyHanni-7835491a42dbe69117dce2b2129930e90e6824ab.zip
Fixed bug in garden level calculation
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/GardenLevelDisplay.kt3
1 files changed, 2 insertions, 1 deletions
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
}
}