From e6ac77a2c1c03498a99de1b4aafdd1ee46e19db0 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Fri, 10 Aug 2012 20:26:50 +0000 Subject: Fixed cacti and sugarcane not being placeable on themselves (FS #234, patch submitted by STR_Warrior) git-svn-id: http://mc-server.googlecode.com/svn/trunk@723 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/blocks/BlockCactus.h | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) (limited to 'source/blocks/BlockCactus.h') diff --git a/source/blocks/BlockCactus.h b/source/blocks/BlockCactus.h index 5eb351d9c..e5bfdda03 100644 --- a/source/blocks/BlockCactus.h +++ b/source/blocks/BlockCactus.h @@ -1,8 +1,13 @@ + #pragma once #include "Block.h" -class cBlockCactusHandler : public cBlockHandler + + + +class cBlockCactusHandler : + public cBlockHandler { public: cBlockCactusHandler(BLOCKTYPE a_BlockID) @@ -10,12 +15,14 @@ public: { } + virtual NIBBLETYPE GetDropMeta(NIBBLETYPE a_BlockMeta) override { return 0; } - virtual bool CanBeAt(cWorld *a_World, int a_X, int a_Y, int a_Z) override + + virtual bool CanBeAt(cWorld * a_World, int a_X, int a_Y, int a_Z) override { BLOCKTYPE Surface = a_World->GetBlock(a_X, a_Y - 1, a_Z); if ((Surface != E_BLOCK_SAND) && (Surface != E_BLOCK_CACTUS)) @@ -34,13 +41,8 @@ public: { return false; } - - return true; - } - virtual bool AllowBlockOnTop() override - { - return false; + return true; } @@ -48,4 +50,8 @@ public: { return false; } -}; \ No newline at end of file +}; + + + + -- cgit v1.2.3