updated conf, commands patch (missing newline?) and capturing the actual running

MC version and validating it at relaunch time is the correct MC version.
This commit is contained in:
Christian 2012-08-13 00:17:34 -04:00
parent 6f4dbd5376
commit 0c3535ff26
4 changed files with 14 additions and 2 deletions

View File

@ -178,4 +178,4 @@
+def commands_sanity_check():
+ print 'Commands patch applied successfully'
+
+

View File

@ -32,6 +32,7 @@ import java.util.logging.Level;
import java.util.regex.Matcher;
import net.minecraft.server.MinecraftServer;
import net.minecraft.src.CallableMinecraftVersion;
import com.google.common.base.CharMatcher;
import com.google.common.base.Function;
@ -160,6 +161,12 @@ public class Loader
private Loader()
{
modClassLoader = new ModClassLoader(getClass().getClassLoader());
String actualMCVersion = new CallableMinecraftVersion(null).func_71493_a();
if (!mccversion.equals(actualMCVersion))
{
FMLLog.severe("This version of FML is built for Minecraft %s, we have detected Minecraft %s in your minecraft jar file", mccversion, actualMCVersion);
throw new LoaderException();
}
}
/**

View File

@ -248,13 +248,15 @@ public class RelaunchLibraryManager
Class<?> loaderClazz = Class.forName("cpw.mods.fml.common.Loader", true, actualClassLoader);
Method m = loaderClazz.getMethod("injectData", Object[].class);
m.invoke(null, (Object)FMLInjectionData.data());
m = loaderClazz.getMethod("instance");
m.invoke(null);
downloadMonitor.updateProgressString("Minecraft validated, launching...");
downloadBuffer = null;
}
catch (Exception e)
{
// Load in the Loader, make sure he's ready to roll - this will initialize most of the rest of minecraft here
System.out.println("RelaunchLibraryManager.handleLaunch");
System.out.println("A CRITICAL PROBLEM OCCURED INITIALIZING MINECRAFT - LIKELY YOU HAVE AN INCORRECT VERSION FOR THIS FML");
e.printStackTrace();
throw new RuntimeException(e);
}

View File

@ -193,3 +193,6 @@ protected lh.a(Luo;III)Z
protected lh.f()Z
# CallableMinecraftVersion - sanity check the MC version
public b
public b.<init>(La;)V # constructor
# RenderEngine
public ave.k # texturePack