diff options
author | Empa <42304516+ItsEmpa@users.noreply.github.com> | 2024-06-13 19:52:53 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-13 19:52:53 +0200 |
commit | 71cbb36e7245f008fd9ad0867aab7690897f6cf8 (patch) | |
tree | 90b61ea59487ae1d8c080f4cf7f30527e00ab0e1 | |
parent | a9e80dface675c7bf5e5666d53e7f463071f3c29 (diff) | |
download | skyhanni-71cbb36e7245f008fd9ad0867aab7690897f6cf8.tar.gz skyhanni-71cbb36e7245f008fd9ad0867aab7690897f6cf8.tar.bz2 skyhanni-71cbb36e7245f008fd9ad0867aab7690897f6cf8.zip |
Fix: Wardrobe slot color & Event priority (#2072)
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/inventory/wardrobe/CustomWardrobe.kt | 2 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/inventory/wardrobe/WardrobeAPI.kt | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/wardrobe/CustomWardrobe.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/wardrobe/CustomWardrobe.kt index f1db611d7..09d15271c 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/wardrobe/CustomWardrobe.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/wardrobe/CustomWardrobe.kt @@ -614,7 +614,7 @@ object CustomWardrobe { private fun WardrobeSlot.getSlotColor(): Color = with(config.color) { when { isCurrentSlot() -> equippedColor - favorite -> favoriteColor + favorite && !config.onlyFavorites -> favoriteColor else -> null }?.toChromaColor()?.transformIf({ !isInCurrentPage() }) { darker() } ?: (if (isInCurrentPage()) samePageColor else otherPageColor).toChromaColor() diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/wardrobe/WardrobeAPI.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/wardrobe/WardrobeAPI.kt index b446d9950..75515717e 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/wardrobe/WardrobeAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/wardrobe/WardrobeAPI.kt @@ -21,6 +21,7 @@ import net.minecraft.init.Blocks import net.minecraft.init.Items import net.minecraft.item.EnumDyeColor import net.minecraft.item.ItemStack +import net.minecraftforge.fml.common.eventhandler.EventPriority import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import kotlin.time.Duration.Companion.milliseconds @@ -109,7 +110,7 @@ object WardrobeAPI { } } - @SubscribeEvent + @SubscribeEvent(priority = EventPriority.HIGH) fun onInventoryUpdate(event: InventoryUpdatedEvent) { if (!LorenzUtils.inSkyBlock) return |