mirror of
https://github.com/songoda/FabledSkyBlock.git
synced 2024-11-07 03:00:29 +01:00
Optimized Island async scan
This commit is contained in:
parent
30e4637d3f
commit
60eb216b2b
@ -186,11 +186,11 @@ public final class IslandScan extends BukkitRunnable {
|
||||
chunks.getChunksToScan(island, world, paper);
|
||||
|
||||
if(paper){
|
||||
List<Chunk> positions = new LinkedList<>();
|
||||
List<ChunkSnapshot> positions = new LinkedList<>();
|
||||
for(CompletableFuture<Chunk> chunk : chunks.asyncPositions){
|
||||
positions.add(chunk.join());
|
||||
snapshots.put(skyblock.getWorldManager().getWorld(world), positions.stream().map(org.bukkit.Chunk::getChunkSnapshot).collect(Collectors.toList()));
|
||||
positions.add(chunk.join().getChunkSnapshot());
|
||||
}
|
||||
snapshots.put(skyblock.getWorldManager().getWorld(world), positions);
|
||||
} else {
|
||||
snapshots.put(skyblock.getWorldManager().getWorld(world), chunks.syncPositions.stream().map(org.bukkit.Chunk::getChunkSnapshot).collect(Collectors.toList()));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user