From 9af77c06b887d0e92ea8b832cdae4a16d8d86af9 Mon Sep 17 00:00:00 2001 From: dordsor21 Date: Sat, 7 Aug 2021 17:38:09 +0100 Subject: [PATCH] Fix ParallelQueueExtent#setBlocks(Region, )# - Fixes removeabove/removebelow --- .../core/queue/implementation/ParallelQueueExtent.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/queue/implementation/ParallelQueueExtent.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/queue/implementation/ParallelQueueExtent.java index 718b20225..5dd34f493 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/queue/implementation/ParallelQueueExtent.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/queue/implementation/ParallelQueueExtent.java @@ -147,9 +147,9 @@ public class ParallelQueueExtent extends PassthroughExtent implements IQueueWrap @Override public > int setBlocks(Region region, B block) throws MaxChangedBlocksException { - return this.changes = apply(region, new BlockMaskBuilder().add(block).build(this).toFilter(new CountFilter())) - .getParent() - .getTotal(); + Mask mask = new BlockMaskBuilder().add(block).build(this).inverse(); + return this.changes = apply(region, mask.toFilter(block), mask.replacesAir()) + .getBlocksApplied(); } @Override