aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/events/RenderItemTipEvent.kt1
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt6
2 files changed, 4 insertions, 3 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/events/RenderItemTipEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/RenderItemTipEvent.kt
index d9341cc87..5a144cb7e 100644
--- a/src/main/java/at/hannibal2/skyhanni/events/RenderItemTipEvent.kt
+++ b/src/main/java/at/hannibal2/skyhanni/events/RenderItemTipEvent.kt
@@ -9,6 +9,7 @@ class RenderItemTipEvent(
var stackTip = ""
set(value) {
+ if (value.isEmpty()) return
renderObjects.add(RenderObject(value, 0, 0))
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt
index bebac7d45..23aadf86b 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt
@@ -82,10 +82,10 @@ object ItemDisplayOverlayFeatures {
@SubscribeEvent
fun onRenderItemTip(event: RenderItemTipEvent) {
- event.stackTip = getStackTip(event.stack)
+ event.stackTip = getStackTip(event.stack) ?: return
}
- private fun getStackTip(item: ItemStack): String {
+ private fun getStackTip(item: ItemStack): String? {
val itemName = item.cleanName()
val internalName = item.getInternalName()
val chestName = InventoryUtils.openInventoryName()
@@ -258,7 +258,7 @@ object ItemDisplayOverlayFeatures {
}
}
- return ""
+ return null
}
private fun isOwnVacuum(lore: List<String>) =