aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2024-07-13 18:17:44 +0200
committerGitHub <noreply@github.com>2024-07-13 18:17:44 +0200
commit5d77f2c5d873c37a88ede101b952d26f83f07a39 (patch)
tree91b5301232b6b771f5deae9c9aeb2195782cf03a
parent3e9b8377f304f1f20de31e620d0ca188366df50b (diff)
downloadnotenoughupdates-5d77f2c5d873c37a88ede101b952d26f83f07a39.tar.gz
notenoughupdates-5d77f2c5d873c37a88ede101b952d26f83f07a39.tar.bz2
notenoughupdates-5d77f2c5d873c37a88ede101b952d26f83f07a39.zip
Add Glacite Tunnels info to /pv (#1138)
Co-authored-by: jani270 <69345714+jani270@users.noreply.github.com>
-rw-r--r--.idea/codeStyles/Project.xml1
-rw-r--r--build.gradle.kts8
-rw-r--r--gradle/libs.versions.toml2
-rw-r--r--settings.gradle.kts38
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/core/GlScissorStack.java23
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/MiningPage.java1406
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/data/APIDataJson.java41
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/hotm/ExtraLispMethods.kt55
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/hotm/HotmTreeLayout.kt114
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/hotm/HotmTreeScreen.kt220
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/level/task/SkillRelatedTaskLevel.java22
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java9
-rw-r--r--src/main/kotlin/io/github/moulberry/notenoughupdates/util/kotlin/gson.kt5
-rw-r--r--src/main/resources/assets/notenoughupdates/profile_viewer/mining/background.pngbin0 -> 4269 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/profile_viewer/mining/perk_background.pngbin0 -> 197 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/profile_viewer/mining/perk_connection_x.pngbin0 -> 108 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/profile_viewer/mining/perk_connection_y.pngbin0 -> 111 bytes
17 files changed, 649 insertions, 1295 deletions
diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
index 68a0c5f9..9312ac4e 100644
--- a/.idea/codeStyles/Project.xml
+++ b/.idea/codeStyles/Project.xml
@@ -5,6 +5,7 @@
<option name="NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND" value="500" />
</JavaCodeStyleSettings>
<JetCodeStyleSettings>
+ <option name="IF_RPAREN_ON_NEW_LINE" value="false" />
<option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
</JetCodeStyleSettings>
<codeStyleSettings language="JAVA">
diff --git a/build.gradle.kts b/build.gradle.kts
index ef9ee714..296f3f47 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -22,6 +22,7 @@ import neubs.*
import org.apache.commons.lang3.SystemUtils
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import java.net.URL
+import com.xpdustry.ksr.kotlinRelocate
plugins {
idea
@@ -35,6 +36,7 @@ plugins {
id("io.gitlab.arturbosch.detekt") version "1.23.0"
id("com.google.devtools.ksp") version "1.8.21-1.0.11"
id("net.kyori.blossom") version "2.1.0"
+ id("com.xpdustry.ksr") version "1.0.0"
}
@@ -161,6 +163,9 @@ dependencies {
shadowImplementation("com.mojang:brigadier:1.0.18")
shadowImplementation("moe.nea:libautoupdate:1.3.1")
+ shadowImplementation(libs.nealisp) {
+ exclude("org.jetbrains.kotlin")
+ }
mixinRTDependencies("org.spongepowered:mixin:0.7.11-SNAPSHOT") {
isTransitive = false // Dependencies of mixin are already bundled by minecraft
@@ -279,10 +284,11 @@ tasks.shadowJar {
from(mixinDependencyCollectionJar)
dependsOn(kotlinDependencyCollectionJar)
dependsOn(mixinDependencyCollectionJar)
- fun relocate(name: String) = relocate(name, "io.github.moulberry.notenoughupdates.deps.$name")
+ fun relocate(name: String) = kotlinRelocate(name, "io.github.moulberry.notenoughupdates.deps.$name")
relocate("com.mojang.brigadier")
relocate("io.github.moulberry.moulconfig")
relocate("moe.nea.libautoupdate")
+ relocate("moe.nea.lisp")
mergeServiceFiles()
}
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
index fb8236d4..c29a0324 100644
--- a/gradle/libs.versions.toml
+++ b/gradle/libs.versions.toml
@@ -1,5 +1,7 @@
[versions]
moulconfig = "2.4.3"
+nealisp = "1.1.0"
[libraries]
+nealisp = { module = "moe.nea:nealisp", version.ref = "nealisp" }
moulconfig = { module = "org.notenoughupdates.moulconfig:legacy", version.ref = "moulconfig" }
diff --git a/settings.gradle.kts b/settings.gradle.kts
index 86073a5b..27cebd5a 100644
--- a/settings.gradle.kts
+++ b/settings.gradle.kts
@@ -18,25 +18,29 @@
*/
pluginManagement {
- repositories {
- mavenCentral()
- gradlePluginPortal()
- maven("https://oss.sonatype.org/content/repositories/snapshots")
- maven("https://maven.architectury.dev/")
- maven("https://maven.fabricmc.net")
- maven(url = "https://jitpack.io/")
- maven(url = "https://maven.minecraftforge.net/")
- maven(url = "https://repo.spongepowered.org/maven/")
- maven(url = "https://repo.sk1er.club/repository/maven-releases/")
- maven(url = "https://maven.architectury.dev/")
+ repositories {
+ mavenCentral()
+ gradlePluginPortal()
+ maven("https://oss.sonatype.org/content/repositories/snapshots")
+ maven("https://maven.architectury.dev/")
+ maven("https://maven.fabricmc.net")
+ maven(url = "https://jitpack.io/")
+ maven(url = "https://maven.minecraftforge.net/")
+ maven(url = "https://repo.spongepowered.org/maven/")
+ maven(url = "https://repo.sk1er.club/repository/maven-releases/")
+ maven(url = "https://maven.architectury.dev/")
+ maven("https://maven.xpdustry.com/releases") {
+ name = "xpdustry-releases"
+ mavenContent { releasesOnly() }
}
- resolutionStrategy {
- eachPlugin {
- when (requested.id.id) {
- "gg.essential.loom" -> useModule("gg.essential:architectury-loom:${requested.version}")
- }
- }
+ }
+ resolutionStrategy {
+ eachPlugin {
+ when (requested.id.id) {
+ "gg.essential.loom" -> useModule("gg.essential:architectury-loom:${requested.version}")
+ }
}
+ }
}
include("oneconfigquarantine")
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/core/GlScissorStack.java b/src/main/java/io/github/moulberry/notenoughupdates/core/GlScissorStack.java
index 40b9fe7a..2da8a1fc 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/core/GlScissorStack.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/core/GlScissorStack.java
@@ -80,21 +80,30 @@ public class GlScissorStack {
} else {
boundsStack.push(boundsStack.peek().createSubBound(left, top, right, bottom));
}
- if (!boundsStack.isEmpty()) {
+ refresh(scaledResolution);
+ }
+
+ /**
+ * Disable scissors temporarily. Can be reenabled with {@link #refresh(ScaledResolution)}
+ */
+ public static void disableTemporary() {
+ GL11.glDisable(GL11.GL_SCISSOR_TEST);
+ }
+
+ public static void refresh(ScaledResolution scaledResolution) {
+ if (boundsStack.isEmpty()) {
+ GL11.glDisable(GL11.GL_SCISSOR_TEST);
+ } else {
boundsStack.peek().set(scaledResolution);
+ GL11.glEnable(GL11.GL_SCISSOR_TEST);
}
- GL11.glEnable(GL11.GL_SCISSOR_TEST);
}
public static void pop(ScaledResolution scaledResolution) {
if (!boundsStack.isEmpty()) {
boundsStack.pop();
}
- if (boundsStack.isEmpty()) {
- GL11.glDisable(GL11.GL_SCISSOR_TEST);
- } else {
- boundsStack.peek().set(scaledResolution);
- }
+ refresh(scaledResolution);
}
public static void clear() {
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/MiningPage.java b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/MiningPage.java
index cbfcd60f..b0d7c637 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/MiningPage.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/MiningPage.java
@@ -19,14 +19,17 @@
package io.github.moulberry.notenoughupdates.profileviewer;
-import com.google.common.collect.Lists;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
+import io.github.moulberry.notenoughupdates.core.GlScissorStack;
import io.github.moulberry.notenoughupdates.core.util.StringUtils;
+import io.github.moulberry.notenoughupdates.core.util.render.RenderUtils;
import io.github.moulberry.notenoughupdates.profileviewer.data.APIDataJson;
+import io.github.moulberry.notenoughupdates.profileviewer.hotm.HotmTreeRenderer;
import io.github.moulberry.notenoughupdates.util.Utils;
import lombok.var;
import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.ScaledResolution;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.renderer.RenderHelper;
import net.minecraft.init.Blocks;
@@ -36,27 +39,37 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.ResourceLocation;
import org.apache.commons.lang3.text.WordUtils;
+import org.lwjgl.input.Mouse;
import org.lwjgl.opengl.GL11;
+import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
+import java.util.LinkedHashMap;
import java.util.Map;
import java.util.function.Supplier;
import java.util.stream.Stream;
public class MiningPage extends GuiProfileViewerPage {
- private static final ResourceLocation miningPageTexture = new ResourceLocation("notenoughupdates:pv_mining.png");
+ private static final ResourceLocation miningPageTexture = new ResourceLocation(
+ "notenoughupdates:profile_viewer/mining/background.png");
private static final ItemStack hotmSkillIcon = new ItemStack(Items.iron_pickaxe);
- private static final Map<String, EnumChatFormatting> crystalToColor = new HashMap<String, EnumChatFormatting>() {{
- put("jade", EnumChatFormatting.GREEN);
- put("amethyst", EnumChatFormatting.DARK_PURPLE);
- put("amber", EnumChatFormatting.GOLD);
- put("sapphire", EnumChatFormatting.AQUA);
- put("topaz", EnumChatFormatting.YELLOW);
- put("jasper", EnumChatFormatting.LIGHT_PURPLE);
- put("ruby", EnumChatFormatting.RED);
- }};
+ private static final Map<String, EnumChatFormatting> crystalToColor =
+ new LinkedHashMap<String, EnumChatFormatting>() {{
+ put("jade", EnumChatFormatting.GREEN);
+ put("amethyst", EnumChatFormatting.DARK_PURPLE);
+ put("amber", EnumChatFormatting.GOLD);
+ put("sapphire", EnumChatFormatting.AQUA);
+ put("topaz", EnumChatFormatting.YELLOW);
+ put("jasper", EnumChatFormatting.LIGHT_PURPLE);
+ put("ruby", EnumChatFormatting.RED);
+ put("opal", EnumChatFormatting.WHITE);
+ put("aquamarine", EnumChatFormatting.BLUE);
+ put("peridot", EnumChatFormatting.DARK_GREEN);
+ put("onyx", EnumChatFormatting.DARK_GRAY);
+ put("citrine", EnumChatFormatting.DARK_RED);
+ }};
public MiningPage(GuiProfileViewer instance) {
super(instance);
@@ -95,1269 +108,210 @@ public class MiningPage extends GuiProfileViewerPage {
float mithrilPowder = core.powder_mithril;
float gemstonePowder = core.powder_gemstone;
+ float glacitePowder = core.powder_glacite;
float mithrilPowderTotal = core.powder_spent_mithril;
float gemstonePowderTotal = core.powder_spent_gemstone;
+ float glacitePowderTotal = core.powder_spent_glacite;
double nucleusRunsCompleted = Stream.of("amber", "amethyst", "jade", "sapphire", "topaz")
- .mapToDouble(crystal -> Utils.getElementAsFloat(Utils.getElement(miningCore, "crystals." + crystal + "_crystal.total_placed"), 0))
- .min()
- .orElse(0);
-
- int miningFortune = nodes.mining_fortune;
- int miningFortuneStat = miningFortune * 5;
- int miningSpeed = nodes.mining_speed;
- int miningSpeedStat = miningSpeed * 20;
- int dailyPowder = nodes.daily_powder;
- int dailyPowderStat = dailyPowder * 36 + 364;
- int effMiner = nodes.efficient_miner;
- float effMinerStat = (float) (effMiner * 0.4 + 10.4);
- float effMinerStat2 = Math.max(1, (float) (effMiner * .06 + 0.31));
- int tittyInsane = nodes.titanium_insanium;
- float tittyInsaneStat = (float) (tittyInsane * .1 + 2);
- int luckOfCave = nodes.random_event;
- int madMining = nodes.mining_madness;
- int skyMall = nodes.daily_effect;
- int goblinKiller = nodes.goblin_killer;
- int seasonMine = nodes.mining_experience;
- float seasonMineStat = (float) (seasonMine * 0.1 + 5);
- int quickForge = nodes.forge_time;
- float quickForgeStat = (float) (quickForge * .5 + 10);
- int frontLoad = nodes.front_loaded;
- int orbit = nodes.experience_orbs;
- float orbitStat = (float) (orbit * .01 + 0.2);
- int crystallized = nodes.fallen_star_bonus;
- int crystallizedStat = (crystallized - 1) * 6 + 20;
- int crystallizedStat2 = (crystallized - 1) * 5 + 20;
- int professional = nodes.professional;
- int professionalStat = professional * 5 + 50;
- int greatExplorer = nodes.great_explorer;
- int greatExplorerStat = greatExplorer * 4 + 16;
- int greatExplorerStat2 = greatExplorer / 5 + 1;
- int fortunate = nodes.fortunate;
- int fortunateStat = fortunate * 4 + 20;
- int lonesomeMiner = nodes.lonesome_miner;
- float lonesomeMinerStat = (float) (lonesomeMiner * .5 + 5);
- int miningFortune2 = nodes.mining_fortune_2;
- int miningFortune2Stat = miningFortune2 * 5;
- int miningSpeed2 = nodes.mining_speed_2;
- int miningSpeed2Stat = miningSpeed2 * 40;
- int miningSpeedBoost = nodes.mining_speed_boost;
- int veinSeeker = nodes.vein_seeker;
- int powderBuff = nodes.powder_buff;
- int potm = nodes.special_0;
- int fortnite = nodes.precision_mining;
- int starPowder = nodes.star_powder;
- int pickoblus = nodes.pickaxe_toss;
- int maniacMiner = nodes.maniac_miner;
- int mole = nodes.mole;
- float moleStat = (float) (mole * 0.051);
- double molePerkStat = (double) mole / 20 - 0.55 + 50;
- double molePerkStat2 = (double) Math.round(molePerkStat * 100) / 100;
- float molePerkPct = Math.round((float) (molePerkStat2 % 1) * 100);
- if (molePerkPct == 0) {
- molePerkPct = 100;
- }
+ .mapToDouble(crystal -> Utils.getElementAsFloat(Utils.getElement(
+ miningCore,
+ "crystals." + crystal + "_crystal.total_placed"
+ ), 0))
+ .min()
+ .orElse(0);
// Render stats
Map<String, ProfileViewer.Level> levelingInfo = selectedProfile.getLevelingInfo();
if (levelingInfo != null) {
ProfileViewer.Level hotmLevelingInfo = levelingInfo.get("hotm");
-
+
// HOTM
- getInstance().renderXpBar(EnumChatFormatting.RED + "HOTM", hotmSkillIcon, x, y, sectionWidth, hotmLevelingInfo, mouseX, mouseY);
+ getInstance().renderXpBar(
+ EnumChatFormatting.RED + "HOTM",
+ hotmSkillIcon,
+ x,
+ y,
+ sectionWidth,
+ hotmLevelingInfo,
+ mouseX,
+ mouseY
+ );
}
-
// Powder
Utils.renderAlignedString(
- EnumChatFormatting.DARK_GREEN + "Mithril Powder",
- EnumChatFormatting.WHITE + StringUtils.shortNumberFormat(mithrilPowder),
- guiLeft + xStart,
+ EnumChatFormatting.DARK_GREEN + "Mithril",
+ "",
+ guiLeft + xStart + 45,
guiTop + yStartTop + 24,
115
);
Utils.renderAlignedString(
- EnumChatFormatting.LIGHT_PURPLE + "Gemstone Powder",
- EnumChatFormatting.WHITE + StringUtils.shortNumberFormat(gemstonePowder),
- guiLeft + xStart,
- guiTop + yStartTop + 44,
+ EnumChatFormatting.LIGHT_PURPLE + "Gemstone",
+ "",
+ guiLeft + xStart + 85,
+ guiTop + yStartTop + 24,
115
);
Utils.renderAlignedString(
- EnumChatFormatting.DARK_GREEN + "Total Mithril Powder",
- EnumChatFormatting.WHITE + StringUtils.shortNumberFormat(mithrilPowderTotal + mithrilPowder),
- guiLeft + xStart,
- guiTop + yStartTop + 34,
+ EnumChatFormatting.AQUA + "Glacite",
+ "",
+ guiLeft + xStart + 145,
+ guiTop + yStartTop + 24,
115
);
Utils.renderAlignedString(
- EnumChatFormatting.LIGHT_PURPLE + "Total Gemstone Powder",
- EnumChatFormatting.WHITE + StringUtils.shortNumberFormat(gemstonePowderTotal + gemstonePowder),
+ EnumChatFormatting.WHITE + "Powder:",
+ "",
guiLeft + xStart,
- guiTop + yStartTop + 54,
+ guiTop + yStartTop + 44,
115
);
-
- // Crystals
- int idx = 0;
- for (Map.Entry<String, EnumChatFormatting> crystal : crystalToColor.entrySet()) {
- String crystalState = Utils.getElementAsString(Utils.getElement(miningCore, "crystals." + crystal.getKey() + "_crystal.state"), "NOT_FOUND");
- String crystalStr = crystalState.equals("FOUND") ? "§a✔" : "§c✖";
- Utils.renderAlignedString(
- crystal.getValue() + WordUtils.capitalizeFully(crystal.getKey()) + " Crystal:",
- EnumChatFormatting.WHITE + crystalStr,
- guiLeft + xStart,
- guiTop + yStartTop + 74 + idx * 10,
- 110
- );
- idx ++; // Move text down 10 px every crystal
- }
-
Utils.renderAlignedString(
- EnumChatFormatting.BLUE + "Nucleus Runs Completed:",
- EnumChatFormatting.WHITE + StringUtils.shortNumberFormat(nucleusRunsCompleted),
- guiLeft + xStart,
- guiTop + yStartTop + 149,
- 110
- );
-
- // HOTM tree
- renderHotmPerk(
- miningSpeed,
- (int) (guiLeft + xStart + 255),
- (int) (guiTop + yStartTop + 138),
- mouseX,
- mouseY,
- () ->
- miningSpeed != 50 && miningSpeed != 0
- ? Lists.newArrayList(
- "Mining Speed",
- EnumChatFormatting.GRAY + "Level " + miningSpeed + EnumChatFormatting.DARK_GRAY + "/50",
- "",
- EnumChatFormatting.GRAY +
- "Grants " +
- EnumChatFormatting.GREEN +
- "+" +
- miningSpeedStat +
- EnumChatFormatting.GOLD +
- " ⸕ Mining",
- EnumChatFormatting.GOLD + "Speed" + EnumChatFormatting.GRAY + ".",
- "",
- EnumChatFormatting.GRAY + "Cost",
- EnumChatFormatting.DARK_GREEN +
- StringUtils.formatNumber(Math.pow(miningSpeed + 2, 3)) +
- " Mithril Powder"
- )
- : Lists.newArrayList(
- "Mining Speed",
- EnumChatFormatting.GRAY + "Level " + miningSpeed + EnumChatFormatting.DARK_GRAY + "/50",
- "",
- EnumChatFormatting.GRAY +
- "Grants " +
- EnumChatFormatting.GREEN +
- "+" +
- miningSpeedStat +
- EnumChatFormatting.GOLD +
- " ⸕ Mining",
- EnumChatFormatting.GOLD + "Speed" + EnumChatFormatting.GRAY + "."
- ),
- 50
- );
-
- renderHotmPerk(
- miningFortune,
- (int) (guiLeft + xStart + 255),
- (int) (guiTop + yStartTop + 114),
- mouseX,
- mouseY,
- () ->
- miningFortune != 0 && miningFortune != 50
- ? Lists.newArrayList(
- "Mining Fortune",
- EnumChatFormatting.GRAY + "Level " + miningFortune + EnumChatFormatting.DARK_GRAY + "/50",
- "",
- EnumChatFormatting.GRAY +
- "Grants " +
- EnumChatFormatting.GREEN +
- "+" +
- miningFortuneStat +
- EnumChatFormatting.GOLD +
- " ☘ Mining",
- EnumChatFormatting.GOLD + "Fortune" + EnumChatFormatting.GRAY + ".",
- "",
- EnumChatFormatting.GRAY + "Cost",
- EnumChatFormatting.DARK_GREEN +
- StringUtils.formatNumber((int) Math.pow(miningFortune + 2, 3.05)) +
- " Mithril Powder"
- )
- : Lists.newArrayList(
- "Mining Fortune",
- EnumChatFormatting.GRAY + "Level " + miningFortune + EnumChatFormatting.DARK_GRAY + "/50",
- "",
- EnumChatFormatting.GRAY +
- "Grants " +
- EnumChatFormatting.GREEN +
- "+" +
- miningFortuneStat +
- EnumChatFormatting.GOLD +
- " ☘ Mining",
- EnumChatFormatting.GOLD + "Fortune" + EnumChatFormatting.GRAY + "."
- ),
- 50
+ EnumChatFormatting.DARK_GREEN + StringUtils.shortNumberFormat(mithrilPowder),
+ "",
+ guiLeft + xStart + 50,
+ guiTop + yStartTop + 44,
+ 115
);
-
- renderHotmPerk(
- tittyInsane,
- (int) (guiLeft + xStart + 231),
- (int) (guiTop + yStartTop + 114),
- mouseX,
- mouseY,
- () ->
- tittyInsane != 0 && tittyInsane != 50
- ? Lists.newArrayList(
- "Titanium Insanium",
- EnumChatFormatting.GRAY + "Level " + tittyInsane + EnumChatFormatting.DARK_GRAY + "/50",
- "",
- EnumChatFormatting.GRAY + "When mining Mithril Ore, you",
- EnumChatFormatting.GRAY +
- "have a " +
- EnumChatFormatting.GREEN +
- tittyInsaneStat +
- "% " +
- EnumChatFormatting.GRAY +
- "chance to",
- EnumChatFormatting.GRAY + "convert the block into Titanium",
- EnumChatFormatting.GRAY + "Ore.",
- "",
- EnumChatFormatting.GRAY + "Cost",
- EnumChatFormatting.DARK_GREEN +
- StringUtils.formatNumber((int) Math.pow(tittyInsane + 2, 3.1)) +
- " Mithril Powder"
- )
- : Lists.newArrayList(
- "Titanium Insanium",
- EnumChatFormatting.GRAY + "Level " + tittyInsane + EnumChatFormatting.DARK_GRAY + "/50",
- "",
- EnumChatFormatting.GRAY + "When mining Mithril Ore, you",
- EnumChatFormatting.GRAY +
- "have a " +
- EnumChatFormatting.GREEN +
- tittyInsaneStat +
- "% " +
- EnumChatFormatting.GRAY +
- "chance to",
- EnumChatFormatting.GRAY + "convert the block into Titanium",
- EnumChatFormatting.GRAY + "Ore."
- ),
- 50
+ Utils.renderAlignedString(
+ EnumChatFormatting.LIGHT_PURPLE + StringUtils.shortNumberFormat(gemstonePowder),
+ "",
+ guiLeft + xStart + 100,
+ guiTop + yStartTop + 44,
+ 115
);
-
- renderPickaxeAbility(
- miningSpeedBoost,
- (int) (guiLeft + xStart + 207),
- (int) (guiTop + yStartTop + 114),
- mouseX,
- mouseY,
- () ->
- potm == 0
- ? Lists.newArrayList( // Peak of the mountain == 0
- "Mining Speed Boost",
- "",
- EnumChatFormatting.GRAY + "Pickaxe Ability: Mining Speed Boost",
- EnumChatFormatting.GRAY + "Grants " + EnumChatFormatting.GREEN + "200% " + EnumChatFormatting.GOLD +
- "⸕ Mining",
- EnumChatFormatting.GOLD +
- "Speed " +
- EnumChatFormatting.GRAY +
- "for " +
- EnumChatFormatting.GREEN +
- "15s" +
- EnumChatFormatting.GRAY,
- EnumChatFormatting.DARK_GRAY + "Cooldown: " + EnumChatFormatting.GREEN + "120s"
- )
- : Lists.newArrayList( // Peak of the mountain > 0
- "Mining Speed Boost",
- "",
- EnumChatFormatting.GRAY + "Pickaxe Ability: Mining Speed Boost",
- EnumChatFormatting.GRAY + "Grants " + EnumChatFormatting.GREEN + "300% " + EnumChatFormatting.GOLD +
- "⸕ Mining",
- EnumChatFormatting.GOLD +
- "Speed " +
- EnumChatFormatting.GRAY +
- "for " +
- EnumChatFormatting.GREEN +
- "20s" +
- EnumChatFormatting.GRAY,
- EnumChatFormatting.DARK_GRAY + "Cooldown: " + EnumChatFormatting.GREEN + "120s"
- )
+ Utils.renderAlignedString(
+ EnumChatFormatting.AQUA + StringUtils.shortNumberFormat(glacitePowder),
+ "",
+ guiLeft + xStart + 150,
+ guiTop + yStartTop + 44,
+ 115
);
-
- renderPickaxeAbility(
- veinSeeker,
- (int) (guiLeft + xStart + 183),
- (int) (guiTop + yStartTop + 18),
- mouseX,
- mouseY,
- () ->
- Lists.newArrayList(
- "Vein Seeker",
- "",
- "§6Pickaxe Ability: Vein Seeker",
- "§7Points in the direction of the",
- "§7nearest vein and grants §a+§a3§7",
- "§7§6Mining Spread §7for §a14s§7§7.",
- "§8Cooldown: §a60s"
- )
+ Utils.renderAlignedString(
+ EnumChatFormatting.WHITE + "Total:",
+ "",
+ guiLeft + xStart,
+ guiTop + yStartTop + 54,
+ 115
);
-
- renderHotmPerk(
- luckOfCave,
- (int) (guiLeft + xStart + 207),
- (int) (guiTop + yStartTop + 90),
- mouseX,
- mouseY,
- () ->
- luckOfCave != 0 && luckOfCave != 45
- ? Lists.newArrayList(
- "Luck of the Cave",
- "§7Level " + luckOfCave + EnumChatFormatting.DARK_GRAY + "/45",
- "",
- "§7Increases the chance for you to",
- "§7trigger rare occurrences in",
- "§2Dwarven Mines " + EnumChatFormatting.GRAY + "by " + EnumChatFormatting.GREEN + luckOfCave + "%§7.",
- "",
- EnumChatFormatting.GRAY + "Rare occurences include:",
- EnumChatFormatting.GRAY + " • " + EnumChatFormatting.GOLD + "Golden Goblins",
- EnumChatFormatting.GRAY + " • " + EnumChatFormatting.DARK_PURPLE + "Fallen Stars",
- EnumChatFormatting.GRAY + " • " + EnumChatFormatting.GOLD + "Powder Ghasts",
- "",
- EnumChatFormatting.GRAY + "Cost",
- EnumChatFormatting.DARK_GREEN +
- StringUtils.formatNumber((int) Math.pow(luckOfCave + 2, 3.07)) +
- " Mithril Powder"
- )
- : Lists.newArrayList(
- "Luck of the Cave",
- "§7Level " + luckOfCave + EnumChatFormatting.DARK_GRAY + "/45",
- "",
- "§7Increases the chance for you to",
- "§7trigger rare occurrences in",
- "§2Dwarven Mines " + EnumChatFormatting.GRAY + "by " + EnumChatFormatting.GREEN + luckOfCave + "%§7.",
- "",
- EnumChatFormatting.GRAY + "Rare occurrences include:",
- EnumChatFormatting.GRAY + " • " + EnumChatFormatting.GOLD + "Golden Goblins",
- EnumChatFormatting.GRAY + " • " + EnumChatFormatting.DARK_PURPLE + "Fallen Stars",
- EnumChatFormatting.GRAY + " • " + EnumChatFormatting.GOLD + "Powder Ghasts"
- ),
- 45
+ Utils.renderAlignedString(
+ EnumChatFormatting.DARK_GREEN + StringUtils.shortNumberFormat(mithrilPowder + mithrilPowderTotal),
+ "",
+ guiLeft + xStart + 50,
+ guiTop + yStartTop + 54,
+ 115
);
-
- renderHotmPerk(
- dailyPowder,
- (int) (guiLeft + xStart + 255),
- (int) (guiTop + yStartTop + 90),
- mouseX,
- mouseY,
- () ->
- dailyPowder != 0 && dailyPowder != 100
- ? Lists.newArrayList(
- "Daily Powder",
- EnumChatFormatting.GRAY + "Level " + dailyPowder + EnumChatFormatting.DARK_GRAY + "/100",
- "",
- EnumChatFormatting.GRAY +
- "Gains " +
- EnumChatFormatting.GREEN +
- dailyPowderStat +
- " Powder" +
- EnumChatFormatting.GRAY +
- " from the",
- EnumChatFormatting.GRAY + "first ore you mine every day.",
- EnumChatFormatting.GRAY + "Works for all Powder types.",
- "",
- EnumChatFormatting.GRAY + "Cost",
- EnumChatFormatting.DARK_GREEN + String.valueOf(200 + ((dailyPowder) * 18)) + " Mithril Powder"
- )
- : Lists.newArrayList(
- "Daily Powder",
- EnumChatFormatting.GRAY + "Level " + dailyPowder + EnumChatFormatting.DARK_GRAY + "/100",
- "",
- EnumChatFormatting.GRAY +
- "Gains " +
- EnumChatFormatting.GREEN +
- dailyPowderStat +
- " Powder" +
- EnumChatFormatting.GRAY +
- " from the",
- EnumChatFormatting.GRAY + "first ore you mine every day.",
- EnumChatFormatting.GRAY + "Works for all Powder types."
- ),
- 100
+ Utils.renderAlignedString(
+ EnumChatFormatting.LIGHT_PURPLE + StringUtils.shortNumberFormat(gemstonePowder + gemstonePowderTotal),
+ "",
+ guiLeft + xStart + 100,
+ guiTop + yStartTop + 54,
+ 115
);
-
- renderHotmPerk(
- effMiner,
- (int) (guiLeft + xStart + 255),
- (int) (guiTop + yStartTop + 66),
- mouseX,
- mouseY,
- () ->
- effMiner != 0 && effMiner != 100
- ? Lists.newArrayList(
- "Efficient Miner",
- EnumChatFormatting.GRAY + "Level " + effMiner + EnumChatFormatting.DARK_GRAY + "/100",
- "",
- EnumChatFormatting.GRAY + "When mining ores, you have a",
- EnumChatFormatting.GREEN +
- String.valueOf(effMinerStat) +
- "%" +
- EnumChatFormatting.GRAY +
- " chance to mine " +
- EnumChatFormatting.GREEN +
- Math.round(effMinerStat2),
- EnumChatFormatting.GRAY + "adjacent ores.",
- "",
- EnumChatFormatting.GRAY + "Cost",
- EnumChatFormatting.DARK_GREEN +
- StringUtils.formatNumber((int) Math.pow(effMiner + 2, 2.6)) +
- " Mithril Powder"
- )
- : Lists.newArrayList(
- "Efficient Miner",
- EnumChatFormatting.GRAY + "Level " + effMiner + EnumChatFormatting.DARK_GRAY + "/100",
- "",
- EnumChatFormatting.GRAY + "When mining ores, you have a",
- EnumChatFormatting.GREEN +
- String.valueOf(effMinerStat) +
- "%" +
- EnumChatFormatting.GRAY +
- " chance to mine " +
- EnumChatFormatting.GREEN +
- Math.round(effMinerStat2),
- EnumChatFormatting.GRAY + "adjacent ores."
- ),
- 100
+ Utils.renderAlignedString(
+ EnumChatFormatting.AQUA + StringUtils.shortNumberFormat(glacitePowder + glacitePowderTotal),
+ "",
+ guiLeft + xStart + 150,
+ guiTop + yStartTop + 54,
+ 115
);
-
- renderHotmPerk(
- potm,
- (int) (guiLeft + xStart + 255),
- (int) (guiTop + yStartTop + 42),
- mouseX,
- mouseY,
- () -> {
- switch (potm) {
- case 0:
- return Lists.newArrayList(
- EnumChatFormatting.RED + "Peak of the Mountain",
- EnumChatFormatting.GRAY + "Level " + potm + EnumChatFormatting.DARK_GRAY + "/7",
- "",
- EnumChatFormatting.GRAY + "Cost",
- EnumChatFormatting.DARK_GREEN + "50,000 Mithril Powder"
- );
- case 1:
- return Lists.newArrayList(
- EnumChatFormatting.YELLOW + "Peak of the Mountain",
- EnumChatFormatting.GRAY + "Level " + potm + EnumChatFormatting.DARK_GRAY + "/7",
- "",
- "§7§8+§c1 Pickaxe Ability Level",
- "§7§8+§51 Token of the Mountain",
- "",
- EnumChatFormatting.GRAY + "Cost",
- EnumChatFormatting.DARK_GREEN + "50,000 Mithril Powder"
- );
- case 2:
- return Lists.newArrayList(
- EnumChatFormatting.YELLOW + "Peak of the Mountain",
- EnumChatFormatting.GRAY + "Level " + potm + EnumChatFormatting.DARK_GRAY + "/7",
- "",
- "§7§8+§c1 Pickaxe Ability Level",
- "§7§8+§51 Token of the Mountain",
- "§7§8+§a1 Forge Slot",
- "",
- EnumChatFormatting.GRAY + "Cost",
- EnumChatFormatting.DARK_GREEN + "75,000 Mithril Powder"
- );
- case 3:
- return Lists.newArrayList(
- EnumChatFormatting.YELLOW + "Peak of the Mountain",
- EnumChatFormatting.GRAY + "Level " + potm + EnumChatFormatting.DARK_GRAY + "/7",
- "",
- "§7§8+§c1 Pickaxe Ability Level",
- "§7§8+§51 Token of the Mountain",
- "§7§8+§a1 Forge Slot",
- "§7§8+§a1 Commission Slot",
- "",
- EnumChatFormatting.GRAY + "Cost",
- EnumChatFormatting.DARK_GREEN + "100,000 Mithril Powder"
- );
- case 4:
- return Lists.newArrayList(
- EnumChatFormatting.YELLOW + "Peak of the Mountain",
- EnumChatFormatting.GRAY + "Level " + potm + EnumChatFormatting.DARK_GRAY + "/7",
- "",
- "§7§8+§c1 Pickaxe Ability Level",
- "§7§8+§51 Token of the Mountain",
- "§7§8+§a1 Forge Slot",
- "§7§8+§a1 Commission Slot",
- "§7§8+§21 Mithril Powder §7when",
- "§7mining §fMithril",
- "",
- EnumChatFormatting.GRAY + "Cost",
- EnumChatFormatting.DARK_GREEN + "125,000 Mithril Powder"
- );
- case 5:
- return Lists.newArrayList(
- EnumChatFormatting.GREEN + "Peak of the Mountain",
- EnumChatFormatting.GRAY + "Level " + potm + EnumChatFormatting.DARK_GRAY + "/7",
- "",
- "§7§8+§c1 Pickaxe Ability Level",
- "§7§8+§51 Token of the Mountain",
- "§7§8+§a1 Forge Slot",
- "§7§8+§a1 Commission Slot",
- "§7§8+§21 Mithril Powder §7when",
- "§7mining §fMithril",
- "§7§8+§51 Token of the Mountain",
- "",
- "§7Cost",
- "§d500,000 Gemstone Powder"
- );
- case 6:
- return Lists.newArrayList(
- EnumChatFormatting.GREEN + "Peak of the Mountain",
- EnumChatFormatting.GRAY + "Level " + potm + EnumChatFormatting.DARK_GRAY + "/7",
- "",
- "§7§8+§c1 Pickaxe Ability Level",
- "§7§8+§51 Token of the Mountain",
- "§7§8+§a1 Forge Slot",
- "§7§8+§a1 Commission Slot",
- "§7§8+§21 Mithril Powder §7when",
- "§7mining §fMithril",
- "§7§8+§51 Token of the Mountain",
- "§7§8+§d2 Gemstone Powder §7when",
- "§7mining §dGemstones",
- "",
- "§7Cost",
- "§d750,000 Gemstone Powder"
- );
- case 7:
- return Lists.newArrayList(
- EnumChatFormatting.GREEN + "Peak of the Mountain",
- EnumChatFormatting.GRAY + "Level " + potm + EnumChatFormatting.DARK_GRAY + "/7",
- "",
- "§7§8+§c1 Pickaxe Ability Level",
- "§7§8+§51 Token of the Mountain",
- "§7§8+§a1 Forge Slot",
- "§7§8+§a1 Commission Slot",
- "§7§8+§21 Mithril Powder §7when",
- "§7mining §fMithril",
- "§7§8+§51 Token of the Mountain",
- "§7§8+§d2 Gemstone Powder §7when",
- "§7mining §dGemstones",
- "§7§8+§51 Token of the Mountain"
- );
- }
- return Lists.newArrayList(
- EnumChatFormatting.GREEN + "Peak of the Mountain",
- EnumChatFormatting.GRAY + "Level " + potm + EnumChatFormatting.DARK_GRAY + "/???",
- EnumChatFormatting.RED + "It looks like your NEU doesn't understand your peak of the mountain perks.",