public class RectangularRegion extends Object
Modifier and Type | Class and Description |
---|---|
static class |
RectangularRegion.IterationDirection |
Constructor and Description |
---|
RectangularRegion(org.bukkit.Location from,
org.bukkit.Location to)
Creates a new region bounded by the two opposing locations.
|
Modifier and Type | Method and Description |
---|---|
Iterable<org.bukkit.Location> |
blockLocations(RectangularRegion.IterationDirection directionX,
RectangularRegion.IterationDirection directionY,
RectangularRegion.IterationDirection directionZ)
Returns an iterable over all block locations within the region, with the iterable's
directionality determined by the given arguments.
|
org.bukkit.Location |
getHighCorner() |
org.bukkit.Location |
getLowCorner() |
int |
getWidthX() |
int |
getWidthY() |
int |
getWidthZ() |
RectangularRegion |
moveTo(org.bukkit.Location lowCorner)
Creates a new region at the given corner with the same dimensions as this region.
|
public RectangularRegion(org.bukkit.Location from, org.bukkit.Location to)
from
- The first bounding corner.to
- The second bounding corner.public RectangularRegion moveTo(org.bukkit.Location lowCorner)
lowCorner
- The corner to base the new region off of.public Iterable<org.bukkit.Location> blockLocations(RectangularRegion.IterationDirection directionX, RectangularRegion.IterationDirection directionY, RectangularRegion.IterationDirection directionZ)
directionX
- The direction of iteration along the X axis.directionY
- The direction of iteration along the Y axis.directionZ
- The direction of iteration along the Z axis.public org.bukkit.Location getLowCorner()
public org.bukkit.Location getHighCorner()
public int getWidthX()
public int getWidthY()
public int getWidthZ()
Copyright © 2021. All rights reserved.