summaryrefslogtreecommitdiffstats
path: root/source/Items
diff options
context:
space:
mode:
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);