@minecraft/server
    Preparing search index...

    Class PoiBlockManagerBeta

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

    Required Experiments:

    • Poi
    Index

    Methods

    • 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

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

      no-restricted-execution - This function can't be called in restricted-execution mode.

    • Beta

      Parameters

      • position: Vector3

        Block position to inspect.

      Returns PoiBlockType | undefined

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

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

      no-restricted-execution - This function can't be called in restricted-execution mode.

    • Beta

      Parameters

      • position: Vector3

        Block position to inspect.

      • filter: PoiNameFilter | PoiTagFilter | ((arg0: PoiBlockType) => boolean)

        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.

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

      no-restricted-execution - This function can't be called in restricted-execution mode.

    • Beta

      Parameters

      • filter: PoiNameFilter | PoiTagFilter | ((arg0: PoiBlockType) => 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.

      • OptionaloccupancyFilter: 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.

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

      no-restricted-execution - This function can't be called in restricted-execution mode.

    • Beta

      Parameters

      • filter: PoiNameFilter | PoiTagFilter | ((arg0: PoiBlockType) => 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.

      • OptionaloccupancyFilter: 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.

      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.

      no-restricted-execution - This function can't be called in restricted-execution mode.

    • Beta

      Parameters

      • filter: PoiNameFilter | PoiTagFilter | ((arg0: PoiBlockType) => 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.

      • OptionaloccupancyFilter: 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.

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

      no-restricted-execution - This function can't be called in restricted-execution mode.

    • 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.

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

      no-restricted-execution - This function can't be called in restricted-execution mode.

    • Beta

      Parameters

      • filter: PoiNameFilter | PoiTagFilter | ((arg0: PoiBlockType) => 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.

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

      no-restricted-execution - This function can't be called in restricted-execution mode.