Allow JSON mod content types from other class loaders

This commit is contained in:
Anuken
2021-02-19 09:45:51 -05:00
parent 1072c310ad
commit b46a5c0bda
4 changed files with 24 additions and 11 deletions

View File

@@ -72,9 +72,8 @@ public class AndroidLauncher extends AndroidApplication{
}
@Override
public Class<?> loadJar(Fi jar, String mainClass) throws Exception{
DexClassLoader loader = new DexClassLoader(jar.file().getPath(), getFilesDir().getPath(), null, getClassLoader());
return Class.forName(mainClass, true, loader);
public ClassLoader loadJar(Fi jar, String mainClass) throws Exception{
return new DexClassLoader(jar.file().getPath(), getFilesDir().getPath(), null, getClassLoader());
}
@Override