summaryrefslogtreecommitdiffstats
path: root/source/blocks/Block.h
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-08-06 22:10:16 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-08-06 22:10:16 +0200
commite8366993ce3f1cc0c2c6cde1d133773d1f23c474 (patch)
tree789fd452065ff6aa68f2ceac5664959bdb24afc0 /source/blocks/Block.h
parentAdded the Doxygen configuration file (diff)
downloadcuberite-e8366993ce3f1cc0c2c6cde1d133773d1f23c474.tar
cuberite-e8366993ce3f1cc0c2c6cde1d133773d1f23c474.tar.gz
cuberite-e8366993ce3f1cc0c2c6cde1d133773d1f23c474.tar.bz2
cuberite-e8366993ce3f1cc0c2c6cde1d133773d1f23c474.tar.lz
cuberite-e8366993ce3f1cc0c2c6cde1d133773d1f23c474.tar.xz
cuberite-e8366993ce3f1cc0c2c6cde1d133773d1f23c474.tar.zst
cuberite-e8366993ce3f1cc0c2c6cde1d133773d1f23c474.zip
Diffstat (limited to '')
-rw-r--r--source/blocks/Block.h33
1 files changed, 21 insertions, 12 deletions
diff --git a/source/blocks/Block.h b/source/blocks/Block.h
index 0a5724ca3..50c541551 100644
--- a/source/blocks/Block.h
+++ b/source/blocks/Block.h
@@ -27,21 +27,30 @@ public:
virtual NIBBLETYPE GetDropMeta(NIBBLETYPE a_BlockMeta);
virtual bool NeedsRandomTicks();
virtual void DropBlock(cWorld *a_World, int a_X, int a_Y, int a_Z);
- //Checks if the block can stay at
- virtual bool CanBeAt(cWorld *a_World, int a_X, int a_Y, int a_Z);
- //Checks if the block can be placed at this point. Default: CanBeAt(...) NOTE: In the block is not placed in this callback
- virtual bool CanBePlacedAt(cWorld *a_World, int a_X, int a_Y, int a_Z, char a_Dir);
- //This gets called if the player tries to place a block ontop of this block (Only if he aims directly on this block)
- virtual bool AllowBlockOnTop();
- virtual bool IsUseable();
- virtual bool IsClickedThrough();
- virtual bool IgnoreBuildCollision();
- //Indicates this block can be placed on the side of other blocks. Default: true
+
+ /// Checks if the block can stay at the specified coords in the
+ virtual bool CanBeAt(cWorld *a_World, int a_BlockX, int a_BlockY, int a_BlockZ);
+
+ /// Checks if the block can be placed at this point. 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);
+
+ /// Called when the player tries to place a block on top of this block (Only if he aims directly on this block); return false to disallow
+ virtual bool AllowBlockOnTop(void);
+
+ /// Called to check whether this block supports a rclk action. If it returns true, OnClicked() is called
+ virtual bool IsUseable(void);
+
+ virtual bool IsClickedThrough(void);
+
+ virtual bool IgnoreBuildCollision(void);
+
+ /// Indicates this block can be placed on the side of other blocks. Default: true
virtual bool CanBePlacedOnSide();
- //Does this block drops if it gets destroyed by an unsuitable situation? Default: true
+
+ /// Does this block drop if it gets destroyed by an unsuitable situation? Default: true
virtual bool DropOnUnsuitable();
- static cBlockHandler *GetBlockHandler(BLOCKTYPE a_BlockID);
+ static cBlockHandler * GetBlockHandler(BLOCKTYPE a_BlockID);
static void Deinit();