From e5f4704f1a813a0eda0dadd5dc6015d69c566f30 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Thu, 11 Jan 2024 16:08:58 +0100 Subject: Fixing rarity error for items thrown around when using sprayanator. --- .../hannibal2/skyhanni/features/misc/items/GlowingDroppedItems.kt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/features') diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/items/GlowingDroppedItems.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/items/GlowingDroppedItems.kt index 11bf4655b..3e5bf7989 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/items/GlowingDroppedItems.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/items/GlowingDroppedItems.kt @@ -3,6 +3,7 @@ package at.hannibal2.skyhanni.features.misc.items import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.data.IslandType import at.hannibal2.skyhanni.events.RenderEntityOutlineEvent +import at.hannibal2.skyhanni.features.garden.pests.SprayType import at.hannibal2.skyhanni.utils.ItemUtils.getInternalNameOrNull import at.hannibal2.skyhanni.utils.ItemUtils.getItemRarityOrNull import at.hannibal2.skyhanni.utils.ItemUtils.name @@ -56,7 +57,9 @@ class GlowingDroppedItems { return null } - entityItem.getInternalNameOrNull() ?: return null + val internalName = entityItem.getInternalNameOrNull() ?: return null + val isSprayItem = LorenzUtils.enumValueOfOrNull(internalName.asString()) != null + if (isSprayItem) return null val rarity = entityItem.getItemRarityOrNull() return rarity?.color?.toColor()?.rgb } @@ -79,4 +82,4 @@ class GlowingDroppedItems { return false } -} \ No newline at end of file +} -- cgit