LeviLamina
Loading...
Searching...
No Matches
InfiniteWorldConverter.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/client/world/WorldID.h"
7#include "mc/deps/core/utility/NonOwnerPointer.h"
8#include "mc/deps/core/utility/UniqueOwnerPointer.h"
9#include "mc/util/GridArea.h"
10#include "mc/world/level/ChunkPos.h"
11
12// auto generated forward declare list
13// clang-format off
14class ChunkSource;
16class ILevelListCache;
17class LevelChunk;
18class LevelDbEnv;
19class LevelStorage;
20class TaskGroup;
21// clang-format on
22
23namespace World {
24
26public:
27 // InfiniteWorldConverter inner types define
28 enum class State : int {
29 Idle = 0,
30 Loading = 1,
31 Done = 2,
32 };
33
34 enum class Result : int {
35 Ok = 0,
36 InvalidLevel = 1,
37 };
38
39public:
40 // member variables
41 // NOLINTBEGIN
42 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::TaskGroup>> mTaskGroup;
43 ::ll::TypedStorage<8, 8, ::ILevelListCache&> mLevelListCache;
44 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::IContentKeyProvider const>> mKeyProvider;
45 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::LevelDbEnv>> mLevelDbEnv;
46 ::ll::TypedStorage<8, 16, ::Bedrock::UniqueOwnerPointer<::LevelStorage>> mLevelStorage;
47 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ChunkSource>> mLegacySource;
48 ::ll::TypedStorage<4, 4, ::World::InfiniteWorldConverter::State> mState;
49 ::ll::TypedStorage<8, 376, ::GridArea<::std::shared_ptr<::LevelChunk>>> mView;
50 ::ll::TypedStorage<8, 64, ::std::unordered_set<::ChunkPos>> mUnloaded;
51 ::ll::TypedStorage<4, 4, float> mProgress;
52 ::ll::TypedStorage<8, 32, ::World::WorldID> mWorldId;
53 ::ll::TypedStorage<8, 64, ::std::function<void()>> mOnCompleteCallback;
54 ::ll::TypedStorage<8, 64, ::std::function<void(::World::InfiniteWorldConverter::Result)>> mOnErrorCallback;
55 // NOLINTEND
56
57public:
58 // prevent constructor by default
59 InfiniteWorldConverter& operator=(InfiniteWorldConverter const&);
60 InfiniteWorldConverter(InfiniteWorldConverter const&);
61 InfiniteWorldConverter();
62
63public:
64 // member functions
65 // NOLINTBEGIN
66 MCAPI InfiniteWorldConverter(
67 ::ILevelListCache& levelListCache,
68 ::Bedrock::NotNullNonOwnerPtr<::IContentKeyProvider const> const& keyProvider,
69 ::Bedrock::NotNullNonOwnerPtr<::LevelDbEnv> levelDbEnv
70 );
71
72 MCAPI void _makeBackupOfLevel(::World::WorldID const& id);
73
74 MCAPI void _resetState();
75
76 MCAPI void _tick();
77
78 MCAPI void makeWorldInfinite(
79 ::World::WorldID const& id,
80 ::std::function<void()> onCompleteCallback,
81 ::std::function<void(::World::InfiniteWorldConverter::Result)> onErrorCallback
82 );
83
84 MCAPI ~InfiniteWorldConverter();
85 // NOLINTEND
86
87public:
88 // constructor thunks
89 // NOLINTBEGIN
90 MCAPI void* $ctor(
91 ::ILevelListCache& levelListCache,
92 ::Bedrock::NotNullNonOwnerPtr<::IContentKeyProvider const> const& keyProvider,
93 ::Bedrock::NotNullNonOwnerPtr<::LevelDbEnv> levelDbEnv
94 );
95 // NOLINTEND
96
97public:
98 // destructor thunk
99 // NOLINTBEGIN
100 MCAPI void $dtor();
101 // NOLINTEND
102};
103
104} // namespace World
Definition ChunkSource.h:37
Definition IContentKeyProvider.h:13
Definition ILevelListCache.h:27
Definition LevelChunk.h:79
Definition LevelDbEnv.h:8
Definition LevelStorage.h:25
Definition TaskGroup.h:53
Definition InfiniteWorldConverter.h:7