From 38862ad018e3f7f49038180d17fb3a739cdac27a Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Wed, 30 May 2012 16:50:59 +0000 Subject: Seeds can now be planted and they grow (albeit too quickly and too non-uniformly, need to fix blocktick selection) git-svn-id: http://mc-server.googlecode.com/svn/trunk@523 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/cClientHandle.cpp | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) (limited to 'source') diff --git a/source/cClientHandle.cpp b/source/cClientHandle.cpp index 9e88f47a1..8e0c707e7 100644 --- a/source/cClientHandle.cpp +++ b/source/cClientHandle.cpp @@ -1006,7 +1006,7 @@ void cClientHandle::HandleBlockPlace(cPacket_BlockPlace * a_Packet) return; } - char MetaData = (char)Equipped.m_ItemHealth; + NIBBLETYPE MetaData = (NIBBLETYPE)Equipped.m_ItemHealth; // This generally works for logs & planks, others will override bool LavaBucket = false; bool WaterBucket = false; bool bRemoveItem = true; @@ -1204,6 +1204,33 @@ void cClientHandle::HandleBlockPlace(cPacket_BlockPlace * a_Packet) bRemoveItem = false; break; } + case E_ITEM_SEEDS: + { + if (ClickedBlock != E_BLOCK_FARMLAND) + { + return; + } + a_Packet->m_ItemType = E_BLOCK_CROPS; + break; + } + case E_ITEM_MELON_SEEDS: + { + if (ClickedBlock != E_BLOCK_FARMLAND) + { + return; + } + a_Packet->m_ItemType = E_BLOCK_MELON_STEM; + break; + } + case E_ITEM_PUMPKIN_SEEDS: + { + if (ClickedBlock != E_BLOCK_FARMLAND) + { + return; + } + a_Packet->m_ItemType = E_BLOCK_PUMPKIN_STEM; + break; + } default: { break; -- cgit v1.2.3