bypass getCallerClass in registerAsParallelCapable
All checks were successful
/ Build BaseBand Loader (push) Successful in 1m8s

This commit is contained in:
Daniella / Tove 2024-06-19 20:29:14 +02:00
parent b512f48ad3
commit 31ff41f96e
Signed by: TudbuT
GPG key ID: B3CF345217F202D3

View file

@ -67,7 +67,9 @@ public class CustomClassLoader extends ClassLoader implements Util {
throw new IllegalStateException(MixinService.getService().getClass().toString());
}
registerAsParallelCapable();
Method m = Class.forName("java.lang.ClassLoader.ParallelLoaders").getDeclaredMethod("register", Class.class);
m.setAccessible(true);
m.invoke(null, CustomClassLoader.class);
Field parent = ClassLoader.class.getDeclaredField("parent");
parent.setAccessible(true);