LeviLamina
Loading...
Searching...
No Matches
CompoundCreatorContainerManagerController.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 ItemStackBase;
16struct AutoPlaceItem;
17struct AutoPlaceResult;
20// clang-format on
21
22class CompoundCreatorContainerManagerController : public ::ContainerManagerController {
23public:
24 // member variables
25 // NOLINTBEGIN
26 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::CompoundCreatorContainerManagerModel>> mModel;
27 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::CraftableCompounds>> mCraftableCompounds;
28 ::ll::TypedStorage<8, 40, ::SlotData const> mCreatedItemOutputSlot;
29 ::ll::TypedStorage<8, 128, ::ItemInstance> mResultItemPreview;
30 // NOLINTEND
31
32#ifdef LL_PLAT_S
33#else // LL_PLAT_C
34public:
35 // prevent constructor by default
36 CompoundCreatorContainerManagerController();
37
38#endif
39public:
40 // virtual functions
41 // NOLINTBEGIN
42 virtual ~CompoundCreatorContainerManagerController() /*override*/ = default;
43
44 virtual ::ItemStackBase const& getTakeableItemStackBase(::SlotData const& slot) const /*override*/;
45
46 virtual void handleTakeAmount(::SlotData const& dstSlot, int amount, ::SlotData const& srcSlot) /*override*/;
47
48 virtual void handleTakeAll(::SlotData const& dstSlot, ::SlotData const& srcSlot) /*override*/;
49
50 virtual void handleTakeHalf(::SlotData const& dstSlot, ::SlotData const& srcSlot) /*override*/;
51
52 virtual int handleAutoPlace(
53 ::SlotData const& srcSlot,
54 int amount,
55 ::std::vector<::AutoPlaceItem> const& autoPlaceOrder,
56 ::std::vector<::AutoPlaceResult>& destinations
57 ) /*override*/;
58
59 virtual void
60 handleAddToStack(::SlotData const& dstSlot, ::SlotData const& srcSlot, ::ItemTakeType type) /*override*/;
61
62 virtual bool isOutputSlot(::std::string const& collectionName) const /*override*/;
63
64 virtual void _onItemAcquired(::ItemInstance const& stack, ::SlotData const& srcSlot) /*override*/;
65
66 virtual ::CreateContainerItemScope
67 _makeCreateItemScope(::SlotData const& srcSlot, ::ItemTransferAmount const& amount) /*override*/;
68 // NOLINTEND
69
70public:
71 // member functions
72 // NOLINTBEGIN
73#ifdef LL_PLAT_C
74 MCNAPI explicit CompoundCreatorContainerManagerController(
75 ::std::weak_ptr<::CompoundCreatorContainerManagerModel> containerManagerModel
76 );
77
78 MCNAPI bool _handleTransferCraft(::SlotData const& srcSlot, ::SlotData const& dstSlot, ::ItemTransferAmount amount);
79
80 MCNAPI void _setupCallbacks();
81
82 MCNAPI void _updateResultPreview();
83
84 MCNAPI ::std::string getOutputFormula();
85
86 MCNAPI bool isStillValid(float pickRange);
87#endif
88 // NOLINTEND
89
90public:
91 // constructor thunks
92 // NOLINTBEGIN
93#ifdef LL_PLAT_C
94 MCNAPI void* $ctor(::std::weak_ptr<::CompoundCreatorContainerManagerModel> containerManagerModel);
95#endif
96 // NOLINTEND
97
98public:
99 // virtual function thunks
100 // NOLINTBEGIN
101#ifdef LL_PLAT_C
102 MCNAPI ::ItemStackBase const& $getTakeableItemStackBase(::SlotData const& slot) const;
103
104 MCNAPI void $handleTakeAmount(::SlotData const& dstSlot, int amount, ::SlotData const& srcSlot);
105
106 MCNAPI void $handleTakeAll(::SlotData const& dstSlot, ::SlotData const& srcSlot);
107
108 MCNAPI void $handleTakeHalf(::SlotData const& dstSlot, ::SlotData const& srcSlot);
109
110 MCNAPI int $handleAutoPlace(
111 ::SlotData const& srcSlot,
112 int amount,
113 ::std::vector<::AutoPlaceItem> const& autoPlaceOrder,
114 ::std::vector<::AutoPlaceResult>& destinations
115 );
116
117 MCNAPI void $handleAddToStack(::SlotData const& dstSlot, ::SlotData const& srcSlot, ::ItemTakeType type);
118
119 MCNAPI bool $isOutputSlot(::std::string const& collectionName) const;
120
121 MCNAPI void $_onItemAcquired(::ItemInstance const& stack, ::SlotData const& srcSlot);
122
123 MCNAPI ::CreateContainerItemScope
124 $_makeCreateItemScope(::SlotData const& srcSlot, ::ItemTransferAmount const& amount);
125#endif
126
127
128 // NOLINTEND
129
130public:
131 // vftables
132 // NOLINTBEGIN
133 MCNAPI static void** $vftable();
134 // NOLINTEND
135};
Definition CompoundCreatorContainerManagerModel.h:17
Definition CraftableCompounds.h:17
Definition ItemInstance.h:15
Definition ItemStackBase.h:44
Definition AutoPlaceItem.h:5
Definition AutoPlaceResult.h:5
Definition CreateContainerItemScope.h:18
Definition ItemTransferAmount.h:5
Definition SlotData.h:5