Minetest  5.4.0
MMVManip Class Reference

#include <map.h>

+ Inheritance diagram for MMVManip:
+ Collaboration diagram for MMVManip:

Public Member Functions

 MMVManip (Map *map)
 
virtual ~MMVManip ()=default
 
virtual void clear ()
 
void initialEmerge (v3s16 blockpos_min, v3s16 blockpos_max, bool load_if_inexistent=true)
 
void blitBackAll (std::map< v3s16, MapBlock * > *modified_blocks, bool overwrite_generated=true)
 
- Public Member Functions inherited from VoxelManipulator
 VoxelManipulator ()=default
 
virtual ~VoxelManipulator ()
 
MapNode getNode (const v3s16 &p)
 
MapNode getNodeNoEx (const v3s16 &p)
 
MapNode getNodeNoExNoEmerge (const v3s16 &p)
 
MapNodegetNodeRefUnsafe (const v3s16 &p)
 
const MapNodegetNodeRefUnsafeCheckFlags (const v3s16 &p)
 
u8 & getFlagsRefUnsafe (const v3s16 &p)
 
bool exists (const v3s16 &p)
 
void setNode (const v3s16 &p, const MapNode &n)
 
void setNodeNoRef (const v3s16 &p, const MapNode &n)
 
bool setNodeNoEmerge (const v3s16 &p, MapNode n)
 
void print (std::ostream &o, const NodeDefManager *nodemgr, VoxelPrintMode mode=VOXELPRINT_MATERIAL)
 
void addArea (const VoxelArea &area)
 
void copyFrom (MapNode *src, const VoxelArea &src_area, v3s16 from_pos, v3s16 to_pos, const v3s16 &size)
 
void copyTo (MapNode *dst, const VoxelArea &dst_area, v3s16 dst_pos, v3s16 from_pos, const v3s16 &size)
 
void clearFlag (u8 flag)
 

Public Attributes

bool m_is_dirty = false
 
- Public Attributes inherited from VoxelManipulator
VoxelArea m_area
 
MapNodem_data = nullptr
 
u8 * m_flags = nullptr
 

Protected Attributes

Mapm_map
 
std::map< v3s16, u8 > m_loaded_blocks
 

Additional Inherited Members

- Static Public Attributes inherited from VoxelManipulator
static const MapNode ContentIgnoreNode = MapNode(CONTENT_IGNORE)
 

Constructor & Destructor Documentation

◆ MMVManip()

MMVManip::MMVManip ( Map map)

◆ ~MMVManip()

virtual MMVManip::~MMVManip ( )
virtualdefault

Member Function Documentation

◆ blitBackAll()

void MMVManip::blitBackAll ( std::map< v3s16, MapBlock * > *  modified_blocks,
bool  overwrite_generated = true 
)

References MapBlock::copyFrom(), Map::getBlockNoCreateNoEx(), VoxelArea::getExtent(), MapBlock::isGenerated(), VoxelManipulator::m_area, m_loaded_blocks, m_map, MOD_REASON_VMANIP, MOD_STATE_WRITE_NEEDED, p(), MapBlock::raiseModified(), and VMANIP_BLOCK_DATA_INEXIST.

Referenced by voxalgo::blit_back_with_light(), ServerMap::finishBlockMake(), and LuaVoxelManip::l_write_to_map().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ clear()

virtual void MMVManip::clear ( )
inlinevirtual

Reimplemented from VoxelManipulator.

References VoxelManipulator::clear(), and m_loaded_blocks.

+ Here is the call graph for this function:

◆ initialEmerge()

void MMVManip::initialEmerge ( v3s16  blockpos_min,
v3s16  blockpos_max,
bool  load_if_inexistent = true 
)

Member Data Documentation

◆ m_is_dirty

bool MMVManip::m_is_dirty = false

◆ m_loaded_blocks

std::map<v3s16, u8> MMVManip::m_loaded_blocks
protected

Referenced by blitBackAll(), clear(), and initialEmerge().

◆ m_map

Map* MMVManip::m_map
protected

Referenced by blitBackAll(), and initialEmerge().


The documentation for this class was generated from the following files: