summaryrefslogtreecommitdiffstats
path: root/source/items
diff options
context:
space:
mode:
authorlapayo94@gmail.com <lapayo94@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-07-16 20:19:25 +0200
committerlapayo94@gmail.com <lapayo94@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-07-16 20:19:25 +0200
commitd3b7a39f928473366132b37f76fc1bb13b08de43 (patch)
treee22b5efcf26ab06eac19340478f77236b4effa14 /source/items
parentFixed some small bugs :) (diff)
downloadcuberite-d3b7a39f928473366132b37f76fc1bb13b08de43.tar
cuberite-d3b7a39f928473366132b37f76fc1bb13b08de43.tar.gz
cuberite-d3b7a39f928473366132b37f76fc1bb13b08de43.tar.bz2
cuberite-d3b7a39f928473366132b37f76fc1bb13b08de43.tar.lz
cuberite-d3b7a39f928473366132b37f76fc1bb13b08de43.tar.xz
cuberite-d3b7a39f928473366132b37f76fc1bb13b08de43.tar.zst
cuberite-d3b7a39f928473366132b37f76fc1bb13b08de43.zip
Diffstat (limited to '')
-rw-r--r--source/items/Item.cpp3
-rw-r--r--source/items/ItemRedstoneRepeater.h27
2 files changed, 30 insertions, 0 deletions
diff --git a/source/items/Item.cpp b/source/items/Item.cpp
index b3a525c6b..5c978e8ed 100644
--- a/source/items/Item.cpp
+++ b/source/items/Item.cpp
@@ -15,6 +15,7 @@
#include "ItemBucket.h"
#include "ItemLighter.h"
#include "ItemRedstoneDust.h"
+#include "ItemRedstoneRepeater.h"
#include "ItemSeeds.h"
#include "ItemDye.h"
#include "ItemSugarcane.h"
@@ -69,6 +70,8 @@ cItemHandler *cItemHandler::CreateItemHandler(int a_ItemID)
return new cItemSaplingHandler(a_ItemID);
case E_ITEM_REDSTONE_DUST:
return new cItemRedstoneDustHandler(a_ItemID);
+ case E_ITEM_REDSTONE_REPEATER:
+ return new cItemRedstoneRepeaterHandler(a_ItemID);
case E_ITEM_BUCKET:
case E_ITEM_WATER_BUCKET:
case E_ITEM_LAVA_BUCKET:
diff --git a/source/items/ItemRedstoneRepeater.h b/source/items/ItemRedstoneRepeater.h
new file mode 100644
index 000000000..0250cdee0
--- /dev/null
+++ b/source/items/ItemRedstoneRepeater.h
@@ -0,0 +1,27 @@
+#pragma once
+#include "Item.h"
+
+
+class cItemRedstoneRepeaterHandler : public cItemHandler
+{
+public:
+ cItemRedstoneRepeaterHandler(int a_ItemID)
+ : cItemHandler(a_ItemID)
+ {
+ }
+
+ virtual bool IsPlaceable()
+ {
+ return true;
+ }
+
+ virtual BLOCKTYPE GetBlockType()
+ {
+ return ::E_BLOCK_REDSTONE_REPEATER_OFF;
+ }
+
+ virtual char GetBlockMeta(char a_ItemMeta)
+ {
+ return 0;
+ }
+}; \ No newline at end of file