aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features/misc/ghostcounter
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/misc/ghostcounter')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/ghostcounter/GhostCounter.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/ghostcounter/GhostFormatting.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/ghostcounter/GhostUtil.kt2
3 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/ghostcounter/GhostCounter.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/ghostcounter/GhostCounter.kt
index e8e539553..19482141d 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/ghostcounter/GhostCounter.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/ghostcounter/GhostCounter.kt
@@ -41,7 +41,6 @@ import at.hannibal2.skyhanni.utils.StringUtils.removeColor
import at.hannibal2.skyhanni.utils.renderables.Renderable
import io.github.moulberry.notenoughupdates.util.Utils
import io.github.moulberry.notenoughupdates.util.XPInformation
-import net.minecraft.client.Minecraft
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
import java.io.File
import java.text.NumberFormat
@@ -452,7 +451,8 @@ object GhostCounter {
val stacks = event.inventoryItems
val ghostStack = stacks[10] ?: return
val bestiaryNextLevel =
- if (ghostStack.displayName == "§cGhost") 1 else ghostStack.displayName.substring(8).romanToDecimal() + 1
+ if ("§\\wGhost".toRegex().matches(ghostStack.displayName)) 1 else ghostStack.displayName.substring(8)
+ .romanToDecimal() + 1
hidden?.bestiaryNextLevel = bestiaryNextLevel.toDouble()
var kills = 0.0
for (line in ghostStack.getLore()) {
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/ghostcounter/GhostFormatting.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/ghostcounter/GhostFormatting.kt
index 304be561d..c2f81491a 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/ghostcounter/GhostFormatting.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/ghostcounter/GhostFormatting.kt
@@ -160,7 +160,7 @@ object GhostFormatting {
base = " &6Bestiary %currentLevel%->%nextLevel%: &b%value%"
openMenu = "§cOpen Bestiary Menu !"
maxed = "%currentKill% (&c&lMaxed!)"
- showMax_progress = "%currentKill%/3M (%percentNumber%%)"
+ showMax_progress = "%currentKill%/250k (%percentNumber%%)"
progress = "%currentKill%/%killNeeded%"
}
with(killHourFormatting) {
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/ghostcounter/GhostUtil.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/ghostcounter/GhostUtil.kt
index b04ce9287..bfcc73cec 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/ghostcounter/GhostUtil.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/ghostcounter/GhostUtil.kt
@@ -123,6 +123,6 @@ object GhostUtil {
}
private fun percent(number: Double): String {
- return "${((number / 250_000) * 100).roundToPrecision(4)}"
+ return 100.0.coerceAtMost(((number / 250_000) * 100).roundToPrecision(4)).toString()
}
} \ No newline at end of file