Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
KabanFriends committed Mar 14, 2022
1 parent a23ab94 commit 19430cb
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/main/java/net/fabricmc/tinyremapper/AsmClassRemapper.java
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,14 @@ public void visitMethodInsn(int opcode, String owner, String name, String descri
PackageAccessChecker.checkMember(this.owner, owner, name, descriptor, TrMember.MemberType.METHOD, "method instruction", (AsmRemapper) remapper);
}

AsmRemapper asmRemapper = ((AsmRemapper) remapper);
for (ClassInstance checkClass = asmRemapper.getClass(owner); checkClass != null; checkClass = checkClass.getSuperClass()) {
if(checkClass.getMethod(name, descriptor) != null) {
owner = checkClass.getName();
break;
}
}

super.visitMethodInsn(opcode, owner, name, descriptor, isInterface);
}

Expand Down

0 comments on commit 19430cb

Please sign in to comment.