From 816f80f862d2f5de6bc9b0ae84cd6df0da341228 Mon Sep 17 00:00:00 2001 From: Linnea Gräf Date: Sat, 31 Aug 2024 11:59:47 +0200 Subject: Add configured compat [no changelog] --- src/main/java/moe/nea/firmament/init/AutoDiscoveryPlugin.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/main/java/moe') 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 classes = Files.walk(classRoot.resolve(getMixinBaseDir()))) { + var path = classRoot.resolve(getMixinBaseDir()); + if (!Files.exists(path)) return; + try (Stream classes = Files.walk(path)) { classes.map(it -> classRoot.relativize(it).toString()) .forEach(this::tryAddMixinClass); } catch (IOException e) { -- cgit