Skip to content
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/HandSlot.h"
7#include "mc/world/item/Item.h"
8
9// auto generated forward declare list
10// clang-format off
11class Actor;
12class CompoundTag;
13class ItemDescriptor;
14class ItemStack;
15class ItemStackBase;
16class Level;
17class Player;
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 // virtual functions
31 // NOLINTBEGIN
32 virtual ::ItemStack& use(::ItemStack& instance, ::Player& player, ::HandSlot handSlot) const /*override*/;
33
34 virtual bool requiresInteract() const /*override*/;
35
36 virtual ::std::string getInteractText(::Player const& player) const /*override*/;
37
38 virtual ::std::string buildDescriptionId(::ItemDescriptor const& item, ::CompoundTag const* userData) const
39 /*override*/;
40
41 virtual void appendFormattedHovertext(
42 ::ItemStackBase const& stack,
43 ::Level& level,
45 bool const showCategory
46 ) const /*override*/;
47
48 virtual ::Bedrock::Safety::RedactableString getRedactedCustomName(::ItemStackBase const& stack) const /*override*/;
49
50 virtual bool hasCustomHoverName(::ItemStackBase const& stack) const /*override*/;
51
52 virtual bool inventoryTick(::ItemStack&, ::Level& level, ::Actor& owner, int, bool) const /*override*/;
53
54 virtual bool isGlint(::ItemStackBase const& stack) const /*override*/;
55 // NOLINTEND
56
57public:
58 // static functions
59 // NOLINTBEGIN
60 MCAPI static ::std::string const& getAuthor(::ItemStackBase const& book);
61
62#ifdef LL_PLAT_C
63 MCAPI static ::std::optional<::std::string> getFilteredAuthor(::ItemStack const& book);
64
65 MCAPI static ::std::optional<::std::string> getFilteredTitle(::ItemStack const& book);
66#endif
67
68 MCAPI static ::PageContent getPage(::ItemStackBase const& book, int index);
69
70 MCAPI static int getPageCount(::ItemStackBase const& book);
71
72#ifdef LL_PLAT_C
73 MCAPI static ::std::vector<int> getPageCountByType(::ItemStack const& book);
74#endif
75
76 MCAPI static ::std::vector<::PageContent> getPages(::ItemStackBase const& book);
77
78 MCAPI static ::std::string const& getTitle(::ItemStackBase const& book);
79
80#ifdef LL_PLAT_C
81 MCAPI static ::std::string const& getXUID(::ItemStackBase const& book);
82#endif
83 // NOLINTEND
84
85public:
86 // static variables
87 // NOLINTBEGIN
88 MCAPI static ::std::string_view const& TAG_AUTHOR();
89
90 MCAPI static ::std::string_view const& TAG_FILTERED_AUTHOR();
91
92 MCAPI static ::std::string_view const& TAG_FILTERED_TITLE();
93
94 MCAPI static ::std::string_view const& TAG_GENERATION();
95
96 MCAPI static ::std::string_view const& TAG_PAGES();
97
98 MCAPI static ::std::string_view const& TAG_PAGE_FILTERED_PHOTO_NAME();
99
100 MCAPI static ::std::string_view const& TAG_PAGE_FILTERED_TEXT();
101
102 MCAPI static ::std::string_view const& TAG_PAGE_PHOTO_NAME();
103
104 MCAPI static ::std::string_view const& TAG_PAGE_TEXT();
105
106 MCAPI static ::std::string_view const& TAG_TITLE();
107
108#ifdef LL_PLAT_C
109 MCAPI static ::std::string_view const& TAG_XUID();
110#endif
111 // NOLINTEND
112
113public:
114 // virtual function thunks
115 // NOLINTBEGIN
116 MCAPI ::ItemStack& $use(::ItemStack& instance, ::Player& player, ::HandSlot handSlot) const;
117
118 MCFOLD bool $requiresInteract() const;
119
120 MCAPI ::std::string $getInteractText(::Player const& player) const;
121
122 MCAPI ::std::string $buildDescriptionId(::ItemDescriptor const& item, ::CompoundTag const* userData) const;
123
124 MCAPI void $appendFormattedHovertext(
125 ::ItemStackBase const& stack,
126 ::Level& level,
128 bool const showCategory
129 ) const;
130
131 MCAPI ::Bedrock::Safety::RedactableString $getRedactedCustomName(::ItemStackBase const& stack) const;
132
133 MCAPI bool $hasCustomHoverName(::ItemStackBase const& stack) const;
134
135 MCAPI bool $inventoryTick(::ItemStack&, ::Level& level, ::Actor& owner, int, bool) const;
136
137 MCFOLD bool $isGlint(::ItemStackBase const& stack) const;
138
139
140 // NOLINTEND
141};
Definition Actor.h:113
Definition RedactableString.h:10
Definition CompoundTag.h:18
Definition ItemDescriptor.h:25
Definition ItemStackBase.h:44
Definition ItemStack.h:26
Definition Level.h:254
Definition Player.h:129
Definition WrittenBookItem.h:22
Definition PageContent.h:10