Farmland is created using a hoe on dirt or grass.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@520 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
parent
322ba59c3a
commit
2372419d0c
@ -15,6 +15,10 @@ extern bool g_BlockOneHitDig[];
|
||||
|
||||
//--DO NOT DELETE THIS COMMENT-- //tolua_export
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
inline bool IsValidBlock( int a_BlockID ) //tolua_export
|
||||
{ //tolua_export
|
||||
if( a_BlockID > -1 &&
|
||||
|
@ -995,7 +995,17 @@ void cClientHandle::HandleBlockPlace(cPacket_BlockPlace * a_Packet)
|
||||
bool isDoor = false;
|
||||
|
||||
//TODO: Wrong Blocks!
|
||||
int ClickedBlock = (int)m_Player->GetWorld()->GetBlock(a_Packet->m_PosX, a_Packet->m_PosY, a_Packet->m_PosZ);
|
||||
BLOCKTYPE ClickedBlock = m_Player->GetWorld()->GetBlock(a_Packet->m_PosX, a_Packet->m_PosY, a_Packet->m_PosZ);
|
||||
|
||||
if (ItemCategory::IsHoe(Item.m_ItemID))
|
||||
{
|
||||
if ((ClickedBlock == E_BLOCK_DIRT) || (ClickedBlock == E_BLOCK_GRASS))
|
||||
{
|
||||
m_Player->GetWorld()->FastSetBlock(a_Packet->m_PosX, a_Packet->m_PosY, a_Packet->m_PosZ, E_BLOCK_FARMLAND, 0);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
char MetaData = (char)Equipped.m_ItemHealth;
|
||||
bool LavaBucket = false;
|
||||
bool WaterBucket = false;
|
||||
|
Loading…
Reference in New Issue
Block a user