mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-13 05:27:37 +00:00
SyncController common SyncRegistry registration (SyncTypes must be on client & server)
This commit is contained in:
1 parent
0a4bc4126f
commit
67c6cf14d3
2 files changed
+9
-7
No files matched your search
@@ -80,13 +80,7 @@ public class SyncController {
|
||||
* <p>Handler registration order matches the original hard-coded
|
||||
* LOGIN_SYNC_TYPES array for behavioral parity.</p>
|
||||
*/
|
||||
public static void load() {
|
||||
cacheEntries.clear();
|
||||
playerSyncState.clear();
|
||||
SyncRegistry.clear();
|
||||
|
||||
// Register all core handlers in deterministic order
|
||||
// Order matches original LOGIN_SYNC_TYPES for login sync ordering
|
||||
public static void register() {
|
||||
SyncRegistry.register(SyncType.FACTION, new FactionSyncHandler());
|
||||
SyncRegistry.register(SyncType.DIALOG, new DialogSyncHandler());
|
||||
SyncRegistry.register(SyncType.DIALOG_CATEGORY, new DialogCategorySyncHandler());
|
||||
@@ -101,6 +95,11 @@ public class SyncController {
|
||||
SyncRegistry.register(SyncType.MAGIC_CYCLE, new MagicCycleSyncHandler());
|
||||
SyncRegistry.register(SyncType.CUSTOM_ABILITY, new CustomAbilitySyncHandler());
|
||||
SyncRegistry.register(SyncType.CHAINED_ABILITY, new ChainedAbilitySyncHandler());
|
||||
}
|
||||
|
||||
public static void load() {
|
||||
cacheEntries.clear();
|
||||
playerSyncState.clear();
|
||||
|
||||
// Register caches for all cached (login-sync) types
|
||||
// The cache supplier delegates to the handler's serializeAll()
|
||||
|
||||
@@ -317,6 +317,9 @@ public class CustomNpcs {
|
||||
new AddonManager();
|
||||
new AttributeController();
|
||||
new MagicController();
|
||||
|
||||
SyncController.register();
|
||||
|
||||
|
||||
APIRegistry.Instance.register("CNPC+ API", "https://kamkeel.github.io/CustomNPC-Plus/");
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user