16#define BLOCK_EMERGE_ALLOW_GEN (1 << 0)
17#define BLOCK_EMERGE_FORCE_QUEUE (1 << 1)
19#define EMERGE_DBG_OUT(x) { \
20 if (enable_mapgen_debug_info) \
21 infostream << "EmergeThread: " x << std::endl; \
175 bool ignore_queue_limits=
false);
182 void *callback_param);
230 void *callback_param,
231 bool *entry_already_exists);
Definition mg_biome.h:202
Definition mg_decoration.h:112
bool enable_mapgen_debug_info
Definition emerge.h:125
OreManager * oremgr
Definition emerge.h:218
BiomeGen * biomegen
Definition emerge.h:216
MapSettingsManager * map_settings_mgr
Definition emerge.h:141
std::vector< Mapgen * > m_mapgens
Definition emerge.h:196
u32 gen_notify_on
Definition emerge.h:128
~EmergeManager()
Definition emerge.cpp:120
void stopThreads()
Definition emerge.cpp:233
const BiomeManager * getBiomeManager() const
Definition emerge.h:151
const OreManager * getOreManager() const
Definition emerge.h:152
void reportCompletedEmerge(EmergeAction action)
Definition emerge.cpp:443
OreManager * getWritableOreManager()
Definition emerge.cpp:153
bool isBlockUnderground(v3s16 blockpos)
Definition emerge.cpp:346
u32 m_qlimit_generate
Definition emerge.h:209
void startThreads()
Definition emerge.cpp:221
bool isBlockInQueue(v3s16 pos)
Definition emerge.cpp:310
EmergeManager(Server *server, MetricsBackend *mb)
Definition emerge.cpp:63
bool enqueueBlockEmergeEx(v3s16 blockpos, session_t peer_id, u16 flags, EmergeCompletionCallback callback, void *callback_param)
Definition emerge.cpp:274
MapDatabaseAccessor * m_db
Definition emerge.h:201
const NodeDefManager * ndef
Definition emerge.h:124
bool isRunning()
Definition emerge.cpp:252
BiomeManager * getWritableBiomeManager()
Definition emerge.cpp:146
u32 m_qlimit_diskonly
Definition emerge.h:208
std::set< u32 > gen_notify_on_deco_ids
Definition emerge.h:129
Mapgen * getCurrentMapgen()
Definition emerge.cpp:206
std::set< std::string > gen_notify_on_custom
Definition emerge.h:130
void initMapgens(MapgenParams *mgparams)
Definition emerge.cpp:187
SchematicManager * schemmgr
Definition emerge.h:220
BiomeManager * biomemgr
Definition emerge.h:217
EmergeThread * getOptimalThread()
Definition emerge.cpp:423
static v3s16 getContainingChunk(v3s16 blockpos, s16 chunksize)
Definition emerge.cpp:323
bool pushBlockEmergeData(v3s16 pos, u16 peer_requested, u16 flags, EmergeCompletionCallback callback, void *callback_param, bool *entry_already_exists)
Definition emerge.cpp:352
std::mutex m_queue_mutex
Definition emerge.h:203
u32 m_qlimit_total
Definition emerge.h:207
bool m_threads_active
Definition emerge.h:198
void initMap(MapDatabaseAccessor *holder)
Definition emerge.cpp:174
DISABLE_CLASS_COPY(EmergeManager)
SchematicManager * getWritableSchematicManager()
Definition emerge.cpp:167
std::vector< EmergeThread * > m_threads
Definition emerge.h:197
const DecorationManager * getDecorationManager() const
Definition emerge.h:153
MapgenParams * mgparams
Definition emerge.h:135
const SchematicManager * getSchematicManager() const
Definition emerge.h:154
bool enqueueBlockEmerge(session_t peer_id, v3s16 blockpos, bool allow_generate, bool ignore_queue_limits=false)
Definition emerge.cpp:258
void resetMap()
resets the reference
Definition emerge.cpp:181
std::map< v3s16, BlockEmergeData > m_blocks_enqueued
Definition emerge.h:204
std::unordered_map< u16, u32 > m_peer_queue_count
Definition emerge.h:205
bool popBlockEmergeData(v3s16 pos, BlockEmergeData *bedata)
Definition emerge.cpp:400
const BiomeGen * getBiomeGen() const
Definition emerge.h:148
MetricCounterPtr m_completed_emerge_counter[5]
Definition emerge.h:212
DecorationManager * decomgr
Definition emerge.h:219
size_t getQueueSize()
Definition emerge.cpp:304
int getSpawnLevelAtPoint(v2s16 p)
Definition emerge.cpp:333
DecorationManager * getWritableDecorationManager()
Definition emerge.cpp:160
bool enable_mapgen_debug_info
Definition emerge.h:93
GenerateNotifier createNotifier() const
Definition emerge.h:105
const std::set< u32 > * gen_notify_on_deco_ids
Definition emerge.h:96
BiomeGen * biomegen
Definition emerge.h:99
~EmergeParams()
Definition emerge.cpp:33
DISABLE_CLASS_COPY(EmergeParams)
u32 gen_notify_on
Definition emerge.h:95
OreManager * oremgr
Definition emerge.h:101
BiomeManager * biomemgr
Definition emerge.h:100
const NodeDefManager * ndef
Definition emerge.h:92
DecorationManager * decomgr
Definition emerge.h:102
const std::set< std::string > * gen_notify_on_custom
Definition emerge.h:97
SchematicManager * schemmgr
Definition emerge.h:103
Definition emerge_internal.h:25
Definition map_settings_manager.h:30
Definition metricsbackend.h:39
This class is for getting the actual properties of nodes from their content ID.
Definition nodedef.h:541
Definition mg_schematic.h:117
Definition settings.h:109
Definition container.h:26
std::vector< std::pair< EmergeCompletionCallback, void * > > EmergeCallbackList
Definition emerge.h:77
EmergeAction
Definition emerge.h:52
@ EMERGE_FROM_DISK
Definition emerge.h:56
@ EMERGE_FROM_MEMORY
Definition emerge.h:55
@ EMERGE_GENERATED
Definition emerge.h:57
@ EMERGE_CANCELLED
Definition emerge.h:53
@ EMERGE_ERRORED
Definition emerge.h:54
constexpr const char * emergeActionStrs[]
Definition emerge.h:60
void(* EmergeCompletionCallback)(v3s16 blockpos, EmergeAction action, void *param)
Definition emerge.h:69
core::vector2d< s16 > v2s16
Definition irr_v2d.h:12
core::vector3d< s16 > v3s16
Definition irr_v3d.h:13
std::shared_ptr< MetricCounter > MetricCounterPtr
Definition metricsbackend.h:22
Definition activeobjectmgr.cpp:11
u16 session_t
Definition networkprotocol.h:22
u16 flags
Definition emerge.h:81
u16 peer_requested
Definition emerge.h:80
EmergeCallbackList callbacks
Definition emerge.h:82
~BlockMakeData()
Definition emerge.h:48
v3s16 blockpos_max
Definition emerge.h:42
u64 seed
Definition emerge.h:40
const NodeDefManager * nodedef
Definition emerge.h:44
MMVManip * vmanip
Definition emerge.h:38
UniqueQueue< v3s16 > transforming_liquid
Definition emerge.h:43
v3s16 blockpos_min
Definition emerge.h:41
Definition servermap.h:24
static std::string p(std::string path)
Definition test_filesys.cpp:53