Luanti 5.11.0-dev
 
Loading...
Searching...
No Matches
mapblock.h File Reference
#include <vector>
#include "irr_v3d.h"
#include "mapnode.h"
#include "exceptions.h"
#include "constants.h"
#include "staticobject.h"
#include "nodemetadata.h"
#include "nodetimer.h"
#include "modifiedstate.h"
#include "util/numeric.h"
#include "settings.h"
+ Include dependency graph for mapblock.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  MapBlock
 

Macros

#define BLOCK_TIMESTAMP_UNDEFINED   0xffffffff
 

Typedefs

typedef std::vector< MapBlock * > MapBlockVect
 

Enumerations

enum  ModReason : u32 {
  MOD_REASON_REALLOCATE = 1 << 0 , MOD_REASON_SET_IS_UNDERGROUND = 1 << 1 , MOD_REASON_SET_LIGHTING_COMPLETE = 1 << 2 , MOD_REASON_SET_GENERATED = 1 << 3 ,
  MOD_REASON_SET_NODE = 1 << 4 , MOD_REASON_SET_TIMESTAMP = 1 << 5 , MOD_REASON_REPORT_META_CHANGE = 1 << 6 , MOD_REASON_CLEAR_ALL_OBJECTS = 1 << 7 ,
  MOD_REASON_BLOCK_EXPIRED = 1 << 8 , MOD_REASON_ADD_ACTIVE_OBJECT_RAW = 1 << 9 , MOD_REASON_REMOVE_OBJECTS_REMOVE = 1 << 10 , MOD_REASON_REMOVE_OBJECTS_DEACTIVATE = 1 << 11 ,
  MOD_REASON_TOO_MANY_OBJECTS = 1 << 12 , MOD_REASON_STATIC_DATA_ADDED = 1 << 13 , MOD_REASON_STATIC_DATA_REMOVED = 1 << 14 , MOD_REASON_STATIC_DATA_CHANGED = 1 << 15 ,
  MOD_REASON_EXPIRE_IS_AIR = 1 << 16 , MOD_REASON_VMANIP = 1 << 17 , MOD_REASON_UNKNOWN = 1 << 18
}
 

Functions

bool objectpos_over_limit (v3f p)
 
bool blockpos_over_max_limit (v3s16 p)
 
v3s16 getNodeBlockPos (v3s16 p)
 
void getNodeBlockPosWithOffset (v3s16 p, v3s16 &block, v3s16 &offset)
 
std::string analyze_block (MapBlock *block)
 

Macro Definition Documentation

◆ BLOCK_TIMESTAMP_UNDEFINED

#define BLOCK_TIMESTAMP_UNDEFINED   0xffffffff

Typedef Documentation

◆ MapBlockVect

typedef std::vector<MapBlock*> MapBlockVect

Enumeration Type Documentation

◆ ModReason

enum ModReason : u32
Enumerator
MOD_REASON_REALLOCATE 
MOD_REASON_SET_IS_UNDERGROUND 
MOD_REASON_SET_LIGHTING_COMPLETE 
MOD_REASON_SET_GENERATED 
MOD_REASON_SET_NODE 
MOD_REASON_SET_TIMESTAMP 
MOD_REASON_REPORT_META_CHANGE 
MOD_REASON_CLEAR_ALL_OBJECTS 
MOD_REASON_BLOCK_EXPIRED 
MOD_REASON_ADD_ACTIVE_OBJECT_RAW 
MOD_REASON_REMOVE_OBJECTS_REMOVE 
MOD_REASON_REMOVE_OBJECTS_DEACTIVATE 
MOD_REASON_TOO_MANY_OBJECTS 
MOD_REASON_STATIC_DATA_ADDED 
MOD_REASON_STATIC_DATA_REMOVED 
MOD_REASON_STATIC_DATA_CHANGED 
MOD_REASON_EXPIRE_IS_AIR 
MOD_REASON_VMANIP 
MOD_REASON_UNKNOWN 

Function Documentation

◆ analyze_block()

std::string analyze_block ( MapBlock * block)

References CONTENT_AIR, CONTENT_IGNORE, MapNode::getContent(), MapBlock::getIsUnderground(), MapBlock::getLightingComplete(), MapBlock::getModified(), MapBlock::getNodeNoEx(), MapBlock::getPos(), MapBlock::isGenerated(), itos(), MAP_BLOCKSIZE, MOD_STATE_CLEAN, MOD_STATE_WRITE_AT_UNLOAD, MOD_STATE_WRITE_NEEDED, porting::mt_snprintf(), and p().

Referenced by EmergeThread::finishGen(), and ClientMap::renderMap().

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

◆ blockpos_over_max_limit()

bool blockpos_over_max_limit ( v3s16 p)
inline

References MAP_BLOCKSIZE, MAX_MAP_GENERATION_LIMIT, and p().

Referenced by MapSector::createBlankBlockNoInsert(), ServerMap::createSector(), RemoteClient::GetNextBlocks(), MMVManip::initialEmerge(), EmergeThread::run(), and TestMap::testMaxMapgenLimit().

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

◆ getNodeBlockPos()

v3s16 getNodeBlockPos ( v3s16 p)
inline

References getContainerPos(), MAP_BLOCKSIZE, and p().

Referenced by ServerEnvironment::addActiveObjectRaw(), Map::addNodeAndUpdate(), Client::addUpdateMeshTaskForNode(), Server::AsyncRunStep(), voxalgo::blit_back_with_light(), ServerEnvironment::deactivateFarObjects(), Map::findNodesWithMetadata(), Server::findSpawnPos(), Map::forEachNodeInArea(), MinimapUpdateThread::getMap(), RemoteClient::GetNextBlocks(), Map::getNode(), Map::getNodeMetadata(), Map::getNodeTimer(), Schematic::getSchematicFromMap(), Server::handleCommand_Interact(), voxalgo::is_sunlight_above(), Map::isValidPosition(), ModApiEnv::l_compare_block_status(), ModApiEnv::l_delete_area(), ModApiEnv::l_emerge_area(), ModApiEnv::l_load_area(), LuaVoxelManip::l_read_from_map(), Schematic::placeOnMap(), Map::removeNodeMetadata(), Map::removeNodeTimer(), Server::sendAddNode(), Server::sendMetadataChanged(), Server::sendRemoveNode(), Map::setNode(), Map::setNodeMetadata(), Map::setNodeTimer(), MapEditEvent::setPositionModified(), treegen::spawn_ltree(), TEST_CASE(), TestSAO::testActivate(), TestMap::testForEachNodeInArea(), TestVoxelAlgorithms::testLighting(), TestSAO::testNotSaved(), TestSAO::testStaticSave(), TestSAO::testStaticToFalse(), TestSAO::testStaticToTrue(), ServerMap::transformLiquids(), and ActiveBlockList::update().

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

◆ getNodeBlockPosWithOffset()

void getNodeBlockPosWithOffset ( v3s16 p,
v3s16 & block,
v3s16 & offset )
inline

References getContainerPosWithOffset(), MAP_BLOCKSIZE, and p().

Referenced by voxalgo::is_sunlight_above(), and voxalgo::update_lighting_nodes().

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

◆ objectpos_over_limit()

bool objectpos_over_limit ( v3f p)
inline

References BS, MAX_MAP_GENERATION_LIMIT, and p().

Referenced by Server::findSpawnPos(), ServerEnvironment::loadPlayer(), server::ActiveObjectMgr::registerObject(), and TestMap::testMaxMapgenLimit().

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