@ParametersAreNonnullByDefault public abstract class Overlay extends Displayable
| Modifier and Type | Field and Description |
|---|---|
protected java.util.Set<Context.MapType> |
activeMapTypes |
protected java.util.Set<Context.UI> |
activeUIs |
protected net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> |
dimension |
protected int |
displayOrder |
protected java.lang.String |
label |
protected int |
maxZoom |
protected int |
minZoom |
protected boolean |
needsRerender |
protected java.lang.String |
overlayGroupName |
protected IOverlayListener |
overlayListener |
protected TextProperties |
textProperties |
protected java.lang.String |
title |
displayType, id, modId| Modifier and Type | Method and Description |
|---|---|
void |
clearFlagForRerender()
Used by JourneyMap after the overlay has been re-rendered.
|
void |
flagForRerender()
Indicate the overlay needs to be re-rendered.
|
java.util.Set<Context.MapType> |
getActiveMapTypes()
Returns a set of enums indicating which map types (Day, Night) the overlay should be active in.
|
java.util.Set<Context.UI> |
getActiveUIs()
Returns a set of enums indicating which JourneyMap UIs (Fullscreen, Minimap, Webmap)
the overlay should be active in.
|
net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> |
getDimension()
The dimension this overlay should be displayed in.
|
int |
getDisplayOrder()
Any features are displayed on the map in order of their screen displayOrder, with higher values
displaying in front of features with lower values.
|
java.lang.String |
getLabel()
Label text to be displayed on the overlay.
|
int |
getMaxZoom()
The maximum zoom level (UIState.ZOOM_IN_MAX is highest) where the overlay should be visible.
|
int |
getMinZoom()
The minimum zoom level (UIState.FULLSCREEN_ZOOM_MIN is lowest) where the overlay should be visible.
|
boolean |
getNeedsRerender()
Gets whether the overlay needs to be re-rendered.
|
java.lang.String |
getOverlayGroupName()
A suggested group or category name used to organize map overlays.
|
IOverlayListener |
getOverlayListener()
Gets the listener for user events on the overlay.
|
TextProperties |
getTextProperties()
Gets the text properties for the overlay.
|
java.lang.String |
getTitle()
Rollover text to be displayed when the mouse is over the overlay.
|
boolean |
isActiveIn(UIState uiState)
Whether the overlay should be active for the given contexts.
|
boolean |
isInZoomRange(UIState uiState)
Whether the zoom of the given context is within the zoom range of the overlay.
|
Overlay |
setActiveMapTypes(Context.MapType... activeMapTypes)
Set of enums indicating which JourneyMap map types (Day, Night) the overlay should be active in.
|
Overlay |
setActiveUIs(Context.UI... activeUIs)
Set of enums indicating which JourneyMap UIs (Fullscreen, Minimap, Webmap) the overlay should be active in.
|
Overlay |
setDimension(net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> dimension)
Sets dimension.
|
Overlay |
setDisplayOrder(int zIndex)
Any features are displayed on the map in order of their screen displayOrder, with higher values
displaying in front of features with lower values.
|
Overlay |
setLabel(java.lang.String label)
Label text to be displayed on the overlay.
|
Overlay |
setMaxZoom(int maxZoom)
Sets the maximum zoom level (UIState.ZOOM_IN_MAX is highest) where the overlay should be visible.
|
Overlay |
setMinZoom(int minZoom)
Sets the minimum zoom level (UIState.FULLSCREEN_ZOOM_MIN is lowest) where the overlay should be visible.
|
Overlay |
setOverlayGroupName(java.lang.String overlayGroupName)
A suggested group or category name used to organize map overlays.
|
Overlay |
setOverlayListener(IOverlayListener overlayListener)
Sets a listener for receiving user events related to the Overlay.
|
Overlay |
setTextProperties(TextProperties textProperties)
Sets the text properties for the overlay.
|
Overlay |
setTitle(java.lang.String title)
Rollover text to be displayed when the mouse is over the overlay.
|
protected com.google.common.base.MoreObjects.ToStringHelper |
toStringHelper(Overlay instance)
Provides common output for toStringHelper() to subclasses
|
clampOpacity, clampRGB, compareTo, equals, getDisplayType, getGuid, getId, getModId, hashCodeprotected java.lang.String overlayGroupName
protected java.lang.String title
protected java.lang.String label
protected net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> dimension
protected int minZoom
protected int maxZoom
protected int displayOrder
protected java.util.Set<Context.UI> activeUIs
protected java.util.Set<Context.MapType> activeMapTypes
protected TextProperties textProperties
protected IOverlayListener overlayListener
protected boolean needsRerender
public net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> getDimension()
public Overlay setDimension(net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> dimension)
dimension - the dimensionpublic java.lang.String getOverlayGroupName()
public Overlay setOverlayGroupName(java.lang.String overlayGroupName)
overlayGroupName - the overlay group namepublic java.lang.String getTitle()
public Overlay setTitle(@Nullable java.lang.String title)
title - the titlepublic java.lang.String getLabel()
public Overlay setLabel(@Nullable java.lang.String label)
label - the labelpublic int getMinZoom()
public Overlay setMinZoom(int minZoom)
minZoom - the min zoompublic int getMaxZoom()
public Overlay setMaxZoom(int maxZoom)
maxZoom - the max zoompublic int getDisplayOrder()
getDisplayOrder in class Displayablepublic Overlay setDisplayOrder(int zIndex)
zIndex - the z indexpublic TextProperties getTextProperties()
public Overlay setTextProperties(TextProperties textProperties)
textProperties - propertiespublic java.util.Set<Context.UI> getActiveUIs()
public Overlay setActiveUIs(Context.UI... activeUIs)
activeUIs - active UIspublic java.util.Set<Context.MapType> getActiveMapTypes()
public Overlay setActiveMapTypes(Context.MapType... activeMapTypes)
activeMapTypes - active typespublic boolean isActiveIn(UIState uiState)
uiState - UIStatepublic boolean isInZoomRange(UIState uiState)
uiState - UIStatepublic IOverlayListener getOverlayListener()
public Overlay setOverlayListener(@Nullable IOverlayListener overlayListener)
overlayListener - IOverlayListener implpublic void flagForRerender()
public void clearFlagForRerender()
public boolean getNeedsRerender()
protected final com.google.common.base.MoreObjects.ToStringHelper toStringHelper(Overlay instance)
instance - subclass