Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-11-17 00:20:09 +01:00
Fix copykey
Dieser Commit ist enthalten in:
Ursprung
9caa905d93
Commit
c0a9bc6d97
@ -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) {
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren