diff options
author | Linnea Gräf <nea@nea.moe> | 2024-08-31 11:59:47 +0200 |
---|---|---|
committer | Linnea Gräf <nea@nea.moe> | 2024-08-31 11:59:47 +0200 |
commit | 816f80f862d2f5de6bc9b0ae84cd6df0da341228 (patch) | |
tree | ee8aaccbaebe5a024549c2530319ed09a02cc4e4 /src/main/java/moe/nea/firmament/init/AutoDiscoveryPlugin.java | |
parent | d2f240ff0ca0d27f417f837e706c781a98c31311 (diff) | |
download | firmament-816f80f862d2f5de6bc9b0ae84cd6df0da341228.tar.gz firmament-816f80f862d2f5de6bc9b0ae84cd6df0da341228.tar.bz2 firmament-816f80f862d2f5de6bc9b0ae84cd6df0da341228.zip |
Add configured compat
[no changelog]
Diffstat (limited to 'src/main/java/moe/nea/firmament/init/AutoDiscoveryPlugin.java')
-rw-r--r-- | src/main/java/moe/nea/firmament/init/AutoDiscoveryPlugin.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/moe/nea/firmament/init/AutoDiscoveryPlugin.java b/src/main/java/moe/nea/firmament/init/AutoDiscoveryPlugin.java index e3644c0..9b891a4 100644 --- a/src/main/java/moe/nea/firmament/init/AutoDiscoveryPlugin.java +++ b/src/main/java/moe/nea/firmament/init/AutoDiscoveryPlugin.java @@ -146,7 +146,9 @@ public class AutoDiscoveryPlugin { */ private void walkDir(Path classRoot) { System.out.println("Trying to find mixins from directory"); - try (Stream<Path> classes = Files.walk(classRoot.resolve(getMixinBaseDir()))) { + var path = classRoot.resolve(getMixinBaseDir()); + if (!Files.exists(path)) return; + try (Stream<Path> classes = Files.walk(path)) { classes.map(it -> classRoot.relativize(it).toString()) .forEach(this::tryAddMixinClass); } catch (IOException e) { |