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