mirror of
https://github.com/songoda/FabledSkyBlock.git
synced 2024-10-03 00:47:32 +02: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);
|
chunks.getChunksToScan(island, world, paper);
|
||||||
|
|
||||||
if(paper){
|
if(paper){
|
||||||
List<Chunk> positions = new LinkedList<>();
|
List<ChunkSnapshot> positions = new LinkedList<>();
|
||||||
for(CompletableFuture<Chunk> chunk : chunks.asyncPositions){
|
for(CompletableFuture<Chunk> chunk : chunks.asyncPositions){
|
||||||
positions.add(chunk.join());
|
positions.add(chunk.join().getChunkSnapshot());
|
||||||
snapshots.put(skyblock.getWorldManager().getWorld(world), positions.stream().map(org.bukkit.Chunk::getChunkSnapshot).collect(Collectors.toList()));
|
|
||||||
}
|
}
|
||||||
|
snapshots.put(skyblock.getWorldManager().getWorld(world), positions);
|
||||||
} else {
|
} else {
|
||||||
snapshots.put(skyblock.getWorldManager().getWorld(world), chunks.syncPositions.stream().map(org.bukkit.Chunk::getChunkSnapshot).collect(Collectors.toList()));
|
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