Skip to content

@minecraft/server


@minecraft/server / ListBlockVolume

Class: ListBlockVolume ​

Defined in: @minecraft/server/index.d.ts:15549

Volume composed of an unordered container of unique block locations.

Extends ​

Constructors ​

Constructor ​

new ListBlockVolume(locations): ListBlockVolume

Defined in: @minecraft/server/index.d.ts:15558

Parameters ​

locations ​

Vector3[]

Initial array of block locations that ListBlockVolume will be constructed with.

Returns ​

ListBlockVolume

Remarks ​

Creates a new instance of ListBlockVolume.

Overrides ​

BlockVolumeBase.constructor

Methods ​

add() ​

add(locations): void

Defined in: @minecraft/server/index.d.ts:15566

Parameters ​

locations ​

Vector3[]

Array of block locations to be inserted into container.

Returns ​

void

Remarks ​

Insert block locations into container.


getBlockLocationIterator() ​

getBlockLocationIterator(): BlockLocationIterator

Defined in: @minecraft/server/index.d.ts:5902

Returns ​

BlockLocationIterator

Remarks ​

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

Inherited from ​

BlockVolumeBase.getBlockLocationIterator


getCapacity() ​

getCapacity(): number

Defined in: @minecraft/server/index.d.ts:5908

Returns ​

number

Remarks ​

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

Inherited from ​

BlockVolumeBase.getCapacity


getMax() ​

getMax(): Vector3

Defined in: @minecraft/server/index.d.ts:5916

Returns ​

Vector3

Remarks ​

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

Throws ​

This function can throw errors.

Inherited from ​

BlockVolumeBase.getMax


getMin() ​

getMin(): Vector3

Defined in: @minecraft/server/index.d.ts:5924

Returns ​

Vector3

Remarks ​

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

Throws ​

This function can throw errors.

Inherited from ​

BlockVolumeBase.getMin


getSpan() ​

getSpan(): Vector3

Defined in: @minecraft/server/index.d.ts:5931

Returns ​

Vector3

Remarks ​

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

Inherited from ​

BlockVolumeBase.getSpan


isInside() ​

isInside(location): boolean

Defined in: @minecraft/server/index.d.ts:5938

Parameters ​

location ​

Vector3

Returns ​

boolean

Remarks ​

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

Inherited from ​

BlockVolumeBase.isInside


remove() ​

remove(locations): void

Defined in: @minecraft/server/index.d.ts:15574

Parameters ​

locations ​

Vector3[]

Array of block locations to be removed from container.

Returns ​

void

Remarks ​

Remove block locations from container.


translate() ​

translate(delta): void

Defined in: @minecraft/server/index.d.ts:5946

Parameters ​

delta ​

Vector3

Amount of blocks to move by

Returns ​

void

Remarks ​

Move a BlockVolume by a specified amount

Inherited from ​

BlockVolumeBase.translate