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: 14
55 virtual void loadChunk(::LevelChunk& lc, bool forceImmediateReplacementDataLoad) /*override*/;
56
57 // vIndex: 9
58 virtual bool structurePostProcessChunk(::ChunkViewSource&) /*override*/;
59
60 // vIndex: 10
61 virtual bool decorationPostProcessChunk(::ChunkViewSource& neighborhood) /*override*/;
62
63 // vIndex: 37
64 virtual ::HashedString findStructureFeatureTypeAt(::BlockPos const& pos) /*override*/;
65
66 // vIndex: 38
67 virtual bool isStructureFeatureTypeAt(::BlockPos const& pos, ::HashedString type) const /*override*/;
68
69 // vIndex: 39
70 virtual bool findNearestStructureFeature(
71 ::HashedString feature,
72 ::BlockPos const& origin,
73 ::BlockPos& pos,
74 bool mustBeInNewChunks,
75 ::std::optional<::HashedString> biomeTag
76 ) /*override*/;
77
78 // vIndex: 42
79 virtual void
80 prepareHeights(::BlockVolume& box, ::ChunkPos const&, ::std::vector<short>* zxHeights, bool) /*override*/;
81
82 // vIndex: 41
83 virtual void garbageCollectBlueprints(::buffer_span<::ChunkPos> activeChunks) /*override*/;
84
85 // vIndex: 43
86 virtual ::BiomeArea getBiomeArea(::BoundingBox const& area, uint scale) const /*override*/;
87
88 // vIndex: 46
89 virtual ::BlockPos findSpawnPosition() const /*override*/;
90
91 // vIndex: 44
92 virtual ::BiomeSource const& getBiomeSource() const /*override*/;
93
94 // vIndex: 45
95 virtual ::WorldGenerator::BlockVolumeDimensions getBlockVolumeDimensions() const /*override*/;
96
97 // vIndex: 49
98 virtual void
99 decorateWorldGenLoadChunk(::Biome const&, ::LevelChunk&, ::BlockVolumeTarget&, ::Random&, ::ChunkPos const&) const
100 /*override*/;
101
102 // vIndex: 50
103 virtual void decorateWorldGenPostProcess(::Biome const&, ::LevelChunk&, ::BlockSource&, ::Random&) const
104 /*override*/;
105
106 // vIndex: 0
107 virtual ~FlatWorldGenerator() /*override*/ = default;
108 // NOLINTEND
109
110public:
111 // member functions
112 // NOLINTBEGIN
113 MCAPI FlatWorldGenerator(::Dimension& dimension, uint, ::Json::Value const& generationOptionsJSON);
114
115 MCAPI void _generatePrototypeBlockValues(::FlatWorldOptions const& layersDesc, short minHeight);
116 // NOLINTEND
117
118public:
119 // constructor thunks
120 // NOLINTBEGIN
121 MCAPI void* $ctor(::Dimension& dimension, uint, ::Json::Value const& generationOptionsJSON);
122 // NOLINTEND
123
124public:
125 // virtual function thunks
126 // NOLINTBEGIN
127 MCAPI void $loadChunk(::LevelChunk& lc, bool forceImmediateReplacementDataLoad);
128
129 MCFOLD bool $structurePostProcessChunk(::ChunkViewSource&);
130
131 MCAPI bool $decorationPostProcessChunk(::ChunkViewSource& neighborhood);
132
133 MCFOLD ::HashedString $findStructureFeatureTypeAt(::BlockPos const& pos);
134
135 MCAPI bool $isStructureFeatureTypeAt(::BlockPos const& pos, ::HashedString type) const;
136
137 MCAPI bool $findNearestStructureFeature(
138 ::HashedString feature,
139 ::BlockPos const& origin,
140 ::BlockPos& pos,
141 bool mustBeInNewChunks,
142 ::std::optional<::HashedString> biomeTag
143 );
144
145 MCAPI void $prepareHeights(::BlockVolume& box, ::ChunkPos const&, ::std::vector<short>* zxHeights, bool);
146
147 MCFOLD void $garbageCollectBlueprints(::buffer_span<::ChunkPos> activeChunks);
148
149 MCAPI ::BiomeArea $getBiomeArea(::BoundingBox const& area, uint scale) const;
150
151 MCAPI ::BlockPos $findSpawnPosition() const;
152
153 MCAPI ::BiomeSource const& $getBiomeSource() const;
154
155 MCAPI ::WorldGenerator::BlockVolumeDimensions $getBlockVolumeDimensions() const;
156
157 MCFOLD void
158 $decorateWorldGenLoadChunk(::Biome const&, ::LevelChunk&, ::BlockVolumeTarget&, ::Random&, ::ChunkPos const&) const;
159
160 MCFOLD void $decorateWorldGenPostProcess(::Biome const&, ::LevelChunk&, ::BlockSource&, ::Random&) const;
161 // NOLINTEND
162
163public:
164 // vftables
165 // NOLINTBEGIN
167
168 MCNAPI static void** $vftableForChunkSource();
169 // NOLINTEND
170};
Definition BiomeArea.h:11
Definition BiomeSource.h:20
Definition Biome.h:23
Definition BlockPos.h:17
Definition BlockSource.h:66
Definition BlockVolumeTarget.h:29
Definition BlockVolume.h:13
Definition Block.h:38
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:78
Definition Random.h:10
Definition WorldGenerator.h:31
Definition buffer_span.h:6