Search in sources :

Example 11 with RecursiveVisitor

use of com.sk89q.worldedit.function.visitor.RecursiveVisitor in project FastAsyncWorldEdit by IntellectualSites.

the class FuzzyRegion method select.

/**
 * Add to the selection from the given position.
 */
public void select(BlockVector3 position) {
    RecursiveVisitor search = new RecursiveVisitor(mask, p -> {
        setMinMax(p.getBlockX(), p.getBlockY(), p.getBlockZ());
        return true;
    }, 256, extent.getMinY(), extent.getMaxY(), extent);
    search.setVisited(set);
    mask.test(position);
    search.visit(position);
    Operations.completeBlindly(search);
}
Also used : RecursiveVisitor(com.sk89q.worldedit.function.visitor.RecursiveVisitor)

Aggregations

RecursiveVisitor (com.sk89q.worldedit.function.visitor.RecursiveVisitor)11 MaskIntersection (com.sk89q.worldedit.function.mask.MaskIntersection)6 BlockVector3 (com.sk89q.worldedit.math.BlockVector3)6 BlockReplace (com.sk89q.worldedit.function.block.BlockReplace)5 Mask (com.sk89q.worldedit.function.mask.Mask)5 RadiusMask (com.fastasyncworldedit.core.function.mask.RadiusMask)3 ResettableMask (com.fastasyncworldedit.core.function.mask.ResettableMask)3 SingleBlockTypeMask (com.fastasyncworldedit.core.function.mask.SingleBlockTypeMask)3 SurfaceMask (com.fastasyncworldedit.core.function.mask.SurfaceMask)3 WallMakeMask (com.fastasyncworldedit.core.function.mask.WallMakeMask)3 EditSession (com.sk89q.worldedit.EditSession)3 BlockStateMask (com.sk89q.worldedit.function.mask.BlockStateMask)3 BlockTypeMask (com.sk89q.worldedit.function.mask.BlockTypeMask)3 BoundedHeightMask (com.sk89q.worldedit.function.mask.BoundedHeightMask)3 ExistingBlockMask (com.sk89q.worldedit.function.mask.ExistingBlockMask)3 RegionMask (com.sk89q.worldedit.function.mask.RegionMask)3 EllipsoidRegion (com.sk89q.worldedit.regions.EllipsoidRegion)3 BlockVectorSet (com.fastasyncworldedit.core.math.BlockVectorSet)2 MaxChangedBlocksException (com.sk89q.worldedit.MaxChangedBlocksException)2 Pattern (com.sk89q.worldedit.function.pattern.Pattern)2