summaryrefslogtreecommitdiffstats
path: root/src/World.cpp
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-12-13 20:31:37 +0100
committerHowaner <franzi.moos@googlemail.com>2014-12-13 20:31:37 +0100
commit2a8c234f464ebf9986132c8ba435f1a1cec3461c (patch)
tree5cbecc238cd5df4d9f3b86c5551327b8485e45d9 /src/World.cpp
parentMerge branch 'master' into Cocoa (diff)
downloadcuberite-2a8c234f464ebf9986132c8ba435f1a1cec3461c.tar
cuberite-2a8c234f464ebf9986132c8ba435f1a1cec3461c.tar.gz
cuberite-2a8c234f464ebf9986132c8ba435f1a1cec3461c.tar.bz2
cuberite-2a8c234f464ebf9986132c8ba435f1a1cec3461c.tar.lz
cuberite-2a8c234f464ebf9986132c8ba435f1a1cec3461c.tar.xz
cuberite-2a8c234f464ebf9986132c8ba435f1a1cec3461c.tar.zst
cuberite-2a8c234f464ebf9986132c8ba435f1a1cec3461c.zip
Diffstat (limited to '')
-rw-r--r--src/World.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/World.cpp b/src/World.cpp
index 1bee6e344..fc4a1fdfd 100644
--- a/src/World.cpp
+++ b/src/World.cpp
@@ -1520,7 +1520,21 @@ bool cWorld::GrowRipePlant(int a_BlockX, int a_BlockY, int a_BlockZ, bool a_IsBy
}
return true;
}
-
+
+ case E_BLOCK_COCOA_POD:
+ {
+ NIBBLETYPE TypeMeta = BlockMeta & 0x03;
+ int GrowState = (BlockMeta & 0x0f) >> 2;
+
+ if (GrowState < 2)
+ {
+ GrowState++;
+ FastSetBlock(a_BlockX, a_BlockY, a_BlockZ, BlockType, (NIBBLETYPE) (GrowState << 2 | TypeMeta));
+ BroadcastSoundParticleEffect(2005, a_BlockX, a_BlockY, a_BlockZ, 0);
+ }
+ return true;
+ }
+
case E_BLOCK_CROPS:
{
if (a_IsByBonemeal && !m_IsCropsBonemealable)