For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt, and this page is available as Markdown at /server/classes/BlockVolumeBase.md.

Class: BlockVolumeBase

block

Beta

BlockVolume 的基础类型。

Base type for BlockVolumes.

Extended by

Methods

getBlockLocationIterator()

getBlockLocationIterator(): BlockLocationIterator

Beta

Returns

BlockLocationIterator

Remarks

获取一个 BlockLocationIterator,表示指定体积内的所有方块世界位置。

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


getBoundingBox()

getBoundingBox(): BlockBoundingBox

Beta

Returns

BlockBoundingBox

Remarks

返回一个 BlockBoundingBox 对象,表示体积的有效最小和最大坐标。

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

Throws

This function can throw errors.


getCapacity()

getCapacity(): number

Beta

Returns

number

Remarks

返回 BlockVolume 的容量(体积)(WDH)。

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


getClosest()

getClosest(count, location): Vector3[]

Beta

Parameters

count

number

要返回的最接近位置的数量。

Number of closest positions to return

location

Vector3

测量距离的位置。

Position to measure distance from

Returns

Vector3[]

Remarks

返回体积内最接近给定位置的方块位置列表,按距离排序(最近优先)。

Returns a list of block positions within the volume that are closest to a given location, sorted by distance (nearest first)

Throws

This function can throw errors.

ArgumentOutOfBoundsError


getFarthest()

getFarthest(count, location): Vector3[]

Beta

Parameters

count

number

要返回的最远位置的数量。

Number of farthest positions to return

location

Vector3

测量距离的位置。

Position to measure distance from

Returns

Vector3[]

Remarks

返回体积内距离给定位置最远的方块位置列表,按距离排序(最远优先)。

Returns a list of block positions within the volume that are farthest from a given location, sorted by distance (farthest first)

Throws

This function can throw errors.

ArgumentOutOfBoundsError


getMax()

getMax(): Vector3

Beta

Returns

Vector3

Remarks

获取体积的最大角点位置(保证 >= min)。

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

Throws

This function can throw errors.


getMin()

getMin(): Vector3

Beta

Returns

Vector3

Remarks

获取体积的最小角点位置(保证 <= max)。

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

Throws

This function can throw errors.


getSpan()

getSpan(): Vector3

Beta

Returns

Vector3

Remarks

获取一个 Vector3 对象,其中每个分量表示沿该轴的方块数量。

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


isInside()

isInside(location): boolean

Beta

Parameters

location

Vector3

Returns

boolean

Remarks

检查给定的世界方块位置是否在 BlockVolume 内部。

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


translate()

translate(delta): void

Beta

Parameters

delta

Vector3

移动的方块数量。

Amount of blocks to move by

Returns

void

Remarks

按指定量移动 BlockVolume

Move a BlockVolume by a specified amount

同领域相关