aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2022-09-28 13:43:41 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2022-09-28 15:10:23 +0200
commit586947cbea3603fa1c89d4298a18c7a145f92704 (patch)
tree6f9e63ad7bc3c99978ba170d553e8caf34c8b753 /src/main/java/at/hannibal2/skyhanni/features
parentbcb79462d90df552994f515b7d573f24b73d2684 (diff)
downloadskyhanni-586947cbea3603fa1c89d4298a18c7a145f92704.tar.gz
skyhanni-586947cbea3603fa1c89d4298a18c7a145f92704.tar.bz2
skyhanni-586947cbea3603fa1c89d4298a18c7a145f92704.zip
fixed RenderItemTipEvent bug
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/inventory/ItemStars.kt5
1 files changed, 3 insertions, 2 deletions
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 {