2022-09-20 02:28:22 +02:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Shane Freeder <theboyetronic@gmail.com>
|
|
|
|
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
|
2024-10-31 23:44:34 +01:00
|
|
|
index f10e7a847e9f57d2a987b118215c0ceab251a5b0..015a2cf3e969e938158f27a04e172c837068437d 100644
|
2022-09-20 02:28:22 +02:00
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
|
2024-10-31 23:44:34 +01:00
|
|
|
@@ -461,6 +461,12 @@ public class Commodore {
|
2024-04-25 20:16:53 +02:00
|
|
|
super.visitMethodInsn(Opcodes.INVOKEVIRTUAL, runtimeCbPkgPrefix() + "advancement/CraftAdvancement", "getDisplay0", desc, false);
|
2022-11-04 23:59:15 +01:00
|
|
|
return;
|
2022-09-20 02:28:22 +02:00
|
|
|
}
|
|
|
|
+ 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
|
2023-08-06 02:21:59 +02:00
|
|
|
|
|
|
|
// Paper start - ItemFactory#getSpawnEgg (paper had original method that returned ItemStack, upstream added identical but returned Material)
|