summaryrefslogtreecommitdiffstats
path: root/source/Items
diff options
context:
space:
mode:
authorluksor111@gmail.com <luksor111@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-12-27 02:01:16 +0100
committerluksor111@gmail.com <luksor111@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-12-27 02:01:16 +0100
commitffcfa7c89b6428ed3dc30a181c74dddc67f1f1bf (patch)
tree8ce0af2bbed3a0f396a45e79eea4781f465acbde /source/Items
parentDispensers can spawn mobs (diff)
downloadcuberite-ffcfa7c89b6428ed3dc30a181c74dddc67f1f1bf.tar
cuberite-ffcfa7c89b6428ed3dc30a181c74dddc67f1f1bf.tar.gz
cuberite-ffcfa7c89b6428ed3dc30a181c74dddc67f1f1bf.tar.bz2
cuberite-ffcfa7c89b6428ed3dc30a181c74dddc67f1f1bf.tar.lz
cuberite-ffcfa7c89b6428ed3dc30a181c74dddc67f1f1bf.tar.xz
cuberite-ffcfa7c89b6428ed3dc30a181c74dddc67f1f1bf.tar.zst
cuberite-ffcfa7c89b6428ed3dc30a181c74dddc67f1f1bf.zip
Diffstat (limited to '')
-rw-r--r--source/Items/ItemFlowerPot.h25
-rw-r--r--source/Items/ItemHandler.cpp2
2 files changed, 27 insertions, 0 deletions
diff --git a/source/Items/ItemFlowerPot.h b/source/Items/ItemFlowerPot.h
new file mode 100644
index 000000000..fe4b3dd61
--- /dev/null
+++ b/source/Items/ItemFlowerPot.h
@@ -0,0 +1,25 @@
+
+#pragma once
+
+#include "ItemHandler.h"
+
+class cItemFlowerPotHandler : public cItemHandler
+{
+public:
+ cItemFlowerPotHandler(int a_ItemType)
+ : cItemHandler(a_ItemType)
+ {
+
+ }
+
+ virtual bool IsPlaceable() override
+ {
+ return true;
+ }
+
+ virtual BLOCKTYPE GetBlockType() override
+ {
+ return E_BLOCK_FLOWER_POT;
+ }
+
+}; \ No newline at end of file
diff --git a/source/Items/ItemHandler.cpp b/source/Items/ItemHandler.cpp
index c4e6537e2..7a6b82eaa 100644
--- a/source/Items/ItemHandler.cpp
+++ b/source/Items/ItemHandler.cpp
@@ -28,6 +28,7 @@
#include "ItemSign.h"
#include "ItemBed.h"
#include "ItemSpawnEgg.h"
+#include "ItemFlowerPot.h"
#include "../Blocks/BlockHandler.h"
@@ -71,6 +72,7 @@ cItemHandler *cItemHandler::CreateItemHandler(int a_ItemType)
case E_ITEM_BED: return new cItemBedHandler(a_ItemType);
case E_ITEM_DYE: return new cItemDyeHandler(a_ItemType);
case E_ITEM_FLINT_AND_STEEL: return new cItemLighterHandler(a_ItemType);
+ case E_ITEM_FLOWER_POT: return new cItemFlowerPotHandler(a_ItemType);
case E_ITEM_LEAVES: return new cItemLeavesHandler(a_ItemType);
case E_ITEM_REDSTONE_DUST: return new cItemRedstoneDustHandler(a_ItemType);
case E_ITEM_REDSTONE_REPEATER: return new cItemRedstoneRepeaterHandler(a_ItemType);