diff options
author | NopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com> | 2022-10-10 11:20:16 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-10 13:20:16 +0200 |
commit | 90b3225afdd5e43c54e82d73478f2c2f1e046f80 (patch) | |
tree | 2c6796c9769e2e71737efd35ac8a7f72d83b8aee /src | |
parent | 4662a5a792e4dd790a45cd8da158e4464fb1e2dd (diff) | |
download | NotEnoughUpdates-90b3225afdd5e43c54e82d73478f2c2f1e046f80.tar.gz NotEnoughUpdates-90b3225afdd5e43c54e82d73478f2c2f1e046f80.tar.bz2 NotEnoughUpdates-90b3225afdd5e43c54e82d73478f2c2f1e046f80.zip |
Set everyones branch back to master (#348)
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java | 8 | ||||
-rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/profileviewer/trophy/TrophyFishPage.java | 26 |
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<>(); |