Fixed item toss event not being cancellable. Setting a script container's engine doesn't happen on every script call now, reducing lag.

This commit is contained in:
Luis C.M committed 2023-05-29 23:57:45 -05:00
1 parent 2ec6e5b753
commit a0adf0d7bd
9 files changed
+28 -4

No files matched your search

@@ -49,6 +49,10 @@ public class GlobalNPCDataScript implements IScriptHandler {
}
}
this.enabled = compound.getBoolean("ScriptEnabled");
for (ScriptContainer container : this.scripts) {
container.setEngine(this.getLanguage());
}
}
public NBTTagCompound writeToNBT(NBTTagCompound compound) {
compound.setInteger("TotalScripts",this.scripts.size());