From ee929793f09c431693e1bef7edd77213ba412f60 Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Sun, 25 May 2014 13:46:34 +0100 Subject: Hopefully fixed piston duplication issues * Fixes #879 * Fixes #714 --- src/World.h | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'src/World.h') diff --git a/src/World.h b/src/World.h index 86cbb3e7e..5ef63a540 100644 --- a/src/World.h +++ b/src/World.h @@ -117,6 +117,22 @@ public: }; + class cTaskSendBlockToAllPlayers : + public cTask + { + public: + cTaskSendBlockToAllPlayers(int a_BlockX, int a_BlockY, int a_BlockZ); + + protected: + // cTask overrides: + virtual void Run(cWorld & a_World) override; + + int m_BlockX; + int m_BlockY; + int m_BlockZ; + }; + + static const char * GetClassStatic(void) // Needed for ManualBindings's ForEach templates { return "cWorld"; @@ -373,7 +389,7 @@ public: /** Sets the block at the specified coords to the specified value. Full processing, incl. updating neighbors, is performed. */ - void SetBlock(int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta); + void SetBlock(int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, bool a_SendToClients = true); /** Sets the block at the specified coords to the specified value. The replacement doesn't trigger block updates. -- cgit v1.2.3