예제 #1
0
 public void preinitializeMods() {
   if (!modController.isInState(LoaderState.PREINITIALIZATION)) {
     FMLLog.warning("There were errors previously. Not beginning mod initialization phase");
     return;
   }
   ObjectHolderRegistry.INSTANCE.findObjectHolders(discoverer.getASMTable());
   ItemStackHolderInjector.INSTANCE.findHolders(discoverer.getASMTable());
   modController.distributeStateMessage(
       LoaderState.PREINITIALIZATION, discoverer.getASMTable(), canonicalConfigDir);
   ObjectHolderRegistry.INSTANCE.applyObjectHolders();
   ItemStackHolderInjector.INSTANCE.inject();
   modController.transition(LoaderState.INITIALIZATION, false);
   progressBar.step("Initializing Minecraft Engine");
 }
예제 #2
0
 public void initializeMods() {
   progressBar.step("Initializing mods Phase 2");
   // Mod controller should be in the initialization state here
   modController.distributeStateMessage(LoaderState.INITIALIZATION);
   progressBar.step("Initializing mods Phase 3");
   modController.transition(LoaderState.POSTINITIALIZATION, false);
   modController.distributeStateMessage(FMLInterModComms.IMCEvent.class);
   ItemStackHolderInjector.INSTANCE.inject();
   modController.distributeStateMessage(LoaderState.POSTINITIALIZATION);
   progressBar.step("Finishing up");
   modController.transition(LoaderState.AVAILABLE, false);
   modController.distributeStateMessage(LoaderState.AVAILABLE);
   GameData.freezeData();
   FMLLog.info(
       "Forge Mod Loader has successfully loaded %d mod%s",
       mods.size(), mods.size() == 1 ? "" : "s");
   progressBar.step("Completing Minecraft initialization");
 }