summaryrefslogtreecommitdiffstats
path: root/source/Items
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-01-27 03:00:33 +0100
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-01-27 03:00:33 +0100
commit1a127f5510f654d47ee75b3121e52c50d3e7533b (patch)
treea968d54114b660c637bb6a9ce4102cb8257e0903 /source/Items
parentRemoved cMCLogger from Lua API (diff)
downloadcuberite-1a127f5510f654d47ee75b3121e52c50d3e7533b.tar
cuberite-1a127f5510f654d47ee75b3121e52c50d3e7533b.tar.gz
cuberite-1a127f5510f654d47ee75b3121e52c50d3e7533b.tar.bz2
cuberite-1a127f5510f654d47ee75b3121e52c50d3e7533b.tar.lz
cuberite-1a127f5510f654d47ee75b3121e52c50d3e7533b.tar.xz
cuberite-1a127f5510f654d47ee75b3121e52c50d3e7533b.tar.zst
cuberite-1a127f5510f654d47ee75b3121e52c50d3e7533b.zip
Diffstat (limited to 'source/Items')
-rw-r--r--source/Items/ItemBucket.h2
-rw-r--r--source/Items/ItemHandler.cpp14
-rw-r--r--source/Items/ItemHandler.h2
-rw-r--r--source/Items/ItemShovel.h4
4 files changed, 11 insertions, 11 deletions
diff --git a/source/Items/ItemBucket.h b/source/Items/ItemBucket.h
index 18b344914..35cc1bd2b 100644
--- a/source/Items/ItemBucket.h
+++ b/source/Items/ItemBucket.h
@@ -152,7 +152,7 @@ public:
cBlockHandler * Handler = BlockHandler(CurrentBlock);
if (Handler->DoesDropOnUnsuitable())
{
- Handler->DropBlock(a_World, a_BlockX, a_BlockY, a_BlockZ);
+ Handler->DropBlock(a_World, a_Player, a_BlockX, a_BlockY, a_BlockZ);
}
}
diff --git a/source/Items/ItemHandler.cpp b/source/Items/ItemHandler.cpp
index eaac6ba3c..4a465c272 100644
--- a/source/Items/ItemHandler.cpp
+++ b/source/Items/ItemHandler.cpp
@@ -222,16 +222,16 @@ bool cItemHandler::OnDiggingBlock(cWorld * a_World, cPlayer * a_Player, cItem *
-void cItemHandler::OnBlockDestroyed(cWorld *a_World, cPlayer *a_Player, cItem *a_Item, int a_X, int a_Y, int a_Z)
+void cItemHandler::OnBlockDestroyed(cWorld * a_World, cPlayer * a_Player, cItem * a_Item, int a_BlockX, int a_BlockY, int a_BlockZ)
{
- char Block = a_World->GetBlock(a_X, a_Y, a_Z);
- cBlockHandler *Handler = cBlockHandler::GetBlockHandler(Block);
+ BLOCKTYPE Block = a_World->GetBlock(a_BlockX, a_BlockY, a_BlockZ);
+ cBlockHandler * Handler = cBlockHandler::GetBlockHandler(Block);
- if(a_Player->GetGameMode() == eGameMode_Survival)
+ if (a_Player->GetGameMode() == eGameMode_Survival)
{
- if(!BlockRequiresSpecialTool(Block) || CanHarvestBlock(Block))
+ if (!BlockRequiresSpecialTool(Block) || CanHarvestBlock(Block))
{
- Handler->DropBlock(a_World, a_X, a_Y, a_Z);
+ Handler->DropBlock(a_World, a_Player, a_BlockX, a_BlockY, a_BlockZ);
}
}
@@ -242,7 +242,7 @@ void cItemHandler::OnBlockDestroyed(cWorld *a_World, cPlayer *a_Player, cItem *a
-void cItemHandler::OnFoodEaten(cWorld *a_World, cPlayer *a_Player, cItem *a_Item)
+void cItemHandler::OnFoodEaten(cWorld * a_World, cPlayer * a_Player, cItem * a_Item)
{
}
diff --git a/source/Items/ItemHandler.h b/source/Items/ItemHandler.h
index f03184704..58e7324d8 100644
--- a/source/Items/ItemHandler.h
+++ b/source/Items/ItemHandler.h
@@ -28,7 +28,7 @@ public:
virtual bool OnDiggingBlock(cWorld * a_World, cPlayer * a_Player, cItem * a_HeldItem, int a_BlockX, int a_BlockY, int a_BlockZ, char a_BlockFace);
/// Called when the player destroys a block using this item. This also calls the drop function for the destroyed block
- virtual void OnBlockDestroyed(cWorld *a_World, cPlayer *a_Player, cItem *a_Item, int a_X, int a_Y, int a_Z);
+ virtual void OnBlockDestroyed(cWorld * a_World, cPlayer * a_Player, cItem *a_Item, int a_X, int a_Y, int a_Z);
/// Called after the player has eaten this item.
virtual void OnFoodEaten(cWorld *a_World, cPlayer *a_Player, cItem *a_Item);
diff --git a/source/Items/ItemShovel.h b/source/Items/ItemShovel.h
index b1260311e..7914a1703 100644
--- a/source/Items/ItemShovel.h
+++ b/source/Items/ItemShovel.h
@@ -20,12 +20,12 @@ public:
}
- virtual bool OnDiggingBlock(cWorld *a_World, cPlayer *a_Player, cItem *a_Item, int a_BlockX, int a_BlockY, int a_BlockZ, char a_Dir) override
+ virtual bool OnDiggingBlock(cWorld * a_World, cPlayer * a_Player, cItem * a_Item, int a_BlockX, int a_BlockY, int a_BlockZ, char a_Dir) override
{
BLOCKTYPE Block = a_World->GetBlock(a_BlockX, a_BlockY, a_BlockZ);
if (Block == E_BLOCK_SNOW)
{
- BlockHandler(Block)->DropBlock(a_World, a_BlockX, a_BlockY, a_BlockZ);
+ BlockHandler(Block)->DropBlock(a_World, a_Player, a_BlockX, a_BlockY, a_BlockZ);
a_World->SetBlock(a_BlockX, a_BlockY, a_BlockZ, E_BLOCK_AIR, 0);
a_Player->UseEquippedItem();