mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-17 01:45:07 +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,7 @@ public class RecipeScript implements INpcScriptHandler {
|
||||
scriptLanguage = compound.getString("ScriptLanguage");
|
||||
enabled = compound.getBoolean("ScriptEnabled");
|
||||
if (compound.hasKey("ScriptContent", Constants.NBT.TAG_COMPOUND)) {
|
||||
container = new ScriptContainer(this);
|
||||
container.readFromNBT(compound.getCompoundTag("ScriptContent"));
|
||||
container = IScriptUnit.createFromNBT(compound.getCompoundTag("ScriptContent"), this);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
@@ -131,9 +130,7 @@ public class RecipeScript implements INpcScriptHandler {
|
||||
this.container = null;
|
||||
if (tab == 0) {
|
||||
NBTTagCompound tabCompound = ByteBufUtils.readNBT(buffer);
|
||||
ScriptContainer script = new ScriptContainer(this);
|
||||
script.readFromNBT(tabCompound);
|
||||
this.container = script;
|
||||
this.container = IScriptUnit.createFromNBT(tabCompound, this);
|
||||
} else {
|
||||
NBTTagCompound compound = ByteBufUtils.readNBT(buffer);
|
||||
this.setLanguage(compound.getString("ScriptLanguage"));
|
||||
|
||||
Reference in new issue
Block a user