more mod loader fixes
This commit is contained in:
@@ -26,16 +26,19 @@ public class ModClassLoader extends ClassLoader{
|
|||||||
ClassNotFoundException last = null;
|
ClassNotFoundException last = null;
|
||||||
int size = children.size;
|
int size = children.size;
|
||||||
|
|
||||||
inChild.set(true);
|
|
||||||
//if it doesn't exist in the main class loader, try all the children
|
//if it doesn't exist in the main class loader, try all the children
|
||||||
for(int i = 0; i < size; i++){
|
for(int i = 0; i < size; i++){
|
||||||
try{
|
try{
|
||||||
return children.get(i).loadClass(name);
|
try{
|
||||||
|
inChild.set(true);
|
||||||
|
return children.get(i).loadClass(name);
|
||||||
|
}finally{
|
||||||
|
inChild.set(false);
|
||||||
|
}
|
||||||
}catch(ClassNotFoundException e){
|
}catch(ClassNotFoundException e){
|
||||||
last = e;
|
last = e;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
inChild.set(false);
|
|
||||||
|
|
||||||
throw (last == null ? new ClassNotFoundException(name) : last);
|
throw (last == null ? new ClassNotFoundException(name) : last);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user