aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/io')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java8
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/trophy/TrophyFishPage.java26
2 files changed, 22 insertions, 12 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java b/src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java
index 3f535d68..39826ded 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java
@@ -261,6 +261,14 @@ public class NotEnoughUpdates {
if (config.profileViewer.pageLayout.size() == 9) {
config.profileViewer.pageLayout.add(9);
}
+
+ // Remove after 2.1 ig
+ if ("dangerous".equals(config.apiData.repoBranch) || "rune".equals(config.apiData.repoBranch)) {
+ config.apiData.repoBranch = "master";
+ } else if ("jani270".equals(config.apiData.repoUser)) {
+ config.apiData.repoUser = "NotEnoughUpdates";
+ }
+
saveConfig();
}
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/trophy/TrophyFishPage.java b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/trophy/TrophyFishPage.java
index e6c69649..cda47ffd 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/trophy/TrophyFishPage.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/trophy/TrophyFishPage.java
@@ -26,11 +26,6 @@ import io.github.moulberry.notenoughupdates.NotEnoughUpdates;
import io.github.moulberry.notenoughupdates.profileviewer.GuiProfileViewer;
import io.github.moulberry.notenoughupdates.profileviewer.GuiProfileViewerPage;
import io.github.moulberry.notenoughupdates.util.Utils;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.ScaledResolution;
import net.minecraft.client.renderer.GlStateManager;
@@ -43,6 +38,13 @@ import org.apache.commons.lang3.text.WordUtils;
import org.apache.commons.lang3.tuple.Pair;
import org.lwjgl.opengl.GL11;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+
public class TrophyFishPage extends GuiProfileViewerPage {
public static final ResourceLocation pv_elements = new ResourceLocation("notenoughupdates:pv_elements.png");
@@ -339,9 +341,9 @@ public class TrophyFishPage extends GuiProfileViewerPage {
private List<String> getTooltip(String name, Map<TrophyFish.TrophyFishRarity, Integer> trophyFishRarityIntegerMap) {
List<String> tooltip = new ArrayList<>();
- tooltip.add(internalTrophyFish.get(name.toLowerCase().replace(" ", "_")) + WordUtils.capitalize(name.replace("_", " ")));
+ tooltip.add(internalTrophyFish.get(name.toLowerCase(Locale.US).replace(" ", "_")) + WordUtils.capitalize(name.replace("_", " ")));
- List<String> lore = readLoreFromRepo(name.toUpperCase());
+ List<String> lore = readLoreFromRepo(name.toUpperCase(Locale.US));
List<String> description = readDescriptionFromLore(lore);
tooltip.addAll(description);
tooltip.add(" ");
@@ -363,7 +365,7 @@ public class TrophyFishPage extends GuiProfileViewerPage {
TrophyFish.TrophyFishRarity rarity,
EnumChatFormatting color
) {
- String name = WordUtils.capitalize(rarity.name().toLowerCase());
+ String name = WordUtils.capitalize(rarity.name().toLowerCase(Locale.US));
if (trophyFishRarityIntegerMap == null) {
return color + name + ": " + checkX;
}
@@ -376,7 +378,7 @@ public class TrophyFishPage extends GuiProfileViewerPage {
}
private ItemStack getItem(String name) {
- String repoName = name.toUpperCase().replace(" ", "_") + "_BRONZE";
+ String repoName = name.toUpperCase(Locale.US).replace(" ", "_") + "_BRONZE";
JsonObject jsonItem = NotEnoughUpdates.INSTANCE.manager.getItemInformation().get(repoName);
return NotEnoughUpdates.INSTANCE.manager.jsonToStack(jsonItem);
}
@@ -402,7 +404,7 @@ public class TrophyFishPage extends GuiProfileViewerPage {
type = s[2];
}
try {
- trophyFishRarity = TrophyFish.TrophyFishRarity.valueOf(type.toUpperCase());
+ trophyFishRarity = TrophyFish.TrophyFishRarity.valueOf(type.toUpperCase(Locale.US));
} catch (IllegalArgumentException ignored) {
total.put(WordUtils.capitalize(key), value);
continue;
@@ -441,7 +443,7 @@ public class TrophyFishPage extends GuiProfileViewerPage {
private List<String> fixStringName(List<String> list) {
List<String> fixedList = new ArrayList<>();
for (String s : list) {
- fixedList.add(s.toLowerCase().replace(" ", "_"));
+ fixedList.add(s.toLowerCase(Locale.US).replace(" ", "_"));
}
return fixedList;
}
@@ -463,7 +465,7 @@ public class TrophyFishPage extends GuiProfileViewerPage {
}
private List<String> readLoreFromRepo(String name) {
- String repoName = name.toUpperCase().replace(" ", "_") + "_BRONZE";
+ String repoName = name.toUpperCase(Locale.US).replace(" ", "_") + "_BRONZE";
JsonObject jsonItem = NotEnoughUpdates.INSTANCE.manager.getItemInformation().get(repoName);
List<String> list = new ArrayList<>();