mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
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.
This commit is contained in:
parent
e9bc59e376
commit
52128ae11e
5 changed files with 47 additions and 1 deletions
|
@ -829,7 +829,7 @@ void Map::transformLiquids(std::map<v3s16, MapBlock*> &modified_blocks,
|
|||
m_transforming_liquid.push_back(iter);
|
||||
|
||||
voxalgo::update_lighting_nodes(this, changed_nodes, modified_blocks);
|
||||
|
||||
env->getScriptIface()->on_liquid_transformed(changed_nodes);
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
* Manage the queue so that it does not grow indefinately
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue