LeviLamina
Loading...
Searching...
No Matches
ChunkViewSource.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/util/GridArea.h"
7#include "mc/world/level/chunk/ChunkSource.h"
8#include "mc/world/level/chunk/ChunkSourceViewGenerateMode.h"
9
10// auto generated forward declare list
11// clang-format off
12class BlockPos;
13class ChunkPos;
14class LevelChunk;
15class Random;
16struct Bounds;
18namespace br::worldgen { class StructureInstance; }
19namespace br::worldgen { struct Structure; }
20// clang-format on
21
22class ChunkViewSource : public ::ChunkSource {
23public:
24 // member variables
25 // NOLINTBEGIN
26 ::ll::TypedStorage<4, 4, ::ChunkSource::LoadMode> mParentLoadMode;
27 ::ll::TypedStorage<8, 304, ::GridArea<::std::shared_ptr<::LevelChunk>>> mArea;
28 ::ll::TypedStorage<8, 8, ::ChunkSource&> mMainSource;
29 // NOLINTEND
30
31public:
32 // prevent constructor by default
33 ChunkViewSource& operator=(ChunkViewSource const&);
34 ChunkViewSource();
35
36public:
37 // virtual functions
38 // NOLINTBEGIN
39 virtual ::std::shared_ptr<::LevelChunk> getExistingChunk(::ChunkPos const& pos) /*override*/;
40
41 virtual ::std::shared_ptr<::LevelChunk> getRandomChunk(::Random& random) /*override*/;
42
43 virtual void acquireDiscarded(::std::unique_ptr<::LevelChunk, ::LevelChunkFinalDeleter> ptr) /*override*/;
44
45 virtual ::std::shared_ptr<::LevelChunk>
46 createNewChunk(::ChunkPos const& cp, ::ChunkSource::LoadMode lm, bool readOnly) /*override*/;
47
48 virtual bool isWithinWorldLimit(::ChunkPos const& cp) const /*override*/;
49
50 virtual void setLevelChunk(::std::shared_ptr<::LevelChunk> lc) /*override*/;
51
52 virtual ::std::shared_ptr<::br::worldgen::StructureInstance>
53 _tryGetOrLoadStructureInstanceAt(::ChunkPos const& cp, ::br::worldgen::Structure const& structure) /*override*/;
54
55 virtual ~ChunkViewSource() /*override*/;
56 // NOLINTEND
57
58public:
59 // member functions
60 // NOLINTBEGIN
61 MCAPI ChunkViewSource(::ChunkViewSource const& otherChunkViewSource);
62
63 MCAPI void move(
64 ::Bounds const& bounds,
65 bool isCircle,
66 ::ChunkSourceViewGenerateMode chunkViewGenerateMode,
67 ::std::function<void(::gsl::span<::std::shared_ptr<::LevelChunk>>)> add,
68 float const* serverBuildRatio
69 );
70
71 MCAPI void move(
72 ::BlockPos const& blockMin,
73 ::BlockPos const& blockMax,
74 bool isCircle,
75 ::ChunkSourceViewGenerateMode chunkViewGenerateMode,
76 ::std::function<void(::gsl::span<::std::shared_ptr<::LevelChunk>>)> add,
77 float const* serverBuildRatio
78 );
79
80 MCAPI void move(
81 ::BlockPos const& center,
82 int radius,
83 bool isCircle,
84 ::ChunkSourceViewGenerateMode chunkViewGenerateMode,
85 ::std::function<void(::gsl::span<::std::shared_ptr<::LevelChunk>>)> add,
86 float const* serverBuildRatio
87 );
88
89 MCAPI void rebuildSpecificArea(
90 ::Bounds const& bounds,
91 bool,
92 ::std::function<void(::gsl::span<::std::shared_ptr<::LevelChunk>>)>
93 );
94 // NOLINTEND
95
96public:
97 // constructor thunks
98 // NOLINTBEGIN
99 MCAPI void* $ctor(::ChunkViewSource const& otherChunkViewSource);
100 // NOLINTEND
101
102public:
103 // destructor thunk
104 // NOLINTBEGIN
105 MCAPI void $dtor();
106 // NOLINTEND
107
108public:
109 // virtual function thunks
110 // NOLINTBEGIN
111 MCAPI ::std::shared_ptr<::LevelChunk> $getExistingChunk(::ChunkPos const& pos);
112
113 MCAPI ::std::shared_ptr<::LevelChunk> $getRandomChunk(::Random& random);
114
115 MCAPI void $acquireDiscarded(::std::unique_ptr<::LevelChunk, ::LevelChunkFinalDeleter> ptr);
116
117 MCFOLD ::std::shared_ptr<::LevelChunk>
118 $createNewChunk(::ChunkPos const& cp, ::ChunkSource::LoadMode lm, bool readOnly);
119
120 MCAPI bool $isWithinWorldLimit(::ChunkPos const& cp) const;
121
122 MCAPI void $setLevelChunk(::std::shared_ptr<::LevelChunk> lc);
123
124 MCAPI ::std::shared_ptr<::br::worldgen::StructureInstance>
125 $_tryGetOrLoadStructureInstanceAt(::ChunkPos const& cp, ::br::worldgen::Structure const& structure);
126
127
128 // NOLINTEND
129
130public:
131 // vftables
132 // NOLINTBEGIN
133 MCNAPI static void** $vftable();
134 // NOLINTEND
135};
Definition BlockPos.h:17
Definition ChunkPos.h:13
static MCAPI void ** $vftable()
Definition LevelChunk.h:77
Definition Random.h:10
Definition StructureInstance.h:20
Definition Bounds.h:8
Definition LevelChunkFinalDeleter.h:5
Definition Structure.h:23