refactor: adjust chunk sending (#2770)

- synchronise on the chunk GET object (when available)
 - kick it off to be run at some point on the main server thread
This commit is contained in:
Jordan
2024-06-10 20:11:04 +02:00
committed by dordsor21
parent c6e297942f
commit 62297f9479
22 changed files with 139 additions and 117 deletions

View File

@ -2,6 +2,6 @@ package com.fastasyncworldedit.bukkit.adapter;
public interface BukkitGetBlocks {
void send(int mask, boolean lighting);
void send();
}

View File

@ -137,7 +137,7 @@ public class NMSAdapter implements FAWEPlatformAdapterImpl {
if (!(chunk instanceof BukkitGetBlocks)) {
throw new IllegalArgumentException("(IChunkGet) chunk not of type BukkitGetBlocks");
}
((BukkitGetBlocks) chunk).send(mask, lighting);
((BukkitGetBlocks) chunk).send();
}
}