Add temporary hard crash when mods error until we can load our error screen.

This commit is contained in:
LexManos 2019-06-16 00:48:38 -07:00
parent 002e29958e
commit 0a8a601877
2 changed files with 9 additions and 1 deletions

View file

@ -78,7 +78,7 @@ public class ForgeI18n {
}
public static String getPattern(final String patternName) {
return i18n.getOrDefault(patternName, patternName);
return i18n == null ? patternName : i18n.getOrDefault(patternName, patternName);
}
public static void loadLanguageData(final Map<String, String> properties) {

View file

@ -65,6 +65,7 @@ public class ClientModLoader
} catch (LoadingFailedException e) {
MinecraftForge.EVENT_BUS.shutdown();
error = e;
TEMP_printLoadingExceptions(e);
}
ResourcePackLoader.loadResourcePacks(defaultResourcePacks);
}
@ -76,6 +77,7 @@ public class ClientModLoader
} catch (LoadingFailedException e) {
MinecraftForge.EVENT_BUS.shutdown();
if (error == null) error = e;
TEMP_printLoadingExceptions(e);
}
loading = false;
mc.gameSettings.loadOptions();
@ -116,4 +118,10 @@ public class ClientModLoader
{
return loading;
}
private static void TEMP_printLoadingExceptions(LoadingFailedException error)
{
error.getErrors().forEach(e -> LOGGER.error("Exception: " + e.formatToString()));
throw new RuntimeException(error);
}
}