new PluginLoader().loadPlugins( injectables, event.getAsmData() );
public static void preInit(FMLPreInitializationEvent event) { annotations = event.getAsmData().getAll(Handler.class.getName()); }
@Mod.EventHandler public void preInit(FMLPreInitializationEvent event) { configDir = new File(event.getModConfigurationDirectory(), "bloodmagic"); PLUGINS.addAll(PluginUtil.gatherPlugins(event.getAsmData())); PluginUtil.injectAPIInstances(PluginUtil.gatherInjections(event.getAsmData())); ModTranquilityHandlers.init(); ModDungeons.init(); RITUAL_MANAGER.discover(event.getAsmData()); proxy.preInit(); }
@Override public void preInit(FMLPreInitializationEvent event) { Waila.plugins = event.getAsmData().getAll(WailaPlugin.class.getCanonicalName()); Waila.configDir = new File(event.getModConfigurationDirectory(), "waila"); Waila.themeDir = new File(Waila.configDir, "theme"); ConfigHandler.instance().loadDefaultConfig(event); OverlayConfig.updateColors(); }
@Mod.EventHandler public void onPreInit(FMLPreInitializationEvent event) { if (!LLibrary.LLIBRARY_ROOT.exists()) { LLibrary.LLIBRARY_ROOT.mkdirs(); } for (ModContainer mod : Loader.instance().getModList()) { ConfigHandler.INSTANCE.injectConfig(mod, event.getAsmData()); NetworkHandler.INSTANCE.injectNetworkWrapper(mod, event.getAsmData()); } LLibrary.CONFIG.load(); LLibrary.PROXY.onPreInit(); }
@EventHandler public void preInit(FMLPreInitializationEvent event) { proxy.setup(event.getAsmData()); //Load all the classes proxy.setupConfig(event.getSuggestedConfigurationFile()); proxy.configure(); proxy.load("preInit"); proxy.loadAPI(event.getAsmData()); }
public static void runSetup(FMLPreInitializationEvent event) { ASMDataTable asmDataTable = event.getAsmData(); Map<String, List<IForestryModule>> forestryModules = ForestryPluginUtil.getForestryModules(asmDataTable); internalHandler = new InternalModuleHandler(getInstance()); configureModules(forestryModules); }
for ( final ASMData asmData : event.getAsmData().getAll( ChiselsAndBitsAddon.class.getName() ) ) for ( final ASMData asmData : event.getAsmData().getAll( ChiselsAndBitsIntegration.class.getName() ) )
@Override public void preInit(FMLPreInitializationEvent event) { PacketHandlerClient packetHandler = new PacketHandlerClient(); channel = NetworkRegistry.INSTANCE.newEventDrivenChannel(PacketHandler.CHANNEL_ID); channel.register(packetHandler); Config.preInit(event); initVersionChecker(); ASMDataTable asmDataTable = event.getAsmData(); this.plugins = AnnotatedInstanceUtil.getModPlugins(asmDataTable); IModPlugin vanillaPlugin = getVanillaPlugin(this.plugins); if (vanillaPlugin != null) { this.plugins.remove(vanillaPlugin); this.plugins.add(0, vanillaPlugin); } IModPlugin jeiInternalPlugin = getJeiInternalPlugin(this.plugins); if (jeiInternalPlugin != null) { this.plugins.remove(jeiInternalPlugin); this.plugins.add(jeiInternalPlugin); } MinecraftForge.EVENT_BUS.register(this); }
@EventHandler public void preInit(FMLPreInitializationEvent event) { try { initAPI(); } catch (Exception e) { throw Throwables.propagate(e); } log = event.getModLog(); stateMap = GameData.getBlockStateIDMap(); CapabilityMultipartContainer.register(); CapabilityMultipartTile.register(); MultipartCapabilityHelper.registerCapabilityJoiner(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, JoinedItemHandler::join); MultipartNetworkHandler.init(); MinecraftForge.EVENT_BUS.register(proxy); proxy.preInit(); event.getAsmData().getAll(MCMPAddon.class.getName()).forEach(a -> { try { Class<?> addon = Class.forName(a.getClassName()); if (IMCMPAddon.class.isAssignableFrom(addon)) { addons.add((IMCMPAddon) addon.newInstance()); } } catch (Exception e) { throw Throwables.propagate(e); } }); }
@EventHandler public void preInit(FMLPreInitializationEvent event) { setConfig(event.getSuggestedConfigurationFile()); ModuleManager.loadModules(event.getAsmData(), proxy.isClient()); ModuleManager.loadConfigs(); proxy.load("preInit"); }
@Mod.EventHandler public void preInit(FMLPreInitializationEvent evt) { StaticResolverUtil.useASMDataTable(evt.getAsmData()); PacketHandler.initialize(); NewGuiHandler.initialize(); LogisticsPipes.log = evt.getModLog(); loadClasses(); ProxyManager.load(); Configs.load(); if (certificateError) { LogisticsPipes.log.fatal("Certificate not correct"); LogisticsPipes.log.fatal("This in not a LogisticsPipes version from RS485."); } if (LPConstants.DEV_BUILD) { LogisticsPipes.log.debug("You are using a dev version."); LogisticsPipes.log.debug("While the dev versions contain cutting edge features, they may also contain more bugs."); LogisticsPipes.log.debug("Please report any you find to https://github.com/RS485/LogisticsPipes/issues"); } SimpleServiceLocator.setPipeInformationManager(new PipeInformationManager()); SimpleServiceLocator.setLogisticsFluidManager(new LogisticsFluidManager()); MainProxy.proxy.initModelLoader(); }
@EventHandler public void preInit(FMLPreInitializationEvent event) { logger = event.getModLog(); network = NetworkRegistry.INSTANCE.newSimpleChannel(CHANNEL); ConfigHandler.config = new Configuration(event.getSuggestedConfigurationFile(), true); ConfigHandler.initConfigs(); proxy.registerHandlers(); ExpansionLoader.INSTANCE.loadExpansions(event.getAsmData()); PacketTypeRegistry.INSTANCE.init(); network.registerMessage(PacketQuesting.HandleClient.class, PacketQuesting.class, 0, Side.CLIENT); network.registerMessage(PacketQuesting.HandleServer.class, PacketQuesting.class, 0, Side.SERVER); CapabilityProviderQuestCache.register(); }
BiomeTweaker.proxy.setupScripts(e.getAsmData());
@EventHandler public void preInit(FMLPreInitializationEvent evt) { new TypeVariableHolderHandler().fillAllHolders(evt.getAsmData()); SyncChannelHolder.ensureLoaded(); final File configFile = evt.getSuggestedConfigurationFile(); Configuration config = new Configuration(configFile); ConfigProcessing.processAnnotations(MODID, config, LibConfig.class); MinecraftForge.EVENT_BUS.register(new ConfigChangeListener(MODID, config)); if (config.hasChanged()) config.save(); MinecraftForge.EVENT_BUS.register(DelayedEntityLoadManager.instance); MinecraftForge.EVENT_BUS.register(FakePlayerPool.instance); MinecraftForge.EVENT_BUS.register(DropCapture.instance); MinecraftForge.EVENT_BUS.register(DelayedActionTickHandler.INSTANCE); MinecraftForge.EVENT_BUS.register(ConfigStorage.instance); collector = new ClassSourceCollector(evt.getAsmData()); ItemTextureCapability.register(); final CompoundDataFixer dataFixer = FMLCommonHandler.instance().getDataFixer(); EntityRegistry.registerModEntity(OpenMods.location("block"), EntityBlock.class, "Block", ENTITY_BLOCK_ID, instance, 64, 1, true); EntityBlock.registerFixes(dataFixer, EntityBlock.class); proxy.preInit(); }
@Mod.EventHandler public void onPreInit(FMLPreInitializationEvent event) { GTLog.init(event.getModLog()); NetworkHandler.init(); MetaTileEntityUIFactory.INSTANCE.init(); PlayerInventoryUIFactory.INSTANCE.init(); CoverBehaviorUIFactory.INSTANCE.init(); SimpleCapabilityManager.init(); OreDictUnifier.init(); //first, register primary materials and run material handlers Materials.register(); AnnotatedMaterialHandlerLoader.discoverAndLoadAnnotatedMaterialHandlers(event.getAsmData()); Material.runMaterialHandlers(); //then, run CraftTweaker early material registration scripts if(Loader.isModLoaded(GTValues.MODID_CT)) { GTLog.logger.info("Running early CraftTweaker initialization scripts..."); runEarlyCraftTweakerScripts(); } //freeze material registry before processing items, blocks and fluids Material.freezeRegistry(); MetaBlocks.init(); MetaItems.init(); MetaFluids.init(); MetaTileEntities.init(); MetaEntities.init(); proxy.onPreLoad(); }
@EventHandler public void preInit(FMLPreInitializationEvent event) { Logz.setLogger(event.getModLog()); ConfigurationHandler.init(event.getSuggestedConfigurationFile()); MinecraftForge.EVENT_BUS.register(new ConfigurationHandler()); MinecraftForge.EVENT_BUS.register(PlayerEventHandler.class); MinecraftForge.EVENT_BUS.register(SkyWorldSavedData.class); MinecraftForge.EVENT_BUS.register(WorldSavedDataMachines.class); MinecraftForge.EVENT_BUS.register(RenderTickCounter.class); MinecraftForge.EVENT_BUS.register(BakeryHandler.class); MinecraftForge.EVENT_BUS.register(SkyWorldEvents.class); // Insist on keeping an already registered dimension by registering in pre-registerDimension. DimensionTools.registerDimension(); GuiHandler.init(); AnnotatedInstanceUtil.setAsmData(event.getAsmData()); proxy.preInit(event); }
@Mod.EventHandler public void preInit(FMLPreInitializationEvent event) { // Setup the config file ConfigCore.init(event.getSuggestedConfigurationFile()); asmData = event.getAsmData(); // Register capabilities CapabilityManager.INSTANCE.register(ICostHandler.class, new DefaultStorage<>(), DefaultCostHandler::new); CapabilityManager.INSTANCE.register(IModuleHandler.class, new DefaultStorage<>(), DefaultModuleHandler::new); CapabilityManager.INSTANCE.register(IPeripheral.class, new DefaultStorage<>(), DefaultPeripheral::new); CapabilityManager.INSTANCE.register(IPeripheralHandler.class, new DefaultStorage<>(), DefaultPeripheral::new); CapabilityManager.INSTANCE.register(IVehicleUpgradeHandler.class, new DefaultStorage<>(), DefaultVehicleUpgradeHandler::new); // Various event handlers MinecraftForge.EVENT_BUS.register(this); // Integration modules. Generally just listen to capability events IntegrationComputerCraft.setup(); IntegrationVanilla.setup(); IntegrationForestry.setup(); }
API.deliver(e.getAsmData());