aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-03-16 01:53:54 +0100
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-03-16 01:53:54 +0100
commit7235ffd6a37e42acb98a2d71387f848109097cf1 (patch)
tree61efeb99758272a0c0ab979d7df66d89837900e1
parente7491acb0f0aea1afe1d2b98a9ed7a198e1b3457 (diff)
downloadSkyHanni-7235ffd6a37e42acb98a2d71387f848109097cf1.tar.gz
SkyHanni-7235ffd6a37e42acb98a2d71387f848109097cf1.tar.bz2
SkyHanni-7235ffd6a37e42acb98a2d71387f848109097cf1.zip
Fixed some bazaar items getting wrongly blocked by Not Clickable Items feature
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/bazaar/BazaarApi.kt8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/bazaar/BazaarApi.kt b/src/main/java/at/hannibal2/skyhanni/features/bazaar/BazaarApi.kt
index 28ac37849..96246caf4 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/bazaar/BazaarApi.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/bazaar/BazaarApi.kt
@@ -7,6 +7,7 @@ import at.hannibal2.skyhanni.utils.ItemUtils.getLore
import at.hannibal2.skyhanni.utils.ItemUtils.name
import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.StringUtils.removeColor
+import io.github.moulberry.notenoughupdates.NotEnoughUpdates
import net.minecraft.item.ItemStack
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
@@ -37,10 +38,11 @@ class BazaarApi {
fun getBazaarDataForInternalName(internalName: String) =
bazaarMap.values.firstOrNull { it.apiName == internalName }
- fun isBazaarItem(stack: ItemStack): Boolean {
- val internalName = stack.getInternalName()
- return bazaarMap.any { it.value.apiName == internalName }
+ fun isBazaarItem(stack: ItemStack) = isBazaarItem(stack.getInternalName())
+ fun isBazaarItem(internalName: String): Boolean {
+ val bazaarInfo = NotEnoughUpdates.INSTANCE.manager.auctionManager.getBazaarInfo(internalName)
+ return bazaarInfo != null
}
}