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
11// auto generated forward declare list
12// clang-format off
13class IClientInstance;
14class IMinecraftGame;
16struct ImportResult;
17struct LegacyWorldInfo;
18namespace Legacy { class WorldImporter; }
19// clang-format on
20
21class LegacyWorldConverter : public ::std::enable_shared_from_this<::LegacyWorldConverter> {
22public:
23 // member variables
24 // NOLINTBEGIN
25 ::ll::TypedStorage<8, 8, ::IMinecraftGame&> mMinecraftGame;
26 ::ll::TypedStorage<8, 8, ::IClientInstance&> mClient;
27 ::ll::TypedStorage<8, 8, ::MainMenuScreenModel&> mModel;
28 ::ll::TypedStorage<8, 24, ::std::vector<::LegacyWorldInfo>> mLegacyWorldList;
29 ::ll::TypedStorage<8, 24, ::std::vector<::LegacyWorldInfo>> mRetailToPreviewWorldList;
30 ::ll::TypedStorage<1, 1, bool> mFetchingLegacyWorldsInProgress;
31 ::ll::TypedStorage<1, 1, bool> mLegacyWorldsFetched;
32 ::ll::TypedStorage<1, 1, bool> mFoundLegacyWorlds;
33 ::ll::TypedStorage<8, 128, ::LegacyWorldConversionManager> mLegacyWorldConversionManager;
34 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::Legacy::WorldImporter>> mLegacyWorldImporter;
35 ::ll::TypedStorage<8, 16, ::CallbackToken> mRetrieveCallbackToken;
36 ::ll::TypedStorage<8, 16, ::CallbackToken> mImportCallbackToken;
37 // NOLINTEND
38
39public:
40 // prevent constructor by default
41 LegacyWorldConverter& operator=(LegacyWorldConverter const&);
42 LegacyWorldConverter(LegacyWorldConverter const&);
43 LegacyWorldConverter();
44
45public:
46 // member functions
47 // NOLINTBEGIN
48 MCAPI void convertLegacyWorld(
49 ::LegacyWorldInfo worldInfo,
50 ::std::string const& newWorldDir,
51 ::std::function<void(::Legacy::ImportStatus, float, ::std::shared_ptr<::ImportResult>)> callback
52 );
53
54 MCAPI ::Core::PathBuffer<::std::string> createUniquePathForWorld() const;
55
56 MCAPI void handleLegacyWorldConversionComplete(::ImportResult const& result);
57
58 MCAPI void initLegacyWorldImporter();
59 // NOLINTEND
60};
Definition IClientInstance.h:5
Definition IMinecraftGame.h:5
Definition LegacyWorldConverter.h:5
Definition WorldImporter.h:7
Definition MainMenuScreenModel.h:5
Definition ImportResult.h:5
Definition LegacyWorldInfo.h:5