diff options
author | worktycho <work.tycho@gmail.com> | 2013-12-09 18:51:12 +0100 |
---|---|---|
committer | worktycho <work.tycho@gmail.com> | 2013-12-09 18:51:12 +0100 |
commit | 843605d59ebc128be0a578dc6f45ef8c05da6e79 (patch) | |
tree | 3ffebc6ba27baf7a9e1d4bc51501ffeea9b14226 /src/Items/ItemRedstoneRepeater.h | |
parent | merged makefile changes (diff) | |
parent | Fix Undefined behavior at Bindings/LuaWindow line 32 (diff) | |
download | cuberite-843605d59ebc128be0a578dc6f45ef8c05da6e79.tar cuberite-843605d59ebc128be0a578dc6f45ef8c05da6e79.tar.gz cuberite-843605d59ebc128be0a578dc6f45ef8c05da6e79.tar.bz2 cuberite-843605d59ebc128be0a578dc6f45ef8c05da6e79.tar.lz cuberite-843605d59ebc128be0a578dc6f45ef8c05da6e79.tar.xz cuberite-843605d59ebc128be0a578dc6f45ef8c05da6e79.tar.zst cuberite-843605d59ebc128be0a578dc6f45ef8c05da6e79.zip |
Diffstat (limited to 'src/Items/ItemRedstoneRepeater.h')
-rw-r--r-- | src/Items/ItemRedstoneRepeater.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/src/Items/ItemRedstoneRepeater.h b/src/Items/ItemRedstoneRepeater.h new file mode 100644 index 000000000..f69f24eb8 --- /dev/null +++ b/src/Items/ItemRedstoneRepeater.h @@ -0,0 +1,40 @@ + +#pragma once + +#include "ItemHandler.h" +#include "../Blocks/BlockRedstoneRepeater.h" + + + + + +class cItemRedstoneRepeaterHandler : + public cItemHandler +{ +public: + cItemRedstoneRepeaterHandler(int a_ItemType) + : cItemHandler(a_ItemType) + { + } + + virtual bool IsPlaceable() override + { + return true; + } + + virtual bool GetPlacementBlockTypeMeta( + cWorld * a_World, cPlayer * a_Player, + int a_BlockX, int a_BlockY, int a_BlockZ, char a_BlockFace, + int a_CursorX, int a_CursorY, int a_CursorZ, + BLOCKTYPE & a_BlockType, NIBBLETYPE & a_BlockMeta + ) override + { + a_BlockType = E_BLOCK_REDSTONE_REPEATER_OFF; + a_BlockMeta = cBlockRedstoneRepeaterHandler::RepeaterRotationToMetaData(a_Player->GetRotation()); + return true; + } +} ; + + + + |