Deleagted all ScriptContainer NBT based creation to IScriptUnit.createFromNBT

This commit is contained in:
bigguy345 committed 2026-01-13 22:16:51 +02:00
1 parent fbcda09fe2
commit 73db727c47
14 files changed
+61 -36

No files matched your search

@@ -36,8 +36,8 @@ public class GuiScriptPlayers extends GuiScriptInterface {
super.setGuiData(compound);
} else {
int tab = compound.getInteger("Tab");
ScriptContainer container = new ScriptContainer(script);
container.readFromNBT(compound.getCompoundTag("Script"));
NBTTagCompound scriptCompound = compound.getCompoundTag("Script");
IScriptUnit container = IScriptUnit.createFromNBT(scriptCompound, script);
if (script.getScripts().isEmpty()) {
for (int i = 0; i < compound.getInteger("TotalScripts"); i++) {
script.getScripts().add(new ScriptContainer(script));