diff options
author | peterbell10 <peterbell10@live.co.uk> | 2017-07-31 22:17:52 +0200 |
---|---|---|
committer | Lukas Pioch <lukas@zgow.de> | 2017-08-01 08:21:20 +0200 |
commit | 0d0323608df044aebfc6d0f3ac2ca5e07512facc (patch) | |
tree | f2317e70c96b7ffc8f0dae99cd563163deb985ad /src/Blocks/BlockHandler.h | |
parent | cWorld::SendBlockTo take player by ref (diff) | |
download | cuberite-0d0323608df044aebfc6d0f3ac2ca5e07512facc.tar cuberite-0d0323608df044aebfc6d0f3ac2ca5e07512facc.tar.gz cuberite-0d0323608df044aebfc6d0f3ac2ca5e07512facc.tar.bz2 cuberite-0d0323608df044aebfc6d0f3ac2ca5e07512facc.tar.lz cuberite-0d0323608df044aebfc6d0f3ac2ca5e07512facc.tar.xz cuberite-0d0323608df044aebfc6d0f3ac2ca5e07512facc.tar.zst cuberite-0d0323608df044aebfc6d0f3ac2ca5e07512facc.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Blocks/BlockHandler.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Blocks/BlockHandler.h b/src/Blocks/BlockHandler.h index e67058830..89d904be1 100644 --- a/src/Blocks/BlockHandler.h +++ b/src/Blocks/BlockHandler.h @@ -42,7 +42,7 @@ public: 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, + cChunkInterface & a_ChunkInterface, 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 @@ -53,11 +53,11 @@ public: /** Called by cPlayer::PlaceBlocks() for each block after it has been set to the world. Called after OnPlaced(). */ virtual void OnPlacedByPlayer( - cChunkInterface & a_ChunkInterface, cWorldInterface & a_WorldInterface, cPlayer * a_Player, const sSetBlock & a_BlockChange + cChunkInterface & a_ChunkInterface, cWorldInterface & a_WorldInterface, cPlayer & a_Player, const sSetBlock & a_BlockChange ); /** 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); + 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); @@ -75,14 +75,14 @@ public: static void NeighborChanged(cChunkInterface & a_ChunkInterface, int a_NeighborX, int a_NeighborY, int a_NeighborZ, 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 & 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 returns true if the use was successful, return false to use the block as a "normal" block */ - virtual bool 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) { return false; } + virtual bool 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) { return false; } /** 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) {} + virtual void OnCancelRightClick(cChunkInterface & a_ChunkInterface, cWorldInterface & a_WorldInterface, cPlayer & a_Player, int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace) {} /** 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); |