LeviLamina
Loading...
Searching...
No Matches
LegacyChunkStorage.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/file/PathBuffer.h"
7#include "mc/platform/threading/Mutex.h"
8#include "mc/world/level/ChunkPos.h"
9#include "mc/world/level/chunk/ChunkSource.h"
10#include "mc/world/level/levelgen/synth/PerlinSimplexNoise.h"
11#include "mc/world/level/storage/StorageVersion.h"
12
13// auto generated forward declare list
14// clang-format off
15class Biome;
16class LevelChunk;
17class LevelStorage;
18class RegionFile;
20// clang-format on
21
22class LegacyChunkStorage : public ::ChunkSource {
23public:
24 // member variables
25 // NOLINTBEGIN
26 ::ll::TypedStorage<1, 1, bool> mDone;
27 ::ll::TypedStorage<8, 40, ::PerlinSimplexNoise const> mGrassNoise;
28 ::ll::TypedStorage<8, 32, ::Core::PathBuffer<::std::string> const> mLevelPath;
29 ::ll::TypedStorage<8, 32, ::Core::PathBuffer<::std::string> const> mImportedChunksPath;
30 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::RegionFile>> mRegionFile;
31 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::RegionFile>> mEntitiesFile;
32 ::ll::TypedStorage<4, 4, ::StorageVersion> mLoadedStorageVersion;
33 ::ll::TypedStorage<8, 8, ::Biome&> mDefaultBiome;
34 ::ll::TypedStorage<8, 64, ::std::unordered_map<::ChunkPos, ::std::string>> mChunkEntities;
35 ::ll::TypedStorage<8, 64, ::std::unordered_map<::ChunkPos, ::std::string>> mChunkBlockEntities;
36 ::ll::TypedStorage<8, 80, ::Bedrock::Threading::Mutex> mRegionFileMutex;
37 ::ll::TypedStorage<8, 80, ::Bedrock::Threading::Mutex> mChunkMapMutex;
38 // NOLINTEND
39
40public:
41 // prevent constructor by default
42 LegacyChunkStorage& operator=(LegacyChunkStorage const&);
43 LegacyChunkStorage(LegacyChunkStorage const&);
44 LegacyChunkStorage();
45
46public:
47 // virtual functions
48 // NOLINTBEGIN
49 virtual ~LegacyChunkStorage() /*override*/;
50
51 virtual void loadChunk(::LevelChunk& lc, bool forceImmediateReplacementDataLoad) /*override*/;
52
53 virtual bool saveLiveChunk(::LevelChunk& lc) /*override*/;
54
55 virtual void acquireDiscarded(::std::unique_ptr<::LevelChunk, ::LevelChunkFinalDeleter> ptr) /*override*/;
56 // NOLINTEND
57
58public:
59 // member functions
60 // NOLINTBEGIN
62 ::std::unique_ptr<::ChunkSource> parent,
63 ::LevelStorage& levelStorage,
64 ::StorageVersion v,
65 ::Biome& defaultBiome
66 );
67
68 MCNAPI bool _isImported(::ChunkPos const& pos);
69
70 MCNAPI bool _loadChunk(::LevelChunk& lc);
71
72 MCNAPI void _loadEntities();
73
74 MCNAPI void _markChunkAsImported(::ChunkPos const& pos);
75 // NOLINTEND
76
77public:
78 // constructor thunks
79 // NOLINTBEGIN
80 MCNAPI void* $ctor(
81 ::std::unique_ptr<::ChunkSource> parent,
82 ::LevelStorage& levelStorage,
83 ::StorageVersion v,
84 ::Biome& defaultBiome
85 );
86 // NOLINTEND
87
88public:
89 // destructor thunk
90 // NOLINTBEGIN
91 MCNAPI void $dtor();
92 // NOLINTEND
93
94public:
95 // virtual function thunks
96 // NOLINTBEGIN
97 MCNAPI void $loadChunk(::LevelChunk& lc, bool forceImmediateReplacementDataLoad);
98
99 MCNAPI bool $saveLiveChunk(::LevelChunk& lc);
100
101 MCNAPI void $acquireDiscarded(::std::unique_ptr<::LevelChunk, ::LevelChunkFinalDeleter> ptr);
102
103
104 // NOLINTEND
105
106public:
107 // vftables
108 // NOLINTBEGIN
109 MCNAPI static void** $vftable();
110 // NOLINTEND
111};
Definition Biome.h:24
Definition ChunkPos.h:11
MCAPI void _markChunkAsImported(::ChunkPos const &pos)
MCAPI bool _loadChunk(::LevelChunk &lc)
MCAPI bool $saveLiveChunk(::LevelChunk &lc)
static MCAPI void ** $vftable()
MCAPI bool _isImported(::ChunkPos const &pos)
MCAPI void _loadEntities()
MCAPI void * $ctor(::std::unique_ptr<::ChunkSource > parent, ::LevelStorage &levelStorage, ::StorageVersion v, ::Biome &defaultBiome)
MCAPI void $loadChunk(::LevelChunk &lc, bool forceImmediateReplacementDataLoad)
MCAPI void $acquireDiscarded(::std::unique_ptr<::LevelChunk, ::LevelChunkFinalDeleter > ptr)
MCAPI void $dtor()
MCAPI LegacyChunkStorage(::std::unique_ptr<::ChunkSource > parent, ::LevelStorage &levelStorage, ::StorageVersion v, ::Biome &defaultBiome)
Definition LevelChunk.h:87
Definition LevelStorage.h:26
Definition RegionFile.h:11
Definition LevelChunkFinalDeleter.h:10