@ParametersAreNonnullByDefault public final class PolygonOverlay extends Overlay
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.
activeMapTypes, activeUIs, dimension, displayOrder, label, maxZoom, minZoom, needsRerender, overlayGroupName, overlayListener, textProperties, titledisplayType, id, modId| Constructor and Description |
|---|
PolygonOverlay(java.lang.String modId,
net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> dimension,
ShapeProperties shapeProperties,
MapPolygon outerArea)
Constructor.
|
PolygonOverlay(java.lang.String modId,
net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> dimension,
ShapeProperties shapeProperties,
MapPolygon outerArea,
java.util.List<MapPolygon> holes)
Constructor.
|
PolygonOverlay(java.lang.String modId,
net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> dimension,
ShapeProperties shapeProperties,
MapPolygonWithHoles polygon)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.List<MapPolygon> |
getHoles()
(optional) A list of polygons treated as holes inside the outerArea
|
MapPolygon |
getOuterArea()
A polygon of the outer area to be displayed.
|
ShapeProperties |
getShapeProperties()
Gets the shape properties used to display the polygons.
|
PolygonOverlay |
setHoles(java.util.List<MapPolygon> holes)
Sets a list of polygons treated as holes inside the outerArea
|
PolygonOverlay |
setOuterArea(MapPolygon outerArea)
Sets the polygon of the outer area to be displayed.
|
PolygonOverlay |
setPolygonWithHoles(MapPolygonWithHoles polygon)
Sets the outer area and holes in one go.
|
PolygonOverlay |
setShapeProperties(ShapeProperties shapeProperties)
Sets the shape properties used to display the polygons.
|
java.lang.String |
toString() |
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, toStringHelperclampOpacity, clampRGB, compareTo, equals, getDisplayType, getGuid, getId, getModId, hashCodepublic PolygonOverlay(java.lang.String modId,
net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> dimension,
ShapeProperties shapeProperties,
MapPolygon outerArea)
modId - Your mod id.outerArea - A polygon of the outer area to be displayed.public PolygonOverlay(java.lang.String modId,
net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> dimension,
ShapeProperties shapeProperties,
MapPolygonWithHoles polygon)
modId - Your mod id.polygon - A polygon of the outer area with holes to be displayed.public PolygonOverlay(java.lang.String modId,
net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> dimension,
ShapeProperties shapeProperties,
MapPolygon outerArea,
@Nullable
java.util.List<MapPolygon> holes)
modId - Your mod id.outerArea - A polygon of the outer area to be displayed.holes - (Optional) A list of polygons treated as holes inside the outerAreapublic MapPolygon getOuterArea()
public PolygonOverlay setOuterArea(MapPolygon outerArea)
outerArea - polygonpublic java.util.List<MapPolygon> getHoles()
public PolygonOverlay setHoles(@Nullable java.util.List<MapPolygon> holes)
holes - polygonspublic PolygonOverlay setPolygonWithHoles(MapPolygonWithHoles polygon)
public ShapeProperties getShapeProperties()
public PolygonOverlay setShapeProperties(ShapeProperties shapeProperties)
shapeProperties - propertiespublic java.lang.String toString()
toString in class java.lang.Object