blob: 37f1254c5099e6a027da0bdce7f8f20524af4556 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
// ItemWrittenBook.h
#pragma once
#include "ItemHandler.h"
#include "../Entities/Player.h"
#include "../Inventory.h"
class cItemWrittenBookHandler :
public cItemHandler
{
public:
cItemWrittenBookHandler(int a_ItemType)
: cItemHandler(a_ItemType)
{
}
virtual bool OnItemUse(
cWorld * a_World, cPlayer * a_Player, cBlockPluginInterface & a_PluginInterface, const cItem & a_Item,
int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace
) override
{
// TODO: Currently only main haind. If second hand is implemented, fix this
a_Player->GetClientHandle()->SendOpenBook(0);
return true;
}
} ;
|