summaryrefslogtreecommitdiffstats
path: root/src/Items/ItemFood.h
diff options
context:
space:
mode:
authorMat <mail@mathias.is>2020-03-22 11:17:04 +0100
committerGitHub <noreply@github.com>2020-03-22 11:17:04 +0100
commit49dd645aa67041904cb35c1337e7e52ea99669ae (patch)
tree796bf2109bbb311caa76e2633802528127919f40 /src/Items/ItemFood.h
parentAllow enderman to attack during day (#4522) (diff)
downloadcuberite-49dd645aa67041904cb35c1337e7e52ea99669ae.tar
cuberite-49dd645aa67041904cb35c1337e7e52ea99669ae.tar.gz
cuberite-49dd645aa67041904cb35c1337e7e52ea99669ae.tar.bz2
cuberite-49dd645aa67041904cb35c1337e7e52ea99669ae.tar.lz
cuberite-49dd645aa67041904cb35c1337e7e52ea99669ae.tar.xz
cuberite-49dd645aa67041904cb35c1337e7e52ea99669ae.tar.zst
cuberite-49dd645aa67041904cb35c1337e7e52ea99669ae.zip
Diffstat (limited to 'src/Items/ItemFood.h')
-rw-r--r--src/Items/ItemFood.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Items/ItemFood.h b/src/Items/ItemFood.h
index caeca2175..3f1c40d36 100644
--- a/src/Items/ItemFood.h
+++ b/src/Items/ItemFood.h
@@ -103,6 +103,11 @@ public:
return false;
}
+ if (!a_Player->IsGameModeCreative())
+ {
+ a_Player->GetInventory().RemoveOneEquippedItem();
+ }
+
switch (m_ItemType)
{
case E_ITEM_BEETROOT_SOUP: