summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-04-03 18:54:49 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-04-03 18:54:49 +0200
commitf9479f66aa40695ccad3daa3c40d98efd315c55a (patch)
tree11228b73204c3ecf429a1f84c8c025d2650d30e0
parentAdded a debugging log for melon-growing to catch FS #349 (diff)
downloadcuberite-f9479f66aa40695ccad3daa3c40d98efd315c55a.tar
cuberite-f9479f66aa40695ccad3daa3c40d98efd315c55a.tar.gz
cuberite-f9479f66aa40695ccad3daa3c40d98efd315c55a.tar.bz2
cuberite-f9479f66aa40695ccad3daa3c40d98efd315c55a.tar.lz
cuberite-f9479f66aa40695ccad3daa3c40d98efd315c55a.tar.xz
cuberite-f9479f66aa40695ccad3daa3c40d98efd315c55a.tar.zst
cuberite-f9479f66aa40695ccad3daa3c40d98efd315c55a.zip
-rw-r--r--source/Blocks/BlockCrops.h12
1 files changed, 4 insertions, 8 deletions
diff --git a/source/Blocks/BlockCrops.h b/source/Blocks/BlockCrops.h
index a269c7c32..6b33a400c 100644
--- a/source/Blocks/BlockCrops.h
+++ b/source/Blocks/BlockCrops.h
@@ -18,19 +18,15 @@ public:
}
- virtual void OnDestroyed(cWorld * a_World, int a_BlockX, int a_BlockY, int a_BlockZ) override
+ virtual void ConvertToPickups(cItems & a_Pickups, NIBBLETYPE a_Meta) override
{
MTRand rand;
- NIBBLETYPE Meta = a_World->GetBlockMeta(a_BlockX, a_BlockY, a_BlockZ);
-
- cItems Drops;
- if (Meta == 0x7) // Is fully grown
+ if (a_Meta == 0x7) // Is fully grown
{
- Drops.push_back(cItem(E_ITEM_WHEAT, 1, 0));
+ a_Pickups.push_back(cItem(E_ITEM_WHEAT, 1, 0));
}
- Drops.push_back(cItem(E_ITEM_SEEDS, (rand.randInt(3) == 0) ? 2 : 1, 0));
- a_World->SpawnItemPickups(Drops, a_BlockX, a_BlockY, a_BlockZ);
+ a_Pickups.push_back(cItem(E_ITEM_SEEDS, (rand.randInt(3) == 0) ? 2 : 1, 0));
}