diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2013-12-14 17:52:22 +0100 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2013-12-14 17:52:22 +0100 |
commit | 95be80cdb5322720e7c9fbd13ec2692288afd931 (patch) | |
tree | 67c1bbcf1ebe887521d7c24dc5c2a2a84e5d3494 /src/ChunkMap.cpp | |
parent | Update Core (diff) | |
download | cuberite-95be80cdb5322720e7c9fbd13ec2692288afd931.tar cuberite-95be80cdb5322720e7c9fbd13ec2692288afd931.tar.gz cuberite-95be80cdb5322720e7c9fbd13ec2692288afd931.tar.bz2 cuberite-95be80cdb5322720e7c9fbd13ec2692288afd931.tar.lz cuberite-95be80cdb5322720e7c9fbd13ec2692288afd931.tar.xz cuberite-95be80cdb5322720e7c9fbd13ec2692288afd931.tar.zst cuberite-95be80cdb5322720e7c9fbd13ec2692288afd931.zip |
Diffstat (limited to '')
-rw-r--r-- | src/ChunkMap.cpp | 17 |
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) { |