Skip to content
LeviMC
English
AutoLightDark
LeviLamina
Loading...
Searching...
No Matches
WritableBookItem.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/world/item/HandSlot.h"
7#include "mc/world/item/Item.h"
8
9// auto generated forward declare list
10// clang-format off
11class CompoundTag;
12class ItemStack;
13class ItemStackBase;
14class Player;
15struct PageContent;
16// clang-format on
17
18class WritableBookItem : public ::Item {
19public:
20 // virtual functions
21 // NOLINTBEGIN
22 virtual ::ItemStack& use(::ItemStack& instance, ::Player& player, ::HandSlot handSlot) const /*override*/;
23
24 virtual bool requiresInteract() const /*override*/;
25
26 virtual ::std::string getInteractText(::Player const& player) const /*override*/;
27 // NOLINTEND
28
29public:
30 // static functions
31 // NOLINTBEGIN
32 MCNAPI static void _addPageAt(::ItemStackBase& book, int index, ::PageContent const& page);
33
34 MCNAPI static ::PageContent _deletePage(::ItemStackBase& book, int index);
35
36 MCNAPI static void _replacePage(::ItemStackBase& book, int index, ::PageContent const& page);
37
38 MCNAPI static void _signBookUserData(
39 ::CompoundTag& userData,
40 ::std::string title,
41 ::std::optional<::std::string> filteredTitle,
42 ::std::string author,
43 ::std::optional<::std::string> filteredAuthor,
44 ::std::string xuid
45 );
46
47 MCNAPI static void addPageAt(::ItemStack& book, int index, ::PageContent const& page);
48
49 MCNAPI static void createUserDataIfEmpty(::ItemStackBase& book);
50
51 MCNAPI static ::PageContent deletePage(::ItemStack& book, int index);
52
53 MCNAPI static void replacePage(::ItemStack& book, int index, ::PageContent const& page);
54
55 MCNAPI static void signBook(
56 ::ItemStack& book,
57 ::std::string title,
58 ::std::optional<::std::string> filteredTitle,
59 ::std::string author,
60 ::std::optional<::std::string> filteredAuthor,
61 ::std::string xuid
62 );
63
64 MCNAPI static void swapPages(::ItemStack& book, int page1, int page2);
65 // NOLINTEND
66
67public:
68 // virtual function thunks
69 // NOLINTBEGIN
70 MCNAPI ::ItemStack& $use(::ItemStack& instance, ::Player& player, ::HandSlot handSlot) const;
71
72 MCNAPI bool $requiresInteract() const;
73
74 MCNAPI ::std::string $getInteractText(::Player const& player) const;
75
76
77 // NOLINTEND
78};
Definition CompoundTag.h:18
Definition ItemStackBase.h:45
Definition ItemStack.h:26
Definition Player.h:131
Definition WritableBookItem.h:18
static MCAPI void addPageAt(::ItemStack &book, int index, ::PageContent const &page)
static MCAPI void _replacePage(::ItemStackBase &book, int index, ::PageContent const &page)
static MCAPI void signBook(::ItemStack &book, ::std::string title, ::std::optional<::std::string > filteredTitle, ::std::string author, ::std::optional<::std::string > filteredAuthor, ::std::string xuid)
static MCAPI void replacePage(::ItemStack &book, int index, ::PageContent const &page)
static MCAPI ::PageContent _deletePage(::ItemStackBase &book, int index)
static MCAPI ::PageContent deletePage(::ItemStack &book, int index)
static MCAPI void _addPageAt(::ItemStackBase &book, int index, ::PageContent const &page)
MCAPI::ItemStack & $use(::ItemStack &instance, ::Player &player, ::HandSlot handSlot) const
static MCAPI void swapPages(::ItemStack &book, int page1, int page2)
static MCAPI void _signBookUserData(::CompoundTag &userData, ::std::string title, ::std::optional<::std::string > filteredTitle, ::std::string author, ::std::optional<::std::string > filteredAuthor, ::std::string xuid)
MCAPI::std::string $getInteractText(::Player const &player) const
MCAPI bool $requiresInteract() const
static MCAPI void createUserDataIfEmpty(::ItemStackBase &book)
Definition PageContent.h:10