PaperMC/paper-server/nms-patches/net/minecraft/server/commands/CommandSchedule.patch
CraftBukkit/Spigot d3a23f42c3 Update to Minecraft 1.21.2
By: md_5 <git@md-5.net>
2024-10-23 02:15:00 +11:00

11 lines
909 B
Diff

--- a/net/minecraft/server/commands/CommandSchedule.java
+++ b/net/minecraft/server/commands/CommandSchedule.java
@@ -58,7 +58,7 @@
} else {
long j = commandlistenerwrapper.getLevel().getGameTime() + (long) i;
MinecraftKey minecraftkey = (MinecraftKey) pair.getFirst();
- CustomFunctionCallbackTimerQueue<MinecraftServer> customfunctioncallbacktimerqueue = commandlistenerwrapper.getServer().getWorldData().overworldData().getScheduledEvents();
+ CustomFunctionCallbackTimerQueue<MinecraftServer> customfunctioncallbacktimerqueue = commandlistenerwrapper.getLevel().serverLevelData.overworldData().getScheduledEvents(); // CraftBukkit - SPIGOT-6667: Use world specific function timer
Optional<net.minecraft.commands.functions.CommandFunction<CommandListenerWrapper>> optional = ((Either) pair.getSecond()).left();
String s;