summaryrefslogtreecommitdiffstats
path: root/src/Blocks
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/Blocks/BlockHandler.cpp2
-rw-r--r--src/Blocks/BlockSlime.h32
2 files changed, 34 insertions, 0 deletions
diff --git a/src/Blocks/BlockHandler.cpp b/src/Blocks/BlockHandler.cpp
index dab99e53d..bb479db53 100644
--- a/src/Blocks/BlockHandler.cpp
+++ b/src/Blocks/BlockHandler.cpp
@@ -72,6 +72,7 @@
#include "BlockSideways.h"
#include "BlockSignPost.h"
#include "BlockSlab.h"
+#include "BlockSlime.h"
#include "BlockSnow.h"
#include "BlockStairs.h"
#include "BlockStems.h"
@@ -297,6 +298,7 @@ cBlockHandler * cBlockHandler::CreateBlockHandler(BLOCKTYPE a_BlockType)
case E_BLOCK_SEA_LANTERN: return new cBlockSeaLanternHandler (a_BlockType);
case E_BLOCK_SIGN_POST: return new cBlockSignPostHandler (a_BlockType);
case E_BLOCK_SNOW: return new cBlockSnowHandler (a_BlockType);
+ case E_BLOCK_SLIME_BLOCK: return new cBlockSlimeHandler (a_BlockType);
case E_BLOCK_SPRUCE_DOOR: return new cBlockDoorHandler (a_BlockType);
case E_BLOCK_SPRUCE_FENCE_GATE: return new cBlockFenceGateHandler (a_BlockType);
case E_BLOCK_SPRUCE_WOOD_STAIRS: return new cBlockStairsHandler (a_BlockType);
diff --git a/src/Blocks/BlockSlime.h b/src/Blocks/BlockSlime.h
new file mode 100644
index 000000000..e785a6a13
--- /dev/null
+++ b/src/Blocks/BlockSlime.h
@@ -0,0 +1,32 @@
+#pragma once
+
+#include "BlockHandler.h"
+
+
+
+
+
+class cBlockSlimeHandler :
+ public cBlockHandler
+{
+public:
+ cBlockSlimeHandler(BLOCKTYPE a_BlockType)
+ : cBlockHandler(a_BlockType)
+ {
+ }
+
+ virtual void ConvertToPickups(cItems & a_Pickups, NIBBLETYPE a_BlockMeta) override
+ {
+ a_Pickups.push_back(cItem(m_BlockType, 1, 0));
+ }
+
+ virtual ColourID GetMapBaseColourID(NIBBLETYPE a_Meta) override
+ {
+ UNUSED(a_Meta);
+ return 1;
+ }
+};
+
+
+
+