From f61b06f61613fe28074647fc3fae1ad62bcc7278 Mon Sep 17 00:00:00 2001 From: asie Date: Wed, 12 Dec 2018 07:16:01 +0100 Subject: [PATCH] add some debug code for refmap issue --- src/main/java/net/fabricmc/loom/util/MixinRefmapHelper.java | 4 +--- src/main/java/net/fabricmc/loom/util/ModRemapper.java | 4 +++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/net/fabricmc/loom/util/MixinRefmapHelper.java b/src/main/java/net/fabricmc/loom/util/MixinRefmapHelper.java index 4f6bef1..1638e21 100644 --- a/src/main/java/net/fabricmc/loom/util/MixinRefmapHelper.java +++ b/src/main/java/net/fabricmc/loom/util/MixinRefmapHelper.java @@ -54,7 +54,7 @@ public final class MixinRefmapHelper { Set mixinFilenames = findMixins(output, true); if (mixinFilenames.size() > 0) { - ZipUtil.transformEntries( + return ZipUtil.transformEntries( output, mixinFilenames.stream() .map((f) -> new ZipEntryTransformerEntry(f, new StringZipEntryTransformer("UTF-8") { @@ -66,8 +66,6 @@ public final class MixinRefmapHelper { } })).toArray(ZipEntryTransformerEntry[]::new) ); - - return true; } else { return false; } diff --git a/src/main/java/net/fabricmc/loom/util/ModRemapper.java b/src/main/java/net/fabricmc/loom/util/ModRemapper.java index 461b7c5..a947828 100644 --- a/src/main/java/net/fabricmc/loom/util/ModRemapper.java +++ b/src/main/java/net/fabricmc/loom/util/ModRemapper.java @@ -100,7 +100,9 @@ public class ModRemapper { } if (extension.refmapName != null && extension.refmapName.length() > 0) { - MixinRefmapHelper.addRefmapName(extension.refmapName, modJarOutput); + if (MixinRefmapHelper.addRefmapName(extension.refmapName, modJarOutput)) { + project.getLogger().debug("Transformed mixin reference maps in output JAR!"); + } } if (modJar.exists()) {