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
textureSelector
color?
Returns
LocationWaypoint
Throws
This function can throw errors.
InvalidWaypointTextureSelectorError
Overrides
Waypoint.constructor
Properties
color?
optionalcolor?: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
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
isValid
readonlyisValid:boolean
Beta
Remarks
Returns whether the waypoint is currently valid. A waypoint becomes invalid when its tracked entity is no longer valid.
返回路径点当前是否有效。当路径点跟踪的实体不再有效时,路径点将变为无效。
Inherited from
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
Methods
getDimensionLocation()
getDimensionLocation():
DimensionLocation
World Mutation Beta
Returns
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.
InvalidWaypointTextureSelectorError
Inherited from
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
setDimensionLocation()
setDimensionLocation(
dimensionLocation):void
World Mutation Beta
Parameters
dimensionLocation
路径点的新 DimensionLocation(维度和坐标)。
The new DimensionLocation (dimension and coordinates) for the waypoint.
Returns
void
Remarks
更新此路径点指向的维度和位置。
Updates the dimension and location that this waypoint points to.
