]> git.lizzy.rs Git - minetest.git/blobdiff - src/mapblock.h
Replace minetest_game with "Minetest Game" where appropriate
[minetest.git] / src / mapblock.h
index 1ab0ce80c0068b0c0fbba9f4eb33a45622486492..b817be5961cb188dcfa562359251ad99e29585ae 100644 (file)
@@ -325,6 +325,11 @@ class MapBlock
                return m_day_night_differs;
        }
 
+       bool onObjectsActivation();
+       bool saveStaticObject(u16 id, const StaticObject &obj, u32 reason);
+
+       void step(float dtime, const std::function<bool(v3s16, MapNode, f32)> &on_timer_cb);
+
        ////
        //// Timestamp (see m_timestamp)
        ////
@@ -428,6 +433,11 @@ class MapBlock
 
        void serializeNetworkSpecific(std::ostream &os);
        void deSerializeNetworkSpecific(std::istream &is);
+
+       bool storeActiveObject(u16 id);
+       // clearObject and return removed objects count
+       u32 clearObjects();
+
 private:
        /*
                Private methods
@@ -445,7 +455,6 @@ class MapBlock
 #endif
 
        NodeMetadataList m_node_metadata;
-       NodeTimerList m_node_timers;
        StaticObjectList m_static_objects;
 
        static const u32 ystride = MAP_BLOCKSIZE;
@@ -460,6 +469,8 @@ class MapBlock
        bool contents_cached = false;
        // True if we never want to cache content types for this block
        bool do_not_cache_contents = false;
+       // marks the sides which are opaque: 00+Z-Z+Y-Y+X-X
+       u8 solid_sides {0};
 
 private:
        /*
@@ -536,6 +547,7 @@ class MapBlock
        int m_refcount = 0;
 
        MapNode data[nodecount];
+       NodeTimerList m_node_timers;
 };
 
 typedef std::vector<MapBlock*> MapBlockVect;