diff options
Diffstat (limited to '')
-rw-r--r-- | src/Blocks/BlockEnchantmentTable.h | 32 |
1 files changed, 27 insertions, 5 deletions
diff --git a/src/Blocks/BlockEnchantmentTable.h b/src/Blocks/BlockEnchantmentTable.h index bfb0f521c..a981cf7a7 100644 --- a/src/Blocks/BlockEnchantmentTable.h +++ b/src/Blocks/BlockEnchantmentTable.h @@ -9,27 +9,49 @@ -class cBlockEnchantmentTableHandler : +class cBlockEnchantmentTableHandler: public cBlockHandler { + using Super = cBlockHandler; + public: - cBlockEnchantmentTableHandler(BLOCKTYPE a_BlockType) - : cBlockHandler(a_BlockType) + + cBlockEnchantmentTableHandler(BLOCKTYPE a_BlockType): + Super(a_BlockType) { } - 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 + + + + + virtual bool OnUse( + cChunkInterface & a_ChunkInterface, + cWorldInterface & a_WorldInterface, + cPlayer & a_Player, + const Vector3i a_BlockPos, + eBlockFace a_BlockFace, + const Vector3i a_CursorPos + ) override { - cWindow * Window = new cEnchantingWindow(a_BlockX, a_BlockY, a_BlockZ); + cWindow * Window = new cEnchantingWindow(a_BlockPos.x, a_BlockPos.y, a_BlockPos.z); a_Player.OpenWindow(*Window); return true; } + + + + virtual bool IsUseable(void) override { return true; } + + + + virtual ColourID GetMapBaseColourID(NIBBLETYPE a_Meta) override { UNUSED(a_Meta); |