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/PoiBlockManager.md.

Class: PoiBlockManager experimental

block

Beta

Provides methods for querying and managing block-based points of interest in a dimension.

Required Experiments:

  • Poi

Methods

addTemporary()

addTemporary(position, poi): void

World Mutation Beta

Parameters

position

Vector3

Block position at which to add the POI.

poi

string | number | PoiBlockType

POI type to add, specified by numeric type Id, type name, or POI type object.

Returns

void

Remarks

Adds a block point of interest at a position. This method is intended for temporary usage. Will be replaced when chunk is reloaded

Privilege

Tip

no-restricted-execution -


at()

at(position): PoiBlockType | undefined

World Mutation Beta

Parameters

position

Vector3

Block position to inspect.

Returns

PoiBlockType | undefined

The POI type at the position, or undefined if no POI exists there.

Remarks

Gets the type of the block point of interest at a position.

Privilege

Tip

no-restricted-execution -


exists()

exists(position, filter): boolean

World Mutation Beta

Parameters

position

Vector3

Block position to inspect.

filter

((arg0) => boolean) | PoiNameFilter | PoiTagFilter

Filter used to select the POI type. A callback receives the POI type and returns whether it matches; a name filter matches a type name; and a tag filter requires all specified tags.

Returns

boolean

True if a POI exists at the position and its type matches the filter; otherwise false.

Remarks

Tests whether a block point of interest at a position matches a type filter.

Privilege

Tip

no-restricted-execution -


getInRange()

getInRange(filter, center, blockRadius, occupancyFilter?): PoiBlockInstance[]

World Mutation Beta

Parameters

filter

PoiNameFilter | PoiTagFilter | ((arg0) => boolean)

Filter used to select POI types. A callback receives each POI type and returns whether it should be included; a name filter matches a type name; and a tag filter requires all specified tags.

center

Vector3

Center of the search.

blockRadius

number

Maximum three-dimensional distance from the center, in blocks.

occupancyFilter?

PoiBlockOccupancyFilter

Optional filter applied to the occupancy state of matching POIs. If omitted, POIs in any occupancy state are returned.

Returns

PoiBlockInstance[]

The matching POI instances within range. The result order is not guaranteed.

Remarks

Returns block points of interest that match the supplied type and occupancy filters within the specified distance of a location.

Privilege

Tip

no-restricted-execution -


getInRangeSorted()

getInRangeSorted(filter, center, blockRadius, occupancyFilter?): PoiDistancePair[]

World Mutation Beta

Parameters

filter

PoiNameFilter | PoiTagFilter | ((arg0) => boolean)

Filter used to select POI types. A callback receives each POI type and returns whether it should be included; a name filter matches a type name; and a tag filter requires all specified tags.

center

Vector3

Center of the search and the location from which distances are calculated.

blockRadius

number

Maximum three-dimensional distance from the center, in blocks.

occupancyFilter?

PoiBlockOccupancyFilter

Optional filter applied to the occupancy state of matching POIs. If omitted, POIs in any occupancy state are returned.

Returns

PoiDistancePair[]

The matching POI instances and their squared distances from the center, sorted in ascending distance order.

Remarks

Returns block points of interest that match the supplied type and occupancy filters within an axis-aligned square centered on the specified location, sorted from nearest to farthest.

Privilege

Tip

no-restricted-execution -


getInSquare()

getInSquare(filter, center, blockRadius, occupancyFilter?): PoiBlockInstance[]

World Mutation Beta

Parameters

filter

PoiNameFilter | PoiTagFilter | ((arg0) => boolean)

Filter used to select POI types. A callback receives each POI type and returns whether it should be included; a name filter matches a type name; and a tag filter requires all specified tags.

center

Vector3

Center of the search volume.

blockRadius

number

Half-size of the search volume, in blocks, along each axis.

occupancyFilter?

PoiBlockOccupancyFilter

Optional filter applied to the occupancy state of matching POIs. If omitted, POIs in any occupancy state are returned.

Returns

PoiBlockInstance[]

The matching POI instances in the search volume.

Remarks

Returns block points of interest that match the supplied type and occupancy filters within an axis-aligned square centered on the specified location.

Privilege

Tip

no-restricted-execution -


release()

release(center): boolean

World Mutation Beta

Parameters

center

Vector3

Block position of the POI whose ticket should be released.

Returns

boolean

True if a ticket was released; false if no POI exists at the position or the POI has no claimed tickets.

Remarks

Releases one previously claimed ticket at a block point of interest.

Privilege

Tip

no-restricted-execution -


take()

take(filter, center, blockRadius): Vector3 | undefined

World Mutation Beta

Parameters

filter

PoiNameFilter | PoiTagFilter | ((arg0) => boolean)

Filter used to select the POI type to claim. A callback receives each POI type and returns whether it should be included; a name filter matches a type name; and a tag filter requires all specified tags.

center

Vector3

Center of the search.

blockRadius

number

Maximum three-dimensional distance from the center, in blocks.

Returns

Vector3 | undefined

The block position of the claimed POI, or undefined if no matching POI has an available ticket.

Remarks

Claims one available ticket from a matching block point of interest within range.

Privilege

Tip

no-restricted-execution -

同领域相关