Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 12:30:06 +01:00
20503beee5
Messing with game time sent to the client isn't worth the trouble whenever it may be used by the client now and in the future for such a small issue. Mojang, plz fix
26 Zeilen
1.4 KiB
Diff
26 Zeilen
1.4 KiB
Diff
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
|
|
index 6fdecd4bed469fffc04d37e3563fb9c7c393761b..1ea5be29f3f06042d7cc278ce82790e4e439a81f 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
|
|
@@ -439,6 +439,12 @@ public class Commodore
|
|
super.visitMethodInsn(Opcodes.INVOKEVIRTUAL, CB_PACKAGE + "/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
|
|
|
|
if ( modern )
|