Module arraymanipulator
The ArrayManipulator is similiar to the MapManipulator, except that it does not use the VoxelManip object, but has an internal array which contains all set values.
It is mostly compatible with MapManipulator, which means you can pass it to functions which expect a MapManipulator.
Functions
ArrayManipulator:new (node_data, param2_data) | Creates a new instance of ArrayManipulator. |
ArrayManipulator:get_data () | Does nothing, only for compatibility with MapManipulator. |
ArrayManipulator:get_node (x, z, y) | Gets the node and param2 at the given location. |
ArrayManipulator:set_data () | Does nothing, only for compatibility with MapManipulator. |
ArrayManipulator:set_node (x, z, y, node, param2) | Sets the node at the given location. |
Functions
- ArrayManipulator:new (node_data, param2_data)
-
Creates a new instance of ArrayManipulator.
Parameters:
- node_data The array that contains the values for the nodes part. This is assumed to be a 3d array with x, z, and y values as dimensions.
- param2_data The array that contains the values for the param2 part. This is assumed to be a 3d array with x, z, and y values as dimensions.
Returns:
-
A new instance.
- ArrayManipulator:get_data ()
- Does nothing, only for compatibility with MapManipulator.
- ArrayManipulator:get_node (x, z, y)
-
Gets the node and param2 at the given location.
Parameters:
- x The x coordinate (width).
- z the z coordinate (depth).
- y The y coordinate (height).
Returns:
-
Two values, the node at the given location and the param2 value.
- ArrayManipulator:set_data ()
- Does nothing, only for compatibility with MapManipulator.
- ArrayManipulator:set_node (x, z, y, node, param2)
-
Sets the node at the given location.
Parameters:
- x The x coordinate (width).
- z the z coordinate (depth).
- y The y coordinate (height).
- node The node to set.
- param2 Optional. The param2 data to set for this node.