#ifndef MAP_HEADER
#define MAP_HEADER
-#include <jmutex.h>
-#include <jmutexautolock.h>
-#include <jthread.h>
#include <iostream>
#include <sstream>
#include <set>
#include "mapnode.h"
#include "constants.h"
#include "voxel.h"
-#include "mapgen.h" //for BlockMakeData and EmergeManager
#include "modifiedstate.h"
#include "util/container.h"
#include "nodetimer.h"
class IGameDef;
class IRollbackReportSink;
class EmergeManager;
+class ServerEnvironment;
struct BlockMakeData;
+struct MapgenParams;
/*
void transforming_liquid_add(v3s16 p);
s32 transforming_liquid_size();
+ virtual s16 getHeat(v3s16 p);
+ virtual s16 getHumidity(v3s16 p);
+
protected:
+ friend class LuaVoxelManip;
std::ostream &m_dout; // A bit deprecated, could be removed
// Parameters fed to the Mapgen
MapgenParams *m_mgparams;
+
+ virtual s16 getHeat(ServerEnvironment *env, v3s16 p, MapBlock *block = NULL);
+ virtual s16 getHumidity(ServerEnvironment *env, v3s16 p, MapBlock *block = NULL);
+
private:
// Seed used for all kinds of randomness in generation
u64 m_seed;
virtual void emerge(VoxelArea a, s32 caller_id=-1);
- void initialEmerge(v3s16 blockpos_min, v3s16 blockpos_max);
+ void initialEmerge(v3s16 blockpos_min, v3s16 blockpos_max,
+ bool load_if_inexistent = true);
// This is much faster with big chunks of generated data
void blitBackAll(std::map<v3s16, MapBlock*> * modified_blocks);