From a886dbde491d7c453cc4ace640352b1f96a22974 Mon Sep 17 00:00:00 2001 From: LexManos Date: Thu, 6 Jul 2017 21:28:48 -0700 Subject: [PATCH] Quiet down warning for missing translation files. --- .../net/minecraftforge/fml/server/FMLServerHandler.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/net/minecraftforge/fml/server/FMLServerHandler.java b/src/main/java/net/minecraftforge/fml/server/FMLServerHandler.java index 7bcf694b8..4b93a6a1a 100644 --- a/src/main/java/net/minecraftforge/fml/server/FMLServerHandler.java +++ b/src/main/java/net/minecraftforge/fml/server/FMLServerHandler.java @@ -251,7 +251,7 @@ public class FMLServerHandler implements IFMLSidedHandler throw new FileNotFoundException(source.toURI().resolve(langFile).getPath()); stream = new FileInputStream(f); } - else + else if (source.exists()) //Fake sources.. Yay coremods -.- { zip = new ZipFile(source); ZipEntry entry = zip.getEntry(langFile); @@ -259,11 +259,12 @@ public class FMLServerHandler implements IFMLSidedHandler if (entry == null) throw new FileNotFoundException(langFile); stream = zip.getInputStream(entry); } - LanguageMap.inject(stream); + if (stream != null) + LanguageMap.inject(stream); } catch (FileNotFoundException e) { - FMLLog.log.warn("Missing English translation for {}: {}", container.getModId(), e.getMessage(), e); + FMLLog.log.warn("Missing English translation for {}: {}", container.getModId(), e.getMessage()); } catch (IOException e) {