mirror of
https://github.com/DrPerkyLegit/LCEServerTest.git
synced 2026-06-26 14:25:38 +00:00
book and quill implementation
This commit is contained in:
26
Minecraft.World/WritingBookItem.cpp
Normal file
26
Minecraft.World/WritingBookItem.cpp
Normal file
@@ -0,0 +1,26 @@
|
||||
#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);
|
||||
|
||||
return instance;
|
||||
}
|
||||
|
||||
bool WritingBookItem::TestUse(shared_ptr<ItemInstance> itemInstance, Level* level, shared_ptr<Player> player)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
Reference in New Issue
Block a user