LeviLamina
Loading...
Searching...
No Matches
LecternBlockActor.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/world/Container.h"
7#include "mc/world/item/ItemStack.h"
8#include "mc/world/level/block/actor/BlockActor.h"
9
10// auto generated forward declare list
11// clang-format off
12class Actor;
14class BlockPos;
15class BlockSource;
16class CompoundTag;
17class DataLoadHelper;
18class ILevel;
19class SaveContext;
20// clang-format on
21
22class LecternBlockActor : public ::BlockActor, public ::Container {
23public:
24 // member variables
25 // NOLINTBEGIN
26 ::ll::TypedStorage<4, 4, int> mPage;
27 ::ll::TypedStorage<4, 4, int> mTotalPages;
28 ::ll::TypedStorage<8, 152, ::ItemStack> mBook;
29 // NOLINTEND
30
31public:
32 // prevent constructor by default
33 LecternBlockActor();
34
35public:
36 // virtual functions
37 // NOLINTBEGIN
38 virtual ::ItemStack const& getItem(int) const /*override*/;
39
40 virtual void setItem(int item, ::ItemStack const&) /*override*/;
41
42 virtual int getMaxStackSize() const /*override*/;
43
44 virtual int getContainerSize() const /*override*/;
45
46 virtual void startOpen(::Actor&) /*override*/;
47
48 virtual void stopOpen(::Actor& actor) /*override*/;
49
50 virtual ::Container* getContainer() /*override*/;
51
52 virtual ::Container const* getContainer() const /*override*/;
53
54 virtual void load(::ILevel& level, ::CompoundTag const& base, ::DataLoadHelper& dataLoadHelper) /*override*/;
55
56 virtual bool save(::CompoundTag& tag, ::SaveContext const& saveContext) const /*override*/;
57
58 virtual void onChanged(::BlockSource& region) /*override*/;
59
60 virtual void serverInitItemStackIds(
61 int containerSlot,
62 int onNetIdChanged,
63 ::std::function<void(int, ::ItemStack const&)>
64 ) /*override*/;
65
66 virtual ::std::unique_ptr<::BlockActorDataPacket> _getUpdatePacket(::BlockSource&) /*override*/;
67
68 virtual void _onUpdatePacket(::CompoundTag const& data, ::BlockSource& region) /*override*/;
69 // NOLINTEND
70
71public:
72 // member functions
73 // NOLINTBEGIN
74 MCAPI explicit LecternBlockActor(::BlockPos const& pos);
75
76 MCAPI void dropBook(::BlockSource& region);
77
78 MCFOLD int getPage() const;
79
80 MCFOLD int getTotalPages() const;
81
82 MCAPI bool hasBook() const;
83
84 MCAPI bool isPageInBounds(int page) const;
85
86 MCAPI void setItemFromBlock(int slot, ::ItemStack const& item);
87
88 MCAPI void setPageOnServer(int page, ::BlockSource& region);
89 // NOLINTEND
90
91public:
92 // constructor thunks
93 // NOLINTBEGIN
94 MCAPI void* $ctor(::BlockPos const& pos);
95 // NOLINTEND
96
97public:
98 // virtual function thunks
99 // NOLINTBEGIN
100 MCFOLD ::ItemStack const& $getItem(int) const;
101
102 MCAPI void $setItem(int item, ::ItemStack const&);
103
104 MCFOLD int $getMaxStackSize() const;
105
106 MCFOLD int $getContainerSize() const;
107
108 MCFOLD void $startOpen(::Actor&);
109
110 MCFOLD void $stopOpen(::Actor& actor);
111
112 MCFOLD ::Container* $getContainer();
113
114 MCFOLD ::Container const* $getContainer() const;
115
116 MCAPI void $load(::ILevel& level, ::CompoundTag const& base, ::DataLoadHelper& dataLoadHelper);
117
118 MCAPI bool $save(::CompoundTag& tag, ::SaveContext const& saveContext) const;
119
120 MCAPI void $onChanged(::BlockSource& region);
121
122 MCAPI void
123 $serverInitItemStackIds(int containerSlot, int onNetIdChanged, ::std::function<void(int, ::ItemStack const&)>);
124
125 MCFOLD ::std::unique_ptr<::BlockActorDataPacket> $_getUpdatePacket(::BlockSource&);
126
127 MCFOLD void $_onUpdatePacket(::CompoundTag const& data, ::BlockSource& region);
128
129
130 // NOLINTEND
131
132public:
133 // vftables
134 // NOLINTBEGIN
135 MCAPI static void** $vftableForBlockActor();
136
137 MCAPI static void** $vftableForContainer();
138 // NOLINTEND
139};
Definition Actor.h:125
Definition BlockActorDataPacket.h:19
Definition BlockPos.h:21
Definition BlockSource.h:73
Definition CompoundTag.h:23
Definition DataLoadHelper.h:20
Definition ILevel.h:219
Definition ItemStack.h:35
Definition SaveContext.h:5