Fix MinecraftLaunch failing in the case of a package-private main class on Java 8 (#3932)

I don't know of any mod loaders where this is the case, but better be safe than sorry
This commit is contained in:
Josiah Glosson 2025-07-07 10:42:38 -05:00 committed by GitHub
parent bc90c27e27
commit c47bcf665d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -123,6 +123,7 @@ public final class MinecraftLaunch {
setAccessible0.setAccessible(true);
setAccessible0.invoke(object, true);
} catch (NoSuchMethodException e) {
object.setAccessible(true);
}
return object;
}