Skip to content

Commit

Permalink
Document the Minecraft.class heuristic
Browse files Browse the repository at this point in the history
  • Loading branch information
marchermans committed Jun 24, 2024
1 parent 2a9bdd2 commit 8023718
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public static boolean isMinecraftClasspathEntry(File entry) {
//Check if the file contains the class:
//net.minecraft.client.Minecraft
//This is a class that is always present in the Minecraft jar.
//This same heuristic is used by FML: https://github.com/neoforged/FancyModLoader/blob/89a32f970ba9137cb74e681af9cdaed0fc3e2085/loader/src/main/java/net/neoforged/fml/loading/targets/CommonUserdevLaunchHandler.java#L24
try(final ZipFile zipFile = new ZipFile(entry)) {
return zipFile.getEntry("net/minecraft/client/Minecraft.class") != null;
} catch (IOException ignored) {
Expand Down

0 comments on commit 8023718

Please sign in to comment.