aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java
diff options
context:
space:
mode:
authorBuildTools <james.jenour@protonmail.com>2021-06-04 01:18:28 +0800
committerBuildTools <james.jenour@protonmail.com>2021-06-04 01:18:28 +0800
commita1fa5a67caebf754a0fcc43168672823ede0db93 (patch)
treec0d7d78dfffaa659835a59952cac6edd2592be87 /src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java
parent1b172089ce502803f7644611afd618ce00dcb860 (diff)
downloadnotenoughupdates-a1fa5a67caebf754a0fcc43168672823ede0db93.tar.gz
notenoughupdates-a1fa5a67caebf754a0fcc43168672823ede0db93.tar.bz2
notenoughupdates-a1fa5a67caebf754a0fcc43168672823ede0db93.zip
merge is pain
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java38
1 files changed, 6 insertions, 32 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java
index 13ada4bf..883a0b7a 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java
@@ -9,7 +9,6 @@ import com.google.gson.JsonPrimitive;
import com.mojang.authlib.GameProfile;
import com.mojang.authlib.minecraft.MinecraftProfileTexture;
import io.github.moulberry.notenoughupdates.NotEnoughUpdates;
-import io.github.moulberry.notenoughupdates.util.SBAIntegration;
import io.github.moulberry.notenoughupdates.cosmetics.ShaderManager;
import io.github.moulberry.notenoughupdates.itemeditor.GuiElementTextField;
import io.github.moulberry.notenoughupdates.util.SBInfo;
@@ -435,7 +434,6 @@ public class GuiProfileViewer extends GuiScreen {
@Override
protected void keyTyped(char typedChar, int keyCode) throws IOException {
super.keyTyped(typedChar, keyCode);
- SBAIntegration.keyTyped(keyCode);
switch (currentPage) {
case INVS:
keyTypedInvs(typedChar, keyCode);
@@ -1099,6 +1097,7 @@ public class GuiProfileViewer extends GuiScreen {
MINION_RARITY_TO_NUM.put("RARE", "2");
MINION_RARITY_TO_NUM.put("EPIC", "3");
MINION_RARITY_TO_NUM.put("LEGENDARY", "4");
+ MINION_RARITY_TO_NUM.put("MYTHIC", "5");
}
private void drawPetsPage(int mouseX, int mouseY, float partialTicks) {
JsonObject petsInfo = profile.getPetsInfo(profileId);
@@ -1133,11 +1132,13 @@ public class GuiProfileViewer extends GuiScreen {
sortedPets.sort((pet1, pet2) -> {
String tier1 = pet1.get("tier").getAsString();
String tierNum1 = MINION_RARITY_TO_NUM.get(tier1);
+ if(tierNum1 == null) return 1;
int tierNum1I = Integer.parseInt(tierNum1);
float exp1 = pet1.get("exp").getAsFloat();
String tier2 = pet2.get("tier").getAsString();
String tierNum2 = MINION_RARITY_TO_NUM.get(tier2);
+ if(tierNum2 == null) return -1;
int tierNum2I = Integer.parseInt(tierNum2);
float exp2 = pet2.get("exp").getAsFloat();
@@ -2010,37 +2011,10 @@ public class GuiProfileViewer extends GuiScreen {
}
}
}
- if(stackToRender == null && !SBAIntegration.isFreezeBackpack()) lastBackpack = null;
- if(SBAIntegration.isFreezeBackpack()) {
- if(lastBackpack != null) {
- SBAIntegration.setActiveBackpack(lastBackpack, lastBackpackX, lastBackpackY);
- GlStateManager.translate(0, 0, 100);
- SBAIntegration.renderActiveBackpack(mouseX, mouseY, fontRendererObj);
- GlStateManager.translate(0, 0, -100);
- }
- } else {
- if(stackToRender != null) {
- String internalname = NotEnoughUpdates.INSTANCE.manager.getInternalNameForItem(stackToRender);
- boolean renderedBackpack;
- if(internalname != null && (internalname.endsWith("BACKPACK") || internalname.equals("NEW_YEAR_CAKE_BAG"))) {
- lastBackpack = stackToRender;
- lastBackpackX = mouseX;
- lastBackpackY = mouseY;
- renderedBackpack = SBAIntegration.setActiveBackpack(lastBackpack, lastBackpackX, lastBackpackY);
- if(renderedBackpack) {
- GlStateManager.translate(0, 0, 100);
- renderedBackpack = SBAIntegration.renderActiveBackpack(mouseX, mouseY, fontRendererObj);
- GlStateManager.translate(0, 0, -100);
- }
- } else {
- renderedBackpack = false;
- }
- if(!renderedBackpack) {
- lastBackpack = null;
- tooltipToDisplay = stackToRender.getTooltip(Minecraft.getMinecraft().thePlayer, false);
- }
- }
+ if(stackToRender != null) {
+ tooltipToDisplay = stackToRender.getTooltip(Minecraft.getMinecraft().thePlayer, false);
}
+
}
private String niceUuid(String uuidStr) {