Skip to main content

Class: BlockVolumeBase

Base type for BlockVolumes.

Extended by

Constructors

new BlockVolumeBase()

private new BlockVolumeBase(): BlockVolumeBase

Returns

BlockVolumeBase

Methods

getBlockLocationIterator()

getBlockLocationIterator(): BlockLocationIterator

Returns

BlockLocationIterator

Remarks

Fetch a BlockLocationIterator that represents all of the block world locations within the specified volume

This function can't be called in read-only mode.


getBoundingBox()

getBoundingBox(): BoundingBox

Returns

BoundingBox

Remarks

Return a BoundingBox object which represents the validated min and max coordinates of the volume

This function can't be called in read-only mode.

Throws

This function can throw errors.


getCapacity()

getCapacity(): number

Returns

number

Remarks

Return the capacity (volume) of the BlockVolume (WDH)

This function can't be called in read-only mode.


getMax()

getMax(): Vector3

Returns

Vector3

Remarks

Get the largest corner position of the volume (guaranteed to be >= min)

This function can't be called in read-only mode.

Throws

This function can throw errors.


getMin()

getMin(): Vector3

Returns

Vector3

Remarks

Get the smallest corner position of the volume (guaranteed to be <= max)

This function can't be called in read-only mode.

Throws

This function can throw errors.


getSpan()

getSpan(): Vector3

Returns

Vector3

Remarks

Get a Vector3 object where each component represents the number of blocks along that axis

This function can't be called in read-only mode.


isInside()

isInside(pos): boolean

Parameters

ParameterType
posVector3

Returns

boolean

Remarks

Check to see if a given world block location is inside a BlockVolume

This function can't be called in read-only mode.


translate()

translate(delta): void

Parameters

ParameterTypeDescription
deltaVector3Amount of blocks to move by

Returns

void

Remarks

Move a BlockVolume by a specified amount

This function can't be called in read-only mode.