LeviLamina
Loading...
Searching...
No Matches
LegacyWorldConverter.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/client/gui/screens/models/LegacyWorldConversionManager.h"
7#include "mc/client/legacy/ImportStatus.h"
8#include "mc/deps/core/file/PathBuffer.h"
9#include "mc/util/CallbackToken.h"
10#include "mc/world/actor/player/LoadingState.h"
11
12// auto generated forward declare list
13// clang-format off
14class IClientInstance;
15class IMinecraftGame;
17struct ImportResult;
18struct LegacyWorldInfo;
19namespace Legacy { class WorldImporter; }
20namespace Legacy { class WorldProcessRequest; }
21// clang-format on
22
23class LegacyWorldConverter : public ::std::enable_shared_from_this<::LegacyWorldConverter> {
24public:
25 // member variables
26 // NOLINTBEGIN
27 ::ll::TypedStorage<8, 8, ::IMinecraftGame&> mMinecraftGame;
28 ::ll::TypedStorage<8, 8, ::IClientInstance&> mClient;
29 ::ll::TypedStorage<8, 8, ::MainMenuScreenModel&> mModel;
30 ::ll::TypedStorage<8, 24, ::std::vector<::LegacyWorldInfo>> mLegacyWorldList;
31 ::ll::TypedStorage<8, 24, ::std::vector<::LegacyWorldInfo>> mRetailToPreviewWorldList;
32 ::ll::TypedStorage<1, 1, bool> mFetchingLegacyWorldsInProgress;
33 ::ll::TypedStorage<1, 1, bool> mLegacyWorldsFetched;
34 ::ll::TypedStorage<1, 1, bool> mFoundLegacyWorlds;
35 ::ll::TypedStorage<8, 48, ::LegacyWorldConversionManager> mLegacyWorldConversionManager;
36 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::Legacy::WorldImporter>> mLegacyWorldImporter;
37 ::ll::TypedStorage<8, 16, ::CallbackToken> mRetrieveCallbackToken;
38 ::ll::TypedStorage<8, 16, ::CallbackToken> mImportCallbackToken;
39 // NOLINTEND
40
41public:
42 // prevent constructor by default
43 LegacyWorldConverter& operator=(LegacyWorldConverter const&);
44 LegacyWorldConverter(LegacyWorldConverter const&);
45 LegacyWorldConverter();
46
47public:
48 // member functions
49 // NOLINTBEGIN
50 MCAPI
51 LegacyWorldConverter(::IMinecraftGame& minecraftGame, ::IClientInstance& client, ::MainMenuScreenModel& model);
52
53 MCAPI void _processLegacyWorld(::std::shared_ptr<::Legacy::WorldProcessRequest> processRequest);
54
55 MCAPI void cancelImportCallbackToken();
56
57 MCAPI void convertLegacyWorld(
58 ::LegacyWorldInfo worldInfo,
59 ::std::string const& newWorldDir,
60 ::std::function<void(::Legacy::ImportStatus, float, ::std::shared_ptr<::ImportResult>)> callback
61 );
62
63 MCAPI ::Core::PathBuffer<::std::string> createUniquePathForWorld() const;
64
65 MCAPI void
66 fetchLegacyWorlds(::std::function<void()> noWorldsFoundCallback, ::std::function<void()> onFoundNewDataCallback);
67
68 MCFOLD bool getFetchingLegacyWorldsInProgress() const;
69
70 MCAPI ::LegacyWorldInfo* getLegacyWorldAtIndex(int index);
71
72 MCAPI float getLegacyWorldConversionProgress() const;
73
74 MCAPI ::LoadingState getLegacyWorldConversionState() const;
75
76 MCAPI int getLegacyWorldCount() const;
77
78 MCFOLD bool getLegacyWorldsFetched() const;
79
80 MCAPI ::LegacyWorldInfo* getRetailToPreviewWorldAtIndex(int index);
81
82 MCAPI int getRetailToPreviewWorldCount() const;
83
84 MCAPI void handleLegacyWorldConversionComplete(::ImportResult const& result);
85
86 MCAPI void initLegacyWorldImporter();
87
88 MCAPI void setLegacyWorldConversionProgress(float progress);
89
90 MCFOLD bool supportsLegacyWorlds() const;
91
92 MCAPI void tryAcquireMissingDlc(::std::string const& levelId, ::std::function<void(bool)> downloadCompleteCallback);
93
94 MCAPI ~LegacyWorldConverter();
95 // NOLINTEND
96
97public:
98 // constructor thunks
99 // NOLINTBEGIN
100 MCAPI void* $ctor(::IMinecraftGame& minecraftGame, ::IClientInstance& client, ::MainMenuScreenModel& model);
101 // NOLINTEND
102
103public:
104 // destructor thunk
105 // NOLINTBEGIN
106 MCAPI void $dtor();
107 // NOLINTEND
108};
Definition IClientInstance.h:5
Definition IMinecraftGame.h:5
Definition LegacyWorldConverter.h:5
Definition WorldImporter.h:7
Definition WorldProcessRequest.h:7
Definition MainMenuScreenModel.h:5
Definition ImportResult.h:5
Definition LegacyWorldInfo.h:5