summaryrefslogtreecommitdiffstats
path: root/src/Blocks/BlockHandler.h
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-07-20 13:02:23 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-07-20 13:02:23 +0200
commitd0e7b2f18b15afbc78adfdcf7d1b7b3511a0a6ab (patch)
tree4f283dd99354a72bb8ba30da637b38adb5521b76 /src/Blocks/BlockHandler.h
parentProper comment for DropBlock() (diff)
parentNBTChunkSerializer.cpp: Added break after serializing the splash potion (diff)
downloadcuberite-d0e7b2f18b15afbc78adfdcf7d1b7b3511a0a6ab.tar
cuberite-d0e7b2f18b15afbc78adfdcf7d1b7b3511a0a6ab.tar.gz
cuberite-d0e7b2f18b15afbc78adfdcf7d1b7b3511a0a6ab.tar.bz2
cuberite-d0e7b2f18b15afbc78adfdcf7d1b7b3511a0a6ab.tar.lz
cuberite-d0e7b2f18b15afbc78adfdcf7d1b7b3511a0a6ab.tar.xz
cuberite-d0e7b2f18b15afbc78adfdcf7d1b7b3511a0a6ab.tar.zst
cuberite-d0e7b2f18b15afbc78adfdcf7d1b7b3511a0a6ab.zip
Diffstat (limited to 'src/Blocks/BlockHandler.h')
-rw-r--r--src/Blocks/BlockHandler.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/Blocks/BlockHandler.h b/src/Blocks/BlockHandler.h
index a6810933c..01c64b457 100644
--- a/src/Blocks/BlockHandler.h
+++ b/src/Blocks/BlockHandler.h
@@ -30,14 +30,14 @@ public:
/// 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.
+ /** 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
*/
virtual bool GetPlacementBlockTypeMeta(
cChunkInterface & a_ChunkInterface, cPlayer * a_Player,
- int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace,
+ int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace,
int a_CursorX, int a_CursorY, int a_CursorZ,
BLOCKTYPE & a_BlockType, NIBBLETYPE & a_BlockMeta
);
@@ -47,8 +47,8 @@ public:
/// Called by cClientHandle::HandlePlaceBlock() after the player has placed a new block. Called after OnPlaced().
virtual void OnPlacedByPlayer(
- cChunkInterface & a_ChunkInterface, cWorldInterface & a_WorldInterface, cPlayer * a_Player,
- int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace,
+ 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,
BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta
);
@@ -93,7 +93,7 @@ public:
virtual bool CanDirtGrowGrass(NIBBLETYPE a_Meta);
/** Checks if the block can be placed at this point.
- Default: CanBeAt(...)
+ Default: CanBeAt(...)
NOTE: This call doesn't actually place the block
*/
// virtual bool CanBePlacedAt(cWorld * a_World, int a_BlockX, int a_BlockY, int a_BlockZ, char a_Dir);
@@ -101,27 +101,27 @@ public:
/// Called to check whether this block supports a rclk action. If it returns true, OnUse() is called
virtual bool IsUseable(void);
- /** Indicates whether the client will click through this block.
+ /** Indicates whether the client will click through this block.
For example digging a fire will hit the block below the fire so fire is clicked through
*/
virtual bool IsClickedThrough(void);
- /** Checks if the player can build "inside" this block.
+ /** Checks if the player can build "inside" this block.
For example blocks placed "on" snow will be placed at the same position. So: Snow ignores Build collision
*/
virtual bool DoesIgnoreBuildCollision(void);
/// <summary>Similar to DoesIgnoreBuildCollision(void), but is used for cases where block meta/player item-in-hand is needed to determine collision (thin snow)</summary>
- virtual bool DoesIgnoreBuildCollision(cPlayer *, NIBBLETYPE a_Meta)
- {
+ virtual bool DoesIgnoreBuildCollision(cPlayer *, NIBBLETYPE a_Meta)
+ {
UNUSED(a_Meta);
- return DoesIgnoreBuildCollision();
+ return DoesIgnoreBuildCollision();
}
/// <summary>Returns if this block drops if it gets destroyed by an unsuitable situation. Default: true</summary>
virtual bool DoesDropOnUnsuitable(void);
- /** Called when one of the neighbors gets set; equivalent to MC block update.
+ /** Called when one of the neighbors gets set; equivalent to MC block update.
By default drops if position no more suitable (CanBeAt(), DoesDropOnUnsuitable(), Drop()),
and wakes up all simulators on the block.
*/