summaryrefslogtreecommitdiffstats
path: root/src/Items/ItemHandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/Items/ItemHandler.cpp13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/Items/ItemHandler.cpp b/src/Items/ItemHandler.cpp
index 976ab959d..14b25d2b7 100644
--- a/src/Items/ItemHandler.cpp
+++ b/src/Items/ItemHandler.cpp
@@ -822,17 +822,8 @@ bool cItemHandler::GetPlacementBlockTypeMeta(
bool cItemHandler::EatItem(cPlayer * a_Player, cItem * a_Item)
{
- if (!a_Player->IsGameModeCreative())
- {
- a_Player->GetInventory().RemoveOneEquippedItem();
- }
-
- FoodInfo Info = GetFoodInfo(a_Item);
- if ((Info.FoodLevel > 0) || (Info.Saturation > 0.f))
- {
- return a_Player->Feed(Info.FoodLevel, Info.Saturation);
- }
- return false;
+ auto FoodInfo = GetFoodInfo(a_Item);
+ return a_Player->Feed(FoodInfo.FoodLevel, FoodInfo.Saturation);
}