Class Regions

java.lang.Object
com.sk89q.worldedit.regions.Regions

public final class Regions extends Object
Utility methods relating to Regions.
  • Method Details

    • minimumY

      public static double minimumY(Region region)
      Get the minimum Y coordinate of the given region using the region's Region.getMinimumPoint() method.
      Parameters:
      region - the region
      Returns:
      the Y coordinate
    • maximumY

      public static double maximumY(Region region)
      Get the maximum Y coordinate of the given region using the region's Region.getMaximumPoint() method.
      Parameters:
      region - the region
      Returns:
      the Y coordinate
    • minimumBlockY

      public static int minimumBlockY(Region region)
      Get the minimum Y coordinate of the given region using the region's Region.getMinimumPoint() method.
      Parameters:
      region - the region
      Returns:
      the Y coordinate
    • maximumBlockY

      public static int maximumBlockY(Region region)
      Get the maximum Y coordinate of the given region using the region's Region.getMaximumPoint() method.
      Parameters:
      region - the region
      Returns:
      the Y coordinate
    • asFlatRegion

      public static FlatRegion asFlatRegion(Region region)
      Attempt to get a FlatRegion from the given region.

      If the given region is already a FlatRegion, then the region will be cast and returned. Otherwise, a new CuboidRegion will be created covers the provided region's minimum and maximum extents.

      Parameters:
      region - the region
      Returns:
      a flat region