mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-21 04:32:15 +00:00
Slight tweak to early loading, to accommodate FMP
This commit is contained in:
1 parent
1164ace8df
commit
dd09da27b5
4 files changed
+13
-14
No files matched your search
@@ -140,11 +140,12 @@ public class FMLCommonHandler
|
||||
return eventBus;
|
||||
}
|
||||
|
||||
public void beginLoading(IFMLSidedHandler handler)
|
||||
public List<String> beginLoading(IFMLSidedHandler handler)
|
||||
{
|
||||
sidedDelegate = handler;
|
||||
MinecraftForge.initialize();
|
||||
// MinecraftForge.registerCrashCallable();
|
||||
return ImmutableList.<String>of();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -26,14 +26,11 @@ import java.util.Map;
|
||||
import java.util.Properties;
|
||||
import java.util.Set;
|
||||
|
||||
import net.minecraft.crash.CrashReport;
|
||||
import net.minecraft.crash.ICrashReportDetail;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.common.capabilities.CapabilityManager;
|
||||
import net.minecraftforge.fml.common.LoaderState.ModState;
|
||||
import net.minecraftforge.fml.common.ModContainer.Disableable;
|
||||
import net.minecraftforge.fml.common.ProgressManager.ProgressBar;
|
||||
import net.minecraftforge.fml.common.discovery.ASMDataTable.ASMData;
|
||||
import net.minecraftforge.fml.common.discovery.ModDiscoverer;
|
||||
import net.minecraftforge.fml.common.event.FMLInterModComms;
|
||||
import net.minecraftforge.fml.common.event.FMLLoadEvent;
|
||||
@@ -338,8 +335,9 @@ public class Loader
|
||||
* Finally, if they are successfully loaded as classes, they are then added
|
||||
* to the available mod list.
|
||||
*/
|
||||
private ModDiscoverer identifyMods()
|
||||
private ModDiscoverer identifyMods(List<String> additionalContainers)
|
||||
{
|
||||
injectedContainers.addAll(additionalContainers);
|
||||
FMLLog.fine("Building injected Mod Containers %s", injectedContainers);
|
||||
// Add in the MCP mod container
|
||||
mods.add(new InjectedModContainer(mcp,new File("minecraft.jar")));
|
||||
@@ -487,8 +485,9 @@ public class Loader
|
||||
* Called from the hook to start mod loading. We trigger the
|
||||
* {@link #identifyMods()} and Constructing, Preinitalization, and Initalization phases here. Finally,
|
||||
* the mod list is frozen completely and is consider immutable from then on.
|
||||
* @param injectedModContainers
|
||||
*/
|
||||
public void loadMods()
|
||||
public void loadMods(List<String> injectedModContainers)
|
||||
{
|
||||
progressBar = ProgressManager.push("Loading", 7);
|
||||
progressBar.step("Constructing Mods");
|
||||
@@ -497,7 +496,7 @@ public class Loader
|
||||
namedMods = Maps.newHashMap();
|
||||
modController = new LoadController(this);
|
||||
modController.transition(LoaderState.LOADING, false);
|
||||
discoverer = identifyMods();
|
||||
discoverer = identifyMods(injectedModContainers);
|
||||
ModAPIManager.INSTANCE.manageAPI(modClassLoader, discoverer);
|
||||
disableRequestedMods();
|
||||
modController.distributeStateMessage(FMLLoadEvent.class);
|
||||
|
||||
Reference in new issue
Block a user