Move classload tracking to AFTER so PREPARE doesn't fail for first class

This bug would trigger when the *first* class to be classloaded had a
mixin applied to it, since the class tracker would log the classload
before the prepare phase happened.
This commit is contained in:
Mumfrey committed 2019-11-24 14:38:19 +00:00
1 parent 9916ce37c8
commit ce622cdfa6
1 file changed
+5 -5
@@ -91,11 +91,7 @@ public class ModLauncherClassTracker implements IClassProcessor, IClassTracker {
}
}
synchronized (this.loadedClasses) {
this.loadedClasses.add(name);
}
return Phases.NONE;
return Phases.AFTER_ONLY;
}
/* (non-Javadoc)
@@ -106,6 +102,10 @@ public class ModLauncherClassTracker implements IClassProcessor, IClassTracker {
*/
@Override
public boolean processClass(Phase phase, ClassNode classNode, Type classType, String reason) {
synchronized (this.loadedClasses) {
this.loadedClasses.add(classType.getClassName());
}
return false;
}