Update Tools.java

This commit is contained in:
Duy Tran Khanh 2021-10-17 20:28:10 +07:00 committed by GitHub
parent 479e39f3af
commit dd177b7e1e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -365,7 +365,6 @@ public final class Tools {
libStr.append(getPatchedFile(actualname));
}
for (String perJar : classpath) {
Log.d(APP_NAME, "ADDED lib = " + perJar);
if (!new File(perJar).exists()) {
Log.d(APP_NAME, "Ignored non-exists file: " + perJar);
continue;
@ -556,6 +555,13 @@ public final class Tools {
List<String> libDir = new ArrayList<String>();
for (DependentLibrary libItem: info.libraries) {
if (libItem.rules != null) {
for (JMinecraftVersionList.Arguments.ArgValue.ArgRules rule : libItem.rules) {
if (rule.action.equals("allow") && rule.os.name.equals("osx")) {
continue;
}
}
}
String[] libInfos = libItem.name.split(":");
libDir.add(Tools.DIR_HOME_LIBRARY + "/" + Tools.artifactToPath(libInfos[0], libInfos[1], libInfos[2]));
}