From db94673256e70b848d6792cd8286a7c2b9e3b077 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Tue, 27 Feb 2024 14:05:57 -0500 Subject: [PATCH] More parsing work. --- src/engine/objects/ItemTemplate.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/engine/objects/ItemTemplate.java b/src/engine/objects/ItemTemplate.java index 8d77c7d5..16b47b70 100644 --- a/src/engine/objects/ItemTemplate.java +++ b/src/engine/objects/ItemTemplate.java @@ -24,6 +24,7 @@ public class ItemTemplate { // Template Properties public String obj_name; + public boolean obj_pickable; public Vector3fImmutable obj_scale; public Vector3fImmutable obj_forward_vector; public Vector3fImmutable obj_default_alignment; @@ -83,6 +84,10 @@ public class ItemTemplate { obj_name = (String) jsonObject.get("obj_name"); + // Reading a boolean + + obj_pickable = (boolean) jsonObject.get("obj_pickable"); + // Reading floats from an array (note always check for empty arrays) JSONArray scaleData = (JSONArray) jsonObject.get("obj_scale");