summaryrefslogtreecommitdiffstats
path: root/src/Blocks
diff options
context:
space:
mode:
Diffstat (limited to 'src/Blocks')
-rw-r--r--src/Blocks/BlockHandler.h37
-rw-r--r--src/Blocks/BlockPiston.h10
2 files changed, 23 insertions, 24 deletions
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) {}
- /// <summary>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</summary>
+ /** 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);
- /// <summary>Rotates a given block meta counter-clockwise. Default: no change</summary>
- /// <returns>Block meta following rotation</returns>
+ /** Rotates a given block meta counter-clockwise. Default: no change
+ Returns block meta following rotation */
virtual NIBBLETYPE MetaRotateCCW(NIBBLETYPE a_Meta) { return a_Meta; }
- /// <summary>Rotates a given block meta clockwise. Default: no change</summary>
- /// <returns>Block meta following rotation</returns>
+ /** Rotates a given block meta clockwise. Default: no change
+ Returns block meta following rotation */
virtual NIBBLETYPE MetaRotateCW(NIBBLETYPE a_Meta) { return a_Meta; }
- /// <summary>Mirros a given block meta around the XY plane. Default: no change</summary>
- /// <returns>Block meta following mirroring</returns>
+ /** 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; }
- /// <summary>Mirros a given block meta around the XZ plane. Default: no change</summary>
- /// <returns>Block meta following mirroring</returns>
+ /** 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; }
- /// <summary>Mirros a given block meta around the YZ plane. Default: no change</summary>
- /// <returns>Block meta following mirroring</returns>
+ /** 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:
diff --git a/src/Blocks/BlockPiston.h b/src/Blocks/BlockPiston.h
index f915f0a8d..56f7f9951 100644
--- a/src/Blocks/BlockPiston.h
+++ b/src/Blocks/BlockPiston.h
@@ -90,13 +90,13 @@ public:
private:
- /// Returns true if the piston (specified by blocktype) is a sticky piston
+ /** Returns true if the piston (specified by blocktype) is a sticky piston */
static inline bool IsSticky(BLOCKTYPE a_BlockType) { return (a_BlockType == E_BLOCK_STICKY_PISTON); }
- /// Returns true if the piston (with the specified meta) is extended
+ /** Returns true if the piston (with the specified meta) is extended */
static inline bool IsExtended(NIBBLETYPE a_PistonMeta) { return ((a_PistonMeta & 0x8) != 0x0); }
- /// Returns true if the specified block can be pushed by a piston (and left intact)
+ /** Returns true if the specified block can be pushed by a piston (and left intact) */
static inline bool CanPush(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta)
{
switch (a_BlockType)
@@ -141,7 +141,7 @@ private:
return true;
}
- /// Returns true if the specified block can be pulled by a sticky piston
+ /** Returns true if the specified block can be pulled by a sticky piston */
static inline bool CanPull(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta)
{
if (cBlockInfo::IsPistonBreakable(a_BlockType))
@@ -152,7 +152,7 @@ private:
return CanPush(a_BlockType, a_BlockMeta);
}
- /// Returns how many blocks the piston has to push (where the first free space is); < 0 when unpushable
+ /** Returns how many blocks the piston has to push (where the first free space is); < 0 when unpushable */
static int FirstPassthroughBlock(int a_PistonX, int a_PistonY, int a_PistonZ, NIBBLETYPE a_PistonMeta, cWorld * a_World);
} ;