// • ▌ ▄ ·. ▄▄▄· ▄▄ • ▪ ▄▄· ▄▄▄▄· ▄▄▄· ▐▄▄▄ ▄▄▄ . // ·██ ▐███▪▐█ ▀█ ▐█ ▀ ▪██ ▐█ ▌▪▐█ ▀█▪▐█ ▀█ •█▌ ▐█▐▌· // ▐█ ▌▐▌▐█·▄█▀▀█ ▄█ ▀█▄▐█·██ ▄▄▐█▀▀█▄▄█▀▀█ ▐█▐ ▐▌▐▀▀▀ // ██ ██▌▐█▌▐█ ▪▐▌▐█▄▪▐█▐█▌▐███▌██▄▪▐█▐█ ▪▐▌██▐ █▌▐█▄▄▌ // ▀▀ █▪▀▀▀ ▀ ▀ ·▀▀▀▀ ▀▀▀·▀▀▀ ·▀▀▀▀ ▀ ▀ ▀▀ █▪ ▀▀▀ // Magicbane Emulator Project © 2013 - 2022 // www.magicbane.com package engine.objects; import engine.math.Vector3fImmutable; import org.json.simple.JSONArray; import org.json.simple.JSONObject; import java.util.HashMap; public class ItemTemplate { // Global template lookup public static HashMap itemTemplates = new HashMap<>(); // Template Properties public String obj_name = ""; public Vector3fImmutable obj_scale = new Vector3fImmutable(); public int obj_render_object; public ItemTemplate(JSONObject jsonObject) { obj_name = (String) jsonObject.get("obj_name"); JSONArray scaleData = (JSONArray) jsonObject.get("obj_scale"); Float tempValue = ((Float) scaleData.get(0)); // 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(); } }