Fix Quest / Dialog Sync in Single player

This commit is contained in:
Kam committed 2024-03-08 02:50:51 -05:00
1 parent 23d2681753
commit fd1500b7ed
5 files changed
+8 -16

No files matched your search

@@ -286,12 +286,12 @@ public class DialogController implements IDialogHandler {
File file2 = new File(dir, dialog.id + ".json");
try {
NBTTagCompound compound = dialog.writeToNBT(new NBTTagCompound());
NBTTagCompound compound = dialog.writeToNBTPartial(new NBTTagCompound());
NBTJsonUtil.SaveFile(file, compound);
if(file2.exists())
file2.delete();
file.renameTo(file2);
Server.sendToAll(EnumPacketClient.SYNC_UPDATE, SyncType.DIALOG, compound, category.id);
Server.sendToAll(EnumPacketClient.SYNC_UPDATE, SyncType.DIALOG, dialog.writeToNBT(new NBTTagCompound()), category.id);
} catch (Exception e) {
LogWriter.except(e);
}