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