We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e239171 commit 1d20026Copy full SHA for 1d20026
1 file changed
src/main/java/com/falsepattern/lib/mixin/IMixinPlugin.java
@@ -66,17 +66,18 @@ static File findJarOf(final ITargetedMod mod) {
66
e.printStackTrace();
67
}
68
if (result == null) {
69
- try {
70
- result = Arrays.stream(Launch.classLoader.getURLs())
71
- .map(URL::getPath)
72
- .map(Paths::get)
73
- .filter(mod::isMatchingJar)
74
- .map(Path::toFile)
75
- .findFirst()
76
- .orElse(null);
77
- } catch (Exception e) {
78
- e.printStackTrace();
+ File found = null;
+ for (URL url : Launch.classLoader.getURLs()) {
+ try {
+ String file = url.getFile();
+ Path path = Paths.get(file);
+ if (mod.isMatchingJar(path)) {
+ found = path.toFile();
+ break;
+ }
+ } catch (Exception ignored) {}
79
80
+ result = found;
81
82
return result;
83
0 commit comments