diff options
author | hannibal2 <24389977+hannibal002@users.noreply.github.com> | 2023-05-19 21:54:27 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-19 21:54:27 +0200 |
commit | f92a0c9611ce3f70d9896852b71f99cf1986448a (patch) | |
tree | 31071749e4edc3414f1fa7deb4c58bb85d6fef88 /src | |
parent | c8ca57fa703011c2dcb87d9b544e1f04809efeaa (diff) | |
download | NotEnoughUpdates-f92a0c9611ce3f70d9896852b71f99cf1986448a.tar.gz NotEnoughUpdates-f92a0c9611ce3f70d9896852b71f99cf1986448a.tar.bz2 NotEnoughUpdates-f92a0c9611ce3f70d9896852b71f99cf1986448a.zip |
Bazaar wrong internal name (#697)
Fixed multiple problems in resolveEnchantmentByName
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/util/ItemResolutionQuery.java | 11 |
1 files changed, 9 insertions, 2 deletions
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"); |