diff options
author | Warr1024 <warr1024@gmail.com> | 2021-07-09 09:08:40 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-09 09:08:40 -0400 |
commit | 52128ae11e8b1a7ce66a87c53f1b15f3aabe69f4 (patch) | |
tree | dff52505d4b86b9934cc6f37f9b4ceeca5a54014 /doc | |
parent | e9bc59e376f88f1d4d1c6d3fedf62d9049e3e60d (diff) | |
download | minetest-52128ae11e8b1a7ce66a87c53f1b15f3aabe69f4.tar.gz minetest-52128ae11e8b1a7ce66a87c53f1b15f3aabe69f4.tar.bz2 minetest-52128ae11e8b1a7ce66a87c53f1b15f3aabe69f4.zip |
Add API for mods to hook liquid transformation events (#11405)
Add API for mods to hook liquid transformation events
Without this API, there is no reliable way for mods to be
notified when liquid transform modifies nodes and mods are
forced to poll for changes. This allows mods to detect
changes to flowing liquid nodes and liquid renewal using
event-driven logic.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/lua_api.txt | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt index aa59898d7..fc6d077e1 100644 --- a/doc/lua_api.txt +++ b/doc/lua_api.txt @@ -4859,6 +4859,12 @@ Call these functions only at load time! * Called when an incoming mod channel message is received * You should have joined some channels to receive events. * If message comes from a server mod, `sender` field is an empty string. +* `minetest.register_on_liquid_transformed(function(post_list, node_list))` + * Called after liquid nodes are modified by the engine's liquid transformation + process. + * `pos_list` is an array of all modified positions. + * `node_list` is an array of the old node that was previously at the position + with the corresponding index in pos_list. Setting-related --------------- |