From 73cf1257ca8770b01766703f3a5cb130724bdabf Mon Sep 17 00:00:00 2001 From: Nassim Jahnke <nassim@njahnke.dev> Date: Wed, 15 Mar 2023 13:19:54 +0100 Subject: [PATCH] Update adventure to 4.13.0 --- patches/api/0005-Adventure.patch | 6 +- patches/server/0010-Adventure.patch | 126 +++++++++++++++++- patches/server/0011-Paper-command.patch | 64 +++++++-- patches/server/0013-Paper-Plugins.patch | 14 +- patches/server/0014-Timings-v2.patch | 9 +- patches/server/0016-Starlight.patch | 14 +- .../server/0018-Rewrite-chunk-system.patch | 17 +-- ...ient-crashes-server-lists-and-Mojang.patch | 4 +- patches/server/0040-Optimize-explosions.patch | 4 +- ...ckPhysicsEvent-if-a-plugin-has-a-lis.patch | 4 +- ...-possibility-for-getServer-singleton.patch | 4 +- ...oleAppender-for-console-improvements.patch | 4 +- .../0279-Optimize-World-Time-Updates.patch | 4 +- ...ault-permission-message-configurable.patch | 6 +- .../0351-Add-debug-for-sync-chunk-loads.patch | 12 +- ...-Add-tick-times-API-and-mspt-command.patch | 6 +- .../0375-Improved-Watchdog-Support.patch | 6 +- ...ld-Difficulty-Remembering-Difficulty.patch | 8 +- .../server/0428-Paper-dumpitem-command.patch | 12 +- .../0473-Cache-block-data-strings.patch | 4 +- ...-non-whitelisted-player-when-white-l.patch | 4 +- ...5-Added-ServerResourcesReloadedEvent.patch | 6 +- patches/server/0560-EntityMoveEvent.patch | 6 +- ...pport-for-hex-color-codes-in-console.patch | 4 +- ...telist-use-configurable-kick-message.patch | 4 +- .../0629-Add-PlayerKickEvent-causes.patch | 6 +- ...aper-mobcaps-and-paper-playermobcaps.patch | 16 +-- .../0700-Execute-chunk-tasks-mid-tick.patch | 4 +- patches/server/0804-Custom-Potion-Mixes.patch | 6 +- ...n-on-world-create-while-being-ticked.patch | 10 +- ...0921-Add-paper-dumplisteners-command.patch | 12 +- 31 files changed, 258 insertions(+), 148 deletions(-) diff --git a/patches/api/0005-Adventure.patch b/patches/api/0005-Adventure.patch index 23e70c0122..fd64d35c28 100644 --- a/patches/api/0005-Adventure.patch +++ b/patches/api/0005-Adventure.patch @@ -7,14 +7,14 @@ Co-authored-by: zml <zml@stellardrift.ca> Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com> diff --git a/build.gradle.kts b/build.gradle.kts -index 464a209dbf52ebdfa287a553778a37c382a5405c..9e003c1eb0d4e19ecfa7637fc41ec055c5ffdfdf 100644 +index 464a209dbf52ebdfa287a553778a37c382a5405c..b7aa72ae9a8b1f39e7bb355d4c6b3bf4bfaa030b 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -8,11 +8,24 @@ java { withJavadocJar() } -+val adventureVersion = "4.12.0" ++val adventureVersion = "4.13.0" +val apiAndDocs: Configuration by configurations.creating { + attributes { + attribute(Category.CATEGORY_ATTRIBUTE, objects.named(Category.DOCUMENTATION)) @@ -2499,7 +2499,7 @@ index c60e1fc1cad1b9889a508602df84840723b7b966..baf0887ec941533f8007f2c7f7ab78f1 throw new UnsupportedOperationException("Not supported yet."); } diff --git a/src/main/java/org/bukkit/entity/TextDisplay.java b/src/main/java/org/bukkit/entity/TextDisplay.java -index 766d6f001d4bc59cbe13d67f539bcae3fce67144..eff2ee74f4257b18dfc677e16e9ddf970e09a056 100644 +index a0ee539a46bcdf49ea750318374d393e9ef3ce68..112fa7a324bc1e49a4ebb0c8f46866a3c02ab984 100644 --- a/src/main/java/org/bukkit/entity/TextDisplay.java +++ b/src/main/java/org/bukkit/entity/TextDisplay.java @@ -13,17 +13,37 @@ public interface TextDisplay extends Display { diff --git a/patches/server/0010-Adventure.patch b/patches/server/0010-Adventure.patch index 513c5e5181..247dcf9898 100644 --- a/patches/server/0010-Adventure.patch +++ b/patches/server/0010-Adventure.patch @@ -1169,6 +1169,109 @@ index 0000000000000000000000000000000000000000..2a08e0461db4e699b7e6a1558a4419c8 + return net.minecraft.network.chat.Component.Serializer.fromJson(GsonComponentSerializer.gson().serializer().toJsonTree(component)); + } +} +diff --git a/src/main/java/io/papermc/paper/adventure/providers/ClickCallbackProviderImpl.java b/src/main/java/io/papermc/paper/adventure/providers/ClickCallbackProviderImpl.java +new file mode 100644 +index 0000000000000000000000000000000000000000..04bc65019b7abf331feb1b6c5475466b9d7ad075 +--- /dev/null ++++ b/src/main/java/io/papermc/paper/adventure/providers/ClickCallbackProviderImpl.java +@@ -0,0 +1,97 @@ ++package io.papermc.paper.adventure.providers; ++ ++import it.unimi.dsi.fastutil.longs.Long2ObjectMap; ++import it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap; ++import net.kyori.adventure.audience.Audience; ++import net.kyori.adventure.text.event.ClickCallback; ++import net.kyori.adventure.text.event.ClickEvent; ++import org.jetbrains.annotations.NotNull; ++ ++import java.util.Queue; ++import java.util.concurrent.ConcurrentLinkedQueue; ++import java.util.concurrent.atomic.AtomicLong; ++ ++@SuppressWarnings("UnstableApiUsage") // permitted provider ++public class ClickCallbackProviderImpl implements ClickCallback.Provider { ++ ++ public static final CallbackManager CALLBACK_MANAGER = new CallbackManager(); ++ ++ @Override ++ public @NotNull ClickEvent create(final @NotNull ClickCallback<Audience> callback, final ClickCallback.@NotNull Options options) { ++ return ClickEvent.runCommand("/paper callback " + CALLBACK_MANAGER.addCallback(callback, options)); ++ } ++ ++ public static final class CallbackManager { ++ ++ private final Long2ObjectMap<StoredCallback> callbacks = new Long2ObjectOpenHashMap<>(); ++ private final Queue<StoredCallback> queue = new ConcurrentLinkedQueue<>(); ++ private final AtomicLong current = new AtomicLong(); ++ ++ private CallbackManager() { ++ } ++ ++ public long addCallback(final @NotNull ClickCallback<Audience> callback, final ClickCallback.@NotNull Options options) { ++ final long id = current.getAndIncrement(); ++ this.queue.add(new StoredCallback(callback, options, id)); ++ return id; ++ } ++ ++ public void handleQueue(final int currentTick) { ++ // Evict expired entries ++ if (currentTick % 100 == 0) { ++ this.callbacks.values().removeIf(callback -> !callback.valid()); ++ } ++ ++ // Add entries from queue ++ StoredCallback callback; ++ while ((callback = this.queue.poll()) != null) { ++ this.callbacks.put(callback.id(), callback); ++ } ++ } ++ ++ public void runCallback(final @NotNull Audience audience, final long id) { ++ final StoredCallback callback = this.callbacks.get(id); ++ if (callback != null && callback.valid()) { //TODO Message if expired/invalid? ++ callback.takeUse(); ++ callback.callback.accept(audience); ++ } ++ } ++ } ++ ++ private static final class StoredCallback { ++ private final long startedAt = System.nanoTime(); ++ private final ClickCallback<Audience> callback; ++ private final long lifetime; ++ private final long id; ++ private int remainingUses; ++ ++ private StoredCallback(final @NotNull ClickCallback<Audience> callback, final ClickCallback.@NotNull Options options, final long id) { ++ this.callback = callback; ++ this.lifetime = options.lifetime().toNanos(); ++ this.remainingUses = options.uses(); ++ this.id = id; ++ } ++ ++ public void takeUse() { ++ if (this.remainingUses != ClickCallback.UNLIMITED_USES) { ++ this.remainingUses--; ++ } ++ } ++ ++ public boolean hasRemainingUses() { ++ return this.remainingUses == ClickCallback.UNLIMITED_USES || this.remainingUses > 0; ++ } ++ ++ public boolean expired() { ++ return System.nanoTime() - this.startedAt >= this.lifetime; ++ } ++ ++ public boolean valid() { ++ return hasRemainingUses() && !expired(); ++ } ++ ++ public long id() { ++ return this.id; ++ } ++ } ++} diff --git a/src/main/java/io/papermc/paper/adventure/providers/ComponentLoggerProviderImpl.java b/src/main/java/io/papermc/paper/adventure/providers/ComponentLoggerProviderImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..c3631efda9c7fa531a8a9f18fbee7b5f8655382b @@ -2012,7 +2115,7 @@ index 5f051cb22ae77f4d8994b07ac5b963bd0ff05673..7952635a963e28cb670c8f4869664103 list.forEach((loader) -> { Registry<?> registry = loader.getFirst(); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 5725631835ea68802c75934cd85d5c1b1a78d358..47ec7832579c2f5d473301e7127cae47da630c03 100644 +index 5725631835ea68802c75934cd85d5c1b1a78d358..0b859ebcc2c53e74615feca5c864136586c1523b 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -244,6 +244,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -2023,7 +2126,15 @@ index 5725631835ea68802c75934cd85d5c1b1a78d358..47ec7832579c2f5d473301e7127cae47 private int playerIdleTimeout; public final long[] tickTimes; @Nullable -@@ -1631,8 +1632,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa +@@ -1263,6 +1264,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa + SpigotTimings.schedulerTimer.startTiming(); // Spigot + this.server.getScheduler().mainThreadHeartbeat(this.tickCount); // CraftBukkit + SpigotTimings.schedulerTimer.stopTiming(); // Spigot ++ io.papermc.paper.adventure.providers.ClickCallbackProviderImpl.CALLBACK_MANAGER.handleQueue(this.tickCount); // Paper + this.profiler.push("commandFunctions"); + SpigotTimings.commandFunctionsTimer.startTiming(); // Spigot + this.getFunctions().tick(); +@@ -1631,8 +1633,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa return this.motd; } @@ -2042,7 +2153,7 @@ index 5725631835ea68802c75934cd85d5c1b1a78d358..47ec7832579c2f5d473301e7127cae47 } public boolean isStopped() { -@@ -2363,27 +2374,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa +@@ -2363,27 +2375,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa // CraftBukkit start public final java.util.concurrent.ExecutorService chatExecutor = java.util.concurrent.Executors.newCachedThreadPool( @@ -3839,7 +3950,7 @@ index 1bed95ee1af2354b710361f737bffa2ff9ec4f97..1b4277655bded7e560ef4ba8477dd0d7 @Override public int getLineWidth() { diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 09ce43bf982f2da83fc9b10039109f8b76bd6ad3..7bcbd1aac8826c76b74ef0e517b9d94e615df347 100644 +index 131be7a463e74178622482a74bd42917d775495c..15f16844bf151f8244d7333faec215f1092e2147 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -820,9 +820,9 @@ public class CraftEventFactory { @@ -4692,6 +4803,13 @@ index 838d5b877c01be3ef353f434d98e27b46c0a3fb4..5c4c0ba05f10d2d83b22d3e86805cfa8 HashSet<Player> reference = new HashSet<Player>(players.size()); for (ServerPlayer player : players) { reference.add(player.getBukkitEntity()); +diff --git a/src/main/resources/META-INF/services/net.kyori.adventure.text.event.ClickCallback$Provider b/src/main/resources/META-INF/services/net.kyori.adventure.text.event.ClickCallback$Provider +new file mode 100644 +index 0000000000000000000000000000000000000000..845711e03c41c6b6a03d541f1c43d37b24c11733 +--- /dev/null ++++ b/src/main/resources/META-INF/services/net.kyori.adventure.text.event.ClickCallback$Provider +@@ -0,0 +1 @@ ++io.papermc.paper.adventure.providers.ClickCallbackProviderImpl diff --git a/src/main/resources/META-INF/services/net.kyori.adventure.text.logger.slf4j.ComponentLoggerProvider b/src/main/resources/META-INF/services/net.kyori.adventure.text.logger.slf4j.ComponentLoggerProvider new file mode 100644 index 0000000000000000000000000000000000000000..399bde6e57cd82b50d3ebe0f51a3958fa2d52d43 diff --git a/patches/server/0011-Paper-command.patch b/patches/server/0011-Paper-command.patch index 198c0c0224..c586cc5a75 100644 --- a/patches/server/0011-Paper-command.patch +++ b/patches/server/0011-Paper-command.patch @@ -81,16 +81,13 @@ index 0000000000000000000000000000000000000000..953c30500892e5f0c55b8597bc708ea8 +} diff --git a/src/main/java/io/papermc/paper/command/PaperCommand.java b/src/main/java/io/papermc/paper/command/PaperCommand.java new file mode 100644 -index 0000000000000000000000000000000000000000..b3a58bf4b654e336826dc04da9e2f80ff8b9a9a7 +index 0000000000000000000000000000000000000000..e7931b6cb2a46d07ac017f620b807e3474dc481e --- /dev/null +++ b/src/main/java/io/papermc/paper/command/PaperCommand.java -@@ -0,0 +1,145 @@ +@@ -0,0 +1,144 @@ +package io.papermc.paper.command; + -+import io.papermc.paper.command.subcommands.EntityCommand; -+import io.papermc.paper.command.subcommands.HeapDumpCommand; -+import io.papermc.paper.command.subcommands.ReloadCommand; -+import io.papermc.paper.command.subcommands.VersionCommand; ++import io.papermc.paper.command.subcommands.*; +import it.unimi.dsi.fastutil.Pair; +import java.util.ArrayList; +import java.util.Arrays; @@ -127,11 +124,13 @@ index 0000000000000000000000000000000000000000..b3a58bf4b654e336826dc04da9e2f80f + commands.put(Set.of("entity"), new EntityCommand()); + commands.put(Set.of("reload"), new ReloadCommand()); + commands.put(Set.of("version"), new VersionCommand()); ++ commands.put(Set.of("callback"), new CallbackCommand()); + + return commands.entrySet().stream() + .flatMap(entry -> entry.getKey().stream().map(s -> Map.entry(s, entry.getValue()))) + .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)); + }); ++ private static final Set<String> COMPLETABLE_SUBCOMMANDS = SUBCOMMANDS.entrySet().stream().filter(entry -> entry.getValue().tabCompletes()).map(Map.Entry::getKey).collect(Collectors.toSet()); + // alias -> subcommand label + private static final Map<String, String> ALIASES = Util.make(() -> { + final Map<String, Set<String>> aliases = new HashMap<>(); @@ -173,7 +172,7 @@ index 0000000000000000000000000000000000000000..b3a58bf4b654e336826dc04da9e2f80f + final @Nullable Location location + ) throws IllegalArgumentException { + if (args.length <= 1) { -+ return CommandUtil.getListMatchingLast(sender, args, SUBCOMMANDS.keySet()); ++ return CommandUtil.getListMatchingLast(sender, args, COMPLETABLE_SUBCOMMANDS); + } + + final @Nullable Pair<String, PaperSubcommand> subCommand = resolveCommand(args[0]); @@ -265,10 +264,10 @@ index 0000000000000000000000000000000000000000..6a00f3d38da8107825ab1d405f337fd0 +} diff --git a/src/main/java/io/papermc/paper/command/PaperSubcommand.java b/src/main/java/io/papermc/paper/command/PaperSubcommand.java new file mode 100644 -index 0000000000000000000000000000000000000000..6ff5d42a866d2752c73a766815aa190b2b0dc36f +index 0000000000000000000000000000000000000000..7e9e0ff8639be135bf8575e375cbada5b57164e1 --- /dev/null +++ b/src/main/java/io/papermc/paper/command/PaperSubcommand.java -@@ -0,0 +1,16 @@ +@@ -0,0 +1,20 @@ +package io.papermc.paper.command; + +import java.util.Collections; @@ -284,6 +283,53 @@ index 0000000000000000000000000000000000000000..6ff5d42a866d2752c73a766815aa190b + default List<String> tabComplete(final CommandSender sender, final String subCommand, final String[] args) { + return Collections.emptyList(); + } ++ ++ default boolean tabCompletes() { ++ return true; ++ } ++} +diff --git a/src/main/java/io/papermc/paper/command/subcommands/CallbackCommand.java b/src/main/java/io/papermc/paper/command/subcommands/CallbackCommand.java +new file mode 100644 +index 0000000000000000000000000000000000000000..62e121e703716b38162020d34467855a02443d88 +--- /dev/null ++++ b/src/main/java/io/papermc/paper/command/subcommands/CallbackCommand.java +@@ -0,0 +1,37 @@ ++package io.papermc.paper.command.subcommands; ++ ++import io.papermc.paper.adventure.providers.ClickCallbackProviderImpl; ++import io.papermc.paper.command.PaperSubcommand; ++import net.kyori.adventure.text.Component; ++import net.kyori.adventure.text.event.ClickCallback; ++import net.kyori.adventure.text.event.ClickEvent; ++import org.bukkit.command.CommandSender; ++import org.checkerframework.checker.nullness.qual.NonNull; ++import org.checkerframework.framework.qual.DefaultQualifier; ++ ++import java.time.Duration; ++ ++@DefaultQualifier(NonNull.class) ++public final class CallbackCommand implements PaperSubcommand { ++ @Override ++ public boolean execute(final CommandSender sender, final String subCommand, final String[] args) { ++ if (args.length != 1) { ++ return false; ++ } ++ ++ final long id; ++ try { ++ id = Long.parseLong(args[0]); ++ } catch (final NumberFormatException ignored) { ++ return false; ++ } ++ ++ ClickCallbackProviderImpl.CALLBACK_MANAGER.runCallback(sender, id); ++ return true; ++ } ++ ++ @Override ++ public boolean tabCompletes() { ++ return false; ++ } +} diff --git a/src/main/java/io/papermc/paper/command/subcommands/EntityCommand.java b/src/main/java/io/papermc/paper/command/subcommands/EntityCommand.java new file mode 100644 diff --git a/patches/server/0013-Paper-Plugins.patch b/patches/server/0013-Paper-Plugins.patch index 2fea05bdd6..0a8841e3d6 100644 --- a/patches/server/0013-Paper-Plugins.patch +++ b/patches/server/0013-Paper-Plugins.patch @@ -5,21 +5,13 @@ Subject: [PATCH] Paper Plugins diff --git a/src/main/java/io/papermc/paper/command/PaperCommand.java b/src/main/java/io/papermc/paper/command/PaperCommand.java -index b3a58bf4b654e336826dc04da9e2f80ff8b9a9a7..156334e3876d966fedc91d18da29f562395ab182 100644 +index e7931b6cb2a46d07ac017f620b807e3474dc481e..16fdfda717300a3168c27526470f83ce6239e95f 100644 --- a/src/main/java/io/papermc/paper/command/PaperCommand.java +++ b/src/main/java/io/papermc/paper/command/PaperCommand.java -@@ -4,6 +4,7 @@ import io.papermc.paper.command.subcommands.EntityCommand; - import io.papermc.paper.command.subcommands.HeapDumpCommand; - import io.papermc.paper.command.subcommands.ReloadCommand; - import io.papermc.paper.command.subcommands.VersionCommand; -+import io.papermc.paper.command.subcommands.DumpPluginsCommand; - import it.unimi.dsi.fastutil.Pair; - import java.util.ArrayList; - import java.util.Arrays; -@@ -40,6 +41,7 @@ public final class PaperCommand extends Command { - commands.put(Set.of("entity"), new EntityCommand()); +@@ -38,6 +38,7 @@ public final class PaperCommand extends Command { commands.put(Set.of("reload"), new ReloadCommand()); commands.put(Set.of("version"), new VersionCommand()); + commands.put(Set.of("callback"), new CallbackCommand()); + commands.put(Set.of("dumpplugins"), new DumpPluginsCommand()); return commands.entrySet().stream() diff --git a/patches/server/0014-Timings-v2.patch b/patches/server/0014-Timings-v2.patch index f9c26cc9fd..252a7b447e 100644 --- a/patches/server/0014-Timings-v2.patch +++ b/patches/server/0014-Timings-v2.patch @@ -729,7 +729,7 @@ index fc4dcd801480fe6d89a985de411baa9a3a66f6ef..4a1148a76020089caf01f888f87afdbb } catch (Exception exception) { if (listener.shouldPropagateHandlingExceptions()) { diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 47ec7832579c2f5d473301e7127cae47da630c03..013556d54894dc2914b8cda7a70b9ea142b6668f 100644 +index 0b859ebcc2c53e74615feca5c864136586c1523b..027200b4702d3379ae2f987b69f390c0dbdf1d9a 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -189,7 +189,7 @@ import org.bukkit.event.player.AsyncPlayerChatPreviewEvent; @@ -833,7 +833,7 @@ index 47ec7832579c2f5d473301e7127cae47da630c03..013556d54894dc2914b8cda7a70b9ea1 } private ServerStatus buildServerStatus() { -@@ -1261,25 +1284,25 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa +@@ -1261,26 +1284,26 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa } public void tickChildren(BooleanSupplier shouldKeepTicking) { @@ -842,6 +842,7 @@ index 47ec7832579c2f5d473301e7127cae47da630c03..013556d54894dc2914b8cda7a70b9ea1 this.server.getScheduler().mainThreadHeartbeat(this.tickCount); // CraftBukkit - SpigotTimings.schedulerTimer.stopTiming(); // Spigot + MinecraftTimings.bukkitSchedulerTimer.stopTiming(); // Spigot // Paper + io.papermc.paper.adventure.providers.ClickCallbackProviderImpl.CALLBACK_MANAGER.handleQueue(this.tickCount); // Paper this.profiler.push("commandFunctions"); - SpigotTimings.commandFunctionsTimer.startTiming(); // Spigot + MinecraftTimings.commandFunctionsTimer.startTiming(); // Spigot // Paper @@ -866,7 +867,7 @@ index 47ec7832579c2f5d473301e7127cae47da630c03..013556d54894dc2914b8cda7a70b9ea1 // Send time updates to everyone, it will get the right time from the world the player is in. if (this.tickCount % 20 == 0) { for (int i = 0; i < this.getPlayerList().players.size(); ++i) { -@@ -1287,7 +1310,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa +@@ -1288,7 +1311,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa entityplayer.connection.send(new ClientboundSetTimePacket(entityplayer.level.getGameTime(), entityplayer.getPlayerTime(), entityplayer.level.getGameRules().getBoolean(GameRules.RULE_DAYLIGHT))); // Add support for per player time } } @@ -875,7 +876,7 @@ index 47ec7832579c2f5d473301e7127cae47da630c03..013556d54894dc2914b8cda7a70b9ea1 while (iterator.hasNext()) { ServerLevel worldserver = (ServerLevel) iterator.next(); -@@ -1333,24 +1356,24 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa +@@ -1334,24 +1357,24 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa } this.profiler.popPush("connection"); diff --git a/patches/server/0016-Starlight.patch b/patches/server/0016-Starlight.patch index b5093a0858..da5f1b8108 100644 --- a/patches/server/0016-Starlight.patch +++ b/patches/server/0016-Starlight.patch @@ -4331,20 +4331,12 @@ index 0000000000000000000000000000000000000000..dd995e25ae620ae36cd5eecb2fe10ad0 + +} diff --git a/src/main/java/io/papermc/paper/command/PaperCommand.java b/src/main/java/io/papermc/paper/command/PaperCommand.java -index 156334e3876d966fedc91d18da29f562395ab182..268b243f76b632fc8eea08bba4657a5100b5dfc7 100644 +index 16fdfda717300a3168c27526470f83ce6239e95f..a52e6e8be323863ece6624a8ae7f9455279bdc23 100644 --- a/src/main/java/io/papermc/paper/command/PaperCommand.java +++ b/src/main/java/io/papermc/paper/command/PaperCommand.java -@@ -1,6 +1,7 @@ - package io.papermc.paper.command; - - import io.papermc.paper.command.subcommands.EntityCommand; -+import io.papermc.paper.command.subcommands.FixLightCommand; - import io.papermc.paper.command.subcommands.HeapDumpCommand; - import io.papermc.paper.command.subcommands.ReloadCommand; - import io.papermc.paper.command.subcommands.VersionCommand; -@@ -42,6 +43,7 @@ public final class PaperCommand extends Command { - commands.put(Set.of("reload"), new ReloadCommand()); +@@ -39,6 +39,7 @@ public final class PaperCommand extends Command { commands.put(Set.of("version"), new VersionCommand()); + commands.put(Set.of("callback"), new CallbackCommand()); commands.put(Set.of("dumpplugins"), new DumpPluginsCommand()); + commands.put(Set.of("fixlight"), new FixLightCommand()); diff --git a/patches/server/0018-Rewrite-chunk-system.patch b/patches/server/0018-Rewrite-chunk-system.patch index d1b666e5b4..74c18a5d3e 100644 --- a/patches/server/0018-Rewrite-chunk-system.patch +++ b/patches/server/0018-Rewrite-chunk-system.patch @@ -11555,18 +11555,11 @@ index 0000000000000000000000000000000000000000..b4c56bf12dc8dd17452210ece4fd6741 + protected abstract void raisePriorityScheduled(final PrioritisedExecutor.Priority priority); +} diff --git a/src/main/java/io/papermc/paper/command/PaperCommand.java b/src/main/java/io/papermc/paper/command/PaperCommand.java -index 268b243f76b632fc8eea08bba4657a5100b5dfc7..e202af893c7ec22bfc0b8dbeb8e1551db685d1d3 100644 +index a52e6e8be323863ece6624a8ae7f9455279bdc23..e3467aaf6d0c8d486b84362e3c20b3fe631b50ff 100644 --- a/src/main/java/io/papermc/paper/command/PaperCommand.java +++ b/src/main/java/io/papermc/paper/command/PaperCommand.java -@@ -1,5 +1,6 @@ - package io.papermc.paper.command; - -+import io.papermc.paper.command.subcommands.ChunkDebugCommand; - import io.papermc.paper.command.subcommands.EntityCommand; - import io.papermc.paper.command.subcommands.FixLightCommand; - import io.papermc.paper.command.subcommands.HeapDumpCommand; -@@ -44,6 +45,7 @@ public final class PaperCommand extends Command { - commands.put(Set.of("version"), new VersionCommand()); +@@ -40,6 +40,7 @@ public final class PaperCommand extends Command { + commands.put(Set.of("callback"), new CallbackCommand()); commands.put(Set.of("dumpplugins"), new DumpPluginsCommand()); commands.put(Set.of("fixlight"), new FixLightCommand()); + commands.put(Set.of("debug", "chunkinfo", "holderinfo"), new ChunkDebugCommand()); @@ -12730,7 +12723,7 @@ index d9f2518a08bc4ae978051be51e467597f9325ecb..26fa789a44a1d934944e78eae21f4892 DedicatedServer dedicatedserver1 = new DedicatedServer(optionset, worldLoader.get(), thread, convertable_conversionsession, resourcepackrepository, worldstem, dedicatedserversettings, DataFixers.getDataFixer(), services, LoggerChunkProgressListener::new); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 013556d54894dc2914b8cda7a70b9ea142b6668f..d03b0060377cec15de8bf6246a7bf75ce600e879 100644 +index 027200b4702d3379ae2f987b69f390c0dbdf1d9a..8c85251685c44cd005b72dd31129a9ff3c57c2d8 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -301,7 +301,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -12869,7 +12862,7 @@ index 013556d54894dc2914b8cda7a70b9ea142b6668f..d03b0060377cec15de8bf6246a7bf75c // CraftBukkit start if (isOversleep) return canOversleep();// Paper - because of our changes, this logic is broken return this.forceTicks || this.runningTask() || Util.getMillis() < (this.mayHaveDelayedTasks ? this.delayedTasksMaxNextTickTime : this.nextTickTime); -@@ -2256,7 +2250,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa +@@ -2257,7 +2251,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa // CraftBukkit start @Override public boolean isSameThread() { diff --git a/patches/server/0027-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch b/patches/server/0027-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch index 2a3d2e404f..debaf0323e 100644 --- a/patches/server/0027-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch +++ b/patches/server/0027-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Show 'Paper' in client crashes, server lists, and Mojang diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index d03b0060377cec15de8bf6246a7bf75ce600e879..23181f54828410d78cae56fed226bea5de4be5ff 100644 +index 8c85251685c44cd005b72dd31129a9ff3c57c2d8..8cd3ad2601df5a604de904304ae3f603a471dfee 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1460,7 +1460,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa +@@ -1461,7 +1461,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @DontObfuscate public String getServerModName() { diff --git a/patches/server/0040-Optimize-explosions.patch b/patches/server/0040-Optimize-explosions.patch index 96bfdf7965..2e21502e54 100644 --- a/patches/server/0040-Optimize-explosions.patch +++ b/patches/server/0040-Optimize-explosions.patch @@ -10,10 +10,10 @@ This patch adds a per-tick cache that is used for storing and retrieving an entity's exposure during an explosion. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 19d7a4da730cf260407d6216b8dbba958ec8f84c..efa4db568cf5189a3a83beb137748f57b34ca6e4 100644 +index 846dc9b607f40f1af3b4b7c7bbfe3c0803c0ad39..085943e5948c334792be1ad95e7ba4aa88ffe927 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1406,6 +1406,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa +@@ -1407,6 +1407,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa this.profiler.pop(); this.profiler.pop(); diff --git a/patches/server/0077-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch b/patches/server/0077-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch index e6715e879c..176c52b0af 100644 --- a/patches/server/0077-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch +++ b/patches/server/0077-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Only process BlockPhysicsEvent if a plugin has a listener Saves on some object allocation and processing when no plugin listens to this diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index efa4db568cf5189a3a83beb137748f57b34ca6e4..1b153a4f323635f1f48ef49a95103e25d5b6ce21 100644 +index 085943e5948c334792be1ad95e7ba4aa88ffe927..c25e654497417c1c3345b7c0654cf8ef901e6a50 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1367,6 +1367,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa +@@ -1368,6 +1368,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa while (iterator.hasNext()) { ServerLevel worldserver = (ServerLevel) iterator.next(); diff --git a/patches/server/0093-remove-null-possibility-for-getServer-singleton.patch b/patches/server/0093-remove-null-possibility-for-getServer-singleton.patch index 132260619a..116eb2b256 100644 --- a/patches/server/0093-remove-null-possibility-for-getServer-singleton.patch +++ b/patches/server/0093-remove-null-possibility-for-getServer-singleton.patch @@ -6,7 +6,7 @@ Subject: [PATCH] remove null possibility for getServer singleton to stop IDE complaining about potential NPE diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 3068831dbfbda5fc4dea5f0fb6eb48636fba4052..12d0bddfdb156c07fdba87e960d0cbf0639b26a5 100644 +index 18499be3d671987a743e6001347fb7ffb023039c..0cb581700dd994a0585e5f8f73489d90f2c0ac0d 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -193,6 +193,7 @@ import co.aikar.timings.MinecraftTimings; // Paper @@ -25,7 +25,7 @@ index 3068831dbfbda5fc4dea5f0fb6eb48636fba4052..12d0bddfdb156c07fdba87e960d0cbf0 this.metricsRecorder = InactiveMetricsRecorder.INSTANCE; this.profiler = this.metricsRecorder.getProfiler(); this.onMetricsRecordingStopped = (methodprofilerresults) -> { -@@ -2332,9 +2334,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa +@@ -2333,9 +2335,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa return false; } diff --git a/patches/server/0136-Use-TerminalConsoleAppender-for-console-improvements.patch b/patches/server/0136-Use-TerminalConsoleAppender-for-console-improvements.patch index 834af37198..f21944e06d 100644 --- a/patches/server/0136-Use-TerminalConsoleAppender-for-console-improvements.patch +++ b/patches/server/0136-Use-TerminalConsoleAppender-for-console-improvements.patch @@ -112,7 +112,7 @@ index 0000000000000000000000000000000000000000..685deaa0e5d1ddc13e3a7c0471b1cfcf + +} diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 24f9d7314ab6c70fec42150e6065a7546c5de828..44c9135e8d63df11009d5eea509c6c57e8d841c4 100644 +index b248a4ab47728c078dbc922896964e0e893fc255..7a0bbaf7cb929b42f10fa7e04ad73c0aa0606ce3 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -168,7 +168,7 @@ import com.mojang.datafixers.util.Pair; @@ -161,7 +161,7 @@ index 24f9d7314ab6c70fec42150e6065a7546c5de828..44c9135e8d63df11009d5eea509c6c57 } catch (Exception ignored) { } // CraftBukkit end -@@ -1589,7 +1593,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa +@@ -1590,7 +1594,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @Override public void sendSystemMessage(Component message) { diff --git a/patches/server/0279-Optimize-World-Time-Updates.patch b/patches/server/0279-Optimize-World-Time-Updates.patch index 631082a048..4a2df71cfd 100644 --- a/patches/server/0279-Optimize-World-Time-Updates.patch +++ b/patches/server/0279-Optimize-World-Time-Updates.patch @@ -8,10 +8,10 @@ the updates per world, so that we can re-use the same packet object for every player unless they have per-player time enabled. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 52d602fdaad361deb3b3e0ff2b99b7808e4a32cf..fc76ec97536e5f520b556453f7fcb7aa7572cb19 100644 +index f116b8600f5b7c0f372585cc1edc68160299bfa1..d6bf9a1e6561de911783c157b3875a9e647b00c7 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1389,12 +1389,24 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa +@@ -1390,12 +1390,24 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa MinecraftTimings.timeUpdateTimer.startTiming(); // Spigot // Paper // Send time updates to everyone, it will get the right time from the world the player is in. diff --git a/patches/server/0284-Make-the-default-permission-message-configurable.patch b/patches/server/0284-Make-the-default-permission-message-configurable.patch index 46cc61e569..c5fde71321 100644 --- a/patches/server/0284-Make-the-default-permission-message-configurable.patch +++ b/patches/server/0284-Make-the-default-permission-message-configurable.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Make the default permission message configurable diff --git a/src/main/java/io/papermc/paper/command/PaperCommand.java b/src/main/java/io/papermc/paper/command/PaperCommand.java -index e202af893c7ec22bfc0b8dbeb8e1551db685d1d3..32b84c59722970218a1515e21c6454d0ea4f781d 100644 +index e3467aaf6d0c8d486b84362e3c20b3fe631b50ff..8f16640fc2f1233c10392d7e32a54d784fd8e370 100644 --- a/src/main/java/io/papermc/paper/command/PaperCommand.java +++ b/src/main/java/io/papermc/paper/command/PaperCommand.java -@@ -80,7 +80,7 @@ public final class PaperCommand extends Command { +@@ -76,7 +76,7 @@ public final class PaperCommand extends Command { if (sender.hasPermission(BASE_PERM + permission) || sender.hasPermission("bukkit.command.paper")) { return true; } @@ -18,7 +18,7 @@ index e202af893c7ec22bfc0b8dbeb8e1551db685d1d3..32b84c59722970218a1515e21c6454d0 } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index bd2cc69ff6c15615dfedcb3c88e6bf2d36fd9370..8f6d54197401ea8722be73e4291aad34000cab58 100644 +index 2cfcfc256acf322c5279fe967f33705fcd958623..b43be6e03ab51b9956ff3faff97e8e050e15a909 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -2630,6 +2630,16 @@ public final class CraftServer implements Server { diff --git a/patches/server/0351-Add-debug-for-sync-chunk-loads.patch b/patches/server/0351-Add-debug-for-sync-chunk-loads.patch index f2327e0706..b5648a066a 100644 --- a/patches/server/0351-Add-debug-for-sync-chunk-loads.patch +++ b/patches/server/0351-Add-debug-for-sync-chunk-loads.patch @@ -194,18 +194,10 @@ index 0000000000000000000000000000000000000000..0bb4aaa546939b67a5d22865190f3047 + } +} diff --git a/src/main/java/io/papermc/paper/command/PaperCommand.java b/src/main/java/io/papermc/paper/command/PaperCommand.java -index 32b84c59722970218a1515e21c6454d0ea4f781d..8f35943e71911b6d49b4cf210e56f5e11c5753e8 100644 +index 8f16640fc2f1233c10392d7e32a54d784fd8e370..1e9f191dc0f9d98f4404d2796f15b13912860b13 100644 --- a/src/main/java/io/papermc/paper/command/PaperCommand.java +++ b/src/main/java/io/papermc/paper/command/PaperCommand.java -@@ -5,6 +5,7 @@ import io.papermc.paper.command.subcommands.EntityCommand; - import io.papermc.paper.command.subcommands.FixLightCommand; - import io.papermc.paper.command.subcommands.HeapDumpCommand; - import io.papermc.paper.command.subcommands.ReloadCommand; -+import io.papermc.paper.command.subcommands.SyncLoadInfoCommand; - import io.papermc.paper.command.subcommands.VersionCommand; - import io.papermc.paper.command.subcommands.DumpPluginsCommand; - import it.unimi.dsi.fastutil.Pair; -@@ -46,6 +47,7 @@ public final class PaperCommand extends Command { +@@ -41,6 +41,7 @@ public final class PaperCommand extends Command { commands.put(Set.of("dumpplugins"), new DumpPluginsCommand()); commands.put(Set.of("fixlight"), new FixLightCommand()); commands.put(Set.of("debug", "chunkinfo", "holderinfo"), new ChunkDebugCommand()); diff --git a/patches/server/0363-Add-tick-times-API-and-mspt-command.patch b/patches/server/0363-Add-tick-times-API-and-mspt-command.patch index cc8a117bd2..ba7291bc5a 100644 --- a/patches/server/0363-Add-tick-times-API-and-mspt-command.patch +++ b/patches/server/0363-Add-tick-times-API-and-mspt-command.patch @@ -125,7 +125,7 @@ index d44d0074446c1c54e87dc8078dff7fef1d92f343..bbb8b1933ef33a3b91f69545f69dd3cf public static void registerCommands(final MinecraftServer server) { diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index cb76b912ebb5ac4e53588c82cf35ac98bdf7d1e2..728a9d2c11bce06cf3edb25cb500db0423d9b84d 100644 +index 7c7fefa91497248a64046217a37e525bf3697bad..f79497ca8ab725ddd851ec89238db93c79ad92b7 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -252,6 +252,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -152,7 +152,7 @@ index cb76b912ebb5ac4e53588c82cf35ac98bdf7d1e2..728a9d2c11bce06cf3edb25cb500db04 this.frameTimer.logFrameDuration(k - i); this.profiler.pop(); org.spigotmc.WatchdogThread.tick(); // Spigot -@@ -2577,4 +2587,30 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa +@@ -2578,4 +2588,30 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa public static record ServerResourcePackInfo(String url, String hash, boolean isRequired, @Nullable Component prompt) { } @@ -184,7 +184,7 @@ index cb76b912ebb5ac4e53588c82cf35ac98bdf7d1e2..728a9d2c11bce06cf3edb25cb500db04 + // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index bdd45da02c9bd78758e4b315a19a25cf552a83da..271a17f767b316384fef563251a4777d297e2da2 100644 +index 5101993aabe77289b56f3ae33900a97d2177fe33..d728eec810e0586c38ca37010fdb665c93089d6b 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -2493,6 +2493,16 @@ public final class CraftServer implements Server { diff --git a/patches/server/0375-Improved-Watchdog-Support.patch b/patches/server/0375-Improved-Watchdog-Support.patch index 0d3d810562..09a4fddb2c 100644 --- a/patches/server/0375-Improved-Watchdog-Support.patch +++ b/patches/server/0375-Improved-Watchdog-Support.patch @@ -71,7 +71,7 @@ index 336795dff742b7c6957fbd3476aff31d25a5e659..30a58229aa6dac5039511d0c0df5f291 cause = cause.getCause(); } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 728a9d2c11bce06cf3edb25cb500db0423d9b84d..155a9a5def5ff599ecf862782fa19fcc595e6789 100644 +index f79497ca8ab725ddd851ec89238db93c79ad92b7..7eb5a713dbb0e1e54f44ff16a4d7784b321b50a5 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -298,7 +298,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -211,7 +211,7 @@ index 728a9d2c11bce06cf3edb25cb500db0423d9b84d..155a9a5def5ff599ecf862782fa19fcc return new TickTask(this.tickCount, runnable); } -@@ -1461,6 +1514,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa +@@ -1462,6 +1515,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa try { crashreport = CrashReport.forThrowable(throwable, "Exception ticking world"); } catch (Throwable t) { @@ -219,7 +219,7 @@ index 728a9d2c11bce06cf3edb25cb500db0423d9b84d..155a9a5def5ff599ecf862782fa19fcc throw new RuntimeException("Error generating crash report", t); } // Spigot End -@@ -1959,7 +2013,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa +@@ -1960,7 +2014,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa this.worldData.setDataConfiguration(worlddataconfiguration); this.resources.managers.updateRegistryTags(this.registryAccess()); diff --git a/patches/server/0427-Fix-Per-World-Difficulty-Remembering-Difficulty.patch b/patches/server/0427-Fix-Per-World-Difficulty-Remembering-Difficulty.patch index bcb8c5235e..03c5eb75d3 100644 --- a/patches/server/0427-Fix-Per-World-Difficulty-Remembering-Difficulty.patch +++ b/patches/server/0427-Fix-Per-World-Difficulty-Remembering-Difficulty.patch @@ -8,7 +8,7 @@ makes it so that the server keeps the last difficulty used instead of restoring the server.properties every single load. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 6da8e9530c0112b1d9119c6ff722a277e5826241..61f1d565254ccba500a8c30722183ae9bfc0deb3 100644 +index 8cdc559a0e45744e041ef94f1af05d61ffb06b68..c4c1201a2f7904b2044e163393722227d159453b 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -801,7 +801,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -20,7 +20,7 @@ index 6da8e9530c0112b1d9119c6ff722a277e5826241..61f1d565254ccba500a8c30722183ae9 this.forceTicks = false; // CraftBukkit end -@@ -1727,11 +1727,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa +@@ -1728,11 +1728,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa } } @@ -40,7 +40,7 @@ index 6da8e9530c0112b1d9119c6ff722a277e5826241..61f1d565254ccba500a8c30722183ae9 } } -@@ -1745,7 +1748,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa +@@ -1746,7 +1749,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa while (iterator.hasNext()) { ServerLevel worldserver = (ServerLevel) iterator.next(); @@ -102,7 +102,7 @@ index 77f502c279ec471d65f6cc007d2bc08e3b34d79a..1517c09ccd95448cb0fce0f9ffbb7bd2 } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 2b668a9e1e7d4c719602e1c006e2154a94d00a72..82b594729e595bfd7011334a27bdd3e427d2f903 100644 +index 9e278a740cf7cb7a593d76f01d6aa590407b087b..5b29bdd8c39bcdec81ed58b8e06ec6b6940363ab 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -941,8 +941,8 @@ public final class CraftServer implements Server { diff --git a/patches/server/0428-Paper-dumpitem-command.patch b/patches/server/0428-Paper-dumpitem-command.patch index 52da5fa920..49612cd291 100644 --- a/patches/server/0428-Paper-dumpitem-command.patch +++ b/patches/server/0428-Paper-dumpitem-command.patch @@ -6,18 +6,10 @@ Subject: [PATCH] Paper dumpitem command Let's you quickly view the item in your hands NBT data diff --git a/src/main/java/io/papermc/paper/command/PaperCommand.java b/src/main/java/io/papermc/paper/command/PaperCommand.java -index 8f35943e71911b6d49b4cf210e56f5e11c5753e8..312c0e42643355183ea3346a69fe9b5a5624bf1d 100644 +index 1e9f191dc0f9d98f4404d2796f15b13912860b13..6d56c812262f7f109598ef4a941d0226b1eb638a 100644 --- a/src/main/java/io/papermc/paper/command/PaperCommand.java +++ b/src/main/java/io/papermc/paper/command/PaperCommand.java -@@ -1,6 +1,7 @@ - package io.papermc.paper.command; - - import io.papermc.paper.command.subcommands.ChunkDebugCommand; -+import io.papermc.paper.command.subcommands.DumpItemCommand; - import io.papermc.paper.command.subcommands.EntityCommand; - import io.papermc.paper.command.subcommands.FixLightCommand; - import io.papermc.paper.command.subcommands.HeapDumpCommand; -@@ -48,6 +49,7 @@ public final class PaperCommand extends Command { +@@ -42,6 +42,7 @@ public final class PaperCommand extends Command { commands.put(Set.of("fixlight"), new FixLightCommand()); commands.put(Set.of("debug", "chunkinfo", "holderinfo"), new ChunkDebugCommand()); commands.put(Set.of("syncloadinfo"), new SyncLoadInfoCommand()); diff --git a/patches/server/0473-Cache-block-data-strings.patch b/patches/server/0473-Cache-block-data-strings.patch index 1bf0a022a4..bdf4b71c70 100644 --- a/patches/server/0473-Cache-block-data-strings.patch +++ b/patches/server/0473-Cache-block-data-strings.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Cache block data strings diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index dfc8b3441ca35aba19a7e1bf61a0d60c5722ce96..6d611d4de5a9f568a974facd8ef7a03b18502e0e 100644 +index 173b3852ae55cd1204e8e493bfdf434e9dda9f3b..a8d1a5c74aa44a7155a11967ccb62810042859ea 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -2048,6 +2048,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa +@@ -2049,6 +2049,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa this.getPlayerList().reloadResources(); this.functionManager.replaceLibrary(this.resources.managers.getFunctionLibrary()); this.structureTemplateManager.onResourceManagerReload(this.resources.resourceManager); diff --git a/patches/server/0481-Fix-deop-kicking-non-whitelisted-player-when-white-l.patch b/patches/server/0481-Fix-deop-kicking-non-whitelisted-player-when-white-l.patch index 21f4586227..4f8a46a1e5 100644 --- a/patches/server/0481-Fix-deop-kicking-non-whitelisted-player-when-white-l.patch +++ b/patches/server/0481-Fix-deop-kicking-non-whitelisted-player-when-white-l.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Fix deop kicking non-whitelisted player when white list is diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 6d611d4de5a9f568a974facd8ef7a03b18502e0e..1a5b27c24499e1fd7b277cbef52872cd320edfef 100644 +index a8d1a5c74aa44a7155a11967ccb62810042859ea..7fe23adc486e33e70d02e3855d8080a31a0eeeb5 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -2131,13 +2131,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa +@@ -2132,13 +2132,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa if (this.isEnforceWhitelist()) { PlayerList playerlist = source.getServer().getPlayerList(); UserWhiteList whitelist = playerlist.getWhiteList(); diff --git a/patches/server/0535-Added-ServerResourcesReloadedEvent.patch b/patches/server/0535-Added-ServerResourcesReloadedEvent.patch index 348918b003..0ca99f1ed8 100644 --- a/patches/server/0535-Added-ServerResourcesReloadedEvent.patch +++ b/patches/server/0535-Added-ServerResourcesReloadedEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Added ServerResourcesReloadedEvent diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 1a5b27c24499e1fd7b277cbef52872cd320edfef..0f0a97c6571ef210e85670ab5ce40676146ad27b 100644 +index 7fe23adc486e33e70d02e3855d8080a31a0eeeb5..eb365f8166a233e3e636722072c7130e9cafc1fb 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -2008,7 +2008,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa +@@ -2009,7 +2009,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa return this.functionManager; } @@ -22,7 +22,7 @@ index 1a5b27c24499e1fd7b277cbef52872cd320edfef..0f0a97c6571ef210e85670ab5ce40676 RegistryAccess.Frozen iregistrycustom_dimension = this.registries.getAccessForLoading(RegistryLayer.RELOADABLE); CompletableFuture<Void> completablefuture = CompletableFuture.supplyAsync(() -> { Stream<String> stream = dataPacks.stream(); // CraftBukkit - decompile error -@@ -2036,6 +2042,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa +@@ -2037,6 +2043,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa this.worldData.setDataConfiguration(worlddataconfiguration); this.resources.managers.updateRegistryTags(this.registryAccess()); diff --git a/patches/server/0560-EntityMoveEvent.patch b/patches/server/0560-EntityMoveEvent.patch index ae9c171848..6902e460f6 100644 --- a/patches/server/0560-EntityMoveEvent.patch +++ b/patches/server/0560-EntityMoveEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] EntityMoveEvent diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 0f0a97c6571ef210e85670ab5ce40676146ad27b..41d97d9e69a5763e83c4e017c285f4bcbe6af676 100644 +index eb365f8166a233e3e636722072c7130e9cafc1fb..3c30d51cc497f2aa4071fed1ef9a5c93ddd358ab 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1505,6 +1505,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa +@@ -1506,6 +1506,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa while (iterator.hasNext()) { ServerLevel worldserver = (ServerLevel) iterator.next(); worldserver.hasPhysicsEvent = org.bukkit.event.block.BlockPhysicsEvent.getHandlerList().getRegisteredListeners().length > 0; // Paper @@ -29,7 +29,7 @@ index 2af673fe240fbb0ce7667e207a833d09afa7074b..652b2c5dc17c6ba65eb59cbd3ac218d2 final Throwable thr = new Throwable(entity + " Added to world at " + new java.util.Date()); io.papermc.paper.util.StacktraceDeobfuscator.INSTANCE.deobfuscateThrowable(thr); diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index c7209675ad3eeca881da75bfc0c3212204da898e..7ce102e7a28b70d1ffeb3a433b927f49fc4d5904 100644 +index fcd670d1371dca3bb644dfea79f98670d75a68a4..276cdeb349c6b9c23ff4198beb807b5f090de3b6 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -3291,6 +3291,20 @@ public abstract class LivingEntity extends Entity implements Attackable { diff --git a/patches/server/0568-Add-support-for-hex-color-codes-in-console.patch b/patches/server/0568-Add-support-for-hex-color-codes-in-console.patch index d2e020d30d..ec9dd842c7 100644 --- a/patches/server/0568-Add-support-for-hex-color-codes-in-console.patch +++ b/patches/server/0568-Add-support-for-hex-color-codes-in-console.patch @@ -283,10 +283,10 @@ index 0000000000000000000000000000000000000000..b9922b07cb105618390187d98acdf89e + +} diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 41d97d9e69a5763e83c4e017c285f4bcbe6af676..fa9d8c995ea1a15663af98aa0f932173b79f800e 100644 +index 3c30d51cc497f2aa4071fed1ef9a5c93ddd358ab..ed3ec53f11cf2be94b82a779d89e8d4b7819172f 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1705,7 +1705,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa +@@ -1706,7 +1706,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @Override public void sendSystemMessage(Component message) { diff --git a/patches/server/0586-forced-whitelist-use-configurable-kick-message.patch b/patches/server/0586-forced-whitelist-use-configurable-kick-message.patch index b42a3f0c3b..81f5d32b6c 100644 --- a/patches/server/0586-forced-whitelist-use-configurable-kick-message.patch +++ b/patches/server/0586-forced-whitelist-use-configurable-kick-message.patch @@ -5,10 +5,10 @@ Subject: [PATCH] forced whitelist: use configurable kick message diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index fa9d8c995ea1a15663af98aa0f932173b79f800e..ff97f603d9962dba69f1ae06d2a25986d2354927 100644 +index ed3ec53f11cf2be94b82a779d89e8d4b7819172f..3587d9a74ecd622789b16752ec87391ad7d68053 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -2147,7 +2147,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa +@@ -2148,7 +2148,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa ServerPlayer entityplayer = (ServerPlayer) iterator.next(); if (!whitelist.isWhiteListed(entityplayer.getGameProfile()) && !this.getPlayerList().isOp(entityplayer.getGameProfile())) { // Paper - Fix kicking ops when whitelist is reloaded (MC-171420) diff --git a/patches/server/0629-Add-PlayerKickEvent-causes.patch b/patches/server/0629-Add-PlayerKickEvent-causes.patch index 39e7abd6f2..44a0dd042a 100644 --- a/patches/server/0629-Add-PlayerKickEvent-causes.patch +++ b/patches/server/0629-Add-PlayerKickEvent-causes.patch @@ -36,10 +36,10 @@ index b5f54ee82905e3e6ab5bfde35ab625f5feeb1393..c0a80824a0307ea673805015119cc834 public boolean shouldDisconnect() { diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 7e4e484539ad705d61cd0d1b4db49e31fe3ca8f7..990cbc7a5bdfa0bcdec456d004a4db43cc922845 100644 +index b9ef06e2ba2e9842a0b4d66976b703918f585752..4c61e7c5e38f6d1e4e1301a5d65b57c19a3b3a58 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -2150,7 +2150,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa +@@ -2151,7 +2151,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa ServerPlayer entityplayer = (ServerPlayer) iterator.next(); if (!whitelist.isWhiteListed(entityplayer.getGameProfile()) && !this.getPlayerList().isOp(entityplayer.getGameProfile())) { // Paper - Fix kicking ops when whitelist is reloaded (MC-171420) @@ -491,7 +491,7 @@ index a24e7a66d52eddbdad8db71cf5e45f1a458c389f..e1c13ac7b11fb0080435fc34502208c8 } } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 750decc331963ab89ff90d228e169a9675f17022..348022a7c037ce5f72c5c69db54f0ce5de9948ca 100644 +index 1fd9bceff4a37eedfd84f0a8624435dc3359b4c4..3632756c7e3db14669fe3957a74b2af4b94bd7ac 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -600,7 +600,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0695-Add-paper-mobcaps-and-paper-playermobcaps.patch b/patches/server/0695-Add-paper-mobcaps-and-paper-playermobcaps.patch index b67cdd94ce..2a96176091 100644 --- a/patches/server/0695-Add-paper-mobcaps-and-paper-playermobcaps.patch +++ b/patches/server/0695-Add-paper-mobcaps-and-paper-playermobcaps.patch @@ -10,18 +10,10 @@ Also has a hover text on each mob category listing what entity types are in said category diff --git a/src/main/java/io/papermc/paper/command/PaperCommand.java b/src/main/java/io/papermc/paper/command/PaperCommand.java -index 312c0e42643355183ea3346a69fe9b5a5624bf1d..5c0b02f1ca8f6594f8f94613edba2783087950f2 100644 +index 6d56c812262f7f109598ef4a941d0226b1eb638a..db9567711f7e0ad1778d41e79b59e31916aa9f09 100644 --- a/src/main/java/io/papermc/paper/command/PaperCommand.java +++ b/src/main/java/io/papermc/paper/command/PaperCommand.java -@@ -5,6 +5,7 @@ import io.papermc.paper.command.subcommands.DumpItemCommand; - import io.papermc.paper.command.subcommands.EntityCommand; - import io.papermc.paper.command.subcommands.FixLightCommand; - import io.papermc.paper.command.subcommands.HeapDumpCommand; -+import io.papermc.paper.command.subcommands.MobcapsCommand; - import io.papermc.paper.command.subcommands.ReloadCommand; - import io.papermc.paper.command.subcommands.SyncLoadInfoCommand; - import io.papermc.paper.command.subcommands.VersionCommand; -@@ -50,6 +51,7 @@ public final class PaperCommand extends Command { +@@ -43,6 +43,7 @@ public final class PaperCommand extends Command { commands.put(Set.of("debug", "chunkinfo", "holderinfo"), new ChunkDebugCommand()); commands.put(Set.of("syncloadinfo"), new SyncLoadInfoCommand()); commands.put(Set.of("dumpitem"), new DumpItemCommand()); @@ -286,7 +278,7 @@ index a1770e5ae4b3014c3538b52d4912c60864e186a8..906def91bba96bab7c7aea9b87d9ec56 // Paper start - add parameters and int ret type spawnCategoryForChunk(group, world, chunk, checker, runner, Integer.MAX_VALUE, null); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index a6be09d67043343dc26942d9a0a4d6cebdd6b627..e3aef13c8b432b46690daf3b27e95b8623ae0aca 100644 +index fdad054d9e6fedc7c6367abb12c38f66bf6fdfca..ed0aa7ddb4cd3d2f1a08baa4754b01f08a1537d1 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -2165,6 +2165,11 @@ public final class CraftServer implements Server { @@ -302,7 +294,7 @@ index a6be09d67043343dc26942d9a0a4d6cebdd6b627..e3aef13c8b432b46690daf3b27e95b86 } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index bf0ad61418f0832c23ed9374be91e586c73050de..3ec2674a3ebc2540b9832e7bd3c99d5c1373f47d 100644 +index d0e1c1eb00409523f7e771cfa5ec21b6b23516cd..e955b72d6a26224c39059fa56874b5e47384b5f4 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -1700,9 +1700,14 @@ public class CraftWorld extends CraftRegionAccessor implements World { diff --git a/patches/server/0700-Execute-chunk-tasks-mid-tick.patch b/patches/server/0700-Execute-chunk-tasks-mid-tick.patch index 5282a08b29..f3d8c4f5e7 100644 --- a/patches/server/0700-Execute-chunk-tasks-mid-tick.patch +++ b/patches/server/0700-Execute-chunk-tasks-mid-tick.patch @@ -19,7 +19,7 @@ index 23e564b05ba438924180c91f9b19a60731eedd1b..5ec241d49ff5e3a161a39006f05823a5 private MinecraftTimings() {} diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 990cbc7a5bdfa0bcdec456d004a4db43cc922845..87e5959a495eaccf3e6ec1102fb8a3f3edcc0cfe 100644 +index 4c61e7c5e38f6d1e4e1301a5d65b57c19a3b3a58..0b8ec2790fda4df9f3d42449c319ff3ca1480418 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -1305,6 +1305,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -30,7 +30,7 @@ index 990cbc7a5bdfa0bcdec456d004a4db43cc922845..87e5959a495eaccf3e6ec1102fb8a3f3 return true; } else { if (this.haveTime()) { -@@ -2711,4 +2712,74 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa +@@ -2712,4 +2713,74 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa } } // Paper end diff --git a/patches/server/0804-Custom-Potion-Mixes.patch b/patches/server/0804-Custom-Potion-Mixes.patch index 5031ada611..af2c50fe8d 100644 --- a/patches/server/0804-Custom-Potion-Mixes.patch +++ b/patches/server/0804-Custom-Potion-Mixes.patch @@ -24,10 +24,10 @@ index 0000000000000000000000000000000000000000..6b0bed550763f34e18c9e92f9a47ec0c + } +} diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 8a51927582713a36d5cc6da9e3dae7b661c49b9b..ef2e4c0444d70d99378073f427f8c1792eb79556 100644 +index 65a041165919b988d0e2113d12cdb035fbbcdbcc..0182d477dde8ed54bb6b0093a5040f38441231b4 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -2057,6 +2057,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa +@@ -2058,6 +2058,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa this.worldData.setDataConfiguration(worlddataconfiguration); this.resources.managers.updateRegistryTags(this.registryAccess()); @@ -164,7 +164,7 @@ index 424406d2692856cfd82b6f3b7b6228fa3bd20c2f..c57efcb9a79337ec791e4e8f6671612f @Override diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 48ff69f581256a7b5dd210781bf8f519c349030b..bee8855e09df7230cc5ce33a8cb8ed05f0af07f3 100644 +index dc460b30c46e33fb0303d5f18d2f80a93a2ca916..538cee6c80a405613b27b11ee7db2567ceb60400 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -294,6 +294,7 @@ public final class CraftServer implements Server { diff --git a/patches/server/0847-Throw-exception-on-world-create-while-being-ticked.patch b/patches/server/0847-Throw-exception-on-world-create-while-being-ticked.patch index c11e1ed200..60081dceca 100644 --- a/patches/server/0847-Throw-exception-on-world-create-while-being-ticked.patch +++ b/patches/server/0847-Throw-exception-on-world-create-while-being-ticked.patch @@ -7,7 +7,7 @@ There are no plans to support creating worlds while worlds are being ticked themselvess. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index ef2e4c0444d70d99378073f427f8c1792eb79556..9f6ae28c7d10d67d73745c535c976954bcf61c11 100644 +index 0182d477dde8ed54bb6b0093a5040f38441231b4..ecef0b8e3908544a46ecd8e1df6a2b2f56f0d78d 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -311,6 +311,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -18,7 +18,7 @@ index ef2e4c0444d70d99378073f427f8c1792eb79556..9f6ae28c7d10d67d73745c535c976954 public static <S extends MinecraftServer> S spin(Function<Thread, S> serverFactory) { AtomicReference<S> atomicreference = new AtomicReference(); -@@ -1484,7 +1485,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa +@@ -1485,7 +1486,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa this.getFunctions().tick(); MinecraftTimings.commandFunctionsTimer.stopTiming(); // Spigot // Paper this.profiler.popPush("levels"); @@ -27,7 +27,7 @@ index ef2e4c0444d70d99378073f427f8c1792eb79556..9f6ae28c7d10d67d73745c535c976954 // CraftBukkit start // Run tasks that are waiting on processing -@@ -1516,6 +1517,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa +@@ -1517,6 +1518,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa // Paper end MinecraftTimings.timeUpdateTimer.stopTiming(); // Spigot // Paper @@ -36,7 +36,7 @@ index ef2e4c0444d70d99378073f427f8c1792eb79556..9f6ae28c7d10d67d73745c535c976954 while (iterator.hasNext()) { ServerLevel worldserver = (ServerLevel) iterator.next(); worldserver.hasPhysicsEvent = org.bukkit.event.block.BlockPhysicsEvent.getHandlerList().getRegisteredListeners().length > 0; // Paper -@@ -1562,6 +1565,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa +@@ -1563,6 +1566,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa this.profiler.pop(); worldserver.explosionDensityCache.clear(); // Paper - Optimize explosions } @@ -45,7 +45,7 @@ index ef2e4c0444d70d99378073f427f8c1792eb79556..9f6ae28c7d10d67d73745c535c976954 this.profiler.popPush("connection"); MinecraftTimings.connectionTimer.startTiming(); // Spigot diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 924a2d2d0737bcaf0ebe701557124d4a434eac82..1ecb719bc8bdf9611022307a55965868243d26ee 100644 +index a5df4d05804782c87272ade6fe727e92ffa8ee09..3f3437d3dcba2cd647577c726e831e723443dc2f 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -845,6 +845,11 @@ public final class CraftServer implements Server { diff --git a/patches/server/0921-Add-paper-dumplisteners-command.patch b/patches/server/0921-Add-paper-dumplisteners-command.patch index e3b37840de..cbf1598dd5 100644 --- a/patches/server/0921-Add-paper-dumplisteners-command.patch +++ b/patches/server/0921-Add-paper-dumplisteners-command.patch @@ -6,18 +6,10 @@ Subject: [PATCH] Add /paper dumplisteners command Co-authored-by: TwoLeggedCat <80929284+TwoLeggedCat@users.noreply.github.com> diff --git a/src/main/java/io/papermc/paper/command/PaperCommand.java b/src/main/java/io/papermc/paper/command/PaperCommand.java -index 5c0b02f1ca8f6594f8f94613edba2783087950f2..f7a92aba7c8b98c44839fd6687dd9b96df893399 100644 +index db9567711f7e0ad1778d41e79b59e31916aa9f09..7ba60b4b4f29a42c58d98aafc5ea0fa3214f554c 100644 --- a/src/main/java/io/papermc/paper/command/PaperCommand.java +++ b/src/main/java/io/papermc/paper/command/PaperCommand.java -@@ -2,6 +2,7 @@ package io.papermc.paper.command; - - import io.papermc.paper.command.subcommands.ChunkDebugCommand; - import io.papermc.paper.command.subcommands.DumpItemCommand; -+import io.papermc.paper.command.subcommands.DumpListenersCommand; - import io.papermc.paper.command.subcommands.EntityCommand; - import io.papermc.paper.command.subcommands.FixLightCommand; - import io.papermc.paper.command.subcommands.HeapDumpCommand; -@@ -52,6 +53,7 @@ public final class PaperCommand extends Command { +@@ -44,6 +44,7 @@ public final class PaperCommand extends Command { commands.put(Set.of("syncloadinfo"), new SyncLoadInfoCommand()); commands.put(Set.of("dumpitem"), new DumpItemCommand()); commands.put(Set.of("mobcaps", "playermobcaps"), new MobcapsCommand());