From e5f1c29a9266fde6f1a558639bedc6437dffe7cb Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Thu, 22 Sep 2022 20:51:20 +0200 Subject: fixed error when reading mining api data (#301) --- .../io/github/moulberry/notenoughupdates/util/HotmInformation.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') 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 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(); -- cgit