LeviLamina
Loading...
Searching...
No Matches
SmithingTableContainerManagerController.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/containers/managers/controllers/SmithingTableTemplateType.h"
10#include "mc/world/inventory/network/TypedServerNetId.h"
11
12// auto generated forward declare list
13// clang-format off
14class ItemInstance;
15class ItemStackBase;
17struct AutoPlaceItem;
18struct AutoPlaceResult;
22struct RecipeNetIdTag;
23// clang-format on
24
25class SmithingTableContainerManagerController : public ::ContainerManagerController {
26public:
27 // member variables
28 // NOLINTBEGIN
29 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::SmithingTableContainerManagerModel>>
30 mSmithingTableContainerManagerModel;
31 ::ll::TypedStorage<8, 40, ::SlotData const> mCreatedItemOutputSlot;
32 ::ll::TypedStorage<8, 136, ::ItemResultPreview> mResultPreview;
33 // NOLINTEND
34
35#ifdef LL_PLAT_S
36#else // LL_PLAT_C
37public:
38 // prevent constructor by default
39 SmithingTableContainerManagerController();
40
41#endif
42public:
43 // virtual functions
44 // NOLINTBEGIN
45#ifdef LL_PLAT_S
46 virtual ~SmithingTableContainerManagerController() /*override*/ = default;
47#else // LL_PLAT_C
48 virtual ~SmithingTableContainerManagerController() /*override*/;
49#endif
50
51#ifdef LL_PLAT_S
52 virtual bool isOutputSlot(::std::string const&) const /*override*/;
53#else // LL_PLAT_C
54 virtual bool isOutputSlot(::std::string const& collectionName) const /*override*/;
55#endif
56
57#ifdef LL_PLAT_S
58 virtual ::ItemStackBase const& getTakeableItemStackBase(::SlotData const&) const /*override*/;
59#else // LL_PLAT_C
60 virtual ::ItemStackBase const& getTakeableItemStackBase(::SlotData const& slot) const /*override*/;
61#endif
62
63#ifdef LL_PLAT_S
64 virtual void handleTakeAmount(::SlotData const&, int, ::SlotData const&) /*override*/;
65#else // LL_PLAT_C
66 virtual void handleTakeAmount(::SlotData const& dstSlot, int amount, ::SlotData const& srcSlot) /*override*/;
67#endif
68
69#ifdef LL_PLAT_S
70 virtual void handleTakeAll(::SlotData const&, ::SlotData const&) /*override*/;
71#else // LL_PLAT_C
72 virtual void handleTakeAll(::SlotData const& dstSlot, ::SlotData const& srcSlot) /*override*/;
73#endif
74
75#ifdef LL_PLAT_S
76 virtual void handleTakeHalf(::SlotData const&, ::SlotData const&) /*override*/;
77#else // LL_PLAT_C
78 virtual void handleTakeHalf(::SlotData const& dstSlot, ::SlotData const& srcSlot) /*override*/;
79#endif
80
81#ifdef LL_PLAT_S
82 virtual int handleAutoPlace(
83 ::SlotData const&,
84 int,
85 ::std::vector<::AutoPlaceItem> const&,
86 ::std::vector<::AutoPlaceResult>&
87 ) /*override*/;
88#else // LL_PLAT_C
89 virtual int handleAutoPlace(
90 ::SlotData const& srcSlot,
91 int amount,
92 ::std::vector<::AutoPlaceItem> const& autoPlaceOrder,
93 ::std::vector<::AutoPlaceResult>& destinations
94 ) /*override*/;
95#endif
96
97#ifdef LL_PLAT_S
98 virtual void _onItemAcquired(::ItemInstance const&, ::SlotData const&) /*override*/;
99#else // LL_PLAT_C
100 virtual void _onItemAcquired(::ItemInstance const& stack, ::SlotData const& srcSlot) /*override*/;
101#endif
102
103#ifdef LL_PLAT_S
104 virtual ::CreateContainerItemScope
105 _makeCreateItemScope(::SlotData const&, ::ItemTransferAmount const&) /*override*/;
106#else // LL_PLAT_C
107 virtual ::CreateContainerItemScope
108 _makeCreateItemScope(::SlotData const& srcSlot, ::ItemTransferAmount const&) /*override*/;
109#endif
110
111 // NOLINTEND
112
113public:
114 // member functions
115 // NOLINTBEGIN
116#ifdef LL_PLAT_C
117 MCNAPI explicit SmithingTableContainerManagerController(
118 ::std::weak_ptr<::SmithingTableContainerManagerModel> containerManagerModel
119 );
120
121 MCNAPI void _consumeItems();
122
123 MCNAPI void _createCraftItem(::ItemInstance& stack, ::ItemStackRequestScope const& requestScope);
124
125 MCNAPI ::std::pair<::ItemInstance, ::RecipeNetId> _getResult();
126
127 MCNAPI bool _handleTransferCraft(::SlotData const& srcSlot, ::SlotData const& dstSlot);
128
129 MCNAPI void _setupCallbacks();
130
131 MCNAPI void _updateResultPreview();
132
133 MCNAPI bool getHasInputItem() const;
134
135 MCNAPI bool getHasMaterialItem() const;
136
137 MCNAPI bool getHasTemplateItem() const;
138
139 MCNAPI ::SmithingTableTemplateType getSmithingTableTemplateType() const;
140
141 MCNAPI bool shouldCrossOutIconBeVisible();
142#endif
143 // NOLINTEND
144
145public:
146 // constructor thunks
147 // NOLINTBEGIN
148#ifdef LL_PLAT_C
149 MCNAPI void* $ctor(::std::weak_ptr<::SmithingTableContainerManagerModel> containerManagerModel);
150#endif
151 // NOLINTEND
152
153public:
154 // destructor thunk
155 // NOLINTBEGIN
156 MCNAPI void $dtor();
157 // NOLINTEND
158
159public:
160 // virtual function thunks
161 // NOLINTBEGIN
162#ifdef LL_PLAT_C
163 MCNAPI bool $isOutputSlot(::std::string const& collectionName) const;
164
165 MCNAPI ::ItemStackBase const& $getTakeableItemStackBase(::SlotData const& slot) const;
166
167 MCNAPI void $handleTakeAmount(::SlotData const& dstSlot, int amount, ::SlotData const& srcSlot);
168
169 MCNAPI void $handleTakeAll(::SlotData const& dstSlot, ::SlotData const& srcSlot);
170
171 MCNAPI void $handleTakeHalf(::SlotData const& dstSlot, ::SlotData const& srcSlot);
172
173 MCNAPI int $handleAutoPlace(
174 ::SlotData const& srcSlot,
175 int amount,
176 ::std::vector<::AutoPlaceItem> const& autoPlaceOrder,
177 ::std::vector<::AutoPlaceResult>& destinations
178 );
179
180 MCNAPI void $_onItemAcquired(::ItemInstance const& stack, ::SlotData const& srcSlot);
181
182 MCNAPI ::CreateContainerItemScope $_makeCreateItemScope(::SlotData const& srcSlot, ::ItemTransferAmount const&);
183#endif
184
185
186 // NOLINTEND
187
188public:
189 // vftables
190 // NOLINTBEGIN
191 MCNAPI static void** $vftable();
192 // NOLINTEND
193};
Definition ItemInstance.h:15
Definition ItemStackBase.h:52
Definition SmithingTableContainerManagerModel.h:20
Definition AutoPlaceItem.h:5
Definition AutoPlaceResult.h:5
Definition CreateContainerItemScope.h:18
Definition ItemStackRequestScope.h:16
Definition ItemTransferAmount.h:9
Definition RecipeNetIdTag.h:5
Definition SlotData.h:10