summaryrefslogtreecommitdiffstats
path: root/src/Entities
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/Entities
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 '')
-rw-r--r--src/Entities/ArrowEntity.cpp2
-rw-r--r--src/Entities/Player.cpp4
2 files changed, 1 insertions, 5 deletions
diff --git a/src/Entities/ArrowEntity.cpp b/src/Entities/ArrowEntity.cpp
index 6fef2c7ee..54ece0e16 100644
--- a/src/Entities/ArrowEntity.cpp
+++ b/src/Entities/ArrowEntity.cpp
@@ -145,7 +145,7 @@ void cArrowEntity::CollectedBy(cPlayer & a_Dest)
// Do not add the arrow to the inventory when the player is in creative:
if (!a_Dest.IsGameModeCreative())
{
- int NumAdded = a_Dest.GetInventory().AddItem(E_ITEM_ARROW);
+ int NumAdded = a_Dest.GetInventory().AddItem(cItem(E_ITEM_ARROW));
if (NumAdded == 0)
{
// No space in the inventory
diff --git a/src/Entities/Player.cpp b/src/Entities/Player.cpp
index b182629ea..637cc3710 100644
--- a/src/Entities/Player.cpp
+++ b/src/Entities/Player.cpp
@@ -712,10 +712,6 @@ void cPlayer::FinishEating(void)
{
return;
}
- if (!IsGameModeCreative())
- {
- GetInventory().RemoveOneEquippedItem();
- }
ItemHandler->OnFoodEaten(m_World, this, &Item);
}