Members
Methods
# addBlock(Block)
Add a block to the map.
Parameters:
Name | Type | Description |
---|---|---|
Block |
BlockInfo
|
to be added to the map |
# addBlockLine(Position1, Position2, Color)
Add a block line to the map.
Parameters:
Name | Type | Description |
---|---|---|
Position1 |
Position
|
Position of the start block |
Position2 |
Position
|
Position of the end block |
Color |
BlockColor
|
The block color |
# canBlockAction(X, Y, Z) → {boolean}
Check if its possible to use Ace of Spades actions... Basically checks if the action will be inside the map limits.
Parameters:
Name | Type | Description |
---|---|---|
X |
number
|
X Coordinate |
Y |
number
|
Y Coordinate |
Z |
number
|
Z Coordinate |
boolean
# getBlock(X, Y, Z) → {BlockInfo}
Get a block from specific coordinates.
Parameters:
Name | Type | Description |
---|---|---|
X |
number
|
X Coordinate |
Y |
number
|
Y Coordinate |
Z |
number
|
Z Coordinate |
# getBlockIndex(X, Y, Z)
Get the block index in the 1D array, from 3D coordinate.
Parameters:
Name | Type | Description |
---|---|---|
X |
number
|
X Coordinate |
Y |
number
|
Y Coordinate |
Z |
number
|
Z Coordinate |
# getTopBlock(X, Y) → {BlockInfo}
Get first block from the sky block to the bottom.
Parameters:
Name | Type | Description |
---|---|---|
X |
number
|
X Coordinate |
Y |
number
|
Y Coordinate |
Block infos.
# getTopCoordinate(X, Y) → {number}
Get the coordinate from the first block from the sky to the bottom.
Parameters:
Name | Type | Description |
---|---|---|
X |
number
|
X Coordinate |
Y |
number
|
Y Coordinate |
Block coordinates.
number
# isSurface(X, Y, Z) → {boolean}
Check if block is visible (a.k.a. a surface) in any of axis.
Parameters:
Name | Type | Description |
---|---|---|
X |
number
|
X Coordinate |
Y |
number
|
Y Coordinate |
Z |
number
|
Z Coordinate |
boolean
# removeBlock(X, Y, Z)
Remove a block from the map.
Parameters:
Name | Type | Description |
---|---|---|
X |
number
|
X Coordinate |
Y |
number
|
Y Coordinate |
Z |
number
|
Z Coordinate |