mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-27 15:33:18 +00:00
MCP deserves lots of credit. So here it is.
This commit is contained in:
1 parent
8006b774bf
commit
9bfe7df373
9 files changed
+52
-11
No files matched your search
@@ -228,6 +228,7 @@ public class FMLCommonHandler
|
||||
{
|
||||
Builder brd = ImmutableList.<String>builder();
|
||||
brd.add(Loader.instance().getMCVersionString());
|
||||
brd.add(Loader.instance().getMCPVersionString());
|
||||
brd.add("FML v"+Loader.instance().getFMLVersionString());
|
||||
String forgeBranding = (String) callForgeMethod("getBrandingVersion");
|
||||
if (!Strings.isNullOrEmpty(forgeBranding))
|
||||
|
||||
@@ -109,7 +109,7 @@ public class Loader
|
||||
private static String rev;
|
||||
private static String build;
|
||||
private static String mccversion;
|
||||
private static String mcsversion;
|
||||
private static String mcpversion;
|
||||
|
||||
/**
|
||||
* The class loader we load the mods into.
|
||||
@@ -138,6 +138,7 @@ public class Loader
|
||||
private File canonicalModsDir;
|
||||
private LoadController modController;
|
||||
private MinecraftDummyContainer minecraft;
|
||||
private MCPDummyContainer mcp;
|
||||
|
||||
private static File minecraftDir;
|
||||
private static List<String> injectedContainers;
|
||||
@@ -159,7 +160,7 @@ public class Loader
|
||||
rev = (String) data[2];
|
||||
build = (String) data[3];
|
||||
mccversion = (String) data[4];
|
||||
mcsversion = (String) data[5];
|
||||
mcpversion = (String) data[5];
|
||||
minecraftDir = (File) data[6];
|
||||
injectedContainers = (List<String>)data[7];
|
||||
}
|
||||
@@ -175,6 +176,7 @@ public class Loader
|
||||
}
|
||||
|
||||
minecraft = new MinecraftDummyContainer(actualMCVersion);
|
||||
mcp = new MCPDummyContainer(MetadataCollection.from(getClass().getResourceAsStream("/mcpmod.info"), "MCP").getMetadataForId("mcp", null));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -304,6 +306,8 @@ public class Loader
|
||||
private ModDiscoverer identifyMods()
|
||||
{
|
||||
FMLLog.fine("Building injected Mod Containers %s", injectedContainers);
|
||||
// Add in the MCP mod container
|
||||
mods.add(new InjectedModContainer(mcp,null));
|
||||
File coremod = new File(minecraftDir,"coremods");
|
||||
for (String cont : injectedContainers)
|
||||
{
|
||||
@@ -733,4 +737,8 @@ public class Loader
|
||||
public boolean hasReachedState(LoaderState state) {
|
||||
return modController.hasReachedState(state);
|
||||
}
|
||||
|
||||
public String getMCPVersionString() {
|
||||
return String.format("MCP v%s", mcpversion);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package cpw.mods.fml.common;
|
||||
|
||||
import com.google.common.eventbus.EventBus;
|
||||
|
||||
public class MCPDummyContainer extends DummyModContainer {
|
||||
public MCPDummyContainer(ModMetadata metadata) {
|
||||
super(metadata);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean registerBus(EventBus bus, LoadController controller) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -16,7 +16,7 @@ public class FMLInjectionData
|
||||
static String rev;
|
||||
static String build;
|
||||
static String mccversion;
|
||||
static String mcsversion;
|
||||
static String mcpversion;
|
||||
public static List<String> containers = new ArrayList<String>();
|
||||
|
||||
static void build(File mcHome, RelaunchClassLoader classLoader)
|
||||
@@ -41,14 +41,14 @@ public class FMLInjectionData
|
||||
minor = properties.getProperty("fmlbuild.minor.number", "missing");
|
||||
rev = properties.getProperty("fmlbuild.revision.number", "missing");
|
||||
build = properties.getProperty("fmlbuild.build.number", "missing");
|
||||
mccversion = properties.getProperty("fmlbuild.mcclientversion", "missing");
|
||||
mcsversion = properties.getProperty("fmlbuild.mcserverversion", "missing");
|
||||
mccversion = properties.getProperty("fmlbuild.mcversion", "missing");
|
||||
mcpversion = properties.getProperty("fmlbuild.mcpversion", "missing");
|
||||
|
||||
|
||||
}
|
||||
|
||||
public static Object[] data()
|
||||
{
|
||||
return new Object[] { major, minor, rev, build, mccversion, mcsversion, minecraftHome, containers };
|
||||
return new Object[] { major, minor, rev, build, mccversion, mcpversion, minecraftHome, containers };
|
||||
}
|
||||
}
|
||||
@@ -147,8 +147,8 @@ public class FMLRelauncher
|
||||
{
|
||||
FMLInjectionData.build(minecraftHome, classLoader);
|
||||
FMLRelaunchLog.minecraftHome = minecraftHome;
|
||||
FMLRelaunchLog.info("Forge Mod Loader version %s.%s.%s.%s for Minecraft client:%s, server:%s loading", FMLInjectionData.major, FMLInjectionData.minor,
|
||||
FMLInjectionData.rev, FMLInjectionData.build, FMLInjectionData.mccversion, FMLInjectionData.mcsversion);
|
||||
FMLRelaunchLog.info("Forge Mod Loader version %s.%s.%s.%s for Minecraft %s loading", FMLInjectionData.major, FMLInjectionData.minor,
|
||||
FMLInjectionData.rev, FMLInjectionData.build, FMLInjectionData.mccversion, FMLInjectionData.mcpversion);
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
[
|
||||
{
|
||||
"modid": "mcp",
|
||||
"name": "Minecraft Coder Pack",
|
||||
"description": "Modding toolkit to decompile and deobfuscate the Minecraft client and server files.",
|
||||
"version": "7.19",
|
||||
"mcversion": "1.4.2",
|
||||
"logoFile": "/mcp.png",
|
||||
"url": "http://mcp.ocean-labs.de/",
|
||||
"updateUrl": "",
|
||||
"authors": ["Searge", "ProfMobius", "IngisKahn", "Fesh0r", "ZeuX", "R4wk", "Others"],
|
||||
"credits": "Made by the MCP team",
|
||||
"parent": "",
|
||||
"screenshots": [],
|
||||
"dependencies": []
|
||||
}
|
||||
]
|
||||
Reference in new issue
Block a user