From 11246870fa2740cb9f0570237d782c5053b8d385 Mon Sep 17 00:00:00 2001 From: Mitchell Skaggs Date: Fri, 7 Jun 2019 03:24:36 -0500 Subject: [PATCH] Replace existing/duplicate nested jars (#106) --- src/main/java/net/fabricmc/loom/util/NestedJars.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/net/fabricmc/loom/util/NestedJars.java b/src/main/java/net/fabricmc/loom/util/NestedJars.java index bfe976b..fd6ecf7 100644 --- a/src/main/java/net/fabricmc/loom/util/NestedJars.java +++ b/src/main/java/net/fabricmc/loom/util/NestedJars.java @@ -61,7 +61,7 @@ public class NestedJars { File modJar = modJarPath.toFile(); - ZipUtil.addEntries(modJar, getContainedJars(project).stream().map(file -> new FileSource("META-INF/jars/" + file.getName(), file)).toArray(ZipEntrySource[]::new)); + ZipUtil.addOrReplaceEntries(modJar, getContainedJars(project).stream().map(file -> new FileSource("META-INF/jars/" + file.getName(), file)).toArray(ZipEntrySource[]::new)); return ZipUtil.transformEntries(modJar, single(new ZipEntryTransformerEntry("fabric.mod.json", new StringZipEntryTransformer() { @Override