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/BlockHandler.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/Blocks/BlockHandler.h') diff --git a/src/Blocks/BlockHandler.h b/src/Blocks/BlockHandler.h index c2a9e1769..0159230a2 100644 --- a/src/Blocks/BlockHandler.h +++ b/src/Blocks/BlockHandler.h @@ -88,6 +88,9 @@ public: /** Checks if the block can stay at the specified relative coords in the chunk */ virtual bool CanBeAt(cChunkInterface & a_ChunkInterface, int a_RelX, int a_RelY, int a_RelZ, const cChunk & a_Chunk); + + /** Checks whether the block has an effect on growing the plant */ + virtual bool CanSustainPlant(BLOCKTYPE a_Plant) { return false; } /** Checks if the block can be placed at this point. Default: CanBeAt(...) -- cgit v1.2.3