Skip to content
LeviMC
English
AutoLightDark
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 MCNAPI static ::std::string const& getAuthor(::ItemStackBase const& book);
61
62#ifdef LL_PLAT_C
63 MCNAPI static ::std::optional<::std::string> getFilteredAuthor(::ItemStack const& book);
64
65 MCNAPI static ::std::optional<::std::string> getFilteredTitle(::ItemStack const& book);
66#endif
67
68 MCNAPI static ::PageContent getPage(::ItemStackBase const& book, int index);
69
70 MCNAPI static int getPageCount(::ItemStackBase const& book);
71
72#ifdef LL_PLAT_C
73 MCNAPI static ::std::vector<int> getPageCountByType(::ItemStack const& book);
74#endif
75
76 MCNAPI static ::std::vector<::PageContent> getPages(::ItemStackBase const& book);
77
78 MCNAPI static ::std::string const& getTitle(::ItemStackBase const& book);
79 // NOLINTEND
80
81public:
82 // static variables
83 // NOLINTBEGIN
84 MCNAPI static ::std::string_view const& TAG_AUTHOR();
85
86 MCNAPI static ::std::string_view const& TAG_FILTERED_AUTHOR();
87
88 MCNAPI static ::std::string_view const& TAG_FILTERED_TITLE();
89
90 MCNAPI static ::std::string_view const& TAG_GENERATION();
91
92 MCNAPI static ::std::string_view const& TAG_PAGES();
93
94 MCNAPI static ::std::string_view const& TAG_PAGE_FILTERED_PHOTO_NAME();
95
96 MCNAPI static ::std::string_view const& TAG_PAGE_FILTERED_TEXT();
97
98 MCNAPI static ::std::string_view const& TAG_PAGE_PHOTO_NAME();
99
100 MCNAPI static ::std::string_view const& TAG_PAGE_TEXT();
101
102 MCNAPI static ::std::string_view const& TAG_TITLE();
103
104#ifdef LL_PLAT_C
105 MCNAPI static ::std::string_view const& TAG_XUID();
106#endif
107 // NOLINTEND
108
109public:
110 // virtual function thunks
111 // NOLINTBEGIN
112 MCNAPI ::ItemStack& $use(::ItemStack& instance, ::Player& player, ::HandSlot handSlot) const;
113
114 MCNAPI bool $requiresInteract() const;
115
116 MCNAPI ::std::string $getInteractText(::Player const& player) const;
117
118 MCNAPI ::std::string $buildDescriptionId(::ItemDescriptor const& item, ::CompoundTag const* userData) const;
119
121 ::ItemStackBase const& stack,
122 ::Level& level,
124 bool const showCategory
125 ) const;
126
127 MCNAPI ::Bedrock::Safety::RedactableString $getRedactedCustomName(::ItemStackBase const& stack) const;
128
129 MCNAPI bool $hasCustomHoverName(::ItemStackBase const& stack) const;
130
131 MCNAPI bool $inventoryTick(::ItemStack&, ::Level& level, ::Actor& owner, int, bool) const;
132
133 MCNAPI bool $isGlint(::ItemStackBase const& stack) const;
134
135
136 // NOLINTEND
137};
Definition Actor.h:116
Definition RedactableString.h:10
Definition CompoundTag.h:18
Definition ItemDescriptor.h:24
Definition ItemStackBase.h:45
Definition ItemStack.h:26
Definition Level.h:255
Definition Player.h:131
Definition WrittenBookItem.h:22
static MCAPI ::std::string_view const & TAG_PAGE_TEXT()
static MCAPI ::std::string_view const & TAG_AUTHOR()
static MCAPI ::std::string const & getTitle(::ItemStackBase const &book)
static MCAPI ::PageContent getPage(::ItemStackBase const &book, int index)
static MCAPI ::std::string_view const & TAG_PAGES()
static MCAPI ::std::string_view const & TAG_PAGE_FILTERED_TEXT()
static MCAPI ::std::string_view const & TAG_GENERATION()
static MCAPI ::std::string_view const & TAG_PAGE_PHOTO_NAME()
MCAPI bool $requiresInteract() const
static MCAPI ::std::string_view const & TAG_FILTERED_AUTHOR()
static MCAPI ::std::string const & getAuthor(::ItemStackBase const &book)
MCAPI::ItemStack & $use(::ItemStack &instance, ::Player &player, ::HandSlot handSlot) const
MCAPI void $appendFormattedHovertext(::ItemStackBase const &stack, ::Level &level, ::Bedrock::Safety::RedactableString &hovertext, bool const showCategory) const
MCAPI::Bedrock::Safety::RedactableString $getRedactedCustomName(::ItemStackBase const &stack) const
static MCAPI int getPageCount(::ItemStackBase const &book)
static MCAPI ::std::string_view const & TAG_TITLE()
static MCAPI ::std::vector<::PageContent > getPages(::ItemStackBase const &book)
MCAPI bool $hasCustomHoverName(::ItemStackBase const &stack) const
MCAPI bool $inventoryTick(::ItemStack &, ::Level &level, ::Actor &owner, int, bool) const
MCAPI bool $isGlint(::ItemStackBase const &stack) const
MCAPI::std::string $buildDescriptionId(::ItemDescriptor const &item, ::CompoundTag const *userData) const
MCAPI::std::string $getInteractText(::Player const &player) const
static MCAPI ::std::string_view const & TAG_PAGE_FILTERED_PHOTO_NAME()
static MCAPI ::std::string_view const & TAG_FILTERED_TITLE()
Definition PageContent.h:10