summaryrefslogtreecommitdiffstats
path: root/source/cChunk.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/cChunk.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/cChunk.cpp')
-rw-r--r--source/cChunk.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/source/cChunk.cpp b/source/cChunk.cpp
index 4eaa9d864..0cdebc503 100644
--- a/source/cChunk.cpp
+++ b/source/cChunk.cpp
@@ -1398,6 +1398,17 @@ BLOCKTYPE cChunk::GetBlock( int a_BlockIdx )
+void cChunk::GetBlockTypeMeta(int a_RelX, int a_RelY, int a_RelZ, BLOCKTYPE & a_BlockType, NIBBLETYPE & a_BlockMeta)
+{
+ int Idx = cChunkDef::MakeIndexNoCheck(a_RelX, a_RelY, a_RelZ);
+ a_BlockType = cChunkDef::GetBlock (m_BlockTypes, a_RelX, a_RelY, a_RelZ);
+ a_BlockMeta = cChunkDef::GetNibble(m_BlockMeta, a_RelX, a_RelY, a_RelZ);
+}
+
+
+
+
+
/*
// _X 2012_02_23: Loading in old format not supported anymore
/// Loads the chunk from the old-format disk file, erases the file afterwards. Returns true if successful