From 1b20201f8d8d8d29ac1141722279739cab40f502 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Fri, 26 Apr 2024 15:32:17 -0400 Subject: [PATCH] MB Dev note added --- src/engine/objects/ItemTemplate.java | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/engine/objects/ItemTemplate.java b/src/engine/objects/ItemTemplate.java index 2afec01c..f0a07cb3 100644 --- a/src/engine/objects/ItemTemplate.java +++ b/src/engine/objects/ItemTemplate.java @@ -20,11 +20,21 @@ import java.util.HashMap; public class ItemTemplate { + // MB Dev Notes: + // This class parses JSON data generated by mbEditor Pro 2.1. + // Cache definitions are loaded for ItemType.ITEM, ItemType,DEED + // and ItemType.RUNE. + // + // Always read never write! + // Use copies of fields to avoid side effects. + // Global template lookup + public static HashMap templates = new HashMap<>(); public int template_id; // Template Properties + public String obj_name; public boolean obj_pickable; public Vector3fImmutable obj_scale; @@ -121,10 +131,8 @@ public class ItemTemplate { public boolean rune_group_is_guild = false; public String rune_dsc; public String rune_fx_txt; - public EnumSet rune_group_tactics = EnumSet.noneOf(mbEnums.MobBehaviourType.class); - ; - public EnumSet rune_group_role_set = EnumSet.noneOf(mbEnums.MobBehaviourType.class); - ; + public final EnumSet rune_group_tactics = EnumSet.noneOf(mbEnums.MobBehaviourType.class); + public final EnumSet rune_group_role_set = EnumSet.noneOf(mbEnums.MobBehaviourType.class); public boolean rune_renderable = false; public int rune_natural_power_attack; public final HashMap rune_sparse_data = new HashMap<>();