Skip to content

Commit

Permalink
No longer create an empty minecraft jar. (#125)
Browse files Browse the repository at this point in the history
  • Loading branch information
modmuss50 authored Dec 30, 2023
1 parent 2250ca8 commit f75f31e
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions src/main/java/net/fabricmc/installer/client/ClientInstaller.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,8 @@ public static String install(Path mcDir, String gameVersion, LoaderVersion loade
Files.createDirectories(profileDir);
}

/*
This is a fun meme
The vanilla launcher assumes the profile name is the same name as a maven artifact, how ever our profile name is a combination of 2
(mappings and loader). The launcher will also accept any jar with the same name as the profile, it doesnt care if its empty
*/
Path dummyJar = profileDir.resolve(profileName + ".jar");
Files.deleteIfExists(dummyJar);
Files.createFile(dummyJar);
Path profileJar = profileDir.resolve(profileName + ".jar");
Files.deleteIfExists(profileJar);

Json json = FabricService.queryMetaJson(String.format("v2/versions/loader/%s/%s/profile/json", gameVersion, loaderVersion.name));
Files.write(profileJson, json.toString().getBytes(StandardCharsets.UTF_8));
Expand Down

0 comments on commit f75f31e

Please sign in to comment.