getVolumeLocations

fun getVolumeLocations(pos1: Location, pos2: Location): Sequence<Location>

Generates a sequence of all block locations within the cuboid defined by two corner locations. The locations must belong to the same world, and the sequence is generated from the minimum coordinates to the maximum coordinates of the defined cuboid.

Return

A sequence of block locations within the cuboid.

Parameters

pos1

The first corner location of the cuboid.

pos2

The second corner location of the cuboid.

Throws

if the locations do not belong to the same world, or if one of the locations has no world.