From 07175dc3996cbbcad3bfb2ec78f96c77ca4e4380 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Thu, 16 Mar 2023 01:53:54 +0100 Subject: Fixed some bazaar items getting wrongly blocked by Not Clickable Items feature --- src/main/java/at/hannibal2/skyhanni/features/bazaar/BazaarApi.kt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/main/java') 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 } } -- cgit