aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/items/GlowingDroppedItems.kt29
1 files changed, 19 insertions, 10 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 dc63bef64..11bf4655b 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
@@ -7,11 +7,12 @@ import at.hannibal2.skyhanni.utils.ItemUtils.getInternalNameOrNull
import at.hannibal2.skyhanni.utils.ItemUtils.getItemRarityOrNull
import at.hannibal2.skyhanni.utils.ItemUtils.name
import at.hannibal2.skyhanni.utils.LorenzUtils
-import at.hannibal2.skyhanni.utils.LorenzUtils.equalsOneOf
+import at.hannibal2.skyhanni.utils.RecalculatingValue
import net.minecraft.entity.Entity
import net.minecraft.entity.item.EntityArmorStand
import net.minecraft.entity.item.EntityItem
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
+import kotlin.time.Duration.Companion.seconds
class GlowingDroppedItems {
@@ -22,7 +23,19 @@ class GlowingDroppedItems {
*/
private val showcaseItemLocations = setOf(
"The End",
- "Jerry's Workshop"
+ "Jerry's Workshop",
+ "Dark Auction",
+ "Photon Pathway",
+ "Barrier Street",
+ "Village Plaza",
+ "Déjà Vu Alley"
+ )
+
+ private val showcaseItemIslands = setOf(
+ IslandType.HUB,
+ IslandType.PRIVATE_ISLAND,
+ IslandType.PRIVATE_ISLAND_GUEST,
+ IslandType.CRIMSON_ISLE
)
@SubscribeEvent
@@ -48,16 +61,12 @@ class GlowingDroppedItems {
return rarity?.color?.toColor()?.rgb
}
- private fun isShowcaseArea() =
- showcaseItemLocations.contains(LorenzUtils.skyBlockArea) ||
- LorenzUtils.skyBlockIsland.equalsOneOf(
- IslandType.HUB,
- IslandType.PRIVATE_ISLAND,
- IslandType.PRIVATE_ISLAND_GUEST
- )
+ private val isShowcaseArea = RecalculatingValue(1.seconds) {
+ showcaseItemIslands.contains(LorenzUtils.skyBlockIsland) || showcaseItemLocations.contains(LorenzUtils.skyBlockArea)
+ }
private fun shouldHideShowcaseItem(entity: EntityItem): Boolean {
- if (!isShowcaseArea() || config.highlightShowcase) return false
+ if (!isShowcaseArea.getValue() || config.highlightShowcase) return false
for (entityArmorStand in entity.worldObj.getEntitiesWithinAABB(
EntityArmorStand::class.java,