From a2415221255e9e5bd0f12a4876117064c3ded3e5 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sat, 6 May 2023 20:33:15 +0200 Subject: Fixed bug while hovering over an item --- .../java/at/hannibal2/skyhanni/features/garden/ToolTooltipTweaks.kt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/ToolTooltipTweaks.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/ToolTooltipTweaks.kt index f5f77b39e..73cdce3ad 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/ToolTooltipTweaks.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/ToolTooltipTweaks.kt @@ -1,6 +1,7 @@ package at.hannibal2.skyhanni.features.garden import at.hannibal2.skyhanni.SkyHanniMod +import at.hannibal2.skyhanni.data.GardenCropMilestones import at.hannibal2.skyhanni.events.LorenzToolTipEvent import at.hannibal2.skyhanni.features.garden.GardenAPI.getCropType import at.hannibal2.skyhanni.utils.LorenzUtils @@ -23,6 +24,11 @@ class ToolTooltipTweaks { @SubscribeEvent fun onTooltip(event: LorenzToolTipEvent) { if (!LorenzUtils.inSkyBlock) return + if (GardenCropMilestones.cropCounter.isEmpty()) { + LorenzUtils.debug("Garden ToolTip Tweaks: crop counter data not yet loaded!") + return + } + val crop = event.itemStack.getCropType() ?: return val toolFortune = FarmingFortuneDisplay.getToolFortune(event.itemStack) val counterFortune = FarmingFortuneDisplay.getCounterFortune(event.itemStack) -- cgit