1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Add core.compare_block_status function (#11247)

Makes it possible to check the status of the mapblock in a future-extensible way.
This commit is contained in:
SmallJoker 2021-05-30 20:24:12 +02:00 committed by GitHub
parent 89f3991351
commit c9144ae5e2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 89 additions and 4 deletions

View file

@ -358,6 +358,13 @@ bool EmergeManager::enqueueBlockEmergeEx(
}
bool EmergeManager::isBlockInQueue(v3s16 pos)
{
MutexAutoLock queuelock(m_queue_mutex);
return m_blocks_enqueued.find(pos) != m_blocks_enqueued.end();
}
//
// Mapgen-related helper functions
//