mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 01:37:37 +00:00
Ensure regen step not running on the main thread (#2185)
This commit is contained in:
parent
488a2e5de4
commit
c86dfe45df
@ -253,10 +253,13 @@ public abstract class Regenerator<IChunkAccess, ProtoChunk extends IChunkAccess,
|
|||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
} else { // Concurrency.NONE or generateConcurrent == false
|
} else { // Concurrency.NONE or generateConcurrent == false
|
||||||
// run sequential
|
// run sequential but submit to different thread
|
||||||
|
// running regen on the main thread otherwise triggers async-only events on the main thread
|
||||||
|
executor.submit(() -> {
|
||||||
for (long xz : coords) {
|
for (long xz : coords) {
|
||||||
chunkStatus.processChunkSave(xz, worldlimits.get(radius).get(xz));
|
chunkStatus.processChunkSave(xz, worldlimits.get(radius).get(xz));
|
||||||
}
|
}
|
||||||
|
}).get(); // wait until finished this step
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user