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/NEUManager.java16
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/StorageManager.java63
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiEnchantColour.java8
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiInvButtonEditor.java56
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinRenderItem.java7
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/overlays/EquipmentOverlay.java30
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/DungeonPage.java33
7 files changed, 187 insertions, 26 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java
index 35385f38..5d65d07e 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java
@@ -399,17 +399,19 @@ public class NEUManager {
* function. This method is used for the chest-item-search feature.
*/
public boolean searchString(String toSearch, String query) {
- int lastMatch = -1;
+ int lastQueryMatched = -1;
toSearch = clean(toSearch).toLowerCase();
query = clean(query).toLowerCase();
- String[] splitToSeach = toSearch.split(" ");
+ String[] splitToSearch = toSearch.split(" ");
+ String[] queryArray = query.split(" ");
+
out:
- for (String s : query.split(" ")) {
- for (int i = 0; i < splitToSeach.length; i++) {
- if (!(lastMatch == -1 || lastMatch == i - 1)) continue;
- if (splitToSeach[i].startsWith(s)) {
- lastMatch = i;
+ for (int j = 0; j < queryArray.length; j++) {
+ for (int i = 0; i < splitToSearch.length; i++) {
+ if ((queryArray.length - (lastQueryMatched != -1 ? lastQueryMatched : 0)) > (splitToSearch.length - i)) continue;
+ if (splitToSearch[i].startsWith(queryArray[j])) {
+ lastQueryMatched = j;
continue out;
}
}
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/StorageManager.java b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/StorageManager.java
index cc463308..93e9f516 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/StorageManager.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/StorageManager.java
@@ -45,6 +45,7 @@ import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.JsonToNBT;
import net.minecraft.nbt.NBTBase;
+import net.minecraft.nbt.NBTException;
import net.minecraft.nbt.NBTTagByte;
import net.minecraft.nbt.NBTTagByteArray;
import net.minecraft.nbt.NBTTagCompound;
@@ -83,11 +84,12 @@ public class StorageManager {
private static final StorageManager INSTANCE = new StorageManager();
private static final Gson GSON = new GsonBuilder()
.registerTypeAdapter(ItemStack.class, new ItemStackSerializer())
- .registerTypeAdapter(ItemStack.class, new ItemStackDeserilizer()).create();
+ .registerTypeAdapter(ItemStack.class, new ItemStackDeserializer()).create();
public static class ItemStackSerializer implements JsonSerializer<ItemStack> {
@Override
public JsonElement serialize(ItemStack src, Type typeOfSrc, JsonSerializationContext context) {
+ fixPetInfo(src);
NBTTagCompound tag = src.serializeNBT();
return nbtToJson(tag);
}
@@ -95,7 +97,7 @@ public class StorageManager {
private static final Pattern JSON_FIX_REGEX = Pattern.compile("\"([^,:]+)\":");
- public static class ItemStackDeserilizer implements JsonDeserializer<ItemStack> {
+ public static class ItemStackDeserializer implements JsonDeserializer<ItemStack> {
@Override
public ItemStack deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context)
throws JsonParseException {
@@ -135,6 +137,63 @@ public class StorageManager {
return (JsonObject) loadJson(NBTTagCompound);
}
+ private static class PetInfo {
+ String type;
+ Boolean active;
+ Double exp;
+ String tier;
+ Boolean hideInfo;
+ Integer candyUsed;
+ String uuid;
+ Boolean hideRightClick;
+ String heldItem;
+ String skin;
+
+ private <T> void appendIfNotNull(StringBuilder builder, String key, T value) {
+ if (value != null) {
+ if (builder.indexOf("{") != builder.length()-1) {
+ builder.append(",");
+ }
+ builder.append(key).append(":");
+ if (value instanceof String) {
+ builder.append("\"").append(value).append("\"");
+ } else {
+ builder.append(value);
+ }
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder object = new StringBuilder();
+ object.append("{");
+ appendIfNotNull(object, "type", type);
+ appendIfNotNull(object, "active", active);
+ appendIfNotNull(object, "exp", exp);
+ appendIfNotNull(object, "tier", tier);
+ appendIfNotNull(object, "hideInfo", hideInfo);
+ appendIfNotNull(object, "candyUsed", candyUsed);
+ appendIfNotNull(object, "uuid", uuid);
+ appendIfNotNull(object, "hideRightClick", hideRightClick);
+ appendIfNotNull(object, "heldItem", heldItem);
+ appendIfNotNull(object, "skin", skin);
+ object.append("}");
+ return object.toString();
+ }
+ }
+
+ private static void fixPetInfo(ItemStack src) {
+ if (src.getTagCompound() == null || !src.getTagCompound().hasKey("ExtraAttributes") || !src.getTagCompound().getCompoundTag("ExtraAttributes").hasKey("petInfo")) return;
+ PetInfo oldPetInfo = GSON.fromJson(src.getTagCompound().getCompoundTag("ExtraAttributes").getString("petInfo"), PetInfo.class);
+ src.getTagCompound().getCompoundTag("ExtraAttributes").removeTag("petInfo");
+ try {
+ src.getTagCompound().getCompoundTag("ExtraAttributes").setTag(
+ "petInfo",
+ JsonToNBT.getTagFromJson(oldPetInfo.toString())
+ );
+ } catch (NBTException | NullPointerException ignored) {}
+ }
+
private static JsonElement loadJson(NBTBase tag) {
if (tag instanceof NBTTagCompound) {
NBTTagCompound compoundTag = (NBTTagCompound) tag;
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiEnchantColour.java b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiEnchantColour.java
index 31713189..b90b1356 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiEnchantColour.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiEnchantColour.java
@@ -271,17 +271,21 @@ public class GuiEnchantColour extends GuiScreen {
}
if (mouseX >= guiLeft + xSize + 3 && mouseX < guiLeft + xSize + 39) {
+ boolean renderingTooltip = false;
+
if (mouseY >= guiTopSidebar - 34 && mouseY <= guiTopSidebar - 18 && maxedBookFound == 1) {
tooltipToDisplay = maxedBook.getTooltip(Minecraft.getMinecraft().thePlayer, false);
Utils.drawHoveringText(tooltipToDisplay, mouseX, mouseY, width, height, -1, fr);
tooltipToDisplay = null;
+ renderingTooltip = true;
}
- if (mouseY >= guiTopSidebar - 52 && mouseY <= guiTopSidebar - 34 && maxedAttBookFound == 1) {
+ if (mouseY >= guiTopSidebar - 52 && mouseY <= guiTopSidebar - 34 && maxedAttBookFound == 1 && !renderingTooltip) {
tooltipToDisplay = maxedAttBook.getTooltip(Minecraft.getMinecraft().thePlayer, false);
Utils.drawHoveringText(tooltipToDisplay, mouseX, mouseY, width, height, -1, fr);
tooltipToDisplay = null;
+ renderingTooltip = true;
}
- if (mouseY >= guiTopSidebar - 18 && mouseY <= guiTopSidebar - 2) {
+ if (mouseY >= guiTopSidebar - 18 && mouseY <= guiTopSidebar - 2 && !renderingTooltip) {
tooltipToDisplay = Lists.newArrayList(
EnumChatFormatting.AQUA + "NEUEC Colouring Guide",
EnumChatFormatting.GREEN + "",
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiInvButtonEditor.java b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiInvButtonEditor.java
index 40e12e35..4d18ea18 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiInvButtonEditor.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiInvButtonEditor.java
@@ -25,11 +25,13 @@ import com.google.gson.JsonObject;
import com.google.gson.JsonParseException;
import com.google.gson.JsonParser;
import com.google.gson.JsonPrimitive;
+import io.github.moulberry.notenoughupdates.NEUOverlay;
import io.github.moulberry.notenoughupdates.NotEnoughUpdates;
import io.github.moulberry.notenoughupdates.core.GlScissorStack;
import io.github.moulberry.notenoughupdates.core.GuiElementTextField;
import io.github.moulberry.notenoughupdates.core.util.lerp.LerpingInteger;
import io.github.moulberry.notenoughupdates.options.NEUConfig;
+import io.github.moulberry.notenoughupdates.overlays.EquipmentOverlay;
import io.github.moulberry.notenoughupdates.util.Utils;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.Gui;
@@ -316,6 +318,13 @@ public class GuiInvButtonEditor extends GuiScreen {
GlStateManager.color(1, 1, 1, 1);
Utils.drawTexturedRect(guiLeft, guiTop, xSize, ySize, 0, xSize / 256f, 0, ySize / 256f, GL11.GL_NEAREST);
+ if (NotEnoughUpdates.INSTANCE.config.customArmour.enableArmourHud) {
+ EquipmentOverlay.INSTANCE.renderPreviewArmorHud();
+ }
+ if (NotEnoughUpdates.INSTANCE.config.petOverlay.petInvDisplay) {
+ EquipmentOverlay.INSTANCE.renderPreviewPetInvHud();
+ }
+
for (NEUConfig.InventoryButton button : NotEnoughUpdates.INSTANCE.config.hidden.inventoryButtons) {
int x = guiLeft + button.x;
int y = guiTop + button.y;
@@ -326,6 +335,17 @@ public class GuiInvButtonEditor extends GuiScreen {
y += ySize;
}
+ if (NotEnoughUpdates.INSTANCE.config.customArmour.enableArmourHud) {
+ if (x < guiLeft + xSize - 150 && x > guiLeft + xSize - 200 && y > guiTop && y < guiTop + 84) {
+ x -= 25;
+ }
+ }
+ if (NotEnoughUpdates.INSTANCE.config.petOverlay.petInvDisplay) {
+ if (x < guiLeft + xSize - 150 && x > guiLeft + xSize - 200 && y > guiTop + 60 && y < guiTop + 120) {
+ x -= 25;
+ }
+ }
+
if (button.isActive()) {
GlStateManager.color(1, 1, 1, 1f);
} else {
@@ -358,7 +378,7 @@ public class GuiInvButtonEditor extends GuiScreen {
Minecraft.getMinecraft().getTextureManager().bindTexture(custom_ench_colour);
GlStateManager.color(1, 1, 1, 1);
Utils.drawTexturedRect(
- guiLeft - 88 - 2 - 22,
+ guiLeft - 88 - 2 - 22 - (NotEnoughUpdates.INSTANCE.config.customArmour.enableArmourHud ? 25 : 0),
guiTop + 2,
88,
20,
@@ -369,7 +389,7 @@ public class GuiInvButtonEditor extends GuiScreen {
GL11.GL_NEAREST
);
Utils.drawTexturedRect(
- guiLeft - 88 - 2 - 22,
+ guiLeft - 88 - 2 - 22 - (NotEnoughUpdates.INSTANCE.config.customArmour.enableArmourHud ? 25 : 0),
guiTop + 2 + 24,
88,
20,
@@ -382,7 +402,7 @@ public class GuiInvButtonEditor extends GuiScreen {
Utils.drawStringCenteredScaledMaxWidth(
"Load preset",
fontRendererObj,
- guiLeft - 44 - 2 - 22,
+ guiLeft - 44 - 2 - 22 - (NotEnoughUpdates.INSTANCE.config.customArmour.enableArmourHud ? 25 : 0),
guiTop + 8,
false,
86,
@@ -391,7 +411,7 @@ public class GuiInvButtonEditor extends GuiScreen {
Utils.drawStringCenteredScaledMaxWidth(
"from Clipboard",
fontRendererObj,
- guiLeft - 44 - 2 - 22,
+ guiLeft - 44 - 2 - 22 - (NotEnoughUpdates.INSTANCE.config.customArmour.enableArmourHud ? 25 : 0),
guiTop + 16,
false,
86,
@@ -400,7 +420,7 @@ public class GuiInvButtonEditor extends GuiScreen {
Utils.drawStringCenteredScaledMaxWidth(
"Save preset",
fontRendererObj,
- guiLeft - 44 - 2 - 22,
+ guiLeft - 44 - 2 - 22 - (NotEnoughUpdates.INSTANCE.config.customArmour.enableArmourHud ? 25 : 0),
guiTop + 8 + 24,
false,
86,
@@ -409,7 +429,7 @@ public class GuiInvButtonEditor extends GuiScreen {
Utils.drawStringCenteredScaledMaxWidth(
"to Clipboard",
fontRendererObj,
- guiLeft - 44 - 2 - 22,
+ guiLeft - 44 - 2 - 22 - (NotEnoughUpdates.INSTANCE.config.customArmour.enableArmourHud ? 25 : 0),
guiTop + 16 + 24,
false,
86,
@@ -417,7 +437,7 @@ public class GuiInvButtonEditor extends GuiScreen {
);
if (!validShareContents()) {
- Gui.drawRect(guiLeft - 88 - 2 - 22, guiTop + 2, guiLeft - 2 - 22, guiTop + 2 + 20, 0x80000000);
+ Gui.drawRect(guiLeft - 88 - 2 - 22 - (NotEnoughUpdates.INSTANCE.config.customArmour.enableArmourHud ? 25 : 0), guiTop + 2, guiLeft - 2 - 22 - (NotEnoughUpdates.INSTANCE.config.customArmour.enableArmourHud ? 25 : 0), guiTop + 2 + 20, 0x80000000);
}
GlStateManager.color(1, 1, 1, 1);
@@ -461,6 +481,17 @@ public class GuiInvButtonEditor extends GuiScreen {
y += ySize;
}
+ if (NotEnoughUpdates.INSTANCE.config.customArmour.enableArmourHud) {
+ if (x < guiLeft + xSize - 150 && x > guiLeft + xSize - 200 && y > guiTop && y < guiTop + 84) {
+ x -= 25;
+ }
+ }
+ if (NotEnoughUpdates.INSTANCE.config.petOverlay.petInvDisplay) {
+ if (x < guiLeft + xSize - 150 && x > guiLeft + xSize - 200 && y > guiTop + 60 && y < guiTop + 120) {
+ x -= 25;
+ }
+ }
+
GlStateManager.translate(0, 0, 300);
editorLeft = x + 8 - editorXSize / 2;
editorTop = y + 18 + 2;
@@ -741,6 +772,17 @@ public class GuiInvButtonEditor extends GuiScreen {
y += ySize;
}
+ if (NotEnoughUpdates.INSTANCE.config.customArmour.enableArmourHud) {
+ if (x < guiLeft + xSize - 150 && x > guiLeft + xSize - 200 && y > guiTop && y < guiTop + 84) {
+ x -= 25;
+ }
+ }
+ if (NotEnoughUpdates.INSTANCE.config.petOverlay.petInvDisplay) {
+ if (x < guiLeft + xSize - 150 && x > guiLeft + xSize - 200 && y > guiTop + 60 && y < guiTop + 120) {
+ x -= 25;
+ }
+ }
+
if (mouseX >= x && mouseY >= y &&
mouseX <= x + 18 && mouseY <= y + 18) {
if (editingButton == button) {
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinRenderItem.java b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinRenderItem.java
index dc59c0bb..7c2cfcbf 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinRenderItem.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinRenderItem.java
@@ -25,6 +25,7 @@ import io.github.moulberry.notenoughupdates.core.ChromaColour;
import io.github.moulberry.notenoughupdates.listener.RenderListener;
import io.github.moulberry.notenoughupdates.miscfeatures.ItemCooldowns;
import io.github.moulberry.notenoughupdates.miscfeatures.ItemCustomizeManager;
+import io.github.moulberry.notenoughupdates.profileviewer.GuiProfileViewer;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.FontRenderer;
import net.minecraft.client.gui.Gui;
@@ -195,7 +196,7 @@ public abstract class MixinRenderItem {
@Inject(method = "renderItemIntoGUI", at = @At("HEAD"))
public void renderItemHead(ItemStack stack, int x, int y, CallbackInfo ci) {
- if (NotEnoughUpdates.INSTANCE.overlay.searchMode && RenderListener.drawingGuiScreen && NotEnoughUpdates.INSTANCE.isOnSkyblock()) {
+ if (NotEnoughUpdates.INSTANCE.overlay.searchMode && RenderListener.drawingGuiScreen && NotEnoughUpdates.INSTANCE.isOnSkyblock() && !(Minecraft.getMinecraft().currentScreen instanceof GuiProfileViewer)) {
boolean matches = false;
GuiTextField textField = NotEnoughUpdates.INSTANCE.overlay.getTextField();
@@ -221,7 +222,7 @@ public abstract class MixinRenderItem {
@Inject(method = "renderItemIntoGUI", at = @At("RETURN"))
public void renderItemReturn(ItemStack stack, int x, int y, CallbackInfo ci) {
if (stack != null && stack.stackSize != 1) return;
- if (NotEnoughUpdates.INSTANCE.overlay.searchMode && RenderListener.drawingGuiScreen && NotEnoughUpdates.INSTANCE.isOnSkyblock()) {
+ if (NotEnoughUpdates.INSTANCE.overlay.searchMode && RenderListener.drawingGuiScreen && NotEnoughUpdates.INSTANCE.isOnSkyblock() && !(Minecraft.getMinecraft().currentScreen instanceof GuiProfileViewer)) {
boolean matches = false;
GuiTextField textField = NotEnoughUpdates.INSTANCE.overlay.getTextField();
@@ -252,7 +253,7 @@ public abstract class MixinRenderItem {
CallbackInfo ci
) {
if (stack != null && stack.stackSize != 1) {
- if (NotEnoughUpdates.INSTANCE.overlay.searchMode && RenderListener.drawingGuiScreen && NotEnoughUpdates.INSTANCE.isOnSkyblock()) {
+ if (NotEnoughUpdates.INSTANCE.overlay.searchMode && RenderListener.drawingGuiScreen && NotEnoughUpdates.INSTANCE.isOnSkyblock() && !(Minecraft.getMinecraft().currentScreen instanceof GuiProfileViewer)) {
boolean matches = false;
GuiTextField textField = NotEnoughUpdates.INSTANCE.overlay.getTextField();
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/overlays/EquipmentOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/overlays/EquipmentOverlay.java
index 1bf61ad8..ea440396 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/overlays/EquipmentOverlay.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/overlays/EquipmentOverlay.java
@@ -422,6 +422,36 @@ public class EquipmentOverlay {
return offset + 20;
}
+ public void renderPreviewArmorHud() {
+ if (!NotEnoughUpdates.INSTANCE.config.customArmour.enableArmourHud) return;
+
+ int width = Utils.peekGuiScale().getScaledWidth();
+ int height = Utils.peekGuiScale().getScaledHeight();
+
+ Minecraft.getMinecraft().getTextureManager().bindTexture(getCustomEquipmentTexture(NotEnoughUpdates.INSTANCE.config.petOverlay.petInvDisplay));
+
+ GlStateManager.color(1, 1, 1, 1);
+ GL11.glTranslatef(0, 0, 401);
+ float yNumber = (float) (height - 167) / 2f;
+ Utils.drawTexturedRect((float) ((width - 224.1) / 2f), yNumber, 31, 86, GL11.GL_NEAREST);
+ GlStateManager.bindTexture(0);
+ }
+
+ public void renderPreviewPetInvHud() {
+ if (!NotEnoughUpdates.INSTANCE.config.petOverlay.petInvDisplay) return;
+
+ int width = Utils.peekGuiScale().getScaledWidth();
+ int height = Utils.peekGuiScale().getScaledHeight();
+
+ Minecraft.getMinecraft().getTextureManager().bindTexture(getCustomPetTexture(NotEnoughUpdates.INSTANCE.config.customArmour.enableArmourHud));
+
+ GlStateManager.color(1, 1, 1, 1);
+ GL11.glTranslatef(0, 0, 401);
+ float yNumber = (float) (height - 23) / 2f;
+ Utils.drawTexturedRect((float) ((width - 224.1) / 2f), yNumber, 31, 32, GL11.GL_NEAREST);
+ GlStateManager.bindTexture(0);
+ }
+
public ItemStack slot1 = null;
public ItemStack slot2 = null;
public ItemStack slot3 = null;
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 c707f7fc..15a70ded 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/DungeonPage.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/DungeonPage.java
@@ -196,9 +196,9 @@ public class DungeonPage extends GuiProfileViewerPage {
if (F7 > 50) {
F7 = 50;
}
- float xpF5 = 2000 * (F5 / 100 + 1);
- float xpF6 = 4000 * (F6 / 100 + 1);
- float xpF7 = 20000 * (F7 / 100 + 1);
+ float xpF5 = 2400 * (F5 / 100 + 1);
+ float xpF6 = 4880 * (F6 / 100 + 1);
+ float xpF7 = 28000 * (F7 / 100 + 1);
if (!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) {
xpF5 *= 1.1;
xpF6 *= 1.1;
@@ -306,6 +306,13 @@ public class DungeonPage extends GuiProfileViewerPage {
0
)
);
+ float M7 =
+ (
+ Utils.getElementAsFloat(
+ Utils.getElement(profileInfo, "dungeons.dungeon_types.master_catacombs.tier_completions." + 7),
+ 0
+ )
+ );
if (M3 > 50) {
M3 = 50;
}
@@ -318,22 +325,28 @@ public class DungeonPage extends GuiProfileViewerPage {
if (M6 > 50) {
M6 = 50;
}
- float xpM3 = 36500 * (M3 / 100 + 1);
- float xpM4 = 48500 * (M4 / 100 + 1);
+ if (M7 > 50) {
+ M7 = 50;
+ }
+ float xpM3 = 35000 * (M3 / 100 + 1);
+ float xpM4 = 55000 * (M4 / 100 + 1);
float xpM5 = 70000 * (M5 / 100 + 1);
float xpM6 = 100000 * (M6 / 100 + 1);
+ float xpM7 = 300000 * (M7 / 100 + 1);
//No clue if M3 or M4 xp values are right
if (!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) {
xpM3 *= 1.1;
xpM4 *= 1.1;
xpM5 *= 1.1;
xpM6 *= 1.1;
+ xpM7 *= 1.1;
}
long runsM3 = (int) Math.ceil(floorLevelToXP / xpM3);
long runsM4 = (int) Math.ceil(floorLevelToXP / xpM4);
long runsM5 = (int) Math.ceil(floorLevelToXP / xpM5);
long runsM6 = (int) Math.ceil(floorLevelToXP / xpM6);
+ long runsM7 = (int) Math.ceil(floorLevelToXP / xpM7);
float timeM3 = Utils.getElementAsFloat(
Utils.getElement(profileInfo, "dungeons.dungeon_types.master_catacombs.fastest_time_s_plus.3"),
@@ -351,6 +364,10 @@ public class DungeonPage extends GuiProfileViewerPage {
Utils.getElement(profileInfo, "dungeons.dungeon_types.master_catacombs.fastest_time_s_plus.6"),
0
);
+ float timeM7 = Utils.getElementAsFloat(
+ Utils.getElement(profileInfo, "dungeons.dungeon_types.master_catacombs.fastest_time_s_plus.7"),
+ 0
+ );
getInstance().tooltipToDisplay =
Lists.newArrayList(
@@ -358,6 +375,7 @@ public class DungeonPage extends GuiProfileViewerPage {
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),
""
);
boolean hasTime = false;
@@ -381,6 +399,11 @@ public class DungeonPage extends GuiProfileViewerPage {
.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))));
+ hasTime = true;
+ }
if (hasTime) {
getInstance().tooltipToDisplay.add("");
}