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

Class: LocationWaypoint

Beta

指向世界中固定位置的路径点。与实体路径点不同,位置路径点始终保持有效,并且其位置可以更新。

Waypoint that points to a fixed location in the world. Unlike entity waypoints, location waypoints always remain valid and their position can be updated.

Extends

Constructors

Constructor

new LocationWaypoint(dimensionLocation, textureSelector, color?): LocationWaypoint

Beta

Parameters

dimensionLocation

DimensionLocation

textureSelector

WaypointTextureSelector

color?

RGB

Returns

LocationWaypoint

Throws

This function can throw errors.

InvalidWaypointTextureSelectorError

Overrides

Waypoint.constructor

Properties

color?

optional color?: RGB

World Mutation Beta

Remarks

Optional RGB color tint applied to the waypoint icon. If not specified, the waypoint uses its default color.

应用于路径点图标的可选 RGB 颜色色调。如果未指定,路径点将使用其默认颜色。

Inherited from

Waypoint.color


isEnabled

isEnabled: boolean

World Mutation Beta

Remarks

Controls whether the waypoint is currently displayed on the player's screen. When disabled, the waypoint is hidden but remains valid.

控制路径点当前是否显示在玩家的屏幕上。禁用时,路径点会被隐藏但仍保持有效。

Inherited from

Waypoint.isEnabled


isValid

readonly isValid: boolean

Beta

Remarks

Returns whether the waypoint is currently valid. A waypoint becomes invalid when its tracked entity is no longer valid.

返回路径点当前是否有效。当路径点跟踪的实体不再有效时,路径点将变为无效。

Inherited from

Waypoint.isValid


textureSelector

textureSelector: WaypointTextureSelector

World Mutation Beta

Remarks

The WaypointTextureSelector that determines which icon texture is displayed for the waypoint based on distance or other criteria.

根据距离或其他条件确定路径点显示哪种图标纹理的 WaypointTextureSelector

Inherited from

Waypoint.textureSelector

Methods

getDimensionLocation()

getDimensionLocation(): DimensionLocation

World Mutation Beta

Returns

DimensionLocation

Remarks

Gets the current DimensionLocation of the waypoint. For entity waypoints, this returns the entity's current position. For location waypoints, this returns the stored location.

获取路径点的当前 DimensionLocation。对于实体路径点,返回实体的当前位置。对于位置路径点,返回存储的位置。

Throws

This function can throw errors.

InvalidWaypointError

InvalidWaypointTextureSelectorError

Inherited from

Waypoint.getDimensionLocation


remove()

remove(): void

World Mutation Beta

Returns

void

Remarks

Removes the waypoint from all locator bars it has been added to. This affects all players who have this waypoint in their locator bar.

从所有已添加的定位栏中移除该路径点。这会影响所有在其定位栏中拥有此路径点的玩家。

Inherited from

Waypoint.remove


setDimensionLocation()

setDimensionLocation(dimensionLocation): void

World Mutation Beta

Parameters

dimensionLocation

DimensionLocation

路径点的新 DimensionLocation(维度和坐标)。

The new DimensionLocation (dimension and coordinates) for the waypoint.

Returns

void

Remarks

更新此路径点指向的维度和位置。

Updates the dimension and location that this waypoint points to.