diff options
Diffstat (limited to 'src/map.h')
-rw-r--r-- | src/map.h | 17 |
1 files changed, 16 insertions, 1 deletions
@@ -446,10 +446,25 @@ public: void blitBackAll(std::map<v3s16, MapBlock*> * modified_blocks, bool overwrite_generated = true); + /* + Creates a copy of this VManip including contents, the copy will not be + associated with a Map. + */ + MMVManip *clone() const; + + // Reassociates a copied VManip to a map + void reparent(Map *map); + + // Is it impossible to call initialEmerge / blitBackAll? + inline bool isOrphan() const { return !m_map; } + bool m_is_dirty = false; protected: - Map *m_map; + MMVManip() {}; + + // may be null + Map *m_map = nullptr; /* key = blockpos value = flags describing the block |