aboutsummaryrefslogtreecommitdiff
path: root/src/script/cpp_api/s_env.h
diff options
context:
space:
mode:
authorJude Melton-Houghton <jwmhjwmh@gmail.com>2022-09-03 22:05:07 -0400
committerJude Melton-Houghton <jwmhjwmh@gmail.com>2022-12-24 08:24:59 -0500
commit5c248c2d7de3db54e85f7c388743a2eb8e36fee4 (patch)
treeb0d27690b3e852b207345dc5e00dc4457a7e6268 /src/script/cpp_api/s_env.h
parent7701e70dc92262c41d68cf1c9f7fbd0c333e5c52 (diff)
downloadminetest-5c248c2d7de3db54e85f7c388743a2eb8e36fee4.tar.xz
Add callback on_mapblocks_changed
Diffstat (limited to 'src/script/cpp_api/s_env.h')
-rw-r--r--src/script/cpp_api/s_env.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/script/cpp_api/s_env.h b/src/script/cpp_api/s_env.h
index 9a50a01cc..bc4c4cd4d 100644
--- a/src/script/cpp_api/s_env.h
+++ b/src/script/cpp_api/s_env.h
@@ -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);
};