diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-03-16 01:53:54 +0100 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-03-16 01:53:54 +0100 |
commit | 07175dc3996cbbcad3bfb2ec78f96c77ca4e4380 (patch) | |
tree | 61efeb99758272a0c0ab979d7df66d89837900e1 /src/main/java/at/hannibal2 | |
parent | 2c84101615ba106c96187d8b28c31be5fba6dfce (diff) | |
download | skyhanni-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')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/bazaar/BazaarApi.kt | 8 |
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 } } |