From 947314787fe5f65157a01a77a7b3594cdbf15c24 Mon Sep 17 00:00:00 2001 From: "Luis C.M" <42545778+c0508383@users.noreply.github.com> Date: Wed, 29 Mar 2023 21:35:16 -0500 Subject: [PATCH] Removed console from NBT data for scripted items --- .../npcs/scripted/item/ScriptCustomItem.java | 27 +------------------ 1 file changed, 1 insertion(+), 26 deletions(-) diff --git a/src/main/java/noppes/npcs/scripted/item/ScriptCustomItem.java b/src/main/java/noppes/npcs/scripted/item/ScriptCustomItem.java index 738d33814..9060412df 100644 --- a/src/main/java/noppes/npcs/scripted/item/ScriptCustomItem.java +++ b/src/main/java/noppes/npcs/scripted/item/ScriptCustomItem.java @@ -17,7 +17,6 @@ import java.util.*; public class ScriptCustomItem extends ScriptItemStack implements IItemCustom, IScriptHandler { public List scripts = new ArrayList(); public List errored = new ArrayList(); - private Map console = new TreeMap(); public String scriptLanguage = "ECMAScript"; public boolean enabled = false; public long lastInited = -1L; @@ -54,7 +53,6 @@ public class ScriptCustomItem extends ScriptItemStack implements IItemCustom, IS compound.setTag("Scripts", NBTTags.NBTScript(this.scripts)); compound.setString("ScriptLanguage", this.scriptLanguage); compound.setBoolean("ScriptEnabled", this.enabled); - compound.setTag("ScriptConsole", NBTTags.NBTLongStringMap(this.console)); return compound; } @@ -63,7 +61,6 @@ public class ScriptCustomItem extends ScriptItemStack implements IItemCustom, IS this.scripts = NBTTags.GetScriptOld(compound.getTagList("Scripts", 10), this); this.scriptLanguage = compound.getString("ScriptLanguage"); this.enabled = compound.getBoolean("ScriptEnabled"); - this.console = NBTTags.GetLongStringMap(compound.getTagList("ScriptConsole", 10)); } } @@ -96,23 +93,6 @@ public class ScriptCustomItem extends ScriptItemStack implements IItemCustom, IS if (script.errored) { this.errored.add(i); } - - Iterator var8 = script.console.entrySet().iterator(); - - boolean saveConsoleData = false; - while(var8.hasNext()) { - Map.Entry entry = (Map.Entry)var8.next(); - if (!this.console.containsKey(entry.getKey())) { - this.console.put(entry.getKey(), " tab " + (i + 1) + ":\n" + (String)entry.getValue()); - saveConsoleData = true; - } - } - - script.console.clear(); - - if (saveConsoleData) { - saveScriptData(); - } } } } @@ -154,16 +134,11 @@ public class ScriptCustomItem extends ScriptItemStack implements IItemCustom, IS return "ScriptedItem"; } - public void setConsoleText(Map map) { - this.console = map; - } - public Map getConsoleText() { - return this.console; + return new TreeMap<>(); } public void clearConsole() { - this.console.clear(); } public String getTexture() {