diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2013-08-20 23:47:10 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2013-08-20 23:47:10 +0200 |
commit | b35771ca0d7faa6572025f8e9e61007df498e14c (patch) | |
tree | 54e16d566010129f8d5213c98f5422df733d209a /source/Blocks/BlockCarpet.h | |
parent | Juggled piston code to prioritise block action (diff) | |
download | cuberite-b35771ca0d7faa6572025f8e9e61007df498e14c.tar cuberite-b35771ca0d7faa6572025f8e9e61007df498e14c.tar.gz cuberite-b35771ca0d7faa6572025f8e9e61007df498e14c.tar.bz2 cuberite-b35771ca0d7faa6572025f8e9e61007df498e14c.tar.lz cuberite-b35771ca0d7faa6572025f8e9e61007df498e14c.tar.xz cuberite-b35771ca0d7faa6572025f8e9e61007df498e14c.tar.zst cuberite-b35771ca0d7faa6572025f8e9e61007df498e14c.zip |
Diffstat (limited to 'source/Blocks/BlockCarpet.h')
-rw-r--r-- | source/Blocks/BlockCarpet.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/source/Blocks/BlockCarpet.h b/source/Blocks/BlockCarpet.h index f70ff45b6..9ac998131 100644 --- a/source/Blocks/BlockCarpet.h +++ b/source/Blocks/BlockCarpet.h @@ -8,6 +8,8 @@ #pragma once +#include "BlockHandler.h" + @@ -16,7 +18,11 @@ class cBlockCarpetHandler : public cBlockHandler { public: - cBlockCarpetHandler(BLOCKTYPE a_BlockType); + cBlockCarpetHandler(BLOCKTYPE a_BlockType) + : cBlockHandler(a_BlockType) + { + } + virtual const char * GetStepSound(void) override { @@ -39,13 +45,13 @@ public: virtual void ConvertToPickups(cItems & a_Pickups, NIBBLETYPE a_BlockMeta) override { - a_Pickups.push_back(cItem(E_BLOCK_CARPET, a_BlockMeta)); + a_Pickups.push_back(cItem(E_BLOCK_CARPET, 1, a_BlockMeta)); } virtual bool CanBeAt(int a_RelX, int a_RelY, int a_RelZ, const cChunk & a_Chunk) override { - return ((a_RelY > 0) && (a_Chunk.GetBlock(a_RelX, a_RelY - 1, a_RelZ) != E_BLOCK_AIR)); + return (a_RelY > 0) && (a_Chunk.GetBlock(a_RelX, a_RelY - 1, a_RelZ) != E_BLOCK_AIR); } } ; |