From f92a0c9611ce3f70d9896852b71f99cf1986448a Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal002@users.noreply.github.com> Date: Fri, 19 May 2023 21:54:27 +0200 Subject: Bazaar wrong internal name (#697) Fixed multiple problems in resolveEnchantmentByName Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com> --- .../moulberry/notenoughupdates/util/ItemResolutionQuery.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/main') diff --git a/src/main/java/io/github/moulberry/notenoughupdates/util/ItemResolutionQuery.java b/src/main/java/io/github/moulberry/notenoughupdates/util/ItemResolutionQuery.java index 280a0d3d..cfeecf66 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/util/ItemResolutionQuery.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/util/ItemResolutionQuery.java @@ -261,11 +261,18 @@ public class ItemResolutionQuery { String romanLevel = matcher.group(3); boolean ultimate = (format.contains("§l")); - return (ultimate ? "ULTIMATE_" : "") - + enchantmentName.replace(" ", "_").toUpperCase(Locale.ROOT) + return ((ultimate && !name.equals("Ultimate Wise")) ? "ULTIMATE_" : "") + + turboCheck(enchantmentName).replace(" ", "_").replace("-", "_").toUpperCase(Locale.ROOT) + ";" + Utils.parseRomanNumeral(romanLevel); } + private String turboCheck(String text) { + if (text.equals("Turbo-Cocoa")) return "Turbo-Coco"; + if (text.equals("Turbo-Cacti")) return "Turbo-Cactus"; + + return text; + } + private String resolveCrabHatName() { int crabHatYear = getExtraAttributes().getInteger("party_hat_year"); String color = getExtraAttributes().getString("party_hat_color"); -- cgit