diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-05-06 20:33:15 +0200 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-05-06 20:33:15 +0200 |
commit | a2415221255e9e5bd0f12a4876117064c3ded3e5 (patch) | |
tree | c7d2ae2eeb08f978fa63633608719c01937b1db9 | |
parent | 1e6e88be3a9d5660ccd667b5734dc7c4a1442966 (diff) | |
download | skyhanni-a2415221255e9e5bd0f12a4876117064c3ded3e5.tar.gz skyhanni-a2415221255e9e5bd0f12a4876117064c3ded3e5.tar.bz2 skyhanni-a2415221255e9e5bd0f12a4876117064c3ded3e5.zip |
Fixed bug while hovering over an item
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/garden/ToolTooltipTweaks.kt | 6 |
1 files changed, 6 insertions, 0 deletions
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) |