From 6e4122e551eeb41d3e950b363dd837d5586fe560 Mon Sep 17 00:00:00 2001 From: Mattes D Date: Fri, 31 Jul 2015 16:49:10 +0200 Subject: Unified the doxy-comment format. --- src/Blocks/BlockHandler.h | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) (limited to 'src/Blocks/BlockHandler.h') diff --git a/src/Blocks/BlockHandler.h b/src/Blocks/BlockHandler.h index 4a484dfad..c2a9e1769 100644 --- a/src/Blocks/BlockHandler.h +++ b/src/Blocks/BlockHandler.h @@ -26,15 +26,14 @@ public: virtual ~cBlockHandler() {} - /// Called when the block gets ticked either by a random tick or by a queued tick. - /// Note that the coords are chunk-relative! + /** Called when the block gets ticked either by a random tick or by a queued tick. + Note that the coords are chunk-relative! */ virtual void OnUpdate(cChunkInterface & cChunkInterface, cWorldInterface & a_WorldInterface, cBlockPluginInterface & a_BlockPluginInterface, cChunk & a_Chunk, int a_RelX, int a_RelY, int a_RelZ); /** Called before a block is placed into a world. The handler should return true to allow placement, false to refuse. Also, the handler should set a_BlockType and a_BlockMeta to correct values for the newly placed block. - Called by cItemHandler::GetPlacementBlockTypeMeta() if the item is a block - */ + Called by cItemHandler::GetPlacementBlockTypeMeta() if the item is a block */ virtual bool GetPlacementBlockTypeMeta( cChunkInterface & a_ChunkInterface, cPlayer * a_Player, int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace, @@ -50,10 +49,10 @@ public: cChunkInterface & a_ChunkInterface, cWorldInterface & a_WorldInterface, cPlayer * a_Player, const sSetBlock & a_BlockChange ); - /// Called before the player has destroyed a block + /** Called before the player has destroyed a block */ virtual void OnDestroyedByPlayer(cChunkInterface & a_ChunkInterface, cWorldInterface & a_WorldInterface, cPlayer * a_Player, int a_BlockX, int a_BlockY, int a_BlockZ); - /// Called before a block gets destroyed / replaced with air + /** Called before a block gets destroyed / replaced with air */ virtual void OnDestroyed(cChunkInterface & a_ChunkInterface, cWorldInterface & a_WorldInterface, int a_BlockX, int a_BlockY, int a_BlockZ); /** Called when a direct neighbor of this block has been changed (The position is the block's own position, not the changing neighbor's position) @@ -71,13 +70,13 @@ 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 + /** 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 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) {} - /// Called when the item is mined to convert it into pickups. Pickups may specify multiple items. Appends items to a_Pickups, preserves its original contents + /** Called when the item is mined to convert it into pickups. Pickups may specify multiple items. Appends items to a_Pickups, preserves its original contents */ virtual void ConvertToPickups(cItems & a_Pickups, NIBBLETYPE a_BlockMeta); /** Handles the dropping, but not destruction, of a block based on what ConvertTo(Verbatim)Pickups() returns, including the spawning of pickups and alertion of plugins @@ -87,7 +86,7 @@ public: */ 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 relative coords in the chunk + /** 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); /** Checks if the block can be placed at this point. @@ -130,24 +129,24 @@ public: /** Returns the base colour ID of the block, as will be represented on a map, as per documentation: http://minecraft.gamepedia.com/Map_item_format */ virtual ColourID GetMapBaseColourID(NIBBLETYPE a_Meta); - /// Rotates a given block meta counter-clockwise. Default: no change - /// Block meta following rotation + /** Rotates a given block meta counter-clockwise. Default: no change + Returns block meta following rotation */ virtual NIBBLETYPE MetaRotateCCW(NIBBLETYPE a_Meta) { return a_Meta; } - /// Rotates a given block meta clockwise. Default: no change - /// Block meta following rotation + /** Rotates a given block meta clockwise. Default: no change + Returns block meta following rotation */ virtual NIBBLETYPE MetaRotateCW(NIBBLETYPE a_Meta) { return a_Meta; } - /// Mirros a given block meta around the XY plane. Default: no change - /// Block meta following mirroring + /** Mirrors a given block meta around the XY plane. Default: no change + Returns block meta following rotation */ virtual NIBBLETYPE MetaMirrorXY(NIBBLETYPE a_Meta) { return a_Meta; } - /// Mirros a given block meta around the XZ plane. Default: no change - /// Block meta following mirroring + /** Mirros a given block meta around the XZ plane. Default: no change + Returns block meta following rotation */ virtual NIBBLETYPE MetaMirrorXZ(NIBBLETYPE a_Meta) { return a_Meta; } - /// Mirros a given block meta around the YZ plane. Default: no change - /// Block meta following mirroring + /** Mirros a given block meta around the YZ plane. Default: no change + Returns block meta following rotation */ virtual NIBBLETYPE MetaMirrorYZ(NIBBLETYPE a_Meta) { return a_Meta; } protected: -- cgit v1.2.3