LeviLamina
Loading...
Searching...
No Matches
WrittenBookItem.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 Actor;
11class CompoundTag;
12class ItemDescriptor;
13class ItemStack;
14class ItemStackBase;
15class Level;
16class Player;
17struct ActorUniqueID;
18struct PageContent;
19namespace Bedrock::Safety { class RedactableString; }
20// clang-format on
21
22class WrittenBookItem : public ::Item {
23public:
24 // member variables
25 // NOLINTBEGIN
26 ::ll::TypedStorage<1, 1, bool> mShouldFilterText;
27 // NOLINTEND
28
29public:
30 // prevent constructor by default
31 WrittenBookItem();
32
33public:
34 // virtual functions
35 // NOLINTBEGIN
36 virtual ::ItemStack& use(::ItemStack& instance, ::Player& player) const /*override*/;
37
38 virtual bool requiresInteract() const /*override*/;
39
40 virtual ::std::string getInteractText(::Player const& player) const /*override*/;
41
42 virtual ::std::string buildDescriptionId(::ItemDescriptor const& item, ::CompoundTag const* userData) const
43 /*override*/;
44
45 virtual void appendFormattedHovertext(
46 ::ItemStackBase const& stack,
47 ::Level& level,
49 bool const showCategory
50 ) const /*override*/;
51
52 virtual ::Bedrock::Safety::RedactableString getRedactedCustomName(::ItemStackBase const& stack) const /*override*/;
53
54 virtual bool hasCustomHoverName(::ItemStackBase const& stack) const /*override*/;
55
56 virtual bool inventoryTick(::ItemStack& level, ::Level& owner, ::Actor&, int, bool) const /*override*/;
57
58 virtual bool isGlint(::ItemStackBase const& stack) const /*override*/;
59 // NOLINTEND
60
61public:
62 // member functions
63 // NOLINTBEGIN
64 MCAPI WrittenBookItem(::std::string const& name, int id);
65 // NOLINTEND
66
67public:
68 // static functions
69 // NOLINTBEGIN
70 MCAPI static bool canBeCopied(::CompoundTag const* tag);
71
72 MCAPI static ::std::string const& getAuthor(::ItemStackBase const& book);
73
74#ifdef LL_PLAT_C
75 MCFOLD static ::ActorUniqueID getBookId(::ItemStack const& book);
76
77 MCAPI static ::std::optional<::std::string> getFilteredAuthor(::ItemStack const& book);
78
79 MCAPI static ::std::optional<::std::string> getFilteredTitle(::ItemStack const& book);
80#endif
81
82 MCAPI static int getGeneration(::CompoundTag const* tag);
83
84 MCAPI static ::PageContent getPage(::ItemStackBase const& book, int index);
85
86 MCAPI static int getPageCount(::ItemStackBase const& book);
87
88#ifdef LL_PLAT_C
89 MCAPI static ::std::vector<int> getPageCountByType(::ItemStack const& book);
90#endif
91
92 MCAPI static ::std::vector<::PageContent> getPages(::ItemStackBase const& book);
93
94 MCAPI static ::std::string const& getTitle(::ItemStackBase const& book);
95
96#ifdef LL_PLAT_C
97 MCAPI static ::std::string const& getXUID(::ItemStackBase const& book);
98#endif
99 // NOLINTEND
100
101public:
102 // static variables
103 // NOLINTBEGIN
104 MCAPI static int const& MAX_PAGES();
105
106 MCAPI static int const& MAX_PAGE_LENGTH();
107
108 MCAPI static int const& MAX_TITLE_LENGTH();
109
110 MCAPI static ::std::string_view const& TAG_AUTHOR();
111
112 MCAPI static ::std::string_view const& TAG_FILTERED_AUTHOR();
113
114 MCAPI static ::std::string_view const& TAG_FILTERED_TITLE();
115
116 MCAPI static ::std::string_view const& TAG_GENERATION();
117
118 MCAPI static ::std::string_view const& TAG_PAGES();
119
120 MCAPI static ::std::string_view const& TAG_PAGE_FILTERED_PHOTO_NAME();
121
122 MCAPI static ::std::string_view const& TAG_PAGE_FILTERED_TEXT();
123
124 MCAPI static ::std::string_view const& TAG_PAGE_PHOTO_NAME();
125
126 MCAPI static ::std::string_view const& TAG_PAGE_TEXT();
127
128 MCAPI static ::std::string_view const& TAG_TITLE();
129
130 MCAPI static ::std::string_view const& TAG_XUID();
131 // NOLINTEND
132
133public:
134 // constructor thunks
135 // NOLINTBEGIN
136 MCAPI void* $ctor(::std::string const& name, int id);
137 // NOLINTEND
138
139public:
140 // virtual function thunks
141 // NOLINTBEGIN
142 MCAPI ::ItemStack& $use(::ItemStack& instance, ::Player& player) const;
143
144 MCFOLD bool $requiresInteract() const;
145
146 MCAPI ::std::string $getInteractText(::Player const& player) const;
147
148 MCAPI ::std::string $buildDescriptionId(::ItemDescriptor const& item, ::CompoundTag const* userData) const;
149
150 MCAPI void $appendFormattedHovertext(
151 ::ItemStackBase const& stack,
152 ::Level& level,
154 bool const showCategory
155 ) const;
156
157 MCAPI ::Bedrock::Safety::RedactableString $getRedactedCustomName(::ItemStackBase const& stack) const;
158
159 MCAPI bool $hasCustomHoverName(::ItemStackBase const& stack) const;
160
161 MCAPI bool $inventoryTick(::ItemStack& level, ::Level& owner, ::Actor&, int, bool) const;
162
163 MCFOLD bool $isGlint(::ItemStackBase const& stack) const;
164
165
166 // NOLINTEND
167
168public:
169 // vftables
170 // NOLINTBEGIN
171 MCAPI static void** $vftable();
172 // NOLINTEND
173};
Definition Actor.h:125
Definition RedactableString.h:10
Definition CompoundTag.h:23
Definition ItemDescriptor.h:25
Definition ItemStackBase.h:52
Definition ItemStack.h:35
Definition Level.h:255
Definition Player.h:137
Definition ActorUniqueID.h:10
Definition PageContent.h:10