summaryrefslogtreecommitdiffstats
path: root/src/Blocks/BlockHandler.h
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2020-04-17 11:36:37 +0200
committerGitHub <noreply@github.com>2020-04-17 11:36:37 +0200
commit26ac146f41091dc070d8075f5fc9de25b5a22578 (patch)
tree5be089162a23ad2f2822be7b5d5d7cebbb958406 /src/Blocks/BlockHandler.h
parentImplement glowing redstone ore (diff)
downloadcuberite-26ac146f41091dc070d8075f5fc9de25b5a22578.tar
cuberite-26ac146f41091dc070d8075f5fc9de25b5a22578.tar.gz
cuberite-26ac146f41091dc070d8075f5fc9de25b5a22578.tar.bz2
cuberite-26ac146f41091dc070d8075f5fc9de25b5a22578.tar.lz
cuberite-26ac146f41091dc070d8075f5fc9de25b5a22578.tar.xz
cuberite-26ac146f41091dc070d8075f5fc9de25b5a22578.tar.zst
cuberite-26ac146f41091dc070d8075f5fc9de25b5a22578.zip
Diffstat (limited to 'src/Blocks/BlockHandler.h')
-rw-r--r--src/Blocks/BlockHandler.h19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/Blocks/BlockHandler.h b/src/Blocks/BlockHandler.h
index 75f6610ce..f4a7fc674 100644
--- a/src/Blocks/BlockHandler.h
+++ b/src/Blocks/BlockHandler.h
@@ -30,8 +30,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! */
- virtual void OnUpdate(cChunkInterface & cChunkInterface, cWorldInterface & a_WorldInterface, cBlockPluginInterface & a_BlockPluginInterface, cChunk & a_Chunk, int a_RelX, int a_RelY, int a_RelZ);
+ Note that the coords in a_RelPos are chunk-relative! */
+ virtual void OnUpdate(
+ cChunkInterface & a_ChunkInterface,
+ cWorldInterface & a_WorldInterface,
+ cBlockPluginInterface & a_BlockPluginInterface,
+ cChunk & a_Chunk,
+ const Vector3i a_RelPos
+ );
/** Returns the relative bounding box that must be entity-free in
order for the block to be placed. a_XM, a_XP, etc. stand for the
@@ -108,7 +114,14 @@ public:
static void NeighborChanged(cChunkInterface & a_ChunkInterface, Vector3i a_NeighborPos, eBlockFace a_WhichNeighbor);
/** 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) {}
+ virtual void OnDigging(
+ cChunkInterface & a_ChunkInterface,
+ 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
returns true if the use was successful, return false to use the block as a "normal" block */