9
0
mirror of https://github.com/Dreeam-qwq/Gale.git synced 2025-12-23 08:49:28 +00:00

Fix MC-238526

This commit is contained in:
MartijnMuijsers
2022-11-29 16:17:48 +01:00
parent 2eb32dae81
commit c7b056dd75
19 changed files with 39 additions and 2 deletions

View File

@@ -0,0 +1,29 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: MartijnMuijsers <martijnmuijsers@live.nl>
Date: Tue, 29 Nov 2022 14:58:26 +0100
Subject: [PATCH] Remove tab complete executor
License: AGPL-3.0 (https://www.gnu.org/licenses/agpl-3.0.html)
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 4b99b15c950d11451a70b8362aec5124a9494526..e450a4700da55e96dd3166e7ae966b2b8e43f6bb 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -184,6 +184,7 @@ import net.minecraft.world.phys.shapes.BooleanOp;
import net.minecraft.world.phys.shapes.Shapes;
import net.minecraft.world.phys.shapes.VoxelShape;
import org.apache.commons.lang3.StringUtils;
+import org.galemc.gale.concurrent.AsyncExecutor;
import org.galemc.gale.concurrent.MinecraftServerBlockableEventLoop;
import org.galemc.gale.configuration.GaleGlobalConfiguration;
import org.slf4j.Logger;
@@ -867,8 +868,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
}
// Paper start
- private static final java.util.concurrent.ExecutorService TAB_COMPLETE_EXECUTOR = java.util.concurrent.Executors.newFixedThreadPool(4,
- new com.google.common.util.concurrent.ThreadFactoryBuilder().setDaemon(true).setNameFormat("Async Tab Complete Thread - #%d").setUncaughtExceptionHandler(new net.minecraft.DefaultUncaughtExceptionHandlerWithName(net.minecraft.server.MinecraftServer.LOGGER)).build());
+ private static final java.util.concurrent.ExecutorService TAB_COMPLETE_EXECUTOR = AsyncExecutor.instance; // Gale - centralized async execution - remove tab complete executor
// Paper end
@Override
public void handleCustomCommandSuggestions(ServerboundCommandSuggestionPacket packet) {