aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/moe
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/moe')
-rw-r--r--src/main/java/moe/nea/firmament/init/AutoDiscoveryPlugin.java4
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) {