Class MarkerOverlay

All Implemented Interfaces:
Comparable<Displayable>

@ParametersAreNonnullByDefault public final class MarkerOverlay extends Overlay
A Marker overlay shows a geographical point on the map with an icon and a label. For example: A pushpin shown at the world spawn point.

Setters use the Builder pattern so they can be chained.

Note that like all Displayables, simply changing this object doesn't guarantee the player will get the changes. You must call IClientAPI.show(Displayable) in order for the changes to take effect in JourneyMap.

  • Constructor Details

    • MarkerOverlay

      public MarkerOverlay(String modId, net.minecraft.core.BlockPos point, MapImage icon)
      Constructor.
      Parameters:
      modId - Your mod id.
      point - Location of the marker.
      icon - The icon to display as the marker.
  • Method Details

    • getPoint

      public net.minecraft.core.BlockPos getPoint()
      Location of the marker.
    • setPoint

      public MarkerOverlay setPoint(net.minecraft.core.BlockPos point)
      Sets the location of the marker.
      Parameters:
      point - location
      Returns:
      this
    • getIcon

      public MapImage getIcon()
      Icon to display in the marker.
      Returns:
      icon
    • setIcon

      public MarkerOverlay setIcon(MapImage icon)
      Sets the icon to display in the marker.
      Parameters:
      icon - marker image
      Returns:
      this
    • toString

      public String toString()
      Overrides:
      toString in class Object