Mod class loading bugfix

This commit is contained in:
Anuken
2021-06-11 09:18:59 -04:00
parent 83854169b7
commit 3527acd33e
2 changed files with 5 additions and 2 deletions

View File

@@ -13,7 +13,10 @@ public class ModClassLoader extends ClassLoader{
@Override
protected Class<?> findClass(String name) throws ClassNotFoundException{
//a child may try to delegate class loading to its parent, which is *this class loader* - do not let that happen
if(inChild) throw new ClassNotFoundException(name);
if(inChild){
inChild = false;
throw new ClassNotFoundException(name);
}
ClassNotFoundException last = null;
int size = children.size;