2013-07-29 07:13:03 -04:00
# pragma once
# include "ItemHandler.h"
class cItemRedstoneDustHandler : public cItemHandler
{
public :
cItemRedstoneDustHandler ( int a_ItemType )
: cItemHandler ( a_ItemType )
{
}
virtual bool IsPlaceable ( void ) override
{
return true ;
}
virtual bool GetPlacementBlockTypeMeta (
cWorld * a_World , cPlayer * a_Player ,
2014-07-17 16:50:58 -04:00
int a_BlockX , int a_BlockY , int a_BlockZ , eBlockFace a_BlockFace ,
2013-07-29 07:13:03 -04:00
int a_CursorX , int a_CursorY , int a_CursorZ ,
BLOCKTYPE & a_BlockType , NIBBLETYPE & a_BlockMeta
) override
{
2014-07-17 16:15:34 -04:00
if ( ! cBlockInfo : : FullyOccupiesVoxel ( a_World - > GetBlock ( a_BlockX , a_BlockY - 1 , a_BlockZ ) ) ) // Some solid blocks, such as cocoa beans, are not suitable for dust
2013-12-19 10:57:35 -05:00
{
return false ;
}
2013-07-29 07:13:03 -04:00
a_BlockType = E_BLOCK_REDSTONE_WIRE ;
a_BlockMeta = 0 ;
return true ;
}
} ;