LeviLamina
Loading...
Searching...
No Matches
FlatWorldGenerator.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/utility/buffer_span.h"
7#include "mc/world/level/block/BlockVolume.h"
8#include "mc/world/level/levelgen/WorldGenerator.h"
9
10// auto generated forward declare list
11// clang-format off
12class Biome;
13class BiomeArea;
14class BiomeSource;
15class Block;
16class BlockPos;
17class BlockSource;
19class BoundingBox;
20class ChunkPos;
21class ChunkViewSource;
22class Dimension;
25class HashedString;
26class LevelChunk;
27class Random;
28namespace Json { class Value; }
29// clang-format on
30
32public:
33 // FlatWorldGenerator inner types define
34 using LayerList = ::std::vector<::Block const*>;
35
36public:
37 // member variables
38 // NOLINTBEGIN
39 ::ll::TypedStorage<8, 24, ::std::vector<::Block const*>> mPrototypeBlocks;
40 ::ll::TypedStorage<8, 40, ::BlockVolume> mPrototype;
41 ::ll::TypedStorage<1, 1, bool> mIsVoidWorld;
42 ::ll::TypedStorage<8, 8, ::Biome const*> mBiome;
43 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::FixedBiomeSource>> mBiomeSource;
44 ::ll::TypedStorage<2, 2, short> mMaxHeight;
45 // NOLINTEND
46
47public:
48 // prevent constructor by default
50
51public:
52 // virtual functions
53 // NOLINTBEGIN
54 // vIndex: 11
55 virtual void loadChunk(::LevelChunk& lc, bool forceImmediateReplacementDataLoad) /*override*/;
56
57 // vIndex: 9
58 virtual bool postProcess(::ChunkViewSource& neighborhood) /*override*/;
59
60 // vIndex: 34
61 virtual ::HashedString findStructureFeatureTypeAt(::BlockPos const& pos) /*override*/;
62
63 // vIndex: 35
64 virtual bool isStructureFeatureTypeAt(::BlockPos const& pos, ::HashedString type) const /*override*/;
65
66 // vIndex: 36
67 virtual bool findNearestStructureFeature(
68 ::HashedString feature,
69 ::BlockPos const& origin,
70 ::BlockPos& pos,
71 bool mustBeInNewChunks,
72 ::std::optional<::HashedString> biomeTag
73 ) /*override*/;
74
75 // vIndex: 38
76 virtual void prepareHeights(::BlockVolume& box, ::ChunkPos const&, bool) /*override*/;
77
78 // vIndex: 39
79 virtual void prepareAndComputeHeights(
80 ::BlockVolume& box,
81 ::ChunkPos const& pos,
82 ::std::vector<short>& zxHeights,
83 bool,
84 int
85 ) /*override*/;
86
87 // vIndex: 37
88 virtual void garbageCollectBlueprints(::buffer_span<::ChunkPos> activeChunks) /*override*/;
89
90 // vIndex: 40
91 virtual ::BiomeArea getBiomeArea(::BoundingBox const& area, uint scale) const /*override*/;
92
93 // vIndex: 43
94 virtual ::BlockPos findSpawnPosition() const /*override*/;
95
96 // vIndex: 41
97 virtual ::BiomeSource const& getBiomeSource() const /*override*/;
98
99 // vIndex: 42
100 virtual ::WorldGenerator::BlockVolumeDimensions getBlockVolumeDimensions() const /*override*/;
101
102 // vIndex: 47
103 virtual void
104 decorateWorldGenLoadChunk(::Biome const&, ::LevelChunk&, ::BlockVolumeTarget&, ::Random&, ::ChunkPos const&) const
105 /*override*/;
106
107 // vIndex: 48
108 virtual void decorateWorldGenPostProcess(::Biome const&, ::LevelChunk&, ::BlockSource&, ::Random&) const
109 /*override*/;
110
111 // vIndex: 0
112 virtual ~FlatWorldGenerator() /*override*/ = default;
113 // NOLINTEND
114
115public:
116 // member functions
117 // NOLINTBEGIN
118 MCAPI FlatWorldGenerator(::Dimension& dimension, uint, ::Json::Value const& generationOptionsJSON);
119
120 MCAPI void _generatePrototypeBlockValues(::FlatWorldOptions const& layersDesc, short minHeight);
121 // NOLINTEND
122
123public:
124 // constructor thunks
125 // NOLINTBEGIN
126 MCAPI void* $ctor(::Dimension& dimension, uint, ::Json::Value const& generationOptionsJSON);
127 // NOLINTEND
128
129public:
130 // virtual function thunks
131 // NOLINTBEGIN
132 MCAPI void $loadChunk(::LevelChunk& lc, bool forceImmediateReplacementDataLoad);
133
134 MCAPI bool $postProcess(::ChunkViewSource& neighborhood);
135
136 MCFOLD ::HashedString $findStructureFeatureTypeAt(::BlockPos const& pos);
137
138 MCAPI bool $isStructureFeatureTypeAt(::BlockPos const& pos, ::HashedString type) const;
139
140 MCAPI bool $findNearestStructureFeature(
141 ::HashedString feature,
142 ::BlockPos const& origin,
143 ::BlockPos& pos,
144 bool mustBeInNewChunks,
145 ::std::optional<::HashedString> biomeTag
146 );
147
148 MCAPI void $prepareHeights(::BlockVolume& box, ::ChunkPos const&, bool);
149
150 MCAPI void
151 $prepareAndComputeHeights(::BlockVolume& box, ::ChunkPos const& pos, ::std::vector<short>& zxHeights, bool, int);
152
153 MCFOLD void $garbageCollectBlueprints(::buffer_span<::ChunkPos> activeChunks);
154
155 MCAPI ::BiomeArea $getBiomeArea(::BoundingBox const& area, uint scale) const;
156
157 MCAPI ::BlockPos $findSpawnPosition() const;
158
159 MCAPI ::BiomeSource const& $getBiomeSource() const;
160
161 MCAPI ::WorldGenerator::BlockVolumeDimensions $getBlockVolumeDimensions() const;
162
163 MCFOLD void
164 $decorateWorldGenLoadChunk(::Biome const&, ::LevelChunk&, ::BlockVolumeTarget&, ::Random&, ::ChunkPos const&) const;
165
166 MCFOLD void $decorateWorldGenPostProcess(::Biome const&, ::LevelChunk&, ::BlockSource&, ::Random&) const;
167 // NOLINTEND
168
169public:
170 // vftables
171 // NOLINTBEGIN
173
174 MCNAPI static void** $vftableForChunkSource();
175 // NOLINTEND
176};
Definition BiomeArea.h:11
Definition BiomeSource.h:20
Definition Biome.h:23
Definition BlockPos.h:17
Definition BlockSource.h:66
Definition BlockVolumeTarget.h:24
Definition BlockVolume.h:13
Definition Block.h:37
Definition BoundingBox.h:13
Definition ChunkPos.h:11
Definition ChunkViewSource.h:22
Definition Dimension.h:83
Definition FixedBiomeSource.h:21
Definition FlatWorldGenerator.h:31
static MCAPI void ** $vftableForChunkSource()
static MCAPI void ** $vftableForIPreliminarySurfaceProvider()
Definition FlatWorldOptions.h:16
Definition HashedString.h:5
Definition Value.h:16
Definition LevelChunk.h:77
Definition Random.h:10
Definition WorldGenerator.h:30
Definition buffer_span.h:6