aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorShane Freeder <[email protected]>2021-12-04 03:22:31 +0000
committerShane Freeder <[email protected]>2021-12-04 03:22:31 +0000
commit005d7b6c758560aefb2b5ecca5aa56a19dc08bc6 (patch)
tree553cf9060afcba9bdf87578f7fa5e06ea2aa6297
parent3e73355e2e47485163ad91dcd07caafe98639194 (diff)
downloadPaper-005d7b6c758560aefb2b5ecca5aa56a19dc08bc6.tar.gz
Paper-005d7b6c758560aefb2b5ecca5aa56a19dc08bc6.zip
Do not use ForkJoinPool common exector for creating client command struct (Fixes #6936)
-rw-r--r--patches/server/0847-fixup-Async-command-map-building.patch21
1 files changed, 21 insertions, 0 deletions
diff --git a/patches/server/0847-fixup-Async-command-map-building.patch b/patches/server/0847-fixup-Async-command-map-building.patch
new file mode 100644
index 0000000000..a788351feb
--- /dev/null
+++ b/patches/server/0847-fixup-Async-command-map-building.patch
@@ -0,0 +1,21 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Shane Freeder <[email protected]>
+Date: Sat, 4 Dec 2021 03:21:34 +0000
+Subject: [PATCH] fixup! Async command map building
+
+
+diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java
+index b7c24a7ff4dc50d03f74b21a0b353d0ce559b4d4..0766f272068248175bc929a145bafaf9efc8978d 100644
+--- a/src/main/java/net/minecraft/commands/Commands.java
++++ b/src/main/java/net/minecraft/commands/Commands.java
+@@ -350,9 +350,7 @@ public class Commands {
+ // CraftBukkit start
+ // Register Vanilla commands into builtRoot as before
+ // Paper start - Async command map building
+- java.util.concurrent.ForkJoinPool.commonPool().execute(() -> {
+- sendAsync(player);
+- });
++ net.minecraft.server.MCUtil.scheduleAsyncTask(() -> this.sendAsync(player));
+ }
+
+ private void sendAsync(ServerPlayer player) {