summaryrefslogtreecommitdiffstats
path: root/src/ClientHandle.cpp
diff options
context:
space:
mode:
authorarchshift <admin@archshift.com>2014-06-08 01:32:37 +0200
committerarchshift <admin@archshift.com>2014-06-17 20:39:20 +0200
commit2185c72c2ca2d66b238d7d3234c173bd820d32ac (patch)
tree134bcd0c391bac1624a9adab5e8f9d6425fb9942 /src/ClientHandle.cpp
parentImplemented milk, added documentation to Pawn.h (diff)
downloadcuberite-2185c72c2ca2d66b238d7d3234c173bd820d32ac.tar
cuberite-2185c72c2ca2d66b238d7d3234c173bd820d32ac.tar.gz
cuberite-2185c72c2ca2d66b238d7d3234c173bd820d32ac.tar.bz2
cuberite-2185c72c2ca2d66b238d7d3234c173bd820d32ac.tar.lz
cuberite-2185c72c2ca2d66b238d7d3234c173bd820d32ac.tar.xz
cuberite-2185c72c2ca2d66b238d7d3234c173bd820d32ac.tar.zst
cuberite-2185c72c2ca2d66b238d7d3234c173bd820d32ac.zip
Diffstat (limited to '')
-rw-r--r--src/ClientHandle.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ClientHandle.cpp b/src/ClientHandle.cpp
index 7b114b927..ab36bff91 100644
--- a/src/ClientHandle.cpp
+++ b/src/ClientHandle.cpp
@@ -850,7 +850,7 @@ void cClientHandle::HandleLeftClick(int a_BlockX, int a_BlockY, int a_BlockZ, eB
case DIG_STATUS_SHOOT_EAT:
{
cItemHandler * ItemHandler = cItemHandler::GetItemHandler(m_Player->GetEquippedItem());
- if (ItemHandler->IsFood() || ItemHandler->IsDrinkable())
+ if (ItemHandler->IsFood() || ItemHandler->IsDrinkable(&m_Player->GetEquippedItem()))
{
m_Player->AbortEating();
return;
@@ -1182,9 +1182,9 @@ void cClientHandle::HandleRightClick(int a_BlockX, int a_BlockY, int a_BlockZ, e
{
HandlePlaceBlock(a_BlockX, a_BlockY, a_BlockZ, a_BlockFace, a_CursorX, a_CursorY, a_CursorZ, *ItemHandler);
}
- else if ((ItemHandler->IsFood() || ItemHandler->IsDrinkable()) && !m_Player->IsGameModeCreative())
+ else if ((ItemHandler->IsFood() || ItemHandler->IsDrinkable(&Equipped)) && !m_Player->IsGameModeCreative())
{
- if (m_Player->IsSatiated() && !ItemHandler->IsDrinkable())
+ if (m_Player->IsSatiated() && !ItemHandler->IsDrinkable(&Equipped))
{
// The player is satiated, they cannot eat
return;