aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-01-11 16:08:58 +0100
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-01-11 16:08:58 +0100
commite5f4704f1a813a0eda0dadd5dc6015d69c566f30 (patch)
tree1ca70bd1945236cedc6612d6caa12eddd8949ba3 /src/main/java/at/hannibal2/skyhanni/features
parent2e12fc657e03c26f26e61b5e9da939b23a73f528 (diff)
downloadskyhanni-e5f4704f1a813a0eda0dadd5dc6015d69c566f30.tar.gz
skyhanni-e5f4704f1a813a0eda0dadd5dc6015d69c566f30.tar.bz2
skyhanni-e5f4704f1a813a0eda0dadd5dc6015d69c566f30.zip
Fixing rarity error for items thrown around when using sprayanator.
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/items/GlowingDroppedItems.kt7
1 files changed, 5 insertions, 2 deletions
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<SprayType>(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
+}