Add more advancement API

== AT ==
public net.minecraft.advancements.Advancement decorateName(Lnet/minecraft/advancements/DisplayInfo;)Lnet/minecraft/network/chat/Component;

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
This commit is contained in:
syldium
2021-07-09 18:50:40 +02:00
parent b2715aeeed
commit 864494345a
6 changed files with 152 additions and 6 deletions

View File

@@ -458,6 +458,11 @@ public class Commodore {
super.visitMethodInsn(opcode, owner, name, "()Lcom/destroystokyo/paper/profile/PlayerProfile;", itf);
return;
}
if (owner.equals("org/bukkit/advancement/Advancement") && name.equals("getDisplay") && desc.endsWith(")Lorg/bukkit/advancement/AdvancementDisplay;")) {
super.visitTypeInsn(Opcodes.CHECKCAST, runtimeCbPkgPrefix() + "advancement/CraftAdvancement");
super.visitMethodInsn(Opcodes.INVOKEVIRTUAL, runtimeCbPkgPrefix() + "advancement/CraftAdvancement", "getDisplay0", desc, false);
return;
}
// Paper end
if (modern) {