Class: BlockVolume
An immutable inclusive cuboid of block positions.
A volume from (0,0,0) to (0,0,0) contains one block.
Constructors
Constructor
new BlockVolume(
from,to):BlockVolume
Creates an inclusive volume from two opposite corners.
Parameters
from
to
Returns
BlockVolume
Properties
from
readonlyfrom:BlockVector3
Original first corner, converted to integer block coordinates.
to
readonlyto:BlockVector3
Original opposite corner, converted to integer block coordinates.
Methods
getCapacity()
getCapacity():
number
Returns the inclusive volume in blocks.
Returns
number
getMax()
getMax():
BlockVector3
Returns the component-wise largest corner.
Returns
getMin()
getMin():
BlockVector3
Returns the component-wise smallest corner.
Returns
getSpan()
getSpan():
BlockVector3
Returns the inclusive number of blocks along each axis.
Returns
isInside()
isInside(
location):boolean
Returns whether a location falls inside the inclusive bounds.
Parameters
location
Returns
boolean