Map
endstone.map
¶
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. |
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:
| Name | Type | Description |
|---|---|---|
cursors |
list[MapCursor]
|
Get the cursorS associated with this canvas. |
map_view |
MapView
|
Get the map this canvas is attached to. |
draw_image
¶
Draw an image to the map. The image will be clipped if necessary.
MapCursor
¶
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. |
Type
¶
Bases: Enum
Represents the standard types of map cursors.
Attributes:
MapRenderer
¶
MapRenderer(is_contextual: bool = False)
Represents a renderer for a map.
Initialize the map renderer base with the given contextual status.
Methods:
| Name | Description |
|---|---|
initialize |
Initialize this MapRenderer for the given map. |
render |
Render to the given map. |
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. |
dimension
property
writable
¶
dimension: Dimension
Get or set the dimension that this map is associated with.
is_unlimited_tracking
property
writable
¶
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.
locked
property
writable
¶
locked: bool
Whether the map is locked or not. A locked map may not be explored further.
renderers
property
¶
renderers: list[MapRenderer]
Get a copied list of MapRenderers currently in effect.