Actually parse the i18n exception message into the super constructor,

so the exception has a useful text message, even in crash logs and
on the server.

Signed-off-by: cpw <cpw+github@weeksfamily.ca>
This commit is contained in:
cpw 2019-04-06 14:22:24 -04:00
parent cdbd842494
commit aa7380acc6
No known key found for this signature in database
GPG key ID: 8EB3DF749553B1B7

View file

@ -52,7 +52,7 @@ public class ModLoadingException extends RuntimeException
private final List<Object> context;
public ModLoadingException(final IModInfo modInfo, final ModLoadingStage errorStage, final String i18nMessage, final Throwable originalException, Object... context) {
super(ForgeI18n.getPattern(i18nMessage), originalException);
super(ForgeI18n.parseMessage(i18nMessage, Streams.concat(Stream.of(modInfo, errorStage, originalException), Stream.of(context)).toArray()), originalException);
this.modInfo = modInfo;
this.errorStage = errorStage;
this.i18nMessage = i18nMessage;