summaryrefslogtreecommitdiffstats
path: root/source/Items
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-10-14 19:03:18 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-10-14 19:03:18 +0200
commit331ad53b60fe81fa459b2c26352d4d66144fbc00 (patch)
treeefac3460b07363fe7236d5f5fb59850be7455a4b /source/Items
parentBlockArea: Added const-ness to non-modifying functions, so that a const cBlockArea & can be used. (diff)
downloadcuberite-331ad53b60fe81fa459b2c26352d4d66144fbc00.tar
cuberite-331ad53b60fe81fa459b2c26352d4d66144fbc00.tar.gz
cuberite-331ad53b60fe81fa459b2c26352d4d66144fbc00.tar.bz2
cuberite-331ad53b60fe81fa459b2c26352d4d66144fbc00.tar.lz
cuberite-331ad53b60fe81fa459b2c26352d4d66144fbc00.tar.xz
cuberite-331ad53b60fe81fa459b2c26352d4d66144fbc00.tar.zst
cuberite-331ad53b60fe81fa459b2c26352d4d66144fbc00.zip
Diffstat (limited to 'source/Items')
-rw-r--r--source/Items/ItemBucket.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/source/Items/ItemBucket.h b/source/Items/ItemBucket.h
index 736112960..21c9da2a9 100644
--- a/source/Items/ItemBucket.h
+++ b/source/Items/ItemBucket.h
@@ -67,21 +67,21 @@ public:
if (a_Dir >= 0)
{
AddDirection(a_X, a_Y, a_Z, a_Dir);
- }
- if(a_World->GetBlock(a_X, a_Y, a_Z) == E_BLOCK_AIR)
- {
- cItem Item(a_Item->m_ItemID, 1);
- if ((a_Player->GetGameMode() == 1) || (a_Player->GetInventory().RemoveItem(Item)))
+ if (a_World->GetBlock(a_X, a_Y, a_Z) == E_BLOCK_AIR)
{
- a_World->SetBlock(a_X, a_Y, a_Z, NewBlock, 0);
-
- if (a_Player->GetGameMode() == 1)
+ cItem Item(a_Item->m_ItemID, 1);
+ if ((a_Player->GetGameMode() == 1) || (a_Player->GetInventory().RemoveItem(Item)))
{
- break; //No new Bucket for creative players
+ a_World->SetBlock(a_X, a_Y, a_Z, NewBlock, 0);
+
+ if (a_Player->GetGameMode() == 1)
+ {
+ break; //No new Bucket for creative players
+ }
+ cItem Item(E_ITEM_BUCKET, 1);
+ a_Player->GetInventory().AddItem(Item);
+ return true;
}
- cItem Item(E_ITEM_BUCKET, 1);
- a_Player->GetInventory().AddItem(Item);
- return true;
}
}
}