Creates an inclusive cuboid helper for area operations. Bounds are floored to block coordinates and reordered so each minimum is below its matching maximum.
| Name | Type | Description |
|---|---|---|
x1, y1, z1 | number | Starting coordinates. |
x2, y2, z2 | number | Ending coordinates. |
boundsTable | table | Either an array with six coordinates or a table with minX/minY/minZ/maxX/maxY/maxZ. |
A region object with various helper methods.
local x, y, z = world.spawn()
local area = region(x - 4, y - 1, z - 4, x + 4, y - 1, z + 4)
area:fill(89) -- fill area with glowstone