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/Item.h"
7
8// auto generated forward declare list
9// clang-format off
10class CompoundTag;
11class ItemStack;
12class ItemStackBase;
13class Player;
14struct PageContent;
15// clang-format on
16
17class WritableBookItem : public ::Item {
18public:
19 // virtual functions
20 // NOLINTBEGIN
21 virtual ::ItemStack& use(::ItemStack& item, ::Player& player) const /*override*/;
22
23 virtual bool requiresInteract() const /*override*/;
24
25 virtual ::std::string getInteractText(::Player const& player) const /*override*/;
26
27 virtual ~WritableBookItem() /*override*/ = default;
28 // NOLINTEND
29
30public:
31 // static functions
32 // NOLINTBEGIN
33 MCAPI static void _addPageAt(::ItemStackBase& book, int index, ::PageContent const& page);
34
35 MCAPI static ::PageContent _deletePage(::ItemStackBase& book, int index);
36
37 MCAPI static void _deletePages(::ItemStackBase& book);
38
39 MCAPI static void _replacePage(::ItemStackBase& book, int index, ::PageContent const& page);
40
41 MCAPI static void _signBookUserData(
42 ::CompoundTag& userData,
43 ::std::string title,
44 ::std::optional<::std::string> filteredTitle,
45 ::std::string author,
46 ::std::optional<::std::string> filteredAuthor,
47 ::std::string xuid
48 );
49
50 MCAPI static void addPageAt(::ItemStack& book, int index, ::PageContent const& page);
51
52 MCAPI static void createUserDataIfEmpty(::ItemStackBase& book);
53
54 MCAPI static ::PageContent deletePage(::ItemStack& book, int index);
55
56 MCAPI_C static void replacePage(::ItemStack& book, int index, ::PageContent const& page);
57
58 MCAPI static void signBook(
59 ::ItemStack& book,
60 ::std::string title,
61 ::std::optional<::std::string> filteredTitle,
62 ::std::string author,
63 ::std::optional<::std::string> filteredAuthor,
64 ::std::string xuid
65 );
66
67 MCAPI static void swapPages(::ItemStack& book, int page1, int page2);
68 // NOLINTEND
69
70public:
71 // virtual function thunks
72 // NOLINTBEGIN
73 MCAPI ::ItemStack& $use(::ItemStack& item, ::Player& player) const;
74
75 MCFOLD bool $requiresInteract() const;
76
77 MCAPI ::std::string $getInteractText(::Player const& player) const;
78
79
80 // NOLINTEND
81
82public:
83 // vftables
84 // NOLINTBEGIN
85 MCAPI static void** $vftable();
86 // NOLINTEND
87};
Definition CompoundTag.h:23
Definition ItemStackBase.h:44
Definition ItemStack.h:26
Definition Player.h:125
Definition WritableBookItem.h:17
Definition PageContent.h:10