Files
cuberite-2a/src/Blocks/BlockFurnace.h
T

47 lines
982 B
C++
Raw Normal View History

2013-07-29 12:13:03 +01:00
#pragma once
#include "BlockEntity.h"
#include "../World.h"
#include "../Piston.h"
2014-03-25 17:26:13 -04:00
#include "MetaRotator.h"
2013-07-29 12:13:03 +01:00
class cBlockFurnaceHandler :
2014-03-25 17:26:13 -04:00
public cMetaRotator<cBlockEntityHandler, 0x07, 0x02, 0x05, 0x03, 0x04>
2013-07-29 12:13:03 +01:00
{
public:
cBlockFurnaceHandler(BLOCKTYPE a_BlockType)
2014-03-25 17:26:13 -04:00
: cMetaRotator<cBlockEntityHandler, 0x07, 0x02, 0x05, 0x03, 0x04>(a_BlockType)
2013-07-29 12:13:03 +01:00
{
}
virtual void ConvertToPickups(cItems & a_Pickups, NIBBLETYPE a_BlockMeta) override
{
a_Pickups.push_back(cItem(E_BLOCK_FURNACE, 1, 0));
}
virtual bool GetPlacementBlockTypeMeta(
2014-02-01 05:06:32 -08:00
cChunkInterface & a_ChunkInterface, cPlayer * a_Player,
2014-02-04 10:59:05 -08:00
int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace,
2013-07-29 12:13:03 +01:00
int a_CursorX, int a_CursorY, int a_CursorZ,
BLOCKTYPE & a_BlockType, NIBBLETYPE & a_BlockMeta
) override
{
a_BlockType = m_BlockType;
// FIXME: Do not use cPiston class for furnace placement!
2014-01-17 11:11:17 +01:00
a_BlockMeta = cPiston::RotationPitchToMetaData(a_Player->GetYaw(), 0);
2013-07-29 12:13:03 +01:00
return true;
}
} ;