From 61904af626b036b6e4e045ca219b2a361aa45a6e Mon Sep 17 00:00:00 2001 From: Mattes D Date: Fri, 11 Oct 2019 11:02:53 +0200 Subject: Moved growing from cWorld / cChunk to cBlockHandler descendants. --- src/Blocks/BlockHandler.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/Blocks/BlockHandler.h') diff --git a/src/Blocks/BlockHandler.h b/src/Blocks/BlockHandler.h index c0a11186e..789ef4dd5 100644 --- a/src/Blocks/BlockHandler.h +++ b/src/Blocks/BlockHandler.h @@ -200,6 +200,10 @@ public: Returns block meta following rotation */ virtual NIBBLETYPE MetaMirrorYZ(NIBBLETYPE a_Meta) { return a_Meta; } + /** Grows this block, if it supports growing, by the specified amount of stages (at most). + Returns the number of stages actually grown, zero if not supported (default). */ + virtual int Grow(cChunk & a_Chunk, Vector3i a_RelPos, int a_NumStages = 1) { return 0; } + /** Returns true if the specified tool is valid and has a non-zero silk-touch enchantment. Helper used in many ConvertToPickups() implementations. */ static bool ToolHasSilkTouch(const cItem * a_Tool); -- cgit v1.2.3