mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-18 09:09:08 +00:00
SyncController OVERHAUL PHASE #2:
- Created SyncRegistry and SyncHandler - Extracted all 14 SyncType family handling to their own SyncHandler - Rewritten SyncController to accomodate the new framework
This commit is contained in:
1 parent
48281c8d34
commit
6d0655ad7d
34 files changed
+2743
-746
No files matched your search
@@ -1,7 +1,7 @@
|
||||
package noppes.npcs.controllers.data;
|
||||
|
||||
import kamkeel.npcs.controllers.AbilityController;
|
||||
import kamkeel.npcs.controllers.SyncController;
|
||||
import kamkeel.npcs.controllers.sync.handlers.PlayerAbilitySyncHelper;
|
||||
import kamkeel.npcs.controllers.data.ability.Ability;
|
||||
import kamkeel.npcs.controllers.data.ability.enums.AbilityPhase;
|
||||
import kamkeel.npcs.controllers.data.ability.data.ChainedAbility;
|
||||
@@ -496,23 +496,23 @@ public class PlayerAbilityData extends AbstractDataAbilities implements IPlayerA
|
||||
|
||||
/**
|
||||
* Full sync of all ability state to the client.
|
||||
* Delegates to {@link SyncController#syncAbilities(EntityPlayerMP)}.
|
||||
* Delegates to {@link PlayerAbilitySyncHelper#syncAbilities(EntityPlayerMP)}.
|
||||
*/
|
||||
public void syncToClient() {
|
||||
EntityPlayer player = playerData.player;
|
||||
if (player instanceof EntityPlayerMP) {
|
||||
SyncController.syncAbilities((EntityPlayerMP) player);
|
||||
PlayerAbilitySyncHelper.syncAbilities((EntityPlayerMP) player);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Lightweight sync of cooldown state only to the client.
|
||||
* Delegates to {@link SyncController#syncAbilityCooldowns(EntityPlayerMP)}.
|
||||
* Delegates to {@link PlayerAbilitySyncHelper#syncAbilityCooldowns(EntityPlayerMP)}.
|
||||
*/
|
||||
public void syncCooldownToClient() {
|
||||
EntityPlayer player = playerData.player;
|
||||
if (player instanceof EntityPlayerMP) {
|
||||
SyncController.syncAbilityCooldowns((EntityPlayerMP) player);
|
||||
PlayerAbilitySyncHelper.syncAbilityCooldowns((EntityPlayerMP) player);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user