aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0741-Mitigate-effects-of-WorldCreator-keepSpawnLoaded-ret.patch
diff options
context:
space:
mode:
authorLulu13022002 <[email protected]>2024-09-21 21:19:02 +0200
committerGitHub <[email protected]>2024-09-21 21:19:02 +0200
commit1ed64f82704c299d0f7ae9af710579be995af8de (patch)
tree8de9a329fed8373ae5eccc59a9ee9558a53ee3fd /patches/server/0741-Mitigate-effects-of-WorldCreator-keepSpawnLoaded-ret.patch
parent593faf4fc3ad433ef523672b6553124dd99f8ca3 (diff)
downloadPaper-1ed64f82704c299d0f7ae9af710579be995af8de.tar.gz
Paper-1ed64f82704c299d0f7ae9af710579be995af8de.zip
Update launchProjectile API (#11300)
Diffstat (limited to 'patches/server/0741-Mitigate-effects-of-WorldCreator-keepSpawnLoaded-ret.patch')
-rw-r--r--patches/server/0741-Mitigate-effects-of-WorldCreator-keepSpawnLoaded-ret.patch25
1 files changed, 25 insertions, 0 deletions
diff --git a/patches/server/0741-Mitigate-effects-of-WorldCreator-keepSpawnLoaded-ret.patch b/patches/server/0741-Mitigate-effects-of-WorldCreator-keepSpawnLoaded-ret.patch
new file mode 100644
index 0000000000..aaf56a3c17
--- /dev/null
+++ b/patches/server/0741-Mitigate-effects-of-WorldCreator-keepSpawnLoaded-ret.patch
@@ -0,0 +1,25 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Shane Freeder <[email protected]>
+Date: Mon, 19 Sep 2022 00:13:02 +0100
+Subject: [PATCH] Mitigate effects of WorldCreator#keepSpawnLoaded ret type
+ change
+
+TODO: Remove in 1.21?
+
+diff --git a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
+index 157fbe09ab22f3218d9d3f72e8c0a5a3d727eaeb..cae5c865388aca8041233ca52b25ecf68cd37494 100644
+--- a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
++++ b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
+@@ -440,6 +440,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)