From b3ca5b1ffc698ede14d4e9d8ed2dc86711201de1 Mon Sep 17 00:00:00 2001 From: NopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com> Date: Sat, 27 Apr 2024 06:23:28 +1000 Subject: Fix Profile viewer issues with Turkish language (#1116) --- .../io/github/moulberry/notenoughupdates/util/ItemUtils.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/main/java/io/github/moulberry/notenoughupdates/util/ItemUtils.java') diff --git a/src/main/java/io/github/moulberry/notenoughupdates/util/ItemUtils.java b/src/main/java/io/github/moulberry/notenoughupdates/util/ItemUtils.java index cc974841..c013ba06 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/util/ItemUtils.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/util/ItemUtils.java @@ -48,6 +48,7 @@ import java.util.Arrays; import java.util.Base64; import java.util.Collections; import java.util.List; +import java.util.Locale; import java.util.Map; import java.util.function.BiFunction; @@ -234,7 +235,7 @@ public class ItemUtils { return stack; } String petname = currentPet.petType; - String tier = Utils.getRarityFromInt(currentPet.rarity.petId).toUpperCase(); + String tier = Utils.getRarityFromInt(currentPet.rarity.petId).toUpperCase(Locale.ROOT); String heldItem = currentPet.petItem; String skin = currentPet.skin; JsonObject heldItemJson = heldItem == null ? null : NotEnoughUpdates.INSTANCE.manager.getItemInformation().get( @@ -410,13 +411,13 @@ public class ItemUtils { NBTTagList newLore = new NBTTagList(); int maxLvl = 100; if (Constants.PETS != null && Constants.PETS.has("custom_pet_leveling") && - Constants.PETS.getAsJsonObject("custom_pet_leveling").has(pet.petType.toUpperCase()) && - Constants.PETS.getAsJsonObject("custom_pet_leveling").getAsJsonObject(pet.petType.toUpperCase()).has( + Constants.PETS.getAsJsonObject("custom_pet_leveling").has(pet.petType.toUpperCase(Locale.ROOT)) && + Constants.PETS.getAsJsonObject("custom_pet_leveling").getAsJsonObject(pet.petType.toUpperCase(Locale.ROOT)).has( "max_level")) { maxLvl = Constants.PETS .getAsJsonObject("custom_pet_leveling") - .getAsJsonObject(pet.petType.toUpperCase()) + .getAsJsonObject(pet.petType.toUpperCase(Locale.ROOT)) .get("max_level") .getAsInt(); } -- cgit