diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2013-04-06 20:20:06 +0200 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2013-04-06 20:20:06 +0200 |
commit | 2006de22170d40666fc8437829a10a79556f55bf (patch) | |
tree | fb9ed8c84268039cfc7018cbb4dd1e1ff8852a07 /source/Blocks | |
parent | Mineshafts: Added a (nonworking) mob spawner in cobweb spider nests. (diff) | |
download | cuberite-2006de22170d40666fc8437829a10a79556f55bf.tar cuberite-2006de22170d40666fc8437829a10a79556f55bf.tar.gz cuberite-2006de22170d40666fc8437829a10a79556f55bf.tar.bz2 cuberite-2006de22170d40666fc8437829a10a79556f55bf.tar.lz cuberite-2006de22170d40666fc8437829a10a79556f55bf.tar.xz cuberite-2006de22170d40666fc8437829a10a79556f55bf.tar.zst cuberite-2006de22170d40666fc8437829a10a79556f55bf.zip |
Diffstat (limited to 'source/Blocks')
-rw-r--r-- | source/Blocks/BlockCobWeb.h | 30 | ||||
-rw-r--r-- | source/Blocks/BlockHandler.cpp | 2 |
2 files changed, 32 insertions, 0 deletions
diff --git a/source/Blocks/BlockCobWeb.h b/source/Blocks/BlockCobWeb.h new file mode 100644 index 000000000..86bb6e773 --- /dev/null +++ b/source/Blocks/BlockCobWeb.h @@ -0,0 +1,30 @@ +
+// BlockCobWeb.h
+
+// Declares the cBlockCobWebHandler object representing the BlockHandler for cobwebs
+
+#pragma once
+
+
+
+
+
+class cBlockCobWebHandler :
+ public cBlockHandler
+{
+public:
+ cBlockCobWebHandler(BLOCKTYPE a_BlockType)
+ : cBlockHandler(a_BlockType)
+ {
+ }
+
+
+ virtual void ConvertToPickups(cItems & a_Pickups, NIBBLETYPE a_Meta) override
+ {
+ a_Pickups.push_back(cItem(E_ITEM_STRING, 1, 0));
+ }
+} ;
+
+
+
+
diff --git a/source/Blocks/BlockHandler.cpp b/source/Blocks/BlockHandler.cpp index 0a6334e15..51051b7a6 100644 --- a/source/Blocks/BlockHandler.cpp +++ b/source/Blocks/BlockHandler.cpp @@ -55,6 +55,7 @@ #include "BlockFlowerPot.h"
#include "BlockCauldron.h"
#include "BlockBrewingStand.h"
+#include "BlockCobWeb.h"
@@ -104,6 +105,7 @@ cBlockHandler * cBlockHandler::CreateBlockHandler(BLOCKTYPE a_BlockType) case E_BLOCK_COAL_ORE: return new cBlockOreHandler (a_BlockType);
case E_BLOCK_COBBLESTONE: return new cBlockStoneHandler (a_BlockType);
case E_BLOCK_COBBLESTONE_STAIRS: return new cBlockStairsHandler (a_BlockType);
+ case E_BLOCK_COBWEB: return new cBlockCobWebHandler (a_BlockType);
case E_BLOCK_CROPS: return new cBlockCropsHandler (a_BlockType);
case E_BLOCK_DIAMOND_ORE: return new cBlockOreHandler (a_BlockType);
case E_BLOCK_DIRT: return new cBlockDirtHandler (a_BlockType);
|