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 virtual ~GrindstoneContainerManagerController() /*override*/ = default;
45
46 virtual bool isOutputSlot(::std::string const& collectionName) const /*override*/;
47
48 virtual ::ItemStackBase const& getTakeableItemStackBase(::SlotData const& slot) const /*override*/;
49
50 virtual void handleTakeAmount(::SlotData const& dstSlot, int amount, ::SlotData const& srcSlot) /*override*/;
51
52 virtual void handleTakeAll(::SlotData const& dstSlot, ::SlotData const& srcSlot) /*override*/;
53
54 virtual void handleTakeHalf(::SlotData const& dstSlot, ::SlotData const& srcSlot) /*override*/;
55
56 virtual void handlePlaceAll(::SelectedSlotInfo const& selected, ::SlotData const& dstSlot) /*override*/;
57
58 virtual int handleAutoPlace(
59 ::SlotData const& srcSlot,
60 int amount,
61 ::std::vector<::AutoPlaceItem> const& autoPlaceOrder,
62 ::std::vector<::AutoPlaceResult>& destinations
63 ) /*override*/;
64
65 virtual ::CreateContainerItemScope
66 _makeCreateItemScope(::SlotData const& srcSlot, ::ItemTransferAmount const&) /*override*/;
67 // NOLINTEND
68
69public:
70 // member functions
71 // NOLINTBEGIN
72#ifdef LL_PLAT_C
73 MCNAPI explicit GrindstoneContainerManagerController(
74 ::std::weak_ptr<::GrindstoneContainerManagerModel> containerManagerModel
75 );
76
77 MCNAPI bool _createCraftItem(::ItemInstance& instance, ::ItemStackRequestScope const& requestScope);
78
79 MCNAPI void _grantExperience(::ItemStack const& input, ::ItemStack const& additional) const;
80
81 MCNAPI bool _handleTransferCraft(::SlotData const& srcSlot, ::SlotData const& dstSlot);
82
83 MCNAPI void _setupCallbacks();
84
85 MCNAPI void _updateResult(::ItemInstance const& oldItem);
86
87 MCNAPI void _updateResultPreview();
88#endif
89 // NOLINTEND
90
91public:
92 // constructor thunks
93 // NOLINTBEGIN
94#ifdef LL_PLAT_C
95 MCNAPI void* $ctor(::std::weak_ptr<::GrindstoneContainerManagerModel> containerManagerModel);
96#endif
97 // NOLINTEND
98
99public:
100 // virtual function thunks
101 // NOLINTBEGIN
102#ifdef LL_PLAT_C
103 MCNAPI bool $isOutputSlot(::std::string const& collectionName) const;
104
105 MCNAPI ::ItemStackBase const& $getTakeableItemStackBase(::SlotData const& slot) const;
106
107 MCNAPI void $handleTakeAmount(::SlotData const& dstSlot, int amount, ::SlotData const& srcSlot);
108
109 MCNAPI void $handleTakeAll(::SlotData const& dstSlot, ::SlotData const& srcSlot);
110
111 MCNAPI void $handleTakeHalf(::SlotData const& dstSlot, ::SlotData const& srcSlot);
112
113 MCNAPI void $handlePlaceAll(::SelectedSlotInfo const& selected, ::SlotData const& dstSlot);
114
115 MCNAPI int $handleAutoPlace(
116 ::SlotData const& srcSlot,
117 int amount,
118 ::std::vector<::AutoPlaceItem> const& autoPlaceOrder,
119 ::std::vector<::AutoPlaceResult>& destinations
120 );
121
122 MCNAPI ::CreateContainerItemScope $_makeCreateItemScope(::SlotData const& srcSlot, ::ItemTransferAmount const&);
123#endif
124
125
126 // NOLINTEND
127
128public:
129 // vftables
130 // NOLINTBEGIN
131 MCNAPI static void** $vftable();
132 // NOLINTEND
133};
static MCAPI void ** $vftable()
Definition GrindstoneContainerManagerModel.h:18
Definition ItemInstance.h:15
Definition ItemStackBase.h:44
Definition ItemStack.h:26
Definition AutoPlaceItem.h:5
Definition AutoPlaceResult.h:5
Definition CreateContainerItemScope.h:18
Definition ItemStackRequestScope.h:14
Definition ItemTransferAmount.h:5
Definition SelectedSlotInfo.h:10
Definition SlotData.h:5