1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Add callback on_mapblocks_changed

This commit is contained in:
Jude Melton-Houghton 2022-09-03 22:05:07 -04:00
parent 7701e70dc9
commit 5c248c2d7d
10 changed files with 141 additions and 6 deletions

View file

@ -22,6 +22,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "cpp_api/s_base.h"
#include "irr_v3d.h"
#include "mapnode.h"
#include <unordered_set>
#include <vector>
class ServerEnvironment;
@ -48,5 +49,11 @@ public:
// Called after liquid transform changes
void on_liquid_transformed(const std::vector<std::pair<v3s16, MapNode>> &list);
// Called after mapblock changes
void on_mapblocks_changed(const std::unordered_set<v3s16> &set);
// Determines whether there are any on_mapblocks_changed callbacks
bool has_on_mapblocks_changed();
void initializeEnvironment(ServerEnvironment *env);
};