mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 02:37:27 +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
@@ -4,6 +4,8 @@ import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import kamkeel.npcs.controllers.SyncController;
|
||||
import kamkeel.npcs.controllers.sync.handlers.CarpentryRecipeSyncHandler;
|
||||
import kamkeel.npcs.controllers.sync.handlers.WorkbenchRecipeSyncHandler;
|
||||
import kamkeel.npcs.controllers.data.energycharge.EnergyChargeTracker;
|
||||
import kamkeel.npcs.entity.EntityEnergyBarrier;
|
||||
import kamkeel.npcs.entity.EntityEnergyDome;
|
||||
@@ -259,7 +261,7 @@ public class ServerEventsHandler {
|
||||
EnumSyncAction.RELOAD,
|
||||
-1,
|
||||
SyncController.getCurrentRevision(SyncType.WORKBENCH_RECIPES),
|
||||
SyncController.workbenchNBT()
|
||||
WorkbenchRecipeSyncHandler.getInstance().serializeAll()
|
||||
), (EntityPlayerMP) player);
|
||||
}
|
||||
if (block == CustomItems.carpentyBench && event.action == Action.RIGHT_CLICK_BLOCK && !player.worldObj.isRemote) {
|
||||
@@ -268,7 +270,7 @@ public class ServerEventsHandler {
|
||||
EnumSyncAction.RELOAD,
|
||||
-1,
|
||||
SyncController.getCurrentRevision(SyncType.CARPENTRY_RECIPES),
|
||||
SyncController.carpentryNBT()
|
||||
CarpentryRecipeSyncHandler.getInstance().serializeAll()
|
||||
), (EntityPlayerMP) player);
|
||||
}
|
||||
if ((block == CustomItems.banner || block == CustomItems.wallBanner || block == CustomItems.sign) && event.action == Action.RIGHT_CLICK_BLOCK) {
|
||||
|
||||
Reference in new issue
Block a user