Coordinates
Coordinates are the counterpart to Blocks: they are used to specify where they should go. Coordinates by themselves are very easy to understand, and also provide complex mathematical tools for easier development.
A basic coordinate can be declared using an array-like syntax ([]
), with specified coordinates in integer or decimal format:
To combine coordinates in one line, you can use the join keyword (*
):
Coordinates must be in [X, Y]
format for a 2D Level, or a [X, Y, Z]
format for a 3D Level. This is determined by the @type
header described in Headers.
Matrices
Coordinates can also utilize what is known as a coordinate matrix. In simple terms, it creates a rectangle that is bounded by a center coordinate.
This line uses the binding keyword (^
) to bind the matrix (0, 3, 0, 3)
to the center point of [0, 0]
. What this does is construct points from [0, 0]
to [3, 3]
since the matrix starts at 0
and goes to 3
in both X and Y directions. This then is added to the center coordinate, simplifying to a list of coordinates in that area.
You can join matrices together with other points or other matrices using the join keyword described earlier:
Matrices are also supported in a 3D Format:
Although points support decimal format, as of now, matrices only support integers.
Examples
Example 1
This 2D example declares stone to be placed under grass.
Example 2
This 3D example declares a line of both basic and cracked stone.
Example 3
This 2D example declares a smaller set of grass, on top of a large set of grass, under a large set of stone.
Last updated