summaryrefslogtreecommitdiffstats
path: root/src/ChunkMap.cpp
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-02-18 21:40:02 +0100
committerTheJumper <maximilian.springer@web.de>2014-02-23 19:50:50 +0100
commit7bc59468832f2eb25f64194ba29da4a821a33866 (patch)
treeb22a6888cc8ff883c227835c426e1d786523d970 /src/ChunkMap.cpp
parentAdd Skulls/Heads (diff)
downloadcuberite-7bc59468832f2eb25f64194ba29da4a821a33866.tar
cuberite-7bc59468832f2eb25f64194ba29da4a821a33866.tar.gz
cuberite-7bc59468832f2eb25f64194ba29da4a821a33866.tar.bz2
cuberite-7bc59468832f2eb25f64194ba29da4a821a33866.tar.lz
cuberite-7bc59468832f2eb25f64194ba29da4a821a33866.tar.xz
cuberite-7bc59468832f2eb25f64194ba29da4a821a33866.tar.zst
cuberite-7bc59468832f2eb25f64194ba29da4a821a33866.zip
Diffstat (limited to '')
-rw-r--r--src/ChunkMap.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/ChunkMap.cpp b/src/ChunkMap.cpp
index 01195e8bc..006ccfb29 100644
--- a/src/ChunkMap.cpp
+++ b/src/ChunkMap.cpp
@@ -2178,6 +2178,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;