43class ItemStackNetManagerClient :
public ::ItemStackNetManagerBase {
54 struct PredictiveContainer {
58 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::SparseContainerClient>> mSparseContainer;
59 ::ll::TypedStorage<8, 64, ::std::unordered_map<::ItemStackRequestId, ::std::vector<::HistoricPredictionData>>>
61 ::ll::TypedStorage<8, 64, ::std::unordered_map<::ItemStackRequestId, ::std::vector<::HistoricPredictionData>>>
69 PredictiveContainer();
76 virtual ~PredictiveContainer() =
default;
78 virtual ~PredictiveContainer();
87 MCNAPI PredictiveContainer(
89 ::SparseContainerBackingSetType backingSetType,
90 bool isItemStackNetManagerEnabled,
91 ::std::unique_ptr<::ISparseContainerSetListener> netManagerSetter,
92 ::std::unique_ptr<::IPlayerContainerSetter> playerContainerSetter
103 ::SparseContainerBackingSetType backingSetType,
104 bool isItemStackNetManagerEnabled,
105 ::std::unique_ptr<::ISparseContainerSetListener> netManagerSetter,
106 ::std::unique_ptr<::IPlayerContainerSetter> playerContainerSetter
128 ::ll::TypedStorage<8, 48, ::ContainerWeakRef> mContainerWeakRef;
129 ::ll::TypedStorage<8, 8, ::ItemStackNetManagerClient::PredictiveContainer*> mContainer;
149 struct ClientScreenData {
153 ::ll::TypedStorage<8, 64, ::std::unordered_map<::ContainerEnumName, ::std::unordered_set<uchar>>>
154 mLegacyTransactionSetItemSlots;
159 unordered_map<::ItemStackRequestId, ::std::vector<::ItemStackNetManagerClient::PredictiveContainer*>>>
161 ::ll::TypedStorage<8, 24, ::std::vector<::std::unique_ptr<::ClientScratchContainer>>> mClientScratchContainers;
162 ::ll::TypedStorage<8, 24, ::std::vector<::std::unique_ptr<::ItemStackNetManagerClient::PredictiveContainer>>>
163 mPlayerOwnedPredictiveContainers;
164 ::ll::TypedStorage<8, 24, ::std::vector<::std::unique_ptr<::ItemStackNetManagerClient::PredictiveContainer>>>
165 mOpenSessionPredictiveContainers;
169 ::std::unordered_map<::FullContainerName, ::ItemStackNetManagerClient::OpenSessionContainerData>>
170 mOpenSessionContainerMap;
174 ::std::unordered_map<::FullContainerName, ::ItemStackNetManagerClient::OpenSessionContainerData>>
182 ClientScreenData& operator=(ClientScreenData
const&);
183 ClientScreenData(ClientScreenData
const&);
190 MCNAPI ClientScreenData();
194 MCNAPI ::ItemStackNetManagerClient::ClientScreenData&
197 MCNAPI ~ClientScreenData();
205 MCNAPI
void* $ctor();
224 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::ContainerModel>> mOwnedContainer;
231 OwningPredictiveContainer();
238 MCNAPI OwningPredictiveContainer(
239 ::std::shared_ptr<::ContainerModel> containerModel,
241 ::SparseContainerBackingSetType backingSetType,
242 bool isItemStackNetManagerEnabled,
243 ::std::unique_ptr<::ISparseContainerSetListener> netManagerSetter,
244 ::std::unique_ptr<::IPlayerContainerSetter> playerContainerSetter
254 ::std::shared_ptr<::ContainerModel> containerModel,
256 ::SparseContainerBackingSetType backingSetType,
257 bool isItemStackNetManagerEnabled,
258 ::std::unique_ptr<::ISparseContainerSetListener> netManagerSetter,
259 ::std::unique_ptr<::IPlayerContainerSetter> playerContainerSetter
274 ::ll::TypedStorage<1, 1, bool> mIsHandlingResponse;
275 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ItemStackRequestData>> mRequest;
276 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ItemStackRequestBatch>> mRequestBatch;
277 ::ll::TypedStorage<8, 24, ::WeakRef<::EntityContext>> mRequestScreen;
284 ItemStackNetManagerClient();
290 virtual ~ItemStackNetManagerClient() =
default;
293 virtual ::SparseContainer*
296 virtual ::SparseContainer* initOpenContainer(
303 virtual ::ItemStackRequestId getRequestId() const ;
305 virtual
bool allowInventoryTransactionManager() const ;
307 virtual ::gsl::final_action<::
std::function<
void()>> _tryBeginClientLegacyTransactionRequest() ;
310 virtual void _addLegacyTransactionRequestSetItemSlot(
312 ::SharedTypes::Legacy::ContainerType,
316 virtual void _addLegacyTransactionRequestSetItemSlot(
318 ::SharedTypes::Legacy::ContainerType containerType,
335 MCNAPI ItemStackNetManagerClient(
::Player& localPlayer,
bool isEnabled);
337 MCNAPI
void _beginRequest(::ItemStackRequestScreen screen);
339 MCNAPI
void _clearPredictiveContainerRequest(
340 ::ItemStackRequestId
const& requestId,
345 MCNAPI
void _endRequest();
347 MCNAPI ::std::unique_ptr<::ItemStackRequestData> _endTakeRequest();
349 MCNAPI ::ItemStackLegacyRequestId _getLegacyTransactionRequest()
const;
351 MCNAPI ::std::unordered_map<::ContainerEnumName, ::std::unordered_set<uchar>>
352 _getLegacyTransactionSetItemSlots()
const;
354 MCNAPI
void _initPlayerContainers();
356 MCNAPI
void _processResponseSlot(
357 ::ItemStackRequestId
const& requestId,
362 MCNAPI ::ItemStackNetManagerClient::ClientScreenData
const* _tryGetCurrentClientScreen()
const;
364 MCNAPI ::ItemStackNetManagerClient::ClientScreenData* _tryGetCurrentClientScreen();
366 MCNAPI
void addContainerToRequest(::ItemStackRequestId requestId,
::Container* container);
368 MCNAPI
void addRequestAction(::std::unique_ptr<::ItemStackRequestAction> requestAction);
370 MCNAPI
int addRequestToFilterString(::std::string
const& stringToFilter, ::TextProcessingEventOrigin origin);
372 MCNAPI
void cacheHistoricPrediction(
374 ::ItemStackRequestId
const& requestId,
380 cacheZeroedOutItem(
::Container* container, ::ItemStackRequestId
const& requestId,
int slot,
::ItemStack&& item);
382 MCNAPI
void clearZeroedOutItem(
::Container* container, ::ItemStackRequestId
const& requestId,
int slot);
384 MCNAPI ::std::unordered_map<::FullContainerName, ::std::shared_ptr<::Container>> getPredictiveContainers();
386 MCNAPI
void handleItemStackResponse(::std::vector<::ItemStackResponseInfo>
const& responses);
388 MCNAPI
bool hasActiveRequest()
const;
390 MCNAPI ::OwnedItemStackRequestScope
391 tryBeginOwnedRequest(::std::shared_ptr<::ItemStackRequestData> result, ::ItemStackRequestScreen screen);
393 MCNAPI ::ItemStackRequestScope tryBeginRequest();
395 MCNAPI
void trySendBatch();
403 MCNAPI
void* $ctor(
::Player& localPlayer,
bool isEnabled);
411 MCNAPI ::SparseContainer* $initOpenContainer(
417 MCNAPI ::ItemStackRequestId $getRequestId()
const;
419 MCNAPI
bool $allowInventoryTransactionManager()
const;
421 MCNAPI ::gsl::final_action<::std::function<void()>> $_tryBeginClientLegacyTransactionRequest();
423 MCNAPI
void $_addLegacyTransactionRequestSetItemSlot(
425 ::SharedTypes::Legacy::ContainerType containerType,
Definition EntityContext.h:17