|
| | MMVManip (Map *map) |
| | ~MMVManip () override |
| void | initialEmerge (v3s16 blockpos_min, v3s16 blockpos_max, bool load_if_inexistent=true) |
| std::map< v3s16, bool > | getCoveredBlocks () const |
| | Uses the flags array to determine which blocks the VManip covers, and for which of them we have any data.
|
| void | blitBackAll (std::map< v3s16, MapBlock * > *modified_blocks, bool overwrite_generated=true) const |
| | Writes data in VManip back to the map.
|
| MMVManip * | clone () const |
| void | reparent (Map *map) |
| bool | isOrphan () const |
| std::list< MMVManip ** >::iterator | addTrackedRef (MMVManip **ref_ref) |
| void | removeTrackedRef (std::list< MMVManip ** >::iterator it) |
| | VoxelManipulator ()=default |
| virtual | ~VoxelManipulator () |
| MapNode | getNode (const v3s16 &p) |
| MapNode | getNodeNoEx (const v3s16 &p) |
| MapNode | getNodeNoExNoEmerge (const v3s16 &p) const |
| MapNode & | getNodeRefUnsafe (const v3s16 &p) |
| const MapNode & | getNodeRefUnsafeCheckFlags (const v3s16 &p) const |
| u8 & | getFlagsRefUnsafe (const v3s16 &p) |
| bool | exists (const v3s16 &p) |
| void | setNode (const v3s16 &p, const MapNode &n) |
| bool | setNodeNoEmerge (const v3s16 &p, MapNode n) |
| void | clear () |
| void | print (std::ostream &o, const NodeDefManager *nodemgr, VoxelPrintMode mode=VOXELPRINT_MATERIAL) const |
| void | addArea (const VoxelArea &area) |
| void | setFlags (const VoxelArea &area, u8 flag) |
| void | clearFlags (const VoxelArea &area, u8 flag) |
| void | copyFrom (MapNode *src, bool is_mono_block, 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) const |
| void MMVManip::blitBackAll |
( |
std::map< v3s16, MapBlock * > * | modified_blocks, |
|
|
bool | overwrite_generated = true ) const |
Writes data in VManip back to the map.
Blocks without any data in the VManip are skipped.
- Note
- VOXELFLAG_NO_DATA is checked per-block, not per-node. So you need to ensure that the relevant parts of m_data are initialized.
- Parameters
-
| modified_blocks | output array of touched blocks (optional) |
| overwrite_generated | if false, blocks marked as generate in the map are not changed |
References blockpos_over_max_limit(), MapBlock::copyFrom(), MapBlock::expireIsAirCache(), getCoveredBlocks(), MapBlock::isGenerated(), VoxelManipulator::m_area, m_map, MOD_REASON_VMANIP, MOD_STATE_WRITE_NEEDED, p(), MapBlock::raiseModified(), verbosestream, and warningstream.
Referenced by voxalgo::blit_back_with_light(), ServerMap::finishBlockMake(), LuaVoxelManip::l_write_to_map(), and TestVoxelManipulator::testBlitBack2().
| std::map< v3s16, bool > MMVManip::getCoveredBlocks |
( |
| ) |
const |
Uses the flags array to determine which blocks the VManip covers, and for which of them we have any data.
- Warning
- requires VManip area to be block-aligned
- Returns
- map of blockpos -> any data?
References getNodeBlockPos(), VoxelManipulator::m_area, VoxelManipulator::m_flags, MAP_BLOCKSIZE, VOXELFLAG_NO_DATA, x, y, and z.
Referenced by blitBackAll(), initialEmerge(), and TestVoxelManipulator::testBlitBack2().