|
|
@ -23,13 +23,14 @@ public class ItemTemplate { |
|
|
|
// Template Properties
|
|
|
|
// Template Properties
|
|
|
|
public String obj_name = ""; |
|
|
|
public String obj_name = ""; |
|
|
|
public Vector3fImmutable obj_scale = new Vector3fImmutable(); |
|
|
|
public Vector3fImmutable obj_scale = new Vector3fImmutable(); |
|
|
|
|
|
|
|
public int obj_render_object; |
|
|
|
|
|
|
|
|
|
|
|
public ItemTemplate(JSONObject jsonObject) { |
|
|
|
public ItemTemplate(JSONObject jsonObject) { |
|
|
|
|
|
|
|
|
|
|
|
obj_name = (String) jsonObject.get("obj_name"); |
|
|
|
obj_name = (String) jsonObject.get("obj_name"); |
|
|
|
JSONArray scaleData = (JSONArray) jsonObject.get("obj_scale"); |
|
|
|
JSONArray scaleData = (JSONArray) jsonObject.get("obj_scale"); |
|
|
|
obj_scale = new Vector3fImmutable(Float.parseFloat((String) scaleData.get(0)), Float.parseFloat((String) scaleData.get(1)), Float.parseFloat((String) scaleData.get(2))); |
|
|
|
obj_scale = new Vector3fImmutable(Float.parseFloat((String) scaleData.get(0)), Float.parseFloat((String) scaleData.get(1)), Float.parseFloat((String) scaleData.get(2))); |
|
|
|
|
|
|
|
obj_render_object = (Integer) jsonObject.get("obj_name"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|