Package com.sk89q.worldedit.regions
Class Regions
java.lang.Object
com.sk89q.worldedit.regions.Regions
Utility methods relating to
Region
s.-
Method Summary
Modifier and TypeMethodDescriptionstatic FlatRegion
asFlatRegion
(Region region) Attempt to get aFlatRegion
from the given region.static int
maximumBlockY
(Region region) Get the maximum Y coordinate of the given region using the region'sRegion.getMaximumPoint()
method.static double
Get the maximum Y coordinate of the given region using the region'sRegion.getMaximumPoint()
method.static int
minimumBlockY
(Region region) Get the minimum Y coordinate of the given region using the region'sRegion.getMinimumPoint()
method.static double
Get the minimum Y coordinate of the given region using the region'sRegion.getMinimumPoint()
method.
-
Method Details
-
minimumY
Get the minimum Y coordinate of the given region using the region'sRegion.getMinimumPoint()
method.- Parameters:
region
- the region- Returns:
- the Y coordinate
-
maximumY
Get the maximum Y coordinate of the given region using the region'sRegion.getMaximumPoint()
method.- Parameters:
region
- the region- Returns:
- the Y coordinate
-
minimumBlockY
Get the minimum Y coordinate of the given region using the region'sRegion.getMinimumPoint()
method.- Parameters:
region
- the region- Returns:
- the Y coordinate
-
maximumBlockY
Get the maximum Y coordinate of the given region using the region'sRegion.getMaximumPoint()
method.- Parameters:
region
- the region- Returns:
- the Y coordinate
-
asFlatRegion
Attempt to get aFlatRegion
from the given region.If the given region is already a
FlatRegion
, then the region will be cast and returned. Otherwise, a newCuboidRegion
will be created covers the provided region's minimum and maximum extents.- Parameters:
region
- the region- Returns:
- a flat region
-