diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/command/BiomeCommands.java b/worldedit-core/src/main/java/com/sk89q/worldedit/command/BiomeCommands.java index 1f551aefa1..a965f05b38 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/command/BiomeCommands.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/command/BiomeCommands.java @@ -206,7 +206,7 @@ public void setBiome( RegionFunction replace = new BiomeReplace(editSession, target); if (mask != null) { - replace = new RegionMaskingFilter(editSession, mask, replace); + replace = new RegionMaskingFilter(mask, replace); } RegionVisitor visitor = new RegionVisitor(region, replace); Operations.completeLegacy(visitor); diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/extent/Extent.java b/worldedit-core/src/main/java/com/sk89q/worldedit/extent/Extent.java index 9f73c8f5e0..1dccfdc49e 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/extent/Extent.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/extent/Extent.java @@ -818,7 +818,7 @@ default int replaceBlocks(Region region, Mask mask, Pattern pattern) throws MaxC checkNotNull(pattern); BlockReplace replace = new BlockReplace(this, pattern); - RegionMaskingFilter filter = new RegionMaskingFilter(this, mask, replace); + RegionMaskingFilter filter = new RegionMaskingFilter(mask, replace); //FAWE start > add extent to RegionVisitor to allow chunk preloading RegionVisitor visitor = new RegionVisitor(region, filter, this); //FAWE end diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/function/RegionMaskingFilter.java b/worldedit-core/src/main/java/com/sk89q/worldedit/function/RegionMaskingFilter.java index f9c1f0216c..f5c5363706 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/function/RegionMaskingFilter.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/function/RegionMaskingFilter.java @@ -35,28 +35,33 @@ public class RegionMaskingFilter implements RegionFunction { private final RegionFunction function; private final Mask mask; - //FAWE start - private final Extent extent; - //FAWE end /** * Create a new masking filter. * - * @param mask the mask + * @param mask the mask * @param function the function */ - //FAWE start - Extent - public RegionMaskingFilter(Extent extent, Mask mask, RegionFunction function) { + public RegionMaskingFilter(Mask mask, RegionFunction function) { checkNotNull(function); checkNotNull(mask); - //FAWE start - checkNotNull(extent); - this.extent = extent; - //FAWE end this.mask = mask; this.function = function; } + /** + * Create a new masking filter. + * + * @param mask the mask + * @param function the function + */ + //FAWE start - Extent + @Deprecated(since = "TODO") + public RegionMaskingFilter(@SuppressWarnings("unused") Extent extent, Mask mask, RegionFunction function) { + this(mask, function); + } + //FAWE end - Extent + @Override public boolean apply(BlockVector3 position) throws WorldEditException { return mask.test(position) && function.apply(position); diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/function/operation/ForwardExtentCopy.java b/worldedit-core/src/main/java/com/sk89q/worldedit/function/operation/ForwardExtentCopy.java index f98d5f9241..e6acdacff8 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/function/operation/ForwardExtentCopy.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/function/operation/ForwardExtentCopy.java @@ -330,7 +330,7 @@ public Operation resume(RunContext run) throws WorldEditException { } if (sourceMask != Masks.alwaysTrue()) { new MaskTraverser(sourceMask).reset(transExt); - copy = new RegionMaskingFilter(source, sourceMask, copy); + copy = new RegionMaskingFilter(sourceMask, copy); } if (copyingBiomes && (source.isWorld() || region instanceof FlatRegion)) { copy = CombinedRegionFunction.combine(copy, new BiomeCopy(source, finalDest)); @@ -394,7 +394,7 @@ public Operation resume(RunContext run) throws WorldEditException { if (maskFunc != null) { copy = new RegionMaskTestFunction(sourceMask, copy, maskFunc); } else { - copy = new RegionMaskingFilter(source, sourceMask, copy); + copy = new RegionMaskingFilter(sourceMask, copy); } } if (copyingBiomes && (source.isWorld() || region instanceof FlatRegion)) {