summaryrefslogtreecommitdiffstats
path: root/src/ChunkMap.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-08-01 17:43:02 +0200
committerMattes D <github@xoft.cz>2014-08-01 17:43:02 +0200
commit35cfbfd51a15233bb0860804c525597d95260300 (patch)
treeb11052934d85badc24e2d17ef1e51b5ea64040ec /src/ChunkMap.cpp
parentMerge pull request #1270 from Howaner/Options (diff)
parentUse "default:" in switch. (diff)
downloadcuberite-35cfbfd51a15233bb0860804c525597d95260300.tar
cuberite-35cfbfd51a15233bb0860804c525597d95260300.tar.gz
cuberite-35cfbfd51a15233bb0860804c525597d95260300.tar.bz2
cuberite-35cfbfd51a15233bb0860804c525597d95260300.tar.lz
cuberite-35cfbfd51a15233bb0860804c525597d95260300.tar.xz
cuberite-35cfbfd51a15233bb0860804c525597d95260300.tar.zst
cuberite-35cfbfd51a15233bb0860804c525597d95260300.zip
Diffstat (limited to 'src/ChunkMap.cpp')
-rw-r--r--src/ChunkMap.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/ChunkMap.cpp b/src/ChunkMap.cpp
index 05d219918..dd8be0631 100644
--- a/src/ChunkMap.cpp
+++ b/src/ChunkMap.cpp
@@ -1839,6 +1839,7 @@ void cChunkMap::DoExplosionAt(double a_ExplosionSize, double a_BlockX, double a_
}
case E_BLOCK_OBSIDIAN:
+ case E_BLOCK_BEACON:
case E_BLOCK_BEDROCK:
case E_BLOCK_WATER:
case E_BLOCK_LAVA:
@@ -2115,6 +2116,24 @@ bool cChunkMap::DoWithBlockEntityAt(int a_BlockX, int a_BlockY, int a_BlockZ, cB
+bool cChunkMap::DoWithBeaconAt(int a_BlockX, int a_BlockY, int a_BlockZ, cBeaconCallback & 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->DoWithBeaconAt(a_BlockX, a_BlockY, a_BlockZ, a_Callback);
+}
+
+
+
+
+
bool cChunkMap::DoWithChestAt(int a_BlockX, int a_BlockY, int a_BlockZ, cChestCallback & a_Callback)
{
int ChunkX, ChunkZ;