// Server implements this.
// Client leaves it as no-op.
- virtual void saveBlock(MapBlock *block){};
+ virtual bool saveBlock(MapBlock *block) { return false; };
/*
Updates usage timers and unloads unused blocks and sectors.
// Returns true if sector now resides in memory
//bool deFlushSector(v2s16 p2d);
- void saveBlock(MapBlock *block);
+ bool saveBlock(MapBlock *block, Database *db);
+ bool saveBlock(MapBlock *block);
// This will generate a sector with getSector if not found.
void loadBlock(std::string sectordir, std::string blockfile, MapSector *sector, bool save_after_load=false);
MapBlock* loadBlock(v3s16 p);
{m_map = map;}
void initialEmerge(v3s16 blockpos_min, v3s16 blockpos_max,
- bool load_if_inexistent = true);
+ bool load_if_inexistent = true);
// This is much faster with big chunks of generated data
- void blitBackAll(std::map<v3s16, MapBlock*> * modified_blocks);
+ void blitBackAll(std::map<v3s16, MapBlock*> * modified_blocks,
+ bool overwrite_generated = true);
protected:
bool m_create_area;
};
#endif
-