diff --git a/loader/src/main/java/net/minecraftforge/fml/loading/moddiscovery/AbstractJarFileDependencyLocator.java b/loader/src/main/java/net/minecraftforge/fml/loading/moddiscovery/AbstractJarFileDependencyLocator.java index d715e833e..5fb808fe4 100644 --- a/loader/src/main/java/net/minecraftforge/fml/loading/moddiscovery/AbstractJarFileDependencyLocator.java +++ b/loader/src/main/java/net/minecraftforge/fml/loading/moddiscovery/AbstractJarFileDependencyLocator.java @@ -14,6 +14,7 @@ import java.io.FileNotFoundException; import java.io.InputStream; import java.nio.file.Files; +import java.nio.file.NoSuchFileException; import java.nio.file.Path; import java.util.Optional; @@ -25,8 +26,8 @@ protected Optional loadResourceFromModFile(final IModFile modFile, try { return Optional.of(Files.newInputStream(modFile.findResource(path.toString()))); } - catch (final FileNotFoundException e) { - LOGGER.debug("Failed to load resource {} from {}, it does not contain dependency information.", path, modFile.getFileName()); + catch (final FileNotFoundException | NoSuchFileException e) { + LOGGER.trace("Failed to load resource {} from {}, it does not contain dependency information.", path, modFile.getFileName()); return Optional.empty(); } catch (final Exception e) { diff --git a/loader/src/main/java/net/minecraftforge/fml/loading/moddiscovery/Scanner.java b/loader/src/main/java/net/minecraftforge/fml/loading/moddiscovery/Scanner.java index 88ae4e9c5..5fddd3473 100644 --- a/loader/src/main/java/net/minecraftforge/fml/loading/moddiscovery/Scanner.java +++ b/loader/src/main/java/net/minecraftforge/fml/loading/moddiscovery/Scanner.java @@ -45,14 +45,13 @@ public ModFileScanData scan() { } private void fileVisitor(final Path path, final ModFileScanData result) { - LOGGER.debug(LogMarkers.SCAN,"Scanning {} path {}", fileToScan, path); try (InputStream in = Files.newInputStream(path)){ ModClassVisitor mcv = new ModClassVisitor(); ClassReader cr = new ClassReader(in); cr.accept(mcv, ClassReader.SKIP_CODE | ClassReader.SKIP_DEBUG); mcv.buildData(result.getClasses(), result.getAnnotations()); } catch (IOException | IllegalArgumentException e) { - // mark path bad + LOGGER.error(LogMarkers.SCAN,"Exception scanning {} path {}", fileToScan, path, e); } } }