summaryrefslogtreecommitdiffstats
path: root/src/Mobs/Cow.cpp
diff options
context:
space:
mode:
authorAlexander Harkness <me@bearbin.net>2020-04-02 14:42:15 +0200
committerGitHub <noreply@github.com>2020-04-02 14:42:15 +0200
commitcdc452916e3ec7e61f4a1ad822666192593b4b08 (patch)
treefcf35adfb6f907b7c2cd4388facc551cfe6c684a /src/Mobs/Cow.cpp
parentTweak attack ranges (diff)
downloadcuberite-cdc452916e3ec7e61f4a1ad822666192593b4b08.tar
cuberite-cdc452916e3ec7e61f4a1ad822666192593b4b08.tar.gz
cuberite-cdc452916e3ec7e61f4a1ad822666192593b4b08.tar.bz2
cuberite-cdc452916e3ec7e61f4a1ad822666192593b4b08.tar.lz
cuberite-cdc452916e3ec7e61f4a1ad822666192593b4b08.tar.xz
cuberite-cdc452916e3ec7e61f4a1ad822666192593b4b08.tar.zst
cuberite-cdc452916e3ec7e61f4a1ad822666192593b4b08.zip
Diffstat (limited to 'src/Mobs/Cow.cpp')
-rw-r--r--src/Mobs/Cow.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Mobs/Cow.cpp b/src/Mobs/Cow.cpp
index a7fb0d476..559b6caea 100644
--- a/src/Mobs/Cow.cpp
+++ b/src/Mobs/Cow.cpp
@@ -44,10 +44,10 @@ void cCow::OnRightClicked(cPlayer & a_Player)
short HeldItem = a_Player.GetEquippedItem().m_ItemType;
if (HeldItem == E_ITEM_BUCKET)
{
+ // Milk the cow.
if (!a_Player.IsGameModeCreative())
{
- a_Player.GetInventory().RemoveOneEquippedItem();
- a_Player.GetInventory().AddItem(cItem(E_ITEM_MILK));
+ a_Player.ReplaceOneEquippedItemTossRest(cItem(E_ITEM_MILK));
}
}
}