From 9bb03be64c2367be45e9f27184a6923ad79382d3 Mon Sep 17 00:00:00 2001 From: FalsePattern Date: Wed, 8 Jan 2025 21:46:12 +0100 Subject: [PATCH] fix URI handling for mixins on windows in dev --- .../com/falsepattern/lib/mixin/IMixinPlugin.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/falsepattern/lib/mixin/IMixinPlugin.java b/src/main/java/com/falsepattern/lib/mixin/IMixinPlugin.java index 7c60b9b..b47f1d9 100644 --- a/src/main/java/com/falsepattern/lib/mixin/IMixinPlugin.java +++ b/src/main/java/com/falsepattern/lib/mixin/IMixinPlugin.java @@ -74,10 +74,10 @@ static File findJarOf(final ITargetedMod mod) { File found = null; for (URL url : Launch.classLoader.getURLs()) { try { - String file = url.getFile(); - Path path = Paths.get(file); + val file = new File(url.toURI()); + Path path = file.toPath(); if (mod.isMatchingJar(path)) { - found = path.toFile(); + found = file; break; } } catch (Exception ignored) { @@ -102,10 +102,10 @@ static Set findJarsOf(IMixinPlugin self, final ITargetedMod mod) { } for (URL url : Launch.classLoader.getURLs()) { try { - String file = url.getFile(); - Path path = Paths.get(file); + val file = new File(url.toURI()); + Path path = file.toPath(); if (mod.isMatchingJar(path)) { - results.add(path.toFile()); + results.add(file); break; } } catch (Exception ignored) {