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/chunk/ChunkSource.h"
9#include "mc/world/level/levelgen/synth/PerlinSimplexNoise.h"
10#include "mc/world/level/storage/StorageVersion.h"
11
12// auto generated forward declare list
13// clang-format off
14class Biome;
15class ChunkPos;
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 _loadChunk(::LevelChunk& lc);
69
70 MCNAPI void _loadEntities();
71
72 MCNAPI void _markChunkAsImported(::ChunkPos const& pos);
73 // NOLINTEND
74
75public:
76 // constructor thunks
77 // NOLINTBEGIN
78 MCNAPI void* $ctor(
79 ::std::unique_ptr<::ChunkSource> parent,
80 ::LevelStorage& levelStorage,
81 ::StorageVersion v,
82 ::Biome& defaultBiome
83 );
84 // NOLINTEND
85
86public:
87 // destructor thunk
88 // NOLINTBEGIN
89 MCNAPI void $dtor();
90 // NOLINTEND
91
92public:
93 // virtual function thunks
94 // NOLINTBEGIN
95 MCNAPI void $loadChunk(::LevelChunk& lc, bool forceImmediateReplacementDataLoad);
96
97 MCNAPI bool $saveLiveChunk(::LevelChunk& lc);
98
99 MCNAPI void $acquireDiscarded(::std::unique_ptr<::LevelChunk, ::LevelChunkFinalDeleter> ptr);
100
101
102 // NOLINTEND
103
104public:
105 // vftables
106 // NOLINTBEGIN
107 MCNAPI static void** $vftable();
108 // NOLINTEND
109};
Definition Biome.h:23
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 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:79
Definition LevelStorage.h:25
Definition RegionFile.h:10
Definition LevelChunkFinalDeleter.h:5