diff options
author | Thunderblade73 <85900443+Thunderblade73@users.noreply.github.com> | 2024-03-17 18:31:33 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-17 18:31:33 +0100 |
commit | df5e4bbe1538c36beae739e5ebd5fbb3413de65e (patch) | |
tree | f684c8103ec7ee64d000663fa1a50d3b308dea41 /src/main/java/at | |
parent | f72cf9906a49736948a353fceb135e49b3f041b5 (diff) | |
download | skyhanni-df5e4bbe1538c36beae739e5ebd5fbb3413de65e.tar.gz skyhanni-df5e4bbe1538c36beae739e5ebd5fbb3413de65e.tar.bz2 skyhanni-df5e4bbe1538c36beae739e5ebd5fbb3413de65e.zip |
Fix: SuperBoom TNT wrong itemNameQuery (#1196)
Diffstat (limited to 'src/main/java/at')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/utils/ItemNameResolver.kt | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/ItemNameResolver.kt b/src/main/java/at/hannibal2/skyhanni/utils/ItemNameResolver.kt index 3a3bc9397..53d9c5519 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/ItemNameResolver.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/ItemNameResolver.kt @@ -23,15 +23,20 @@ object ItemNameResolver { return itemNameCache.getOrPut(lowercase) { fixEnchantmentName(it) } } - val internalName = ItemResolutionQuery.findInternalNameByDisplayName(itemName, true)?.let { - - // This fixes a NEU bug with §9Hay Bale (cosmetic item) - // TODO remove workaround when this is fixed in neu - val rawInternalName = if (it == "HAY_BALE") "HAY_BLOCK" else it - rawInternalName.asInternalName() - } ?: run { - getInternalNameOrNullIgnoreCase(itemName) - } ?: return null + val internalName = when (itemName) { + "SUPERBOOM TNT" -> "SUPERBOOM_TNT".asInternalName() + else -> { + ItemResolutionQuery.findInternalNameByDisplayName(itemName, true)?.let { + + // This fixes a NEU bug with §9Hay Bale (cosmetic item) + // TODO remove workaround when this is fixed in neu + val rawInternalName = if (it == "HAY_BALE") "HAY_BLOCK" else it + rawInternalName.asInternalName() + } ?: run { + getInternalNameOrNullIgnoreCase(itemName) + } ?: return null + } + } itemNameCache[lowercase] = internalName return internalName |