diff options
author | Tycho <work.tycho+git@gmail.com> | 2014-02-02 18:11:53 +0100 |
---|---|---|
committer | Tycho <work.tycho+git@gmail.com> | 2014-02-02 18:11:53 +0100 |
commit | 1e4e6c4619696e95b7b3f19650fe32c6a42d18b6 (patch) | |
tree | 9e8416c008a2e8b4f5f86d30de0224f9021b40a1 /src/Blocks/BlockHandler.h | |
parent | Removed register keyword from Messinne Twister (diff) | |
parent | Fixed dark oak and acacia placement. (diff) | |
download | cuberite-1e4e6c4619696e95b7b3f19650fe32c6a42d18b6.tar cuberite-1e4e6c4619696e95b7b3f19650fe32c6a42d18b6.tar.gz cuberite-1e4e6c4619696e95b7b3f19650fe32c6a42d18b6.tar.bz2 cuberite-1e4e6c4619696e95b7b3f19650fe32c6a42d18b6.tar.lz cuberite-1e4e6c4619696e95b7b3f19650fe32c6a42d18b6.tar.xz cuberite-1e4e6c4619696e95b7b3f19650fe32c6a42d18b6.tar.zst cuberite-1e4e6c4619696e95b7b3f19650fe32c6a42d18b6.zip |
Diffstat (limited to 'src/Blocks/BlockHandler.h')
-rw-r--r-- | src/Blocks/BlockHandler.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/Blocks/BlockHandler.h b/src/Blocks/BlockHandler.h index 73a658b3f..44b15bce1 100644 --- a/src/Blocks/BlockHandler.h +++ b/src/Blocks/BlockHandler.h @@ -3,9 +3,9 @@ #include "../Defines.h" #include "../Item.h" -#include "../Chunk.h" #include "WorldInterface.h" #include "ChunkInterface.h" +#include "BlockPluginInterface.h" @@ -13,6 +13,7 @@ // fwd: class cPlayer; +class cChunk; @@ -25,7 +26,7 @@ public: /// 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(cChunk & a_Chunk, int a_RelX, int a_RelY, int a_RelZ); + 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. @@ -51,7 +52,7 @@ public: ); /// Called before the player has destroyed a block - virtual void OnDestroyedByPlayer(cWorld * a_World, cPlayer * a_Player, int a_BlockX, int a_BlockY, int a_BlockZ); + 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 virtual void OnDestroyed(cChunkInterface & a_ChunkInterface, cWorldInterface & a_WorldInterface, int a_BlockX, int a_BlockY, int a_BlockZ); @@ -63,7 +64,7 @@ public: static void NeighborChanged(cChunkInterface & a_ChunkInterface, int a_BlockX, int a_BlockY, int a_BlockZ); /// Called while the player diggs the block. - virtual void OnDigging(cWorld * a_World, cPlayer * a_Player, int a_BlockX, int a_BlockY, int a_BlockZ); + 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 virtual void OnUse(cChunkInterface & a_ChunkInterface, cWorldInterface & a_WorldInterface, cPlayer * a_Player, int a_BlockX, int a_BlockY, int a_BlockZ, char a_BlockFace, int a_CursorX, int a_CursorY, int a_CursorZ); @@ -72,7 +73,7 @@ public: virtual void ConvertToPickups(cItems & a_Pickups, NIBBLETYPE a_BlockMeta); /// Handles the dropping of a block based on what ConvertToDrops() returns. This will not destroy the block. a_Digger is the entity causing the drop; it may be NULL - virtual void DropBlock(cWorld * a_World, cEntity * a_Digger, int a_BlockX, int a_BlockY, int a_BlockZ); + virtual void DropBlock(cChunkInterface & a_ChunkInterface, cWorldInterface & a_WorldInterface, cBlockPluginInterface & a_BlockPluginInterface, cEntity * a_Digger, int a_BlockX, int a_BlockY, int a_BlockZ); /// Returns step sound name of block virtual const char * GetStepSound(void); @@ -113,7 +114,7 @@ public: By default drops if position no more suitable (CanBeAt(), DoesDropOnUnsuitable(), Drop()), and wakes up all simulators on the block. */ - virtual void Check(cChunkInterface & ChunkInterface, int a_RelX, int a_RelY, int a_RelZ, cChunk & a_Chunk); + virtual void Check(cChunkInterface & ChunkInterface, cBlockPluginInterface & a_PluginInterface, int a_RelX, int a_RelY, int a_RelZ, cChunk & a_Chunk); /// <summary>Rotates a given block meta counter-clockwise. Default: no change</summary> /// <returns>Block meta following rotation</returns> |