mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 21:17:32 +00:00
Save Scripts if the Container has Code or Imported Scripts
This commit is contained in:
1 parent
b7091aa289
commit
9bf31db55c
1 file changed
+2
-2
@@ -117,7 +117,7 @@ public class DataScript implements INpcScriptHandler {
|
||||
for (Map.Entry<EnumScriptType,ScriptContainer> entry : scripts.entrySet()) {
|
||||
NBTTagCompound tagCompound = new NBTTagCompound();
|
||||
ScriptContainer container = entry.getValue();
|
||||
if (container.hasCode()) {
|
||||
if (container.hasCode() || !container.scripts.isEmpty()) {
|
||||
tagCompound.setInteger("Type", entry.getKey().ordinal());
|
||||
container.writeToNBT(tagCompound);
|
||||
list.appendTag(tagCompound);
|
||||
@@ -305,4 +305,4 @@ public class DataScript implements INpcScriptHandler {
|
||||
public Collection<ScriptContainer> getNPCScripts() {
|
||||
return this.scripts.values();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user