Files
Shiroha/shiroha-server/minecraft-patches/features/0030-Replace-packet-processing-queue-with-mt-queue.patch
T
NanaChiyo0721 1bb895c165
Shiroha CI / build (push) Canceled after 0s
Shiroha CI / Event File (push) Canceled after 0s
Fix incorrect ticket lock size computing
Yeah this would fully solve the issue of chunk unloading race condition

The same fix was already initially added at "Force clamp grid-exponent to 1~6"
2026-08-09 14:57:32 +08:00

20 lines
1.1 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: NanaChiyo0721 <nanachiyo0721@163.com>
Date: Mon, 13 Jul 2026 23:10:31 +0800
Subject: [PATCH] Replace packet processing queue with mt-queue
diff --git a/net/minecraft/network/PacketProcessor.java b/net/minecraft/network/PacketProcessor.java
index 10fa576838c726d026df078eef6c693d14c2cbda..1708b577c22ee1fe8052ee6013d28a03c7eb6f8a 100644
--- a/net/minecraft/network/PacketProcessor.java
+++ b/net/minecraft/network/PacketProcessor.java
@@ -11,7 +11,7 @@ import org.slf4j.Logger;
public class PacketProcessor implements AutoCloseable {
private static final Logger LOGGER = LogUtils.getLogger();
- private final Queue<PacketProcessor.ListenerAndPacket<?>> packetsToBeHandled = Queues.newConcurrentLinkedQueue();
+ private final Queue<PacketProcessor.ListenerAndPacket<?>> packetsToBeHandled = new ca.spottedleaf.concurrentutil.collection.MultiThreadedQueue<>(); // Shiroha - Replace packet processing queue with mt-queue
private final Thread runningThread;
private boolean closed;