From d0a837783e21f7de18c9084a203e00170f550593 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Mon, 22 Apr 2024 13:23:18 -0400 Subject: [PATCH] Update to sparsetype parsing --- src/engine/objects/ItemTemplate.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/engine/objects/ItemTemplate.java b/src/engine/objects/ItemTemplate.java index ca49d591..09c26d9d 100644 --- a/src/engine/objects/ItemTemplate.java +++ b/src/engine/objects/ItemTemplate.java @@ -173,9 +173,10 @@ public class ItemTemplate { JSONObject obj_sparse_json = jsonObject.getJSONObject("obj_sparse_data"); - for (String key : obj_sparse_json.keySet()) { - String sparseValue = obj_sparse_json.getString(key); - obj_sparse_data.put(key, sparseValue); + for (Object key : obj_sparse_json.keySet()) { + String sparseType = key.toString(); + Object sparseValue = obj_sparse_json.get(sparseType); + obj_sparse_data.put(sparseType, sparseValue.toString()); } // Banes are defined by their sparse data field