PlayerWaypoints

Quick rating

PlayerWaypoints

No reviews yet

Server-side mod for adding custom waypoints to the Locator Bar using Polymer's Virtual-Entity API

Mod Loaders
Fabric
Minecraft

Community voices

Reviews

Versions
Loading versions…
Match includes

Click once to include, again to exclude, again to clear

Rating Any
Any 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0
Min
Max
Play Status
Reviews
Time Played
hrs+
Verified developers only
Has developer response
List view
Grid view
Compact view
Sort by
Date
Rating
Helpful
Unhelpful
Edited
Sort ascending
Delete this review?

This removes your review from the project. You can write a new review after.

Review submitted for moderation

Your review has been sent to moderators, who will check that it meets our guidelines before it appears publicly.

No reviews yet. Be the first to review this project!

Get it on

Available Platforms

Compatibility

Supported Environments

Dev Environment
Client Optional
Server Required

About

Project Details

Type
Mod
License
WTFPL
Latest Version
1.0-SNAPSHOT
Authors

For authors

Embed Badge

If you're the author of this project, you can embed a live badge anywhere that supports HTML or Markdown. It updates automatically whenever ratings change.

Custom banner text
ModDex rating badge preview

Use HTML for any page that supports it, or Markdown for README files and Markdown-based descriptions.

Identifiers

Platform IDs

Modrinth ID

Resources

External Links

Source Issues Wiki Discord

About

Description

PlayerWaypoints

Server-side mod for adding custom waypoints to the Locator Bar using Polymer's Virtual-Entity API

Allows for creation of waypoints per-world as well as per-player, and can be attached like any other virtual entity.

How to use:

Global Waypoints:

Global waypoints will be sent to all players in the world the waypoint is in.

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

Removing a waypoint:

PlayerWaypointManager.removeGlobalWaypoint(serverWorld, waypointElement) -> void

Per-Player Waypoints:

Per-Player waypoints will be sent to the player if they are in the same world.

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

Removing a waypoint:

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

Using with Polymer

The waypoints are built upon Polymer's Virtual Entity Element, so you can add a WaypointElement the same way you would any other element.

The WaypointElement Class

WaypointElements are the basic way of representing a waypoint for the Locator Bar

<ctor> WaypointElement(ServerWorld, Identifier)

Config

WaypointElement::getConfig(ServerPlayerEntity) : Gets the Waypoint's client-bound config

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

WaypointElement::setStyle(RegistryKey<WaypointStyle>) : Sets the Waypoint's style See: Minecraft Wiki / Waypoint Style
- Note for Waypoint Styles: Distance calculation isn't working, so it will always show the "furthest" sprite. This is unfortunately a bug.
- However, you can override getConfig(...) and change the style manually depending on the distance using getDistanceTo.

Positioning and transmission

WaypointElement::setWaypointTransmitRange(double) : Sets the range the player can see the waypoint. The waypoint will stop transmitting after this distance.

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

WaypointElement::isPlayerInRange(PlayerEntity) -> boolean : Whether the waypoint should transmit to this player or not.

WaypointElement::getObservers() -> Set<PlayerEntity> : Gets all players which this Waypoint is currently transmitting to

WaypointElement::getDistanceTo(PlayerEntity)
WaypointElement::getSquaredDistanceTo(PlayerEntity Get distance to a given player from the Waypoint

Waypoint Holograms (WIP)

WaypointElements can have Holograms attached, to display information to the user.
By default, holograms will display directly above the Waypoint.

This is very experimental, and may not work. I'd recommend just building holograms separately.

This can be overridden using getHologramElementPosition

WaypointElement::setHologram(List<Text>) : Sets the Hologram of the Waypoint using MarkerElements
WaypointElement::setHologram(List<HologramData>) : Sets the hologram of the Waypoint

WaypointElement::removeHologram(HologramData) : Removes a Hologram from the Waypoint.

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

Other utilities

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

Screenshots

Gallery

This project has no gallery images yet.

Versions

Files

Relations

Project Relations

More like this

Similar Mods

Suggestions use data such as tags, dependencies, dependents, descriptions, titles, and more to rank how much they overlap with this mod.

On ModDex

Community snapshot

0
Ratings
0
Followers
0
In stacks

By the numbers

Statistics

<1,000
Downloads
Last Updated
CurseForge
Created
Last synced
When ModDex last fetched this project from CurseForge or Modrinth. Every project is re-checked on a schedule, and any project that ships a new file is synced automatically within hours of the release.
New file updates sync automatically
How syncing works