LeviLamina
Loading...
Searching...
No Matches
ChiseledBookshelfBlockActor.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/level/block/actor/BlockActor.h"
8
9// auto generated forward declare list
10// clang-format off
11class Actor;
13class BlockPos;
14class BlockSource;
15class CompoundTag;
16class DataLoadHelper;
17class ILevel;
18class ItemStack;
19class SaveContext;
20// clang-format on
21
22class ChiseledBookshelfBlockActor : public ::BlockActor, public ::Container {
23public:
24 // member variables
25 // NOLINTBEGIN
26 ::ll::TypedStorage<8, 24, ::std::vector<::ItemStack>> mItems;
27 ::ll::TypedStorage<4, 4, uint> mLastInteractedSlot;
28 // NOLINTEND
29
30public:
31 // prevent constructor by default
32 ChiseledBookshelfBlockActor();
33
34public:
35 // virtual functions
36 // NOLINTBEGIN
37 virtual ::ItemStack const& getItem(int index) const /*override*/;
38
39 virtual void setItem(int modelSlot, ::ItemStack const& item) /*override*/;
40
41 virtual ::std::string getName() const /*override*/;
42
43 virtual int getMaxStackSize() const /*override*/;
44
45 virtual int getContainerSize() const /*override*/;
46
47 virtual void startOpen(::Actor&) /*override*/;
48
49 virtual void stopOpen(::Actor& actor) /*override*/;
50
51 virtual ::Container* getContainer() /*override*/;
52
53 virtual ::Container const* getContainer() const /*override*/;
54
55 virtual void serverInitItemStackIds(
56 int containerSlot,
57 int count,
58 ::std::function<void(int, ::ItemStack const&)> onNetIdChanged
59 ) /*override*/;
60
61 virtual bool isEmpty() const /*override*/;
62
63 virtual bool canPushInItem(int slot, int, ::ItemStack const& item) const /*override*/;
64
65 virtual bool canPullOutItem(int slot, int, ::ItemStack const&) const /*override*/;
66
67 virtual bool addItemToFirstEmptySlot(::ItemStack const& item) /*override*/;
68
69 virtual void onChanged(::BlockSource& region) /*override*/;
70
71 virtual void load(::ILevel& level, ::CompoundTag const& tag, ::DataLoadHelper& dataLoadHelper) /*override*/;
72
73 virtual bool save(::CompoundTag& tag, ::SaveContext const& saveContext) const /*override*/;
74
75 virtual ::std::unique_ptr<::BlockActorDataPacket> _getUpdatePacket(::BlockSource&) /*override*/;
76
77 virtual void _onUpdatePacket(::CompoundTag const& data, ::BlockSource& region) /*override*/;
78
79 virtual ~ChiseledBookshelfBlockActor() /*override*/ = default;
80 // NOLINTEND
81
82public:
83 // member functions
84 // NOLINTBEGIN
85 MCAPI explicit ChiseledBookshelfBlockActor(::BlockPos const& pos);
86
87 MCAPI void _loadItems(::CompoundTag const& base, ::ILevel& level);
88
89 MCAPI void _setItemInternal(int slot, ::ItemStack const& item, bool isLoading);
90
91 MCAPI ::ItemStack retrieveBook(int slot);
92 // NOLINTEND
93
94public:
95 // static functions
96 // NOLINTBEGIN
97 MCAPI static bool allowedItem(::ItemStack const& item);
98 // NOLINTEND
99
100public:
101 // constructor thunks
102 // NOLINTBEGIN
103 MCAPI void* $ctor(::BlockPos const& pos);
104 // NOLINTEND
105
106public:
107 // virtual function thunks
108 // NOLINTBEGIN
109 MCAPI ::ItemStack const& $getItem(int index) const;
110
111 MCAPI void $setItem(int modelSlot, ::ItemStack const& item);
112
113 MCAPI ::std::string $getName() const;
114
115 MCFOLD int $getMaxStackSize() const;
116
117 MCFOLD int $getContainerSize() const;
118
119 MCFOLD void $startOpen(::Actor&);
120
121 MCFOLD void $stopOpen(::Actor& actor);
122
123 MCFOLD ::Container* $getContainer();
124
125 MCFOLD ::Container const* $getContainer() const;
126
127 MCAPI void $serverInitItemStackIds(
128 int containerSlot,
129 int count,
130 ::std::function<void(int, ::ItemStack const&)> onNetIdChanged
131 );
132
133 MCAPI bool $isEmpty() const;
134
135 MCAPI bool $canPushInItem(int slot, int, ::ItemStack const& item) const;
136
137 MCAPI bool $canPullOutItem(int slot, int, ::ItemStack const&) const;
138
139 MCAPI bool $addItemToFirstEmptySlot(::ItemStack const& item);
140
141 MCAPI void $onChanged(::BlockSource& region);
142
143 MCAPI void $load(::ILevel& level, ::CompoundTag const& tag, ::DataLoadHelper& dataLoadHelper);
144
145 MCAPI bool $save(::CompoundTag& tag, ::SaveContext const& saveContext) const;
146
147 MCFOLD ::std::unique_ptr<::BlockActorDataPacket> $_getUpdatePacket(::BlockSource&);
148
149 MCFOLD void $_onUpdatePacket(::CompoundTag const& data, ::BlockSource& region);
150
151
152 // NOLINTEND
153
154public:
155 // vftables
156 // NOLINTBEGIN
157 MCAPI static void** $vftableForContainer();
158
159 MCAPI static void** $vftableForBlockActor();
160 // NOLINTEND
161};
Definition Actor.h:105
Definition BlockActorDataPacket.h:19
Definition BlockPos.h:19
Definition BlockSource.h:68
Definition CompoundTag.h:23
Definition DataLoadHelper.h:20
Definition ILevel.h:214
Definition ItemStack.h:26
Definition SaveContext.h:5