#include "modifiedstate.h"
#include "util/numeric.h" // getContainerPos
#include "settings.h"
+#include "mapgen.h"
class Map;
class NodeMetadataList;
raiseModified(MOD_STATE_WRITE_NEEDED, MOD_REASON_REALLOCATE);
}
+ MapNode* getData()
+ {
+ return data;
+ }
+
////
//// Modification tracking methods
////
/*!
* Each bit indicates if light spreading was finished
* in a direction. (Because the neighbor could also be unloaded.)
- * Bits: day X+, day Y+, day Z+, day Z-, day Y-, day X-,
- * night X+, night Y+, night Z+, night Z-, night Y-, night X-,
- * nothing, nothing, nothing, nothing.
+ * Bits (most significant first):
+ * nothing, nothing, nothing, nothing,
+ * night X-, night Y-, night Z-, night Z+, night Y+, night X+,
+ * day X-, day Y-, day Z-, day Z+, day Y+, day X+.
*/
u16 m_lighting_complete;
p.Z > max_limit_bp;
}
-inline bool blockpos_over_mapgen_limit(v3s16 p)
-{
- const s16 mapgen_limit_bp = rangelim(
- g_settings->getS16("map_generation_limit"), 0, MAX_MAP_GENERATION_LIMIT) /
- MAP_BLOCKSIZE;
- return p.X < -mapgen_limit_bp ||
- p.X > mapgen_limit_bp ||
- p.Y < -mapgen_limit_bp ||
- p.Y > mapgen_limit_bp ||
- p.Z < -mapgen_limit_bp ||
- p.Z > mapgen_limit_bp;
-}
-
/*
Returns the position of the block where the node is located
*/