diff options
author | Howaner <franzi.moos@googlemail.com> | 2014-02-18 21:40:02 +0100 |
---|---|---|
committer | Howaner <franzi.moos@googlemail.com> | 2014-02-18 21:40:02 +0100 |
commit | 52c41f886927cf62ed592ba7fec974eee6b16844 (patch) | |
tree | a8479e65d606e2bcdf092501f30a43b778917d13 /src/ChunkMap.cpp | |
parent | Add Skulls/Heads (diff) | |
download | cuberite-52c41f886927cf62ed592ba7fec974eee6b16844.tar cuberite-52c41f886927cf62ed592ba7fec974eee6b16844.tar.gz cuberite-52c41f886927cf62ed592ba7fec974eee6b16844.tar.bz2 cuberite-52c41f886927cf62ed592ba7fec974eee6b16844.tar.lz cuberite-52c41f886927cf62ed592ba7fec974eee6b16844.tar.xz cuberite-52c41f886927cf62ed592ba7fec974eee6b16844.tar.zst cuberite-52c41f886927cf62ed592ba7fec974eee6b16844.zip |
Diffstat (limited to '')
-rw-r--r-- | src/ChunkMap.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/ChunkMap.cpp b/src/ChunkMap.cpp index 0c5a8d9b9..5f1674c03 100644 --- a/src/ChunkMap.cpp +++ b/src/ChunkMap.cpp @@ -2121,6 +2121,24 @@ bool cChunkMap::DoWithCommandBlockAt(int a_BlockX, int a_BlockY, int a_BlockZ, c +bool cChunkMap::DoWithSkullBlockAt(int a_BlockX, int a_BlockY, int a_BlockZ, cSkullBlockCallback & 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->DoWithSkullBlockAt(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) { int ChunkX, ChunkZ; |