aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/BasicPage.java46
1 files changed, 42 insertions, 4 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/BasicPage.java b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/BasicPage.java
index ab423167..ea71a2b5 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/BasicPage.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/BasicPage.java
@@ -568,8 +568,44 @@ public class BasicPage extends GuiProfileViewerPage {
}
GlStateManager.color(1, 1, 1, 1);
- JsonObject petsInfo = profile.getProfile(profileName).getPetsInfo();
+ SkyblockProfiles.SkyblockProfile currentProfile = profile.getProfile(profileName);
+ JsonObject petsInfo = currentProfile.getPetsInfo();
if (petsInfo != null) {
+ if (currentProfile.getGamemode() != null && currentProfile.getGamemode().equals("bingo")) {
+ JsonArray pets = petsInfo.get("pets").getAsJsonArray();
+ if (pets != null) {
+ for (JsonElement pet : pets) {
+ JsonObject petJsonObject = pet.getAsJsonObject();
+ if (petJsonObject.get("type") == null) break;
+ if (petJsonObject.get("type").getAsString().equals("BINGO")) {
+ if (petJsonObject.get("tier") == null) break;
+ String tier = petJsonObject.get("tier").getAsString();
+ switch (tier) {
+ case "COMMON":
+ bingoRarity = "§7";
+ break;
+ case "UNCOMMON":
+ bingoRarity = "§a";
+ break;
+ case "RARE":
+ bingoRarity = "§9";
+ break;
+ case "EPIC":
+ bingoRarity = "§5";
+ break;
+ case "LEGENDARY":
+ bingoRarity = "§6";
+ break;
+ case "MYTHIC":
+ bingoRarity = "§d";
+ break;
+ }
+ break;
+ }
+ bingoRarity = "§7";
+ }
+ }
+ }
JsonElement activePetElement = petsInfo.get("active_pet");
if (activePetElement != null && activePetElement.isJsonObject()) {
JsonObject activePet = activePetElement.getAsJsonObject();
@@ -619,8 +655,8 @@ public class BasicPage extends GuiProfileViewerPage {
int sbLevelX = guiLeft + 162;
int sbLevelY = guiTop + 74;
- double skyblockLevel = profile.getProfile(profileName).getSkyblockLevel();
- EnumChatFormatting skyblockLevelColour = profile.getProfile(profileName).getSkyblockLevelColour();
+ double skyblockLevel = currentProfile.getSkyblockLevel();
+ EnumChatFormatting skyblockLevelColour = currentProfile.getSkyblockLevelColour();
GlStateManager.pushMatrix();
GlStateManager.translate(sbLevelX, sbLevelY, 0);
@@ -777,12 +813,14 @@ public class BasicPage extends GuiProfileViewerPage {
selectedProfile.updateBeastMasterMultiplier();
}
+ private String bingoRarity = "§7";
+
private String getIcon(String gameModeType) {
switch (gameModeType) {
case "island":
return "§a☀";
case "bingo":
- return "§7Ⓑ";
+ return bingoRarity + "Ⓑ";
case "ironman":
return "§7♲";
default: