@@ -264,6 +264,14 @@ public void installMineCraft() {
264264 }
265265
266266 public void extractMMCInstance () {
267+ String fileName = Main .currentInstallerFile .getName ();
268+ if (fileName .endsWith ("-installer.jar" )) {
269+ fileName = fileName .replace ("-installer.jar" , ".jar" );
270+ }
271+ this .extractMMCInstance (fileName );
272+ }
273+
274+ public void extractMMCInstance (String baseFileName ) {
267275 if (this .checkInstaller (true )) {
268276 return ;
269277 }
@@ -272,9 +280,8 @@ public void extractMMCInstance() {
272280 privateDevBuildSlimJarInput = DependencyHelper .getLocalSlimReIndevJarFile ();
273281 }
274282
275- String fileName = Main .currentInstallerFile .getName ();
276283 File instanceDest = new File (Main .currentInstallerFile .getParentFile (),
277- fileName .substring (0 , fileName .length () - 4 ) + "-mmc.zip" );
284+ baseFileName .substring (0 , baseFileName .length () - 4 ) + "-mmc.zip" );
278285 try (ZipOutputStream zipOutputStream = new ZipOutputStream (Files .newOutputStream (instanceDest .toPath ()))) {
279286 zipOutputStream .putNextEntry (new ZipEntry ("libraries/foxloader-" + BuildConfig .FOXLOADER_VERSION + ".jar" ));
280287 copyCloseIn (Files .newInputStream (Main .currentInstallerFile .toPath ()), zipOutputStream );
@@ -287,7 +294,7 @@ public void extractMMCInstance() {
287294 ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream ();
288295 for (String entry : new String []{"patches/com.fox2code.foxloader.json" ,
289296 "patches/net.minecraft.json" , "patches/net.minecraftforge.json" ,
290- "instance.cfg" , "mmc-pack.json" }) {
297+ "patches/org.lwjgl.json" , " instance.cfg" , "mmc-pack.json" }) {
291298 zipOutputStream .putNextEntry (new ZipEntry (entry ));
292299 byteArrayOutputStream .reset ();
293300 IOUtils .copyAndClose (InstallerGUI .class .getResourceAsStream (
0 commit comments