Download PlayerWaypoints — Minecraft Mods — MetaMods

PlayerWaypoints

Active

Downloads

0

Last update

3 months ago

Versions

1.21.7
Server
Fabric

PlayerWaypoints

Server-side mod for creating custom navigation points

This server-side mod allows adding custom markers to the locator panel using Polymer's virtual entity technology. You can create navigation points for the entire world as well as for individual players, attaching them similarly to other virtual objects.

Types of navigation points

Global markers

Global navigation points are displayed to all players located in the same world where the marker is placed.

PlayerWaypointManager.addGlobalWaypoint(serverWorld, pos, id) -> WaypointElement

PlayerWaypointManager.addGlobalWaypoint(serverWorld, waypointElement) -> WaypointElement

Removing a marker:

PlayerWaypointManager.removeGlobalWaypoint(serverWorld, waypointElement) -> void

Personal markers

Individual navigation points are visible only to a specific player when they are in the same world.

PlayerWaypointManager.addPlayerWaypoint(player, serverWorld, pos, id) -> WaypointElement

PlayerWaypointManager.addPlayerWaypoint(player, serverWorld, waypointElement) -> WaypointElement

Removing a marker:

PlayerWaypointManager.removePlayerWaypoint(player, serverWorld, waypointElement) -> void

Integration with Polymer

Navigation points are built on Polymer's virtual entities, so you can add WaypointElement the same way as any other element.

WaypointElement Class

The WaypointElement class is the primary way of representing navigation points for the locator panel.

<ctor> WaypointElement(ServerWorld, Identifier)

Configuration

WaypointElement::getConfig(ServerPlayerEntity) : Gets the point's client-side configuration

WaypointElement::setColor(int) : Sets the marker color - RGB

WaypointElement::setStyle(RegistryKey<WaypointStyle>) : Sets the navigation point style See: Minecraft Wiki / Waypoint Styles
- Note on waypoint styles: distance calculation doesn't work, so the "furthest" sprite is always displayed. This is a known issue.
- However, you can override getConfig(...) and manually change the style depending on distance using getDistanceTo.

Positioning and transmission

WaypointElement::setWaypointTransmitRange(double) : Sets the visibility range of the point. The marker will stop transmitting beyond this distance.

WaypointElement::setPosition(Vec3d) : Sets the position of the navigation point.
- You can also use setOffset(...) for the same result.

WaypointElement::isPlayerInRange(PlayerEntity) -> boolean : Determines whether the point should be transmitted to this player.

WaypointElement::getObservers() -> Set<PlayerEntity> : Gets all players to whom this point is currently being transmitted

WaypointElement::getDistanceTo(PlayerEntity)
WaypointElement::getSquaredDistanceTo(PlayerEntity Gets the distance from the point to the specified player

Waypoint Holograms (WIP)

Holograms can be attached to WaypointElements to display information to the user.
By default, holograms are displayed directly above the navigation point.

This feature is experimental and may not work correctly. It's recommended to create holograms separately.

Positioning can be changed using getHologramElementPosition

WaypointElement::setHologram(List<Text>) : Sets the point's hologram using MarkerElements

WaypointElement::setHologram(List<HologramData>) : Sets the point's hologram

WaypointElement::removeHologram(HologramData) : Removes a hologram from the point

getHologramElementPosition(Vec3d origin, int line, HologramData) -> Vec3d : Gets the position of a hologram element
Default: origin.offset(Direction.UP, (line * 0.25f))

Additional utilities

SVPlayerWaypoints.getHolderForWorld(ServerWorld) : Gets a container exactly at position [0,0,0]

Project members
Feintha

Feintha

Developer

Created: 21 Jul 2025

ID: 257750