From cc83c4641d50818bf4fd830653438515ed5264d3 Mon Sep 17 00:00:00 2001 From: Samuel Barney Date: Wed, 19 Aug 2015 10:45:53 -0600 Subject: * Logic for handling plant growth has been centralized into cBlockPlant, and all growable plants now inherit from it. * Blocks now have an effect upon plant growth, just like in vanilla. --- src/Blocks/BlockFluid.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/Blocks/BlockFluid.h') diff --git a/src/Blocks/BlockFluid.h b/src/Blocks/BlockFluid.h index 56a2ad3c2..2d9adbab5 100644 --- a/src/Blocks/BlockFluid.h +++ b/src/Blocks/BlockFluid.h @@ -57,6 +57,17 @@ public: ASSERT(!"Unhandled blocktype in fluid/water handler!"); return 0; } + + virtual bool CanSustainPlant(BLOCKTYPE a_Plant) override + { + return ( + (a_Plant == E_BLOCK_CROPS) || + (a_Plant == E_BLOCK_CARROTS) || + (a_Plant == E_BLOCK_POTATOES) || + (a_Plant == E_BLOCK_MELON_STEM) || + (a_Plant == E_BLOCK_PUMPKIN_STEM) + ); + } } ; @@ -144,6 +155,11 @@ public: UNUSED(a_Meta); return 4; } + + virtual bool CanSustainPlant(BLOCKTYPE a_Plant) override + { + return false; + } } ; -- cgit v1.2.3