summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/BlockInfo.cpp1
-rw-r--r--src/Blocks/BlockHandler.cpp2
-rw-r--r--src/Blocks/BlockSlime.h32
3 files changed, 35 insertions, 0 deletions
diff --git a/src/BlockInfo.cpp b/src/BlockInfo.cpp
index 70ca38362..54f11158e 100644
--- a/src/BlockInfo.cpp
+++ b/src/BlockInfo.cpp
@@ -305,6 +305,7 @@ void cBlockInfo::Initialize(cBlockInfoArray & a_Info)
a_Info[E_BLOCK_RED_MUSHROOM ].m_OneHitDig = true;
a_Info[E_BLOCK_REEDS ].m_OneHitDig = true;
a_Info[E_BLOCK_SAPLING ].m_OneHitDig = true;
+ a_Info[E_BLOCK_SLIME_BLOCK ].m_OneHitDig = true;
a_Info[E_BLOCK_TNT ].m_OneHitDig = true;
a_Info[E_BLOCK_TALL_GRASS ].m_OneHitDig = true;
a_Info[E_BLOCK_TORCH ].m_OneHitDig = true;
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;
+ }
+};
+
+
+
+