Suppress certain mod errors on client load

This commit is contained in:
Anuken 2021-06-25 14:37:32 -04:00
parent 3d6cfcafd0
commit cd2c605036
3 changed files with 11 additions and 2 deletions

Binary file not shown.

View file

@ -149,7 +149,16 @@ public abstract class ClientLauncher extends ApplicationCore implements Platform
}
mods.eachClass(Mod::init);
finished = true;
Events.fire(new ClientLoadEvent());
var event = new ClientLoadEvent();
//a temporary measure for compatibility with certain mods
Events.fireWrap(event.getClass(), event, listener -> {
try{
listener.get(event);
}catch(NoSuchFieldError | NoSuchMethodError error){
Log.err(error);
}
});
clientLoaded = true;
super.resize(graphics.getWidth(), graphics.getHeight());
app.post(() -> app.post(() -> app.post(() -> app.post(() -> {

View file

@ -10,4 +10,4 @@ kapt.include.compile.classpath=false
kotlin.stdlib.default.dependency=false
#needed for android compilation
android.useAndroidX=true
archash=41e8bb990244cd77c49e2b789bf9fc5374a711df
archash=db5cfe90d3eb516401d90c1c1556542de0f4676a