Search in sources :

Example 1 with ServerPacketBufferHandlerThread

use of logisticspipes.ticks.ServerPacketBufferHandlerThread in project LogisticsPipes by RS485.

the class LogisticsPipes method init.

@EventHandler
public void init(FMLInitializationEvent event) {
    //Register Network channels
    MainProxy.createChannels();
    RouterManager manager = new RouterManager();
    SimpleServiceLocator.setRouterManager(manager);
    SimpleServiceLocator.setDirectConnectionManager(manager);
    SimpleServiceLocator.setSecurityStationManager(manager);
    SimpleServiceLocator.setLogisticsManager(new LogisticsManager());
    SimpleServiceLocator.setInventoryUtilFactory(new InventoryUtilFactory());
    SimpleServiceLocator.setSpecialConnectionHandler(new SpecialPipeConnection());
    SimpleServiceLocator.setSpecialConnectionHandler(new SpecialTileConnection());
    SimpleServiceLocator.setLogisticsFluidManager(new LogisticsFluidManager());
    SimpleServiceLocator.setSpecialTankHandler(new SpecialTankHandler());
    SimpleServiceLocator.setCraftingPermissionManager(new CraftingPermissionManager());
    SimpleServiceLocator.setMachineProgressProvider(new MachineProgressProvider());
    SimpleServiceLocator.setRoutedItemHelper(new RoutedItemHelper());
    NetworkRegistry.INSTANCE.registerGuiHandler(LogisticsPipes.instance, new GuiHandler());
    FMLCommonHandler.instance().bus().register(new LPTickHandler());
    if (event.getSide().equals(Side.CLIENT)) {
        RenderTickHandler sub = new RenderTickHandler();
        FMLCommonHandler.instance().bus().register(sub);
        MinecraftForge.EVENT_BUS.register(sub);
    }
    FMLCommonHandler.instance().bus().register(new QueuedTasks());
    if (event.getSide() == Side.CLIENT) {
        SimpleServiceLocator.setClientPacketBufferHandlerThread(new ClientPacketBufferHandlerThread());
    }
    SimpleServiceLocator.setServerPacketBufferHandlerThread(new ServerPacketBufferHandlerThread());
    for (int i = 0; i < Configs.MULTI_THREAD_NUMBER; i++) {
        new RoutingTableUpdateThread(i);
    }
    LogisticsEventListener eventListener = new LogisticsEventListener();
    MinecraftForge.EVENT_BUS.register(eventListener);
    FMLCommonHandler.instance().bus().register(eventListener);
    MinecraftForge.EVENT_BUS.register(new LPChatListener());
    LogisticsPipes.textures.registerBlockIcons(null);
    RecipeManager.registerRecipeClasses();
    registerRecipes();
}
Also used : CraftingPermissionManager(logisticspipes.recipes.CraftingPermissionManager) LogisticsManager(logisticspipes.logistics.LogisticsManager) SpecialPipeConnection(logisticspipes.proxy.specialconnection.SpecialPipeConnection) LPTickHandler(logisticspipes.ticks.LPTickHandler) QueuedTasks(logisticspipes.ticks.QueuedTasks) RoutedItemHelper(logisticspipes.utils.RoutedItemHelper) MachineProgressProvider(logisticspipes.proxy.progressprovider.MachineProgressProvider) NewGuiHandler(logisticspipes.network.NewGuiHandler) GuiHandler(logisticspipes.network.GuiHandler) LPChatListener(logisticspipes.commands.chathelper.LPChatListener) LogisticsFluidManager(logisticspipes.logistics.LogisticsFluidManager) InventoryUtilFactory(logisticspipes.utils.InventoryUtilFactory) SpecialTileConnection(logisticspipes.proxy.specialconnection.SpecialTileConnection) RouterManager(logisticspipes.routing.RouterManager) RenderTickHandler(logisticspipes.ticks.RenderTickHandler) SpecialTankHandler(logisticspipes.proxy.specialtankhandler.SpecialTankHandler) ClientPacketBufferHandlerThread(logisticspipes.ticks.ClientPacketBufferHandlerThread) ServerPacketBufferHandlerThread(logisticspipes.ticks.ServerPacketBufferHandlerThread) RoutingTableUpdateThread(logisticspipes.ticks.RoutingTableUpdateThread) EventHandler(cpw.mods.fml.common.Mod.EventHandler)

Aggregations

EventHandler (cpw.mods.fml.common.Mod.EventHandler)1 LPChatListener (logisticspipes.commands.chathelper.LPChatListener)1 LogisticsFluidManager (logisticspipes.logistics.LogisticsFluidManager)1 LogisticsManager (logisticspipes.logistics.LogisticsManager)1 GuiHandler (logisticspipes.network.GuiHandler)1 NewGuiHandler (logisticspipes.network.NewGuiHandler)1 MachineProgressProvider (logisticspipes.proxy.progressprovider.MachineProgressProvider)1 SpecialPipeConnection (logisticspipes.proxy.specialconnection.SpecialPipeConnection)1 SpecialTileConnection (logisticspipes.proxy.specialconnection.SpecialTileConnection)1 SpecialTankHandler (logisticspipes.proxy.specialtankhandler.SpecialTankHandler)1 CraftingPermissionManager (logisticspipes.recipes.CraftingPermissionManager)1 RouterManager (logisticspipes.routing.RouterManager)1 ClientPacketBufferHandlerThread (logisticspipes.ticks.ClientPacketBufferHandlerThread)1 LPTickHandler (logisticspipes.ticks.LPTickHandler)1 QueuedTasks (logisticspipes.ticks.QueuedTasks)1 RenderTickHandler (logisticspipes.ticks.RenderTickHandler)1 RoutingTableUpdateThread (logisticspipes.ticks.RoutingTableUpdateThread)1 ServerPacketBufferHandlerThread (logisticspipes.ticks.ServerPacketBufferHandlerThread)1 InventoryUtilFactory (logisticspipes.utils.InventoryUtilFactory)1 RoutedItemHelper (logisticspipes.utils.RoutedItemHelper)1