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/util/Random.h"
9#include "mc/world/level/levelgen/WorldGenerator.h"
10#include "mc/world/level/levelgen/feature/CanyonFeature.h"
11#include "mc/world/level/levelgen/feature/MonsterRoomFeature.h"
12#include "mc/world/level/levelgen/feature/UnderwaterCanyonFeature.h"
13
14// auto generated forward declare list
15// clang-format off
16class Aquifer;
17class Biome;
18class BiomeArea;
19class Block;
20class BlockPos;
21class BlockSource;
23class BlockVolume;
25class BoundingBox;
27class ChunkPos;
28class ChunkViewSource;
29class Dimension;
30class LevelChunk;
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 // prevent constructor by default
80
81public:
82 // virtual functions
83 // NOLINTBEGIN
84 // vIndex: 0
85 virtual ~OverworldGenerator() /*override*/;
86
87 // vIndex: 11
88 virtual void loadChunk(::LevelChunk& lc, bool forceImmediateReplacementDataLoad) /*override*/;
89
90 // vIndex: 9
91 virtual bool postProcess(::ChunkViewSource& neighborhood) /*override*/;
92
93 // vIndex: 48
94 virtual ::Util::MultidimensionalArray<float, 5, 5, 41>
95 generateDensityCellsForChunk(::ChunkPos const& chunkPos) const = 0;
96
97 // vIndex: 42
98 virtual ::WorldGenerator::BlockVolumeDimensions getBlockVolumeDimensions() const /*override*/;
99
100 // vIndex: 38
101 virtual void
102 prepareHeights(::BlockVolume& box, ::ChunkPos const& chunkPos, bool factorInBeardsAndShavers) /*override*/;
103
104 // vIndex: 39
105 virtual void prepareAndComputeHeights(
106 ::BlockVolume& box,
107 ::ChunkPos const& chunkPos,
108 ::std::vector<short>& ZXheights,
109 bool factorInBeardsAndShavers,
110 int skipTopN
111 ) /*override*/;
112
113 // vIndex: 40
114 virtual ::BiomeArea getBiomeArea(::BoundingBox const& area, uint scale) const /*override*/;
115
116 // vIndex: 49
117 virtual int getLevelGenHeight() const = 0;
118
119 // vIndex: 50
120 virtual ::std::optional<::XoroshiroPositionalRandomFactory> getXoroshiroPositionalRandomFactory() const = 0;
121
122 // vIndex: 51
123 virtual ::std::unique_ptr<::Aquifer>
124 tryMakeAquifer(::ChunkPos const&, ::SurfaceLevelCache const&, short, short, short) const;
125
126 // vIndex: 46
127 virtual void decorateWorldGenLoadChunk(
128 ::Biome const& biome,
129 ::LevelChunk& lc,
130 ::BlockVolumeTarget& target,
131 ::Random& random,
132 ::ChunkPos const& pos
133 ) const /*override*/;
134
135 // vIndex: 52
136 virtual ::ChunkLocalNoiseCache createNoiseCache(::ChunkPos chunkPos) const;
137
138 // vIndex: 53
139 virtual ::WorldGenCache createWorldGenCache(::ChunkPos chunkPos) const;
140
141 // vIndex: 54
142 virtual ::PerlinSimplexNoise const& getSurfaceNoise() = 0;
143
144 // vIndex: 55
145 virtual ::std::unique_ptr<::PerlinSimplexNoise> const& getMaterialAdjNoise() const = 0;
146
147 // vIndex: 56
148 virtual void _prepareHeights(
149 ::BlockVolume&,
150 ::ChunkPos const&,
151 ::WorldGenCache const&,
152 ::Aquifer*,
153 ::std::function<void(::BlockPos const&, ::Block const&, int)>&&,
154 bool,
155 ::std::vector<short>*,
156 int
157 ) = 0;
158 // NOLINTEND
159
160public:
161 // member functions
162 // NOLINTBEGIN
163 MCNAPI OverworldGenerator(::Dimension& dimension, bool isLegacyWorld);
164
165 MCNAPI void buildSurfaces(
167 ::BlockVolume& blocks,
168 ::LevelChunk& levelChunk,
169 ::ChunkPos const& chunkPos,
170 ::SurfaceLevelCache const& surfaceLevelCache
171 );
172 // NOLINTEND
173
174public:
175 // static functions
176 // NOLINTBEGIN
177 MCNAPI static void
178 _fixWaterAlongEdges(::LevelChunk const& lc, ::BlockSource& source, ::BlockTickingQueue& instaTickQueue);
179 // NOLINTEND
180
181public:
182 // constructor thunks
183 // NOLINTBEGIN
184 MCNAPI void* $ctor(::Dimension& dimension, bool isLegacyWorld);
185 // NOLINTEND
186
187public:
188 // destructor thunk
189 // NOLINTBEGIN
190 MCNAPI void $dtor();
191 // NOLINTEND
192
193public:
194 // virtual function thunks
195 // NOLINTBEGIN
196 MCNAPI void $loadChunk(::LevelChunk& lc, bool forceImmediateReplacementDataLoad);
197
198 MCNAPI bool $postProcess(::ChunkViewSource& neighborhood);
199
201
202 MCNAPI void $prepareHeights(::BlockVolume& box, ::ChunkPos const& chunkPos, bool factorInBeardsAndShavers);
203
205 ::BlockVolume& box,
206 ::ChunkPos const& chunkPos,
207 ::std::vector<short>& ZXheights,
208 bool factorInBeardsAndShavers,
209 int skipTopN
210 );
211
212 MCNAPI ::BiomeArea $getBiomeArea(::BoundingBox const& area, uint scale) const;
213
214 MCNAPI ::std::unique_ptr<::Aquifer>
215 $tryMakeAquifer(::ChunkPos const&, ::SurfaceLevelCache const&, short, short, short) const;
216
218 ::Biome const& biome,
219 ::LevelChunk& lc,
220 ::BlockVolumeTarget& target,
221 ::Random& random,
222 ::ChunkPos const& pos
223 ) const;
224
226
227 MCNAPI ::WorldGenCache $createWorldGenCache(::ChunkPos chunkPos) const;
228 // NOLINTEND
229
230public:
231 // vftables
232 // NOLINTBEGIN
233 MCNAPI static void** $vftableForChunkSource();
234
236 // NOLINTEND
237};
Definition Aquifer.h:16
Definition BiomeArea.h:11
Definition Biome.h:26
Definition BlockPos.h:18
Definition BlockSource.h:67
Definition BlockTickingQueue.h:26
Definition BlockVolumeTarget.h:24
Definition BlockVolume.h:13
Definition Block.h:38
Definition BoundingBox.h:13
Definition ChunkLocalNoiseCache.h:8
Definition ChunkPos.h:11
Definition ChunkViewSource.h:22
Definition Dimension.h:83
Definition LevelChunk.h:74
Definition OverworldGenerator.h:37
MCAPI void $prepareHeights(::BlockVolume &box, ::ChunkPos const &chunkPos, bool factorInBeardsAndShavers)
MCAPI::ChunkLocalNoiseCache $createNoiseCache(::ChunkPos chunkPos) const
MCAPI::BiomeArea $getBiomeArea(::BoundingBox const &area, uint scale) const
MCAPI void $dtor()
MCAPI void $loadChunk(::LevelChunk &lc, bool forceImmediateReplacementDataLoad)
MCAPI void buildSurfaces(::OverworldGenerator::ThreadData &thread, ::BlockVolume &blocks, ::LevelChunk &levelChunk, ::ChunkPos const &chunkPos, ::SurfaceLevelCache const &surfaceLevelCache)
MCAPI bool $postProcess(::ChunkViewSource &neighborhood)
static MCAPI void ** $vftableForIPreliminarySurfaceProvider()
MCAPI ::std::unique_ptr<::Aquifer > $tryMakeAquifer(::ChunkPos const &, ::SurfaceLevelCache const &, short, short, short) const
MCAPI::WorldGenerator::BlockVolumeDimensions $getBlockVolumeDimensions() const
MCAPI::WorldGenCache $createWorldGenCache(::ChunkPos chunkPos) const
static MCAPI void ** $vftableForChunkSource()
static MCAPI void _fixWaterAlongEdges(::LevelChunk const &lc, ::BlockSource &source, ::BlockTickingQueue &instaTickQueue)
MCAPI void $decorateWorldGenLoadChunk(::Biome const &biome, ::LevelChunk &lc, ::BlockVolumeTarget &target, ::Random &random, ::ChunkPos const &pos) const
MCAPI void $prepareAndComputeHeights(::BlockVolume &box, ::ChunkPos const &chunkPos, ::std::vector< short > &ZXheights, bool factorInBeardsAndShavers, int skipTopN)
MCAPI void * $ctor(::Dimension &dimension, bool isLegacyWorld)
Definition PerlinSimplexNoise.h:13
Definition Random.h:11
Definition SurfaceLevelCache.h:9
Definition MultidimensionalArray.h:12
Definition WorldGenCache.h:11
Definition WorldGenerator.h:30
Definition XoroshiroPositionalRandomFactory.h:16
STL namespace.
Definition OverworldGenerator.h:47
Definition WorldGenerator.h:38
Definition buffer.h:5