allow use failures to propagate from the entity/block to the player
This commit is contained in:
@@ -70,8 +70,9 @@ public:
|
||||
/** Called when the player starts digging the block. */
|
||||
virtual void OnDigging(cChunkInterface & cChunkInterface, cWorldInterface & a_WorldInterface, cPlayer * a_Player, int a_BlockX, int a_BlockY, int a_BlockZ) {}
|
||||
|
||||
/** Called if the user right clicks the block and the block is useable */
|
||||
virtual void OnUse(cChunkInterface & a_ChunkInterface, cWorldInterface & a_WorldInterface, cPlayer * a_Player, int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace, int a_CursorX, int a_CursorY, int a_CursorZ) {}
|
||||
/** Called if the user right clicks the block and the block is useable
|
||||
returns true if the use was successful, return false to use the block as a "normal" block */
|
||||
virtual bool OnUse(cChunkInterface & a_ChunkInterface, cWorldInterface & a_WorldInterface, cPlayer * a_Player, int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace, int a_CursorX, int a_CursorY, int a_CursorZ) { return false; }
|
||||
|
||||
/** Called when a right click to this block is cancelled */
|
||||
virtual void OnCancelRightClick(cChunkInterface & a_ChunkInterface, cWorldInterface & a_WorldInterface, cPlayer * a_Player, int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace) {}
|
||||
|
||||
Reference in New Issue
Block a user