From 9ec954a3deb73da8b65c716f049dcc6ef3b7b9ab Mon Sep 17 00:00:00 2001 From: LexManos Date: Wed, 9 Aug 2017 12:28:34 -0700 Subject: [PATCH] Fix IOUtils import error caused by server/client libraries desync. --- .../fml/relauncher/CoreModManager.java | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/main/java/net/minecraftforge/fml/relauncher/CoreModManager.java b/src/main/java/net/minecraftforge/fml/relauncher/CoreModManager.java index 82b7bd7a3..bd026f439 100644 --- a/src/main/java/net/minecraftforge/fml/relauncher/CoreModManager.java +++ b/src/main/java/net/minecraftforge/fml/relauncher/CoreModManager.java @@ -19,6 +19,7 @@ package net.minecraftforge.fml.relauncher; +import java.io.Closeable; import java.io.File; import java.io.FileFilter; import java.io.FileOutputStream; @@ -42,8 +43,6 @@ import java.util.jar.Attributes; import java.util.jar.JarEntry; import java.util.jar.JarFile; -import org.apache.commons.compress.utils.IOUtils; - import com.google.common.io.ByteStreams; import com.google.common.io.Files; import net.minecraft.launchwrapper.ITweaker; @@ -402,7 +401,7 @@ public class CoreModManager { } finally { - IOUtils.closeQuietly(jar); + closeQuietly(jar); } // Support things that are mod jars, but not FML mod jars try @@ -457,7 +456,7 @@ public class CoreModManager { } finally { - IOUtils.closeQuietly(jar); + closeQuietly(jar); } } } @@ -788,4 +787,11 @@ public class CoreModManager { } } + private static void closeQuietly(Closeable closeable) { + try { + if (closeable != null) + closeable.close(); + } catch (final IOException ioe){} + } + }