mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-22 18:59:49 +00:00
Deleagted all ScriptContainer NBT based creation to IScriptUnit.createFromNBT
This commit is contained in:
1 parent
fbcda09fe2
commit
73db727c47
14 files changed
+61
-36
No files matched your search
@@ -35,8 +35,8 @@ public class GuiNPCEventScripts 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));
|
||||
|
||||
@@ -33,8 +33,8 @@ public class GuiScriptAllNPCs 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));
|
||||
|
||||
@@ -88,8 +88,8 @@ public class GuiScriptForge 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));
|
||||
|
||||
@@ -656,8 +656,8 @@ public class GuiScriptInterface extends GuiNPCInterface implements GuiYesNoCallb
|
||||
this.loadLanguagesData(compound);
|
||||
} else {
|
||||
int tab = compound.getInteger("Tab");
|
||||
ScriptContainer container = new ScriptContainer(this.handler);
|
||||
container.readFromNBT(compound.getCompoundTag("Script"));
|
||||
NBTTagCompound scriptCompound = compound.getCompoundTag("Script");
|
||||
IScriptUnit container = IScriptUnit.createFromNBT(scriptCompound, this.handler);
|
||||
this.setHandlerContainer(container);
|
||||
this.initGui();
|
||||
}
|
||||
|
||||
@@ -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));
|
||||
|
||||
Reference in new issue
Block a user