summaryrefslogtreecommitdiffstats
path: root/source/Blocks
diff options
context:
space:
mode:
authorSamuel Barney <samjbarney@gmail.com>2013-10-13 00:38:07 +0200
committerSamuel Barney <samjbarney@gmail.com>2013-10-13 00:38:07 +0200
commit277a18626deedb55db0cacc557a9d8292f65fc7e (patch)
treeefc01b80f5d7b51576a90316a5f30f3bf62fa6c4 /source/Blocks
parentCrop blocks now respect water and light. Currently a block has to be "watered" or the crop has a chance of breaking anyways. (diff)
downloadcuberite-277a18626deedb55db0cacc557a9d8292f65fc7e.tar
cuberite-277a18626deedb55db0cacc557a9d8292f65fc7e.tar.gz
cuberite-277a18626deedb55db0cacc557a9d8292f65fc7e.tar.bz2
cuberite-277a18626deedb55db0cacc557a9d8292f65fc7e.tar.lz
cuberite-277a18626deedb55db0cacc557a9d8292f65fc7e.tar.xz
cuberite-277a18626deedb55db0cacc557a9d8292f65fc7e.tar.zst
cuberite-277a18626deedb55db0cacc557a9d8292f65fc7e.zip
Diffstat (limited to 'source/Blocks')
-rw-r--r--source/Blocks/BlockCrops.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/source/Blocks/BlockCrops.h b/source/Blocks/BlockCrops.h
index 81d35a06c..e7b320eac 100644
--- a/source/Blocks/BlockCrops.h
+++ b/source/Blocks/BlockCrops.h
@@ -78,14 +78,13 @@ public:
void OnUpdate(cWorld * a_World, int a_BlockX, int a_BlockY, int a_BlockZ) override
{
NIBBLETYPE Meta = a_World->GetBlockMeta(a_BlockX, a_BlockY, a_BlockZ);
- NIBBLETYPE Water = a_World->GetBlockMeta(a_BlockX, a_BlockY - 1, a_BlockZ);
NIBBLETYPE Light = a_World->GetBlockBlockLight(a_BlockX, a_BlockY, a_BlockZ);
- if ((Meta < 7) && (Water > 0) && (Light > 8))
+ if ((Meta < 7) && (Light > 8))
{
a_World->FastSetBlock(a_BlockX, a_BlockY, a_BlockZ, E_BLOCK_CROPS, ++Meta);
}
- else if ((!Water) || (Light < 9))
+ else if (Light < 9)
{
a_World->DigBlock(a_BlockX, a_BlockY, a_BlockZ);
}