diff options
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt b/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt index 2aac8f11b..077993544 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt @@ -88,8 +88,9 @@ object NEUItems { } resolveEnchantmentByName(itemName)?.let { - itemNameCache[itemName] = it - return it + val enchantmentName = fixEnchantmentName(it) + itemNameCache[itemName] = enchantmentName + return enchantmentName } var internalName = ItemResolutionQuery.findInternalNameByDisplayName(itemName, false) ?: return null @@ -103,6 +104,16 @@ object NEUItems { return internalName } + private fun fixEnchantmentName(originalName: String): String { + // Workaround for duplex + "ULTIMATE_DUPLEX;(?<tier>.*)".toPattern().matchMatcher(originalName) { + val tier = group("tier") + return "ULTIMATE_REITERATE;$tier" + } + + return originalName + } + private fun turboCheck(text: String): String { if (text == "Turbo-Cocoa") return "Turbo-Coco" if (text == "Turbo-Cacti") return "Turbo-Cactus" |