LeviLamina
Loading...
Searching...
No Matches
MaterialReducerContainerManagerController.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
9// auto generated forward declare list
10// clang-format off
11class BlockReducer;
13class ItemInstance;
14class ItemStack;
15class ItemStackBase;
17struct AutoPlaceItem;
18struct AutoPlaceResult;
22// clang-format on
23
24class MaterialReducerContainerManagerController : public ::ContainerManagerController {
25public:
26 // MaterialReducerContainerManagerController inner types define
27 using ActionScope = ::gsl::final_action<::std::function<void()>>;
28
29public:
30 // member variables
31 // NOLINTBEGIN
32 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::MaterialReducerContainerManagerModel>> mModel;
33 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::CraftableCompounds>> mCraftableCompounds;
34 ::ll::TypedStorage<8, 8, ::BlockReducer*> mBlockReducer;
35 ::ll::TypedStorage<1, 1, bool> mObservingContainers;
36 ::ll::TypedStorage<8, 40, ::SlotData const> mCreatedItemOutputSlot;
37 // NOLINTEND
38
39#ifdef LL_PLAT_S
40#else // LL_PLAT_C
41public:
42 // prevent constructor by default
43 MaterialReducerContainerManagerController();
44
45#endif
46public:
47 // virtual functions
48 // NOLINTBEGIN
49#ifdef LL_PLAT_S
50 virtual ~MaterialReducerContainerManagerController() /*override*/ = default;
51#else // LL_PLAT_C
52 virtual ~MaterialReducerContainerManagerController() /*override*/;
53#endif
54
55#ifdef LL_PLAT_S
56 virtual bool isOutputSlot(::std::string const&) const /*override*/;
57#else // LL_PLAT_C
58 virtual bool isOutputSlot(::std::string const& collectionName) const /*override*/;
59#endif
60
61 virtual void closeContainers() /*override*/;
62
63#ifdef LL_PLAT_S
64 virtual void handlePlaceOne(::SlotData const&, ::SlotData const&) /*override*/;
65#else // LL_PLAT_C
66 virtual void handlePlaceOne(::SlotData const& srcSlot, ::SlotData const& dstSlot) /*override*/;
67#endif
68
69#ifdef LL_PLAT_S
70 virtual int handleAutoPlace(
71 ::SlotData const&,
72 int,
73 ::std::vector<::AutoPlaceItem> const&,
74 ::std::vector<::AutoPlaceResult>&
75 ) /*override*/;
76#else // LL_PLAT_C
77 virtual int handleAutoPlace(
78 ::SlotData const& srcSlot,
79 int amount,
80 ::std::vector<::AutoPlaceItem> const& autoPlaceOrder,
81 ::std::vector<::AutoPlaceResult>& destinations
82 ) /*override*/;
83#endif
84
85#ifdef LL_PLAT_S
86 virtual bool handleSwap(::SlotData const&, ::SlotData const&) /*override*/;
87#else // LL_PLAT_C
88 virtual bool handleSwap(::SlotData const& slotA, ::SlotData const& slotB) /*override*/;
89#endif
90
91 // NOLINTEND
92
93public:
94 // member functions
95 // NOLINTBEGIN
96#ifdef LL_PLAT_C
97 MCNAPI explicit MaterialReducerContainerManagerController(
98 ::std::weak_ptr<::MaterialReducerContainerManagerModel> containerManagerModel
99 );
100
101 MCNAPI void _consumeInputItem();
102
103 MCNAPI void _destroySlot(::SlotData const& slot, ::ItemTransferAmount amount);
104
105 MCNAPI void _fireReducerBlockEntered(::ItemStackBase const& input);
106
107 MCNAPI bool _hasAnyInput();
108
109 MCNAPI bool _hasAnyOutput();
110
111 MCNAPI ::CreateContainerItemScope _makeCreateOutputItemScope(
112 ::ItemStackRequestScope const& requestScope,
113 ::SlotData const& srcSlot,
114 ::ItemInstance const& instance
115 );
116
117 MCNAPI void _setupCallbacks();
118
119 MCNAPI void _updateResult(::ItemStack const& input);
120
121 MCNAPI bool canInputAddToCursor();
122
123 MCNAPI bool isRedemptionInProgress();
124
125 MCNAPI bool isStillValid(float pickRange);
126#endif
127 // NOLINTEND
128
129public:
130 // constructor thunks
131 // NOLINTBEGIN
132#ifdef LL_PLAT_C
133 MCNAPI void* $ctor(::std::weak_ptr<::MaterialReducerContainerManagerModel> containerManagerModel);
134#endif
135 // NOLINTEND
136
137public:
138 // destructor thunk
139 // NOLINTBEGIN
140 MCNAPI void $dtor();
141 // NOLINTEND
142
143public:
144 // virtual function thunks
145 // NOLINTBEGIN
146#ifdef LL_PLAT_C
147 MCNAPI bool $isOutputSlot(::std::string const& collectionName) const;
148
149 MCNAPI void $closeContainers();
150
151 MCNAPI void $handlePlaceOne(::SlotData const& srcSlot, ::SlotData const& dstSlot);
152
153 MCNAPI int $handleAutoPlace(
154 ::SlotData const& srcSlot,
155 int amount,
156 ::std::vector<::AutoPlaceItem> const& autoPlaceOrder,
157 ::std::vector<::AutoPlaceResult>& destinations
158 );
159
160 MCNAPI bool $handleSwap(::SlotData const& slotA, ::SlotData const& slotB);
161#endif
162
163
164 // NOLINTEND
165
166public:
167 // vftables
168 // NOLINTBEGIN
169 MCNAPI static void** $vftable();
170 // NOLINTEND
171};
Definition BlockReducer.h:12
Definition CraftableCompounds.h:17
Definition ItemInstance.h:15
Definition ItemStackBase.h:52
Definition ItemStack.h:35
Definition MaterialReducerContainerManagerModel.h:17
Definition AutoPlaceItem.h:5
Definition AutoPlaceResult.h:5
Definition CreateContainerItemScope.h:18
Definition ItemStackRequestScope.h:16
Definition ItemTransferAmount.h:9
Definition SlotData.h:10