Skip to content
LeviMC
English
AutoLightDark
LeviLamina
Loading...
Searching...
No Matches
MinecraftArguments.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/common/SubClientId.h"
7#include "mc/deps/core/utility/NonOwnerPointer.h"
8#include "mc/deps/core/utility/optional_ref.h"
9#include "mc/deps/game_refs/OwnerPtr.h"
10#include "mc/deps/resource_processing/category/CategoryMergeStrategyFactory.h"
11#include "mc/events/event_data/ServerTelemetryData.h"
12#include "mc/network/ClientOrServerNetworkSystemRef.h"
13#include "mc/platform/brstd/function_ref.h"
14#include "mc/platform/brstd/move_only_function.h"
15#include "mc/server/config/server_configuration/ServerConfigurationJoinInfo.h"
16
17// auto generated forward declare list
18// clang-format off
19class AllowList;
20class EditorAllowList;
21class FileArchiver;
22class GameCallbacks;
28class ILevel;
29class IMinecraftApp;
31class KeyManager;
36class PacketSender;
37class PermissionsFile;
38class PlayerListEntry;
41class Scheduler;
45class Timer;
48struct PackIdVersion;
51namespace Bedrock::Resources { class CategoryFileMapping; }
52namespace Core { class FilePathManager; }
53namespace mce { class UUID; }
54class ServerMetrics;
55// clang-format on
56
57struct MinecraftArguments {
58public:
59 // MinecraftArguments inner types declare
60 // clang-format off
65 // clang-format on
66
67 // MinecraftArguments inner types define
68 struct CreateMinecraftCommandsArgs {
69 public:
70 // member variables
71 // NOLINTBEGIN
72 ::ll::TypedStorage<8, 8, ::ICommandsContextProvider&> mContext;
73 // NOLINTEND
74
75 public:
76 // prevent constructor by default
77 CreateMinecraftCommandsArgs& operator=(CreateMinecraftCommandsArgs const&);
78 CreateMinecraftCommandsArgs(CreateMinecraftCommandsArgs const&);
79 CreateMinecraftCommandsArgs();
80 };
81
82 struct CreateServerNetworkHandlerArgs {
83 public:
84 // member variables
85 // NOLINTBEGIN
86 ::ll::TypedStorage<8, 8, ::ILevel&> mLevel;
87 ::ll::TypedStorage<8, 8, ::PrivateKeyManager&> mServerKeys;
88 ::ll::TypedStorage<8, 8, ::MinecraftServiceKeyManager&> mMinecraftServiceKeys;
89 ::ll::TypedStorage<8, 8, ::KeyManager const&> mHostPublicKey;
90 ::ll::TypedStorage<4, 4, int> mMaxChunkRadius;
91 ::ll::TypedStorage<4, 4, int> mMaxNumPlayers;
92 ::ll::TypedStorage<8, 8, ::MinecraftCommands&> mCommands;
93 ::ll::TypedStorage<8, 8, ::std::unordered_map<::PackIdVersion, ::std::string> const&> mPackIdToContentKey;
94 ::ll::TypedStorage<8, 8, ::Scheduler&> mScheduler;
95 ::ll::TypedStorage<8, 8, ::TextFilteringProcessor*> mTextFilteringProcessor;
96 ::ll::TypedStorage<8, 8, ::NetworkServerConfig const&> mPacketHandlerConfig;
97 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::ScriptPackSettingsCache>> mPackSettingsCache;
98 ::ll::TypedStorage<8, 8, ::ServerNetworkHandlerDependencies&&> mServerNetworkOptions;
99 ::ll::TypedStorage<8, 8, ::optional_ref<::MinecraftGameTest>> mGameTest;
100 // NOLINTEND
101
102 public:
103 // prevent constructor by default
104 CreateServerNetworkHandlerArgs& operator=(CreateServerNetworkHandlerArgs const&);
105 CreateServerNetworkHandlerArgs(CreateServerNetworkHandlerArgs const&);
106 CreateServerNetworkHandlerArgs();
107 };
108
110 public:
111 // member variables
112 // NOLINTBEGIN
113 ::ll::TypedStorage<8, 8, ::IImGuiModuleConnector*> mConnector;
114 ::ll::TypedStorage<
115 8,
116 8,
117 ::std::string (*)(
118 ::std::string const&,
119 ::std::unordered_map<::mce::UUID, ::PlayerListEntry> const&,
121 )>
122 mAutoCompletePlayerMention;
123 ::ll::TypedStorage<8, 24, ::Bedrock::NonOwnerPointer<::IEducationOptions>> mEducationOptions;
124 // NOLINTEND
125
126 public:
127 // member functions
128 // NOLINTBEGIN
129#ifdef LL_PLAT_C
131#endif
132 // NOLINTEND
133
134 public:
135 // destructor thunk
136 // NOLINTBEGIN
137#ifdef LL_PLAT_C
138 MCNAPI void $dtor();
139#endif
140 // NOLINTEND
141 };
142
143 struct ServerNetworkHandlerFactoryArguments {
144 public:
145 // member variables
146 // NOLINTBEGIN
147 ::ll::TypedStorage<8, 8, ::AllowList&> mAllowList;
148 ::ll::TypedStorage<8, 8, ::EditorAllowList&> mEditorAllowList;
149 ::ll::TypedStorage<8, 8, ::IMinecraftApp&> mApp;
150 ::ll::TypedStorage<8, 384, ::std::optional<::ServerConfiguration::ServerConfigurationJoinInfo>>
151 mServerConfigurationJoinInfo;
152 ::ll::TypedStorage<8, 128, ::Social::Events::ServerTelemetryData> mServerTelemetryData;
153 // NOLINTEND
154
155 public:
156 // prevent constructor by default
157 ServerNetworkHandlerFactoryArguments& operator=(ServerNetworkHandlerFactoryArguments const&);
158 ServerNetworkHandlerFactoryArguments(ServerNetworkHandlerFactoryArguments const&);
159 ServerNetworkHandlerFactoryArguments();
160 };
161
163
164 using MinecraftCommandsFactory = ::brstd::move_only_function<
165 ::std::unique_ptr<::MinecraftCommands>(::MinecraftArguments::CreateMinecraftCommandsArgs&&) const>;
166
167 using MinecraftServiceKeyManagerFactory = ::brstd::function_ref<
168 ::std::shared_ptr<::MinecraftServiceKeyManager>() const,
169 ::std::shared_ptr<::MinecraftServiceKeyManager>()>;
170
171 using RequestServerShutdownCallback = ::brstd::move_only_function<void() const>;
172
173 using ServerNetworkHandlerFactory = ::brstd::move_only_function<
174 ::std::unique_ptr<::ServerNetworkHandler>(::MinecraftArguments::CreateServerNetworkHandlerArgs&&)>;
175
176public:
177 // member variables
178 // NOLINTBEGIN
179 ::ll::TypedStorage<8, 8, ::GameCallbacks&> mGameCallbacks;
180 ::ll::TypedStorage<8, 8, ::PermissionsFile*> mPermissionsFile;
181 ::ll::TypedStorage<8, 8, ::std::chrono::seconds> mMaxPlayerIdleTime;
182 ::ll::TypedStorage<8, 8, ::IMinecraftEventing&> mEventing;
183 ::ll::TypedStorage<8, 16, ::ClientOrServerNetworkSystemRef> mNetwork;
184 ::ll::TypedStorage<8, 8, ::PacketSender&> mPacketSender;
185 ::ll::TypedStorage<1, 1, ::SubClientId> mClientSubId;
186 ::ll::TypedStorage<8, 8, ::Timer&> mSimTimer;
187 ::ll::TypedStorage<8, 8, ::Timer&> mRealTimer;
188 ::ll::TypedStorage<8, 8, ::ServerMetrics*> mServerMetrics;
189 ::ll::TypedStorage<8, 16, ::OwnerPtr<::ResourcePackManager>> mResourcePackManager;
190 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::PrivateKeyManager>> mServerKeys;
191 ::ll::TypedStorage<8, 64, ::brstd::move_only_function<void() const>> mRequestServerShutdown;
192 ::ll::TypedStorage<
193 8,
194 64,
195 ::brstd::move_only_function<
196 ::std::unique_ptr<::ServerNetworkHandler>(::MinecraftArguments::CreateServerNetworkHandlerArgs&&)>>
197 mCreateServerNetworkHandler;
198 ::ll::TypedStorage<1, 1, bool> mIsDedicatedServer;
199 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::GameModuleServer>> mGameModuleServer;
200 ::ll::TypedStorage<
201 8,
202 16,
203 ::brstd::function_ref<
204 ::std::shared_ptr<::MinecraftServiceKeyManager>() const,
205 ::std::shared_ptr<::MinecraftServiceKeyManager>()>>
206 mCreateMinecraftServiceKeyManager;
207 ::ll::TypedStorage<8, 64, ::brstd::move_only_function<::Bedrock::NotNullNonOwnerPtr<::FileArchiver>() const>>
208 mGetFileArchiver;
209 ::ll::TypedStorage<
210 8,
211 64,
212 ::brstd::move_only_function<
213 ::std::unique_ptr<::MinecraftCommands>(::MinecraftArguments::CreateMinecraftCommandsArgs&&) const>>
214 mCreateMinecraftCommands;
215 // NOLINTEND
216
217public:
218 // prevent constructor by default
219 MinecraftArguments& operator=(MinecraftArguments const&);
220 MinecraftArguments(MinecraftArguments const&);
221 MinecraftArguments();
222
223public:
224 // member functions
225 // NOLINTBEGIN
226 MCNAPI ::brstd::move_only_function<
227 ::std::unique_ptr<::ServerNetworkHandler>(::MinecraftArguments::CreateServerNetworkHandlerArgs&&)>
229
230#ifdef LL_PLAT_C
231 MCNAPI ~MinecraftArguments();
232#endif
233 // NOLINTEND
234
235public:
236 // static functions
237 // NOLINTBEGIN
238 MCNAPI static ::OwnerPtr<::ResourcePackManager> createResourcePackManager(
239 ::Core::FilePathManager const& filePathManager,
240 ::IContentTierManager const& contentTierManager,
243 mergeStrategyFactory
244 );
245 // NOLINTEND
246
247public:
248 // destructor thunk
249 // NOLINTBEGIN
250#ifdef LL_PLAT_C
251 MCNAPI void $dtor();
252#endif
253 // NOLINTEND
254};
Definition AllowList.h:16
Definition CategoryFileMapping.h:16
Definition CategoryMergeStrategyFactory.h:8
Definition ClientOrServerNetworkSystemRef.h:13
Definition FilePathManager.h:18
Definition EditorAllowList.h:10
Definition FileArchiver.h:35
Definition GameCallbacks.h:5
Definition GameModuleServer.h:27
Definition ICommandsContextProvider.h:15
Definition IContentTierManager.h:13
Definition IEducationOptions.h:8
Definition IImGuiModuleConnector.h:5
Definition ILevel.h:223
Definition IMinecraftApp.h:19
Definition IMinecraftEventing.h:152
Definition KeyManager.h:8
Definition LoadedResourceData.h:5
Definition MinecraftCommands.h:33
Definition MinecraftGameTest.h:20
Definition MinecraftServiceKeyManager.h:21
Definition OwnerPtr.h:7
Definition PacketSender.h:17
Definition PermissionsFile.h:20
Definition PlayerListEntry.h:17
Definition PrivateKeyManager.h:10
Definition ResourcePackManager.h:29
Definition Scheduler.h:15
Definition ScriptPackSettingsCache.h:16
Definition ServerMetrics.h:10
Definition ServerNetworkHandler.h:191
Definition TextFilteringProcessor.h:19
Definition Timer.h:5
Definition move_only_function.h:9
Definition UUID.h:8
STL namespace.
Definition AutoCompleteInformation.h:10
Definition MinecraftArguments.h:68
Definition MinecraftArguments.h:82
MCAPI ::brstd::move_only_function< ::std::unique_ptr<::ServerNetworkHandler >(::MinecraftArguments::CreateServerNetworkHandlerArgs &&)> createServerNetworkHandlerFactory(::MinecraftArguments::ServerNetworkHandlerFactoryArguments &&args)
static MCAPI ::OwnerPtr<::ResourcePackManager > createResourcePackManager(::Core::FilePathManager const &filePathManager, ::IContentTierManager const &contentTierManager, ::Bedrock::Resources::CategoryFileMapping categoryFileMapping, ::Bedrock::Resources::CategoryMergeStrategyFactory<::LoadedResourceData, ::ResourceMergeOptions > mergeStrategyFactory)
Definition NetworkServerConfig.h:9
Definition PackIdVersion.h:10
Definition ResourceMergeOptions.h:14
Definition ServerNetworkHandlerDependencies.h:5