use of net.minecraftforge.fml.common.MultipleModsErrored in project MinecraftForge by MinecraftForge.
the class FMLClientHandler method beginMinecraftLoading.
/**
* Called to start the whole game off
*
* @param minecraft The minecraft instance being launched
* @param resourcePackList The resource pack list we will populate with mods
* @param resourceManager The resource manager
*/
@SuppressWarnings("unchecked")
public void beginMinecraftLoading(Minecraft minecraft, List<IResourcePack> resourcePackList, IReloadableResourceManager resourceManager, MetadataSerializer metaSerializer) {
detectOptifine();
SplashProgress.start();
client = minecraft;
this.resourcePackList = resourcePackList;
this.metaSerializer = metaSerializer;
this.resourcePackMap = Maps.newHashMap();
if (minecraft.isDemo()) {
FMLLog.severe("DEMO MODE DETECTED, FML will not work. Finishing now.");
haltGame("FML will not run in demo mode", new RuntimeException());
return;
}
List<String> injectedModContainers = FMLCommonHandler.instance().beginLoading(this);
try {
Loader.instance().loadMods(injectedModContainers);
} catch (WrongMinecraftVersionException wrong) {
wrongMC = wrong;
} catch (DuplicateModsFoundException dupes) {
dupesFound = dupes;
} catch (Java8VersionException j8mods) {
j8onlymods = j8mods;
} catch (MissingModsException missing) {
modsMissing = missing;
} catch (ModSortingException sorting) {
modSorting = sorting;
} catch (CustomModLoadingErrorDisplayException custom) {
FMLLog.log(Level.ERROR, custom, "A custom exception was thrown by a mod, the game will now halt");
customError = custom;
} catch (MultipleModsErrored multiple) {
multipleModsErrored = multiple;
} catch (LoaderException le) {
haltGame("There was a severe problem during mod loading that has caused the game to fail", le);
return;
} finally {
client.refreshResources();
}
try {
Loader.instance().preinitializeMods();
} catch (CustomModLoadingErrorDisplayException custom) {
FMLLog.log(Level.ERROR, custom, "A custom exception was thrown by a mod, the game will now halt");
customError = custom;
} catch (LoaderException le) {
haltGame("There was a severe problem during mod loading that has caused the game to fail", le);
return;
}
Map<String, Map<String, String>> sharedModList = (Map<String, Map<String, String>>) Launch.blackboard.get("modList");
if (sharedModList == null) {
sharedModList = Maps.newHashMap();
Launch.blackboard.put("modList", sharedModList);
}
for (ModContainer mc : Loader.instance().getActiveModList()) {
Map<String, String> sharedModDescriptor = mc.getSharedModDescriptor();
if (sharedModDescriptor != null) {
String sharedModId = "fml:" + mc.getModId();
sharedModList.put(sharedModId, sharedModDescriptor);
}
}
}
Aggregations