2013-09-17 19:01:20 -04:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "BlockHandler.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class cBlockPlanksHandler : public cBlockHandler
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
cBlockPlanksHandler(BLOCKTYPE a_BlockType)
|
|
|
|
: cBlockHandler(a_BlockType)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
virtual bool GetPlacementBlockTypeMeta(
|
2014-02-01 08:06:32 -05:00
|
|
|
cChunkInterface & a_ChunkInterface, cPlayer * a_Player,
|
2014-07-17 16:50:58 -04:00
|
|
|
int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace,
|
2013-09-17 19:01:20 -04:00
|
|
|
int a_CursorX, int a_CursorY, int a_CursorZ,
|
|
|
|
BLOCKTYPE & a_BlockType, NIBBLETYPE & a_BlockMeta
|
|
|
|
) override
|
|
|
|
{
|
|
|
|
a_BlockType = m_BlockType;
|
2015-07-29 11:04:03 -04:00
|
|
|
a_BlockMeta = static_cast<NIBBLETYPE>(a_Player->GetEquippedItem().m_ItemDamage);
|
2013-09-17 19:01:20 -04:00
|
|
|
return true;
|
|
|
|
}
|
2015-06-30 10:50:15 -04:00
|
|
|
|
|
|
|
virtual ColourID GetMapBaseColourID(NIBBLETYPE a_Meta) override
|
|
|
|
{
|
|
|
|
switch (a_Meta)
|
|
|
|
{
|
|
|
|
case E_META_PLANKS_BIRCH: return 2;
|
|
|
|
case E_META_PLANKS_JUNGLE: return 10;
|
|
|
|
case E_META_PLANKS_OAK: return 13;
|
|
|
|
case E_META_PLANKS_ACACIA: return 15;
|
|
|
|
case E_META_PLANKS_DARK_OAK: return 26;
|
|
|
|
case E_META_PLANKS_SPRUCE: return 34;
|
|
|
|
default:
|
|
|
|
{
|
|
|
|
ASSERT(!"Unhandled meta in planks handler!");
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2013-09-17 19:01:20 -04:00
|
|
|
} ;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|