use of logisticspipes.network.GuiHandler 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();
}
Aggregations