aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/MiningPage.java11
1 files changed, 7 insertions, 4 deletions
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 4940e96b..dd626796 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/MiningPage.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/MiningPage.java
@@ -41,6 +41,7 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import java.util.function.Supplier;
+import java.util.stream.Stream;
public class MiningPage extends GuiProfileViewerPage {
@@ -97,8 +98,10 @@ public class MiningPage extends GuiProfileViewerPage {
"powder_spent_gemstone"
), 0);
- float crystalPlacedAmount =
- Utils.getElementAsFloat(Utils.getElement(miningCore, "crystals.jade_crystal.total_placed"), 0);
+ 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 = Utils.getElementAsInt(Utils.getElement(nodes, "mining_fortune"), 0);
int miningFortuneStat = miningFortune * 5;
@@ -211,8 +214,8 @@ public class MiningPage extends GuiProfileViewerPage {
}
Utils.renderAlignedString(
- EnumChatFormatting.BLUE + "Total Placed Crystals:",
- EnumChatFormatting.WHITE + StringUtils.shortNumberFormat(crystalPlacedAmount),
+ EnumChatFormatting.BLUE + "Nucleus Runs Completed:",
+ EnumChatFormatting.WHITE + StringUtils.shortNumberFormat(nucleusRunsCompleted),
guiLeft + xStart,
guiTop + yStartTop + 149,
110