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