Search in sources :

Example 1 with RegionShape

use of com.sk89q.worldedit.regions.shape.RegionShape in project FastAsyncWorldEdit by IntellectualSites.

the class EditSession method makeFaces.

/**
 * Make the faces of the given region. The method by which the faces are found
 * may be inefficient, because there may not be an efficient implementation supported
 * for that specific shape.
 *
 * @param region  the region
 * @param pattern the pattern to place
 * @return number of blocks affected
 * @throws MaxChangedBlocksException thrown if too many blocks are changed
 */
public int makeFaces(final Region region, Pattern pattern) throws MaxChangedBlocksException {
    checkNotNull(region);
    checkNotNull(pattern);
    if (region instanceof CuboidRegion) {
        return makeCuboidFaces(region, pattern);
    } else {
        return new RegionShape(region).generate(this, pattern, true);
    }
}
Also used : RegionShape(com.sk89q.worldedit.regions.shape.RegionShape) CuboidRegion(com.sk89q.worldedit.regions.CuboidRegion)

Aggregations

CuboidRegion (com.sk89q.worldedit.regions.CuboidRegion)1 RegionShape (com.sk89q.worldedit.regions.shape.RegionShape)1