summaryrefslogtreecommitdiffstats
path: root/source/Blocks
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-05-24 09:30:39 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-05-24 09:30:39 +0200
commitcf87169737fdeeee7d4b160688bbed7194e46147 (patch)
tree7daaeb9af8e3187cde6068c3cff5ff0ee64f0067 /source/Blocks
parentAdded ItemCategory::IsArmor() (diff)
downloadcuberite-cf87169737fdeeee7d4b160688bbed7194e46147.tar
cuberite-cf87169737fdeeee7d4b160688bbed7194e46147.tar.gz
cuberite-cf87169737fdeeee7d4b160688bbed7194e46147.tar.bz2
cuberite-cf87169737fdeeee7d4b160688bbed7194e46147.tar.lz
cuberite-cf87169737fdeeee7d4b160688bbed7194e46147.tar.xz
cuberite-cf87169737fdeeee7d4b160688bbed7194e46147.tar.zst
cuberite-cf87169737fdeeee7d4b160688bbed7194e46147.zip
Diffstat (limited to '')
-rw-r--r--source/Blocks/BlockCauldron.h8
-rw-r--r--source/Blocks/BlockFlowerPot.h5
2 files changed, 5 insertions, 8 deletions
diff --git a/source/Blocks/BlockCauldron.h b/source/Blocks/BlockCauldron.h
index 360604f85..571235441 100644
--- a/source/Blocks/BlockCauldron.h
+++ b/source/Blocks/BlockCauldron.h
@@ -29,8 +29,7 @@ public:
case E_ITEM_WATER_BUCKET:
{
a_World->SetBlockMeta( a_BlockX, a_BlockY, a_BlockZ, 3 );
- cItem Item(a_Player->GetEquippedItem().m_ItemType, 1);
- a_Player->GetInventory().RemoveItem(Item);
+ a_Player->GetInventory().RemoveOneEquippedItem();
cItem NewItem(E_ITEM_BUCKET, 1);
a_Player->GetInventory().AddItem(NewItem);
break;
@@ -39,9 +38,8 @@ public:
{
if( Meta > 0 )
{
- a_World->SetBlockMeta( a_BlockX, a_BlockY, a_BlockZ, --Meta );
- cItem Item(a_Player->GetEquippedItem().m_ItemType, 1);
- a_Player->GetInventory().RemoveItem(Item);
+ a_World->SetBlockMeta( a_BlockX, a_BlockY, a_BlockZ, --Meta);
+ a_Player->GetInventory().RemoveOneEquippedItem();
cItem NewItem(E_ITEM_POTIONS, 1, 0);
a_Player->GetInventory().AddItem(NewItem);
}
diff --git a/source/Blocks/BlockFlowerPot.h b/source/Blocks/BlockFlowerPot.h
index 1c02126df..12cd594de 100644
--- a/source/Blocks/BlockFlowerPot.h
+++ b/source/Blocks/BlockFlowerPot.h
@@ -86,10 +86,9 @@ public:
}
}
- if (a_Player->GetGameMode() != eGameMode_Creative)
+ if (a_Player->GetGameMode() != gmCreative)
{
- cItem Item(a_Player->GetEquippedItem().m_ItemType, 1);
- a_Player->GetInventory().RemoveItem(Item);
+ a_Player->GetInventory().RemoveOneEquippedItem();
}
a_World->SetBlockMeta(a_BlockX, a_BlockY, a_BlockZ, Meta);
}