From 039191499caec958d3d79773e4ed1c1c4e2916c2 Mon Sep 17 00:00:00 2001 From: Howaner Date: Sun, 6 Apr 2014 21:41:01 +0200 Subject: Add CanChangeDirtToGrass function to Block Handlers. --- 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 3a3efb3cc..760db02fe 100644 --- a/src/Blocks/BlockHandler.h +++ b/src/Blocks/BlockHandler.h @@ -85,6 +85,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); + + /** Can spread the block under this block to grass? */ + virtual bool CanChangeDirtToGrass(BLOCKTYPE a_Block, NIBBLETYPE a_Meta); /** Checks if the block can be placed at this point. Default: CanBeAt(...) -- cgit v1.2.3 From 4d7b250a509213fa7043b3670c6a393a3683fc69 Mon Sep 17 00:00:00 2001 From: Howaner Date: Sun, 6 Apr 2014 21:45:55 +0200 Subject: Remove old import --- src/Blocks/BlockHandler.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Blocks/BlockHandler.h') diff --git a/src/Blocks/BlockHandler.h b/src/Blocks/BlockHandler.h index 760db02fe..4d6a2abb6 100644 --- a/src/Blocks/BlockHandler.h +++ b/src/Blocks/BlockHandler.h @@ -86,7 +86,7 @@ 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); - /** Can spread the block under this block to grass? */ + /** Can change the block under this block to grass? */ virtual bool CanChangeDirtToGrass(BLOCKTYPE a_Block, NIBBLETYPE a_Meta); /** Checks if the block can be placed at this point. -- cgit v1.2.3 From 36a2aa2f212212426f94db736eb8f889340c5e00 Mon Sep 17 00:00:00 2001 From: Howaner Date: Wed, 7 May 2014 12:59:48 +0200 Subject: Rename CanChangeDirtToGrass to CanDirtGrowGrass --- src/Blocks/BlockHandler.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Blocks/BlockHandler.h') diff --git a/src/Blocks/BlockHandler.h b/src/Blocks/BlockHandler.h index 4d6a2abb6..fb6cae729 100644 --- a/src/Blocks/BlockHandler.h +++ b/src/Blocks/BlockHandler.h @@ -86,8 +86,8 @@ 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); - /** Can change the block under this block to grass? */ - virtual bool CanChangeDirtToGrass(BLOCKTYPE a_Block, NIBBLETYPE a_Meta); + /** Can the dirt under this block grow to grass? */ + virtual bool CanDirtGrowGrass(NIBBLETYPE a_Meta); /** Checks if the block can be placed at this point. Default: CanBeAt(...) -- cgit v1.2.3