+ MapNode getNodeNoEx(v3s16 p)
+ {
+ emerge(p);
+
+ if(m_flags[m_area.index(p)] & VOXELFLAG_INEXISTENT)
+ {
+ return MapNode(CONTENT_IGNORE);
+ }
+
+ return m_data[m_area.index(p)];
+ }
+ MapNode getNodeNoExNoEmerge(v3s16 p)
+ {
+ if(m_area.contains(p) == false)
+ return MapNode(CONTENT_IGNORE);
+ if(m_flags[m_area.index(p)] & VOXELFLAG_INEXISTENT)
+ return MapNode(CONTENT_IGNORE);
+ return m_data[m_area.index(p)];
+ }
+ // Stuff explodes if non-emerged area is touched with this.
+ // Emerge first, and check VOXELFLAG_INEXISTENT if appropriate.
+ MapNode & getNodeRefUnsafe(v3s16 p)
+ {
+ return m_data[m_area.index(p)];
+ }
+ u8 & getFlagsRefUnsafe(v3s16 p)
+ {
+ return m_flags[m_area.index(p)];
+ }
+ bool exists(v3s16 p)
+ {
+ return m_area.contains(p) &&
+ !(getFlagsRefUnsafe(p) & VOXELFLAG_INEXISTENT);
+ }
+ MapNode & getNodeRef(v3s16 p)
+ {
+ emerge(p);
+ if(getFlagsRefUnsafe(p) & VOXELFLAG_INEXISTENT)
+ {
+ /*dstream<<"EXCEPT: VoxelManipulator::getNode(): "
+ <<"p=("<<p.X<<","<<p.Y<<","<<p.Z<<")"
+ <<", index="<<m_area.index(p)
+ <<", flags="<<(int)getFlagsRefUnsafe(p)
+ <<" is inexistent"<<std::endl;*/
+ throw InvalidPositionException
+ ("VoxelManipulator: getNode: inexistent");
+ }
+ return getNodeRefUnsafe(p);
+ }
+ void setNode(v3s16 p, const MapNode &n)