diff --git a/src/engine/objects/ItemTemplate.java b/src/engine/objects/ItemTemplate.java index 84f84568..55f30988 100644 --- a/src/engine/objects/ItemTemplate.java +++ b/src/engine/objects/ItemTemplate.java @@ -24,6 +24,8 @@ public class ItemTemplate { public String obj_name = ""; public Vector3fImmutable obj_scale = new Vector3fImmutable(); public int obj_render_object; + public float combat_health_current; + public float combat_health_full; public HashMap combat_attack_resist = new HashMap<>(); public ItemTemplate(JSONObject jsonObject) { @@ -42,6 +44,11 @@ public class ItemTemplate { obj_render_object = ((Long) jsonObject.get("obj_render_object")).intValue(); + // Reading float values + + combat_health_current = ((Double) jsonObject.get("combat_health_current")).floatValue(); + combat_health_full = ((Double) jsonObject.get("combat_health_full")).floatValue(); + // Reading a hashmap of floats JSONObject resist_json = (JSONObject) jsonObject.get("combat_attack_resist");