summaryrefslogtreecommitdiffstats
path: root/source/cChunkMap.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-06-07 13:57:51 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-06-07 13:57:51 +0200
commitc0a73ef89d13841fa98b8541ea801cfaa817eb35 (patch)
treecfa795d9082cae65d8a03758e753cea8c1ad41fc /source/cChunkMap.cpp
parentGrass grows under vines (diff)
downloadcuberite-c0a73ef89d13841fa98b8541ea801cfaa817eb35.tar
cuberite-c0a73ef89d13841fa98b8541ea801cfaa817eb35.tar.gz
cuberite-c0a73ef89d13841fa98b8541ea801cfaa817eb35.tar.bz2
cuberite-c0a73ef89d13841fa98b8541ea801cfaa817eb35.tar.lz
cuberite-c0a73ef89d13841fa98b8541ea801cfaa817eb35.tar.xz
cuberite-c0a73ef89d13841fa98b8541ea801cfaa817eb35.tar.zst
cuberite-c0a73ef89d13841fa98b8541ea801cfaa817eb35.zip
Diffstat (limited to 'source/cChunkMap.cpp')
-rw-r--r--source/cChunkMap.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/source/cChunkMap.cpp b/source/cChunkMap.cpp
index 93bc8ded0..1db55485b 100644
--- a/source/cChunkMap.cpp
+++ b/source/cChunkMap.cpp
@@ -642,6 +642,23 @@ void cChunkMap::SetBlock(int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE a_B
+void cChunkMap::GetBlockTypeMeta(int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE & a_BlockType, NIBBLETYPE & a_BlockMeta)
+{
+ int ChunkX, ChunkZ, X = a_BlockX, Y = a_BlockY, Z = a_BlockZ;
+ cChunkDef::AbsoluteToRelative( X, Y, Z, ChunkX, ChunkZ );
+
+ cCSLock Lock(m_CSLayers);
+ cChunkPtr Chunk = GetChunk( ChunkX, ZERO_CHUNK_Y, ChunkZ );
+ if ((Chunk != NULL) && Chunk->IsValid())
+ {
+ Chunk->GetBlockTypeMeta(X, Y, Z, a_BlockType, a_BlockMeta);
+ }
+}
+
+
+
+
+
void cChunkMap::ReplaceBlocks(const sSetBlockVector & a_Blocks, BLOCKTYPE a_FilterBlockType)
{
cCSLock Lock(m_CSLayers);