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