Add temporary hard crash when mods error until we can load our error screen.
This commit is contained in:
parent
002e29958e
commit
0a8a601877
2 changed files with 9 additions and 1 deletions
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue