3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-11-17 00:20:09 +01:00
Dieser Commit ist enthalten in:
dordsor21 2024-09-14 22:51:41 +01:00
Ursprung 9caa905d93
Commit c0a9bc6d97
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 1E53E88969FFCF0B

Datei anzeigen

@ -449,15 +449,17 @@ public class PaperweightGetBlocks extends CharGetBlocks implements BukkitGetBloc
TextComponent.of("Could not get chunk at " + chunkX + "," + chunkZ + " whilst low memory: " + e.getMessage()));
}
}
final int finalCopyKey = copyKey;
// Run immediately if possible
if (chunk != null) {
return internalCall(set, finalizer, chunk, nmsWorld);
return internalCall(set, finalizer, finalCopyKey, chunk, nmsWorld);
}
// Submit via the STQE as that will help handle excessive queuing by waiting for the submission count to fall below the
// target size
nmsChunkFuture.thenApply(nmsChunk -> owner.submitTaskUnchecked(() -> (T) internalCall(
set,
finalizer,
finalCopyKey,
nmsChunk,
nmsWorld
)));
@ -467,7 +469,13 @@ public class PaperweightGetBlocks extends CharGetBlocks implements BukkitGetBloc
return (T) (Future) CompletableFuture.completedFuture(null);
}
private <T extends Future<T>> T internalCall(IChunkSet set, Runnable finalizer, LevelChunk nmsChunk, ServerLevel nmsWorld) {
private <T extends Future<T>> T internalCall(
IChunkSet set,
Runnable finalizer,
int copyKey,
LevelChunk nmsChunk,
ServerLevel nmsWorld
) {
try {
PaperweightGetBlocks_Copy copy = createCopy ? new PaperweightGetBlocks_Copy(nmsChunk) : null;
if (createCopy) {