LeviLamina
Loading...
Searching...
No Matches
StonecutterContainerManagerController.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/world/containers/SlotData.h"
7#include "mc/world/containers/managers/controllers/ContainerManagerController.h"
8#include "mc/world/containers/managers/controllers/ItemResultPreview.h"
9#include "mc/world/inventory/network/TypedServerNetId.h"
10#include "mc/world/inventory/simulation/ContainerScreenRequestActionType.h"
11
12// auto generated forward declare list
13// clang-format off
14class ItemInstance;
15class ItemStackBase;
17struct AutoPlaceItem;
18struct AutoPlaceResult;
23struct RecipeNetIdTag;
24struct SelectedSlotInfo;
25// clang-format on
26
27class StonecutterContainerManagerController : public ::ContainerManagerController {
28public:
29 // member variables
30 // NOLINTBEGIN
31 ::ll::TypedStorage<4, 4, int> mSelectedStoneIndex;
32 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::StonecutterContainerManagerModel>> mStonecutterContainerManagerModel;
33 ::ll::TypedStorage<8, 40, ::SlotData const> mCreatedItemOutputSlot;
34 ::ll::TypedStorage<8, 136, ::ItemResultPreview> mResultPreview;
35 // NOLINTEND
36
37#ifdef LL_PLAT_S
38#else // LL_PLAT_C
39public:
40 // prevent constructor by default
41 StonecutterContainerManagerController();
42
43#endif
44public:
45 // virtual functions
46 // NOLINTBEGIN
47#ifdef LL_PLAT_S
48 virtual ~StonecutterContainerManagerController() /*override*/ = default;
49#else // LL_PLAT_C
50 virtual ~StonecutterContainerManagerController() /*override*/;
51#endif
52
53#ifdef LL_PLAT_S
54 virtual void postInit(::std::weak_ptr<::ContainerManagerController>) /*override*/;
55#else // LL_PLAT_C
56 virtual void postInit(::std::weak_ptr<::ContainerManagerController> self) /*override*/;
57#endif
58
59#ifdef LL_PLAT_S
60 virtual bool isOutputSlot(::std::string const&) const /*override*/;
61#else // LL_PLAT_C
62 virtual bool isOutputSlot(::std::string const& collectionName) const /*override*/;
63#endif
64
65#ifdef LL_PLAT_S
66 virtual void handleTakeAmount(::SlotData const&, int, ::SlotData const&) /*override*/;
67#else // LL_PLAT_C
68 virtual void handleTakeAmount(::SlotData const& dstSlot, int amount, ::SlotData const& srcSlot) /*override*/;
69#endif
70
71#ifdef LL_PLAT_S
72 virtual void handleTakeAll(::SlotData const&, ::SlotData const&) /*override*/;
73#else // LL_PLAT_C
74 virtual void handleTakeAll(::SlotData const& dstSlot, ::SlotData const& srcSlot) /*override*/;
75#endif
76
77#ifdef LL_PLAT_S
78 virtual void handlePlaceAll(::SelectedSlotInfo const&, ::SlotData const&) /*override*/;
79#else // LL_PLAT_C
80 virtual void handlePlaceAll(::SelectedSlotInfo const& selected, ::SlotData const& dstSlot) /*override*/;
81#endif
82
83#ifdef LL_PLAT_S
84 virtual void handleTakeHalf(::SlotData const&, ::SlotData const&) /*override*/;
85#else // LL_PLAT_C
86 virtual void handleTakeHalf(::SlotData const& dstSlot, ::SlotData const& srcSlot) /*override*/;
87#endif
88
89#ifdef LL_PLAT_S
90 virtual void handlePlaceOne(::SlotData const&, ::SlotData const&) /*override*/;
91#else // LL_PLAT_C
92 virtual void handlePlaceOne(::SlotData const& srcSlot, ::SlotData const& dstSlot) /*override*/;
93#endif
94
95#ifdef LL_PLAT_S
96 virtual int handleAutoPlace(
97 ::SlotData const&,
98 int,
99 ::std::vector<::AutoPlaceItem> const&,
100 ::std::vector<::AutoPlaceResult>&
101 ) /*override*/;
102#else // LL_PLAT_C
103 virtual int handleAutoPlace(
104 ::SlotData const& srcSlot,
105 int amount,
106 ::std::vector<::AutoPlaceItem> const& autoPlaceOrder,
107 ::std::vector<::AutoPlaceResult>& destinations
108 ) /*override*/;
109#endif
110
111#ifdef LL_PLAT_S
112 virtual ::ItemStackBase const& getTakeableItemStackBase(::SlotData const&) const /*override*/;
113#else // LL_PLAT_C
114 virtual ::ItemStackBase const& getTakeableItemStackBase(::SlotData const& slot) const /*override*/;
115#endif
116
117#ifdef LL_PLAT_S
118 virtual void _onContainerScreenAction(::ContainerScreenActionResult const&) /*override*/;
119#else // LL_PLAT_C
120 virtual void _onContainerScreenAction(::ContainerScreenActionResult const& result) /*override*/;
121#endif
122
123#ifdef LL_PLAT_S
124 virtual ::CreateContainerItemScope
125 _makeCreateItemScope(::SlotData const&, ::ItemTransferAmount const&) /*override*/;
126#else // LL_PLAT_C
127 virtual ::CreateContainerItemScope
128 _makeCreateItemScope(::SlotData const& srcSlot, ::ItemTransferAmount const& takeAmount) /*override*/;
129#endif
130
131#ifdef LL_PLAT_S
132 virtual void _onItemAcquired(::ItemInstance const&, ::SlotData const&) /*override*/;
133#else // LL_PLAT_C
134 virtual void _onItemAcquired(::ItemInstance const& instance, ::SlotData const& srcSlot) /*override*/;
135#endif
136
137#ifdef LL_PLAT_S
138 virtual void _updateItemStackRequest(
139 ::ContainerScreenRequestActionType,
142 ) /*override*/;
143#else // LL_PLAT_C
144 virtual void _updateItemStackRequest(
145 ::ContainerScreenRequestActionType result,
146 ::ContainerScreenActionResult const& requestScope,
148 ) /*override*/;
149#endif
150
151 // NOLINTEND
152
153public:
154 // member functions
155 // NOLINTBEGIN
156#ifdef LL_PLAT_C
157 MCNAPI explicit StonecutterContainerManagerController(
158 ::std::weak_ptr<::StonecutterContainerManagerModel> containerManagerModel
159 );
160
161 MCNAPI ::std::pair<::ItemInstance, ::RecipeNetId> _buildResultItem();
162
163 MCNAPI bool
164 _createCraftItem(::ItemInstance& instance, ::ItemStackRequestScope const& requestScope, uchar craftCount);
165
166 MCNAPI bool _handleTransferCraft(::SlotData const& srcSlot, ::SlotData const& dstSlot);
167
168 MCNAPI void _setupCallbacks();
169
170 MCNAPI void _updateResultItem();
171
172 MCNAPI int getItemIdAuxForStonePattern(int collectionIndex) const;
173
174 MCNAPI ::ItemInstance getItemInstanceForStonePattern(int collectionIndex) const;
175
176 MCNAPI int getNumberOfStonePatterns() const;
177
178 MCNAPI int getStackCountForStonePattern(int collectionIndex) const;
179
180 MCNAPI bool hasInputItem() const;
181
182 MCNAPI bool isSelectedStonePattern(int collectionIndex) const;
183
184 MCNAPI void setSelectedStone(int collectionIndex);
185#endif
186 // NOLINTEND
187
188public:
189 // constructor thunks
190 // NOLINTBEGIN
191#ifdef LL_PLAT_C
192 MCNAPI void* $ctor(::std::weak_ptr<::StonecutterContainerManagerModel> containerManagerModel);
193#endif
194 // NOLINTEND
195
196public:
197 // destructor thunk
198 // NOLINTBEGIN
199 MCNAPI void $dtor();
200 // NOLINTEND
201
202public:
203 // virtual function thunks
204 // NOLINTBEGIN
205#ifdef LL_PLAT_C
206 MCNAPI void $postInit(::std::weak_ptr<::ContainerManagerController> self);
207
208 MCNAPI bool $isOutputSlot(::std::string const& collectionName) const;
209
210 MCNAPI void $handleTakeAmount(::SlotData const& dstSlot, int amount, ::SlotData const& srcSlot);
211
212 MCNAPI void $handleTakeAll(::SlotData const& dstSlot, ::SlotData const& srcSlot);
213
214 MCNAPI void $handlePlaceAll(::SelectedSlotInfo const& selected, ::SlotData const& dstSlot);
215
216 MCNAPI void $handleTakeHalf(::SlotData const& dstSlot, ::SlotData const& srcSlot);
217
218 MCNAPI void $handlePlaceOne(::SlotData const& srcSlot, ::SlotData const& dstSlot);
219
220 MCNAPI int $handleAutoPlace(
221 ::SlotData const& srcSlot,
222 int amount,
223 ::std::vector<::AutoPlaceItem> const& autoPlaceOrder,
224 ::std::vector<::AutoPlaceResult>& destinations
225 );
226
227 MCNAPI ::ItemStackBase const& $getTakeableItemStackBase(::SlotData const& slot) const;
228
229 MCNAPI void $_onContainerScreenAction(::ContainerScreenActionResult const& result);
230
231 MCNAPI ::CreateContainerItemScope
232 $_makeCreateItemScope(::SlotData const& srcSlot, ::ItemTransferAmount const& takeAmount);
233
234 MCNAPI void $_onItemAcquired(::ItemInstance const& instance, ::SlotData const& srcSlot);
235
236 MCNAPI void $_updateItemStackRequest(
237 ::ContainerScreenRequestActionType result,
238 ::ContainerScreenActionResult const& requestScope,
240 );
241#endif
242
243
244 // NOLINTEND
245
246public:
247 // vftables
248 // NOLINTBEGIN
249 MCNAPI static void** $vftable();
250 // NOLINTEND
251};
Definition ItemInstance.h:15
Definition ItemStackBase.h:52
Definition StonecutterContainerManagerModel.h:20
Definition AutoPlaceItem.h:5
Definition AutoPlaceResult.h:5
Definition ContainerScreenActionResult.h:14
Definition CreateContainerItemScope.h:18
Definition ItemStackRequestScope.h:16
Definition ItemTransferAmount.h:9
Definition RecipeNetIdTag.h:5
Definition SelectedSlotInfo.h:10
Definition SlotData.h:10