diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-06-09 13:32:34 +0200 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-06-09 13:32:34 +0200 |
commit | 0e236c03f96860ff66d8e8bd7ae22c400f55e197 (patch) | |
tree | 3df8522a64c34a5c307d6fc1828926f9eb493643 /source/cClientHandle.cpp | |
parent | Tall grass finally drops seeds (diff) | |
download | cuberite-0e236c03f96860ff66d8e8bd7ae22c400f55e197.tar cuberite-0e236c03f96860ff66d8e8bd7ae22c400f55e197.tar.gz cuberite-0e236c03f96860ff66d8e8bd7ae22c400f55e197.tar.bz2 cuberite-0e236c03f96860ff66d8e8bd7ae22c400f55e197.tar.lz cuberite-0e236c03f96860ff66d8e8bd7ae22c400f55e197.tar.xz cuberite-0e236c03f96860ff66d8e8bd7ae22c400f55e197.tar.zst cuberite-0e236c03f96860ff66d8e8bd7ae22c400f55e197.zip |
Diffstat (limited to 'source/cClientHandle.cpp')
-rw-r--r-- | source/cClientHandle.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source/cClientHandle.cpp b/source/cClientHandle.cpp index 11a534442..5f918f121 100644 --- a/source/cClientHandle.cpp +++ b/source/cClientHandle.cpp @@ -1267,6 +1267,10 @@ void cClientHandle::HandleBlockPlace(cPacket_BlockPlace * a_Packet) // Handle bonemeal and dyes on sheep
if (HandleDyes(a_Packet))
{
+ if (m_Player->GetGameMode() == eGameMode_Survival)
+ {
+ m_Player->GetInventory().RemoveItem(Item);
+ }
return;
}
break;
@@ -1582,7 +1586,7 @@ bool cClientHandle::HandleDyes(cPacket_BlockPlace * a_Packet) if (Equipped.m_ItemHealth == E_META_DYE_WHITE)
{
cWorld * World = m_Player->GetWorld();
- World->GrowPlant(a_Packet->m_PosX, a_Packet->m_PosY, a_Packet->m_PosZ);
+ return World->GrowPlant(a_Packet->m_PosX, a_Packet->m_PosY, a_Packet->m_PosZ);
}
return false;
|