summaryrefslogtreecommitdiffstats
path: root/source/cChunk.cpp
diff options
context:
space:
mode:
authorfaketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-03-10 03:39:36 +0100
committerfaketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-03-10 03:39:36 +0100
commit68f3ea56bdcf4664ee119016a0745d46f2c31a65 (patch)
treeedbf0523589e4a458c999c076c041ad61dcdb8b2 /source/cChunk.cpp
parentUsing more of the index functions in cChunk, so it should be easy enough to flip the axis ordering now (diff)
downloadcuberite-68f3ea56bdcf4664ee119016a0745d46f2c31a65.tar
cuberite-68f3ea56bdcf4664ee119016a0745d46f2c31a65.tar.gz
cuberite-68f3ea56bdcf4664ee119016a0745d46f2c31a65.tar.bz2
cuberite-68f3ea56bdcf4664ee119016a0745d46f2c31a65.tar.lz
cuberite-68f3ea56bdcf4664ee119016a0745d46f2c31a65.tar.xz
cuberite-68f3ea56bdcf4664ee119016a0745d46f2c31a65.tar.zst
cuberite-68f3ea56bdcf4664ee119016a0745d46f2c31a65.zip
Diffstat (limited to 'source/cChunk.cpp')
-rw-r--r--source/cChunk.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/cChunk.cpp b/source/cChunk.cpp
index 74aad7a09..f1f7300c6 100644
--- a/source/cChunk.cpp
+++ b/source/cChunk.cpp
@@ -539,7 +539,11 @@ void cChunk::Tick(float a_Dt, MTRand & a_TickRandom)
case E_BLOCK_GRASS:
{
+#if AXIS_ORDER == AXIS_ORDER_YZX
char AboveBlock = GetBlock( Index+1 );
+#else if AXIS_ORDER == AXIS_ORDER_XZY
+ char AboveBlock = GetBlock( Index + (c_ChunkWidth*c_ChunkWidth) );
+#endif
if (!( (AboveBlock == 0) || (g_BlockOneHitDig[AboveBlock]) || (g_BlockTransparent[AboveBlock]) ) ) //changed to not allow grass if any one hit object is on top
{
FastSetBlock( m_BlockTickX, m_BlockTickY, m_BlockTickZ, E_BLOCK_DIRT, GetNibble( m_BlockMeta, Index ) );