mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-18 18:29:05 +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
@@ -251,8 +251,8 @@ public class PacketUtil {
|
||||
data.getScripts().add(new ScriptContainer(data));
|
||||
}
|
||||
NBTTagCompound tabCompound = ByteBufUtils.readNBT(buffer);
|
||||
ScriptContainer script = new ScriptContainer(data);
|
||||
script.readFromNBT(tabCompound);
|
||||
// Use factory method to create correct script unit type based on NBT
|
||||
IScriptUnit script = IScriptUnit.createFromNBT(tabCompound, data);
|
||||
data.getScripts().set(tab, script);
|
||||
} else {
|
||||
NBTTagCompound compound = ByteBufUtils.readNBT(buffer);
|
||||
|
||||
Reference in new issue
Block a user