LeviLamina
Loading...
Searching...
No Matches
ContainerManagerController.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/utility/pub_sub/Subscription.h"
7#include "mc/world/containers/controllers/ItemTakeType.h"
8#include "mc/world/inventory/simulation/ContainerScreenRequestActionType.h"
9
10// auto generated forward declare list
11// clang-format off
15class ItemInstance;
16class ItemStackBase;
17struct AutoPlaceItem;
18struct AutoPlaceResult;
25struct SelectedSlotInfo;
26struct SlotData;
27namespace Bedrock::Safety { class RedactableString; }
28// clang-format on
29
30class ContainerManagerController : public ::std::enable_shared_from_this<::ContainerManagerController> {
31public:
32 // member variables
33 // NOLINTBEGIN
34 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::ContainerManagerModel>> mContainerManagerModel;
35 ::ll::TypedStorage<8, 64, ::std::unordered_map<::std::string, ::std::shared_ptr<::ContainerController>>>
36 mContainers;
37 ::ll::TypedStorage<8, 24, ::std::vector<::ContainerSplitControl>> mContainerSplitItemStackItems;
38 ::ll::TypedStorage<8, 24, ::std::vector<::ContainerSimulationSplitStack>> mContainerSimulationSplitItemStacks;
39 ::ll::TypedStorage<4, 4, int> mSplitItemRemainder;
40 ::ll::TypedStorage<1, 1, bool> mContainerDirty;
41 ::ll::TypedStorage<1, 1, bool> mContainersClosed;
42 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ContainerScreenSimulation>> mSimulation;
43 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mDynamicContainerNotifier;
44 // NOLINTEND
45
46public:
47 // virtual functions
48 // NOLINTBEGIN
49 // vIndex: 0
50 virtual ~ContainerManagerController() = default;
51
52 // vIndex: 1
53 virtual void postInit(::std::weak_ptr<::ContainerManagerController>);
54
55 // vIndex: 2
56 virtual void registerContainerCallbacks();
57
58 // vIndex: 3
59 virtual void setPreviewItemName(::Bedrock::Safety::RedactableString const&);
60
61 // vIndex: 4
62 virtual void setItemName(::Bedrock::Safety::RedactableString const&);
63
64 // vIndex: 5
65 virtual ::Bedrock::Safety::RedactableString const& getPreviewItemName() const;
66
67 // vIndex: 6
68 virtual ::Bedrock::Safety::RedactableString const& getItemName() const;
69
70 // vIndex: 7
71 virtual void updatePreviewItem();
72
73 // vIndex: 8
74 virtual ::ItemStackBase const& getTakeableItemStackBase(::SlotData const&) const;
75
76 // vIndex: 9
77 virtual void handleTakeAmount(::SlotData const&, int, ::SlotData const&);
78
79 // vIndex: 10
80 virtual void handleTakeAll(::SlotData const&, ::SlotData const&);
81
82 // vIndex: 11
83 virtual void handlePlaceAll(::SelectedSlotInfo const&, ::SlotData const&);
84
85 // vIndex: 12
86 virtual void handleTakeHalf(::SlotData const&, ::SlotData const&);
87
88 // vIndex: 13
89 virtual void handlePlaceOne(::SlotData const&, ::SlotData const&);
90
91 // vIndex: 14
92 virtual void handlePlaceAmount(::SlotData const&, int, ::SlotData const&);
93
94 // vIndex: 15
95 virtual int
96 handleAutoPlace(::SlotData const&, int, ::std::vector<::AutoPlaceItem> const&, ::std::vector<::AutoPlaceResult>&);
97
98 // vIndex: 16
99 virtual int handleAutoPlaceStack(
100 ::SlotData const&,
101 ::ItemTakeType,
102 ::std::vector<::AutoPlaceItem> const&,
103 ::std::vector<::AutoPlaceResult>&
104 );
105
106 // vIndex: 17
107 virtual void handleSplitSingle(::SlotData const&, ::SlotData const&);
108
109 // vIndex: 18
110 virtual void handleSplitMultiple(::SelectedSlotInfo const&, ::ItemInstance const&, ::SlotData const&);
111
112 // vIndex: 19
113 virtual bool handleCoalesce(::SlotData const&, ::std::vector<::std::string> const&, ::std::string const&);
114
115 // vIndex: 20
116 virtual bool handleSwap(::SlotData const&, ::SlotData const&);
117
118 // vIndex: 21
119 virtual bool handleDrop(::SlotData const&, ::ItemTransferAmount const);
120
121 // vIndex: 23
122 virtual bool handleDestroy(::SelectedSlotInfo const&, ::ItemTransferAmount const);
123
124 // vIndex: 22
125 virtual bool handleDestroy(::SlotData const&, ::ItemTransferAmount const);
126
127 // vIndex: 24
128 virtual bool handleConsume(::SlotData const&, ::ItemTransferAmount const);
129
130 // vIndex: 25
131 virtual void handleAddToStack(::SlotData const&, ::SlotData const&, ::ItemTakeType);
132
133 // vIndex: 26
134 virtual void closeContainers();
135
136 // vIndex: 27
137 virtual bool isOutputSlot(::std::string const&) const;
138
139 // vIndex: 28
140 virtual void _updateItemStackRequest(
141 ::ContainerScreenRequestActionType,
144 );
145
146 // vIndex: 29
147 virtual ::CreateContainerItemScope _makeCreateItemScope(::SlotData const&, ::ItemTransferAmount const&);
148
149 // vIndex: 30
150 virtual void _onItemTransferredFrom(::ItemInstance const&, ::SlotData const&);
151
152 // vIndex: 31
153 virtual void _onItemTransferredTo(::ItemInstance const&, ::SlotData const&);
154
155 // vIndex: 32
156 virtual void _onItemAcquired(::ItemInstance const&, ::SlotData const&);
157
158 // vIndex: 33
159 virtual void _onItemPlaced(::ItemInstance const&, ::SlotData const&);
160
161 // vIndex: 34
162 virtual void _onContainerScreenAction(::ContainerScreenActionResult const&);
163 // NOLINTEND
164
165public:
166 // static variables
167 // NOLINTBEGIN
168 MCNAPI static ::std::string_view const& TRANSFER_NO_DESTINATION();
169
170 MCNAPI static ::std::string_view const& TRANSFER_NO_ORIGIN();
171 // NOLINTEND
172
173public:
174 // virtual function thunks
175 // NOLINTBEGIN
176
177 // NOLINTEND
178};
Definition RedactableString.h:10
Definition ContainerController.h:18
Definition ContainerManagerController.h:30
static MCAPI ::std::string_view const & TRANSFER_NO_ORIGIN()
static MCAPI ::std::string_view const & TRANSFER_NO_DESTINATION()
Definition ContainerManagerModel.h:29
Definition ContainerScreenSimulation.h:25
Definition ItemInstance.h:16
Definition ItemStackBase.h:35
Definition AutoPlaceItem.h:5
Definition AutoPlaceResult.h:5
Definition ContainerScreenActionResult.h:11
Definition ContainerSimulationSplitStack.h:8
Definition ContainerSplitControl.h:9
Definition CreateContainerItemScope.h:14
Definition ItemStackRequestScope.h:5
Definition ItemTransferAmount.h:5
Definition SelectedSlotInfo.h:5
Definition SlotData.h:5