From 586947cbea3603fa1c89d4298a18c7a145f92704 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Wed, 28 Sep 2022 13:43:41 +0200 Subject: fixed RenderItemTipEvent bug --- src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt | 4 ++-- .../java/at/hannibal2/skyhanni/features/inventory/ItemStars.kt | 5 +++-- src/main/java/at/hannibal2/skyhanni/test/LorenzTest.kt | 9 --------- 3 files changed, 5 insertions(+), 13 deletions(-) (limited to 'src/main/java/at') diff --git a/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt b/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt index fc458b6d2..53a1286d3 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt @@ -82,14 +82,14 @@ class HypixelData { val newState = checkScoreboard() if (newState) { - checkMode() + checkIsland() } if (newState == skyblock) return skyblock = newState } - private fun checkMode() { + private fun checkIsland() { var newIsland = "" var guesting = false for (line in TabListUtils.getTabList()) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemStars.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemStars.kt index 000a2f93a..4573ffa70 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemStars.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemStars.kt @@ -63,10 +63,11 @@ class ItemStars { @SubscribeEvent fun onRenderItemTip(event: RenderItemTipEvent) { if (!SkyHanniMod.feature.inventory.itemNumberAsStackSize.contains(6)) return - val stack = event.stack val number = getCrimsonStars(stack.name ?: return) - event.stackTip = if (number == -1) "" else number.toString() + if (number != -1) { + event.stackTip = number.toString() + } } private fun getStars(name: String): Int { diff --git a/src/main/java/at/hannibal2/skyhanni/test/LorenzTest.kt b/src/main/java/at/hannibal2/skyhanni/test/LorenzTest.kt index 4bad04b3d..87473af62 100644 --- a/src/main/java/at/hannibal2/skyhanni/test/LorenzTest.kt +++ b/src/main/java/at/hannibal2/skyhanni/test/LorenzTest.kt @@ -76,15 +76,6 @@ class LorenzTest { println("shouldLogPackets: $shouldLogPackets") } - private var highestStep = 0 - - fun highStep(step: Int) { - if (step > highestStep) { - highestStep = step - text = "" + highestStep - } - } - fun reloadListeners() { val blockedFeatures = try { File("config/skyhanni/blocked-features.txt").readLines().toList() -- cgit