Package journeymap.api.v2.client.display
Class ImageOverlay
java.lang.Object
journeymap.api.v2.client.display.Displayable
journeymap.api.v2.client.display.Overlay
journeymap.api.v2.client.display.ImageOverlay
- All Implemented Interfaces:
Comparable<Displayable>
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.
-
Field Summary
Fields inherited from class journeymap.api.v2.client.display.Overlay
activeMapTypes, activeUIs, dimension, displayOrder, label, maxZoom, minZoom, needsRerender, overlayGroupName, overlayListener, textProperties, titleFields inherited from class journeymap.api.v2.client.display.Displayable
displayType, id, modId -
Constructor Summary
ConstructorsConstructorDescriptionImageOverlay(String modId, net.minecraft.core.BlockPos northWestPoint, net.minecraft.core.BlockPos southEastPoint, MapImage image) Constructor. -
Method Summary
Modifier and TypeMethodDescriptiongetImage()Image to display as the overlay.net.minecraft.core.BlockPosTop-left location of the image overlay.net.minecraft.core.BlockPosBottom-right location of the image overlay.Sets image to display as the overlay.setNorthWestPoint(net.minecraft.core.BlockPos northWestPoint) Sets top-left location of the image overlay.setSouthEastPoint(net.minecraft.core.BlockPos southEastPoint) Sets bottom-right location of the image overlay.toString()Methods inherited from class journeymap.api.v2.client.display.Overlay
clearFlagForRerender, flagForRerender, getActiveMapTypes, getActiveUIs, getDimension, getDisplayOrder, getLabel, getMaxZoom, getMinZoom, getNeedsRerender, getOverlayGroupName, getOverlayListener, getTextProperties, getTitle, isActiveIn, isInZoomRange, setActiveMapTypes, setActiveUIs, setDimension, setDisplayOrder, setLabel, setMaxZoom, setMinZoom, setOverlayGroupName, setOverlayListener, setTextProperties, setTitle, toStringHelperMethods inherited from class journeymap.api.v2.client.display.Displayable
clampOpacity, clampRGB, compareTo, equals, getDisplayType, getGuid, getId, getModId, hashCode
-
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
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
Sets bottom-right location of the image overlay.- Parameters:
southEastPoint- point- Returns:
- this
-
getImage
Image to display as the overlay.- Returns:
- icon
-
setImage
Sets image to display as the overlay.- Parameters:
image- image- Returns:
- this
-
toString
-