diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2022-09-22 20:51:20 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-22 20:51:20 +0200 |
commit | e5f1c29a9266fde6f1a558639bedc6437dffe7cb (patch) | |
tree | 68b46e41f8e6bcd073af561a6fbcb0d95d571296 | |
parent | eeaf4c2a30ef7ca6bba067bbfc48ece0ad93f55b (diff) | |
download | NotEnoughUpdates-e5f1c29a9266fde6f1a558639bedc6437dffe7cb.tar.gz NotEnoughUpdates-e5f1c29a9266fde6f1a558639bedc6437dffe7cb.tar.bz2 NotEnoughUpdates-e5f1c29a9266fde6f1a558639bedc6437dffe7cb.zip |
fixed error when reading mining api data (#301)
-rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/util/HotmInformation.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/util/HotmInformation.java b/src/main/java/io/github/moulberry/notenoughupdates/util/HotmInformation.java index 5d7bfa6d..c97a37d9 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/util/HotmInformation.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/util/HotmInformation.java @@ -195,7 +195,10 @@ public class HotmInformation { Tree tree = new Tree(); JsonObject nodes = miningCore.getAsJsonObject("nodes"); for (Map.Entry<String, JsonElement> node : nodes.entrySet()) { - tree.levels.put(node.getKey(), node.getValue().getAsInt()); + String key = node.getKey(); + if (!key.startsWith("toggle_")) { + tree.levels.put(key, node.getValue().getAsInt()); + } } if (miningCore.has("powder_mithril_total")) { tree.totalMithrilPowder = miningCore.get("powder_mithril_total").getAsInt(); |