2021-03-28 00:12:41 +01:00
|
|
|
# flowlib
|
|
|
|
Simple flow functions.
|
|
|
|
|
2021-03-28 00:18:19 +01:00
|
|
|
## flowlib.is_touching(realpos, nodepos, radius)
|
2024-09-12 18:13:52 +02:00
|
|
|
Return true if a sphere of `radius` at `realpos` collide with node at `nodepos`.
|
2021-03-28 00:18:19 +01:00
|
|
|
* realpos: position
|
|
|
|
* nodepos: position
|
|
|
|
* radius: number
|
2021-03-28 00:12:41 +01:00
|
|
|
|
|
|
|
## flowlib.is_water(pos)
|
2024-09-12 18:13:52 +02:00
|
|
|
Return true if node at `pos` is water, false otherwise.
|
2021-03-28 00:12:41 +01:00
|
|
|
* pos: position
|
|
|
|
|
|
|
|
## flowlib.node_is_water(node)
|
2024-09-12 18:13:52 +02:00
|
|
|
Return true if `node` is water, false otherwise.
|
2021-03-28 00:12:41 +01:00
|
|
|
* node: node
|
|
|
|
|
|
|
|
## flowlib.is_lava(pos)
|
2024-09-12 18:13:52 +02:00
|
|
|
Return true if node at `pos` is lava, false otherwise.
|
2021-03-28 00:12:41 +01:00
|
|
|
* pos: position
|
|
|
|
|
|
|
|
## flowlib.node_is_lava(node)
|
2024-09-12 18:13:52 +02:00
|
|
|
Return true if `node` is lava, false otherwise.
|
2021-03-28 00:12:41 +01:00
|
|
|
* node: node
|
|
|
|
|
|
|
|
## flowlib.is_liquid(pos)
|
2024-09-12 18:13:52 +02:00
|
|
|
Return true if node at `pos` is liquid, false otherwise.
|
2021-03-28 00:12:41 +01:00
|
|
|
* pos: position
|
|
|
|
|
|
|
|
## flowlib.node_is_liquid(node)
|
2024-09-12 18:13:52 +02:00
|
|
|
Return true if `node` is liquid, false otherwise.
|
2021-03-28 00:12:41 +01:00
|
|
|
* node: node
|
|
|
|
|
|
|
|
## flowlib.quick_flow(pos, node)
|
2021-03-28 00:23:57 +01:00
|
|
|
Return direction where the water is flowing (to be use to push mobs, items...).
|
2021-03-28 00:12:41 +01:00
|
|
|
* pos: position
|
|
|
|
* node: node
|
|
|
|
|
2021-03-28 00:25:54 +01:00
|
|
|
## flowlib.move_centre(pos, realpos, node, radius)
|
2024-09-12 18:13:52 +02:00
|
|
|
Return the pos of the nearest not water block near from `pos` in a sphere of `radius` at `realpos`.
|
|
|
|
WARNING: This function is never used in VL, use at your own risk. The informations described here may be wrong.
|
2021-03-28 00:25:54 +01:00
|
|
|
* pos: position
|
2021-03-28 00:32:52 +01:00
|
|
|
* realpos: position, position of the entity
|
2021-03-28 00:25:54 +01:00
|
|
|
* node: node
|
2024-09-12 18:13:52 +02:00
|
|
|
* radius: number
|