diff options
author | Lorenz <lo.scherf@gmail.com> | 2022-09-07 12:58:45 +0200 |
---|---|---|
committer | Lorenz <lo.scherf@gmail.com> | 2022-09-07 12:58:45 +0200 |
commit | 0dcd85d1103e5b8072aa97e186e986febbe6a60b (patch) | |
tree | 176539e2f9da95d3bbdb28739886b7ee06adc0b9 /src/main/java/at/hannibal2/skyhanni/features/bazaar | |
parent | 9eac32ec67cd3a1ee5058322125f1350414c64ba (diff) | |
parent | a1f6a1f7f0cda8e6234b4a9d7ea3b823d63049d3 (diff) | |
download | skyhanni-0dcd85d1103e5b8072aa97e186e986febbe6a60b.tar.gz skyhanni-0dcd85d1103e5b8072aa97e186e986febbe6a60b.tar.bz2 skyhanni-0dcd85d1103e5b8072aa97e186e986febbe6a60b.zip |
Merge remote-tracking branch 'origin/dev' into dev
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/bazaar')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/bazaar/BazaarApi.kt | 9 |
1 files changed, 6 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 5ae100ac2..c2c8bcb18 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/bazaar/BazaarApi.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/bazaar/BazaarApi.kt @@ -1,7 +1,9 @@ package at.hannibal2.skyhanni.features.bazaar +import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.StringUtils.removeColor +import net.minecraft.item.ItemStack class BazaarApi { @@ -44,9 +46,10 @@ class BazaarApi { return null } - fun isBazaarItem(name: String): Boolean { - val bazaarName = getCleanBazaarName(name) - return bazaarMap.containsKey(bazaarName) + fun isBazaarItem(stack: ItemStack): Boolean { + val internalName = stack.getInternalName() + return bazaarMap.any { it.value.apiName == internalName } + } } |