From a2b0a5e6225e0530e0695e0b4c421db6c679163c Mon Sep 17 00:00:00 2001 From: dordsor21 Date: Thu, 7 May 2020 19:38:42 +0100 Subject: [PATCH] Fix offset mask (< and >) --- .../java/com/sk89q/worldedit/function/mask/OffsetMask.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/OffsetMask.java b/worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/OffsetMask.java index 5fab17454..d6a3dc7f6 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/OffsetMask.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/OffsetMask.java @@ -88,7 +88,11 @@ public class OffsetMask extends AbstractMask { @Override public boolean test(Extent extent, BlockVector3 pos) { - return getMask().test(extent, pos); + BlockVector3 testPos = pos.add(offset); + if (testPos.getBlockY() < 0 || testPos.getBlockY() > 255) { + return false; + } + return getMask().test(extent, pos.add(offset)); } @Nullable