9
0
mirror of https://github.com/Winds-Studio/Leaf.git synced 2025-12-22 16:39:22 +00:00
Files
Leaf/leaf-server/paper-patches/features/0035-Async-chunk-send.patch
Taiyou cc98f4982e backport 1.21.8 async mob spawn (#479)
* backport: 1.21.8 async mob spawn

* Move into patch

* fix

* fix build

---------

Co-authored-by: Dreeam <61569423+Dreeam-qwq@users.noreply.github.com>
Co-authored-by: hayanesuru <hayanesuru@outlook.jp>
2025-08-27 20:00:46 +02:00

20 lines
1.1 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: hayanesuru <mc@jvavav.com>
Date: Fri, 2 May 2025 18:22:24 -0700
Subject: [PATCH] Async chunk send
diff --git a/src/main/java/io/papermc/paper/antixray/ChunkPacketBlockControllerAntiXray.java b/src/main/java/io/papermc/paper/antixray/ChunkPacketBlockControllerAntiXray.java
index ee2d3a54d760f9c26542eab03c51651a30e279a0..0a4382315ee62e8defa50b3e8018a8f97687c139 100644
--- a/src/main/java/io/papermc/paper/antixray/ChunkPacketBlockControllerAntiXray.java
+++ b/src/main/java/io/papermc/paper/antixray/ChunkPacketBlockControllerAntiXray.java
@@ -185,7 +185,7 @@ public final class ChunkPacketBlockControllerAntiXray extends ChunkPacketBlockCo
return;
}
- if (!Bukkit.isPrimaryThread()) {
+ if (!Bukkit.isPrimaryThread() && !(Thread.currentThread() instanceof org.dreeam.leaf.async.chunk.AsyncChunkSendThread)) { // Leaf - Async chunk send
// Plugins?
MinecraftServer.getServer().scheduleOnMain(() -> modifyBlocks(chunkPacket, chunkPacketInfo));
return;