Luanti 5.16.0-dev
Loading...
Searching...
No Matches
ABMHandler Class Reference

#include <blockmodifier.h>

Collaboration diagram for ABMHandler:

Public Member Functions

 ABMHandler (std::vector< ABMWithState > &abms, float dtime_s, ServerEnvironment *env, bool use_timers)
 ~ABMHandler ()
void apply (MapBlock *block, int &blocks_scanned, int &abms_run, int &blocks_cached)

Static Public Member Functions

static u32 countObjects (MapBlock *block, ServerMap *map, u32 &wider)

Private Attributes

ServerEnvironmentm_env
std::vector< std::vector< ActiveABM > * > m_aabms

Constructor & Destructor Documentation

◆ ABMHandler()

◆ ~ABMHandler()

ABMHandler::~ABMHandler ( )

References m_aabms.

Member Function Documentation

◆ apply()

void ABMHandler::apply ( MapBlock * block,
int & blocks_scanned,
int & abms_run,
int & blocks_cached )

References CONTAINS, CONTENT_TYPE_CACHE_MAX, MapBlock::contents, countObjects(), MapBlock::do_not_cache_contents, MapNode::getContent(), Map::getNode(), MapBlock::getNodeNoCheck(), MapBlock::getPosRelative(), MapBlock::isOrphan(), MapBlock::isValidPosition(), m_aabms, m_env, MAP_BLOCKSIZE, myrand(), and p().

Referenced by ServerEnvironment::step().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ countObjects()

u32 ABMHandler::countObjects ( MapBlock * block,
ServerMap * map,
u32 & wider )
static

References StaticObjectList::getActiveSize(), Map::getBlockNoCreateNoEx(), MapBlock::getPos(), MapBlock::m_static_objects, StaticObjectList::size(), x, y, and z.

Referenced by apply().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ m_aabms

std::vector<std::vector<ActiveABM>*> ABMHandler::m_aabms
private

Referenced by ABMHandler(), ~ABMHandler(), and apply().

◆ m_env

ServerEnvironment* ABMHandler::m_env
private

Referenced by ABMHandler(), and apply().


The documentation for this class was generated from the following files: