From 86a991c5a85a9771143320de91d87f6e986300a9 Mon Sep 17 00:00:00 2001 From: "lapayo94@gmail.com" Date: Mon, 16 Jul 2012 19:20:37 +0000 Subject: Some code improvements git-svn-id: http://mc-server.googlecode.com/svn/trunk@677 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/blocks/BlockCrops.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'source/blocks/BlockCrops.h') 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; } -- cgit v1.2.3