LeviLamina
Loading...
Searching...
No Matches
ItemStackNetManagerClient.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/game_refs/WeakRef.h"
7#include "mc/deps/shared_types/legacy/ContainerType.h"
8#include "mc/world/containers/ContainerEnumName.h"
9#include "mc/world/inventory/ContainerWeakRef.h"
10#include "mc/world/inventory/network/ItemStackNetManagerBase.h"
11#include "mc/world/inventory/network/ItemStackRequestScreen.h"
12#include "mc/world/inventory/network/TypedClientNetId.h"
13#include "mc/world/inventory/simulation/SparseContainerBackingSetType.h"
14
15// auto generated forward declare list
16// clang-format off
17class BlockSource;
19class Container;
20class ContainerModel;
21class EntityContext;
24class ItemStack;
29class SparseContainer;
36// clang-format on
37
38class ItemStackNetManagerClient : public ::ItemStackNetManagerBase {
39public:
40 // ItemStackNetManagerClient inner types declare
41 // clang-format off
44 struct ClientScreenData;
46 // clang-format on
47
48 // ItemStackNetManagerClient inner types define
50 public:
51 // member variables
52 // NOLINTBEGIN
53 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::SparseContainerClient>> mSparseContainer;
54 ::ll::TypedStorage<8, 64, ::std::unordered_map<::ItemStackRequestId, ::std::vector<::HistoricPredictionData>>>
55 mHistoricPredictions;
56 ::ll::TypedStorage<8, 64, ::std::unordered_map<::ItemStackRequestId, ::std::vector<::HistoricPredictionData>>>
57 mZeroedOutItems;
58 // NOLINTEND
59
60 public:
61 // virtual functions
62 // NOLINTBEGIN
63 virtual ~PredictiveContainer() = default;
64 // NOLINTEND
65
66 public:
67 // member functions
68 // NOLINTBEGIN
69
70 // NOLINTEND
71
72 public:
73 // constructor thunks
74 // NOLINTBEGIN
75 MCNAPI_C void* $ctor(
76 ::Container& backingContainer,
77 ::SparseContainerBackingSetType backingSetType,
78 bool isItemStackNetManagerEnabled,
79 ::std::unique_ptr<::ISparseContainerSetListener> netManagerSetter,
80 ::std::unique_ptr<::IPlayerContainerSetter> playerContainerSetter
81 );
82 // NOLINTEND
83
84 public:
85 // vftables
86 // NOLINTBEGIN
87 MCNAPI static void** $vftable();
88 // NOLINTEND
89 };
90
92 public:
93 // member variables
94 // NOLINTBEGIN
95 ::ll::TypedStorage<8, 48, ::ContainerWeakRef> mContainerWeakRef;
96 ::ll::TypedStorage<8, 8, ::ItemStackNetManagerClient::PredictiveContainer*> mContainer;
97 // NOLINTEND
98
99 public:
100 // member functions
101 // NOLINTBEGIN
102
103 // NOLINTEND
104
105 public:
106 // destructor thunk
107 // NOLINTBEGIN
108 MCNAPI_C void $dtor();
109 // NOLINTEND
110 };
111
113 public:
114 // member variables
115 // NOLINTBEGIN
116 ::ll::TypedStorage<8, 64, ::std::unordered_map<::ContainerEnumName, ::std::unordered_set<uchar>>>
117 mLegacyTransactionSetItemSlots;
118 ::ll::TypedStorage<
119 8,
120 64,
121 ::std::
122 unordered_map<::ItemStackRequestId, ::std::vector<::ItemStackNetManagerClient::PredictiveContainer*>>>
123 mRequestContainers;
124 ::ll::TypedStorage<8, 24, ::std::vector<::std::unique_ptr<::ClientScratchContainer>>> mClientScratchContainers;
125 ::ll::TypedStorage<8, 24, ::std::vector<::std::unique_ptr<::ItemStackNetManagerClient::PredictiveContainer>>>
126 mPlayerOwnedPredictiveContainers;
127 ::ll::TypedStorage<8, 24, ::std::vector<::std::unique_ptr<::ItemStackNetManagerClient::PredictiveContainer>>>
128 mOpenSessionPredictiveContainers;
129 ::ll::TypedStorage<
130 8,
131 64,
132 ::std::unordered_map<::FullContainerName, ::ItemStackNetManagerClient::OpenSessionContainerData>>
133 mOpenSessionContainerMap;
134 ::ll::TypedStorage<
135 8,
136 64,
137 ::std::unordered_map<::FullContainerName, ::ItemStackNetManagerClient::OpenSessionContainerData>>
138 mHudContainerMap;
139 // NOLINTEND
140
141 public:
142 // member functions
143 // NOLINTBEGIN
144
145 // NOLINTEND
146
147 public:
148 // constructor thunks
149 // NOLINTBEGIN
150 MCNAPI_C void* $ctor();
151
152 MCNAPI_C void* $ctor(::ItemStackNetManagerClient::ClientScreenData&&);
153 // NOLINTEND
154
155 public:
156 // destructor thunk
157 // NOLINTBEGIN
158 MCNAPI_C void $dtor();
159 // NOLINTEND
160 };
161
163 public:
164 // member variables
165 // NOLINTBEGIN
166 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::ContainerModel>> mOwnedContainer;
167 // NOLINTEND
168
169 public:
170 // virtual functions
171 // NOLINTBEGIN
172 virtual ~OwningPredictiveContainer() /*override*/ = default;
173 // NOLINTEND
174
175 public:
176 // vftables
177 // NOLINTBEGIN
178 MCNAPI static void** $vftable();
179 // NOLINTEND
180 };
181
182public:
183 // member variables
184 // NOLINTBEGIN
185 ::ll::TypedStorage<1, 1, bool> mIsHandlingResponse;
186 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ItemStackRequestData>> mRequest;
187 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ItemStackRequestBatch>> mRequestBatch;
188 ::ll::TypedStorage<8, 24, ::WeakRef<::EntityContext>> mRequestScreen;
189 // NOLINTEND
190
191public:
192 // virtual functions
193 // NOLINTBEGIN
194 virtual ~ItemStackNetManagerClient() /*override*/ = default;
195
196 virtual ::SparseContainer* initOpenContainer(
197 ::BlockSource& region,
198 ::FullContainerName const& openContainerId,
199 ::ContainerWeakRef const& containerWeakRef
200 ) /*override*/;
201
202 virtual ::ItemStackRequestId getRequestId() const /*override*/;
203
204 virtual bool allowInventoryTransactionManager() const /*override*/;
205
206 virtual ::gsl::final_action<::std::function<void()>> _tryBeginClientLegacyTransactionRequest() /*override*/;
207
208 virtual void _addLegacyTransactionRequestSetItemSlot(
210 ::SharedTypes::Legacy::ContainerType containerType,
211 int slot
212 ) /*override*/;
213
214 virtual void _initScreen(::ItemStackNetManagerScreen& screen) /*override*/;
215 // NOLINTEND
216
217public:
218 // member functions
219 // NOLINTBEGIN
220 MCNAPI_C void _beginRequest(::ItemStackRequestScreen screen);
221
222 MCNAPI_C void _clearPredictiveContainerRequest(
223 ::ItemStackRequestId const& requestId,
224 ::ItemStackNetManagerClient::PredictiveContainer& predictiveContainer,
225 bool shouldBeEmpty
226 );
227
228 MCNAPI_C void _endRequest();
229
230 MCNAPI_C ::std::unique_ptr<::ItemStackRequestData> _endTakeRequest();
231
232 MCNAPI_C ::std::unordered_map<::ContainerEnumName, ::std::unordered_set<uchar>>
233 _getLegacyTransactionSetItemSlots() const;
234
235 MCNAPI_C ::ItemStackNetManagerClient::PredictiveContainer* _getPredictiveContainer(::Container* sparseContainer);
236
237 MCNAPI_C void _initPlayerContainers();
238
239 MCNAPI_C void _processResponseSlot(
240 ::ItemStackRequestId const& requestId,
241 ::ItemStackNetManagerClient::PredictiveContainer& predictiveContainer,
242 ::ItemStackResponseSlotInfo const& responseInfo
243 );
244
245 MCNAPI_C ::ItemStackNetManagerClient::ClientScreenData* _tryGetCurrentClientScreen();
246
247 MCNAPI_C void addContainerToRequest(::ItemStackRequestId requestId, ::Container* container);
248
249 MCNAPI_C void addRequestAction(::std::unique_ptr<::ItemStackRequestAction> requestAction);
250
251 MCNAPI_C void cacheHistoricPrediction(
252 ::Container* container,
253 ::ItemStackRequestId const& requestId,
254 int slot,
255 ::ItemStack&& item
256 );
257
258 MCNAPI_C void
259 cacheZeroedOutItem(::Container* container, ::ItemStackRequestId const& requestId, int slot, ::ItemStack&& item);
260
261 MCNAPI_C void clearZeroedOutItem(::Container* container, ::ItemStackRequestId const& requestId, int slot);
262
263 MCNAPI_C ::std::unordered_map<::FullContainerName, ::std::shared_ptr<::Container>> getPredictiveContainers();
264
265 MCNAPI_C void handleItemStackResponse(::std::vector<::ItemStackResponseInfo> const& responses);
266
267 MCNAPI_C void trySendBatch();
268 // NOLINTEND
269
270public:
271 // virtual function thunks
272 // NOLINTBEGIN
273#ifdef LL_PLAT_C
274 MCNAPI ::SparseContainer* $initOpenContainer(
275 ::BlockSource& region,
276 ::FullContainerName const& openContainerId,
277 ::ContainerWeakRef const& containerWeakRef
278 );
279
280 MCNAPI ::ItemStackRequestId $getRequestId() const;
281
282 MCNAPI bool $allowInventoryTransactionManager() const;
283
284 MCNAPI ::gsl::final_action<::std::function<void()>> $_tryBeginClientLegacyTransactionRequest();
285
286 MCNAPI void $_addLegacyTransactionRequestSetItemSlot(
288 ::SharedTypes::Legacy::ContainerType containerType,
289 int slot
290 );
291
292 MCNAPI void $_initScreen(::ItemStackNetManagerScreen& screen);
293#endif
294
295
296 // NOLINTEND
297
298public:
299 // vftables
300 // NOLINTBEGIN
301 MCNAPI static void** $vftable();
302 // NOLINTEND
303};
Definition BlockSource.h:68
Definition ClientScratchContainer.h:13
Definition ContainerModel.h:27
Definition ContainerWeakRef.h:20
Definition Container.h:33
Definition EntityContext.h:16
Definition IPlayerContainerSetter.h:10
Definition ISparseContainerSetListener.h:11
Definition ItemStackNetManagerClient.h:38
static MCAPI void ** $vftable()
Definition ItemStackNetManagerScreen.h:9
Definition ItemStackRequestAction.h:18
Definition ItemStackRequestBatch.h:14
Definition ItemStackRequestData.h:18
Definition ItemStack.h:26
Definition SparseContainerClient.h:24
Definition SparseContainer.h:24
STL namespace.
Definition FullContainerName.h:8
Definition HistoricPredictionData.h:8
Definition ItemStackNetManagerClient.h:112
Definition ItemStackNetManagerClient.h:91
Definition ItemStackNetManagerClient.h:162
Definition ItemStackNetManagerClient.h:49
Definition ItemStackRequestIdTag.h:5
Definition ItemStackResponseInfo.h:15
Definition ItemStackResponseSlotInfo.h:14