mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-08 08:02:13 -07:00
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/network/protocol/PlayerConnectionUtils.java
|
||||
+++ b/net/minecraft/network/protocol/PlayerConnectionUtils.java
|
||||
@@ -8,6 +8,11 @@
|
||||
@@ -9,6 +9,11 @@
|
||||
import net.minecraft.util.thread.IAsyncTaskHandler;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
public class PlayerConnectionUtils {
|
||||
|
||||
private static final Logger LOGGER = LogUtils.getLogger();
|
||||
@@ -21,6 +26,7 @@
|
||||
@@ -22,6 +27,7 @@
|
||||
public static <T extends PacketListener> void ensureRunningOnSameThread(Packet<T> packet, T t0, IAsyncTaskHandler<?> iasynctaskhandler) throws CancelledPacketHandleException {
|
||||
if (!iasynctaskhandler.isSameThread()) {
|
||||
iasynctaskhandler.executeIfPossible(() -> {
|
||||
@@ -20,7 +20,7 @@
|
||||
if (t0.shouldHandleMessage(packet)) {
|
||||
try {
|
||||
packet.handle(t0);
|
||||
@@ -46,6 +52,10 @@
|
||||
@@ -60,6 +66,10 @@
|
||||
|
||||
});
|
||||
throw CancelledPacketHandleException.RUNNING_ON_DIFFERENT_THREAD;
|
||||
|
Reference in New Issue
Block a user