LeviLamina
Loading...
Searching...
No Matches
OverworldGenerator.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/threading/InstancedThreadLocal.h"
7#include "mc/util/MultidimensionalArray.h"
8#include "mc/world/level/levelgen/WorldGenerator.h"
9
10// auto generated forward declare list
11// clang-format off
12class Aquifer;
13class Biome;
14class BiomeArea;
15class Block;
16class BlockPos;
17class BlockSource;
19class BlockVolume;
21class BoundingBox;
22class CanyonFeature;
24class ChunkPos;
25class ChunkViewSource;
26class Dimension;
27class LevelChunk;
30class Random;
33class WorldGenCache;
35// clang-format on
36
38public:
39 // OverworldGenerator inner types declare
40 // clang-format off
41 struct ThreadData;
42 // clang-format on
43
44 // OverworldGenerator inner types define
46
47 struct ThreadData {
48 public:
49 // member variables
50 // NOLINTBEGIN
51 ::ll::TypedStorage<4, 4096, ::std::array<float, 1024>> buffer;
52 ::ll::TypedStorage<4, 1024, ::std::array<float, 256>> depthBuffer;
53 ::ll::TypedStorage<4, 1024, ::std::array<float, 256>> dataBuffer;
54 ::ll::TypedStorage<8, 655360, ::std::array<::Block const*, 81920>> blockBuffer;
55 ::ll::TypedStorage<8, 8, float*> fi;
56 ::ll::TypedStorage<8, 8, float*> fis;
57 ::ll::TypedStorage<8, 2568, ::Random> random;
58 // NOLINTEND
59 };
60
61public:
62 // member variables
63 // NOLINTBEGIN
64 ::ll::TypedStorage<4, 36, float[9]> mBiomeBlendKernel;
65 ::ll::TypedStorage<1, 1, bool const> mIsLegacyWorld;
66 ::ll::TypedStorage<
67 8,
68 168,
69 ::Bedrock::Threading::
70 InstancedThreadLocal<::OverworldGenerator::ThreadData, ::std::allocator<::OverworldGenerator::ThreadData>>>
71 generatorHelpersPool;
72 ::ll::TypedStorage<8, 32, ::MonsterRoomFeature> monsterRoomFeature;
73 ::ll::TypedStorage<2, 16, ::CanyonFeature> canyonFeature;
74 ::ll::TypedStorage<2, 16, ::UnderwaterCanyonFeature> underwaterCanyonFeature;
75 // NOLINTEND
76
77public:
78 // virtual functions
79 // NOLINTBEGIN
80 // vIndex: 0
81 virtual ~OverworldGenerator() /*override*/;
82
83 // vIndex: 11
84 virtual void loadChunk(::LevelChunk& lc, bool forceImmediateReplacementDataLoad) /*override*/;
85
86 // vIndex: 9
87 virtual bool postProcess(::ChunkViewSource& neighborhood) /*override*/;
88
89 // vIndex: 48
90 virtual ::Util::MultidimensionalArray<float, 5, 5, 41> generateDensityCellsForChunk(::ChunkPos const& chunkPos
91 ) const = 0;
92
93 // vIndex: 42
94 virtual ::WorldGenerator::BlockVolumeDimensions getBlockVolumeDimensions() const /*override*/;
95
96 // vIndex: 38
97 virtual void
98 prepareHeights(::BlockVolume& box, ::ChunkPos const& chunkPos, bool factorInBeardsAndShavers) /*override*/;
99
100 // vIndex: 39
101 virtual void prepareAndComputeHeights(
102 ::BlockVolume& box,
103 ::ChunkPos const& chunkPos,
104 ::std::vector<short>& ZXheights,
105 bool factorInBeardsAndShavers,
106 int skipTopN
107 ) /*override*/;
108
109 // vIndex: 40
110 virtual ::BiomeArea getBiomeArea(::BoundingBox const& area, uint scale) const /*override*/;
111
112 // vIndex: 49
113 virtual int getLevelGenHeight() const = 0;
114
115 // vIndex: 50
116 virtual ::std::optional<::XoroshiroPositionalRandomFactory> getXoroshiroPositionalRandomFactory() const = 0;
117
118 // vIndex: 51
119 virtual ::std::unique_ptr<::Aquifer>
120 tryMakeAquifer(::ChunkPos const&, ::SurfaceLevelCache const&, short, short, short) const;
121
122 // vIndex: 46
123 virtual void decorateWorldGenLoadChunk(
124 ::Biome const& biome,
125 ::LevelChunk& lc,
126 ::BlockVolumeTarget& target,
127 ::Random& random,
128 ::ChunkPos const& pos
129 ) const /*override*/;
130
131 // vIndex: 52
132 virtual ::ChunkLocalNoiseCache createNoiseCache(::ChunkPos chunkPos) const;
133
134 // vIndex: 53
135 virtual ::WorldGenCache createWorldGenCache(::ChunkPos chunkPos) const;
136
137 // vIndex: 54
138 virtual ::PerlinSimplexNoise const& getSurfaceNoise() = 0;
139
140 // vIndex: 55
141 virtual ::std::unique_ptr<::PerlinSimplexNoise> const& getMaterialAdjNoise() const = 0;
142
143 // vIndex: 56
144 virtual void _prepareHeights(
145 ::BlockVolume&,
146 ::ChunkPos const&,
147 ::WorldGenCache const&,
148 ::Aquifer*,
149 ::std::function<void(::BlockPos const&, ::Block const&, int)>&&,
150 bool,
151 ::std::vector<short>*,
152 int
153 ) = 0;
154 // NOLINTEND
155
156public:
157 // member functions
158 // NOLINTBEGIN
159 MCAPI OverworldGenerator(::Dimension& dimension, bool isLegacyWorld);
160
161 MCAPI void buildSurfaces(
163 ::BlockVolume& blocks,
164 ::LevelChunk& levelChunk,
165 ::ChunkPos const& chunkPos,
166 ::SurfaceLevelCache const& surfaceLevelCache
167 );
168 // NOLINTEND
169
170public:
171 // static functions
172 // NOLINTBEGIN
173 MCAPI static void
174 _fixWaterAlongEdges(::LevelChunk const& lc, ::BlockSource& source, ::BlockTickingQueue& instaTickQueue);
175 // NOLINTEND
176
177public:
178 // constructor thunks
179 // NOLINTBEGIN
180 MCAPI void* $ctor(::Dimension& dimension, bool isLegacyWorld);
181 // NOLINTEND
182
183public:
184 // destructor thunk
185 // NOLINTBEGIN
186 MCAPI void $dtor();
187 // NOLINTEND
188
189public:
190 // virtual function thunks
191 // NOLINTBEGIN
192 MCAPI void $loadChunk(::LevelChunk& lc, bool forceImmediateReplacementDataLoad);
193
194 MCAPI bool $postProcess(::ChunkViewSource& neighborhood);
195
196 MCAPI ::WorldGenerator::BlockVolumeDimensions $getBlockVolumeDimensions() const;
197
198 MCAPI void $prepareHeights(::BlockVolume& box, ::ChunkPos const& chunkPos, bool factorInBeardsAndShavers);
199
200 MCAPI void $prepareAndComputeHeights(
201 ::BlockVolume& box,
202 ::ChunkPos const& chunkPos,
203 ::std::vector<short>& ZXheights,
204 bool factorInBeardsAndShavers,
205 int skipTopN
206 );
207
208 MCAPI ::BiomeArea $getBiomeArea(::BoundingBox const& area, uint scale) const;
209
210 MCFOLD ::std::unique_ptr<::Aquifer>
211 $tryMakeAquifer(::ChunkPos const&, ::SurfaceLevelCache const&, short, short, short) const;
212
213 MCFOLD void $decorateWorldGenLoadChunk(
214 ::Biome const& biome,
215 ::LevelChunk& lc,
216 ::BlockVolumeTarget& target,
217 ::Random& random,
218 ::ChunkPos const& pos
219 ) const;
220
221 MCFOLD ::ChunkLocalNoiseCache $createNoiseCache(::ChunkPos chunkPos) const;
222
223 MCAPI ::WorldGenCache $createWorldGenCache(::ChunkPos chunkPos) const;
224 // NOLINTEND
225
226public:
227 // vftables
228 // NOLINTBEGIN
229 MCAPI static void** $vftableForChunkSource();
230
231 MCAPI static void** $vftableForIPreliminarySurfaceProvider();
232 // NOLINTEND
233};
Definition Aquifer.h:14
Definition BiomeArea.h:11
Definition Biome.h:27
Definition BlockPos.h:18
Definition BlockSource.h:67
Definition BlockTickingQueue.h:24
Definition BlockVolumeTarget.h:24
Definition BlockVolume.h:11
Definition Block.h:36
Definition BoundingBox.h:18
Definition CanyonFeature.h:17
Definition ChunkLocalNoiseCache.h:8
Definition ChunkPos.h:11
Definition ChunkViewSource.h:22
Definition Dimension.h:83
Definition LevelChunk.h:73
Definition MonsterRoomFeature.h:16
Definition OverworldGenerator.h:37
Definition PerlinSimplexNoise.h:13
Definition Random.h:16
Definition SurfaceLevelCache.h:9
Definition UnderwaterCanyonFeature.h:20
Definition MultidimensionalArray.h:12
Definition WorldGenCache.h:11
Definition WorldGenerator.h:30
Definition XoroshiroPositionalRandomFactory.h:17
STL namespace.
Definition OverworldGenerator.h:47
Definition WorldGenerator.h:38
Definition buffer.h:5