Skip to content

feat: implementation of interactive POI icons with JourneyMap API #22

Description

@EngineerSmith

To improve player navigation and base planning, we need a system to sync specific block coordinates (Points of Interest) from the server to the JourneyMap client. The initial implementation will focus on Trade Stations.

Feature 1 - Dynamic Icons

  • Icons should be an abstract class that can be extended to add types of icons
  • ImageOverlays should use ResourceLocation to allow easy reskinning of textures
    • Ensure that MapImage uses the centre of textures as their anchor point
  • State Sync
    • On Login: Server sends a bulk packet of existing POI locations
    • On Placement & Removal: Server sends a delta packet to update the connected clients.
  • Icons should have event callbacks, such as onHoverEnter, onHoverExit, onClick.
  • Each icon implementation should be named using a resourceLocation, such as, ptdyeplus:icon_trade_stations. This field can be shared with clients so they know what type each icon is.

NOTE: We may need to make a new packet class/record per icon implementation, but investigate if it's possible to use the same packet for all icons

Feature 2 - Trade Station Icon Implementation

  • Add trade station icon, use a debug texture, or use the front-face of the trade station block texture.
  • Add function showOverlay: Fade in Polygon overlay that shows boundary using partial ticks if possible, otherwise instance
  • Add function hideOverlay: Fade out Polygon overlay that shows boundary
  • Link above functions to the onHoverEnter, and onHoverExit events respectively.
  • Link above functions for when a player is holding a trade station item (all trade station icons should be actived/deactivated, unless currently hovered, such hover events should be ignored when the overlays are actived by the player holding item state).

NOTE: By boundary, each trade station has a distance that they don't allow any new trade station placement.

Metadata

Metadata

Assignees

No fields configured for Feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions