From 755ea097973de1e3ec1ad86ee1d63fe3a8d1f7dc Mon Sep 17 00:00:00 2001 From: IronApollo Date: Wed, 1 Apr 2020 00:26:11 -0400 Subject: [PATCH] Fix #390 Turns out the FilterBlock's getOrdinal value is from the "get", and does not share the same reference as setOrdinal, whose value is from the "set", would modify. Because of this, even if #getOrdinal returns 0, we still must update the set with 0 by #setOrdinal. --- .../src/main/java/com/sk89q/worldedit/extent/MaskingExtent.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/extent/MaskingExtent.java b/worldedit-core/src/main/java/com/sk89q/worldedit/extent/MaskingExtent.java index 7aea7c97a..7cb88c422 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/extent/MaskingExtent.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/extent/MaskingExtent.java @@ -108,7 +108,7 @@ public class MaskingExtent extends AbstractDelegateExtent implements IBatchProce @Override public void applyBlock(FilterBlock block) { int ordinal = block.getOrdinal(); - if (ordinal != 0 && !mask.test(getExtent(), block)) { + if (!mask.test(getExtent(), block)) { block.setOrdinal(0); } }