diff options
author | Howaner <franzi.moos@googlemail.com> | 2014-03-07 01:30:34 +0100 |
---|---|---|
committer | Howaner <franzi.moos@googlemail.com> | 2014-03-07 01:30:34 +0100 |
commit | 787a71929cd4095681b37acf81332b7b9c3ddf89 (patch) | |
tree | 2a35d5ecc058f1defaa0051b99d0ffe63770f4b8 /src/ChunkMap.cpp | |
parent | Merge pull request #747 from mc-server/InfoDump_Github (diff) | |
download | cuberite-787a71929cd4095681b37acf81332b7b9c3ddf89.tar cuberite-787a71929cd4095681b37acf81332b7b9c3ddf89.tar.gz cuberite-787a71929cd4095681b37acf81332b7b9c3ddf89.tar.bz2 cuberite-787a71929cd4095681b37acf81332b7b9c3ddf89.tar.lz cuberite-787a71929cd4095681b37acf81332b7b9c3ddf89.tar.xz cuberite-787a71929cd4095681b37acf81332b7b9c3ddf89.tar.zst cuberite-787a71929cd4095681b37acf81332b7b9c3ddf89.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 b5795fbaf..7f999fd31 100644 --- a/src/ChunkMap.cpp +++ b/src/ChunkMap.cpp @@ -2200,6 +2200,24 @@ bool cChunkMap::DoWithMobHeadBlockAt(int a_BlockX, int a_BlockY, int a_BlockZ, c +bool cChunkMap::DoWithFlowerPotAt(int a_BlockX, int a_BlockY, int a_BlockZ, cFlowerPotCallback & 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->DoWithFlowerPotAt(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; |