Skip to content

Commit

Permalink
fixed error when reading mining api data (Moulberry#301)
Browse files Browse the repository at this point in the history
  • Loading branch information
hannibal002 authored Sep 22, 2022
1 parent eeaf4c2 commit e5f1c29
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,10 @@ public void updateInformation(JsonObject entireApiResponse) {
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();
Expand Down

0 comments on commit e5f1c29

Please sign in to comment.