2014-01-20 12:22:08 -05:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "BlockHandler.h"
|
2014-12-13 09:06:55 -05:00
|
|
|
#include "../UI/EnchantingWindow.h"
|
2014-01-20 12:22:08 -05:00
|
|
|
#include "../Entities/Player.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class cBlockEnchantmentTableHandler :
|
|
|
|
public cBlockHandler
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
cBlockEnchantmentTableHandler(BLOCKTYPE a_BlockType)
|
|
|
|
: cBlockHandler(a_BlockType)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2015-12-01 17:12:44 -05:00
|
|
|
virtual bool OnUse(cChunkInterface & a_ChunkInterface, cWorldInterface & a_WorldInterface, cPlayer * a_Player, int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace, int a_CursorX, int a_CursorY, int a_CursorZ) override
|
2014-01-20 12:22:08 -05:00
|
|
|
{
|
|
|
|
cWindow * Window = new cEnchantingWindow(a_BlockX, a_BlockY, a_BlockZ);
|
|
|
|
a_Player->OpenWindow(Window);
|
2015-12-01 17:12:44 -05:00
|
|
|
return true;
|
2014-01-20 12:22:08 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
virtual bool IsUseable(void) override
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
2015-06-30 10:50:15 -04:00
|
|
|
|
|
|
|
virtual ColourID GetMapBaseColourID(NIBBLETYPE a_Meta) override
|
|
|
|
{
|
|
|
|
UNUSED(a_Meta);
|
|
|
|
return 29;
|
|
|
|
}
|
2014-01-20 12:22:08 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|