From 0d3d03ab831b2b0063027ae96c43568beddd5425 Mon Sep 17 00:00:00 2001 From: Christian Date: Sat, 9 Mar 2013 15:24:43 -0500 Subject: [PATCH] Fix up some relauncher stuff: the vanilla applet works now, as do other applets. Deobf data is resolveable for them too. --- fml/common/cpw/mods/fml/common/asm/FMLSanityChecker.java | 2 +- .../asm/transformers/deobf/FMLDeobfuscatingRemapper.java | 1 + fml/common/cpw/mods/fml/relauncher/FMLRelauncher.java | 5 +++-- .../cpw/mods/fml/relauncher/RelaunchLibraryManager.java | 2 ++ 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/fml/common/cpw/mods/fml/common/asm/FMLSanityChecker.java b/fml/common/cpw/mods/fml/common/asm/FMLSanityChecker.java index be657fe55..9e806ec33 100644 --- a/fml/common/cpw/mods/fml/common/asm/FMLSanityChecker.java +++ b/fml/common/cpw/mods/fml/common/asm/FMLSanityChecker.java @@ -5,7 +5,7 @@ * are made available under the terms of the GNU Lesser Public License v2.1 * which accompanies this distribution, and is available at * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html - * + * * Contributors: * cpw - implementation */ diff --git a/fml/common/cpw/mods/fml/common/asm/transformers/deobf/FMLDeobfuscatingRemapper.java b/fml/common/cpw/mods/fml/common/asm/transformers/deobf/FMLDeobfuscatingRemapper.java index 401c3e63b..5fee9445e 100644 --- a/fml/common/cpw/mods/fml/common/asm/transformers/deobf/FMLDeobfuscatingRemapper.java +++ b/fml/common/cpw/mods/fml/common/asm/transformers/deobf/FMLDeobfuscatingRemapper.java @@ -76,6 +76,7 @@ public class FMLDeobfuscatingRemapper extends Remapper { { File libDir = new File(mcDir, "lib"); File mapData = new File(libDir, deobfFileName); + mapData = mapData.getCanonicalFile(); ZipFile mapZip = new ZipFile(mapData); ZipEntry classData = mapZip.getEntry("joined.srg"); ZipInputSupplier zis = new ZipInputSupplier(mapZip, classData); diff --git a/fml/common/cpw/mods/fml/relauncher/FMLRelauncher.java b/fml/common/cpw/mods/fml/relauncher/FMLRelauncher.java index e0df83f75..3fe3fe7b5 100644 --- a/fml/common/cpw/mods/fml/relauncher/FMLRelauncher.java +++ b/fml/common/cpw/mods/fml/relauncher/FMLRelauncher.java @@ -5,7 +5,7 @@ * are made available under the terms of the GNU Lesser Public License v2.1 * which accompanies this distribution, and is available at * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html - * + * * Contributors: * cpw - implementation */ @@ -230,7 +230,6 @@ public class FMLRelauncher { showWindow(true); - appletClass = ReflectionHelper.getClass(classLoader, "net.minecraft.client.MinecraftApplet"); if (minecraftApplet.getClass().getClassLoader() == classLoader) { if (popupWindow != null) @@ -241,6 +240,7 @@ public class FMLRelauncher try { newApplet = minecraftApplet; + appletClass = ReflectionHelper.getClass(classLoader, "net.minecraft.client.MinecraftApplet"); ReflectionHelper.findMethod(appletClass, newApplet, new String[] { "fmlInitReentry" }).invoke(newApplet); return; } @@ -260,6 +260,7 @@ public class FMLRelauncher try { + appletClass = ReflectionHelper.getClass(classLoader, "net.minecraft.client.MinecraftApplet"); newApplet = appletClass.newInstance(); Object appletContainer = ReflectionHelper.getPrivateValue(ReflectionHelper.getClass(getClass().getClassLoader(), "java.awt.Component"), minecraftApplet, "parent"); diff --git a/fml/common/cpw/mods/fml/relauncher/RelaunchLibraryManager.java b/fml/common/cpw/mods/fml/relauncher/RelaunchLibraryManager.java index cd45223cb..178f354ed 100644 --- a/fml/common/cpw/mods/fml/relauncher/RelaunchLibraryManager.java +++ b/fml/common/cpw/mods/fml/relauncher/RelaunchLibraryManager.java @@ -292,7 +292,9 @@ public class RelaunchLibraryManager { IFMLCallHook call = (IFMLCallHook) Class.forName(setupClass, true, actualClassLoader).newInstance(); Map callData = new HashMap(); + callData.put("mcLocation", mcDir); callData.put("classLoader", actualClassLoader); + callData.put("coremodLocation", pluginLocations.get(plugin)); callData.put("deobfuscationFileName", FMLInjectionData.debfuscationDataName()); call.injectData(callData); call.call();