Creating a map
Create and manipulate maps.
Painting on canvas
Allows you to draw on a canvas, create images, and write text.
Create and manipulate maps.
Allows you to draw on a canvas, create images, and write text.
Returns a canvas object that can be used to create and manipulate a map, which can later be retrieved as a game map object.
[new|empty] drawing map
When creating a map in a folder /skcrew/maps/
, a map image file will be created. The file name will match the ID of the game map.
[drawing] map (by|with) id %number%
Accepts a canvas object as an argument, which represents a drawable map surface, and returns a game map item that can be used in the game.
[the] map item (from|of) %map%
Accepts a map item (of type ItemStack
) as an argument, which represents a game map item, and returns a canvas object that can be used for drawing and manipulating the map’s visual content.
[drawing] map (of|from) item %itemstack%
save map %map%
Maps are not automatically loaded. To prevent them from disappearing, store the canvases of these maps in global variables.
The addon supports automatic serialization of data associated with canvases.
pixel %number%(,[ ]| )%number% of %map%
It does not allow you to change the color of a pixel, use the expression paint over a pixel
Allows you to set a specific color for a pixel based on its coordinates. The first two arguments point to the coordinates on the canvas, the subsequent ones are in RGB or RGBA format, and the last one is the canvas.
draw pixel [at] %number%(,[ ]| )%number% [with colo[u]r] %number%(,[ ]| )%number%(,[ ]| )%number%[(,[ ]| )%-number%] on [map] %map%
Allows you to set a specific color for pixels in the range.
The first four arguments point to the coordinates on the canvas, the next color is in RGB or RGBA format, and the last one is the canvas.
draw pixels (from|between) %number%(,[ ]| )%number% [to] %number%(,[ ]| )%number% [with colo[u]r] %number%(,[ ]| )%number%(,[ ]| )%number%[(,[ ]| )%-number%] on [map] %map%
Accepts similar arguments with pixel coloring.
draw line (from|between) %number%(,[ ]| )%number% [to] %number%(,[ ]| )%number% [with colo[u]r] %number%(,[ ]| )%number%(,[ ]| )%number%[(,[ ]| )%-number%] on [map] %map%
The first four arguments are the points between which the main part of the curve will be. The following four arguments allow you to optionally specify control points for the curve offset. The following arguments are similar to drawing a line or coloring pixels.
draw bezier curve (from|between) %number%(,[ ]| )%number% [to] %number%(,[ ]| )%number% [[with] control points] %number%(,[ ]| )%number% [and] %number%(,[ ]| )%number% [with colo[u]r] %number%(,[ ]| )%number%(,[ ]| )%number%[(,[ ]| )%-number%] on [map] %map%
The first two arguments are the center of the circle, the next one is the radius of the circle. The other arguments are color and canvas.
draw circle at %number%(,[ ]| )%number% with radius %number% [with colo[u]r] %number%(,[ ]| )%number%(,[ ]| )%number%[(,[ ]| )%-number%] on [map] %map%
The image should be in the images/
folder of the addon. Takes the name of the image file as the first argument.
draw image %string% on [[the] map] %map%
The first argument is the text to be written, the next two arguments describe the font name and font size.
draw text %string% [at] %number%(,[ ]| )%number% [with font %-string%] [with size %-number%] [with colo[u]r] %number%(,[ ]| )%number%(,[ ]| )%number%[(,[ ]| )%-number%] on [map] %map%