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, 304, ::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 _tick();
73
74 MCAPI void makeWorldInfinite(
75 ::World::WorldID const& id,
76 ::std::function<void()> onCompleteCallback,
77 ::std::function<void(::World::InfiniteWorldConverter::Result)> onErrorCallback
78 );
79
80 MCAPI ~InfiniteWorldConverter();
81 // NOLINTEND
82
83public:
84 // constructor thunks
85 // NOLINTBEGIN
86 MCAPI void* $ctor(
87 ::ILevelListCache& levelListCache,
88 ::Bedrock::NotNullNonOwnerPtr<::IContentKeyProvider const> const& keyProvider,
89 ::Bedrock::NotNullNonOwnerPtr<::LevelDbEnv> levelDbEnv
90 );
91 // NOLINTEND
92
93public:
94 // destructor thunk
95 // NOLINTBEGIN
96 MCAPI void $dtor();
97 // NOLINTEND
98};
99
100} // namespace World
Definition ChunkSource.h:38
Definition IContentKeyProvider.h:13
Definition ILevelListCache.h:27
Definition LevelChunk.h:75
Definition LevelDbEnv.h:8
Definition LevelStorage.h:25
Definition TaskGroup.h:61
Definition InfiniteWorldConverter.h:7