aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorkr45732 <52721908+kr45732@users.noreply.github.com>2023-07-20 12:10:24 -0400
committerGitHub <noreply@github.com>2023-07-20 18:10:24 +0200
commit3184880b31e9dc8d8985411468112c6b49e5b480 (patch)
tree8a1dfdafd948eb3aab61bf959924a61365bb375c /src/main
parent21f0a0cf7e373daca6ef2405ef9e05d1b625e0b8 (diff)
downloadNotEnoughUpdates-3184880b31e9dc8d8985411468112c6b49e5b480.tar.gz
NotEnoughUpdates-3184880b31e9dc8d8985411468112c6b49e5b480.tar.bz2
NotEnoughUpdates-3184880b31e9dc8d8985411468112c6b49e5b480.zip
Ruh (#779)
* ruh * ruh
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/MiningPage.java5
1 files changed, 3 insertions, 2 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 792b1b80..cca27962 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/MiningPage.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/MiningPage.java
@@ -22,6 +22,7 @@ package io.github.moulberry.notenoughupdates.profileviewer;
import io.github.moulberry.notenoughupdates.profileviewer.ProfileViewer;
import com.google.common.collect.Lists;
import com.google.gson.JsonObject;
+import com.google.gson.JsonElement;
import io.github.moulberry.notenoughupdates.core.util.StringUtils;
import io.github.moulberry.notenoughupdates.util.Utils;
import net.minecraft.client.Minecraft;
@@ -82,8 +83,8 @@ public class MiningPage extends GuiProfileViewerPage {
int sectionWidth = 110;
// Get stats
- JsonObject miningCore = profileInfo.getAsJsonObject("mining_core");
- JsonObject nodes = miningCore.getAsJsonObject("nodes");
+ JsonElement miningCore = profileInfo.get("mining_core");
+ JsonElement nodes = Utils.getElement(miningCore, "nodes");
float mithrilPowder = Utils.getElementAsFloat(Utils.getElement(miningCore, "powder_mithril"), 0);
float gemstonePowder = Utils.getElementAsFloat(Utils.getElement(miningCore, "powder_gemstone"), 0);