mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-02 03:16:41 +00:00
Added non-cuboid support for //walls and //outline.
This commit is contained in:
@ -47,6 +47,7 @@ import com.sk89q.worldedit.regions.CuboidRegion;
|
||||
import com.sk89q.worldedit.regions.Region;
|
||||
import com.sk89q.worldedit.regions.RegionOperationException;
|
||||
import com.sk89q.worldedit.shape.ArbitraryShape;
|
||||
import com.sk89q.worldedit.shape.RegionShape;
|
||||
import com.sk89q.worldedit.shape.WorldEditExpressionEnvironment;
|
||||
import com.sk89q.worldedit.util.TreeGenerator;
|
||||
|
||||
@ -1527,6 +1528,19 @@ public class EditSession {
|
||||
return affected;
|
||||
}
|
||||
|
||||
/**
|
||||
* Make faces of the region
|
||||
*
|
||||
* @param region
|
||||
* @param pattern
|
||||
* @return number of blocks affected
|
||||
* @throws MaxChangedBlocksException
|
||||
*/
|
||||
public int makeFaces(final Region region, Pattern pattern) throws MaxChangedBlocksException {
|
||||
return new RegionShape(region).generate(this, pattern, true);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Make walls of the region (as if it was a cuboid if it's not).
|
||||
*
|
||||
@ -1627,6 +1641,18 @@ public class EditSession {
|
||||
return affected;
|
||||
}
|
||||
|
||||
/**
|
||||
* Make walls of the region
|
||||
*
|
||||
* @param region
|
||||
* @param pattern
|
||||
* @return number of blocks affected
|
||||
* @throws MaxChangedBlocksException
|
||||
*/
|
||||
public int makeWalls(final Region region, Pattern pattern) throws MaxChangedBlocksException {
|
||||
return new RegionShape(region).generate(this, pattern, true, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Overlays a layer of blocks over a cuboid area.
|
||||
*
|
||||
|
Reference in New Issue
Block a user