diff options
author | HiZe_ <superhize@hotmail.com> | 2023-09-07 13:52:41 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-07 13:52:41 +0200 |
commit | 1562885f615afa40555f210c4c9ede5c13de10fb (patch) | |
tree | 2edbeb754411e7e5b495dd88650d927fbffb18d6 | |
parent | 1d06409451bf1649cba399c518eb1cdb6eb27f96 (diff) | |
download | skyhanni-1562885f615afa40555f210c4c9ede5c13de10fb.tar.gz skyhanni-1562885f615afa40555f210c4c9ede5c13de10fb.tar.bz2 skyhanni-1562885f615afa40555f210c4c9ede5c13de10fb.zip |
Fix: Ghostcounter Bestiary detection (#438)
Co-authored-by: superhize <superhize@gmail.com>
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/misc/ghostcounter/GhostCounter.kt | 4 |
1 files changed, 2 insertions, 2 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()) { |