mirror of
https://github.com/LegacyModdingMC/UniMix.git
synced 2026-11-21 04:32:33 +00:00
Check all injector targets before failing. Fixes matchAll with ctors.
This commit is contained in:
1 parent
0cf2f2f1fa
commit
45e2670e71
1 file changed
+5
-1
@@ -290,7 +290,10 @@ public class CallbackInjector extends Injector {
|
||||
MethodNode callbackMethod = this.methodNode;
|
||||
|
||||
if (!callback.getDescriptor().equals(this.methodNode.desc)) {
|
||||
|
||||
if (this.info.getTargets().size() != 0) {
|
||||
return; // Look for a match in other targets before failing
|
||||
}
|
||||
|
||||
if (callback.canCaptureLocals) {
|
||||
// First check whether there is a compatible method in the class
|
||||
// the method must have an identical name and an appropriate
|
||||
@@ -329,6 +332,7 @@ public class CallbackInjector extends Injector {
|
||||
this.injectCancellationCode(callback);
|
||||
|
||||
callback.inject();
|
||||
this.info.getTargets().clear();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user