aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io/github/moulberry/notenoughupdates/util/ItemUtils.java
diff options
context:
space:
mode:
authorNopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com>2024-04-27 06:23:28 +1000
committerGitHub <noreply@github.com>2024-04-26 22:23:28 +0200
commitb3ca5b1ffc698ede14d4e9d8ed2dc86711201de1 (patch)
treeb30f23c9745bfc66c721e7bfdb440a336142871a /src/main/java/io/github/moulberry/notenoughupdates/util/ItemUtils.java
parentd3106bf41e099d329d9db330ab09e167519fce25 (diff)
downloadnotenoughupdates-b3ca5b1ffc698ede14d4e9d8ed2dc86711201de1.tar.gz
notenoughupdates-b3ca5b1ffc698ede14d4e9d8ed2dc86711201de1.tar.bz2
notenoughupdates-b3ca5b1ffc698ede14d4e9d8ed2dc86711201de1.zip
Fix Profile viewer issues with Turkish language (#1116)
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/util/ItemUtils.java')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/util/ItemUtils.java9
1 files changed, 5 insertions, 4 deletions
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();
}