Files
lakebane/src/engine/objects/ItemTemplate.java
T

39 lines
1.6 KiB
Java
Raw Normal View History

2024-02-18 11:00:56 -05:00
// • ▌ ▄ ·. ▄▄▄· ▄▄ • ▪ ▄▄· ▄▄▄▄· ▄▄▄· ▐▄▄▄ ▄▄▄ .
// ·██ ▐███▪▐█ ▀█ ▐█ ▀ ▪██ ▐█ ▌▪▐█ ▀█▪▐█ ▀█ •█▌ ▐█▐▌·
// ▐█ ▌▐▌▐█·▄█▀▀█ ▄█ ▀█▄▐█·██ ▄▄▐█▀▀█▄▄█▀▀█ ▐█▐ ▐▌▐▀▀▀
// ██ ██▌▐█▌▐█ ▪▐▌▐█▄▪▐█▐█▌▐███▌██▄▪▐█▐█ ▪▐▌██▐ █▌▐█▄▄▌
// ▀▀ █▪▀▀▀ ▀ ▀ ·▀▀▀▀ ▀▀▀·▀▀▀ ·▀▀▀▀ ▀ ▀ ▀▀ █▪ ▀▀▀
// Magicbane Emulator Project © 2013 - 2022
// www.magicbane.com
package engine.objects;
2024-02-18 11:39:11 -05:00
import engine.math.Vector3fImmutable;
import org.json.simple.JSONArray;
2024-02-18 11:00:56 -05:00
import org.json.simple.JSONObject;
import java.util.HashMap;
public class ItemTemplate {
2024-02-18 11:39:11 -05:00
// Global template lookup
2024-02-18 11:00:56 -05:00
public static HashMap<Integer, ItemTemplate> itemTemplates = new HashMap<>();
2024-02-18 11:39:11 -05:00
// Template Properties
public String obj_name = "";
public Vector3fImmutable obj_scale = new Vector3fImmutable();
2024-02-18 11:41:24 -05:00
public int obj_render_object;
2024-02-18 11:39:11 -05:00
2024-02-18 11:00:56 -05:00
public ItemTemplate(JSONObject jsonObject) {
2024-02-18 11:39:11 -05:00
obj_name = (String) jsonObject.get("obj_name");
JSONArray scaleData = (JSONArray) jsonObject.get("obj_scale");
2024-02-18 11:49:24 -05:00
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();
2024-02-18 11:00:56 -05:00
}
}