summaryrefslogtreecommitdiffstats
path: root/src/ChunkMap.cpp
diff options
context:
space:
mode:
authorLukas Pioch <lukas@zgow.de>2015-09-24 10:48:33 +0200
committerLukas Pioch <lukas@zgow.de>2015-11-03 18:00:55 +0100
commit9749c3aac9dbfbc46a919193c97bb9c9e5339e03 (patch)
tree7ea9f3b0029bbf5041c2f05c7d3f3e156c3e6186 /src/ChunkMap.cpp
parentMerge pull request #2595 from cengizIO/master (diff)
downloadcuberite-9749c3aac9dbfbc46a919193c97bb9c9e5339e03.tar
cuberite-9749c3aac9dbfbc46a919193c97bb9c9e5339e03.tar.gz
cuberite-9749c3aac9dbfbc46a919193c97bb9c9e5339e03.tar.bz2
cuberite-9749c3aac9dbfbc46a919193c97bb9c9e5339e03.tar.lz
cuberite-9749c3aac9dbfbc46a919193c97bb9c9e5339e03.tar.xz
cuberite-9749c3aac9dbfbc46a919193c97bb9c9e5339e03.tar.zst
cuberite-9749c3aac9dbfbc46a919193c97bb9c9e5339e03.zip
Diffstat (limited to 'src/ChunkMap.cpp')
-rw-r--r--src/ChunkMap.cpp33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/ChunkMap.cpp b/src/ChunkMap.cpp
index 59a743746..d95ffd6ef 100644
--- a/src/ChunkMap.cpp
+++ b/src/ChunkMap.cpp
@@ -2085,6 +2085,21 @@ bool cChunkMap::ForEachBlockEntityInChunk(int a_ChunkX, int a_ChunkZ, cBlockEnti
+bool cChunkMap::ForEachBrewingstandInChunk(int a_ChunkX, int a_ChunkZ, cBrewingstandCallback & a_Callback)
+{
+ cCSLock Lock(m_CSLayers);
+ cChunkPtr Chunk = GetChunkNoGen(a_ChunkX, a_ChunkZ);
+ if ((Chunk == nullptr) || !Chunk->IsValid())
+ {
+ return false;
+ }
+ return Chunk->ForEachBrewingstand(a_Callback);
+}
+
+
+
+
+
bool cChunkMap::ForEachChestInChunk(int a_ChunkX, int a_ChunkZ, cChestCallback & a_Callback)
{
cCSLock Lock(m_CSLayers);
@@ -2196,6 +2211,24 @@ bool cChunkMap::DoWithBeaconAt(int a_BlockX, int a_BlockY, int a_BlockZ, cBeacon
+bool cChunkMap::DoWithBrewingstandAt(int a_BlockX, int a_BlockY, int a_BlockZ, cBrewingstandCallback & 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, ChunkZ);
+ if ((Chunk == nullptr) || !Chunk->IsValid())
+ {
+ return false;
+ }
+ return Chunk->DoWithBrewingstandAt(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;