summaryrefslogtreecommitdiffstats
path: root/src/Entities/Player.h
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-12-24 07:20:17 +0100
committerMattes D <github@xoft.cz>2014-12-24 07:20:17 +0100
commitccdf03daaf880dd0c89a03b50c11eb083ee1cfb0 (patch)
tree445feea29fb0a2228cd8187821a1bf8e519c5807 /src/Entities/Player.h
parentAdded Vector3::TurnCW() and Vector3::TurnCCW() (diff)
downloadcuberite-ccdf03daaf880dd0c89a03b50c11eb083ee1cfb0.tar
cuberite-ccdf03daaf880dd0c89a03b50c11eb083ee1cfb0.tar.gz
cuberite-ccdf03daaf880dd0c89a03b50c11eb083ee1cfb0.tar.bz2
cuberite-ccdf03daaf880dd0c89a03b50c11eb083ee1cfb0.tar.lz
cuberite-ccdf03daaf880dd0c89a03b50c11eb083ee1cfb0.tar.xz
cuberite-ccdf03daaf880dd0c89a03b50c11eb083ee1cfb0.tar.zst
cuberite-ccdf03daaf880dd0c89a03b50c11eb083ee1cfb0.zip
Diffstat (limited to 'src/Entities/Player.h')
-rw-r--r--src/Entities/Player.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/Entities/Player.h b/src/Entities/Player.h
index c643aaa8e..33ab5293c 100644
--- a/src/Entities/Player.h
+++ b/src/Entities/Player.h
@@ -440,8 +440,26 @@ public:
Loads the m_Rank, m_Permissions, m_MsgPrefix, m_MsgSuffix and m_MsgNameColorCode members. */
void LoadRank(void);
+ /** Calls the block-placement hook and places the block in the world, unless refused by the hook.
+ If the hook prevents the placement, sends the current block at the specified coords back to the client.
+ Assumes that all the blocks are in currently loaded chunks. */
+ bool PlaceBlock(int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta);
+
+ /** Sends the block in the specified range around the specified coord to the client
+ as a block change packet.
+ The blocks in range (a_BlockX - a_Range, a_BlockX + a_Range) are sent (NY-metric). */
+ void SendBlocksAround(int a_BlockX, int a_BlockY, int a_BlockZ, int a_Range = 1);
+
// tolua_end
+ /** Calls the block placement hooks and places the blocks in the world.
+ First the "placing" hooks for all the blocks are called, then the blocks are placed, and finally
+ the "placed" hooks are called.
+ If the any of the "placing" hooks aborts, none of the blocks are placed and the function returns false.
+ Returns true if all the blocks are placed.
+ Assumes that all the blocks are in currently loaded chunks. */
+ bool PlaceBlocks(const sSetBlockVector & a_Blocks);
+
// cEntity overrides:
virtual bool IsCrouched (void) const { return m_IsCrouched; }
virtual bool IsSprinting(void) const { return m_IsSprinting; }