PlayerWaypoints
No reviews yet
Server-side mod for adding custom waypoints to the Locator Bar using Polymer's Virtual-Entity API
Fabric is a mod loader for versions 1.14+ of Minecraft, particularly popular for client side and optimization mods.
Community voices
Reviews
Click once to include, again to exclude, again to clear
No reviews yet. Be the first to review this project!
Get it on
Available Platforms
Compatibility
Supported Environments
About
Project Details
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.
Use HTML for any page that supports it, or Markdown for README files and Markdown-based descriptions.
Identifiers
Platform IDs
Resources
External Links
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
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
By the numbers
Statistics
Want to reach Minecraft players?
We're looking for a server hosting partner to feature here and other parts of the site. Interested? Send us a message!
Get in touchGet it on
Available Platforms
On ModDex
Community snapshot
By the numbers
Statistics
Resources