diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-05-30 18:50:59 +0200 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-05-30 18:50:59 +0200 |
commit | 38862ad018e3f7f49038180d17fb3a739cdac27a (patch) | |
tree | d254e10969fef6f9be0b57f7eaa28c793421e985 /source | |
parent | Farmland gets hydrated and dehydrated. Fixed an off-by-one error in neighbor-chunk manipulation. (diff) | |
download | cuberite-38862ad018e3f7f49038180d17fb3a739cdac27a.tar cuberite-38862ad018e3f7f49038180d17fb3a739cdac27a.tar.gz cuberite-38862ad018e3f7f49038180d17fb3a739cdac27a.tar.bz2 cuberite-38862ad018e3f7f49038180d17fb3a739cdac27a.tar.lz cuberite-38862ad018e3f7f49038180d17fb3a739cdac27a.tar.xz cuberite-38862ad018e3f7f49038180d17fb3a739cdac27a.tar.zst cuberite-38862ad018e3f7f49038180d17fb3a739cdac27a.zip |
Diffstat (limited to 'source')
-rw-r--r-- | source/cClientHandle.cpp | 29 |
1 files changed, 28 insertions, 1 deletions
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;
|