Package com.sk89q.worldedit.function

Examples of com.sk89q.worldedit.function.RegionMaskingFilter


     * @return the number of blocks that matched the pattern
     */
    public int countBlocks(Region region, Set<BaseBlock> searchBlocks) {
        FuzzyBlockMask mask = new FuzzyBlockMask(this, searchBlocks);
        Counter count = new Counter();
        RegionMaskingFilter filter = new RegionMaskingFilter(mask, count);
        RegionVisitor visitor = new RegionVisitor(region, filter);
        Operations.completeBlindly(visitor); // We can't throw exceptions, nor do we expect any
        return count.getCount();
    }
View Full Code Here


        checkNotNull(region);
        checkNotNull(mask);
        checkNotNull(pattern);

        BlockReplace replace = new BlockReplace(this, Patterns.wrap(pattern));
        RegionMaskingFilter filter = new RegionMaskingFilter(mask, replace);
        RegionVisitor visitor = new RegionVisitor(region, filter);
        Operations.completeLegacy(visitor);
        return visitor.getAffected();
    }
View Full Code Here

            if (currentTransform == null) {
                currentTransform = transform;
            }

            ExtentBlockCopy blockCopy = new ExtentBlockCopy(source, from, destination, to, currentTransform);
            RegionMaskingFilter filter = new RegionMaskingFilter(sourceMask, blockCopy);
            RegionFunction function = sourceFunction != null ? new CombinedRegionFunction(filter, sourceFunction) : filter;
            RegionVisitor blockVisitor = new RegionVisitor(region, function);

            ExtentEntityCopy entityCopy = new ExtentEntityCopy(from, destination, to, currentTransform);
            entityCopy.setRemoving(removingEntities);
View Full Code Here

TOP

Related Classes of com.sk89q.worldedit.function.RegionMaskingFilter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.