summaryrefslogtreecommitdiffstats
path: root/src/ChunkMap.cpp
diff options
context:
space:
mode:
authorJulian Laubstein <julianlaubstein@yahoo.de>2015-11-03 22:06:43 +0100
committerJulian Laubstein <julianlaubstein@yahoo.de>2015-11-03 22:06:43 +0100
commit1bc145ff44bee52d3b71812cc06ffe214f4ac216 (patch)
tree7ea9f3b0029bbf5041c2f05c7d3f3e156c3e6186 /src/ChunkMap.cpp
parentMerge pull request #2595 from cengizIO/master (diff)
parentImplemented brewing (diff)
downloadcuberite-1bc145ff44bee52d3b71812cc06ffe214f4ac216.tar
cuberite-1bc145ff44bee52d3b71812cc06ffe214f4ac216.tar.gz
cuberite-1bc145ff44bee52d3b71812cc06ffe214f4ac216.tar.bz2
cuberite-1bc145ff44bee52d3b71812cc06ffe214f4ac216.tar.lz
cuberite-1bc145ff44bee52d3b71812cc06ffe214f4ac216.tar.xz
cuberite-1bc145ff44bee52d3b71812cc06ffe214f4ac216.tar.zst
cuberite-1bc145ff44bee52d3b71812cc06ffe214f4ac216.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;