LeviLamina
Loading...
Searching...
No Matches
WorldCreationHelper.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/client/services/download/DlcCheckResult.h"
7#include "mc/client/world/CopyResourcePacksResult.h"
8#include "mc/client/world/world_creation_utils/WorldCreationResult.h"
9#include "mc/deps/core/resource/PackIdVersion.h"
10#include "mc/deps/core/threading/Async.h"
11#include "mc/deps/core/threading/SharedAsync.h"
12#include "mc/deps/core/utility/NonOwnerPointer.h"
13#include "mc/world/level/LevelSettings.h"
14#include "mc/world/level/storage/LevelSummary.h"
15
16// auto generated forward declare list
17// clang-format off
19class IContentManager;
20class IDlcBatcher;
21class IDlcValidation;
22class IEntitlementManager;
24class ILevelListCache;
26class IStoreCatalogRepository;
30class TrialManager;
32// clang-format on
33
35public:
36 // WorldCreationHelper inner types define
37 enum class WorldCreationMode : int {
38 Local = 0,
39 Realms = 1,
40 };
41
42public:
43 // member variables
44 // NOLINTBEGIN
45 ::ll::TypedStorage<8, 8, ::IContentManager&> mContentManager;
46 ::ll::TypedStorage<8, 8, ::IDlcValidation&> mDlcValidation;
47 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::IDlcBatcher>> mDlcBatcher;
48 ::ll::TypedStorage<8, 8, ::ILevelListCache&> mLevelListCache;
49 ::ll::TypedStorage<8, 8, ::IContentAcquisition&> mContentAcquisition;
50 ::ll::TypedStorage<8, 8, ::IStoreCatalogRepository&> mStoreCatalogRepository;
51 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::IEntitlementManager>> mEntitlementManager;
52 ::ll::TypedStorage<8, 8, ::IGameServerStartup&> mGameServerStartup;
53 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::IResourcePackRepository>> mResourcePackRepository;
54 ::ll::TypedStorage<8, 8, ::ResourcePackManager&> mResourcePackManager;
55 ::ll::TypedStorage<8, 8, ::ResourcePackManager&> mServerResourcePackManager;
56 ::ll::TypedStorage<8, 8, ::TrialManager&> mTrialManager;
57 ::ll::TypedStorage<8, 16, ::std::shared_ptr<bool>> mExistenceTracker;
58 ::ll::TypedStorage<4, 4, ::WorldCreationHelper::WorldCreationMode> mCreationMode;
59 ::ll::TypedStorage<1, 1, bool> mCreatingFromTemplate;
60 ::ll::TypedStorage<8, 1336, ::LevelSettings> mLevelSettings;
61 ::ll::TypedStorage<8, 32, ::std::string> mLevelName;
62 ::ll::TypedStorage<8, 48, ::PackIdVersion> mPackIdVersion;
63 ::ll::TypedStorage<8, 8, ::PackManagerContentSource*> mWorldContentSource;
64 ::ll::TypedStorage<8, 848, ::LevelSummary> mLevelSummary;
65 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ResourcePackCopyProgressHandler>> mProgressHandler;
66 ::ll::TypedStorage<8, 16, ::Bedrock::Threading::Async<void>> mCopyResourcePacksFuture;
67 ::ll::TypedStorage<8, 16, ::Bedrock::Threading::SharedAsync<void>> mStartResult;
68 // NOLINTEND
69
70public:
71 // prevent constructor by default
72 WorldCreationHelper& operator=(WorldCreationHelper const&);
73 WorldCreationHelper(WorldCreationHelper const&);
74 WorldCreationHelper();
75
76public:
77 // member functions
78 // NOLINTBEGIN
79 MCAPI WorldCreationHelper(
80 ::IContentManager& contentManager,
81 ::IDlcValidation& dlcValidation,
82 ::ILevelListCache& levelListCache,
83 ::IContentAcquisition& contentAcquisition,
84 ::IStoreCatalogRepository& storeCatalogRepository,
85 ::Bedrock::NotNullNonOwnerPtr<::IEntitlementManager> entitlementManager,
86 ::Bedrock::NotNullNonOwnerPtr<::IResourcePackRepository> const& resourcePackRepository,
87 ::ResourcePackManager& resourcePackManager,
88 ::ResourcePackManager& serverResourcePackManager,
89 ::TrialManager& trialManager,
90 ::IGameServerStartup& gameServerStartup
91 );
92
93 MCAPI ::WorldCreationUtils::WorldCreationResult
94 _createWorldImpl(::LevelDataWrapper& levelData, ::LevelSummary& levelSummary);
95
96 MCFOLD bool canStartLocalServer() const;
97
98 MCAPI ::DlcCheckResult checkDlc();
99
100 MCAPI ::CopyResourcePacksResult checkPackCopyProgress();
101
102 MCAPI ::WorldCreationUtils::WorldCreationResult
103 createOnRealms(::LevelDataWrapper& levelData, ::LevelSummary& levelSummary);
104
105 MCAPI ::WorldCreationUtils::WorldCreationResult
106 createWorld(::LevelDataWrapper& levelData, ::LevelSummary& levelSummary);
107
108 MCFOLD ::LevelSettings const& getLevelSettings() const;
109
110 MCAPI ::Bedrock::Threading::Async<void> getStartResult();
111
112 MCAPI ::CopyResourcePacksResult startCopyingResourcePacks();
113
114 MCAPI bool startLocalServer();
115
116 MCAPI ~WorldCreationHelper();
117 // NOLINTEND
118
119public:
120 // constructor thunks
121 // NOLINTBEGIN
122 MCAPI void* $ctor(
123 ::IContentManager& contentManager,
124 ::IDlcValidation& dlcValidation,
125 ::ILevelListCache& levelListCache,
126 ::IContentAcquisition& contentAcquisition,
127 ::IStoreCatalogRepository& storeCatalogRepository,
128 ::Bedrock::NotNullNonOwnerPtr<::IEntitlementManager> entitlementManager,
129 ::Bedrock::NotNullNonOwnerPtr<::IResourcePackRepository> const& resourcePackRepository,
130 ::ResourcePackManager& resourcePackManager,
131 ::ResourcePackManager& serverResourcePackManager,
132 ::TrialManager& trialManager,
133 ::IGameServerStartup& gameServerStartup
134 );
135 // NOLINTEND
136
137public:
138 // destructor thunk
139 // NOLINTBEGIN
140 MCAPI void $dtor();
141 // NOLINTEND
142};
Definition IContentAcquisition.h:5
Definition IContentManager.h:5
Definition IDlcBatcher.h:5
Definition IDlcValidation.h:5
Definition IGameServerStartup.h:5
Definition ILevelListCache.h:27
Definition IResourcePackRepository.h:34
Definition LevelDataWrapper.h:14
Definition ResourcePackCopyProgressHandler.h:5
Definition ResourcePackManager.h:35
Definition TrialManager.h:5
Definition WorldCreationHelper.h:5
Definition PackManagerContentSource.h:5