Documentation

Route view

The MTR route-line overlay on Xaero's World Map.

As well as waypoints, MTR Surveyor can draw the full MTR route network directly onto Xaero’s World Map GUI — colored lines following the actual track geometry between platforms.

This feature only activates when Xaero’s World Map is installed. If only Xaero’s Minimap is present, you still get waypoints; the route overlay is silently skipped.

The toggle widget

When you open the world map, a small MTR widget appears in the top-left corner:

  • Green MTR — route overlay is on.
  • Red MTR — route overlay is off.

Left-click the widget to toggle. The state is kept in memory for the current session (it isn’t persisted to the config file).

The widget is drawn at a fixed position (x=5, y=60, size 40×16), so it sits just under Xaero’s own UI elements without overlapping.

What gets drawn

For every MTR route (both regular Routes and SimplifiedRoutes) visible to your client:

  1. The route’s ordered list of platforms is read.
  2. For each consecutive pair of platforms, a line segment is drawn between the two platforms’ mid-positions (X/Z).
  3. Each segment is colored using the route’s own MTR color, at ~78% opacity (alpha 200).
  4. Lines are rendered as quads with a half-width of 3 world-units — thick enough to read at any zoom, thin enough not to drown the map.

Data is pulled from both MTR client data sources:

  • MinecraftClientData.getInstance() — the live, streaming copy.
  • MinecraftClientData.getDashboardInstance() — populated when you’ve opened the MTR dashboard.

This dual-source read is what lets the overlay work on servers where you can’t access MTR’s server-side state directly.

Coordinate transform

To turn world coordinates into the world map’s screen space, MTR Surveyor:

  1. Reads the map’s camera X/Z and zoom scale from Xaero’s GuiMap (via a mixin accessor).
  2. Translates to screen center, scales by mapScale / guiScale, then offsets by -cameraX, -cameraZ.

The result is that route lines pan and zoom in lock-step with the underlying map — they behave like a native map layer.

Performance

  • Rendering is throttled and the line buffer is flushed once per frame, so there’s no per-frame allocation buildup.
  • A one-shot failure guard disables further rendering if an exception ever occurs, to prevent log spam. If the overlay silently stops working, report it with your game log.

Limitations

  • Lines are straight segments between platforms — they don’t curve to follow track spline geometry. On long inter-station runs they may cut corners.
  • The overlay is drawn on top of the map but under Xaero’s own waypoints and HUD.
  • Only the world map screen gets the overlay — the minimap corner view does not.