From 57e5aa662851485902575c3c747437e365bf72c8 Mon Sep 17 00:00:00 2001 From: Dániel Juhász Date: Sat, 11 Mar 2017 17:07:04 +0100 Subject: Light update for map blocks This is not really different from the light update of a voxel manipulator. This update does not assume that the lighting was correct before, therefore it is useful for correction. Also expose this function to the Lua API for light correction, and allow voxel manipulators not to update the light. --- src/map.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/map.h') diff --git a/src/map.h b/src/map.h index 744a4d1e2..739cdb59b 100644 --- a/src/map.h +++ b/src/map.h @@ -477,6 +477,16 @@ public: u64 getSeed(); s16 getWaterLevel(); + /*! + * Fixes lighting in one map block. + * May modify other blocks as well, as light can spread + * out of the specified block. + * Returns false if the block is not generated (so nothing + * changed), true otherwise. + */ + bool repairBlockLight(v3s16 blockpos, + std::map *modified_blocks); + MapSettingsManager settings_mgr; private: -- cgit v1.2.3