#include <reflowscan.h>
Public Member Functions | |
ReflowScan (Map *map, const NodeDefManager *ndef) | |
void | scan (MapBlock *block, UniqueQueue< v3s16 > *liquid_queue) |
Private Member Functions | |
MapBlock * | lookupBlock (int x, int y, int z) |
bool | isLiquidFlowableTo (int x, int y, int z) |
bool | isLiquidHorizontallyFlowable (int x, int y, int z) |
void | scanColumn (int x, int z) |
Private Attributes | |
Map * | m_map = nullptr |
const NodeDefManager * | m_ndef = nullptr |
v3s16 | m_block_pos |
v3s16 | m_rel_block_pos |
UniqueQueue< v3s16 > * | m_liquid_queue = nullptr |
MapBlock * | m_lookup [3 *3 *3] |
u32 | m_lookup_state_bitset |
ReflowScan::ReflowScan | ( | Map * | map, |
const NodeDefManager * | ndef ) |
|
inlineprivate |
References CONTENT_IGNORE, ContentFeatures::floodable, NodeDefManager::get(), MapNode::getContent(), MapBlock::getNodeNoCheck(), lookupBlock(), m_ndef, and MAP_BLOCKSIZE.
Referenced by isLiquidHorizontallyFlowable().
|
inlineprivate |
References isLiquidFlowableTo().
Referenced by scanColumn().
|
inlineprivate |
References Map::getBlockNoCreateNoEx(), idx, m_block_pos, m_lookup, m_lookup_state_bitset, m_map, and MAP_BLOCKSIZE.
Referenced by isLiquidFlowableTo(), and scanColumn().
void ReflowScan::scan | ( | MapBlock * | block, |
UniqueQueue< v3s16 > * | liquid_queue ) |
References MapBlock::getPos(), MapBlock::getPosRelative(), m_block_pos, m_liquid_queue, m_lookup, m_lookup_state_bitset, m_rel_block_pos, MAP_BLOCKSIZE, and scanColumn().
Referenced by ServerMap::loadBlock().
|
private |
References CONTENT_IGNORE, ContentFeatures::floodable, NodeDefManager::get(), MapNode::getContent(), MapBlock::getNodeNoCheck(), ContentFeatures::isLiquid(), isLiquidHorizontallyFlowable(), LIQUID_FLOWING, ContentFeatures::liquid_type, lookupBlock(), m_liquid_queue, m_ndef, m_rel_block_pos, MAP_BLOCKSIZE, and UniqueQueue< Value >::push_back().
Referenced by scan().
|
private |
Referenced by lookupBlock(), and scan().
|
private |
Referenced by scan(), and scanColumn().
|
private |
Referenced by lookupBlock(), and scan().
|
private |
Referenced by lookupBlock(), and scan().
|
private |
Referenced by lookupBlock().
|
private |
Referenced by isLiquidFlowableTo(), and scanColumn().
|
private |
Referenced by scan(), and scanColumn().