mirror of
https://github.com/LegacyModdingMC/UniMix.git
synced 2026-11-19 21:09:34 +00:00
fix minor bug in BeforeInvoke.find logic
This commit is contained in:
1 parent
fd2f2c79c5
commit
53cd1b8951
1 file changed
+6
-4
@@ -158,13 +158,15 @@ public class BeforeInvoke extends InjectionPoint {
|
||||
this.log("{} is searching for an injection point in method with descriptor {}", this.className, desc);
|
||||
|
||||
boolean hasDescriptor = this.target instanceof ITargetSelectorByName && ((ITargetSelectorByName)this.target).getDesc() == null;
|
||||
|
||||
if (!this.find(desc, insns, nodes, this.target, SearchType.STRICT) && hasDescriptor && this.allowPermissive) {
|
||||
boolean found = this.find(desc, insns, nodes, this.target, SearchType.STRICT);
|
||||
|
||||
if (!found && hasDescriptor && this.allowPermissive) {
|
||||
this.logger.warn("STRICT match for {} using \"{}\" in {} returned 0 results, attempting permissive search. "
|
||||
+ "To inhibit permissive search set mixin.env.allowPermissiveMatch=false", this.className, this.target, this.context);
|
||||
return this.find(desc, insns, nodes, this.target, SearchType.PERMISSIVE);
|
||||
found = this.find(desc, insns, nodes, this.target, SearchType.PERMISSIVE);
|
||||
}
|
||||
return true;
|
||||
|
||||
return found;
|
||||
}
|
||||
|
||||
protected boolean find(String desc, InsnList insns, Collection<AbstractInsnNode> nodes, ITargetSelector selector, SearchType searchType) {
|
||||
|
||||
Reference in new issue
Block a user