From 5c248c2d7de3db54e85f7c388743a2eb8e36fee4 Mon Sep 17 00:00:00 2001 From: Jude Melton-Houghton Date: Sat, 3 Sep 2022 22:05:07 -0400 Subject: Add callback on_mapblocks_changed --- src/script/cpp_api/s_env.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/script/cpp_api/s_env.h') 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 #include class ServerEnvironment; @@ -48,5 +49,11 @@ public: // Called after liquid transform changes void on_liquid_transformed(const std::vector> &list); + // Called after mapblock changes + void on_mapblocks_changed(const std::unordered_set &set); + + // Determines whether there are any on_mapblocks_changed callbacks + bool has_on_mapblocks_changed(); + void initializeEnvironment(ServerEnvironment *env); }; -- cgit v1.2.3