Skip to content

Commit

Permalink
Attempt 2.
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinSVK12 committed Dec 15, 2023
1 parent b0d4cb5 commit 949cd51
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,11 @@ public static void fillVersionFromJar(SimpleClassPath cp, McVersion.Builder buil
}

// version-like String constant used in MinecraftServer.run or another MinecraftServer method
if ((is = cp.getInputStream("net/minecraft/server/MinecraftServer.class")) != null && (fromAnalyzer(is, new MethodConstantVisitor("run"), builder) || fromAnalyzer(is, new MethodConstantRetVisitor("getMinecraftVersion"), builder))) {
if ((is = cp.getInputStream("net/minecraft/server/MinecraftServer.class")) != null && fromAnalyzer(is, new MethodConstantVisitor("run"), builder)) {
return;
}

if ((is = cp.getInputStream("net/minecraft/server/MinecraftServer.class")) != null && fromAnalyzer(is, new MethodConstantRetVisitor("getMinecraftVersion"), builder)) {
return;
}

Expand Down

0 comments on commit 949cd51

Please sign in to comment.