aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features/bazaar
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
commit07175dc3996cbbcad3bfb2ec78f96c77ca4e4380 (patch)
tree61efeb99758272a0c0ab979d7df66d89837900e1 /src/main/java/at/hannibal2/skyhanni/features/bazaar
parent2c84101615ba106c96187d8b28c31be5fba6dfce (diff)
downloadskyhanni-07175dc3996cbbcad3bfb2ec78f96c77ca4e4380.tar.gz
skyhanni-07175dc3996cbbcad3bfb2ec78f96c77ca4e4380.tar.bz2
skyhanni-07175dc3996cbbcad3bfb2ec78f96c77ca4e4380.zip
Fixed some bazaar items getting wrongly blocked by Not Clickable Items feature
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/bazaar')
-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
}
}