Class ImageOverlay

All Implemented Interfaces:
Comparable<Displayable>

@ParametersAreNonnullByDefault public final class ImageOverlay extends Overlay
An image overlay places an image on the map between the given coordinates.

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

    • ImageOverlay

      public ImageOverlay(String modId, net.minecraft.core.BlockPos northWestPoint, net.minecraft.core.BlockPos southEastPoint, MapImage image)
      Constructor.
      Parameters:
      modId - Your mod id.
      northWestPoint - Location of the top-left corner of the image.
      southEastPoint - Location of the lower-right corner of the image.
      image - The image to display as the overlay.
  • Method Details

    • getNorthWestPoint

      public net.minecraft.core.BlockPos getNorthWestPoint()
      Top-left location of the image overlay.
    • setNorthWestPoint

      public ImageOverlay setNorthWestPoint(net.minecraft.core.BlockPos northWestPoint)
      Sets top-left location of the image overlay.
      Parameters:
      northWestPoint - point
      Returns:
      this
    • getSouthEastPoint

      public net.minecraft.core.BlockPos getSouthEastPoint()
      Bottom-right location of the image overlay.
    • setSouthEastPoint

      public ImageOverlay setSouthEastPoint(net.minecraft.core.BlockPos southEastPoint)
      Sets bottom-right location of the image overlay.
      Parameters:
      southEastPoint - point
      Returns:
      this
    • getImage

      public MapImage getImage()
      Image to display as the overlay.
      Returns:
      icon
    • setImage

      public ImageOverlay setImage(MapImage image)
      Sets image to display as the overlay.
      Parameters:
      image - image
      Returns:
      this
    • toString

      public String toString()
      Overrides:
      toString in class Object