mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 07:20:24 +01:00
Mitigate effects of WorldCreator#keepSpawnLoaded ret type change
TODO: Remove in 1.21?
This commit is contained in:
parent
60026267e3
commit
084e7e62ad
1 changed files with 6 additions and 0 deletions
|
@ -463,6 +463,12 @@ public class Commodore {
|
|||
super.visitMethodInsn(Opcodes.INVOKEVIRTUAL, runtimeCbPkgPrefix() + "advancement/CraftAdvancement", "getDisplay0", desc, false);
|
||||
return;
|
||||
}
|
||||
if (owner.equals("org/bukkit/WorldCreator") && name.equals("keepSpawnLoaded") && desc.equals("(Lnet/kyori/adventure/util/TriState;)V")) {
|
||||
super.visitMethodInsn(opcode, owner, name, "(Lnet/kyori/adventure/util/TriState;)Lorg/bukkit/WorldCreator;", itf);
|
||||
// new method has a return, so, make sure we pop it
|
||||
super.visitInsn(Opcodes.POP);
|
||||
return;
|
||||
}
|
||||
// Paper end
|
||||
|
||||
// Paper start - ItemFactory#getSpawnEgg (paper had original method that returned ItemStack, upstream added identical but returned Material)
|
||||
|
|
Loading…
Reference in a new issue