diff --git a/src/main/java/net/fabricmc/loader/impl/discovery/RuntimeModRemapper.java b/src/main/java/net/fabricmc/loader/impl/discovery/RuntimeModRemapper.java index 66e76cfac..2d294b016 100644 --- a/src/main/java/net/fabricmc/loader/impl/discovery/RuntimeModRemapper.java +++ b/src/main/java/net/fabricmc/loader/impl/discovery/RuntimeModRemapper.java @@ -125,8 +125,7 @@ public static void remap(Collection modCandidates, Path tmpDir .renameInvalidLocals(false) .extension(new MixinExtension(remapMixins::contains)) .extraAnalyzeVisitor((mrjVersion, className, next) -> - AccessWidenerClassVisitor.createClassVisitor(FabricLoaderImpl.ASM_VERSION, next, mergedAccessWidener) - ) + AccessWidenerClassVisitor.createClassVisitor(FabricLoaderImpl.ASM_VERSION, next, mergedAccessWidener)) .build(); try { @@ -245,8 +244,15 @@ private static List getRemapClasspath() throws IOException { .collect(Collectors.toList()); } + /** + * Determine whether a jar requires Mixin remapping with tiny remapper. + * + *

This is typically the case when a mod was built without the Mixin annotation processor generating refmaps. + */ private static boolean requiresMixinRemap(Path inputPath) throws IOException, URISyntaxException { final Manifest manifest = ManifestUtil.readManifest(inputPath); + if (manifest == null) return false; + final Attributes mainAttributes = manifest.getMainAttributes(); return REMAP_TYPE_STATIC.equalsIgnoreCase(mainAttributes.getValue(REMAP_TYPE_MANIFEST_KEY));