From 547c242ff04176e950f2bf24d5eac9cd12094ff3 Mon Sep 17 00:00:00 2001 From: modmuss50 Date: Wed, 24 Aug 2016 22:38:23 +0100 Subject: [PATCH] publify enigma exported jar file --- src/main/java/net/fabricmc/loom/task/MapJarsTask.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/main/java/net/fabricmc/loom/task/MapJarsTask.java b/src/main/java/net/fabricmc/loom/task/MapJarsTask.java index 8d8c6d1..4511985 100644 --- a/src/main/java/net/fabricmc/loom/task/MapJarsTask.java +++ b/src/main/java/net/fabricmc/loom/task/MapJarsTask.java @@ -51,10 +51,18 @@ public class MapJarsTask extends DefaultTask { } ZipUtil.unpack(Constants.MAPPINGS_ZIP, Constants.MAPPINGS_DIR); + File tempFile = new File(Constants.CACHE_FILES, "tempJar.jar"); + if (tempFile.exists()) { + tempFile.delete(); + } + this.getLogger().lifecycle(":remapping jar"); deobfuscator = new Deobfuscator(new JarFile(Constants.MINECRAFT_MERGED_JAR.get(extension))); this.deobfuscator.setMappings(new MappingsEnigmaReader().read(new File(Constants.MAPPINGS_DIR, "pomf-" + extension.version + File.separator + "mappings"))); - this.deobfuscator.writeJar(Constants.MINECRAFT_MAPPED_JAR.get(extension), new ProgressListener()); + this.deobfuscator.writeJar(tempFile, new ProgressListener()); + deobfuscator = new Deobfuscator(new JarFile(tempFile)); + deobfuscator.publifyJar(Constants.MINECRAFT_MAPPED_JAR.get(extension), new ProgressListener()); + tempFile.delete(); File tempAssests = new File(Constants.CACHE_FILES, "tempAssets");