mirror of
https://github.com/LegacyModdingMC/UniMix.git
synced 2026-11-22 15:29:45 +00:00
Allow Coerce annotation to coerce args to interfaces too. Update README
This commit is contained in:
1 parent
5c995b21de
commit
4120c80a8a
2 files changed
+8
-1
No files matched your search
@@ -55,6 +55,7 @@ import org.spongepowered.asm.mixin.injection.throwables.InjectionError;
|
||||
import org.spongepowered.asm.mixin.injection.throwables.InvalidInjectionException;
|
||||
import org.spongepowered.asm.mixin.refmap.IMixinContext;
|
||||
import org.spongepowered.asm.mixin.transformer.ClassInfo;
|
||||
import org.spongepowered.asm.mixin.transformer.ClassInfo.Traversal;
|
||||
import org.spongepowered.asm.mixin.transformer.ClassInfo.TypeLookup;
|
||||
import org.spongepowered.asm.util.Bytecode;
|
||||
import org.spongepowered.asm.util.Bytecode.DelegateInitialiser;
|
||||
@@ -421,7 +422,7 @@ public abstract class Injector {
|
||||
* @return true if <tt>from</tt> can be coerced to <tt>to</tt>
|
||||
*/
|
||||
private static boolean canCoerce(ClassInfo from, ClassInfo to) {
|
||||
return from != null && to != null && (to == from || to.hasSuperClass(from));
|
||||
return from != null && to != null && (to == from || to.hasSuperClass(from, Traversal.NONE, true));
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user