summaryrefslogtreecommitdiffstats
path: root/src/ChunkMap.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2013-12-14 22:00:30 +0100
committerMattes D <github@xoft.cz>2013-12-14 22:00:30 +0100
commit22ee94ffaf2ff1098a77b2e9a2a97040e0d1986e (patch)
tree4299dac2569ac649645a28bbe8aa50f1ba9de246 /src/ChunkMap.cpp
parentMerge pull request #429 from worktycho/quickfixs (diff)
parentPotentially fixed debug asserts (diff)
downloadcuberite-22ee94ffaf2ff1098a77b2e9a2a97040e0d1986e.tar
cuberite-22ee94ffaf2ff1098a77b2e9a2a97040e0d1986e.tar.gz
cuberite-22ee94ffaf2ff1098a77b2e9a2a97040e0d1986e.tar.bz2
cuberite-22ee94ffaf2ff1098a77b2e9a2a97040e0d1986e.tar.lz
cuberite-22ee94ffaf2ff1098a77b2e9a2a97040e0d1986e.tar.xz
cuberite-22ee94ffaf2ff1098a77b2e9a2a97040e0d1986e.tar.zst
cuberite-22ee94ffaf2ff1098a77b2e9a2a97040e0d1986e.zip
Diffstat (limited to 'src/ChunkMap.cpp')
-rw-r--r--src/ChunkMap.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/ChunkMap.cpp b/src/ChunkMap.cpp
index cb722af3b..f2195741d 100644
--- a/src/ChunkMap.cpp
+++ b/src/ChunkMap.cpp
@@ -1899,6 +1899,23 @@ bool cChunkMap::DoWithFurnaceAt(int a_BlockX, int a_BlockY, int a_BlockZ, cFurna
+bool cChunkMap::DoWithNoteBlockAt(int a_BlockX, int a_BlockY, int a_BlockZ, cNoteBlockCallback & a_Callback)
+{
+ int ChunkX, ChunkZ;
+ int BlockX = a_BlockX, BlockY = a_BlockY, BlockZ = a_BlockZ;
+ cChunkDef::AbsoluteToRelative(BlockX, BlockY, BlockZ, ChunkX, ChunkZ);
+ cCSLock Lock(m_CSLayers);
+ cChunkPtr Chunk = GetChunkNoGen(ChunkX, ZERO_CHUNK_Y, ChunkZ);
+ if ((Chunk == NULL) && !Chunk->IsValid())
+ {
+ return false;
+ }
+ return Chunk->DoWithNoteBlockAt(a_BlockX, a_BlockY, a_BlockZ, a_Callback);
+}
+
+
+
+
bool cChunkMap::GetSignLines(int a_BlockX, int a_BlockY, int a_BlockZ, AString & a_Line1, AString & a_Line2, AString & a_Line3, AString & a_Line4)
{