#include <emerge_internal.h>
◆ EmergeThread()
EmergeThread::EmergeThread |
( |
Server * | server, |
|
|
int | ethreadid ) |
◆ ~EmergeThread()
EmergeThread::~EmergeThread |
( |
| ) |
|
|
default |
◆ cancelPendingItems()
void EmergeThread::cancelPendingItems |
( |
| ) |
|
◆ finishGen()
References ServerEnvironment::activateBlock(), analyze_block(), BlockMakeData::blockpos_max, BlockMakeData::blockpos_min, Mapgen::blockseed, GenerateNotifier::clearEvents(), EMERGE_DBG_OUT, ScriptApiEnv::environment_OnGenerated(), errorstream, ServerMap::finishBlockMake(), g_profiler, Mapgen::generating, Mapgen::gennotify, Map::getBlockNoCreateNoEx(), Server::getScriptIface(), Server::m_env, Server::m_ignore_map_edit_events_area, m_map, m_mapgen, m_server, MAP_BLOCKSIZE, Server::setAsyncFatalError(), SPT_AVG, and Mapgen::vm.
Referenced by run().
◆ getBlockOrStartGen()
Try to get a block from memory and decide what to do.
- Parameters
-
pos | block position |
from_db | serialized block data, optional (for second call after EMERGE_FROM_DISK was returned) |
allow_gen | allow invoking mapgen? |
block | output pointer for block |
data | info for mapgen |
- Returns
- what to do for this block
References EMERGE_CANCELLED, EMERGE_FROM_DISK, EMERGE_FROM_MEMORY, EMERGE_GENERATED, Map::getBlockNoCreateNoEx(), ServerMap::initBlockMake(), ServerMap::loadBlock(), m_map, m_server, and verbosestream.
Referenced by run().
◆ getEmergeManager()
◆ getMapgen()
Mapgen * EmergeThread::getMapgen |
( |
| ) |
|
|
inline |
◆ initScripting()
bool EmergeThread::initScripting |
( |
| ) |
|
|
private |
References BUILTIN_MOD_NAME, ScriptApiBase::checkSetByBuiltin(), DIR_DELIM, errorstream, Server::getBuiltinLuaPath(), ScriptApiBase::loadMod(), Server::m_mapgen_init_files, m_script, m_server, ScriptApiMapgen::on_mods_loaded(), Server::setAsyncFatalError(), and BaseException::what().
Referenced by run().
◆ popBlockEmerge()
◆ pushBlock()
bool EmergeThread::pushBlock |
( |
v3s16 | pos | ) |
|
◆ run()
void * EmergeThread::run |
( |
| ) |
|
|
virtual |
Implements Thread.
References Profiler::add(), BEGIN_DEBUG_EXCEPTION_HANDLER, BLOCK_EMERGE_ALLOW_GEN, blockpos_over_max_limit(), Mapgen::blockseed, BlockEmergeData::callbacks, cancelPendingItems(), Map::dispatchEvent(), EMERGE_DBG_OUT, EMERGE_ERRORED, EMERGE_FROM_DISK, EMERGE_GENERATED, EmergeManager::enable_mapgen_debug_info, enable_mapgen_debug_info, END_DEBUG_EXCEPTION_HANDLER, finishGen(), BlockEmergeData::flags, g_profiler, getBlockOrStartGen(), Server::getEmergeManager(), ServerEnvironment::getServerMap(), id, initScripting(), EmergeManager::m_db, m_emerge, Server::m_env, m_map, m_mapgen, EmergeManager::m_mapgens, Thread::m_name, m_queue_event, m_script, m_server, m_trans_liquid, Mapgen::makeChunk(), MEET_OTHER, ScriptApiMapgen::on_generated(), ScriptApiMapgen::on_shutdown(), popBlockEmerge(), runCompletionCallbacks(), Server::setAsyncFatalError(), SPT_AVG, Thread::stop(), Thread::stopRequested(), BlockMakeData::transforming_liquid, porting::TriggerMemoryTrim(), MapEditEvent::type, Event::wait(), and BaseException::what().
◆ runCompletionCallbacks()
◆ signal()
void EmergeThread::signal |
( |
| ) |
|
◆ EmergeManager
◆ EmergeScripting
◆ ModApiMapgen
◆ enable_mapgen_debug_info
bool EmergeThread::enable_mapgen_debug_info |
◆ id
const int EmergeThread::id |
◆ m_block_queue
std::queue<v3s16> EmergeThread::m_block_queue |
|
private |
◆ m_emerge
◆ m_map
◆ m_mapgen
Mapgen* EmergeThread::m_mapgen |
|
private |
◆ m_queue_event
Event EmergeThread::m_queue_event |
|
private |
◆ m_script
◆ m_server
Server* EmergeThread::m_server |
|
private |
◆ m_trans_liquid
The documentation for this class was generated from the following files: