From ad52546e0ca498165b4272275312c179a4feb0f3 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Sun, 18 Feb 2024 12:04:41 -0500 Subject: [PATCH] Fleshing out constructor --- src/engine/objects/ItemTemplate.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/engine/objects/ItemTemplate.java b/src/engine/objects/ItemTemplate.java index 11c981b8..1a319e56 100644 --- a/src/engine/objects/ItemTemplate.java +++ b/src/engine/objects/ItemTemplate.java @@ -28,12 +28,11 @@ public class ItemTemplate { public ItemTemplate(JSONObject jsonObject) { obj_name = (String) jsonObject.get("obj_name"); - JSONArray scaleData = (JSONArray) jsonObject.get("obj_scale"); - float tempValue = (Float) scaleData.get(0); + JSONArray scaleData = (JSONArray) jsonObject.get("obj_scale"); + obj_scale = new Vector3fImmutable(((Double) scaleData.get(0)).floatValue(), ((Double) scaleData.get(1)).floatValue(), + ((Double) scaleData.get(2)).floatValue()); - // obj_scale = new Vector3fImmutable((Float) scaleData.get(0), (Float) scaleData.get(0), - // (Float) scaleData.get(2)); obj_render_object = ((Long) jsonObject.get("obj_render_object")).intValue(); }