1
0
cuberite-2a/source/Items/ItemRedstoneRepeater.h
Tiger Wang bc1e236d54 Redstone Megacommit [SEE DESC]
+ Updated BlockID - look for yourself
* Improved button, repeater, lever, and comparator code ->
simplification and splitting of some stuff from the redstone simulator
file
* Fixed buttons not breaking when in an invalid game state
* Fixed QueueSetBlock -> improved (AGAIN) piston code
+ Rewrote redstone simulator

Fixes: #57, #58, #205, and part of #131.
Fixes FS issues: 281, 116, and 102
2013-11-18 22:30:34 +00:00

41 lines
730 B
C++

#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;
}
} ;