mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-17 08:45:11 +00:00
SyncController Fixes
This commit is contained in:
1 parent
5d308b1f56
commit
ee8527f261
6 files changed
+17
-19
No files matched your search
@@ -1,6 +1,6 @@
|
||||
package noppes.npcs.controllers;
|
||||
|
||||
import kamkeel.npcs.controllers.SyncMaster;
|
||||
import kamkeel.npcs.controllers.SyncController;
|
||||
import kamkeel.npcs.network.enums.EnumSyncType;
|
||||
import net.minecraft.nbt.CompressedStreamTools;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
@@ -229,7 +229,7 @@ public class DialogController implements IDialogHandler {
|
||||
dir.mkdirs();
|
||||
}
|
||||
categories.put(category.id, category);
|
||||
SyncMaster.syncUpdate(EnumSyncType.DIALOG_CATEGORY, -1, SyncMaster.updateDialogCat(category));
|
||||
SyncController.syncUpdate(EnumSyncType.DIALOG_CATEGORY, -1, SyncController.updateDialogCat(category));
|
||||
}
|
||||
|
||||
public void removeCategory(int category){
|
||||
@@ -242,7 +242,7 @@ public class DialogController implements IDialogHandler {
|
||||
for(int dia : cat.dialogs.keySet())
|
||||
dialogs.remove(dia);
|
||||
categories.remove(category);
|
||||
SyncMaster.syncRemove(EnumSyncType.DIALOG_CATEGORY, category);
|
||||
SyncController.syncRemove(EnumSyncType.DIALOG_CATEGORY, category);
|
||||
}
|
||||
|
||||
private boolean containsCategoryName(String name) {
|
||||
@@ -290,7 +290,7 @@ public class DialogController implements IDialogHandler {
|
||||
if(file2.exists())
|
||||
file2.delete();
|
||||
file.renameTo(file2);
|
||||
SyncMaster.syncUpdate(EnumSyncType.DIALOG, category.id, dialog.writeToNBT(new NBTTagCompound()));
|
||||
SyncController.syncUpdate(EnumSyncType.DIALOG, category.id, dialog.writeToNBT(new NBTTagCompound()));
|
||||
} catch (Exception e) {
|
||||
LogWriter.except(e);
|
||||
}
|
||||
@@ -304,7 +304,7 @@ public class DialogController implements IDialogHandler {
|
||||
return;
|
||||
category.dialogs.remove(dialog.id);
|
||||
dialogs.remove(dialog.id);
|
||||
SyncMaster.syncRemove(EnumSyncType.DIALOG, dialog.id);
|
||||
SyncController.syncRemove(EnumSyncType.DIALOG, dialog.id);
|
||||
}
|
||||
|
||||
private File getDir(){
|
||||
|
||||
Reference in new issue
Block a user