Skip to content
LeviMC
English
AutoLightDark
LeviLamina
Loading...
Searching...
No Matches
ItemStackNetManagerServer.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/utility/NonOwnerPointer.h"
7#include "mc/util/CallbackToken.h"
8#include "mc/util/CallbackTokenContext.h"
9#include "mc/world/inventory/network/ItemStackNetManagerBase.h"
10#include "mc/world/inventory/network/TypedClientNetId.h"
11#include "mc/world/level/Tick.h"
12
13// auto generated forward declare list
14// clang-format off
20class ServerPlayer;
24struct LegacySetSlot;
25// clang-format on
26
27class ItemStackNetManagerServer : public ::ItemStackNetManagerBase {
28public:
29 // ItemStackNetManagerServer inner types define
30 enum class TextFilterState : int {
31 None = 0,
32 Waiting = 1,
33 Timedout = 2,
34 };
35
36 using RetainScope = ::gsl::final_action<::std::function<void()>>;
37
38public:
39 // member variables
40 // NOLINTBEGIN
41 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ItemStackRequestActionHandler>> mRequestActionHandler;
42 ::ll::TypedStorage<1, 1, bool> mRetainSetItemStackNetIdVariants;
43 ::ll::TypedStorage<4, 4, ::ItemStackNetManagerServer::TextFilterState> mTextFilterState;
44 ::ll::TypedStorage<
45 8,
46 40,
47 ::std::
48 queue<::std::unique_ptr<::ItemStackRequestData>, ::std::deque<::std::unique_ptr<::ItemStackRequestData>>>>
49 mRequestsQueue;
50 ::ll::TypedStorage<8, 24, ::Bedrock::NonOwnerPointer<::TextFilteringProcessor>> mTextFilteringProcessor;
51 ::ll::TypedStorage<8, 8, ::Tick> mTextFilterRequestTimer;
52 ::ll::TypedStorage<8, 8, ::Tick const> mTextFilterRequestTimeout;
53 ::ll::TypedStorage<8, 16, ::CallbackToken> mTextFilterRequestToken;
54 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::CallbackTokenContext<::std::function<void()>>>>
55 mOnContainerScreenCloseCB;
56 // NOLINTEND
57
58public:
59 // prevent constructor by default
60 ItemStackNetManagerServer();
61
62public:
63 // virtual functions
64 // NOLINTBEGIN
65 virtual ~ItemStackNetManagerServer() /*override*/ = default;
66
67 virtual ::ItemStackRequestId getRequestId() const /*override*/;
68
69 virtual bool retainSetItemStackNetIdVariant() const /*override*/;
70
71 virtual bool allowInventoryTransactionManager() const /*override*/;
72
73 virtual void onContainerScreenOpen(::ContainerScreenContext const& screenContext) /*override*/;
74
75 virtual void beginCursorItemDrag() /*override*/;
76
77 virtual void endCursorItemDrag() /*override*/;
78
79 virtual void _initScreen(::ItemStackNetManagerScreen& screen) /*override*/;
80 // NOLINTEND
81
82public:
83 // member functions
84 // NOLINTBEGIN
85 MCNAPI ItemStackNetManagerServer(::ServerPlayer& serverPlayer, bool isEnabled);
86
88 ::ItemStackLegacyRequestId const& legacyClientRequestId,
89 ::std::vector<::LegacySetSlot> const& legacySetItemSlots
90 );
91
92 MCNAPI void _processQueue();
93
94 MCNAPI void _queueRequest(::std::unique_ptr<::ItemStackRequestData> request);
95
96 MCNAPI void _setTextFilterState(::ItemStackNetManagerServer::TextFilterState state);
97
98 MCNAPI void handleRequest(
99 ::std::unique_ptr<::ItemStackRequestData> request,
101 );
102
104 ::ItemStackRequestBatch const& requestBatch,
106 );
107
108 MCNAPI void normalTick();
109
110 MCNAPI ::CallbackToken tryCloseContainerScreen(::std::function<void()> onContainerScreenCloseCB);
111 // NOLINTEND
112
113public:
114 // constructor thunks
115 // NOLINTBEGIN
116 MCNAPI void* $ctor(::ServerPlayer& serverPlayer, bool isEnabled);
117 // NOLINTEND
118
119public:
120 // virtual function thunks
121 // NOLINTBEGIN
122 MCNAPI ::ItemStackRequestId $getRequestId() const;
123
125
127
128 MCAPI void $onContainerScreenOpen(::ContainerScreenContext const& screenContext);
129
130 MCNAPI void $beginCursorItemDrag();
131
132 MCNAPI void $endCursorItemDrag();
133
135
136
137 // NOLINTEND
138
139public:
140 // vftables
141 // NOLINTBEGIN
142 MCNAPI static void** $vftable();
143 // NOLINTEND
144};
Definition NonOwnerPointer.h:9
Definition CallbackTokenContext.h:6
Definition ContainerScreenContext.h:16
Definition ItemStackNetManagerScreen.h:9
MCAPI void handleRequest(::std::unique_ptr<::ItemStackRequestData > request, ::Bedrock::NonOwnerPointer<::TextFilteringProcessor > textFilteringProcessor)
MCAPI void _setTextFilterState(::ItemStackNetManagerServer::TextFilterState state)
MCAPI void handleRequestBatch(::ItemStackRequestBatch const &requestBatch, ::Bedrock::NonOwnerPointer<::TextFilteringProcessor > textFilteringProcessor)
MCAPI bool $retainSetItemStackNetIdVariant() const
MCAPI ItemStackNetManagerServer(::ServerPlayer &serverPlayer, bool isEnabled)
MCAPI bool $allowInventoryTransactionManager() const
MCAPI void * $ctor(::ServerPlayer &serverPlayer, bool isEnabled)
MCAPI void _queueRequest(::std::unique_ptr<::ItemStackRequestData > request)
static MCAPI void ** $vftable()
MCAPI::CallbackToken tryCloseContainerScreen(::std::function< void()> onContainerScreenCloseCB)
MCAPI void $beginCursorItemDrag()
MCAPI void $endCursorItemDrag()
MCAPI void _handleLegacyTransactionRequest(::ItemStackLegacyRequestId const &legacyClientRequestId, ::std::vector<::LegacySetSlot > const &legacySetItemSlots)
MCAPI::ItemStackRequestId $getRequestId() const
MCAPI void $_initScreen(::ItemStackNetManagerScreen &screen)
Definition ItemStackRequestActionHandler.h:44
Definition ItemStackRequestBatch.h:11
Definition ItemStackRequestData.h:15
Definition ServerPlayer.h:73
Definition TextFilteringProcessor.h:19
Definition ItemStackLegacyRequestIdTag.h:5
Definition ItemStackRequestIdTag.h:5
Definition LegacySetSlot.h:8