diff options
author | lapayo94@gmail.com <lapayo94@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-07-16 21:20:37 +0200 |
---|---|---|
committer | lapayo94@gmail.com <lapayo94@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-07-16 21:20:37 +0200 |
commit | 86a991c5a85a9771143320de91d87f6e986300a9 (patch) | |
tree | dee2b3b326103217b982a49c90a489eb35235392 /source/blocks/BlockCrops.h | |
parent | Fixed a copypasta error in previous commit (diff) | |
download | cuberite-86a991c5a85a9771143320de91d87f6e986300a9.tar cuberite-86a991c5a85a9771143320de91d87f6e986300a9.tar.gz cuberite-86a991c5a85a9771143320de91d87f6e986300a9.tar.bz2 cuberite-86a991c5a85a9771143320de91d87f6e986300a9.tar.lz cuberite-86a991c5a85a9771143320de91d87f6e986300a9.tar.xz cuberite-86a991c5a85a9771143320de91d87f6e986300a9.tar.zst cuberite-86a991c5a85a9771143320de91d87f6e986300a9.zip |
Diffstat (limited to 'source/blocks/BlockCrops.h')
-rw-r--r-- | source/blocks/BlockCrops.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/source/blocks/BlockCrops.h b/source/blocks/BlockCrops.h index 34af1a43c..fb4934540 100644 --- a/source/blocks/BlockCrops.h +++ b/source/blocks/BlockCrops.h @@ -16,12 +16,17 @@ public: return true;
}
- virtual int GetDropID()
+ virtual bool AllowBlockOnTop() override
+ {
+ return false;
+ }
+
+ virtual int GetDropID() override
{
return E_ITEM_EMPTY;
}
- virtual void OnDestroyed(cWorld *a_World, int a_X, int a_Y, int a_Z)
+ virtual void OnDestroyed(cWorld *a_World, int a_X, int a_Y, int a_Z) override
{
MTRand rand;
NIBBLETYPE Meta = a_World->GetBlockMeta(a_X, a_Y, a_Z);
@@ -42,13 +47,13 @@ public: a_World->SpawnItemPickups(Drops, a_X, a_Y, a_Z);
}
- void OnUpdate(cWorld *a_World, int a_X, int a_Y, int a_Z)
+ void OnUpdate(cWorld *a_World, int a_X, int a_Y, int a_Z) override
{
//TODO: Handle Growing here
}
- virtual bool CanBeAt(cWorld *a_World, int a_X, int a_Y, int a_Z)
+ virtual bool CanBeAt(cWorld *a_World, int a_X, int a_Y, int a_Z) override
{
return a_World->GetBlock(a_X, a_Y - 1, a_Z) == E_BLOCK_FARMLAND;
}
|