mirror of
https://github.com/neoStudiosLCE/neoLegacy.git
synced 2026-05-21 22:55:04 +00:00
26 lines
746 B
C++
26 lines
746 B
C++
#include "stdafx.h"
|
|
#include "Item.h"
|
|
#include "Player.h"
|
|
#include "ItemInstance.h"
|
|
#include "WritingBookItem.h"
|
|
#include "../Minecraft.Client/Minecraft.h"
|
|
#include "../Minecraft.Client/MultiPlayerLocalPlayer.h"
|
|
|
|
WritingBookItem::WritingBookItem(int id) : Item(id)
|
|
{
|
|
setMaxStackSize(1);
|
|
}
|
|
|
|
shared_ptr<ItemInstance> WritingBookItem::use(shared_ptr<ItemInstance> instance, Level *level, shared_ptr<Player> player)
|
|
{
|
|
//shared_ptr<MultiplayerLocalPlayer> player1 = Minecraft::GetInstance()->player;
|
|
//player1->openItemInstanceGui(instance, player1);
|
|
player->openItemInstanceGui(instance, player);
|
|
|
|
return instance;
|
|
}
|
|
|
|
bool WritingBookItem::TestUse(shared_ptr<ItemInstance> itemInstance, Level* level, shared_ptr<Player> player)
|
|
{
|
|
return true;
|
|
} |