mirror of
https://github.com/YouHaveTrouble/BlockEdit.git
synced 2026-06-29 21:46:19 +00:00
cleanup, refactors, hopefully fix for all boundingbox issues
This commit is contained in:
@@ -31,6 +31,7 @@ public class WorkSplitter {
|
||||
|
||||
protected static void runOperation(HashSet<ChunkWork> chunkWorks, Selection selection, int chunksPerTick, BlockEditOperation operation) {
|
||||
if (selection == null) return;
|
||||
Selection sel = new Selection(selection.clone().expand(0.1), selection.getWorldUuid());
|
||||
List<ChunkWork> chunkWork = new ArrayList<>(chunkWorks);
|
||||
AtomicInteger element = new AtomicInteger(chunkWork.size()-1);
|
||||
Bukkit.getScheduler().runTaskTimer(BlockEdit.getPlugin(), (task) -> {
|
||||
@@ -39,7 +40,7 @@ public class WorkSplitter {
|
||||
return;
|
||||
}
|
||||
for (int i = 0; i< chunksPerTick; i++) {
|
||||
processChunkWork(chunkWork.get(element.getAndDecrement()), selection, operation);
|
||||
processChunkWork(chunkWork.get(element.getAndDecrement()), sel, operation);
|
||||
}
|
||||
}, 0, 1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user