Minetest  5.4.0
mapblock.h File Reference
#include <set>
#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 "mapgen/mapgen.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
 
#define MOD_REASON_INITIAL   (1 << 0)
 
#define MOD_REASON_REALLOCATE   (1 << 1)
 
#define MOD_REASON_SET_IS_UNDERGROUND   (1 << 2)
 
#define MOD_REASON_SET_LIGHTING_COMPLETE   (1 << 3)
 
#define MOD_REASON_SET_GENERATED   (1 << 4)
 
#define MOD_REASON_SET_NODE   (1 << 5)
 
#define MOD_REASON_SET_NODE_NO_CHECK   (1 << 6)
 
#define MOD_REASON_SET_TIMESTAMP   (1 << 7)
 
#define MOD_REASON_REPORT_META_CHANGE   (1 << 8)
 
#define MOD_REASON_CLEAR_ALL_OBJECTS   (1 << 9)
 
#define MOD_REASON_BLOCK_EXPIRED   (1 << 10)
 
#define MOD_REASON_ADD_ACTIVE_OBJECT_RAW   (1 << 11)
 
#define MOD_REASON_REMOVE_OBJECTS_REMOVE   (1 << 12)
 
#define MOD_REASON_REMOVE_OBJECTS_DEACTIVATE   (1 << 13)
 
#define MOD_REASON_TOO_MANY_OBJECTS   (1 << 14)
 
#define MOD_REASON_STATIC_DATA_ADDED   (1 << 15)
 
#define MOD_REASON_STATIC_DATA_REMOVED   (1 << 16)
 
#define MOD_REASON_STATIC_DATA_CHANGED   (1 << 17)
 
#define MOD_REASON_EXPIRE_DAYNIGHTDIFF   (1 << 18)
 
#define MOD_REASON_VMANIP   (1 << 19)
 
#define MOD_REASON_UNKNOWN   (1 << 20)
 

Typedefs

typedef std::vector< MapBlock * > MapBlockVect
 

Functions

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

Macro Definition Documentation

◆ BLOCK_TIMESTAMP_UNDEFINED

#define BLOCK_TIMESTAMP_UNDEFINED   0xffffffff

◆ MOD_REASON_ADD_ACTIVE_OBJECT_RAW

#define MOD_REASON_ADD_ACTIVE_OBJECT_RAW   (1 << 11)

◆ MOD_REASON_BLOCK_EXPIRED

#define MOD_REASON_BLOCK_EXPIRED   (1 << 10)

◆ MOD_REASON_CLEAR_ALL_OBJECTS

#define MOD_REASON_CLEAR_ALL_OBJECTS   (1 << 9)

◆ MOD_REASON_EXPIRE_DAYNIGHTDIFF

#define MOD_REASON_EXPIRE_DAYNIGHTDIFF   (1 << 18)

◆ MOD_REASON_INITIAL

#define MOD_REASON_INITIAL   (1 << 0)

◆ MOD_REASON_REALLOCATE

#define MOD_REASON_REALLOCATE   (1 << 1)

◆ MOD_REASON_REMOVE_OBJECTS_DEACTIVATE

#define MOD_REASON_REMOVE_OBJECTS_DEACTIVATE   (1 << 13)

◆ MOD_REASON_REMOVE_OBJECTS_REMOVE

#define MOD_REASON_REMOVE_OBJECTS_REMOVE   (1 << 12)

◆ MOD_REASON_REPORT_META_CHANGE

#define MOD_REASON_REPORT_META_CHANGE   (1 << 8)

◆ MOD_REASON_SET_GENERATED

#define MOD_REASON_SET_GENERATED   (1 << 4)

◆ MOD_REASON_SET_IS_UNDERGROUND

#define MOD_REASON_SET_IS_UNDERGROUND   (1 << 2)

◆ MOD_REASON_SET_LIGHTING_COMPLETE

#define MOD_REASON_SET_LIGHTING_COMPLETE   (1 << 3)

◆ MOD_REASON_SET_NODE

#define MOD_REASON_SET_NODE   (1 << 5)

◆ MOD_REASON_SET_NODE_NO_CHECK

#define MOD_REASON_SET_NODE_NO_CHECK   (1 << 6)

◆ MOD_REASON_SET_TIMESTAMP

#define MOD_REASON_SET_TIMESTAMP   (1 << 7)

◆ MOD_REASON_STATIC_DATA_ADDED

#define MOD_REASON_STATIC_DATA_ADDED   (1 << 15)

◆ MOD_REASON_STATIC_DATA_CHANGED

#define MOD_REASON_STATIC_DATA_CHANGED   (1 << 17)

◆ MOD_REASON_STATIC_DATA_REMOVED

#define MOD_REASON_STATIC_DATA_REMOVED   (1 << 16)

◆ MOD_REASON_TOO_MANY_OBJECTS

#define MOD_REASON_TOO_MANY_OBJECTS   (1 << 14)

◆ MOD_REASON_UNKNOWN

#define MOD_REASON_UNKNOWN   (1 << 20)

◆ MOD_REASON_VMANIP

#define MOD_REASON_VMANIP   (1 << 19)

Typedef Documentation

◆ MapBlockVect

typedef std::vector<MapBlock*> MapBlockVect

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::isDummy(), 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 ServerMap::createBlock(), RemoteClient::GetNextBlocks(), MMVManip::initialEmerge(), and EmergeThread::run().

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

◆ getNodeBlockPos()

◆ getNodeBlockPosWithOffset()

void getNodeBlockPosWithOffset ( const 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(), and server::ActiveObjectMgr::registerObject().

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