bc1e236d54
+ 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
41 lines
720 B
C++
41 lines
720 B
C++
|
|
#pragma once
|
|
|
|
#include "ItemHandler.h"
|
|
#include "../Blocks/BlockRedstoneRepeater.h"
|
|
|
|
|
|
|
|
|
|
|
|
class cItemComparatorHandler :
|
|
public cItemHandler
|
|
{
|
|
public:
|
|
cItemComparatorHandler(int a_ItemType) :
|
|
cItemHandler(a_ItemType)
|
|
{
|
|
}
|
|
|
|
virtual bool IsPlaceable(void) 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_INACTIVE_COMPARATOR;
|
|
a_BlockMeta = cBlockRedstoneRepeaterHandler::RepeaterRotationToMetaData(a_Player->GetRotation());
|
|
return true;
|
|
}
|
|
} ;
|
|
|
|
|
|
|
|
|