1
0

Bonemeal is consumed in survival mode when used on growable blocks

git-svn-id: http://mc-server.googlecode.com/svn/trunk@582 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
madmaxoft@gmail.com
2012-06-09 11:32:34 +00:00
parent 648c7fe943
commit 0e236c03f9
4 changed files with 15 additions and 10 deletions

View File

@@ -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;