+#ifndef SERVER // Only on client
+ /*
+ Methods for setting temporary modifications to nodes for
+ drawing
+
+ returns true if the mod was different last time
+ */
+ bool setTempMod(v3s16 p, const NodeMod &mod)
+ {
+ /*dstream<<"setTempMod called on block"
+ <<" ("<<p.X<<","<<p.Y<<","<<p.Z<<")"
+ <<", mod.type="<<mod.type
+ <<", mod.param="<<mod.param
+ <<std::endl;*/
+ JMutexAutoLock lock(m_temp_mods_mutex);
+
+ return m_temp_mods.set(p, mod);
+ }
+ // Returns true if there was one
+ bool getTempMod(v3s16 p, NodeMod *mod)
+ {
+ JMutexAutoLock lock(m_temp_mods_mutex);
+
+ return m_temp_mods.get(p, mod);
+ }
+ bool clearTempMod(v3s16 p)
+ {
+ JMutexAutoLock lock(m_temp_mods_mutex);
+
+ return m_temp_mods.clear(p);
+ }
+ bool clearTempMods()
+ {
+ JMutexAutoLock lock(m_temp_mods_mutex);
+
+ return m_temp_mods.clear();
+ }
+ void copyTempMods(NodeModMap &dst)
+ {
+ JMutexAutoLock lock(m_temp_mods_mutex);
+ m_temp_mods.copy(dst);
+ }
+#endif
+
+ /*
+ Update day-night lighting difference flag.
+
+ Sets m_day_night_differs to appropriate value.
+
+ These methods don't care about neighboring blocks.
+ It means that to know if a block really doesn't need a mesh
+ update between day and night, the neighboring blocks have
+ to be taken into account. Use Map::dayNightDiffed().
+ */
+ void updateDayNightDiff();
+
+ bool dayNightDiffed()
+ {
+ return m_day_night_differs;
+ }
+
+ /*
+ Miscellaneous stuff
+ */
+
+ /*
+ Tries to measure ground level.
+ Return value:
+ -1 = only air
+ -2 = only ground
+ -3 = random fail
+ 0...MAP_BLOCKSIZE-1 = ground level
+ */
+ s16 getGroundLevel(v2s16 p2d);
+
+ /*
+ Timestamp (see m_timestamp)
+ NOTE: BLOCK_TIMESTAMP_UNDEFINED=0xffffffff means there is no timestamp.
+ */
+ void setTimestamp(u32 time)
+ {
+ m_timestamp = time;
+ setChangedFlag();
+ }
+ void setTimestampNoChangedFlag(u32 time)
+ {
+ m_timestamp = time;
+ }
+ u32 getTimestamp()
+ {
+ return m_timestamp;
+ }
+