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