From 2630798f0969e44180cfbeb2076629f19690a472 Mon Sep 17 00:00:00 2001 From: Howaner Date: Sun, 30 Nov 2014 20:57:14 +0100 Subject: Added a CanBeAt(...) check to HandleRightClick() --- src/Blocks/BlockHandler.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/Blocks/BlockHandler.h') diff --git a/src/Blocks/BlockHandler.h b/src/Blocks/BlockHandler.h index f2298afb5..6c782da8c 100644 --- a/src/Blocks/BlockHandler.h +++ b/src/Blocks/BlockHandler.h @@ -14,6 +14,7 @@ class cBlockPluginInterface; class cChunkInterface; class cWorldInterface; class cItems; +class cWorld; @@ -83,7 +84,10 @@ public: @param a_DropVerbatim Calls ConvertToVerbatimPickups() instead of its counterpart, meaning the block itself is dropped by default (due to a speical tool or enchantment) */ virtual void DropBlock(cChunkInterface & a_ChunkInterface, cWorldInterface & a_WorldInterface, cBlockPluginInterface & a_BlockPluginInterface, cEntity * a_Digger, int a_BlockX, int a_BlockY, int a_BlockZ, bool a_CanDrop = true); - + + /** Checks if the block can stay at the specified absolute coords */ + bool CanBeAt(cWorld * a_World, int a_BlockX, int a_BlockY, int a_BlockZ); + /// 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); -- cgit v1.2.3