endstone.map
Classes relating to plugin handling of map displays.
Classes relating to plugin handling of map displays.
Classes
| Name | Description |
|---|---|
MapCanvas | Represents a canvas for drawing to a map. Each canvas is associated with a specific MapRenderer and represents that renderer's layer on the map. |
MapCursor | Represents a cursor on a map. |
MapRenderer | Represents a renderer for a map. |
MapView | Represents a map item. |
classMapCanvas
MapCanvas()Represents a canvas for drawing to a map. Each canvas is associated with a specific MapRenderer and represents that renderer's layer on the map.
Methods
| Name | Description |
|---|---|
draw_image | Draw an image to the map. The image will be clipped if necessary. |
get_pixel | Get a pixel from the canvas. |
get_pixel_color | Get a pixel from the canvas. |
set_pixel | Draw a pixel to the canvas. |
set_pixel_color | Draw a pixel to the canvas. |
Attributes
attrcursorsproperty
Get the cursorS associated with this canvas.
attrmap_viewproperty
map_view: MapViewGet the map this canvas is attached to.
methdraw_image
Draw an image to the map. The image will be clipped if necessary.
methget_pixel
Get a pixel from the canvas.
methget_pixel_color
Get a pixel from the canvas.
methset_pixel
Draw a pixel to the canvas.
methset_pixel_color
Draw a pixel to the canvas.
classMapCursor
Represents a cursor on a map.
Classes
| Name | Description |
|---|---|
Type | Represents the standard types of map cursors. |
Attributes
| Name | Type | Description |
|---|---|---|
caption | str | Get or set the caption on this cursor. |
direction | int | Get or set the direction of this cursor |
is_visible | bool | Get or set the visibility statis of this cursor. |
type | Type | Get or set the type of this cursor. |
x | int | Get or set the X position of this cursor. |
y | int | Get or set the Y position of this cursor. |
attrcaptionproperty
caption: strGet or set the caption on this cursor.
attrdirectionproperty
direction: intGet or set the direction of this cursor
attris_visibleproperty
is_visible: boolGet or set the visibility statis of this cursor.
attrtypeproperty
type: TypeGet or set the type of this cursor.
attrxproperty
x: intGet or set the X position of this cursor.
attryproperty
y: intGet or set the Y position of this cursor.
classType
Bases: Enum
Type()Represents the standard types of map cursors.
Attributes
attrBLUE_MARKER
BLUE_MARKER = 3attrCYAN_MARKER
CYAN_MARKER = 11attrFRAME
FRAME = 1attrGREEN_POINT
GREEN_POINT = 12attrJUNGLE_TEMPLE
JUNGLE_TEMPLE = 22attrMANSION
MANSION = 14attrMONUMENT
MONUMENT = 15attrORANGE_MARKER
ORANGE_MARKER = 9attrPINK_MARKER
PINK_MARKER = 8attrPLAYER
PLAYER = 0attrPLAYER_OFF_LIMITS
PLAYER_OFF_LIMITS = 13attrPLAYER_OFF_MAP
PLAYER_OFF_MAP = 6attrRED_MARKER
RED_MARKER = 2attrSIGN_MARKER
SIGN_MARKER = 7attrSWAMP_HUT
SWAMP_HUT = 23attrTARGET_POINT
TARGET_POINT = 5attrTARGET_X
TARGET_X = 4attrTRIAL_CHAMBERS
TRIAL_CHAMBERS = 24attrVILLAGE_DESERT
VILLAGE_DESERT = 17attrVILLAGE_PLAINS
VILLAGE_PLAINS = 18attrVILLAGE_SAVANNA
VILLAGE_SAVANNA = 19attrVILLAGE_SNOWY
VILLAGE_SNOWY = 20attrVILLAGE_TAIGA
VILLAGE_TAIGA = 21attrYELLOW_MARKER
YELLOW_MARKER = 10classMapRenderer
MapRenderer(is_contextual: bool = False)Represents a renderer for a map.
Methods
| Name | Description |
|---|---|
initialize | Initialize this MapRenderer for the given map. |
render | Render to the given map. |
classMapView
MapView()Represents a map item.
Classes
| Name | Description |
|---|---|
Scale | An enum representing all possible scales a map can be set to. |
Methods
| Name | Description |
|---|---|
add_renderer | Add a renderer to this map. |
remove_renderer | Remove a renderer from this map. |
Attributes
| Name | Type | Description |
|---|---|---|
CLOSE | ||
CLOSEST | ||
FAR | ||
FARTHEST | ||
NORMAL | ||
center_x | int | Get or set the center X position of this map. |
center_z | int | Get or set the center Z position of this map. |
dimension | Dimension | Get or set the dimension that this map is associated with. |
id | int | Get the ID of this map item for use with MapMeta. |
is_unlimited_tracking | bool | Whether the map will show a smaller position cursor (true), or no position cursor (false) when cursor is outside of map's range. |
is_virtual | bool | Check whether this map is virtual. |
locked | bool | Whether the map is locked or not. A locked map may not be explored further. |
renderers | list[MapRenderer] | Get a copied list of MapRenderers currently in effect. |
scale | Scale | Get or set the scale of this map. |
attrCLOSE
CLOSEattrCLOSEST
CLOSESTattrFAR
FARattrFARTHEST
FARTHESTattrNORMAL
NORMALattrcenter_xproperty
center_x: intGet or set the center X position of this map.
attrcenter_zproperty
center_z: intGet or set the center Z position of this map.
attrdimensionproperty
dimension: DimensionGet or set the dimension that this map is associated with.
attridproperty
id: intGet the ID of this map item for use with MapMeta.
attris_unlimited_trackingproperty
is_unlimited_tracking: boolWhether the map will show a smaller position cursor (true), or no position cursor (false) when cursor is outside of map's range.
attris_virtualproperty
is_virtual: boolCheck whether this map is virtual.
attrlockedproperty
locked: boolWhether the map is locked or not. A locked map may not be explored further.
attrrenderersproperty
renderers: list[MapRenderer]Get a copied list of MapRenderers currently in effect.
attrscaleproperty
scale: ScaleGet or set the scale of this map.
classScale
Bases: IntEnum
Scale()An enum representing all possible scales a map can be set to.
methadd_renderer
add_renderer(renderer: MapRenderer) -> NoneAdd a renderer to this map.
methremove_renderer
remove_renderer(renderer: MapRenderer) -> boolRemove a renderer from this map.