aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java4
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/commands/dev/DevTestCommand.java2
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/BasicPage.java227
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/CollectionsPage.java5
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/CrimsonIslePage.java6
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/DungeonPage.java225
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/ExtraPage.java2
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java84
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/InventoriesPage.java2
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/PlayerStats.java105
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/ProfileViewer.java255
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/bestiary/BestiaryPage.java36
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/level/LevelPage.java195
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/level/task/CoreTaskLevel.java169
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/level/task/DungeonTaskLevel.java126
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/level/task/EssenceTaskLevel.java151
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/level/task/MiscTaskLevel.java200
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/level/task/SkillRelatedTaskLevel.java211
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/level/task/SlayingTaskLevel.java291
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/level/task/StoryTaskLevel.java81
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/util/Constants.java3
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java85
22 files changed, 2094 insertions, 371 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java
index 7159ef89..8442697a 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java
@@ -105,10 +105,10 @@ import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicReference;
public class NEUOverlay extends Gui {
- private static final ResourceLocation SUPERGEHEIMNISVERMOGEN = new ResourceLocation(
+ public static final ResourceLocation SUPERGEHEIMNISVERMOGEN = new ResourceLocation(
"notenoughupdates:supersecretassets/bald.png");
- private static final ResourceLocation ATMOULBERRYWHYISMYLUNARCLIENTBUGGING = new ResourceLocation(
+ public static final ResourceLocation ATMOULBERRYWHYISMYLUNARCLIENTBUGGING = new ResourceLocation(
"notenoughupdates:supersecretassets/lunar.png");
private static final ResourceLocation SEARCH_BAR = new ResourceLocation("notenoughupdates:search_bar.png");
private static final ResourceLocation SEARCH_BAR_GOLD = new ResourceLocation("notenoughupdates:search_bar_gold.png");
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/commands/dev/DevTestCommand.java b/src/main/java/io/github/moulberry/notenoughupdates/commands/dev/DevTestCommand.java
index 5787c075..0d882358 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/commands/dev/DevTestCommand.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/commands/dev/DevTestCommand.java
@@ -147,7 +147,7 @@ public class DevTestCommand extends ClientCommandBase {
})
.thenCompose(obj -> ProfileCollectionInfo.getCollectionData(
obj,
- Minecraft.getMinecraft().thePlayer.getUniqueID()
+ Minecraft.getMinecraft().thePlayer.getUniqueID().toString()
))
.thenAccept(it ->
Utils.addChatMessage("Response: " + it));
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 873ee9f2..0f17bb86 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/BasicPage.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/BasicPage.java
@@ -19,13 +19,13 @@
package io.github.moulberry.notenoughupdates.profileviewer;
-import com.google.common.base.Splitter;
import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.mojang.authlib.GameProfile;
import io.github.moulberry.notenoughupdates.NotEnoughUpdates;
import io.github.moulberry.notenoughupdates.core.util.StringUtils;
+import io.github.moulberry.notenoughupdates.profileviewer.level.LevelPage;
import io.github.moulberry.notenoughupdates.profileviewer.weight.lily.LilyWeight;
import io.github.moulberry.notenoughupdates.profileviewer.weight.senither.SenitherWeight;
import io.github.moulberry.notenoughupdates.util.Constants;
@@ -53,11 +53,12 @@ import org.apache.commons.lang3.text.WordUtils;
import org.lwjgl.input.Keyboard;
import org.lwjgl.input.Mouse;
import org.lwjgl.opengl.GL11;
-import org.lwjgl.opengl.GL14;
import java.awt.*;
+import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
+import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Optional;
@@ -72,6 +73,34 @@ import static io.github.moulberry.notenoughupdates.util.Utils.roundToNearestInt;
public class BasicPage extends GuiProfileViewerPage {
private static final ResourceLocation pv_basic = new ResourceLocation("notenoughupdates:pv_basic.png");
+
+ public static final ItemStack skull = Utils.createSkull(
+ "egirlefe",
+ "152de44a-43a3-46e1-badc-66cca2793471",
+ "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvODdkODg1YjMyYjBkZDJkNmI3ZjFiNTgyYTM0MTg2ZjhhNTM3M2M0NjU4OWEyNzM0MjMxMzJiNDQ4YjgwMzQ2MiJ9fX0="
+ );
+
+ private static final LinkedHashMap<String, ItemStack> dungeonsModeIcons = new LinkedHashMap<String, ItemStack>() {
+ {
+ put(
+ "first_page",
+ Utils.editItemStackInfo(
+ new ItemStack(Items.paper),
+ EnumChatFormatting.GRAY + "Front Page",
+ true
+ )
+ );
+ put(
+ "second_page",
+ Utils.editItemStackInfo(
+ skull,
+ EnumChatFormatting.GRAY + "Level Page",
+ true
+ )
+ );
+ }
+ };
+
private static final ExecutorService profileLoader = Executors.newFixedThreadPool(1);
public EntityOtherPlayerMP entityPlayer = null;
private ResourceLocation playerLocationSkin = null;
@@ -88,9 +117,14 @@ public class BasicPage extends GuiProfileViewerPage {
private int backgroundClickedX = -1;
+ private boolean onSecondPage;
+
+ private final LevelPage levelPage;
+
public BasicPage(GuiProfileViewer instance) {
super(instance);
this.guiProfileViewer = instance;
+ this.levelPage = new LevelPage(guiProfileViewer, this);
}
@Override
@@ -101,6 +135,11 @@ public class BasicPage extends GuiProfileViewerPage {
int guiLeft = GuiProfileViewer.getGuiLeft();
int guiTop = GuiProfileViewer.getGuiTop();
+ if (onSecondPage) {
+ levelPage.drawPage(mouseX, mouseY, partialTicks);
+ return;
+ }
+
String location = null;
JsonObject status = profile.getPlayerStatus();
if (status != null && status.has("mode")) {
@@ -534,116 +573,29 @@ public class BasicPage extends GuiProfileViewerPage {
);
}
- PlayerStats.Stats stats = profile.getStats(profileId);
+ // sb lvlL
- if (stats != null) {
- Splitter splitter = Splitter.on(" ").omitEmptyStrings().limit(2);
- for (int i = 0; i < PlayerStats.defaultStatNames.length; i++) {
- String statName = PlayerStats.defaultStatNames[i];
- //if (statName.equals("mining_fortune") || statName.equals("mining_speed")) continue;
- String statNamePretty = PlayerStats.defaultStatNamesPretty[i];
+ int sbLevelX = guiLeft + 162;
+ int sbLevelY = guiTop + 90;
- int val = Math.round(stats.get(statName));
+ double skyblockLevel = profile.getSkyblockLevel(profileId);
+ EnumChatFormatting skyblockLevelColour = profile.getSkyblockLevelColour(profileId);
- GlStateManager.color(1, 1, 1, 1);
- GlStateManager.enableBlend();
- GL14.glBlendFuncSeparate(
- GL11.GL_SRC_ALPHA,
- GL11.GL_ONE_MINUS_SRC_ALPHA,
- GL11.GL_ONE,
- GL11.GL_ONE_MINUS_SRC_ALPHA
- );
- Utils.renderAlignedString(
- statNamePretty,
- EnumChatFormatting.WHITE.toString() + val,
- guiLeft + 132,
- guiTop + 21 + 11f * i,
- 80
- );
+ GlStateManager.pushMatrix();
+ GlStateManager.translate(sbLevelX, sbLevelY, 0);
+ GlStateManager.scale(1.5f, 1.5f, 1);
+ Utils.drawItemStack(skull, 0, 0);
+ GlStateManager.popMatrix();
+ Utils.drawStringScaled(skyblockLevelColour.toString() + (int) skyblockLevel, fr,
+ sbLevelX - 2, sbLevelY - 15, true, 0, 1.5f
+ );
- if (mouseX > guiLeft + 132 && mouseX < guiLeft + 212) {
- if (mouseY > guiTop + 21 + 11f * i && mouseY < guiTop + 37 + 11f * i) {
- List<String> split = splitter.splitToList(statNamePretty);
- PlayerStats.Stats baseStats = PlayerStats.getBaseStats();
- getInstance().tooltipToDisplay = new ArrayList<>();
- getInstance().tooltipToDisplay.add(statNamePretty);
- int base = Math.round(baseStats.get(statName));
- getInstance()
- .tooltipToDisplay.add(
- EnumChatFormatting.GRAY +
- "Base " +
- split.get(1) +
- ": " +
- EnumChatFormatting.GREEN +
- base +
- " " +
- split.get(0)
- );
- int passive = Math.round(profile.getPassiveStats(profileId).get(statName) - baseStats.get(statName));
- getInstance()
- .tooltipToDisplay.add(
- EnumChatFormatting.GRAY +
- "Passive " +
- split.get(1) +
- " Bonus: +" +
- EnumChatFormatting.YELLOW +
- passive +
- " " +
- split.get(0)
- );
- int itemBonus = Math.round(stats.get(statName) - profile.getPassiveStats(profileId).get(statName));
- getInstance()
- .tooltipToDisplay.add(
- EnumChatFormatting.GRAY +
- "Item " +
- split.get(1) +
- " Bonus: +" +
- EnumChatFormatting.DARK_PURPLE +
- itemBonus +
- " " +
- split.get(0)
- );
- int finalStat = Math.round(stats.get(statName));
- getInstance()
- .tooltipToDisplay.add(
- EnumChatFormatting.GRAY +
- "Final " +
- split.get(1) +
- ": +" +
- EnumChatFormatting.RED +
- finalStat +
- " " +
- split.get(0)
- );
- }
- }
- }
- } else {
- Utils.drawStringCentered(
- EnumChatFormatting.RED + "Skill/Inv/Coll",
- Minecraft.getMinecraft().fontRendererObj,
- guiLeft + 172,
- guiTop + 101 - 10,
- true,
- 0
- );
- Utils.drawStringCentered(
- EnumChatFormatting.RED + "APIs not",
- Minecraft.getMinecraft().fontRendererObj,
- guiLeft + 172,
- guiTop + 101,
- true,
- 0
- );
- Utils.drawStringCentered(
- EnumChatFormatting.RED + "enabled!",
- Minecraft.getMinecraft().fontRendererObj,
- guiLeft + 172,
- guiTop + 101 + 10,
- true,
- 0
- );
- }
+ float progress = (float) (skyblockLevel - (long) skyblockLevel);
+ getInstance().renderBar(sbLevelX - 30, sbLevelY + 30, 80, progress);
+
+ Utils.drawStringScaled(EnumChatFormatting.YELLOW.toString() + (int) (progress * 100) + "/100", fr,
+ sbLevelX - 30, sbLevelY + 20, true, 0, 0.9f
+ );
if (skyblockInfo != null) {
int position = 0;
@@ -672,6 +624,12 @@ public class BasicPage extends GuiProfileViewerPage {
getInstance().renderBar(x, y + 6, 80, level.level % 1);
}
+ if (mouseX >= guiLeft + 128 && mouseX <= guiLeft + 216) {
+ if (mouseY >= guiTop + 69 && mouseY <= guiTop + 131) {
+ if(Mouse.isButtonDown(0)) onSecondPage = true;
+ }
+ }
+
if (mouseX > x && mouseX < x + 80) {
if (mouseY > y - 4 && mouseY < y + 13) {
getInstance().tooltipToDisplay = new ArrayList<>();
@@ -759,6 +717,7 @@ public class BasicPage extends GuiProfileViewerPage {
);
}
+ drawSideButtons();
renderWeight(mouseX, mouseY, skyblockInfo, profileInfo);
}
@@ -992,10 +951,62 @@ public class BasicPage extends GuiProfileViewerPage {
GlStateManager.setActiveTexture(OpenGlHelper.defaultTexUnit);
}
+ @Override
+ public boolean mouseClicked(int mouseX, int mouseY, int mouseButton) throws IOException {
+ super.mouseClicked(mouseX, mouseY, mouseButton);
+ int guiLeft = GuiProfileViewer.getGuiLeft();
+ int guiTop = GuiProfileViewer.getGuiTop();
+
+ int i = onSlotToChangePage(mouseX, mouseY, guiLeft, guiTop);
+ switch (i) {
+ case 1:
+ onSecondPage = false;
+ break;
+ case 2:
+ onSecondPage = true;
+ break;
+
+ default:
+ break;
+ }
+
+ return false;
+ }
+
+ public int onSlotToChangePage(int mouseX, int mouseY, int guiLeft, int guiTop) {
+ if (mouseX >= guiLeft - 29 && mouseX <= guiLeft) {
+ if (mouseY >= guiTop && mouseY <= guiTop + 28) {
+ return 1;
+ } else if (mouseY + 28 >= guiTop && mouseY <= guiTop + 28 * 2) {
+ return 2;
+ }
+ }
+ return 0;
+ }
+
public String getGameModeType(JsonObject profileInfo) {
if (profileInfo != null && profileInfo.has("game_mode")) {
return profileInfo.get("game_mode").getAsString();
}
return "";
}
+
+ public void drawSideButtons() {
+ GlStateManager.enableDepth();
+ GlStateManager.translate(0, 0, 5);
+ if (onSecondPage) {
+ Utils.drawPvSideButton(1, dungeonsModeIcons.get("second_page"), true, guiProfileViewer);
+ } else {
+ Utils.drawPvSideButton(0, dungeonsModeIcons.get("first_page"), true, guiProfileViewer);
+ }
+ GlStateManager.translate(0, 0, -3);
+
+ GlStateManager.translate(0, 0, -2);
+ if (!onSecondPage) {
+ Utils.drawPvSideButton(1, dungeonsModeIcons.get("second_page"), false, guiProfileViewer);
+ } else {
+ Utils.drawPvSideButton(0, dungeonsModeIcons.get("first_page"), false, guiProfileViewer);
+ }
+ GlStateManager.disableDepth();
+ }
}
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/CollectionsPage.java b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/CollectionsPage.java
index 554e204c..e2e40ed1 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/CollectionsPage.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/CollectionsPage.java
@@ -37,6 +37,7 @@ import java.awt.*;
import java.io.IOException;
import java.text.NumberFormat;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
@@ -217,10 +218,10 @@ public class CollectionsPage extends GuiProfileViewerPage {
String tierString;
int tier = (int) Utils.getElementAsFloat(collectionTiers.get(collection), 0);
- if (tier > 20 || tier < 0) {
+ if (tier > 20 || tier <= 0) {
tierString = String.valueOf(tier);
} else {
- tierString = romans[tier];
+ tierString = romans[tier-1];
}
float amount = Utils.getElementAsFloat(totalAmounts.get(collection), 0);
float maxAmount = Utils.getElementAsFloat(maxAmounts.get(collection), 0);
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/CrimsonIslePage.java b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/CrimsonIslePage.java
index 95009b1d..c423bab9 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/CrimsonIslePage.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/CrimsonIslePage.java
@@ -63,7 +63,7 @@ public class CrimsonIslePage extends GuiProfileViewerPage {
"Infernal"
};
- private static final LinkedHashMap<String, String> apiDojoTestNames = new LinkedHashMap<String, String>() {{
+ public static final LinkedHashMap<String, String> apiDojoTestNames = new LinkedHashMap<String, String>() {{
put("mob_kb", EnumChatFormatting.GOLD + "Test of Force");
put("wall_jump", EnumChatFormatting.LIGHT_PURPLE + "Test of Stamina");
put("archer", EnumChatFormatting.YELLOW + "Test of Mastery");
@@ -73,7 +73,7 @@ public class CrimsonIslePage extends GuiProfileViewerPage {
put("fireball", EnumChatFormatting.GOLD + "Test of Tenacity");
}};
- private static final LinkedHashMap<Integer, String> dojoPointsToRank = new LinkedHashMap<Integer, String>() {{
+ public static final LinkedHashMap<Integer, String> dojoPointsToRank = new LinkedHashMap<Integer, String>() {{
put(0, EnumChatFormatting.GRAY + "None");
put(1000, EnumChatFormatting.YELLOW + "Yellow");
put(2000, EnumChatFormatting.GREEN + "Green");
@@ -278,7 +278,7 @@ public class CrimsonIslePage extends GuiProfileViewerPage {
);
}
- public String getRank(int points) {
+ public static String getRank(int points) {
int lastRank = 0;
for (Map.Entry<Integer, String> rank : dojoPointsToRank.entrySet()) {
if (points < rank.getKey()) {
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/DungeonPage.java b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/DungeonPage.java
index cbebb6f4..2c0dc110 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/DungeonPage.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/DungeonPage.java
@@ -54,7 +54,7 @@ public class DungeonPage extends GuiProfileViewerPage {
private static final ResourceLocation pv_dung = new ResourceLocation("notenoughupdates:pv_dung.png");
private static final ItemStack DEADBUSH = new ItemStack(Item.getItemFromBlock(Blocks.deadbush));
- private static final String[] dungSkillsName = { "Healer", "Mage", "Berserk", "Archer", "Tank" };
+ private static final String[] dungSkillsName = {"Healer", "Mage", "Berserk", "Archer", "Tank"};
private static final ItemStack[] BOSS_HEADS = new ItemStack[7];
private static final ItemStack[] dungSkillsStack = {
new ItemStack(Items.potionitem, 1, 16389),
@@ -63,7 +63,7 @@ public class DungeonPage extends GuiProfileViewerPage {
new ItemStack(Items.bow),
new ItemStack(Items.leather_chestplate),
};
- private static final String[] bossFloorArr = { "Bonzo", "Scarf", "Professor", "Thorn", "Livid", "Sadan", "Necron" };
+ private static final String[] bossFloorArr = {"Bonzo", "Scarf", "Professor", "Thorn", "Livid", "Sadan", "Necron"};
private static final String[] bossFloorHeads = {
"12716ecbf5b8da00b05f316ec6af61e8bd02805b21eb8e440151468dc656549c",
"7de7bbbdf22bfe17980d4e20687e386f11d59ee1db6f8b4762391b79a5ac532d",
@@ -145,7 +145,10 @@ public class DungeonPage extends GuiProfileViewerPage {
//Catacombs level thingy
{
if (levelObjCata == null) {
- float cataXp = Utils.getElementAsFloat(Utils.getElement(profileInfo, "dungeons.dungeon_types.catacombs.experience"), 0);
+ float cataXp = Utils.getElementAsFloat(Utils.getElement(
+ profileInfo,
+ "dungeons.dungeon_types.catacombs.experience"
+ ), 0);
levelObjCata =
ProfileViewer.getLevel(
Utils.getElementOrDefault(leveling, "catacombs", new JsonArray()).getAsJsonArray(),
@@ -181,11 +184,20 @@ public class DungeonPage extends GuiProfileViewerPage {
if (mouseX > x && mouseX < x + sectionWidth && mouseY > y + 16 && mouseY < y + 24 && !onMasterMode) {
float F5 =
- (Utils.getElementAsFloat(Utils.getElement(profileInfo, "dungeons.dungeon_types.catacombs.tier_completions." + 5), 0)); //this can prob be done better
+ (Utils.getElementAsFloat(Utils.getElement(
+ profileInfo,
+ "dungeons.dungeon_types.catacombs.tier_completions." + 5
+ ), 0)); //this can prob be done better
float F6 =
- (Utils.getElementAsFloat(Utils.getElement(profileInfo, "dungeons.dungeon_types.catacombs.tier_completions." + 6), 0));
+ (Utils.getElementAsFloat(Utils.getElement(
+ profileInfo,
+ "dungeons.dungeon_types.catacombs.tier_completions." + 6
+ ), 0));
float F7 =
- (Utils.getElementAsFloat(Utils.getElement(profileInfo, "dungeons.dungeon_types.catacombs.tier_completions." + 7), 0));
+ (Utils.getElementAsFloat(Utils.getElement(
+ profileInfo,
+ "dungeons.dungeon_types.catacombs.tier_completions." + 7
+ ), 0));
if (F5 > 150) {
F5 = 150;
}
@@ -223,7 +235,8 @@ public class DungeonPage extends GuiProfileViewerPage {
getInstance().tooltipToDisplay =
Lists.newArrayList(
- EnumChatFormatting.YELLOW + "Remaining XP: " + EnumChatFormatting.GRAY + String.format("%,d", floorLevelToXP),
+ EnumChatFormatting.YELLOW + "Remaining XP: " + EnumChatFormatting.GRAY +
+ String.format("%,d", floorLevelToXP),
String.format("# F5 Runs (%s xp) : %d", StringUtils.shortNumberFormat(xpF5), runsF5),
String.format("# F6 Runs (%s xp) : %d", StringUtils.shortNumberFormat(xpF6), runsF6),
String.format("# F7 Runs (%s xp) : %d", StringUtils.shortNumberFormat(xpF7), runsF7),
@@ -232,17 +245,26 @@ public class DungeonPage extends GuiProfileViewerPage {
boolean hasTime = false;
if (timeF5 > 1000) {
getInstance()
- .tooltipToDisplay.add(String.format("Expected Time (F5) : %s", Utils.prettyTime(runsF5 * (long) (timeF5 * 1.2))));
+ .tooltipToDisplay.add(String.format(
+ "Expected Time (F5) : %s",
+ Utils.prettyTime(runsF5 * (long) (timeF5 * 1.2))
+ ));
hasTime = true;
}
if (timeF6 > 1000) {
getInstance()
- .tooltipToDisplay.add(String.format("Expected Time (F6) : %s", Utils.prettyTime(runsF6 * (long) (timeF6 * 1.2))));
+ .tooltipToDisplay.add(String.format(
+ "Expected Time (F6) : %s",
+ Utils.prettyTime(runsF6 * (long) (timeF6 * 1.2))
+ ));
hasTime = true;
}
if (timeF7 > 1000) {
getInstance()
- .tooltipToDisplay.add(String.format("Expected Time (F7) : %s", Utils.prettyTime(runsF7 * (long) (timeF7 * 1.2))));
+ .tooltipToDisplay.add(String.format(
+ "Expected Time (F7) : %s",
+ Utils.prettyTime(runsF7 * (long) (timeF7 * 1.2))
+ ));
hasTime = true;
}
if (hasTime) {
@@ -261,19 +283,20 @@ public class DungeonPage extends GuiProfileViewerPage {
getInstance()
.tooltipToDisplay.add(
"The " +
- EnumChatFormatting.DARK_PURPLE +
- "Catacombs Expert Ring" +
- EnumChatFormatting.GRAY +
- " is assumed to be used, unless " +
- EnumChatFormatting.YELLOW +
- "SHIFT" +
- EnumChatFormatting.GRAY +
- " is held."
+ EnumChatFormatting.DARK_PURPLE +
+ "Catacombs Expert Ring" +
+ EnumChatFormatting.GRAY +
+ " is assumed to be used, unless " +
+ EnumChatFormatting.YELLOW +
+ "SHIFT" +
+ EnumChatFormatting.GRAY +
+ " is held."
);
getInstance().tooltipToDisplay.add("[Time per run] is calculated using Fastest S+ x 120%");
} else {
getInstance()
- .tooltipToDisplay.add("[Hold " + EnumChatFormatting.YELLOW + "CTRL" + EnumChatFormatting.GRAY + " to see details]");
+ .tooltipToDisplay.add(
+ "[Hold " + EnumChatFormatting.YELLOW + "CTRL" + EnumChatFormatting.GRAY + " to see details]");
}
}
@@ -371,38 +394,54 @@ public class DungeonPage extends GuiProfileViewerPage {
getInstance().tooltipToDisplay =
Lists.newArrayList(
- EnumChatFormatting.YELLOW + "Remaining XP: " + EnumChatFormatting.GRAY + String.format("%,d", floorLevelToXP),
+ EnumChatFormatting.YELLOW + "Remaining XP: " + EnumChatFormatting.GRAY +
+ String.format("%,d", floorLevelToXP),
String.format("# M3 Runs (%s xp) : %d", StringUtils.shortNumberFormat(xpM3), runsM3),
String.format("# M4 Runs (%s xp) : %d", StringUtils.shortNumberFormat(xpM4), runsM4),
String.format("# M5 Runs (%s xp) : %d", StringUtils.shortNumberFormat(xpM5), runsM5),
String.format("# M6 Runs (%s xp) : %d", StringUtils.shortNumberFormat(xpM6), runsM6),
- String.format("# M7 Runs (%s xp) : %d", StringUtils.shortNumberFormat(xpM7), runsM7),
+ String.format("# M7 Runs (%s xp) : %d", StringUtils.shortNumberFormat(xpM7), runsM7),
""
);
boolean hasTime = false;
if (timeM3 > 1000) {
getInstance()
- .tooltipToDisplay.add(String.format("Expected Time (M3) : %s", Utils.prettyTime(runsM3 * (long) (timeM3 * 1.2))));
+ .tooltipToDisplay.add(String.format(
+ "Expected Time (M3) : %s",
+ Utils.prettyTime(runsM3 * (long) (timeM3 * 1.2))
+ ));
hasTime = true;
}
if (timeM4 > 1000) {
getInstance()
- .tooltipToDisplay.add(String.format("Expected Time (M4) : %s", Utils.prettyTime(runsM4 * (long) (timeM4 * 1.2))));
+ .tooltipToDisplay.add(String.format(
+ "Expected Time (M4) : %s",
+ Utils.prettyTime(runsM4 * (long) (timeM4 * 1.2))
+ ));
hasTime = true;
}
if (timeM5 > 1000) {
getInstance()
- .tooltipToDisplay.add(String.format("Expected Time (M5) : %s", Utils.prettyTime(runsM5 * (long) (timeM5 * 1.2))));
+ .tooltipToDisplay.add(String.format(
+ "Expected Time (M5) : %s",
+ Utils.prettyTime(runsM5 * (long) (timeM5 * 1.2))
+ ));
hasTime = true;
}
if (timeM6 > 1000) {
getInstance()
- .tooltipToDisplay.add(String.format("Expected Time (M6) : %s", Utils.prettyTime(runsM6 * (long) (timeM6 * 1.2))));
+ .tooltipToDisplay.add(String.format(
+ "Expected Time (M6) : %s",
+ Utils.prettyTime(runsM6 * (long) (timeM6 * 1.2))
+ ));
hasTime = true;
}
if (timeM7 > 1000) {
getInstance()
- .tooltipToDisplay.add(String.format("Expected Time (M7) : %s", Utils.prettyTime(runsM7 * (long) (timeM7 * 1.2))));
+ .tooltipToDisplay.add(String.format(
+ "Expected Time (M7) : %s",
+ Utils.prettyTime(runsM7 * (long) (timeM7 * 1.2))
+ ));
hasTime = true;
}
if (hasTime) {
@@ -421,26 +460,32 @@ public class DungeonPage extends GuiProfileViewerPage {
getInstance()
.tooltipToDisplay.add(
"The " +
- EnumChatFormatting.DARK_PURPLE +
- "Catacombs Expert Ring" +
- EnumChatFormatting.GRAY +
- " is assumed to be used, unless " +
- EnumChatFormatting.YELLOW +
- "SHIFT" +
- EnumChatFormatting.GRAY +
- " is held."
+ EnumChatFormatting.DARK_PURPLE +
+ "Catacombs Expert Ring" +
+ EnumChatFormatting.GRAY +
+ " is assumed to be used, unless " +
+ EnumChatFormatting.YELLOW +
+ "SHIFT" +
+ EnumChatFormatting.GRAY +
+ " is held."
);
getInstance().tooltipToDisplay.add("[Time per run] is calculated using Fastest S+ x 120%");
} else {
getInstance()
- .tooltipToDisplay.add("[Hold " + EnumChatFormatting.YELLOW + "CTRL" + EnumChatFormatting.GRAY + " to see details]");
+ .tooltipToDisplay.add(
+ "[Hold " + EnumChatFormatting.YELLOW + "CTRL" + EnumChatFormatting.GRAY + " to see details]");
}
}
dungeonLevelTextField.setSize(20, 10);
dungeonLevelTextField.render(x + 22, y + 29);
int calcLen = fontRendererObj.getStringWidth("Calculate");
- Utils.renderShadowedString(EnumChatFormatting.WHITE + "Calculate", x + sectionWidth - 17 - calcLen / 2f, y + 30, 100);
+ Utils.renderShadowedString(
+ EnumChatFormatting.WHITE + "Calculate",
+ x + sectionWidth - 17 - calcLen / 2f,
+ y + 30,
+ 100
+ );
//Random stats
@@ -518,7 +563,8 @@ public class DungeonPage extends GuiProfileViewerPage {
);
Utils.renderAlignedString(
EnumChatFormatting.YELLOW + "Secrets (/Run) ",
- EnumChatFormatting.WHITE.toString() + (secrets == -1 ? "?" : (Math.round(secrets / Math.max(1, totalRuns) * 100) / 100f)),
+ EnumChatFormatting.WHITE.toString() + (secrets == -1 ? "?" : (Math.round(
+ secrets / Math.max(1, totalRuns) * 100) / 100f)),
x,
miscTopY + 30,
sectionWidth
@@ -545,18 +591,6 @@ public class DungeonPage extends GuiProfileViewerPage {
float vMax = 11 / 256f;
GlStateManager.color(1, 1, 1, 1);
- Minecraft.getMinecraft().getTextureManager().bindTexture(GuiProfileViewer.pv_elements);
- Utils.drawTexturedRect(
- bx - 2,
- y3 - 2,
- 9,
- 11,
- invert ? uMax : uMin,
- invert ? uMin : uMax,
- invert ? vMax : vMin,
- invert ? vMin : vMax,
- GL11.GL_NEAREST
- );
Utils.renderShadowedString(EnumChatFormatting.WHITE.toStrin