Skip to content
LeviLamina

API Reference

On this page

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 MCAPI static void _addPageAt(::ItemStackBase& book, int index, ::PageContent const& page);
33
34 MCAPI static ::PageContent _deletePage(::ItemStackBase& book, int index);
35
36 MCAPI static void _replacePage(::ItemStackBase& book, int index, ::PageContent const& page);
37
38 MCAPI 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 MCAPI static void addPageAt(::ItemStack& book, int index, ::PageContent const& page);
48
49 MCAPI static void createUserDataIfEmpty(::ItemStackBase& book);
50
51 MCAPI static ::PageContent deletePage(::ItemStack& book, int index);
52
53 MCAPI static void replacePage(::ItemStack& book, int index, ::PageContent const& page);
54
55 MCAPI 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 MCAPI static void swapPages(::ItemStack& book, int page1, int page2);
65 // NOLINTEND
66
67public:
68 // virtual function thunks
69 // NOLINTBEGIN
70 MCAPI ::ItemStack& $use(::ItemStack& instance, ::Player& player, ::HandSlot handSlot) const;
71
72 MCFOLD bool $requiresInteract() const;
73
74 MCAPI ::std::string $getInteractText(::Player const& player) const;
75
76
77 // NOLINTEND
78};
Definition CompoundTag.h:18
Definition ItemStackBase.h:44
Definition ItemStack.h:26
Definition Player.h:129
Definition WritableBookItem.h:18
Definition PageContent.h:10