summaryrefslogtreecommitdiffstats
path: root/source/Blocks/BlockCarpet.h
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2013-08-25 17:06:51 +0200
committermadmaxoft <github@xoft.cz>2013-08-25 17:06:51 +0200
commit83811b69292bff0ef4b24087a4a4d3e523b0076a (patch)
tree50bf797896f5df82af4cfcd642759d005c598044 /source/Blocks/BlockCarpet.h
parentProjectile entities get saved into MCA files (diff)
parentReduced LeakFinder's stack buffers to half. (diff)
downloadcuberite-83811b69292bff0ef4b24087a4a4d3e523b0076a.tar
cuberite-83811b69292bff0ef4b24087a4a4d3e523b0076a.tar.gz
cuberite-83811b69292bff0ef4b24087a4a4d3e523b0076a.tar.bz2
cuberite-83811b69292bff0ef4b24087a4a4d3e523b0076a.tar.lz
cuberite-83811b69292bff0ef4b24087a4a4d3e523b0076a.tar.xz
cuberite-83811b69292bff0ef4b24087a4a4d3e523b0076a.tar.zst
cuberite-83811b69292bff0ef4b24087a4a4d3e523b0076a.zip
Diffstat (limited to '')
-rw-r--r--source/Blocks/BlockCarpet.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/source/Blocks/BlockCarpet.h b/source/Blocks/BlockCarpet.h
index f70ff45b6..5eafd8c21 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);
}
} ;