Register Minecraft mod container in FML loader (#3414)

This commit is contained in:
Minecrell 2016-12-17 21:56:10 +01:00 committed by LexManos
parent b203468cde
commit 22db1965c7
2 changed files with 21 additions and 1 deletions

View file

@ -348,6 +348,7 @@ public class Loader
{
injectedContainers.addAll(additionalContainers);
FMLLog.fine("Building injected Mod Containers %s", injectedContainers);
mods.add(minecraft);
// Add in the MCP mod container
mods.add(new InjectedModContainer(mcp,new File("minecraft.jar")));
for (String cont : injectedContainers)

View file

@ -19,8 +19,10 @@
package net.minecraftforge.fml.common;
import java.io.File;
import java.security.cert.Certificate;
import com.google.common.eventbus.EventBus;
import net.minecraftforge.fml.common.versioning.VersionParser;
import net.minecraftforge.fml.common.versioning.VersionRange;
import net.minecraftforge.fml.relauncher.FMLLaunchHandler;
@ -33,12 +35,29 @@ public class MinecraftDummyContainer extends DummyModContainer
public MinecraftDummyContainer(String actualMCVersion)
{
super(new ModMetadata());
getMetadata().modId = "Minecraft";
getMetadata().modId = "minecraft";
getMetadata().name = "Minecraft";
getMetadata().version = actualMCVersion;
staticRange = VersionParser.parseRange("["+actualMCVersion+"]");
}
@Override
public boolean isImmutable()
{
return true;
}
@Override
public File getSource()
{
return new File("minecraft.jar");
}
@Override
public boolean registerBus(EventBus bus, LoadController controller)
{
return true;
}
public VersionRange getStaticVersionRange()
{